/* style.css */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background-color: #f5f6f7;
    background-image: url('images/自然.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #333;
    padding-bottom: 80px;
    overflow-y: hidden;
    overflow-x: hidden;
}

/* ==================== 登录/注册样式 ==================== */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/自然.png') center/cover no-repeat;
    image-rendering: -webkit-optimize-contrast;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.auth-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 30px;
    box-sizing: border-box;
    max-height: 90vh;
    overflow-y: auto;
}

.auth-form {
    width: 100%;
}

/* 择吉图标样式 */
.crystal-ball-icon {
    text-align: center;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 40px; /* 从32px增加到40px */
    user-select: none;
    transition: transform 0.3s ease;
    display: inline-block; /* 改为inline-block，限制宽度 */
    line-height: 1; /* 设置行高，避免额外空间 */
    width: auto; /* 自动宽度，只包裹图标 */
    padding: 0; /* 移除内边距 */
    pointer-events: auto; /* 确保可以点击 */
}

.crystal-ball-icon:hover {
    transform: scale(1.1);
}

.crystal-ball-icon:active {
    transform: scale(0.95);
}

.auth-title {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 700;
}

.auth-input-group {
    margin-bottom: 18px;
}

.auth-input-group label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-size: 14px;
    font-weight: 600;
}

.auth-input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.auth-input-group input:focus {
    outline: none;
    border-color: #07cdff;
    box-shadow: 0 0 0 3px rgba(7, 205, 255, 0.2);
}

/* 密码输入框包装器 */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.toggle-password:hover {
    opacity: 1;
}

.toggle-password.visible {
    opacity: 1;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.auth-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-btn.primary {
    background: linear-gradient(135deg, #07cdff 0%, #0078d4 100%);
    color: white;
}

.auth-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(7, 205, 255, 0.4);
}

.auth-btn.primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.auth-btn.secondary {
    background: white;
    color: #07cdff;
    border: 2px solid #07cdff;
}

.auth-btn.secondary:hover {
    background: rgba(7, 205, 255, 0.1);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.auth-switch span {
    color: #07cdff;
    cursor: pointer;
    font-weight: 600;
}

.auth-switch span:hover {
    text-decoration: underline;
}

/* 验证区域样式 */
.verification-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.verification-title {
    font-size: 14px;
    color: #555;
    margin: 0 0 15px 0;
    text-align: center;
}

.verify-item {
    margin-bottom: 12px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.verify-item:last-child {
    margin-bottom: 0;
}

.verify-status-inline {
    font-size: 18px;
    flex-shrink: 0;
    font-weight: bold;
    color: #999;
}

.verify-status-inline.verified {
    color: #4caf50;
}

.verify-status-inline.failed {
    color: #f44336;
}

/* 记住密码 */
.remember-password-group {
    margin: 10px 0 15px 0;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #07cdff;
}

/* 数学验证 - 简化版 */
.math-question-simple {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* .verify-status-inline defined above */

#math-question-text {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

#math-answer {
    flex: 1;
    max-width: 120px;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
}

#math-answer:focus {
    outline: none;
    border-color: #07cdff;
}

#math-answer::placeholder {
    font-size: 12px;
    color: #aaa;
}

/* 图片验证 - 简化版 */
.image-captcha-simple {
    width: 100%;
}

.captcha-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.captcha-instruction-text {
    font-size: 13px;
    color: #555;
    text-align: right;
}

.captcha-instruction-text #target-animal {
    color: #07cdff;
    font-weight: 700;
    font-size: 15px;
}

.captcha-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.captcha-image {
    aspect-ratio: 1;
    background: #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid #ddd;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    overflow: hidden;
    position: relative;
}

.captcha-image:hover {
    border-color: #07cdff;
    transform: scale(1.02);
}

.captcha-image.selected {
    border-color: #4caf50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.captcha-image.selected::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

/* 拼图滑块验证 */
.puzzle-captcha {
    width: 100%;
}

.puzzle-instruction {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.puzzle-container {
    position: relative;
    width: 100%;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    margin-bottom: 10px;
}

.puzzle-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.puzzle-piece {
    position: absolute;
    width: 45px;
    height: 45px;
    background-size: cover;
    background-position: center;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: left 0.05s ease;
    z-index: 10;
}

.puzzle-piece.circle {
    border-radius: 50%;
}

.puzzle-piece.triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    border-radius: 0;
}

.puzzle-piece.hexagon {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    border-radius: 0;
}

.puzzle-slot {
    position: absolute;
    width: 45px;
    height: 45px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 6px;
    /* 镂空效果 */
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6), inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.puzzle-slot.circle {
    border-radius: 50%;
}

.puzzle-slot.triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    border-radius: 0;
}

.puzzle-slot.hexagon {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    border-radius: 0;
}

.puzzle-slider-track {
    position: relative;
    height: 40px;
    background: linear-gradient(90deg, #e8e8e8, #d0d0d0);
    border-radius: 20px;
    overflow: hidden;
}

.puzzle-slider-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #07cdff, #00d4aa);
    border-radius: 20px;
    transition: none;
}

.puzzle-slider-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 40px;
    background: linear-gradient(135deg, #07cdff 0%, #0078d4 100%);
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    font-size: 14px;
    color: white;
    font-weight: bold;
    letter-spacing: 2px;
    user-select: none;
    z-index: 2;
}

.puzzle-slider-handle:active {
    cursor: grabbing;
}

.puzzle-slider-handle.verified {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
}

.puzzle-slider-handle.failed {
    background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
}

/* 响应式 */
@media (max-width: 480px) {
    .auth-container {
        padding: 20px;
        margin: 10px;
    }
    
    .auth-title {
        font-size: 20px;
    }
    
    .math-question {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #math-answer {
        width: 100%;
    }
}

/* 页面内容样式 */
.page-content {
    display: none;
    padding: 20px;
    padding-bottom: 100px;
    min-height: calc(100vh - 200px);
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

/* "我的"页面顶部间距 */
#settings.page-content {
    padding-top: 40px; /* 增加顶部间距 */
}

.page-content.active {
    display: block;
}

/* 主页（八字）允许滚动，限制滚动范围 */
#home.page-content {
    overflow-y: auto;
    overflow-x: hidden;
    min-height: auto;
    max-height: calc(100vh - 55px);/*限制最大高度，不超过导航栏*/
    padding-bottom: 15px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* 隐藏滚动条 */
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* 优化渲染性能，避免背景闪烁和闪动 */
    backface-visibility: hidden;
    transform: translateZ(0);
    /* 避免初始化时的闪动 */
    opacity: 1;
    visibility: visible;
    /* 使用contain优化渲染 */
    contain: layout style paint;
}

#home.page-content::-webkit-scrollbar {
    display: none;
}

/* 娱乐页面不滚动 */
#entertainment.page-content {
    overflow: hidden;
    min-height: calc(100vh - 200px);
    max-height: calc(100vh - 200px);
}

/* 桃花页面（understand）允许滚动，但隐藏滚动条 */
#understand.page-content {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 55px);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#understand.page-content::-webkit-scrollbar {
    display: none;
}

/* 娱乐页面头部样式 */
.entertainment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    z-index: 1000; /* 确保在最上层，不被诗句遮挡 */
}

.entertainment-settings-icon {
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.entertainment-settings-icon:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.click-counter {
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: rgba(102, 126, 234, 0.9);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.counter-label {
    display: none; /* 隐藏标签，只显示数字 */
}

.counter-value {
    font-size: 16px;
    font-weight: bold;
    color: rgba(102, 126, 234, 0.9);
}

/* 底部导航栏样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
    min-width: 60px;
}

.nav-item:hover {
    background-color: #f0f0f0;
}

.nav-item.active {
    background-color: #81D4FA;
    color: white;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-text {
    font-size: 12px;
    font-weight: 500;
}

/* 诗句显示区域样式 */
.poem-display-area {
    position: absolute;
    top: 3%; /* 调整到图片上方，避免重叠 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.poem-display-area.show {
    opacity: 1;
    visibility: visible;
}

.poem-content {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    /* 移除背景样式，只显示文字 */
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    min-width: auto;
}

.poem-line {
    display: flex;
    flex-direction: row-reverse; /* 从右到左排列 */
    gap: 23px;/*横向字间距*/
    align-items: flex-start;
}

.poem-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;/*文字垂直居中*/
    min-width: 28px;/*垂直字间距*/
}

.poem-empty-line {
    height: 1.8em; /* 与line-height相同，占一个字符的高度 */
    display: block;
}

/* 图片上方诗句整体样式设置 - 可以直接在CSS中修改字体大小和颜色（支持色卡选色） */
.poem-char {
    font-size: 33px; /* 字体大小 - 可以在这里修改（值越大字体越大） */
    font-weight: bold;
    color: #1919eb; /* 字体颜色 - 可以在这里修改颜色，使用色卡选择 */
    line-height: 1.8;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease, color 0.3s ease, font-size 0.3s ease;
    font-family: 'STKaiti', 'KaiTi', '楷体', 'SimKai', serif;
    text-align: center;
    display: block;
}

.poem-char.show {
    opacity: 1;
    transform: translateY(0);
}

/* 图片下方诗句显示区域样式 */
.bottom-poem-display-area {
    position: absolute;
    top: 65%; /* 在图片下方 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.bottom-poem-display-area.show {
    opacity: 1;
    visibility: visible;
}

.bottom-poem-content {
    display: flex;
    flex-direction: row; /* 从左到右排列列（每列是一行诗句） */
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    /* 移除背景样式，只显示文字 */
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    min-width: auto;
}
/*图片下方纵列字间距调整*/
.bottom-poem-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 28px;
    gap: 3px; /* 纵列字间距 - 可以在这里调整（值越大间距越大） */
}

.bottom-poem-char {
    font-size: 24px; /* 默认字体大小，可通过设置调整 */
    font-weight: bold;
    color: #0fddf4; /* 默认颜色（当没有指定行颜色时使用） */
    line-height: 1.2; /* 行高，可配合gap调整字间距 */
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease, color 0.3s ease, font-size 0.3s ease;
    font-family: 'STKaiti', 'KaiTi', '楷体', 'SimKai', serif;
    text-align: center;
    display: block;
}

/* 图片下方诗句每句颜色设置 - 可以在CSS中直接修改颜色值（支持色卡选色） */
/* 第1句颜色 */
.bottom-poem-char.line-0 {
    color: #ea3915; /* 可以在这里修改颜色，使用色卡选择 */
}

/* 第2句颜色 */
.bottom-poem-char.line-1 {
    color: #f86bff; /* 可以在这里修改颜色，使用色卡选择 */
}

/* 第3句颜色 */
.bottom-poem-char.line-2 {
    color: #36e3dd; /* 可以在这里修改颜色，使用色卡选择 */
}

/* 第4句颜色 */
.bottom-poem-char.line-3 {
    color: #f8b500; /* 可以在这里修改颜色，使用色卡选择 */
}

/* 第5句颜色 */
.bottom-poem-char.line-4 {
    color: #6c5ce7; /* 可以在这里修改颜色，使用色卡选择 */
}

/* 第6句颜色 */
.bottom-poem-char.line-5 {
    color: #00b894; /* 可以在这里修改颜色，使用色卡选择 */
}

/* 第7句颜色 */
.bottom-poem-char.line-6 {
    color: #e84393; /* 可以在这里修改颜色，使用色卡选择 */
}

/* 第8句颜色 */
.bottom-poem-char.line-7 {
    color: #0984e3; /* 可以在这里修改颜色，使用色卡选择 */
}

/* 第9句颜色 */
.bottom-poem-char.line-8 {
    color: #fd79a8; /* 可以在这里修改颜色，使用色卡选择 */
}

/* 第10句颜色 */
.bottom-poem-char.line-9 {
    color: #fdcb6e; /* 可以在这里修改颜色，使用色卡选择 */
}

.bottom-poem-char.show {
    opacity: 1;
    transform: translateY(0);
}

/* 图片显示区域样式 */
.image-display-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    text-align: center;
    background-color: #5ddde6;/*图片边框颜色修改*/
    border: 4px solid #23c5de; /* 方形图片外边框颜色：可以在这里直接修改颜色值 */
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-display-area.show {
    opacity: 1;
    visibility: visible;
}

.random-image {
    width: 230px;
    height: 230px;
    border: 4px solid rgb(36, 213, 241);;/*图片内边框颜色修改*/
    border-radius: 10px;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0 auto;
    position: relative;
}

/* 图片四边呼吸灯效果 - 下边 */
.image-display-area.glow-bottom::after {
    content: '';
    position: absolute;
    bottom: 0; /* 紧贴图片外边框，显示在容器底部边缘 */
    left: -10px; /* 向左边延长 */
    right: -10px; /* 向右边延长 */
    height: 8px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 215, 0, 0.6) 20%, 
        rgba(255, 215, 0, 1) 50%, 
        rgba(255, 215, 0, 0.6) 80%, 
        transparent 100%);
    border-radius: 0 0 10px 10px;
    z-index: 5;
}

/* 图片四边呼吸灯效果 - 左边 */
.image-display-area.glow-left::after {
    content: '';
    position: absolute;
    top: -10px; /* 向上边延长 */
    bottom: -10px; /* 向下边延长 */
    left: 0; /* 紧贴图片外边框，显示在容器左边缘 */
    width: 8px;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(255, 215, 0, 0.6) 20%, 
        rgba(255, 215, 0, 1) 50%, 
        rgba(255, 215, 0, 0.6) 80%, 
        transparent 100%);
    border-radius: 10px 0 0 10px;
    z-index: 5;
}

/* 图片四边呼吸灯效果 - 上边 */
.image-display-area.glow-top::after {
    content: '';
    position: absolute;
    top: 0; /* 紧贴图片外边框，显示在容器顶部边缘 */
    left: -10px; /* 向左边延长 */
    right: -10px; /* 向右边延长 */
    height: 8px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 215, 0, 0.6) 20%, 
        rgba(255, 215, 0, 1) 50%, 
        rgba(255, 215, 0, 0.6) 80%, 
        transparent 100%);
    border-radius: 10px 10px 0 0;
    z-index: 5;
}

/* 图片四边呼吸灯效果 - 右边 */
.image-display-area.glow-right::after {
    content: '';
    position: absolute;
    top: -10px; /* 向上边延长 */
    bottom: -10px; /* 向下边延长 */
    right: 0; /* 紧贴图片外边框，显示在容器右边缘 */
    width: 8px;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(255, 215, 0, 0.6) 20%, 
        rgba(255, 215, 0, 1) 50%, 
        rgba(255, 215, 0, 0.6) 80%, 
        transparent 100%);
    border-radius: 0 10px 10px 0;
    z-index: 5;
}

/* 呼吸灯动画 - 金黄色高亮漫反射效果 */
@keyframes breatheGlowEdge {
    0%, 100% {
        opacity: 0.6;
        filter: brightness(1);
    }
    50% {
        opacity: 1;
        filter: brightness(1.5);
    }
}

/* 针对不同方向的呼吸灯阴影调整 - 漫反射向外扩散 */
.image-display-area.glow-bottom::after {
    box-shadow: 0 2px 20px rgba(255, 215, 0, 0.3),
                0 4px 40px rgba(255, 215, 0, 0.2),
                0 6px 60px rgba(255, 215, 0, 0.15),
                0 8px 80px rgba(255, 215, 0, 0.1),
                0 10px 100px rgba(255, 215, 0, 0.08),
                0 12px 120px rgba(255, 215, 0, 0.05);
    animation: breatheGlowBottom 2s ease-in-out infinite;
}

.image-display-area.glow-left::after {
    box-shadow: -2px 0 20px rgba(255, 215, 0, 0.3),
                -4px 0 40px rgba(255, 215, 0, 0.2),
                -6px 0 60px rgba(255, 215, 0, 0.15),
                -8px 0 80px rgba(255, 215, 0, 0.1),
                -10px 0 100px rgba(255, 215, 0, 0.08),
                -12px 0 120px rgba(255, 215, 0, 0.05);
    animation: breatheGlowLeft 2s ease-in-out infinite;
}

.image-display-area.glow-top::after {
    box-shadow: 0 -2px 20px rgba(255, 215, 0, 0.3),
                0 -4px 40px rgba(255, 215, 0, 0.2),
                0 -6px 60px rgba(255, 215, 0, 0.15),
                0 -8px 80px rgba(255, 215, 0, 0.1),
                0 -10px 100px rgba(255, 215, 0, 0.08),
                0 -12px 120px rgba(255, 215, 0, 0.05);
    animation: breatheGlowTop 2s ease-in-out infinite;
}

.image-display-area.glow-right::after {
    box-shadow: 2px 0 20px rgba(255, 215, 0, 0.3),
                4px 0 40px rgba(255, 215, 0, 0.2),
                6px 0 60px rgba(255, 215, 0, 0.15),
                8px 0 80px rgba(255, 215, 0, 0.1),
                10px 0 100px rgba(255, 215, 0, 0.08),
                12px 0 120px rgba(255, 215, 0, 0.05);
    animation: breatheGlowRight 2s ease-in-out infinite;
}

/* 下边呼吸灯动画 - 向下扩散 */
@keyframes breatheGlowBottom {
    0%, 100% {
        opacity: 0.4;
        box-shadow: 0 2px 20px rgba(255, 215, 0, 0.3),
                    0 4px 40px rgba(255, 215, 0, 0.2),
                    0 6px 60px rgba(255, 215, 0, 0.15),
                    0 8px 80px rgba(255, 215, 0, 0.1),
                    0 10px 100px rgba(255, 215, 0, 0.08),
                    0 12px 120px rgba(255, 215, 0, 0.05);
        filter: brightness(0.8);
    }
    50% {
        opacity: 1;
        box-shadow: 0 4px 40px rgba(255, 215, 0, 1),
                    0 8px 80px rgba(255, 215, 0, 0.9),
                    0 12px 120px rgba(255, 215, 0, 0.7),
                    0 16px 160px rgba(255, 215, 0, 0.6),
                    0 20px 200px rgba(255, 215, 0, 0.5),
                    0 24px 240px rgba(255, 215, 0, 0.4);
        filter: brightness(2);
    }
}

/* 左边呼吸灯动画 - 向左扩散 */
@keyframes breatheGlowLeft {
    0%, 100% {
        opacity: 0.4;
        box-shadow: -2px 0 20px rgba(255, 215, 0, 0.3),
                    -4px 0 40px rgba(255, 215, 0, 0.2),
                    -6px 0 60px rgba(255, 215, 0, 0.15),
                    -8px 0 80px rgba(255, 215, 0, 0.1),
                    -10px 0 100px rgba(255, 215, 0, 0.08),
                    -12px 0 120px rgba(255, 215, 0, 0.05);
        filter: brightness(0.8);
    }
    50% {
        opacity: 1;
        box-shadow: -4px 0 40px rgba(255, 215, 0, 1),
                    -8px 0 80px rgba(255, 215, 0, 0.9),
                    -12px 0 120px rgba(255, 215, 0, 0.7),
                    -16px 0 160px rgba(255, 215, 0, 0.6),
                    -20px 0 200px rgba(255, 215, 0, 0.5),
                    -24px 0 240px rgba(255, 215, 0, 0.4);
        filter: brightness(2);
    }
}

/* 上边呼吸灯动画 - 向上扩散 */
@keyframes breatheGlowTop {
    0%, 100% {
        opacity: 0.4;
        box-shadow: 0 -2px 20px rgba(255, 215, 0, 0.3),
                    0 -4px 40px rgba(255, 215, 0, 0.2),
                    0 -6px 60px rgba(255, 215, 0, 0.15),
                    0 -8px 80px rgba(255, 215, 0, 0.1),
                    0 -10px 100px rgba(255, 215, 0, 0.08),
                    0 -12px 120px rgba(255, 215, 0, 0.05);
        filter: brightness(0.8);
    }
    50% {
        opacity: 1;
        box-shadow: 0 -4px 40px rgba(255, 215, 0, 1),
                    0 -8px 80px rgba(255, 215, 0, 0.9),
                    0 -12px 120px rgba(255, 215, 0, 0.7),
                    0 -16px 160px rgba(255, 215, 0, 0.6),
                    0 -20px 200px rgba(255, 215, 0, 0.5),
                    0 -24px 240px rgba(255, 215, 0, 0.4);
        filter: brightness(2);
    }
}

/* 右边呼吸灯动画 - 向右扩散 */
@keyframes breatheGlowRight {
    0%, 100% {
        opacity: 0.4;
        box-shadow: 2px 0 20px rgba(255, 215, 0, 0.3),
                    4px 0 40px rgba(255, 215, 0, 0.2),
                    6px 0 60px rgba(255, 215, 0, 0.15),
                    8px 0 80px rgba(255, 215, 0, 0.1),
                    10px 0 100px rgba(255, 215, 0, 0.08),
                    12px 0 120px rgba(255, 215, 0, 0.05);
        filter: brightness(0.8);
    }
    50% {
        opacity: 1;
        box-shadow: 4px 0 40px rgba(255, 215, 0, 1),
                    8px 0 80px rgba(255, 215, 0, 0.9),
                    12px 0 120px rgba(255, 215, 0, 0.7),
                    16px 0 160px rgba(255, 215, 0, 0.6),
                    20px 0 200px rgba(255, 215, 0, 0.5),
                    24px 0 240px rgba(255, 215, 0, 0.4);
        filter: brightness(2);
    }
}

/* 四神兽图片统一样式 */
.shenshou-container {
    position: absolute;
    z-index: 8;
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* 青龙 - 最右边（放大2倍） */
.shenshou-right {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
}

/* 白虎 - 左边 */
.shenshou-left {
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
}

/* 玄武 - 上边（往下移动，使上下距离与左右距离相等） */
.shenshou-top {
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
}

/* 朱雀 - 下边（放大1.5倍，向上移动） */
.shenshou-bottom {
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: 375px;
    height: 375px;
}

/* 四神兽图片统一样式 */
.shenshou-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    /* 去除图片背景：PNG格式如果已有透明背景则不需要，否则使用混合模式 */
    mix-blend-mode: multiply;
    /* 增强对比度，使背景更透明 */
    filter: contrast(1.2) brightness(1.1);
    /* 去除边缘锯齿 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* 四神兽浮动动画 - 统一的游动效果 */
    animation: shenshouFloat 3s ease-in-out infinite;
}

/* 四神兽浮动动画 - 上下游动效果 */
@keyframes shenshouFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(2deg);
    }
    50% {
        transform: translateY(-20px) rotate(0deg);
    }
    75% {
        transform: translateY(-15px) rotate(-2deg);
    }
}

/* 隐藏状态 */
.shenshou-container.hide {
    opacity: 0;
    visibility: hidden;
}

/* 金黄色宝珠样式 */
.baozhu-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* 宝珠核心（鲜艳浅黄色，边框呼吸灯特效） */
.baozhu-core {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(255, 255, 200, 1) 0%,
        rgba(255, 245, 150, 1) 15%,
        rgba(255, 235, 100, 1) 30%,
        rgba(255, 220, 50, 1) 50%,
        rgba(255, 200, 0, 1) 75%,
        rgba(255, 180, 0, 1) 100%);
    box-shadow: 
        inset -8px -8px 15px rgba(0, 0, 0, 0.3),
        inset 0 0 10px rgba(255, 255, 255, 0.25),
        inset 0 0 25px rgba(255, 245, 150, 0.3);
    position: relative;
    /* 3D效果 */
    transform: perspective(500px) rotateX(15deg);
    transform-style: preserve-3d;
}

/* 宝珠边框呼吸灯效果（类似图片边框） */
.baozhu-core::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 3px solid rgba(255, 215, 0, 0.8);
    z-index: -1;
    animation: baozhuBorderBreathe 2s ease-in-out infinite;
}

/* 宝珠边框呼吸灯动画 - 类似图片边框效果 */
@keyframes baozhuBorderBreathe {
    0%, 100% {
        opacity: 0.4;
        box-shadow: 
            0 0 10px rgba(255, 215, 0, 0.3),
            0 0 20px rgba(255, 215, 0, 0.2),
            0 0 30px rgba(255, 215, 0, 0.15),
            0 0 40px rgba(255, 215, 0, 0.1),
            0 0 50px rgba(255, 215, 0, 0.08),
            0 0 60px rgba(255, 215, 0, 0.05);
        filter: brightness(0.8);
        border-color: rgba(255, 215, 0, 0.6);
    }
    50% {
        opacity: 1;
        box-shadow: 
            0 0 20px rgba(255, 215, 0, 1),
            0 0 40px rgba(255, 215, 0, 0.9),
            0 0 60px rgba(255, 215, 0, 0.7),
            0 0 80px rgba(255, 215, 0, 0.6),
            0 0 100px rgba(255, 215, 0, 0.5),
            0 0 120px rgba(255, 215, 0, 0.4);
        filter: brightness(2);
        border-color: rgba(255, 215, 0, 1);
    }
}



/* 隐藏状态 */
.baozhu-container.hide {
    opacity: 0;
    visibility: hidden;
}

/* 太极图样式 */
.taiji-container {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 10;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    animation: rotate 4s linear infinite;
}

/*太极图的大小调整*/
.taiji-image {
    width: 450px;
    height: 450px;
    border-radius: 50%;
    border: 3px solid #FFD700;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    transform: scale(0);
    transition: transform 3s ease-in-out;
    transform-origin: center center;
    object-fit: cover; /* 确保图片保持圆形 */
    object-position: center; /* 图片居中显示 */
}

/* 太极图旋转动画关键帧 */
@keyframes rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 太极图缩放动画 */
.taiji-image.scale-in {
    transform: scale(1);
}

.taiji-image.scale-out {
    transform: scale(0);
}

/* 四个对角文字样式 - 元亨利贞 */
.corner-text {
    position: absolute;
    font-size: 60px; /* 字体大小 - 可以在这里修改 */
    font-weight: bold;
    color: #13e825; /* 字体颜色 - 可以在这里修改颜色，使用色卡选择 */
    font-family: 'STZhongsong', 'FangSong', 'STSong', 'SimSun', 'STKaiti', 'KaiTi', '楷体', serif; /* 尝试使用篆体或类似字体 */
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    pointer-events: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    /* 使用transform-origin让文字正对中心 */
    transform-origin: center center;
}

.corner-text.show {
    opacity: 1;
    visibility: visible;
    animation: breatheGlow 8s ease-in-out infinite;
}

/* 元亨利贞呼吸灯高亮特效 */
@keyframes breatheGlow {
    0%, 100% {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3),
                     0 0 10px rgba(19, 232, 37, 0.5),
                     0 0 20px rgba(19, 232, 37, 0.3),
                     0 0 30px rgba(19, 232, 37, 0.2);
        filter: brightness(1);
    }
    50% {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3),
                     0 0 20px rgba(19, 232, 37, 1),
                     0 0 40px rgba(19, 232, 37, 0.8),
                     0 0 60px rgba(19, 232, 37, 0.6);
        filter: brightness(1.5);
    }
}

/* 左上角 - 元 */
.corner-top-left {
    top: 18%; /* 更靠近中心点 */
    left: 18%; /* 更靠近中心点 */
    /* 角度通过JavaScript动态计算，让字底部朝向中心 */
}

/* 右上角 - 亨 */
.corner-top-right {
    top: 18%; /* 更靠近中心点 */
    right: 18%; /* 更靠近中心点 */
    /* 角度通过JavaScript动态计算，让字底部朝向中心 */
}

/* 左下角 - 利 */
.corner-bottom-left {
    bottom: 18%; /* 更靠近中心点 */
    left: 18%; /* 更靠近中心点 */
    /* 角度通过JavaScript动态计算，让字底部朝向中心 */
}

/* 右下角 - 贞 */
.corner-bottom-right {
    bottom: 18%; /* 更靠近中心点 */
    right: 18%; /* 更靠近中心点 */
    /* 角度通过JavaScript动态计算，让字底部朝向中心 */
}

/* 测算显示区域样式 */
.timer-display-area {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background-color: #b8dfe1;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.727);
    z-index: 999;
    display: none; /* 默认隐藏 */
}

.timer-display-area.show {
    display: block; /* 在娱乐页面显示 */
}

.timer-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    width: 100%;
}
.timer-text {
    font-size: 32px;
    font-weight: 900;
    color: #333;
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.timer-number {
    font-size: 36px;
    font-weight: 900;
    color: #333;
    transition: color 0.3s ease;/*秒数变红色动画*/
}

.timer-label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 剩余10秒时秒数变红色 */
.timer-number.warning,
#timer-display.warning {
    color: #dc3545;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}
/* 测算按钮样式 */
.timer-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
    flex: 0 0 auto;
    min-width: 100px;
}
/* 开始按钮样式 */
.start-btn {
    background-color: #28a745;
    color: white;
}

.start-btn:hover {
    background-color: #218838;
}

.pause-btn {
    background-color: #ffc107;
    color: #333;
}

.pause-btn:hover {
    background-color: #e0a800;
}

/* 设置页面样式 */
.language-toggle {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.language-toggle label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 16px;
}

.toggle-buttons {
    display: flex;
    gap: 10px;
}

.lang-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ddd;
    background-color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.lang-btn.active {
    /* 与公历/农历选中状态保持一致 */
    background-color: #07cdff;
    color: #030303;
    border-color: #07cdff;
}

.lang-btn:hover:not(.active) {
    background-color: #f0f0f0;
}

/* 测算滑动条样式 */
/* 娱乐页面设置组 */
.entertainment-settings-group {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.settings-group-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 auto 20px auto;
    padding: 0 6px 8px 6px;
    text-align: center;
    display: inline-block;
    border-bottom: 2px solid rgba(102, 126, 234, 0.35);
}

.timer-settings {
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 娱乐页面设置组内的timer-settings样式调整 */
.entertainment-settings-group .timer-settings {
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 15px;
}

.entertainment-settings-group .timer-settings:last-child {
    margin-bottom: 0;
}

/* ==================== 管理员页面样式 ==================== */
.admin-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
}

.admin-title {
    text-align: center;
    color: #3fe444;/*用户管理*/
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 700;
}

.admin-actions {
    margin-bottom: 20px;
    text-align: center;
}

.admin-action-btn {
    padding: 10px 20px;
    background: #07cdff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-action-btn:hover {
    background: #06b8e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(7, 205, 255, 0.3);
}

.user-list-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.user-list-header {
    display: flex;
    background: #07cdff;
    color: white;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 14px;
}

.col-username {
    flex: 1;
}

.col-password {
    flex: 1;
}

.col-actions {
    flex: 1.2;
    text-align: center;
}

.user-list {
    max-height: 400px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.user-item:last-child {
    border-bottom: none;
}

.user-item:hover {
    background: #f8f9fa;
}

.user-item .col-username {
    font-weight: 600;
    color: #333;
}

.user-item .col-password {
    color: #666;
    font-family: monospace;
    font-size: 12px;
}

.user-item .col-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.user-action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reset {
    background: #ffc107;
    color: #333;
}

.btn-reset:hover {
    background: #e0a800;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.admin-stats {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
}

.admin-stats strong {
    color: #07cdff;
    font-size: 18px;
}

.no-users {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 14px;
}

/* 管理员导航项特殊样式 - 已移除，使用与其他导航项相同的样式 */

/* 退出登录按钮 */
.logout-section {
    padding: 0;
    margin-top: 20px;
    margin-bottom: 20px;
}

.account-management-section {
    margin-top: 20px;
    margin-bottom: 0;
    padding: 0;
}

.account-management-btn {
    width: calc(100% - 40px);
    margin: 0 auto;
    padding: 14px 20px;
    background: linear-gradient(135deg, #07cdff 0%, #0078d4 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(7, 205, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

.account-management-btn .btn-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    margin-left: 70px;
}

.account-management-btn .btn-text {
    flex: 1;
    text-align: left;
}

.account-management-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 205, 255, 0.4);
    background: linear-gradient(135deg, #06b8e6 0%, #006bb8 100%);
}

.account-management-btn:active {
    transform: translateY(0);
}

/* 功能说明区域 */
.function-guide-section {
    margin-top: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guide-btn {
    width: calc(100% - 40px);
    margin: 0 auto;
    padding: 14px 20px;
    background: linear-gradient(135deg, #07cdff 0%, #0078d4 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(7, 205, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

.guide-btn .btn-icon-text {
    display: inline-block;
    width: 20px;
    text-align: center;
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 70px;
}

.guide-btn .btn-text {
    flex: 1;
    text-align: left;
}

.guide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 205, 255, 0.4);
    background: linear-gradient(135deg, #06b8e6 0%, #006bb8 100%);
}

.guide-btn:active {
    transform: translateY(0);
}

/* 说明弹窗样式 */
.guide-modal {
    max-width: 85%;
    width: 85%;
    max-height: 90vh;
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    background: transparent !important;
    box-shadow: none !important;
}

.guide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.guide-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.guide-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.guide-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.guide-content {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    background: #f9f9f9;
    border-radius: 0 0 12px 12px;
}

.guide-step {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 25px;
    box-shadow: none;
    border: none;
}

.guide-step-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: none;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.guide-step-text {
    color: #555;
    line-height: 1.8;
    font-size: 15px;
    margin-top: 15px;
}

.guide-step-title {
    color: #667eea;
    font-size: 18px;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
}

/* 退出登录按钮 */
.logout-section {
    margin: 30px 0 20px 0;
    padding: 0;
}

.logout-btn {
    width: calc(100% - 40px);
    margin: 0 auto;
    padding: 14px 20px;
    background: linear-gradient(135deg, #07cdff 0%, #0078d4 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(7, 205, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

.logout-btn .btn-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    margin-left: 70px;
}

.logout-btn .btn-text {
    flex: 1;
    text-align: left;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 205, 255, 0.4);
    background: linear-gradient(135deg, #06b8e6 0%, #006bb8 100%);
}

.logout-btn:active {
    transform: translateY(0);
}

.entertainment-settings-group .timer-settings {
    margin-bottom: 20px;
}

.entertainment-settings-group .timer-settings:last-child {
    margin-bottom: 0;
}

.timer-settings label {
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 16px;
}

.slider-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/*滑动条的样式*/
#timer-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #97db86;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
/*滑动条圆点的样式*/
#timer-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #df26d9;
    cursor: pointer;
}

#timer-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #d040c9;
    cursor: pointer;
    border: none;
}

/* 诗句透明度滑动条样式 */
#poem-opacity-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #97db86;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

/* 诗句透明度滑动条圆点的样式 - 浅蓝色 */
#poem-opacity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #87CEEB;
    cursor: pointer;
}

#poem-opacity-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #87CEEB;
    cursor: pointer;
    border: none;
}

.slider-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 18px;
    position: relative;
}

.timer-label-text {
    font-size: 16px;
    font-weight: normal;
    color: #333;
    flex-shrink: 0;
}

.slider-display-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    color: #df26d9;
}

/* 诗句透明度显示值颜色 - 浅蓝色 */
.poem-opacity-display-wrapper {
    color: #87CEEB;
}

/* 背景颜色设置样式 - 极简版 */
.background-color-settings {
    margin-top: 0;
    margin-bottom: 40px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.color-label {
    font-size: 16px;
    font-weight: normal;
    color: #333;
    flex-shrink: 0;
}

.color-dots {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    outline: none;
}

.color-dot:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.color-dot.active {
    border-color: #81D4FA;
    border-width: 3px;
    transform: scale(1.2);
    box-shadow: 0 0 0 3px rgba(129, 212, 250, 0.2);
}

/* 移动端通用优化 */
@media (max-width: 768px) {
    /* 确保所有元素使用border-box */
    * {
        box-sizing: border-box;
    }
    
    /* 防止内容超出屏幕 */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    /* 调整页面内容间距 */
    .page-content {
        padding: 10px;
        padding-bottom: 80px;
    }
    
    /* 主页允许滚动，限制滚动范围 */
    #home.page-content {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        min-height: auto;
        max-height: calc(100vh - 55px);/*限制最大高度，不超过导航栏*/
        padding-bottom: 15px;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    #home.page-content::-webkit-scrollbar {
        display: none;
    }
    
    /* 娱乐页面不滚动 */
    #entertainment.page-content {
        overflow: hidden;
        min-height: calc(100vh - 180px);
        max-height: calc(100vh - 180px);
    }
    
    /* 娱乐页面头部在移动端的布局 */
    .entertainment-header {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .click-counter {
        font-size: 11px;
        padding: 5px 10px;
        flex-shrink: 0;
    }
    
    .counter-value {
        font-size: 13px;
    }
    
    /* 调整太极图容器和图片尺寸 - 使用视口单位确保不超出屏幕 */
    .taiji-container {
        width: min(80vw, 350px);
        height: min(80vw, 350px);
    }
    
    .taiji-image {
        width: min(80vw, 350px);
        height: min(80vw, 350px);
    }
    
    /* 调整诗句显示区域 */
    .poem-display-area {
        top: 3%; /* 调整到图片上方，避免重叠 */
        max-width: 90vw;
    }
    
    .poem-content {
        padding: 0;
        gap: 15px;
        min-width: auto;
    }
    
    .poem-char {
        font-size: 20px;
    }
    
    /* 调整下方诗句显示区域 */
    .bottom-poem-display-area {
        top: 68%;
        max-width: 90vw;
    }
    
    .bottom-poem-char {
        font-size: 18px;
    }
   /*元亨利贞设置*/ 
    /* 调整四个对角文字 */
    .corner-text {
        font-size: 45px; /* 移动端字体稍小 */
    }
    
    .corner-top-left {
        top: 15%;
        left: 15%;
    }
    
    .corner-top-right {
        top: 15%;
        right: 15%;
    }
    
    .corner-bottom-left {
        bottom: 15%;
        left: 15%;
    }
    
    .corner-bottom-right {
        bottom: 15%;
        right: 15%;
    }
    
    /* 调整图片显示区域尺寸 */
    .image-display-area {
        width: min(60vw, 220px);
        height: min(60vw, 220px);
        padding: 15px;
    }
    
    .random-image {
        width: min(55vw, 190px);
        height: min(55vw, 190px);
    }
    
    /* 调整四神兽图片尺寸 - 移动端 */
    .shenshou-container {
        width: min(20vw, 120px);
        height: min(20vw, 120px);
    }
    
    /* 青龙移动端（放大2倍，最右边） */
    .shenshou-right {
        right: 0;
        width: min(40vw, 240px);
        height: min(40vw, 240px);
    }
    
    .shenshou-left {
        left: 2%;
    }
    
    /* 玄武移动端（往下移动） */
    .shenshou-top {
        top: 20%;
    }
    
    /* 朱雀移动端（放大1.5倍，往上移动） */
    .shenshou-bottom {
        bottom: 8%;
        width: min(30vw, 180px);
        height: min(30vw, 180px);
    }
    
    /* 调整金黄色宝珠尺寸 - 移动端（缩小一倍） */
    .baozhu-container {
        width: min(20vw, 80px);
        height: min(20vw, 80px);
    }
    
    .baozhu-core {
        width: min(15vw, 60px);
        height: min(15vw, 60px);
    }
    
    
    /* 调整测算区域 */
    .timer-display-area {
        width: 95%;
        padding: 12px;
        bottom: 100px;
    }
    
    .timer-controls {
        flex-direction: row;
        gap: 8px;
        justify-content: space-between;
    }
    
    .timer-text {
        font-size: 24px;
        font-weight: 900;
        flex: 1;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    
    .timer-number {
        font-size: 28px;
        font-weight: 900;
        color: #333;
        transition: color 0.3s ease;
    }
    
    /* 剩余10秒时秒数变红色（移动端） */
    .timer-number.warning,
    #timer-display.warning {
        color: #dc3545;
        animation: pulse 1s infinite;
    }
    
    .timer-label {
        font-size: 10px;
        font-weight: 500;
        color: #666;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .timer-btn {
        padding: 10px 20px;
        font-size: 14px;
        font-weight: 600;
        flex: 0 0 auto;
        min-width: 80px;
    }
    
    /* 调整底部导航栏 */
    .bottom-nav {
        padding: 8px 0;
    }
    
    .nav-item {
        padding: 6px 8px;
        min-width: 50px;
    }
    
    .nav-icon {
        font-size: 18px;
    }
    
    .nav-text {
        font-size: 11px;
    }
    
    /* 设置页面在移动端的优化 */
    .language-toggle,
    .timer-settings,
    .background-color-settings {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .toggle-buttons {
        flex-direction: row;
    }
    
    .lang-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .timer-settings label {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .slider-value {
        font-size: 20px;
    }
    
    .background-color-settings {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .color-label {
        font-size: 16px;
    }
    
    .color-dots {
        gap: 8px;
    }
    
    .color-dot {
        width: 28px;
        height: 28px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .page-content {
        padding: 8px;
        padding-bottom: 80px;
    }
    
    #home.page-content {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        min-height: auto;
        max-height: calc(100vh - 55px);/*限制最大高度*/
        padding-bottom: 15px;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    #home.page-content::-webkit-scrollbar {
        display: none;
    }
    
    #entertainment.page-content {
        overflow: hidden;
        min-height: calc(100vh - 160px);
        max-height: calc(100vh - 160px);
    }
    
    .click-counter {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .counter-value {
        font-size: 12px;
    }
    
    .taiji-container {
        width: min(75vw, 300px);
        height: min(75vw, 300px);
    }
    
    .taiji-image {
        width: min(75vw, 300px);
        height: min(75vw, 300px);
    }
    
    .image-display-area {
        width: min(55vw, 180px);
        height: min(55vw, 180px);
        padding: 12px;
    }
    
    .random-image {
        width: min(50vw, 156px);
        height: min(50vw, 156px);
    }
    
    .timer-display-area {
        width: 98%;
        padding: 10px;
        bottom: 90px;
    }
    
    .timer-text {
        font-size: 20px;
        font-weight: 900;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    
    .timer-number {
        font-size: 24px;
        font-weight: 900;
        color: #333;
        transition: color 0.3s ease;
    }
    
    /* 剩余10秒时秒数变红色（超小屏幕） */
    .timer-number.warning,
    #timer-display.warning {
        color: #dc3545;
        animation: pulse 1s infinite;
    }
    
    .timer-label {
        font-size: 9px;
        font-weight: 500;
        color: #666;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .timer-btn {
        padding: 8px 16px;
        font-size: 12px;
        font-weight: 600;
        flex: 0 0 auto;
        min-width: 70px;
    }
}

/* ==================== 八字计算界面样式 ==================== */
.bazi-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 5px 10px 10px 10px;/*减小上下边距*/
}

.bazi-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
}

.bazi-input-form {
    background: white;
    padding: 8px 12px;/*减小内边距*/
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 5px;/*减小上方板块顶部间距*/
    margin-bottom: 8px;
    border: 2px solid #07cdff;/*上方八字选择板块边框颜色*/
    transition: border-color 0.8s ease;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

/* 上方板块高亮动画 - 3秒 */
.bazi-input-form.highlight-animation {
    animation: borderHighlightPurple 3s ease;
}

/* 公历/农历切换按钮 - 分开为两个独立控件 */
.calendar-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;/*减小间距*/
}

.toggle-btn {
    flex: 1;
    padding: 6px;/*减小内边距*/
    font-size: 15px;
    font-weight: 600;
    border: 2px solid #90d3e0;/*公历和农历没选中的按钮边框颜色*/
    border-radius: 8px;
    background: white;/*公历和农历没选中的按钮背景颜色*/
    color: #0a0909;/*公历和农历没选中的按钮文字颜色*/
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: #07cdff;/*公历和农历选中的按钮背景颜色*/
    color: #030303;/*公历和农历按钮文字颜色*/
    border-color: #07cdff;/*公历和农历选中的按钮边框颜色*/
}

/* 滑动选择器容器 - 紧凑版 */
.picker-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    height: 140px;
    margin: 3px 0;/*减小间距*/
    position: relative;
    background: #fafafa;/*滑动选择器容器背景颜色*/
    border-radius: 8px;
    padding: 0;
    gap: 0;
    overflow: hidden;
}

.picker-column {
    flex: 1;
    height: 140px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 50px;
    max-width: 25%;
    padding: 0;
    margin: 0;
    overflow: hidden;
    /* 顶部和底部渐变遮罩 */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.picker-wheel {
    flex: 1;
    width: 100%;
    height: 140px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    touch-action: pan-y;
    max-width: 100%;
}

.picker-wheel::-webkit-scrollbar {
    display: none;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .picker-wheel {
        -webkit-overflow-scrolling: touch;
    }
}

.picker-item {
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
    transition: color 0.15s ease, font-size 0.15s ease, font-weight 0.15s ease;
    cursor: pointer;
    user-select: none;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    line-height: 28px;
    padding: 0 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.picker-item.selected {
    color: #0078d4;
    font-size: 13px;
    font-weight: bold;
}

.picker-item-empty {
    pointer-events: none;
}

/* 禁用的日期（超出当月天数的占位符）- 与背景同色，不可见 */
.picker-item-disabled {
    color: transparent !important;
    pointer-events: none;
}

.picker-item-disabled.selected {
    color: transparent !important;
    font-weight: normal !important;
}

.picker-item:active:not(.picker-item-empty) {
    background: rgba(1, 1, 1, 0.1);/*滑动选择器选中项背景颜色*/
}

.picker-label {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
    font-weight: 600;
}

/* 选择器中间高亮区域 */
.picker-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 3px;
    right: 3px;
    height: 28px;
    transform: translateY(-50%);
    background: rgba(0, 120, 212, 0.12);/*滑动选择器中间高亮区域背景颜色*/
    border-top: 2px solid rgba(0, 202, 229, 0.4);/*滑动选择器中间高亮区域顶部边框颜色*/
    border-bottom: 2px solid rgba(0, 202, 229, 0.4);/*滑动选择器中间高亮区域底部边框颜色*/
    border-radius: 5px;
    pointer-events: none;
    z-index: 1;
}

/* 农历信息显示 */
.lunar-info {
    text-align: center;
    padding: 5px;/*减小内边距*/
    background: #bae9e5;/*农历信息显示背景颜色*/
    border-radius: 6px;
    margin: 4px 0;/*减小间距*/
    font-size: 13px;
    color: #0d0d0d;/*农历信息显示文字颜色*/
}

/* 小号计算按钮 */
/* 开始八字排盘按钮边框高亮效果 */
@keyframes border-highlight {
    0%, 100% {
        border-color: rgba(7, 205, 255, 0.6);
    }
    50% {
        border-color: rgba(7, 205, 255, 1);
    }
}

.calculate-btn-small {
    width: 100%;
    padding: 8px;/*减小内边距*/
    font-size: 14px;
    font-weight: bold;
    color: #fff;/*计算按钮文字颜色*/
    background: #07cdff;/*计算按钮背景颜色*/
    border: 2px solid rgba(7, 205, 255, 0.6);/*计算按钮边框颜色*/
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-top: 8px;
    animation: border-highlight 3s ease-in-out infinite;
}

.calculate-btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(7, 205, 255, 0.5);/*计算按钮hover阴影颜色*/
    background: #00b8e6;/*计算按钮hover背景颜色*/
}

.calculate-btn-small:active {
    transform: translateY(0);
}

/* 计算按钮边框高亮动画 */
.calculate-btn-small {
    animation: border-highlight 3s ease-in-out infinite;
}

.calculate-btn-small.highlight-animation {
    animation: buttonHighlightPurple 3s ease;
}

@keyframes buttonHighlightPurple {
    0% { background: #07cdff; border-color: #07cdff; }/*蓝色*/
    30% { background: #9c27b0; border-color: #9c27b0; }/*紫色高亮*/
    50% { background: #9c27b0; border-color: #9c27b0; }/*保持紫色*/
    70% { background: #7b1fa2; border-color: #7b1fa2; }/*深紫色*/
    100% { background: #07cdff; border-color: #07cdff; }/*恢复蓝色*/
}

/* 边框高亮动画 - 蓝色→紫色→蓝色 3秒 */
@keyframes borderHighlightPurple {
    0% { border-color: #07cdff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); }
    30% { border-color: #9c27b0; box-shadow: 0 0 15px rgba(156, 39, 176, 0.4); }
    50% { border-color: #9c27b0; box-shadow: 0 0 20px rgba(156, 39, 176, 0.5); }
    70% { border-color: #7b1fa2; box-shadow: 0 0 15px rgba(123, 31, 162, 0.4); }
    100% { border-color: #07cdff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); }
}

.calculate-btn {
    width: 100%;
    padding: 14px;
    font-size: 18px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #0078d4, #005a9e);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

.bazi-result {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.result-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.pillars-display {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.pillar-item {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border: 2px solid #dee2e6;
}

.pillar-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.pillar-value {
    font-size: 32px;
    font-weight: bold;
    color: #0078d4;
    letter-spacing: 4px;
}

.wuxing-stats {
    margin-bottom: 25px;
}

.wuxing-stats h4 {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.wuxing-list {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.wuxing-item {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.wuxing-item[data-wuxing="mu"] {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #28a745;
}

.wuxing-item[data-wuxing="huo"] {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-color: #dc3545;
}

.wuxing-item[data-wuxing="tu"] {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-color: #ffc107;
}

.wuxing-item[data-wuxing="jin"] {
    background: linear-gradient(135deg, #e2e3e5, #d6d8db);
    border-color: #6c757d;
}

.wuxing-item[data-wuxing="shui"] {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    border-color: #17a2b8;
}

.wuxing-name {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.wuxing-count {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #0078d4;
}

.wuxing-analysis {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border: 2px solid #dee2e6;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 16px;
}

.analysis-item:not(:last-child) {
    border-bottom: 1px solid #dee2e6;
}

.analysis-label {
    font-weight: 600;
    color: #555;
}

.analysis-value {
    font-size: 20px;
    font-weight: bold;
    color: #0078d4;
}

/* ==================== 完整八字排盘样式 ==================== */

/* 结果区域容器 */
.bazi-result-full {
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid #07cdff;/*结果区域边框颜色*/
    max-width: 580px;
    margin: 0 auto;
    transition: border-color 0.8s ease, box-shadow 0.8s ease;
}

/* 结果区域高亮动画 - 蓝色→紫色→蓝色 3秒 */
.bazi-result-full.highlight-animation {
    animation: borderHighlightPurple 3s ease;
}

/* 八字排盘表格 */
.bazi-chart {
    margin-bottom: 8px;
}

.bazi-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.bazi-table th {
    background: #f0f7ff;
    color: #0078d4;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 4px;
    border: 1px solid #d0e3f7;
}

.bazi-table td {
    padding: 6px 4px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
}

.gan-row td {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    background: #fafafa;
}

.gan-row td.day-master {
    color: #0078d4;
    background: #e6f3ff;
}

.zhi-row td {
    font-size: 20px;
    font-weight: bold;
    color: #666;
    background: #f5f5f5;
}

.shenshen-row td {
    font-size: 11px;
    color: #888;
    background: #fafafa;
}

.canggan-row td {
    font-size: 12px;
    color: #666;
    background: #f9f9f9;
    letter-spacing: 1px;
}

/* 日主信息栏 - 单行显示 */
.daymaster-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    background: linear-gradient(135deg, #e6f3ff, #f0f7ff);
    border-radius: 6px;
    margin-bottom: 8px;
    flex-wrap: nowrap;/*强制单行*/
    white-space: nowrap;
    overflow: hidden;
}

.dm-label {
    font-size: 11px;
    color: #666;
    flex-shrink: 0;
}

.dm-value {
    font-size: 12px;
    font-weight: bold;
    color: #0078d4;
    flex-shrink: 0;
}

.dm-divider {
    color: #ccc;
    margin: 0 2px;
    flex-shrink: 0;
}

.dm-status {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    flex-shrink: 0;
}

.dm-status.got-ling {
    background: #d4edda;
    color: #28a745;
}

.dm-status.not-ling {
    background: #f8d7da;
    color: #dc3545;
}

/* 五行统计（含藏干） */
.wuxing-full-row {
    display: flex;
    justify-content: space-around;
    gap: 3px;
    margin-bottom: 8px;
}

.wuxing-full-item {
    flex: 1;
    text-align: center;
    padding: 5px 3px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.wuxing-full-item[data-wuxing="mu"] {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #28a745;
}

.wuxing-full-item[data-wuxing="huo"] {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-color: #dc3545;
}

.wuxing-full-item[data-wuxing="tu"] {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-color: #ffc107;
}

.wuxing-full-item[data-wuxing="jin"] {
    background: linear-gradient(135deg, #e2e3e5, #d6d8db);
    border-color: #6c757d;
}

.wuxing-full-item[data-wuxing="shui"] {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    border-color: #17a2b8;
}

.wf-name {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.wf-count {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #0078d4;
}

/* 喜用神显示 */
.yongshen-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 8px;
    padding: 6px;
    background: #f8f9fa;
    border-radius: 6px;
}

.yongshen-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ys-label {
    font-size: 12px;
    color: #666;
}

.ys-value {
    font-size: 14px;
    font-weight: bold;
}

.yongshen-item.good .ys-value {
    color: #28a745;
}

.yongshen-item.bad .ys-value {
    color: #dc3545;
}

/* 建议选项卡 - 10个选项 */
.advice-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
    padding: 5px;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.advice-tab {
    flex: 1 1 18%;/*每行5个*/
    min-width: 32px;
    padding: 5px 2px;
    font-size: 10px;
    font-weight: 600;
    border: 1.5px solid #07cdff;/*浅蓝色边框*/
    border-radius: 6px;
    background: white;/*白色背景*/
    color: #0078d4;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.advice-tab:hover {
    background: #f0f9ff;
    color: #005a9e;
    box-shadow: 0 2px 6px rgba(7, 205, 255, 0.3);
}

.advice-tab.active {
    background: #07cdff;/*选中时浅蓝色背景*/
    color: white;
    border-color: white;/*白色内边框作为间隙*/
    outline: 2px solid #3bd926;/*外层黄色边框*/
    outline-offset: 0px;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.5);
    animation: breathingGlow 2s ease-in-out infinite;/*呼吸灯特效*/
}

/* 呼吸灯动画 - 黄色边框高亮 */
@keyframes breathingGlow {
    0%, 100% {
        outline-color: #00fffb;
        box-shadow: 0 0 6px rgba(255, 204, 0, 0.4);
    }
    50% {
        outline-color: #ffdd44;
        box-shadow: 0 0 12px rgba(255, 204, 0, 0.7), 0 0 20px rgba(255, 204, 0, 0.3);
    }
}

/* 建议内容区 - 固定高度（加大展示） */
.advice-content {
    background: #fafafa;
    border-radius: 10px;
    padding: 10px;
    height: 240px;/*固定高度，增大展示内容量*/
    border: 1px solid #e0e0e0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* 隐藏滚动条 */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.advice-content::-webkit-scrollbar {
    display: none;
}

.advice-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.advice-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 2px solid #0078d4;
}

.advice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.advice-list li {
    padding: 4px 0;
    font-size: 12px;
    color: #555;
    line-height: 1.4;
    border-bottom: 1px dashed #eee;
}

.advice-list li:last-child {
    border-bottom: none;
}

.advice-list li.good {
    color: #28a745;
}

.advice-list li.bad {
    color: #dc3545;
}

.advice-list li.tip {
    color: #0078d4;
    font-weight: 500;
}

.advice-subtitle {
    font-size: 13px;
    font-weight: bold;
    color: #666;
    margin: 10px 0 6px 0;
}

/* 旧版样式保留兼容 */
.bazi-result-inline {
    background: white;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #0078d4;
    margin-top: 10px;
}

/* 四柱横排 */
.pillars-row {
    display: flex;
    justify-content: space-around;
    gap: 5px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.pillar-inline {
    text-align: center;
    flex: 1;
}

.pillar-label-small {
    display: block;
    font-size: 11px;
    color: #888;
    margin-bottom: 2px;
}

.pillar-value-small {
    font-size: 18px;
    font-weight: bold;
    color: #0078d4;
    letter-spacing: 2px;
}

/* 五行横排 */
.wuxing-row {
    display: flex;
    justify-content: space-around;
    gap: 3px;
    margin-bottom: 8px;
}

.wuxing-inline {
    flex: 1;
    text-align: center;
    padding: 6px 2px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.wuxing-inline[data-wuxing="mu"] {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #28a745;
}

.wuxing-inline[data-wuxing="huo"] {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-color: #dc3545;
}

.wuxing-inline[data-wuxing="tu"] {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-color: #ffc107;
}

.wuxing-inline[data-wuxing="jin"] {
    background: linear-gradient(135deg, #e2e3e5, #d6d8db);
    border-color: #6c757d;
}

.wuxing-inline[data-wuxing="shui"] {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    border-color: #17a2b8;
}

.wx-name {
    font-size: 13px;
    font-weight: bold;
    color: #333;
}

.wx-count {
    font-size: 14px;
    font-weight: bold;
    color: #0078d4;
    margin-left: 2px;
}

/* 旺衰一行显示 */
.wuxing-summary {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 6px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
}

.wuxing-summary strong {
    color: #0078d4;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .bazi-container {
        padding: 15px;
    }
    
    .bazi-title {
        font-size: 24px;
    }
    
    .pillars-display {
        grid-template-columns: 1fr;
    }
    
    .wuxing-list {
        flex-direction: column;
    }
    
    .wuxing-item {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .bazi-container {
        padding: 10px;
    }
    
    .bazi-input-form,
    .bazi-result {
        padding: 15px;
    }
    
    .pillar-value {
        font-size: 28px;
    }
    
    .wuxing-name {
        font-size: 18px;
    }
    
    .wuxing-count {
        font-size: 20px;
    }
}

/* ==================== 建星模式样式 ==================== */
.star-mode-rule-content {
  margin-bottom: 0;
  line-height: 1.7;
  color: #444;
}
.star-mode-rule-content p {
  margin: 0 0 12px 0;
}
.star-mode-rule-content p + table {
  margin-top: 4px;
}
.star-mode-rule-content table + p {
  margin-top: 20px;
}
.star-mode-rule-content p:last-child {
  margin-bottom: 0;
}
.star-mode-rule-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 14px;
}
.star-mode-rule-table th,
.star-mode-rule-table td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.star-mode-rule-table th {
  background: #f5f5f5;
  font-weight: 600;
  width: 90px;
}
.star-mode-rule-table tbody tr:nth-child(even) {
  background: #fafafa;
}
.star-mode-rule-table-3col th:first-child,
.star-mode-rule-table-3col td:first-child {
  width: 50px;
}
.star-mode-rule-table-3col th:nth-child(2),
.star-mode-rule-table-3col td:nth-child(2),
.star-mode-rule-table-3col th:nth-child(3),
.star-mode-rule-table-3col td:nth-child(3) {
  font-size: 13px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    box-sizing: border-box;
    animation: modal-overlay-fade 0.25s ease;
}

@keyframes modal-overlay-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 25px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modal-content-scale 0.3s ease;
}

@keyframes modal-content-scale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-content.guide-modal {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    max-width: 85%;
    width: 85%;
}

.modal-content.large-modal {
    max-width: 100%;
    width: 100%;
    padding: 25px 0;
    margin: 0;
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 700;
}

.modal-close-btn {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: #666;
    font-size: 28px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
    color: #333;
}

.entertainment-settings-modal {
    max-width: 320px;
    padding: 20px;
    margin: 0 20px; /* 左右留边 */
}

.entertainment-settings-content {
    padding: 0;
}

/* 账号和密码管理弹窗 - 缩小并加边框 */
#account-management-modal .modal-content {
    max-width: 420px;
    padding: 15px 20px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    max-height: 85vh;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    flex-direction: column;
}

.mode-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px 20px 10px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.mode-settings-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 700;
}

.mode-color-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-selector-label {
    font-size: 14px;
    color: #666;
}

.mode-color-dots {
    display: flex;
    gap: 8px;
}

.mode-color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mode-color-dot:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.mode-color-dot.active {
    border-color: #333;
    transform: scale(1.15);
}

.mode-color-dot.pink {
    background-color: #ffe0e6;
}

.mode-color-dot.green {
    background-color: #e6ffe6;
}

.mode-color-dot.blue {
    background-color: #e6f3ff;
}

.mode-color-dot.purple {
    background-color: #f0e6ff;
}

@media (max-width: 600px) {
    .mode-settings-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mode-color-selector {
        width: 100%;
        justify-content: flex-start;
    }
}

.modal-content.large-modal .mode-settings-table-container {
    padding: 0 10px;
}

.modal-content.large-modal .modal-buttons {
    padding: 0 10px;
    margin-top: 20px;
}

.modal-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.modal-input:focus {
    outline: none;
    border-color: #07cdff;
    box-shadow: 0 0 0 3px rgba(7, 205, 255, 0.2);
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn.primary {
    background: #07cdff;
    color: white;
}

/* 账号和密码管理样式 */
#account-management-modal .modal-content h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

.account-info-section {
    margin-bottom: 15px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    max-height: calc(85vh - 300px);
}

.account-info-section::-webkit-scrollbar {
    width: 4px;
}

.account-info-section::-webkit-scrollbar-track {
    background: transparent;
}

.account-info-section::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 2px;
}

.account-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(224, 224, 224, 0.6);
    transition: all 0.2s ease;
}

.account-info-item:hover {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.account-info-item:last-child {
    margin-bottom: 0;
}

.account-info-item label {
    font-weight: 600;
    color: #333;
    min-width: 50px;
    font-size: 13px;
}

.account-value {
    flex: 1;
    color: #555;
    font-size: 13px;
    word-break: break-all;
    font-family: 'Courier New', monospace;
}

.account-value.password-display {
    letter-spacing: 2px;
    font-size: 15px;
}

.copy-btn,
.toggle-password-display {
    padding: 5px 10px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    min-width: 35px;
    text-align: center;
    color: #667eea;
}

.copy-btn:hover,
.toggle-password-display:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

.reset-password-section {
    margin-top: 15px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    max-height: calc(85vh - 200px);
}

.reset-password-section::-webkit-scrollbar {
    width: 4px;
}

.reset-password-section::-webkit-scrollbar-track {
    background: transparent;
}

.reset-password-section::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 2px;
}

.reset-password-section h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(224, 224, 224, 0.6);
}

.reset-password-section .auth-input-group {
    margin-bottom: 12px;
}

.reset-password-section .auth-input-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: 500;
    font-size: 12px;
}

.reset-password-section .password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.reset-password-section .password-input-wrapper input {
    width: 100%;
    padding: 8px 40px 8px 12px;
    border: 1.5px solid rgba(224, 224, 224, 0.6);
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.reset-password-section .password-input-wrapper input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.reset-password-section .toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    color: #666;
    transition: transform 0.2s ease;
}

.reset-password-section .toggle-password:hover {
    transform: scale(1.1);
}

.reset-password-section .modal-buttons {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(224, 224, 224, 0.6);
}

.reset-password-section .modal-btn {
    padding: 8px 18px;
    font-size: 13px;
    flex: 1;
}

@media (max-width: 600px) {
    .account-info-item {
        flex-wrap: wrap;
    }
    
    .account-info-item label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .account-value {
        width: 100%;
    }
    
    .copy-btn,
    .toggle-password-display {
        margin-left: auto;
    }
}

/* 退出登录确认弹窗样式 */
.logout-confirm-modal {
    max-width: 400px;
    text-align: center;
    padding: 30px 25px;
}

.logout-confirm-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.logout-confirm-title {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 22px;
    font-weight: 700;
}

.logout-confirm-message {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

.logout-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.logout-confirm-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.logout-confirm-btn.cancel-btn {
    background: #f0f0f0;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logout-confirm-btn.cancel-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logout-confirm-btn.cancel-btn:active {
    transform: translateY(0);
}

.logout-confirm-btn.confirm-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.logout-confirm-btn.confirm-btn:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e04848 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.logout-confirm-btn.confirm-btn:active {
    transform: translateY(0);
}

.logout-confirm-btn.admin-confirm-btn {
    background: linear-gradient(135deg, #07cdff 0%, #0078d4 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(7, 205, 255, 0.3);
}

.logout-confirm-btn.admin-confirm-btn:hover {
    background: linear-gradient(135deg, #06b8e6 0%, #006bb8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 205, 255, 0.4);
}

.logout-confirm-btn.admin-confirm-btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .logout-confirm-modal {
        padding: 25px 20px;
        margin: 20px;
    }
    
    .logout-confirm-icon {
        font-size: 40px;
    }
    
    .logout-confirm-title {
        font-size: 20px;
    }
    
    .logout-confirm-message {
        font-size: 14px;
    }
    
    .logout-confirm-buttons {
        flex-direction: column;
    }
    
    .logout-confirm-btn {
        width: 100%;
    }
}

.modal-btn.primary:hover {
    background: #06b8e0;
}

.modal-btn.secondary {
    background: #e0e0e0;
    color: #333;
}

.modal-btn.secondary:hover {
    background: #d0d0d0;
}

.mode-settings-table-container {
    overflow-x: visible;
    overflow-y: auto;
    margin-bottom: 20px;
    width: 100%;
    max-height: calc(90vh - 200px);
}

.mode-settings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.mode-settings-table thead {
    background: #07cdff;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mode-settings-table th {
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 11px;
    white-space: nowrap;
}

.mode-settings-table td {
    padding: 8px 4px;
    text-align: center;
    border: 1px solid #e0e0e0;
    font-size: 11px;
    white-space: nowrap;
}

.mode-settings-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.mode-settings-table tbody tr:hover {
    background: #e9ecef;
}

.mode-settings-table input[type="radio"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.mode-settings-table td:first-child {
    font-weight: 600;
    background: #f0f0f0;
    text-align: left;
    padding-left: 8px;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: pointer;
}

/* 长按菜单样式 */
.mode-context-menu {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 10px;
    z-index: 10001;
    display: none;
    min-width: 120px;
}

.mode-context-menu.show {
    display: block;
}

.mode-context-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 14px;
    transition: background 0.2s;
}

.mode-context-menu-item:hover {
    background: #f0f0f0;
}

.mode-context-menu-item.pin {
    color: #07cdff;
    font-weight: 600;
}

/* 带背景颜色的行 */
.mode-settings-table tbody tr.bg-pink {
    background: #ffe0e6 !important;
}

.mode-settings-table tbody tr.bg-pink td {
    border-top: 2px solid #ffc107;
}

.mode-settings-table tbody tr.bg-green {
    background: #e6ffe6 !important;
}

.mode-settings-table tbody tr.bg-green td {
    border-top: 2px solid #ffc107;
}

.mode-settings-table tbody tr.bg-blue {
    background: #e6f3ff !important;
}

.mode-settings-table tbody tr.bg-blue td {
    border-top: 2px solid #ffc107;
}

.mode-settings-table tbody tr.bg-purple {
    background: #f0e6ff !important;
}

.mode-settings-table tbody tr.bg-purple td {
    border-top: 2px solid #ffc107;
}

/* ==================== 婚姻测评样式 ==================== */
.marriage-test-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: visible;
}

.test-stage {
    display: none;
}

.test-stage.active {
    display: block;
}

.test-header {
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.test-title {
    font-size: 20px;
    color: #333;
    margin: 0 0 6px 0;
    font-weight: 600;
}

.test-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 8px 0 4px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin-top: 3px;
    margin-bottom: 0;
}

.test-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-section {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 0;
}

.section-title {
    font-size: 16px;
    color: #333;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.form-group {
    margin-bottom: 15px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input[type="number"],
.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
    background: white;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    cursor: pointer;
}

.form-group input[type="number"]:focus,
.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background-color: #f5f7ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 已填写字段的颜色变化 */
.form-group input[type="number"]:valid:not(:placeholder-shown),
.form-group input[type="text"]:valid:not(:placeholder-shown) {
    border-color: #667eea;
    background-color: #f5f7ff;
}

.form-group select:valid:not([value=""]) {
    border-color: #667eea;
    background-color: #f5f7ff;
}

/* 自定义select已填写状态 */
.custom-select-wrapper:has(select:valid:not([value=""])) .custom-select-display {
    border-color: #667eea;
    background-color: #f5f7ff;
}

.form-group select:hover {
    border-color: #667eea;
    background-color: #f5f7ff;
}

/* 自定义下拉框样式 */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-display {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
    position: relative;
    padding-right: 40px;
}

.custom-select-display:hover {
    border-color: #667eea;
    background-color: #f5f7ff;
}

/* 自定义select点击打开时的颜色 */
.custom-select-wrapper:has(.custom-select-dropdown[style*="display: block"]) .custom-select-display,
.custom-select-display.active {
    border-color: #667eea;
    background-color: #f5f7ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-select-display::after {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #667eea;
    pointer-events: none;
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-select-dropdown.dropdown-up {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 5px;
}

.custom-select-option {
    padding: 14px 18px;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: #f5f7ff;
    color: #667eea;
}

.custom-select-option:active {
    background: #e8eaff;
}

.custom-select-option.selected {
    background: #667eea;
    color: white;
    font-weight: 600;
}

/* 隐藏原生select */
.form-group select {
    display: none !important;
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

.test-btn {
    padding: 14px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.test-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.test-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.test-btn.secondary {
    background: #f0f0f0;
    color: #333;
}

.test-btn.secondary:hover {
    background: #e0e0e0;
}

.question-container {
    padding: 10px 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.question-item {
    display: none;
}

.question-item.active {
    display: flex;
    flex-direction: column;
}

.question-text {
    font-size: 18px;
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
    flex-shrink: 0;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
}

.option-item {
    padding: 10px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    color: #333;
    line-height: 1.4;
    flex-shrink: 0;
}

.option-item:hover {
    border-color: #667eea;
    background: #f5f7ff;
}

.option-item.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    font-weight: 600;
}

.question-actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 0;
    flex-wrap: nowrap;
}

.question-actions .test-btn {
    flex: 0 0 auto;
    min-width: 120px;
    padding: 12px 24px;
    font-size: 15px;
    white-space: nowrap;
    border-radius: 8px;
}

.question-actions .test-btn.secondary {
    margin: 0;
}

.question-actions .test-btn.primary {
    margin: 0;
}

.result-container {
    padding: 10px 0;
}

.score-display {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.score-item {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #667eea;
}

.score-label {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.score-value {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 15px;
}

.score-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 1s ease;
    border-radius: 10px;
}

.result-analysis {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.analysis-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
}

.analysis-title {
    font-size: 20px;
    color: #333;
    margin: 0 0 15px 0;
    font-weight: 600;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.final-score {
    font-size: 48px;
    font-weight: 700;
    color: #667eea;
    text-align: center;
    margin: 20px 0;
}

.score-level {
    text-align: center;
    font-size: 20px;
    color: #666;
    margin-bottom: 20px;
}

.analysis-content {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
}

.analysis-content p {
    margin: 10px 0;
}

.final-advice {
    font-size: 18px;
    color: #333;
    line-height: 1.8;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border-left: 5px solid #ffc107;
    font-weight: 500;
}

.result-actions {
    text-align: center;
    margin-top: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .marriage-test-container {
        padding: 15px;
        margin: 10px;
    }
    
    .test-title {
        font-size: 24px;
    }
    
    .score-display {
        gap: 20px;
    }
    
    .score-value {
        font-size: 28px;
    }
    
    .question-actions {
        flex-direction: column;
    }
    
    .test-btn {
        width: 100%;
    }
}

/* 飘落动画 - 透明度由JavaScript设置，这里不设置opacity以保持原样 */
@keyframes fallDown {
    0% {
        transform: translateY(0) translateX(0);
    }
    100% {
        transform: translateY(100vh) translateX(var(--horizontal-offset, 0px));
    }
}

/* 题目提示动画 */
@keyframes alertFadeIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes alertFadeOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

/* 用户记录弹窗样式 */
.user-records-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.user-records-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@media (max-width: 768px) {
    .user-records-modal-content {
        max-width: 100vw;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .record-item {
        min-width: calc(100vw - 80px);
        max-width: calc(100vw - 80px);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.user-records-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-records-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-modal-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.user-records-modal-body {
    padding: 20px 25px;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.records-count {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.records-list {
    display: flex;
    flex-direction: row;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: thin;
    scrollbar-color: #07cdff #f0f0f0;
}

.records-list::-webkit-scrollbar {
    height: 8px;
}

.records-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.records-list::-webkit-scrollbar-thumb {
    background: #07cdff;
    border-radius: 4px;
}

.records-list::-webkit-scrollbar-thumb:hover {
    background: #06b8e0;
}

.record-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
    min-width: 300px;
    max-width: 400px;
    flex-shrink: 0;
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.record-number {
    font-weight: 600;
    color: #07cdff;
    font-size: 14px;
}

.record-time {
    color: #999;
    font-size: 12px;
}

.record-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.record-field {
    display: flex;
    align-items: flex-start;
    font-size: 13px;
}

.field-label {
    color: #666;
    font-weight: 500;
    margin-right: 8px;
    min-width: 100px;
}

.field-value {
    color: #333;
    flex: 1;
}

.no-records {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
}

.user-records-modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

.close-modal-btn-footer {
    padding: 8px 20px;
    background: #07cdff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-modal-btn-footer:hover {
    background: #06b8e0;
}

.user-item {
    cursor: pointer;
}

.user-item:hover {
    background: #f0f7ff;
}

/* 轻量提示（居中显示） */
#mini-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.86);
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 20000;
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-width: 80%;
    text-align: center;
}

#mini-alert.hide {
    opacity: 0;
    transform: translate(-50%, -45%);
}

/* ==================== 八字详解教学样式 ==================== */
.tutorial-modal {
    max-width: 95%;
    width: 95%;
    max-height: 95vh;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tutorial-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.tutorial-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.tutorial-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.tutorial-content {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    background: #f9f9f9;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tutorial-content::-webkit-scrollbar {
    display: none;
}
.tutorial-footer {
    padding: 15px 25px;
    border-top: 1px solid #e0e0e0;
    background: #f9f9f9;
}

.tutorial-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tutorial-section h4 {
    color: #667eea;
    font-size: 20px;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.tutorial-section p {
    color: #555;
    line-height: 1.8;
    margin: 10px 0;
    font-size: 15px;
}

.tutorial-section ul, .tutorial-section ol {
    margin: 15px 0;
    padding-left: 25px;
}

.tutorial-section li {
    color: #555;
    line-height: 1.8;
    margin: 8px 0;
    font-size: 15px;
}

/* 五行图样式 */
.wuxing-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
}

.wuxing-circle {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 20px auto;
}

.wuxing-item {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.wuxing-item:hover {
    transform: scale(1.1);
    z-index: 10;
}

.wuxing-item.mu {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

.wuxing-item.huo {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.wuxing-item.tu {
    background: linear-gradient(135deg, #fad961 0%, #f76b1c 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
}

.wuxing-item.jin {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.wuxing-item.shui {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.wuxing-name {
    font-size: 24px;
    margin-bottom: 5px;
}

.wuxing-details {
    font-size: 12px;
    text-align: center;
    line-height: 1.4;
}

/* 五行关系图 */
.wuxing-relation-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.wuxing-relation-table th,
.wuxing-relation-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.wuxing-relation-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.wuxing-relation-table tr:nth-child(even) {
    background: #f9f9f9;
}

/* 天干地支表 */
.ganzhi-table {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.ganzhi-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.ganzhi-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.ganzhi-item .name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
}

.ganzhi-item .wuxing {
    font-size: 14px;
    color: #666;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
}

.ganzhi-item .wuxing.mu {
    background: #e8f5e9;
    color: #2e7d32;
}

.ganzhi-item .wuxing.huo {
    background: #ffebee;
    color: #c62828;
}

.ganzhi-item .wuxing.tu {
    background: #fff3e0;
    color: #e65100;
}

.ganzhi-item .wuxing.jin {
    background: #fce4ec;
    color: #880e4f;
}

.ganzhi-item .wuxing.shui {
    background: #e3f2fd;
    color: #1565c0;
}

/* 十神表 */
.shishen-table {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.shishen-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.shishen-item h5 {
    margin: 0 0 10px 0;
    color: #667eea;
    font-size: 16px;
}

.shishen-item p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

/* 方位季节颜色对应表 */
.direction-season-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.direction-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.direction-item .direction-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.direction-item .wuxing-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin: 5px;
    color: white;
}

.direction-item .season {
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

.direction-item .color-box {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.color-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tutorial-modal {
        max-width: 100%;
        width: 100%;
        max-height: 100vh;
    }
    
    .wuxing-circle {
        width: 300px;
        height: 300px;
    }
    
    .wuxing-item {
        width: 90px;
        height: 90px;
    }
    
    .wuxing-item.tu {
        width: 80px;
        height: 80px;
    }
    
    .wuxing-name {
        font-size: 18px;
    }
    
    .wuxing-details {
        font-size: 10px;
    }
    
    .ganzhi-table {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .shishen-table {
        grid-template-columns: 1fr;
    }
    
    .direction-season-table {
        grid-template-columns: 1fr;
    }
    
    #account-management-modal .modal-content {
        max-width: 95%;
        padding: 12px 15px;
    }
    
    .account-info-section {
        padding: 10px 12px;
    }
    
    .reset-password-section {
        padding: 10px 12px;
    }
}

/* 责任声明弹窗样式 */
.disclaimer-modal {
    max-width: 75%;
    width: 75%;
    max-height: 75vh;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 12.5vh auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.disclaimer-title {
    margin: 0;
    padding: 20px 25px;
    background: #f5f5f5;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.disclaimer-content {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    background: #fff;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.disclaimer-content::-webkit-scrollbar {
    display: none;
}
.disclaimer-footer {
    flex-shrink: 0;
    padding: 15px 25px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}
.disclaimer-footer .disclaimer-agreement {
    margin-top: 0;
}

.disclaimer-intro {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.disclaimer-intro p {
    margin: 0;
    color: #555;
    line-height: 1.6;
    font-size: 14px;
}

.disclaimer-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #fafafa;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.disclaimer-image-container {
    text-align: center;
    margin-bottom: 15px;
}

.disclaimer-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.disclaimer-text h4 {
    color: #333;
    font-size: 16px;
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
}

.disclaimer-text p {
    color: #555;
    line-height: 1.8;
    font-size: 14px;
    margin: 0;
}

.disclaimer-warning {
    margin-top: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.disclaimer-warning h4 {
    color: #333;
    font-size: 16px;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.disclaimer-warning ul {
    margin: 0;
    padding-left: 20px;
    color: #555;
    line-height: 1.8;
    font-size: 14px;
}

.disclaimer-warning li {
    margin-bottom: 8px;
}

.disclaimer-warning li:last-child {
    margin-bottom: 0;
}

.disclaimer-agreement {
    margin-top: 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.disclaimer-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    color: #333;
    font-size: 12px;
    line-height: 1.5;
}

.disclaimer-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.disclaimer-checkbox:checked {
    accent-color: #666;
}

.disclaimer-buttons {
    padding: 15px 0 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.disclaimer-btn {
    padding: 12px 30px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.disclaimer-btn.primary {
    background: #666;
    color: white;
    border-color: #666;
}

.disclaimer-btn.primary:hover:not(:disabled) {
    background: #555;
    border-color: #555;
}

.disclaimer-btn.primary:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
    color: #999;
}

@media (max-width: 600px) {
    .disclaimer-modal {
        max-width: 85%;
        width: 85%;
        max-height: 80vh;
        margin: 10vh auto;
    }
    
    .disclaimer-content {
        padding: 15px;
    }
    
    .disclaimer-footer {
        padding: 12px 15px;
    }
    
    .disclaimer-section {
        padding: 15px;
    }
    
    .disclaimer-text h4 {
        font-size: 15px;
    }
    
    .disclaimer-text p,
    .disclaimer-warning ul {
        font-size: 13px;
    }
    
    .disclaimer-checkbox-label {
        font-size: 11px;
    }
}

/* ==================== 择吉页面样式 ==================== */
.zeji-container {
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
    padding-bottom: 100px;
}

/* 日历导航栏 */
.zeji-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 8px 10px;
    background: #f5f5f5;
    border-radius: 8px;
}

.zeji-nav-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.zeji-nav-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.zeji-zhi-filter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.zeji-zhi-filter-header {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
}
.zeji-zhi-color-input {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}
.zeji-zhi-color-input::-webkit-color-swatch-wrapper { padding: 0; }
.zeji-zhi-color-input::-webkit-color-swatch { border: none; border-radius: 3px; }
.zeji-zhi-color-input::-moz-color-swatch { border: none; border-radius: 3px; }
.zeji-zhi-filter-label {
    font-size: 13px;
    color: #555;
    flex-shrink: 0;
    text-align: center;
}
.zeji-zhi-chips {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    align-items: center;
}
.zeji-zhi-chip {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.zeji-zhi-chip:hover {
    border-color: #4a90e2;
    background: #f0f7ff;
}
.zeji-zhi-chip.selected {
    background: var(--zeji-zhi-color-1);
    border-color: var(--zeji-zhi-color-1);
    color: #333;
}
.zeji-zhi-chip-2.selected {
    background: var(--zeji-zhi-color-2);
    border-color: var(--zeji-zhi-color-2);
    color: #333;
}

/* 两组日柱地支横排容器：左一组、右一组，不叠压 */
.zeji-zhi-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.zeji-zhi-row .zeji-zhi-filter {
    flex: 0 1 calc(50% - 6px);
    min-width: 0;
    max-width: calc(50% - 6px);
}

.zeji-special-day-section {
    margin-bottom: 16px;
}
.zeji-special-day-container {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.zeji-special-color-input {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}
.zeji-special-color-input::-webkit-color-swatch-wrapper { padding: 0; }
.zeji-special-color-input::-webkit-color-swatch { border: none; border-radius: 4px; }
.zeji-special-color-input::-moz-color-swatch { border: none; border-radius: 4px; }
.zeji-special-select-all {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f5f5f5;
    cursor: pointer;
}
.zeji-special-select-all.selected {
    background: #e3f2fd;
    color: #1976d2;
}
.zeji-special-day-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.zeji-special-day-blue {
    margin-bottom: 12px;
}
.zeji-special-day-red {
    margin-bottom: 0;
}
.zeji-special-btn {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}
.zeji-special-btn:hover {
    background: #f0f7ff;
}
.zeji-special-btn-blue.selected {
    border-color: var(--zeji-special-orange-bg);
    background: var(--zeji-special-orange-bg);
}
.zeji-special-btn-red.selected {
    border-color: var(--zeji-special-gray-bg);
    background: var(--zeji-special-gray-bg);
}
.zeji-day.zeji-day-special-blue {
    background: var(--zeji-special-orange-bg) !important;
}
.zeji-day.zeji-day-special-red,
.zeji-day.zeji-day-special-both {
    background: var(--zeji-special-gray-bg) !important;
}

.zeji-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.zeji-nav-btn {
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.zeji-nav-btn:hover {
    background: #357abd;
}

.zeji-year-select,
.zeji-month-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    min-width: 70px;
}

.zeji-today-btn {
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.zeji-today-btn:hover {
    background: #357abd;
}

.zeji-current-date {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
}

/* 日历表格 */
.zeji-calendar {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.zeji-calendar-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}
.zeji-calendar-ym {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}
.zeji-calendar-month-en {
    font-size: 14px;
    color: #666;
}

.zeji-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.zeji-weekday {
    text-align: center;
    font-weight: bold;
    color: #666;
    padding: 8px;
    font-size: 14px;
}

.zeji-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.zeji-day {
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 6px 4px;
    position: relative;
    background: white;
}

.zeji-day:hover {
    background: #f0f0f0;
    border-color: #4a90e2;
}

.zeji-day.other-month {
    color: #999;
    background: #e8e8e8;
}

.zeji-day.other-month .zeji-day-lunar {
    color: #999;
}

.zeji-day.today {
    background: #e3f2fd;
    border-color: #4a90e2;
    font-weight: bold;
}

.zeji-day.selected {
    background: #ffeb3b;
    border-color: #ffc107;
    font-weight: bold;
}
.zeji-day.zeji-day-buddhist {
    animation: zeji-buddhist-border 2s ease-in-out infinite;
}
@keyframes zeji-buddhist-border {
    0%, 100% { box-shadow: 0 0 4px rgba(255, 193, 7, 0.6); border-color: rgba(255, 193, 7, 0.8); }
    50% { box-shadow: 0 0 12px rgba(255, 193, 7, 1); border-color: #ffc107; }
}
.zeji-buddhist-memorial {
    font-size: 27px;
    font-weight: bold;
    min-height: 26px;
    align-self: center;
    margin-left: 12px;
    color: #c9a227;
}
.zeji-buddhist-memorial:empty {
    display: none;
}

.zeji-day-number {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 3px;
    color: #333;
}

.zeji-day.other-month .zeji-day-number {
    color: #999;
}

.zeji-day-number-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-bottom: 3px;
}

.zeji-day-number-row .zeji-day-number {
    margin-bottom: 0;
}

.zeji-day-check {
    font-size: 12px;
    line-height: 1;
    margin-left: -6px;
}

.zeji-day-lunar {
    font-size: 11px;
    color: #666;
    text-align: center;
    line-height: 1.3;
    min-height: 14px;
}

.zeji-day-holiday {
    font-size: 10px;
    color: #e91e63;
    margin-top: 2px;
}

.zeji-day-solar-term {
    font-size: 10px;
    color: #4caf50;
    margin-top: 2px;
}

.zeji-day-mark {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f44336;
}

.zeji-day-mark.yellow {
    background: #ffc107;
}

.zeji-day-mark.green {
    background: #4caf50;
}
.zeji-day-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
    margin-top: 4px;
}
.zeji-day.zeji-day-zhi-match {
    background-color: var(--zeji-zhi-color-1);
    color: #333;
    border-color: var(--zeji-zhi-color-1);
}
.zeji-day.zeji-day-zhi-match.other-month .zeji-day-number,
.zeji-day.zeji-day-zhi-match .zeji-day-number,
.zeji-day.zeji-day-zhi-match .zeji-day-lunar {
    color: #333;
}
.zeji-day.zeji-day-zhi-match-2 {
    background-color: var(--zeji-zhi-color-2);
    color: #333;
    border-color: var(--zeji-zhi-color-2);
}
.zeji-day.zeji-day-zhi-match-2.other-month .zeji-day-number,
.zeji-day.zeji-day-zhi-match-2 .zeji-day-number,
.zeji-day.zeji-day-zhi-match-2 .zeji-day-lunar {
    color: #333;
}
.zeji-day.zeji-day-zhi-match.zeji-day-special-blue,
.zeji-day.zeji-day-zhi-match.zeji-day-special-red,
.zeji-day.zeji-day-zhi-match.zeji-day-special-both {
    background-color: var(--zeji-zhi-color-1) !important;
}
.zeji-day.zeji-day-zhi-match-2.zeji-day-special-blue,
.zeji-day.zeji-day-zhi-match-2.zeji-day-special-red,
.zeji-day.zeji-day-zhi-match-2.zeji-day-special-both {
    background-color: var(--zeji-zhi-color-2) !important;
}
.zeji-day-dots-top {
    margin-top: 0;
    margin-bottom: 2px;
}
.zeji-day-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* 宜忌信息显示 */
.zeji-info-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.zeji-date-info {
    margin-bottom: 20px;
}

.zeji-date-header {
    display: grid;
    grid-template-columns: 60px 1fr;
    grid-template-rows: auto auto auto;
    gap: 4px 15px;
}
.zeji-date-number {
    grid-column: 1;
    grid-row: 1;
}
.zeji-buddhist-memorial {
    grid-column: 2;
    grid-row: 1;
}
.zeji-lunar-date {
    grid-column: 1 / -1;
    grid-row: 2;
}
.zeji-ganzhi {
    grid-column: 1 / -1;
    grid-row: 3;
}

.zeji-date-number {
    width: 60px;
    height: 60px;
    background: #ffeb3b;
    color: #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.zeji-lunar-date {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.zeji-ganzhi {
    font-size: 14px;
    color: #666;
}

.zeji-yiji-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.zeji-yi-section,
.zeji-ji-section {
    border-radius: 8px;
    padding: 15px;
}

.zeji-yi-section {
    background: #e8f5e9;
}

.zeji-ji-section {
    background: #fff3e0;
}

.zeji-yiji-label {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: white;
}

.yi-label {
    background: #4caf50;
}

.ji-label {
    background: #ff9800;
}

.zeji-yiji-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.zeji-yiji-item {
    background: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 特殊日期标注 */
.zeji-special-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 12px;
    padding: 8px 0;
    font-size: 12px;
    color: #555;
}
.zeji-legend-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
@media (min-width: 768px) {
    .zeji-legend-col {
        flex-direction: row;
        flex-wrap: wrap;
    }
}
.zeji-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.zeji-legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.zeji-legend-color {
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
}
.zeji-legend-color::-webkit-color-swatch-wrapper { padding: 1px; }
.zeji-legend-color::-webkit-color-swatch { border: none; border-radius: 3px; }
.zeji-special-days {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.zeji-special-days-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.zeji-special-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.zeji-special-tag {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.zeji-special-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.zeji-special-tag.red {
    background: #ffebee;
    color: #c62828;
    border-color: #ef5350;
}

.zeji-special-tag.yellow {
    background: #fff9c4;
    color: #f57f17;
    border-color: #fbc02d;
}

.zeji-special-tag.green {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #66bb6a;
}

.zeji-wuxing-section { margin-top: 15px; padding-top: 15px; border-top: 1px solid #e0e0e0; }
.zeji-wuxing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.zeji-wuxing-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #f9f9f9; border-radius: 6px; font-size: 14px; border: 1px solid #eee; }
.zeji-wuxing-label { font-weight: bold; color: #333; min-width: 40px; }
.zeji-wuxing-val { color: #555; flex: 1; }

.zeji-shichen-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}
.zeji-shichen-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}
.zeji-shichen-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-start;
}
.zeji-shichen-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    min-width: 28px;
}
.zeji-shichen-col.ji { background: #e8f5e9; border-color: #81c784; color: #2e7d32; }
.zeji-shichen-col.xiong { background: #ffebee; border-color: #e57373; color: #c62828; }
.zeji-shichen-char { display: block; line-height: 1.3; font-weight: bold; }
.zeji-shichen-label { display: block; line-height: 1.3; font-size: 12px; margin-top: 2px; font-weight: bold; }

.zeji-jixiong-section { margin-top: 15px; padding-top: 15px; border-top: 1px solid #e0e0e0; }
.zeji-jixiong-row { margin-bottom: 8px; font-size: 14px; }
.zeji-jixiong-label { font-weight: bold; color: #333; margin-right: 8px; min-width: 72px; display: inline-block; }
.zeji-jixiong-content { color: #555; }

.zeji-shenwei-section { margin-top: 15px; padding-top: 15px; border-top: 1px solid #e0e0e0; }
.zeji-shenwei-title { font-size: 16px; font-weight: bold; color: #333; margin-bottom: 10px; }
.zeji-shenwei-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.zeji-shenwei-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: #f5f5f5; border-radius: 6px; font-size: 14px; border: 1px solid #e0e0e0; }
.zeji-shenwei-name { font-weight: bold; color: #333; }
.zeji-shenwei-wei { color: #1976d2; font-weight: bold; }
.zeji-pengzu-section { margin-top: 15px; padding-top: 15px; border-top: 1px solid #e0e0e0; }
.zeji-pengzu-title { font-size: 16px; font-weight: bold; color: #333; margin-bottom: 10px; }
.zeji-pengzu-content { padding: 10px 12px; background: #f5f5f5; border-radius: 6px; font-size: 14px; border: 1px solid #e0e0e0; }
.zeji-pengzu-line { margin-bottom: 6px; }
.zeji-pengzu-line:last-of-type { margin-bottom: 0; }
.zeji-pengzu-note { margin-top: 8px; font-size: 12px; color: #666; }

.zeji-ref-tables { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e0e0e0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.zeji-ref-tables-wrap .zeji-ref-tables { margin-top: 0; padding-top: 0; border-top: none; }
.zeji-ref-block { background: #fafafa; border: 1px solid #e0e0e0; border-radius: 8px; padding: 12px; }
.zeji-ref-title { font-size: 14px; font-weight: bold; color: #333; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #e0e0e0; }
.zeji-ref-body { font-size: 13px; color: #444; }
.zeji-ref-flow { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.zeji-ref-item { white-space: nowrap; }
.zeji-ref-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.zeji-ref-chip { display: inline-flex; align-items: baseline; gap: 2px; padding: 2px 6px; background: #eee; border-radius: 4px; font-size: 13px; }
.zeji-ref-chip em { font-style: normal; color: #666; font-size: 12px; margin-left: 2px; }
.zeji-ref-table { display: flex; flex-direction: column; gap: 4px; }
.zeji-ref-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zeji-ref-cell { flex: 0 0 auto; }
.zeji-ref-list { display: flex; flex-direction: column; gap: 4px; }
.zeji-ref-line { padding: 2px 0; }
.zeji-ref-chain-list { display: flex; flex-direction: column; gap: 6px; }
.zeji-ref-chain { font-family: inherit; font-size: 13px; }

/* ==================== 电脑端择吉头部（仅桌面） ==================== */
@media (min-width: 769px) {
    .zeji-header {
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 12px;
    }
    
    /* 左侧一列：年选择、月选择、回到今天、日期，排在两组日柱地支前面 */
    .zeji-header-left {
        display: flex;
        flex-direction: column;
        gap: 10px;
        flex: 0 0 auto;
        order: 1;
    }
    
    .zeji-header-left .zeji-nav-wrap {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .zeji-header-left .zeji-year-row,
    .zeji-header-left .zeji-month-row {
        flex-wrap: nowrap;
    }
    
    .zeji-header-left .zeji-header-right {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .zeji-zhi-row {
        order: 2;
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
    }
    
    .zeji-header-break {
        display: none;
    }
    
    /* 每组日柱地支两行（2 行 x 6 列），两组左右不叠压 */
    .zeji-container .zeji-zhi-chips {
        grid-template-columns: repeat(6, 1fr);
    }
    .zeji-zhi-row {
        justify-content: space-between;
        flex-wrap: nowrap;
    }
    .zeji-zhi-row .zeji-zhi-filter,
    .zeji-zhi-row .zeji-zhi-filter-2 {
        flex: 0 1 calc(50% - 6px);
        max-width: calc(50% - 6px);
        min-width: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .zeji-header {
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        padding: 6px 10px;
    }
    
    /* 移动端：让 header-left 的子元素参与 flex 排序 */
    .zeji-header-left {
        display: contents;
    }
    
    /* 第一行：年月选择 + 回到今天（同一行）；第二行：日柱地支 */
    .zeji-header::after {
        content: '';
        flex-basis: 100%;
        width: 0;
        height: 0;
        order: 3;
    }
    
    .zeji-header-break {
        flex-basis: 100%;
        width: 0;
        height: 0;
        overflow: hidden;
        order: 5;
    }
    
    .zeji-nav-wrap {
        flex: 1 1 auto;
        min-width: 0;
        order: 1;
        flex-wrap: nowrap;
    }
    
    .zeji-nav-group {
        flex-wrap: nowrap;
    }
    
    /* 回到今天放在第一行年月选择后面，不占满行 */
    .zeji-header-right {
        flex: 0 0 auto;
        width: auto;
        justify-content: flex-end;
        margin-top: 0;
        order: 2;
    }
    
    /* 移动端隐藏“2026年3月” */
    .zeji-current-date {
        display: none;
    }
    
    /* 第二行：日柱地支 */
    .zeji-zhi-row {
        order: 4;
        flex: 0 0 auto;
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 10px;
        align-items: flex-start;
    }
    
    .zeji-zhi-row .zeji-zhi-filter {
        flex: 0 1 calc(50% - 5px);
        max-width: calc(50% - 5px);
        min-width: 0;
        align-items: center;
        justify-content: flex-start;
    }
    
    .zeji-zhi-row .zeji-zhi-filter-2 {
        flex: 0 1 calc(50% - 5px);
        max-width: calc(50% - 5px);
        min-width: 0;
        align-items: center;
        justify-content: flex-end;
    }
    
    .zeji-today-btn {
        font-size: 12px;
        padding: 4px 10px;
        height: 30px;
        min-height: 30px;
        display: inline-flex;
        align-items: center;
        box-sizing: border-box;
    }
    
    .zeji-header .zeji-nav-btn {
        width: 30px;
        height: 30px;
        min-height: 30px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .zeji-header .zeji-today-btn {
        min-height: 30px;
        height: 30px;
    }
    
    .zeji-year-select,
    .zeji-month-select {
        font-size: 13px;
        padding: 4px 6px;
        min-width: 52px;
        height: 30px;
        min-height: 30px;
        flex-shrink: 0;
        box-sizing: border-box;
    }
    
    .zeji-yiji-section {
        grid-template-columns: 1fr;
    }
    
    .zeji-date-header {
        grid-template-columns: 60px 1fr;
    }
    
    .zeji-day {
        min-height: 50px;
        padding: 4px 2px;
    }
    
    .zeji-day-number {
        font-size: 14px;
    }
    
    .zeji-day-lunar {
        font-size: 10px;
    }
}

/* ==================== 响应式与安全区域（全局） ==================== */
:root {
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
    --nav-height: 80px;
    --zeji-special-orange-bg: #b8ec83;
    --zeji-special-gray-bg: #4312a5;
    --zeji-zhi-color-1: #9a80d6;
    --zeji-zhi-color-2: #2efcff;
}

body {
    padding-bottom: calc(var(--nav-height) + var(--safe-area-bottom));
}

.bottom-nav {
    padding-bottom: max(10px, var(--safe-area-bottom));
    padding-left: var(--safe-area-left);
    padding-right: var(--safe-area-right);
}

/* 触控目标最小 44px（无障碍与移动端） */
@media (max-width: 768px) {
    .nav-item {
        min-height: 44px;
        padding: 10px 12px;
    }
    .auth-btn,
    .zeji-nav-btn,
    .zeji-today-btn,
    .zeji-zhi-chip {
        min-height: 44px;
    }
    .zeji-zhi-chip {
        width: 32px;
        height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* 超小屏（≤360px） */
@media (max-width: 360px) {
    .auth-container {
        margin: 10px;
        padding: 20px;
    }
    .zeji-nav-group {
        justify-content: flex-start;
    }
    .zeji-header-right {
        margin-top: 8px;
    }
    .zeji-year-select,
    .zeji-month-select {
        min-width: 48px;
    }
    .advice-tabs {
        gap: 4px;
    }
    .advice-tab {
        font-size: 12px;
        padding: 6px 8px;
    }
}

/* 平板与桌面（≥1024px） */
@media (min-width: 1024px) {
    .bazi-container {
        max-width: 720px;
    }
    .zeji-container {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
    .admin-container {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* 弹窗在小屏下可滚动、不溢出 */
.modal-content {
    max-height: min(90vh, 85vh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 图片懒加载占位，避免布局偏移 */
img[loading="lazy"] {
    min-height: 1px;
    background: #f0f0f0;
}
  