/* ====== 命运分析页面森林主题视觉风格（低纯度绿+毛玻璃+纯度略降） ====== */

/* 格子点击说明样式 - 浮动在导航栏下方 */
.gui-click-hint {
    position: fixed;
    top: 60px; /* 紧贴导航栏下方 */
    left: 0;
    right: 0;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 4px 0;
    background: rgba(26, 26, 26, 0);
    z-index: 10; 
    pointer-events: none; /* 不影响用户交互 */
}

/* 支持白天模式 */
[data-theme="light"] .gui-click-hint {
    color: rgba(0, 0, 0, 0.6);
    background: rgba(255, 255, 255, 0);
}

:root {
    /* Art Deco 主题色 - 金色和深蓝黑色（与主页完全统一） */
    --destiny-primary-gold: #d4af37;
    --destiny-secondary-gold: #c9a961;
    --destiny-dark-gold: #b8941f;
    --destiny-light-gold: #f0e6d0;
    --destiny-bg-dark: #0f0f1a;
    --destiny-bg-secondary: rgba(26, 26, 46, 0.6);
    --destiny-bg-tertiary: rgba(26, 26, 46, 0.8);
    --destiny-text-primary: #f0e6d0;
    --destiny-text-secondary: rgba(240, 230, 208, 0.8);
    --destiny-glass-bg: rgba(26, 26, 46, 0.6);
    --destiny-glass-border: rgba(212, 175, 55, 0.3);
    --destiny-shadow-lg: 0 8px 24px rgba(212, 175, 55, 0.15);
    --destiny-shadow-md: 0 4px 12px rgba(212, 175, 55, 0.1);
    --destiny-border-radius-lg: 0px; /* Art Deco 直角 */
    --destiny-border-radius-md: 0px;
    --destiny-border-radius-sm: 0px;
    --destiny-light-green: #d4af37; /* 统一为金色 */
}

body {
    font-family: serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: transparent; /* 改为透明，让 DHL_common.css 的光斑背景显示 */
    color: var(--destiny-text-primary);
    min-height: 100vh;
}



/* HOME跳转按钮样式 */
.home-redirect-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 6px 6px;
    background: var(--destiny-glass-bg);
    color: var(--destiny-primary-gold);
    border: 1.5px solid var(--destiny-glass-border);
    border-radius: var(--destiny-border-radius-md);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--destiny-shadow-md);
    backdrop-filter: blur(10px);
}

.home-redirect-btn:hover {
    background: rgba(26, 26, 46, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    border-color: var(--destiny-primary-gold);
}

.home-redirect-btn:active {
    transform: translateY(0);
    box-shadow: var(--destiny-shadow-md);
}

.home-redirect-btn .btn-icon {
    font-size: 1.1rem;
}

.home-redirect-btn .btn-text {
    flex: 1;
    text-align: center;
}

/* 顶部导航 - Art Deco 风格 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    max-width: 768px;
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 2px solid var(--destiny-primary-gold);
    box-shadow: var(--destiny-shadow-lg);
    background: var(--destiny-glass-bg);
}

.logo {
    font-family: serif;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 3px;
    color: var(--destiny-primary-gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    text-transform: uppercase;
}

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

.btn-nav, .home-redirect-btn, .btn-outline, .btn-primary {
    padding: 8px 16px;
    border: 2px solid var(--destiny-glass-border);
    border-radius: var(--destiny-border-radius-md);
    cursor: pointer;
    font-family: serif;
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 400ms ease-in-out;
    background: transparent;
    color: var(--destiny-primary-gold);
    box-shadow: var(--destiny-shadow-md);
    backdrop-filter: blur(6px);
    text-transform: uppercase;
}

.btn-nav:hover, .btn-outline:hover, .btn-primary:hover, .home-redirect-btn:hover {
    background: var(--destiny-primary-gold);
    color: var(--destiny-bg-dark);
    border-color: var(--destiny-primary-gold);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.btn-primary, .btn-nav.active {
    background: var(--destiny-primary-gold);
    color: var(--destiny-bg-dark);
    border-color: var(--destiny-primary-gold);
}

.btn-outline, .btn-glass {
    background: transparent;
    color: var(--destiny-primary-gold);
    border: 2px solid var(--destiny-glass-border);
}

.btn-outline:hover, .btn-glass:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--destiny-primary-gold);
    border-color: var(--destiny-primary-gold);
}

/* 输入框样式 - Art Deco 风格 */
.input, select.input {
    background: rgba(26, 26, 46, 0.4);
    border: 2px solid var(--destiny-glass-border);
    color: var(--destiny-text-primary);
    border-radius: var(--destiny-border-radius-sm);
    padding: 10px 14px;
    font-family: serif;
    transition: all 400ms ease-in-out;
    backdrop-filter: blur(4px);
}

.input:focus, select.input:focus {
    border-color: var(--destiny-primary-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
    outline: none;
    background: rgba(26, 26, 46, 0.6);
}

/* 主容器 */
.main-container {
    max-width: 768px;
    margin: 0 auto;
    padding: 70px 10px 10px;
    min-height: 100vh;
    background: transparent;
}

/* 内容框 - Art Deco 风格 */
.content-box {
    border: 2px solid var(--destiny-glass-border);
    border-radius: var(--destiny-border-radius-md);
    backdrop-filter: blur(10px);
    background: var(--destiny-glass-bg);
    padding: 5px;
    margin-bottom: 5px;
    box-shadow: var(--destiny-shadow-md);
    position: relative;
}

/* Art Deco 装饰角 */
.content-box::before,
.content-box::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--destiny-primary-gold);
    opacity: 0.3;
}

.content-box::before {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
}

.content-box::after {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
}


/* 页面标题和导航按钮容器 */
.page-title-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--destiny-primary-gold);
    position: relative;
}

/* 页面标题 */
.page-title {
    text-align: center;
    color: var(--destiny-primary-gold);
    font-family: serif;
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 3px;
    flex: 1;
    margin: 0;
    padding: 0;
    border: none;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* 导航箭头按钮 */
.nav-arrow-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.15) 0%, rgba(52, 199, 89, 0.1) 100%);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 5px;
    color: #FFD700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    user-select: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.nav-arrow-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-arrow-btn:hover::before {
    left: 100%;
}

.nav-arrow-btn:hover {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.25) 0%, rgba(52, 199, 89, 0.2) 100%);
    border-color: rgba(255, 215, 0, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.2);
    color: #FFF;
}

.nav-arrow-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.15);
}

/* 箭头图标 */
.nav-arrow-btn .arrow-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.nav-arrow-left:hover .arrow-icon {
    transform: translateX(-3px);
}

.nav-arrow-right:hover .arrow-icon {
    transform: translateX(3px);
}

/* 导航文字 */
.nav-arrow-btn .nav-text {
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

/* 左右按钮特殊样式 */
.nav-arrow-left {
    margin-right: 20px;
}

.nav-arrow-right {
    margin-left: 20px;
}

/* 八字四柱显示区域 - 固定在顶部 */
.bazi-header {
    background: linear-gradient(135deg, rgba(165, 204, 245, 0.15) 0%, rgba(165, 198, 173, 0.1) 100%) !important;
    border: 1px solid rgba(183, 217, 253, 0.321) !important;
    border-radius: 5px;
    padding: 5px;
    margin-bottom: 5px;
    position: relative;
    box-shadow: 
        0 8px 12px rgba(0, 122, 255, 0.25) !important;
}

.bazi-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(66, 91, 117, 0.466) 50%, transparent 100%);
    border-radius: 5px 5px 0 0;
}

.bazi-header-title {
    position: absolute;
    left: 10px;
    top: 1px;
    cursor: pointer;
    color: #FFD700;
    font-size: 1.1rem;
    user-select: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.bazi-header-title:hover {
    color: #FFF;
}

.bazi-display {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    transition: all 0.3s ease;
    transform: translateY(-5px);
    position: relative;
}

.bazi-display.collapsed {
    max-height: 20px;
    overflow: hidden;
    opacity: 0;
    padding: 0;
    margin: 0;
}

.bazi-header.collapsed {
    min-height: 10px;
}

.bazi-column {
    text-align: center;
}

.bazi-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.bazi-gan {
    background: rgba(121, 111, 54, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 5px;
    padding: 8px;
    font-size: 1.1rem;
    color: #FFD700;
    margin-bottom: 4px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.bazi-zhi {
    background: rgba(53, 110, 133, 0.1);
    border: 1px solid rgba(135, 206, 235, 0.3);
    border-radius: 5px;
    padding: 6px 4px;
    font-size: 1.1rem;
    color: #87CEEB;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

/* 地支藏干样式 */
.zhi-hidden-gan {
    font-size: 0.73rem; /* 从0.66rem再增加10%到0.73rem */
    color: rgba(255, 255, 255, 0.9);
    margin-top: 3px;
    text-align: center;
    line-height: 1;
    white-space: normal;
    overflow: visible;
    word-break: keep-all;
    min-height: 20px;
    max-height: 30px;
}

/* 男女格子的特殊样式 */
.male-gan {
    background: rgba(144, 224, 238, 0.2);  /* 浅绿色 */
    border-color: rgba(101, 166, 240, 0.5);
}

/* 确保白色闪烁效果优先级更高 */
.male-gan.active-flash {
    background: rgba(255, 255, 255, 0.3) ;
    border-color: rgba(255, 255, 255, 0.8) ;
}

.female-gan {
    background: rgba(255, 182, 193, 0.2) ;  /* 浅粉色 */
    border-color: rgba(255, 182, 193, 0.5) ;
}



.male-gan:hover {
    border-color: rgba(144, 238, 144, 0.8) ;
    background: rgba(144, 238, 144, 0.3) ;
}

.female-gan:hover {
    border-color: rgba(255, 182, 193, 0.8) ;
    background: rgba(255, 182, 193, 0.3) ;
}



/* 悬停效果 - 八字四柱 */
.bazi-gan:hover, .bazi-zhi:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

.bazi-gan:hover {
    border-color: rgba(255, 215, 0, 0.8);
    background: rgba(255, 215, 0, 0.3);
}

.bazi-zhi:hover {
    border-color: rgba(135, 206, 235, 0.8);
    background: rgba(135, 206, 235, 0.3);
}

/* 大运显示区域 */
.dayun-header {
    background: linear-gradient(135deg, rgba(146, 176, 154, 0.15) 0%, rgba(166, 190, 194, 0.1) 100%) !important;
    border: 1px solid rgba(52, 199, 89, 0.3) !important;
    border-radius: 5px;
    padding: 5px;
    margin-bottom: 5px;
    position: relative;
    box-shadow: 
        0 4px 12px rgba(52, 199, 89, 0.15) !important; 
}

.dayun-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(52, 199, 89, 0.6) 50%, transparent 100%);
    border-radius: 5px 5px 0 0;
}

.dayun-title {
    position: absolute;
    left: 8px;
    top: 20px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: #87CEEB;
    font-size: 1rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dayun-header-title {
    position: absolute;
    left: 12px;
    top: 1px;
    cursor: pointer;
    color: #87CEEB;
    font-size: 1.1rem;
    user-select: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.dayun-header-title:hover {
    color: #FFF;
}

.dayun-display {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    margin-left: 40px;
    transition: all 0.3s ease;
}

.dayun-display.collapsed {
    max-height: 20px;
    overflow: hidden;
    opacity: 0;
    padding: 0;
    margin: 0;
}

.dayun-header.collapsed {
    min-height: 10px;
}

.dayun-item {
    text-align: center;
    background: rgba(135, 206, 235, 0.1);
    border: 1px solid rgba(135, 206, 235, 0.3);
    border-radius: 6px;
    padding: 6px 4px;
    font-size: 0.8rem;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 悬停效果 - 大运 */
.dayun-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(135, 206, 235, 0.4);
    border-color: rgba(135, 206, 235, 0.6);
    background: rgba(135, 206, 235, 0.2);
}

.dayun-age {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    margin-bottom: 1px;
}

.dayun-ganzhi {
    color: #87CEEB;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 1.2rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0;
    line-height: 0.8;
}

.dayun-year {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.72rem; /* 从0.6rem增加20%到0.72rem */
    margin-top: 1px;
}

/* 流年显示区域 - 完全仿照大运样式 */
.liunian-header {
    background: linear-gradient(135deg, rgba(195, 204, 213, 0.15) 0%, rgba(212, 243, 222, 0.1) 100%) !important;
    border: 1px solid rgba(116, 252, 168, 0.3) !important;
    border-radius: 5px;
    padding: 5px;
    margin-bottom: 5px;
    position: relative;
    box-shadow: 
        0 4px 12px rgba(175, 82, 222, 0.15) !important; 
}

.liunian-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(175, 82, 222, 0.6) 50%, transparent 100%);
    border-radius: 5px 5px 0 0;
}

.liunian-title {
    position: absolute;
    left: 8px;
    top: 20px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: #FFD700;
    font-size: 1rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.liunian-header-title {
    position: absolute;
    left: 12px;
    top: 1px;
    cursor: pointer;
    color: #FFD700;
    font-size: 1.1rem;
    user-select: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.liunian-header-title:hover {
    color: #FFF;
}

.liunian-display {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    margin-left: 40px;
    transition: all 0.3s ease;
}

.liunian-display.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0;
    margin: 0;
}

.liunian-header.collapsed {
    min-height: 32px;
}

.liunian-header.collapsed .liunian-title {
    display: none;
}

.liunian-item {
    text-align: center;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    padding: 6px 4px;
    font-size: 0.8rem;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 简化的悬停效果 - 流年 */
.liunian-item:hover {
    opacity: 0.8;
}

.liunian-age {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    margin-bottom: 1px;
}

.liunian-ganzhi {
    color: #FFD700;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 1.2rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0;
    line-height: 0.8;
}

.liunian-year {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.72rem;
    margin-top: 1px;
}

/* 流月显示区域 - 浅蓝色主题 */
.liuyue-header {
    background: linear-gradient(135deg, rgba(117, 130, 131, 0.15) 0%, rgba(228, 244, 231, 0.1) 100%) !important;
    border: 1px solid rgba(255, 149, 0, 0.3) !important;
    border-radius: 5px;
    padding: 5px;
    margin-bottom: 5px;
    position: relative;
    box-shadow: 
        0 4px 12px rgba(255, 149, 0, 0.15) !important;
}

.liuyue-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 167, 43, 0.6) 50%, transparent 100%);
    border-radius: 5px 5px 0 0;
}

.liuyue-title {
    position: absolute;
    left: 8px;
    top: 20px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: #ADD8E6;
    font-size: 1rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.liuyue-header-title {
    position: absolute;
    left: 12px;
    top: 1px;
    cursor: pointer;
    color: #ADD8E6;
    font-size: 1.1rem;
    user-select: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.liuyue-header-title:hover {
    color: #FFF;
}

.liuyue-display {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
    margin-left: 40px;
    transition: all 0.3s ease;
}

.liuyue-display.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0;
    margin: 0;
}

.liuyue-header.collapsed {
    min-height: 32px;
}

.liuyue-header.collapsed .liuyue-title {
    display: none;
}

.liuyue-item {
    text-align: center;
    background: rgba(173, 216, 230, 0.1);
    border: 1px solid rgba(173, 216, 230, 0.3);
    border-radius: 6px;
    padding: 4px 2px;
    font-size: 0.75rem;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 简化的悬停效果 - 流月 */
.liuyue-item:hover {
    opacity: 0.8;
}

.liuyue-month {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.65rem;
    margin-bottom: 1px;
}

.liuyue-ganzhi {
    color: #ADD8E6;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 1.1rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0;
    line-height: 0.8;
}

.liuyue-year {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.65rem;
    margin-top: 1px;
}

/* 全局折叠按钮 */
.global-collapse-btn {
    position: absolute;
    right: 12px;
    top: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.collapse-icon {
    color: #87CEEB;
    font-size: 1.21rem; /* 比左边的1.1rem大10% */
    user-select: none;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px rgba(135, 206, 235, 0.6),
                 0 0 15px rgba(135, 206, 235, 0.4),
                 0 0 20px rgba(135, 206, 235, 0.3);
    filter: drop-shadow(2px 2px 4px rgba(135, 206, 235, 0.3));
    transform: perspective(10px) rotateX(5deg) rotateY(-5deg);
}

.global-collapse-btn:hover .collapse-icon {
    color: #FFF;
    transform: perspective(15px) rotateX(10deg) rotateY(-10deg) scale(1.1);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.8),
                 0 0 20px rgba(135, 206, 235, 0.6),
                 0 0 30px rgba(135, 206, 235, 0.4);
}

/* 流月关系高亮效果 - 移除闪烁动画，保留静态高亮 */
.liuyue-item.liuyue-gan-wuhe-highlight {
    background: rgba(0, 255, 76, 0.3);
    border-color: rgba(11, 255, 11, 0.8);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
}

.liuyue-item.liuyue-gan-chong-highlight {
    background: rgba(175, 16, 16, 0.3);
    border-color: rgba(223, 68, 68, 0.8);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}

.liuyue-item.liuyue-zhi-good-highlight {
    background: rgba(0, 255, 115, 0.3);
    border-color: rgba(24, 202, 68, 0.8);
    box-shadow: 0 0 15px rgba(0, 255, 85, 0.4);
}

.liuyue-item.liuyue-zhi-bad-highlight {
    background: rgba(175, 16, 16, 0.3);
    border-color: rgba(238, 105, 105, 0.8);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}

.liuyue-item.liuyue-mixed-highlight {
    background: rgba(138, 43, 226, 0.3);
    border-color: rgba(107, 44, 165, 0.8);
    box-shadow: 0 0 15px rgba(96, 32, 155, 0.4);
}

.liuyue-item.liuyue-no-relation-highlight {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* 天干提示框 - 显示在上方 */
.gan-relation-tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 177, 200, 0.5);
    border: 1px solid rgba(0, 255, 0, 0.6);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

/* 五合关系提示框 - 绿色 */
.gan-relation-tooltip.wuhe {
    background: rgba(0, 177, 200, 0.5);
    border: 1px solid rgba(0, 255, 0, 0.6);
    color: white;
}

/* 干冲关系提示框 - 红色 */
.gan-relation-tooltip.ganchong {
    background: rgba(220, 20, 60, 0.5) !important;
    border: 1px solid rgba(255, 0, 0, 0.6) !important;
    color: white;
}

/* 地支提示框 - 显示在下方 */
.zhi-relation-tooltip {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

/* 地支合关系提示框 - 绿色 */
.zhi-relation-tooltip.good {
    background: rgba(0, 200, 90, 0.5);
    border: 1px solid rgba(0, 255, 0, 0.6);
    color: white;
}

/* 地支冲刑害破关系提示框 - 红色 */
.zhi-relation-tooltip.bad {
    background: rgba(220, 20, 60, 0.5);
    border: 1px solid rgba(255, 0, 0, 0.6);
    color: white;
}

/* 天干提示框箭头 - 向下 */
.gan-relation-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 200, 0, 0.5);
}

.gan-relation-tooltip.wuhe::after {
    border-top: 6px solid rgba(0, 200, 0, 0.5);
}

.gan-relation-tooltip.ganchong::after {
    border-top: 6px solid rgba(220, 20, 60, 0.5) !important;
}

/* 地支提示框箭头 - 向上 */
.zhi-relation-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
}

.zhi-relation-tooltip.good::before {
    border-bottom: 6px solid rgba(0, 200, 0, 0.5);
}

.zhi-relation-tooltip.bad::before {
    border-bottom: 6px solid rgba(220, 20, 60, 0.5);
}

/* 八字地支提示词偏移样式 - 避免与大运天干提示词重叠 */
.zhi-relation-tooltip.offset-to-left-90 {
    left: 10%; /* 移动到格子左端90%位置 */
    transform: translateX(-10%);
}

.zhi-relation-tooltip.offset-to-right-90 {
    left: 90%; /* 移动到格子右端90%位置 */
    transform: translateX(-90%);
}

.relation-tooltip.show {
    opacity: 1;
}

.gan-relation-tooltip.show {
    opacity: 1;
}

.zhi-relation-tooltip.show {
    opacity: 1;
}

.relation-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(0, 0, 0, 0.9);
}

/* 大运关系提示框 - 基础样式 */
.dayun-relation-tooltip {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 200, 157, 0.5);
    border: 1px solid rgba(0, 255, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 201;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);

}

/* 大运天干关系提示框 - 显示在上方 */
.dayun-gan-relation-tooltip {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 200, 123, 0.5);
    border: 1px solid rgba(0, 255, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 201;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);

}

/* 大运天干提示框偏移样式 - 避免与八字地支提示词重叠 */
.dayun-gan-relation-tooltip.offset-left {
    left: 25%; /* 向左偏移 */
    transform: translateX(-25%);
}

.dayun-gan-relation-tooltip.offset-right {
    left: 75%; /* 向右偏移 */
    transform: translateX(-75%);
}

/* 新的90%位置偏移样式 */
.dayun-gan-relation-tooltip.offset-to-left-90 {
    left: 10%; /* 移动到格子左端90%位置 */
    transform: translateX(-10%);
}

.dayun-gan-relation-tooltip.offset-to-right-90 {
    left: 90%; /* 移动到格子右端90%位置 */
    transform: translateX(-90%);
}

/* 大运地支关系提示框 - 显示在下方 */
.dayun-zhi-relation-tooltip {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 200, 0, 0.5);
    border: 1px solid rgba(0, 255, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 201;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);

}

/* 大运提示框颜色变体 - 吉利关系（绿色） */
.dayun-relation-tooltip.wuhe,
.dayun-gan-relation-tooltip.wuhe,
.dayun-zhi-relation-tooltip.good {
    background: rgba(0, 200, 150, 0.5) !important;
    border: 1px solid rgba(0, 255, 0, 0.6) !important;
}

/* 大运提示框颜色变体 - 不利关系（红色） */
.dayun-relation-tooltip.ganchong,
.dayun-relation-tooltip.bad,
.dayun-gan-relation-tooltip.ganchong,
.dayun-zhi-relation-tooltip.bad {
    background: rgba(220, 20, 60, 0.5) !important;
    border: 1px solid rgba(255, 0, 0, 0.6) !important;
}

/* 大运提示框颜色变体 - 混合关系（紫色） */
.dayun-relation-tooltip.mixed {
    background: rgba(138, 43, 226, 0.5) !important;
    border: 1px solid rgba(138, 43, 226, 0.6) !important;
}

/* 显示状态 - 只进行水平偏移，不改变垂直位置 */
.dayun-relation-tooltip.show,
.dayun-gan-relation-tooltip.show {
    opacity: 1;
    transform: translateX(-50%);
}

/* 偏移状态下的显示效果 - 只进行水平偏移 */
.dayun-gan-relation-tooltip.offset-left.show {
    opacity: 1;
    transform: translateX(-25%);
}

.dayun-gan-relation-tooltip.offset-right.show {
    opacity: 1;
    transform: translateX(-75%);
}

/* 90%偏移状态下的显示效果 - 只进行水平偏移 */
.dayun-gan-relation-tooltip.offset-to-left-90.show {
    opacity: 1;
    transform: translateX(-10%);
}

.dayun-gan-relation-tooltip.offset-to-right-90.show {
    opacity: 1;
    transform: translateX(-90%);
}

.zhi-relation-tooltip.offset-to-left-90.show {
    opacity: 1;
    transform: translateX(-10%);
}

.zhi-relation-tooltip.offset-to-right-90.show {
    opacity: 1;
    transform: translateX(-90%);
}

.dayun-zhi-relation-tooltip.show {
    opacity: 1;
    transform: translateX(-50%);
}

/* 箭头 - 天干提示框（向下箭头） */
.dayun-relation-tooltip::after,
.dayun-gan-relation-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 200, 0, 0.5);
}

.dayun-gan-relation-tooltip.wuhe::after {
    border-top-color: rgba(0, 200, 0, 0.5);
}

.dayun-gan-relation-tooltip.ganchong::after {
    border-top-color: rgba(220, 20, 60, 0.5);
}

/* 箭头 - 地支提示框（向上箭头） */
.dayun-zhi-relation-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(0, 200, 0, 0.5);
}

.dayun-zhi-relation-tooltip.good::before {
    border-bottom-color: rgba(0, 200, 0, 0.5);
}

.dayun-zhi-relation-tooltip.bad::before {
    border-bottom-color: rgba(220, 20, 60, 0.5);
}

/* 八字显示区域整体向上移动少许，避免与大运提示词重叠 */
.bazi-display {
    transform: translateY(-5px);
}

/* 流年关系提示框 - 显示在下方 */
.liunian-relation-tooltip {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 191, 255, 0.5);
    color: white;
    padding: 4px 8px;
    border-radius: var(--destiny-border-radius-sm);
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 201;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1.5px solid rgba(0, 191, 255, 0.6);
    box-shadow: var(--destiny-shadow-md);
    backdrop-filter: blur(10px);
}

.liunian-relation-tooltip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(3px);
}

.liunian-relation-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(0, 191, 255, 0.5);
}

/* 激活状态的大运格子特殊样式 */
.dayun-item.active-relation {
    background: rgba(138, 43, 226, 0.3);
    border-color: rgba(138, 43, 226, 0.8);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.5);
    transform: scale(1.03);
    transition: all 0.3s ease;
}



/* 增强关系分析时的八字格子效果 */
.bazi-gan.relation-active, .bazi-zhi.relation-active {
    z-index: 10;
    position: relative;
}

/* 特殊关系类型的高亮效果 - 改为静态高亮 */
.gan-wuhe-highlight {
    background: rgba(0, 255, 76, 0.3) !important;
    border-color: rgba(11, 255, 11, 0.8) !important;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4) !important;
}

.gan-chong-highlight {
    background: rgba(175, 16, 16, 0.3) !important;
    border-color: rgba(223, 68, 68, 0.8) !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4) !important;
}

.zhi-canggan-highlight {
    background: rgba(0, 255, 115, 0.3) !important;
    border-color: rgba(24, 202, 68, 0.8) !important;
    box-shadow: 0 0 15px rgba(0, 255, 85, 0.4) !important;
}

/* 响应式设计 - 在小屏幕上调整提示框 */
@media (max-width: 768px) {
    .relation-tooltip, .dayun-relation-tooltip, .liunian-relation-tooltip,
    .gan-relation-tooltip, .zhi-relation-tooltip, 
    .dayun-gan-relation-tooltip, .dayun-zhi-relation-tooltip {
        font-size: 0.65rem;
        padding: 3px 6px;
        max-width: none; /* 移除最大宽度限制 */
        white-space: nowrap; /* 强制单行显示 */
        word-wrap: normal; /* 禁止自动换行 */
        overflow: hidden; /* 隐藏溢出内容 */
        text-overflow: ellipsis; /* 用省略号表示溢出 */
    }
    
    /* 修改垂直位置，让提示词更贴近格子 */
    .gan-relation-tooltip {
        top: -25px; /* 从-40px改为-25px */
    }
    
    .zhi-relation-tooltip {
        bottom: -25px; /* 从-40px改为-25px */
    }
    
    .dayun-relation-tooltip, .dayun-gan-relation-tooltip {
        top: -25px; /* 从-50px改为-25px */
    }
    
    .liunian-relation-tooltip, .dayun-zhi-relation-tooltip {
        bottom: -25px; /* 从-60px改为-25px */
    }
    
    /* 手机端偏移调整 - 更大的偏移量 */
    .gan-relation-tooltip.offset-to-left-90,
    .zhi-relation-tooltip.offset-to-left-90,
    .dayun-gan-relation-tooltip.offset-to-left-90 {
        left: 5%; /* 手机端向左偏移更多 */
        transform: translateX(-5%);
    }
    
    .gan-relation-tooltip.offset-to-right-90,
    .zhi-relation-tooltip.offset-to-right-90,
    .dayun-gan-relation-tooltip.offset-to-right-90 {
        left: 95%; /* 手机端向右偏移更多 */
        transform: translateX(-95%);
    }
    
    /* 手机端显示状态调整 - 只进行水平偏移，不改变垂直位置 */
    .gan-relation-tooltip.offset-to-left-90.show,
    .zhi-relation-tooltip.offset-to-left-90.show {
        transform: translateX(-5%);
    }
    
    .gan-relation-tooltip.offset-to-right-90.show,
    .zhi-relation-tooltip.offset-to-right-90.show {
        transform: translateX(-95%);
    }
    
    .dayun-gan-relation-tooltip.offset-to-left-90.show {
        transform: translateX(-5%);
    }
    
    .dayun-gan-relation-tooltip.offset-to-right-90.show {
        transform: translateX(-95%);
    }
}

@media (max-width: 480px) {
    .relation-tooltip, .dayun-relation-tooltip, .liunian-relation-tooltip,
    .gan-relation-tooltip, .zhi-relation-tooltip, 
    .dayun-gan-relation-tooltip, .dayun-zhi-relation-tooltip {
        font-size: 0.6rem;
        padding: 2px 4px;
        max-width: none;
        white-space: nowrap;
        word-wrap: normal;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 修改垂直位置，让提示词更贴近格子 */
    .gan-relation-tooltip {
        top: -22px; /* 从-45px改为-25px */
    }
    
    .zhi-relation-tooltip {
        bottom: -22px; /* 从-45px改为-25px */
    }
    
    .dayun-relation-tooltip, .dayun-gan-relation-tooltip {
        top: -22px; /* 从-45px改为-25px */
    }
    
    .liunian-relation-tooltip, .dayun-zhi-relation-tooltip {
        bottom: -22px; /* 从-55px改为-25px */
    }
    
    .page-nav {
        gap: 2px;
        padding: 0;
    }
    
    .page-btn {
        padding: 5px 6px;
        font-size: 0.7rem;
        border-radius: 5px;
        flex: 1;
        min-width: 0;
    }

    .info-item {
        padding: 8px 10px;
        margin: 4px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .info-label {
        font-size: 0.8rem;
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .info-value {
        font-size: 0.8rem;
        text-align: left;
        max-width: 100%;
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .collapsible-inner,
    .analysis-text,
    .info-item .info-value,
    .info-item .info-label {
        font-size: 0.8rem;
        line-height: 1.4;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .info-item .info-value {
        max-width: none;
        white-space: normal;
        text-overflow: initial;
        overflow: visible;
    }
    
    .classic-options {
        grid-template-columns: repeat(4, 2fr);
        gap: 4px;
    }
    
    .classic-option {
        font-size: 0.7rem;
        padding: 4px 6px;
    }
}

/* 超小屏幕优化 - 320px以下 */
@media (max-width: 320px) {
    .relation-tooltip, .dayun-relation-tooltip, .liunian-relation-tooltip,
    .gan-relation-tooltip, .zhi-relation-tooltip, 
    .dayun-gan-relation-tooltip, .dayun-zhi-relation-tooltip {
        font-size: 0.55rem;
        padding: 1px 3px;
        border-radius: 4px;
        max-width: none;
        white-space: nowrap;
        word-wrap: normal;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 修改垂直位置，让提示词更贴近格子 */
    .gan-relation-tooltip {
        top: -25px; /* 从-40px改为-25px */
    }
    
    .zhi-relation-tooltip {
        bottom: -25px; /* 从-40px改为-25px */
    }
    
    .dayun-relation-tooltip, .dayun-gan-relation-tooltip {
        top: -25px; /* 从-40px改为-25px */
    }
    
    .liunian-relation-tooltip, .dayun-zhi-relation-tooltip {
        bottom: -25px; /* 从-50px改为-25px */
    }
    
    .gan-relation-tooltip.offset-to-left-90,
    .zhi-relation-tooltip.offset-to-left-90,
    .dayun-gan-relation-tooltip.offset-to-left-90 {
        left: 1%;
        transform: translateX(-1%);
    }
    
    .gan-relation-tooltip.offset-to-right-90,
    .zhi-relation-tooltip.offset-to-right-90,
    .dayun-gan-relation-tooltip.offset-to-right-90 {
        left: 99%;
        transform: translateX(-99%);
    }
    
    .gan-relation-tooltip.offset-to-left-90.show,
    .zhi-relation-tooltip.offset-to-left-90.show {
        transform: translateX(-1%) translateY(3px);
    }
    
    .gan-relation-tooltip.offset-to-right-90.show,
    .zhi-relation-tooltip.offset-to-right-90.show {
        transform: translateX(-99%) translateY(3px);
    }
    
    .dayun-gan-relation-tooltip.offset-to-left-90.show {
        transform: translateX(-1%) translateY(-3px);
    }
    
    .dayun-gan-relation-tooltip.offset-to-right-90.show {
        transform: translateX(-99%) translateY(-3px);
    }
}

/* 分页导航 */
.page-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.page-btn {
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(110, 110, 110, 0.9) 0%, rgba(159, 159, 159, 0.9) 100%) !important;
    color: #1d1d1f !important;
    border: 2px solid rgba(134, 134, 139, 0.3) !important;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.page-btn.active {
    background: rgba(65, 102, 133, 0.3) !important;
    color: var(--destiny-text-primary) !important;
    border-color: var(--destiny-light-green) !important;
    box-shadow: 0 4px 16px rgba(34,60,44,0.3);
    transform: translateY(-1px) !important;
}

.page-btn:hover {
    background: rgba(74, 122, 91, 0.25) !important;
    border-color: var(--destiny-light-green) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(34,60,44,0.2);
}

/* 页面内容 */
.page-content {
    display: none;
}

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

/* 信息项 */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.info-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.info-value {
    color: #FFD700;

    text-align: right;
    max-width: 60%;
    word-wrap: break-word;
}

/* 典籍参阅折叠栏样式 */
.classic-collapsible {
    background: var(--destiny-glass-bg);
    border: 1.5px solid var(--destiny-glass-border);
    border-radius: var(--destiny-border-radius-md);
    margin: 15px 0;
    overflow: hidden;
}

.classic-collapsible-header {
    background: rgba(74, 122, 91, 0.15);
    border-bottom: 1.5px solid var(--destiny-glass-border);
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
}

.classic-collapsible-header:hover {
    background: rgba(74, 122, 91, 0.25);
}

.classic-collapsible-title {
    color: var(--destiny-light-green);
    font-size: 1.1rem;
}

.classic-collapsible-icon {
    color: var(--destiny-light-green);
    transition: transform 0.3s ease;
    font-size: 1.2rem;
}

.classic-collapsible.active .classic-collapsible-icon {
    transform: rotate(180deg);
}

.classic-collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(34, 60, 44, 0.1);
}

.classic-collapsible.active .classic-collapsible-content {
    max-height: none;
}

.classic-collapsible-inner {
    padding: 2px;
}

/* 大运选择器 */
.dayun-selector {
    background: var(--destiny-glass-bg);
    border: 1.5px solid var(--destiny-glass-border);
    border-radius: var(--destiny-border-radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.dayun-selector h4 {
    color: var(--destiny-light-green);
    margin: 0 0 15px 0;
    text-align: center;
}

.dayun-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.dayun-option {
    padding: 8px 12px;
    background: rgba(74, 74, 73, 0.311);
    border: 1.5px solid var(--destiny-glass-border);
    border-radius: var(--destiny-border-radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    color: var(--destiny-text-primary);
}

.dayun-option.active {
    background: rgba(126, 102, 52, 0.3);
    border-color: var(--destiny-light-green);
    color: var(--destiny-light-green);
}

.dayun-option:hover {
    background: rgba(66, 66, 66, 0.25);
}

/* 加载状态 */
.loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 20px;
}

/* 流年分析和命运总论样式 */
.year-btn {
    padding: 6px 12px;
    background: rgba(74, 122, 91, 0.25);
    color: var(--destiny-text-primary);
    border: 1.5px solid var(--destiny-glass-border);
    border-radius: var(--destiny-border-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.year-btn:hover {
    background: rgba(74, 122, 91, 0.35);
    border-color: var(--destiny-light-green);
}

.instruction-card {
    background: var(--destiny-glass-bg);
    border: 1.5px solid var(--destiny-glass-border);
    border-radius: var(--destiny-border-radius-md);
    padding: 20px;
    margin: 20px 0;
}

.analysis-card {
    background: rgba(34, 60, 44, 0.2);
    border: 1.5px solid var(--destiny-glass-border);
    border-radius: var(--destiny-border-radius-sm);
    padding: 15px;
    min-height: 200px;
}

.analysis-content {
    color: var(--destiny-text-secondary);
    line-height: 1.6;
}

.year-selector h4 {
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 10px;
}

/* 错误状态 */
.error {
    text-align: center;
    color: #ff6b6b;
    padding: 20px;
    background: rgba(255, 107, 107, 0.1);
    border: 1.5px solid rgba(255, 107, 107, 0.3);
    border-radius: var(--destiny-border-radius-sm);
    margin: 20px 0;
}

/* 典籍参阅选择器 */
.classic-selector {
    background: var(--destiny-glass-bg);
    border: 1.5px solid var(--destiny-glass-border);
    border-radius: var(--destiny-border-radius-md);
    padding: 15px;
    margin-bottom: 20px;
}

.classic-selector h4 {
    color: var(--destiny-light-green);
    margin: 0 0 15px 0;
    text-align: center;
    font-size: 1.1rem;
}

.classic-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.classic-control-btn {
    padding: 6px 12px;
    background: rgba(115, 117, 116, 0.15); 
    border: 1.5px solid var(--destiny-glass-border);
    border-radius: var(--destiny-border-radius-md);
    color: var(--destiny-text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.7rem;
}

.classic-control-btn:hover {
    background: rgba(115, 117, 116, 0.25);
    border-color: var(--destiny-light-green);
}

.classic-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 8px;
    max-width: 800px;
    margin: 0 auto;
}

.classic-option {
    padding: 6px 10px;
    background: rgba(115, 117, 116, 0.15);
    border: 1.5px solid var(--destiny-glass-border);
    border-radius: var(--destiny-border-radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    color: var(--destiny-text-primary);
}

.classic-option.active {
    background: rgba(115, 117, 116, 0.3);
    border-color: var(--destiny-light-green);
    color: var(--destiny-light-green);
}

.classic-option:hover {
    background: rgba(115, 117, 116, 0.25);
}

/* 统一子模块内容字体大小 */
.classic-collapsible-inner,
.analysis-text,
.info-item .info-value,
.info-item .info-label {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--destiny-text-secondary);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .main-container {
        padding: 60px 10px 10px;
    }
    
    .content-box, .bazi-header, .dayun-header {
        padding: 5px;
        margin-bottom: 5px;
    }
    
    .dayun-title {
        font-size: 0.9rem;
        height: 80px;
        left: 5px;
    }

    .dayun-display {
        margin-left: 30px;
    }
    
    .bazi-display {
        gap: 6px;
        grid-template-columns: repeat(5, 1fr);
    }
    
    .bazi-gan, .bazi-zhi {
        padding: 6px;
        font-size: 1rem;
    }

    .dayun-display {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }
    
    .dayun-item {
        min-height: 70px;
        padding: 4px 2px;
        font-size: 0.7rem;
    }
    
    .dayun-age {
        font-size: 0.6rem;
    }
    
    .dayun-ganzhi {
        font-size: 1rem;
    }
    
    .dayun-year {
        font-size: 0.6rem;
    }
    
    /* 流年格子移动端适配 */
    .liunian-header {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .liunian-title {
        font-size: 0.9rem;
        height: 80px;
        left: 5px;
    }

    .liunian-display {
        margin-left: 30px;
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }
    
    .liunian-item {
        min-height: 70px;
        padding: 4px 2px;
        font-size: 0.7rem;
    }
    
    .liunian-age {
        font-size: 0.6rem;
    }
    
    .liunian-ganzhi {
        font-size: 1rem;
    }
    
    .liunian-year {
        font-size: 0.6rem;
    }
    
    /* 流月移动端适配 - 双排显示 */
    .liuyue-display {
        margin-left: 30px;
        grid-template-columns: repeat(6, 1fr);
        gap: 4px;
    }
    
    .liuyue-item {
        min-height: 70px;
        padding: 4px 2px;
        font-size: 0.7rem;
    }
    
    .liuyue-month {
        font-size: 0.6rem;
    }
    
    .liuyue-ganzhi {
        font-size: 1rem;
    }
    
    .liuyue-year {
        font-size: 0.6rem;
    }
    
    .page-nav {
        gap: 4px;
        padding: 0 5px;
        justify-content: flex-start;
    }
    
    .page-btn {
        padding: 6px 8px;
        font-size: 0.75rem;
        border-radius: 15px;
        flex: 1;
        min-width: 0;
        text-align: center;
    }

    /* 移动端适配 - 姓名和起运时间字体缩小 */
    .info-item {
        padding: 10px 12px;
        margin: 6px 0;
    }
    
    .info-label {
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .info-value {
        font-size: 0.85rem;
        max-width: 65%;
    }

    .dayun-header-title {
        left: 8px;
    }

    /* 移动端字体适配 */
    .classic-collapsible-inner,
    .analysis-text,
    .info-item .info-value,
    .info-item .info-label {
        font-size: 0.85rem;
        line-height: 1.5;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .info-item .info-value {
        max-width: none;
        white-space: normal;
        text-overflow: initial;
        overflow: visible;
    }
    
    .classic-options {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 6px;
    }
    
    .classic-option {
        font-size: 0.7rem;
        padding: 5px 8px;
    }
    
    /* 流月小屏幕适配 - 双排显示 */
    .liuyue-display {
        margin-left: 40px;
        grid-template-columns: repeat(6, 1fr);
        gap: 3px;
    }
    
    .liuyue-item {
        min-height: 65px;
        padding: 3px 1px;
        font-size: 0.65rem;
    }
    
    .liuyue-month {
        font-size: 0.55rem;
    }
    
    .liuyue-ganzhi {
        font-size: 0.9rem;
    }
    
    .liuyue-year {
        font-size: 0.55rem;
    }

    /* 导航按钮移动端适配 - 强制一行显示 */
    .page-title-container {
        flex-direction: row; /* 改为水平排列 */
        justify-content: space-between;
        align-items: center;
        gap: 5px; /* 缩小间距 */
        margin-bottom: 20px;
        padding-bottom: 10px;
        white-space: nowrap; /* 防止换行 */
    }

    .nav-arrow-btn {
        flex: 0 0 auto; /* 不允许伸缩 */
        padding: 6px 8px; /* 缩小内边距 */
        font-size: 0.7rem; /* 缩小字体 */
        margin: 0;
        min-width: 0;
        max-width: none;
        white-space: nowrap;
    }
    
    .nav-arrow-btn .nav-text {
        font-size: 0.6rem; /* 缩小文字但保留显示 */
    }
    
    .nav-arrow-btn .arrow-icon {
        font-size: 1rem; /* 保持箭头大小 */
    }

    .nav-arrow-left {
        order: 1;
    }

    .page-title {
        order: 2;
        font-size: 1.2rem; /* 缩小标题字体 */
        flex: 1;
        text-align: center;
        margin: 0 10px; /* 左右留一点间距 */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-arrow-right {
        order: 3;
    }
}

@media (max-width: 480px) {
    .page-nav {
        gap: 2px;
        padding: 0;
    }
    
    .page-btn {
        padding: 5px 6px;
        font-size: 0.7rem;
        border-radius: 12px;
        flex: 1;
        min-width: 0;
    }

    .info-item {
        padding: 8px 10px;
        margin: 4px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;

    }
    
    .info-label {
        font-size: 0.8rem;
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .info-value {
        font-size: 0.8rem;
        text-align: left;
        max-width: 100%;
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .classic-collapsible-inner,
    .analysis-text,
    .info-item .info-value,
    .info-item .info-label {
        font-size: 0.8rem;
        line-height: 1.4;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .info-item .info-value {
        max-width: none;
        white-space: normal;
        text-overflow: initial;
        overflow: visible;
    }
    
    .classic-options {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 4px;
    }
    
    .classic-option {
        font-size: 0.75rem;
        padding: 4px 6px;
    }

    /* 更小屏幕的适配 */
    .page-title-container {
        gap: 3px;
        margin-bottom: 15px;
        padding-bottom: 8px;
    }

    .nav-arrow-btn {
        padding: 4px 6px;
        font-size: 0.6rem;
    }
    
    .nav-arrow-btn .arrow-icon {
        font-size: 0.9rem;
    }

    .page-title {
        font-size: 1rem;
        margin: 0 8px;
    }
}

/* 极小屏幕适配（320px以下） */
@media (max-width: 320px) {
    .page-title-container {
        gap: 2px;
        margin-bottom: 12px;
        padding-bottom: 6px;
    }

    .nav-arrow-btn {
        padding: 3px 4px;
        font-size: 0.55rem;
    }
    
    .nav-arrow-btn .arrow-icon {
        font-size: 0.8rem;
    }

    .page-title {
        font-size: 0.9rem;
        margin: 0 6px;
    }
}

/* 分析结果样式 */
.analysis-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.analysis-result {
    background: var(--destiny-glass-bg);
    border: 1.5px solid var(--destiny-glass-border);
    border-radius: var(--destiny-border-radius-md);
    backdrop-filter: blur(8px);
    padding: 20px;
    margin: 10px 0;
    box-shadow: var(--destiny-shadow-md);
}

.analysis-header {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.analysis-score {
    display: flex;
    align-items: center;
    gap: 20px;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--destiny-primary-green), var(--destiny-secondary-green));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--destiny-text-primary);
    box-shadow: var(--destiny-shadow-md);
    border: 1.5px solid var(--destiny-glass-border);
}

.score-number {
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
}

.score-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

.confidence-info {
    text-align: center;
}

.confidence-label {
    display: block;
    font-size: 0.9rem;
    color: var(--destiny-text-secondary);
    margin-bottom: 5px;
}

.confidence-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--destiny-light-green);
}

.analysis-tags {
    margin-bottom: 20px;
}

.analysis-tags h4 {
    margin: 0 0 10px 0;
    color: var(--destiny-light-green);
    font-size: 1.1rem;
}

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

.analysis-tag {
    background: rgba(74, 122, 91, 0.25);
    color: var(--destiny-light-green);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1.5px solid var(--destiny-glass-border);
    backdrop-filter: blur(4px);
}

.analysis-interpretation {
    margin-bottom: 20px;
}

.analysis-interpretation h4 {
    margin: 0 0 10px 0;
    color: var(--destiny-light-green);
    font-size: 1.1rem;
}

.interpretation-content {
    background: rgba(34, 60, 44, 0.2);
    padding: 15px;
    border-radius: var(--destiny-border-radius-sm);
    line-height: 1.6;
    color: var(--destiny-text-secondary);
    border-left: 4px solid var(--destiny-light-green);
}

.analysis-footer {
    border-top: 1.5px solid var(--destiny-glass-border);
    padding-top: 15px;
}

.analysis-note {
    font-size: 0.85rem;
    color: var(--destiny-text-secondary);
    margin: 10px 0 0 0;
    font-style: italic;
    opacity: 0.8;
}

.analysis-error {
    text-align: center;
    padding: 30px 20px;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border: 1.5px solid rgba(255, 107, 107, 0.3);
    border-radius: var(--destiny-border-radius-sm);
}

.error-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.retry-btn {
    background: var(--destiny-primary-green);
    color: var(--destiny-text-primary);
    border: 1.5px solid var(--destiny-glass-border);
    padding: 8px 16px;
    border-radius: var(--destiny-border-radius-sm);
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: var(--destiny-secondary-green);
    border-color: var(--destiny-light-green);
}

/* 确保八字显示区域有相对定位 */
.bazi-display {
    position: relative;
}

/* 八字详细信息显示区域 */
.bazi-detail-container {
    position: absolute;
    top: calc(100% - -25px);
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
    pointer-events: none;
    /* 完全对齐八字显示区域 */
    width: 100%;
    margin: 0;
}

.bazi-detail-container.show {
    display: block;
    animation: bazi-detail-fade-in 0.3s ease-in-out;
}

@keyframes bazi-detail-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bazi-detail-grid {
    display: grid;
    /* 与八字显示完全相同的列布局：5列等宽，与.bazi-display保持一致 */
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    /* 向左移动10px，增加横向间距3px */
    padding: 0px 0px;
    margin-left: 0px;
}

  .bazi-detail-row {
      display: contents;
  }
  


.bazi-detail-row-label {
    background: rgba(0, 0, 0, 0.3);
    color: #FFD700;
    padding: 4px 6px;
    text-align: center;
    font-size: 0.85rem;

    border-radius: 3px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    /* 缩小上下间距30% */
    min-height: 42px;
}

.bazi-detail-cell {
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 10px;
    text-align: center;
    font-size: 1rem;
    line-height: 1.4;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-all;
    pointer-events: auto;
    width: 100%;
    box-sizing: border-box;
}

.bazi-detail-cell:hover {
    background: rgba(69, 69, 75, 0.3);
    border-color: rgba(255, 215, 0, 0.3);
}

.bazi-detail-cell.empty {
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.bazi-detail-cell.shensha {
    background: rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
    line-height: 2;
    /* 神煞格子保持较大高度以容纳更多内容 */
    min-height: 80px;
    flex-direction: column;
    gap: 7px;
    /* 神煞内容居中对齐 */
    text-align: center;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 6px;
    /* 确保神煞内容换行显示 */
    word-wrap: break-word;
    overflow-wrap: break-word;
    /* 确保黑色模式下神煞文字是白色 */
    color: rgba(255, 255, 255, 0.9) !important;
}

/* 背景模糊效果 */
.bazi-detail-blur {
    filter: blur(15px);
    opacity: 0;
    transition: filter 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    
}

/* 响应式设计 */
@media (max-width: 768px) {
    .bazi-detail-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        padding: 0 5px;
        margin-left: -5px;
    }
    
    .bazi-detail-row-label,
    .bazi-detail-cell {
        font-size: 0.75rem;
        padding: 3px 4px;
        min-height: 35px;
    }
    
    .bazi-detail-cell.shensha {
        font-size: 0.65rem;
        min-height: 60px;
        padding: 6px 4px;
    }
}

@media (max-width: 480px) {
    .bazi-detail-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        padding: 0 3px;
        margin-left: -3px;
    }
    
    .bazi-detail-row-label,
    .bazi-detail-cell {
        font-size: 0.8rem;
        padding: 2px 3px;
        min-height: 32px;
    }
    
    .bazi-detail-cell.shensha {
        font-size: 0.7rem;
        min-height: 50px;
        padding: 8px 6px;
    }
}

/* 格局研判专用样式 */
.analysis-section {
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 5px;
    padding: 2px;
    margin-bottom: 5px;
    backdrop-filter: blur(8px);
}

/* 格局研判专用折叠样式 */
.geju-collapsible {
    background: linear-gradient(135deg, rgba(246, 250, 252, 0.05) 0%, rgba(178, 188, 187, 0.1) 100%) !important;
    border: 2px solid rgba(90, 200, 250, 0.3) !important;
    border-radius: 5px;
    margin: 15px 0;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 
        0 4px 12px rgba(90, 200, 250, 0.15) !important;
}

.geju-collapsible::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(236, 242, 244, 0.6) 50%, transparent 100%);
    border-radius: 5px 5px 0 0;
}

.geju-collapsible-header {
    background: rgba(255, 215, 0, 0.1);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
}

.geju-collapsible-header:hover {
    background: rgba(122, 69, 0, 0.2);
}

.geju-collapsible h4 {
    color: #FFD700;
    font-size: 1rem;
    margin: 0;
    
}

.geju-collapsible-icon {
    color: #FFD700;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.geju-collapsible.collapsed .geju-collapsible-icon {
    transform: rotate(180deg);
}

.geju-collapsible-content {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    display: block;
}

.geju-collapsible.collapsed .geju-collapsible-content {
    display: none;
}

.subtitle {
    color: rgba(199, 198, 198, 0.8);
    font-size: 0.9rem;

    margin-bottom: 15px;
    text-align: center;
}

/* 变化分值浅亮绿色 */
.dayun-score, .change-score {
    color: #ffb578 !important;

}

/* 干支柱子样式 */
.ganzhi-pillars {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.pillar-column {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    padding: 10px 5px;
    transition: all 0.3s ease;
}

.pillar-column:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 215, 0, 0.4);
}

.pillar-column.hidden {
    display: none;
}

.pillar-header {
    font-size: 0.9rem;
    color: #FFD700;
    
    margin-bottom: 8px;
}

.gan-score {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 5px;    
}

.gan {
    background: rgba(87, 74, 1, 0.2);
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 5px;
    padding: 8px;
    font-size: 1.1rem;
    color: #FFD700;
    margin-bottom: 5px;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zhi {
    background: rgba(0, 72, 100, 0.2);
    border: 2px solid rgba(135, 206, 235, 0.2);
    border-radius: 5px;
    padding: 8px;
    font-size: 1.1rem;
    color: #87CEEB;
    margin-bottom: 8px;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zhi-scores {
    font-size: 0.65rem;
    line-height: 1.1;
    text-align: left;
}

.zhi-score {
    margin: 1px 0;
    padding: 1px 2px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.15);
    color: rgba(255, 255, 255, 0.95) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 统计信息样式 */
.statistics-row {
    border-top: 1px solid rgba(19, 18, 18, 0.1);
    padding-top: 15px;
}

.statistics-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-column h5 {
    color: #FFD700;
    font-size: 0.9rem;

    margin: 0 0 8px 0;
}

.stat-item {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 3px 0;
    padding: 2px 5px;
    background: rgba(15, 15, 15, 0.1);
    border-radius: 5px;
}

/* 格局分析网格 - 固定2列3排 */
.pattern-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 15px;
    max-width: 100%;
}

.pattern-cell {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-sizing: border-box;
}

.pattern-header {
    font-size: 0.9rem;
    color: #FFD700;

    margin-bottom: 0;
    flex-shrink: 0;
}



.pattern-content {
    font-size: 0.8rem;
    text-align: left;
    margin-top: 8px;
    margin-left: 0;
    margin-bottom: 0;
    word-wrap: break-word;
    box-sizing: border-box;
    width: 100%;
}

.pattern-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 5px 8px;
    margin: 3px 0;
}

.pattern-item-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(14, 14, 14, 0.1);
    border-radius: 5px;
    padding: 5px 8px;
    margin: 3px 0;
    width: 100%;
}

.pattern-item-inline .pattern-name {
    color: #87CEEB;

    flex-shrink: 0;
    font-size: 0.8rem;
}

.pattern-item-inline .pattern-details {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 10px;
}

.pattern-item-inline .pattern-god {
    color: #FFD700;

    font-size: 0.8rem;
}

.pattern-item-inline .pattern-position {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.pattern-name {
    color: #87CEEB;

}

.pattern-god {
    color: #FFD700;
    margin-left: 5px;
}

.pattern-position {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
    margin-top: 2px;
}

.pattern-empty {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    font-style: italic;
}

/* 用神分析卡片 */
.god-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.god-analysis-card {
    background: rgba(30, 31, 29, 0.281);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 5px;
    padding: 15px;
    transition: all 0.3s ease;
}

.god-analysis-card:hover {
    background: rgba(7, 7, 7, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
}

.god-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.pattern-info .pattern-name {
    color: #87CEEB;

    font-size: 0.8rem;
}

.pattern-info .pattern-type {
    color: rgba(129, 129, 129, 0.7);
    font-size: 0.7rem;

    margin-left: 8px;
}

.dayun-info {
    color: #FFD700;
    font-size: 0.8rem;

}

.god-body {
    gap: 4px;
}

.god-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3px 0;
    padding: 2px 0;
}

.god-row .label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;

}

.god-row .value {
    color: #FFD700;
    font-size: 0.8rem;

}

.yongshen-section {
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.yongshen-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;

    margin-bottom: 3px;
}

.yongshen-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.yongshen-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(31, 31, 31, 0.6);
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.yongshen-item:hover {
    background: rgba(0, 0, 0, 0.8);
}

.yongshen-item .status {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.65rem;

}

.yongshen-item .status-not-in {
    background: rgba(197, 220, 230, 0.2);
    color: #87CEEB;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.65rem;

}

/* 响应式设计 - 移动端整体缩小但保持布局 */
@media (max-width: 768px) {
    /* 格局研判模块宽度适配 */
    .geju-collapsible {
        width: 100%;
        margin: 15px 0;
        box-sizing: border-box;
    }
    
    .ganzhi-pillars {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    
    .zhi-scores {
        font-size: 0.6rem;
        line-height: 1.0;
    }
    
    .zhi-score {
        padding: 1px;
        font-size: 0.7rem;
    }
    
    .statistics-group {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .stat-column h5 {
        font-size: 0.8rem;
    }
    
    .stat-item {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .pattern-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, auto);
        gap: 8px;
    }
    
    .pattern-cell {
        padding: 8px;
    }
    
    .pattern-content {
        font-size: 0.7rem;
        margin-top: 6px;
        width: 100%;
    }
    
    .god-analysis-grid {
        gap: 5px;
    }
}

@media (max-width: 480px) {
    /* 格局研判模块小屏适配 */
    .geju-collapsible {
        width: 100%;
        margin: 10px 0;
        box-sizing: border-box;
    }
    
    .ganzhi-pillars {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }
    
    .pillar-column {
        padding: 4px 1px;
    }
    
    .zhi-scores {
        font-size: 0.55rem;
        line-height: 1.0;
    }
    
    .zhi-score {
        padding: 3px 1px;
    }
    
    .analysis-section .gan, .analysis-section .zhi {
        min-height: 10px;
        padding: 2px;
        font-size: 0.8rem;
    }
    
    .geju-collapsible-content {
        padding: 1px;
    }
    
    .god-analysis-card {
        padding: 8px;
    }
    
    .pattern-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, auto);
        gap: 6px;
    }
    
    .pattern-cell {
        padding: 6px;
    }
    
    .pattern-content {
        font-size: 0.65rem;
        margin-top: 4px;
        width: 100%;
        margin-left: 0;
    }
    
    .stat-column h5 {
        font-size: 0.75rem;
    }
    
    .stat-item {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 3px 3px;
    }
    
    .god-analysis-grid {
        gap: 5px;
    }
}

/* 新增样式：分数值和格局分析优化 */
.score-value {
    font-family: 'Courier New', monospace;

    color: #e5e7eb;
}

.dayun-score {
    font-family: 'Courier New', monospace;

    color: #fbbf24;
}

.card-number {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.75rem;

    margin-right: 8px;
}

.yongshen-empty {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    text-align: center;
    padding: 8px;
}

/* 忌神警示样式 */
.jishen-section {
    margin-top: 15px;
    border-top: 1px solid rgba(255, 87, 87, 0.3);
    padding-top: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
}

.jishen-label {
    color: #ff7575;
    font-size: 0.95rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    text-shadow: 0 0 4px rgba(255, 117, 117, 0.5);
}

.jishen-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jishen-item {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    background: rgba(255, 87, 87, 0.15);
    border: 1px solid rgba(255, 87, 87, 0.4);
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.jishen-item:hover {
    background: rgba(255, 87, 87, 0.2);
    border-color: rgba(255, 87, 87, 0.5);
}

.jishen-warning {
    color: #ff7575;
    font-size: 0.9rem;
    margin-bottom: 4px;
    text-shadow: 0 0 3px rgba(255, 117, 117, 0.4);
}

.jishen-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.jishen-location {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    font-style: italic;
}

/* 格局不成警示样式 (黄色) */
.geju-warning-section {
    margin-top: 15px;
    border-top: 1px solid rgba(255, 193, 7, 0.3);
    padding-top: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
}

.geju-warning-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.geju-warning-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.geju-warning-item:hover {
    background: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.5);
}

.geju-warning-label {
    color: #ffc107;
    font-size: 0.9rem;
    text-shadow: 0 0 3px rgba(255, 193, 7, 0.4);
    flex-shrink: 0;
}

.geju-warning-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

/* 增吉提示样式 (绿色) */
.geju-blessing-section {
    margin-top: 15px;
    border-top: 1px solid rgba(40, 167, 69, 0.3);
    padding-top: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
}

.geju-blessing-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.geju-blessing-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(138, 151, 150, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.4);
    border-radius: 8px;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.geju-blessing-item:hover {
    background: rgba(146, 159, 149, 0.2);
    border-color: rgba(40, 167, 69, 0.5);
}

.geju-blessing-label {
    color: #28a745;
    font-size: 0.8rem;
    text-shadow: 0 0 3px rgba(40, 167, 69, 0.4);
    flex-shrink: 0;
}

.geju-blessing-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
}

.ganzhi-char {
    font-family: 'Courier New', monospace;
    display: inline-block;
    min-width: 1.2em;
    text-align: center;
}

/* 移除闪烁动画keyframes - 改为静态高亮样式 */

/* 移除所有闪烁动画keyframes */

/* 高亮效果类 - 改为静态高亮 */
.gan-wuhe-highlight {
    background: rgba(145, 212, 192, 0.3) !important;
    border-color: rgba(11, 255, 11, 0.8) !important;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4) !important;
}

.gan-chong-highlight {
    background: rgba(248, 237, 237, 0.3) !important;
    border-color: rgba(223, 68, 68, 0.8) !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4) !important;
}

.zhi-canggan-highlight {
    background: rgba(237, 248, 242, 0.3) !important;
    border-color: rgba(24, 202, 68, 0.8) !important;
    box-shadow: 0 0 15px rgba(0, 255, 85, 0.4) !important;
}

/* 激活状态 - 静态白色高亮 */
.active-flash {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6) !important;
}

/* 流年激活时的静态高亮效果 */
.liunian-item.active-flash {
    transition: all 0.3s ease !important;
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.7) !important;
}

/* 流月激活时的静态高亮效果 */
.liuyue-item.active-flash {
    transition: all 0.3s ease !important;
    background: rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.7) !important;
}

/* 悬停时保持高亮状态 */
.liunian-item.active-flash:hover,
.liuyue-item.active-flash:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.45) !important;
    border-color: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.8) !important;
}

/* 大运格子高亮效果 - 改为静态高亮 */
.dayun-gan-wuhe-highlight {
    background: rgba(0, 255, 76, 0.3) !important;
    border-color: rgba(11, 255, 11, 0.8) !important;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4) !important;
}

.dayun-gan-chong-highlight {
    background: rgba(175, 16, 16, 0.3) !important;
    border-color: rgba(223, 68, 68, 0.8) !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4) !important;
}

.dayun-zhi-good-highlight {
    background: rgba(0, 255, 115, 0.3) !important;
    border-color: rgba(24, 202, 68, 0.8) !important;
    box-shadow: 0 0 15px rgba(0, 255, 85, 0.4) !important;
}

.dayun-zhi-bad-highlight {
    background: rgba(175, 16, 16, 0.3) !important;
    border-color: rgba(223, 68, 68, 0.8) !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4) !important;
}

/* 大运混合关系高亮效果 - 静态紫色 */
.dayun-mixed-highlight {
    background: rgba(138, 43, 226, 0.3) !important;
    border-color: rgba(107, 44, 165, 0.8) !important;
    box-shadow: 0 0 15px rgba(96, 32, 155, 0.4) !important;
}

/* 大运无关系时的静态白色高亮 */
.dayun-no-relation-highlight {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6) !important;
}

/* 关系提示框样式 */
.relation-tooltip {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(34, 60, 44, 0.5);
    color: var(--destiny-light-green);
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    border: 1.5px solid var(--destiny-glass-border);
    box-shadow: var(--destiny-shadow-md);
    backdrop-filter: blur(10px);
}

/* 全局折叠按钮移动端适配 */
.global-collapse-btn {
    right: 8px;
    top: 1px;
}

.collapse-icon {
    font-size: 1.1rem;
}

/* 流年静态高亮效果（流月视觉提示） */
.liunian-yellow-flash {
    background-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    transition: all 0.3s ease;
}

/* ==================== 流年图表样式 ==================== */

/* 图表容器 */
#chart-container {
    position: relative;
    margin-bottom: 25px;
}

#chart-container canvas {
    max-width: 100%;
    height: auto;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* 图表控制按钮 */
.chart-control-btn, .year-jump-btn {
    padding: 8px 15px;
    background: rgba(26, 35, 126, 0.5);
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.chart-control-btn:hover, .year-jump-btn:hover {
    background: rgba(26, 35, 126, 0.8);
    border-color: #FFD700;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.year-jump-btn {
    background: rgba(255, 215, 0, 0.1);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    padding: 6px 12px;
}

.chart-control-btn.active {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    color: #1a237e;
    
}

/* 图表说明图例 */
#chart-legend {
    margin-top: 15px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

#chart-legend > div {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: rgba(26, 35, 126, 0.3);
    border-radius: 4px;
    border: 1px solid rgba(255, 215, 0, 0.1);
}

/* 年份按钮样式优化 */
.year-btn {
    padding: 6px 12px;
    background: rgba(255, 215, 0, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.year-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    color: white;
    transform: translateY(-1px);
}

/* 加载状态样式 */
.chart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.chart-loading-content {
    text-align: center;
}

.chart-loading-title {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #FFD700;
}

.chart-loading-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* 错误状态样式 */
.chart-error {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.chart-error-content {
    text-align: center;
}

.chart-error-title {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #FF6B6B;
}

.chart-error-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 15px;
}

.chart-retry-btn {
    padding: 8px 15px;
    background: rgba(26, 35, 126, 0.5);
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-retry-btn:hover {
    background: rgba(26, 35, 126, 0.8);
    border-color: #FFD700;
    transform: translateY(-1px);
}

/* ==================== 移动端适配 ==================== */

@media (max-width: 768px) {
    /* 图表容器移动端优化 */
    #chart-container {
        margin: 10px 0;
    }
    
    #chart-container .analysis-section > div {
        height: 350px; /* 移动端降低图表高度 */
    }
    
    /* 控制按钮移动端适配 */
    .chart-control-btn, .year-jump-btn {
        font-size: 0.8rem;
        padding: 6px 10px;
        margin: 2px;
    }
    
    /* 快速跳转按钮移动端布局 */
    #chart-controls-container .analysis-section > div:last-child {
        justify-content: flex-start;
        gap: 6px;
    }
    
    .year-jump-btn {
        font-size: 0.75rem;
        padding: 4px 8px;
        min-width: 60px;
    }
    
    /* 图表说明移动端优化 */
    #chart-legend > div {
        gap: 10px;
        font-size: 0.8rem;
    }
    
    .legend-item {
        gap: 5px;
        padding: 3px 6px;
    }
    
    /* 年份按钮移动端优化 */
    .year-btn {
        font-size: 0.75rem;
        padding: 4px 8px;
        min-width: 50px;
    }
    
    /* 图表加载/错误状态移动端优化 */
    .chart-loading, .chart-error {
        height: 350px;
        padding: 20px;
    }
    
    .chart-loading-title, .chart-error-title {
        font-size: 1rem;
    }
    
    .chart-loading-subtitle, .chart-error-subtitle {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    /* 小屏幕进一步优化 */
    #chart-container .analysis-section > div {
        height: 300px;
    }
    
    .chart-control-btn, .year-jump-btn {
        font-size: 0.75rem;
        padding: 5px 8px;
    }
    
    .year-jump-btn {
        font-size: 0.7rem;
        padding: 3px 6px;
        min-width: 50px;
    }
    
    #chart-legend {
        font-size: 0.75rem;
    }
    
    #chart-legend > div {
        gap: 8px;
    }
    
    .legend-item {
        gap: 4px;
        padding: 2px 4px;
    }
    
    /* 图表加载/错误状态小屏优化 */
    .chart-loading, .chart-error {
        height: 300px;
        padding: 15px;
    }
    
    .chart-loading-title, .chart-error-title {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .chart-loading-subtitle, .chart-error-subtitle {
        font-size: 0.75rem;
    }
    
    .chart-retry-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* ==================== 图表交互优化 ==================== */

/* 图表容器触摸优化 */
#chart-container canvas {
    touch-action: pan-x;
    user-select: none;
}

/* 控制面板样式 */
#chart-controls-container {
    background: rgba(34, 60, 44, 0.2);
    border: 1.5px solid var(--destiny-glass-border);
    border-radius: 5px;
}

#chart-controls-container h4 {
    color: var(--destiny-light-green);
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* 控制按钮容器 */
.chart-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.chart-jump-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.chart-jump-label {
    color: var(--destiny-text-secondary);
    margin-right: 10px;
    font-size: 0.9rem;
}

/* 响应式图表容器 */
.chart-responsive-container {
    position: relative;
    height: 400px;
    width: 100%;
    overflow: hidden;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.1);
}

/* 图表工具提示自定义样式 */
.chart-tooltip {
    background: rgba(34, 60, 44, 0.95) !important;
    border: 1.5px solid var(--destiny-glass-border) !important;
    border-radius: 5px;
    color: var(--destiny-text-primary) !important;
    font-size: 0.9rem !important;
    padding: 8px 12px !important;
    box-shadow: var(--destiny-shadow-md) !important;
}

.chart-tooltip-title {
    color: var(--destiny-light-green) !important;
}

/* ==================== 动画效果 ==================== */

/* 图表加载动画 */
@keyframes chartFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#chart-container {
    animation: chartFadeIn 0.8s ease-out;
}

/* 按钮点击动画 */
.chart-control-btn:active, .year-jump-btn:active, .year-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(34,60,44,0.3);
}

/* 控制面板展开动画 */
#chart-controls-container .analysis-section {
    animation: chartFadeIn 0.6s ease-out;
}

/* 图例项悬停效果 */
.legend-item:hover {
    background: rgba(34, 60, 44, 0.5);
    border-color: var(--destiny-glass-border);
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* ==================== 讲解内容样式 ==================== */

/* 讲解内容网格 */
.explanation-grid {
    display: grid;
    gap: 20px;
}

/* 讲解内容小节 */
.explanation-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

/* 讲解内容标题 */
.explanation-section h5 {
    color: #FFD700;
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 5px;
}

/* 讲解内容文本 */
.explanation-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.explanation-content p {
    margin: 8px 0;
}

.explanation-content strong {
    color: #87CEEB;
}

/* 讲解内容响应式布局 */
@media (max-width: 768px) {
    .explanation-section {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .explanation-section h5 {
        font-size: 0.9rem;
    }
    
    .explanation-content {
        font-size: 0.8rem;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .explanation-section {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .explanation-section h5 {
        font-size: 0.85rem;
    }
    
    .explanation-content {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}

/* ==================== 浅色主题样式 - 苹果风格 ==================== */


/* ========== 五行详细内容美化样式 ========== */

/* 神煞内容分类美化 */
.shensha-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    width: 100%;
}

.shensha-item {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.95rem;
    text-align: center;
    min-width: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 1px;
}

/* 吉神美化 */
.shensha-item.auspicious {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(16, 185, 129, 0.15) 100%);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 1px 3px rgba(34, 197, 94, 0.2);
}

.shensha-item.auspicious:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(16, 185, 129, 0.25) 100%);
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}

/* 凶煞美化 */
.shensha-item.inauspicious {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 127, 0.15) 100%);
    color: #ffffff;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.2);
}

.shensha-item.inauspicious:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(220, 38, 127, 0.25) 100%);
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

/* 中性神煞美化 */
.shensha-item.neutral {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.2) 0%, rgba(75, 85, 99, 0.15) 100%);
    color: #87CEEB;
    border: 1px solid rgba(107, 114, 128, 0.3);
    box-shadow: 0 1px 3px rgba(107, 114, 128, 0.2);
}

.shensha-item.neutral:hover {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.3) 0%, rgba(75, 85, 99, 0.25) 100%);
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 2px 6px rgba(107, 114, 128, 0.3);
}

/* 空亡内容美化 */
.bazi-detail-cell[data-content-type="kongwang"] {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(126, 34, 206, 0.08) 100%);
    border: 1px dashed rgba(168, 85, 247, 0.4);
    position: relative;
}



.bazi-detail-cell[data-content-type="kongwang"]:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(126, 34, 206, 0.15) 100%);
    border-color: rgba(168, 85, 247, 0.6);
    transform: scale(1.02);
}

/* 长生十二宫美化 */
.bazi-detail-cell[data-content-type="changsheng"] {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    position: relative;
    overflow: hidden;
}

.bazi-detail-cell[data-content-type="changsheng"]:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.3), transparent);
    transition: left 0.6s ease;
}

.bazi-detail-cell[data-content-type="changsheng"]:hover:before {
    left: 100%;
}


/* 五行属性标识美化 */
.wuxing-tag {
    display: inline-block;
    padding: 1px 4px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin: 1px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wuxing-tag.jin {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(245, 158, 11, 0.2) 100%);
    color: #d97706;
    border: 1px solid rgba(251, 191, 36, 0.5);
}

.wuxing-tag.mu {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(16, 185, 129, 0.2) 100%);
    color: #059669;
    border: 1px solid rgba(34, 197, 94, 0.5);
}

.wuxing-tag.shui {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.2) 100%);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.wuxing-tag.huo {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(220, 38, 127, 0.2) 100%);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.wuxing-tag.tu {
    background: linear-gradient(135deg, rgba(168, 162, 158, 0.3) 0%, rgba(120, 113, 108, 0.2) 100%);
    color: #78716c;
    border: 1px solid rgba(168, 162, 158, 0.5);
}


/* 详细标签通用美化 */
.detail-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin: 1px 2px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(79, 70, 229, 0.1) 100%);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
}

.detail-tag:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(79, 70, 229, 0.2) 100%);
    transform: scale(1.05);
}



/* 长生十二宫状态特殊美化 */
.changsheng-state {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(16, 185, 129, 0.15) 100%) !important;
    color: #047857 !important;
    border: 1px solid rgba(34, 197, 94, 0.4) !important;
    position: relative;
}

.changsheng-state:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(16, 185, 129, 0.25) 100%) !important;
    transform: translateY(-1px) scale(1.05);
}

/* 特殊长生状态颜色 */
.changsheng-state:contains("帝旺") {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.15) 100%) !important;
    color: #d97706 !important;
    border: 1px solid rgba(251, 191, 36, 0.4) !important;
}

.changsheng-state:contains("死"), .changsheng-state:contains("绝"), .changsheng-state:contains("墓") {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.2) 0%, rgba(75, 85, 99, 0.15) 100%) !important;
    color: #374151 !important;
    border: 1px solid rgba(107, 114, 128, 0.4) !important;
}

/* 空亡地支美化 */
.kongwang-zhi {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(126, 34, 206, 0.15) 100%) !important;
    color: #FFD700 !important;
    border: 1px solid rgba(168, 85, 247, 0.4) !important;
    position: relative;
}



.kongwang-zhi:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(126, 34, 206, 0.25) 100%) !important;
    transform: translateY(-1px) scale(1.05);
}

/* 纳音五行美化 */
.nayin-tag {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%) !important;
    color: #2563eb !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
    text-shadow: 0 1px 2px rgba(59, 130, 246, 0.2);
}

.nayin-tag:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.25) 100%) !important;
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* 本干状态美化 */
.bazi-detail-cell[data-content-type="zhuangtai"] {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(79, 70, 229, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    position: relative;
}

.bazi-detail-cell[data-content-type="zhuangtai"]:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(79, 70, 229, 0.12) 100%);
    border-color: rgba(99, 102, 241, 0.4);
    transform: scale(1.02);
}

/* 纳音内容美化 */
.bazi-detail-cell[data-content-type="nayin"] {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(37, 99, 235, 0.04) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
}

.bazi-detail-cell[data-content-type="nayin"]:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(37, 99, 235, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    transform: scale(1.02);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .shensha-item {
        font-size: 0.7rem;
        padding: 1px 4px;
        min-width: 16px;
    }
    
    .wuxing-tag {
        font-size: 0.65rem;
        padding: 1px 3px;
    }
    
    .detail-tag {
        font-size: 0.7rem;
        padding: 1px 4px;
        margin: 1px;
    }
}

@media (max-width: 480px) {
    .shensha-item {
        font-size: 0.65rem;
        padding: 1px 3px;
        min-width: 14px;
    }
    
    .wuxing-tag {
        font-size: 0.6rem;
        padding: 0px 2px;
    }
    
    .detail-tag {
        font-size: 0.65rem;
        padding: 1px 3px;
    }
}

/* ====== 年度分析/格局分析卡片内容区域森林主题美化（仅视觉） ====== */

/* 年度分析卡片内容（流年流月分析/影响报告/分值卡片等） */
.yearly-impact-section, .monthly-impact-section, .month-impact-card, .yearly-report-header, .new-yearly-report-header {
    background: rgba(50, 50, 50, 0.32) !important;
    border: 1.5px solid rgba(168, 213, 186, 0.18) !important;
    color: #eaf7e1 !important;
    border-radius: 5px !important;
    box-shadow: 0 4px 24px 0 rgba(34,60,44,0.10) !important;
    backdrop-filter: blur(10px) !important;
}

/* 卡片内容文字色 */
.yearly-impact-section *, .monthly-impact-section *, .month-impact-card *, .yearly-report-header *, .new-yearly-report-header * {
    color: #eaf7e1 !important;
}

/* 卡片内分组/分割线 */
.yearly-impact-section hr, .monthly-impact-section hr, .month-impact-card hr {
    border: none;
    border-top: 1px solid rgba(168,213,186,0.18);
    margin: 12px 0;
}

/* 影响标签/分组标题 */
.impact-label, .mini-impact-label, .influence-label {
    color: #a8d5ba !important;
    font-weight: bold;
}

/* 影响内容项 */
.impact-item, .mini-impact-item, .influence-item {
    background: rgba(34, 34, 34, 0.18) !important;
    border-left: 3px solid #a8d5ba !important;
    color: #eaf7e1 !important;
    border-radius: 6px !important;
}

/* 影响对象区域 */
.affected-targets, .targets-list {
    background: rgba(168,213,186,0.10) !important;
    border: 1px solid rgba(168,213,186,0.18) !important;
    color: #eaf7e1 !important;
    border-radius: 8px !important;
}

/* 月份/干支标签 */
.month-ganzhi, .month-name {
    color: #a8d5ba !important;
    background: rgba(34,34,34,0.18) !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
}

/* 分值/趋势标签 */
.influence-summary, .value.positive, .value.negative {
    color: #a8d5ba !important;
    background: rgba(34,34,34,0.18) !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
}

/* 年度分析/格局分析卡片内容补充细节 */

/* 卡片头部标题 */
.yearly-impact-section h6, .monthly-impact-section h6, .month-impact-header, .new-yearly-report-header h5 {
    color: #a8d5ba !important;
    background: rgba(34,34,34,0.10) !important;
    border-bottom: 1px solid rgba(168,213,186,0.18) !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 8px 12px !important;
}

/* 说明/提示文字 */
.chart-explanation, .yearly-impact-content, .monthly-impact-content, .month-impact-content {
    color: #b7d8c2 !important;
    background: rgba(34,60,44,0.10) !important;
    border-radius: 8px !important;
}

/* 卡片内分组/分割线补充 */
.impact-group, .mini-impact-group, .influence-group {
    background: rgba(34,34,34,0.10) !important;
    border-radius: 6px !important;
    margin-bottom: 8px !important;
}

/* 选中/高亮卡片 */
.month-analysis-card.selected, .month-impact-card.positive {
    border-color: #a8d5ba !important;
    box-shadow: 0 6px 24px 0 rgba(168,213,186,0.18) !important;
    background: rgba(34,34,34,0.22) !important;
}

/* 负面卡片 */
.month-impact-card.negative {
    border-color: #b7d8c2 !important;
    background: rgba(34,34,34,0.15) !important;
}

/* 中性卡片 */
.month-impact-card.neutral {
    border-color: rgba(168,213,186,0.12) !important;
    background: rgba(34,34,34,0.12) !important;
}

/* ====== 大运选择器区域 森林主题美化（仅视觉） ====== */
.dayun-selector-container {
    background: rgba(50, 50, 50, 0.32) !important;
    border-radius: 5px !important;
    border: 1.5px solid rgba(168, 213, 186, 0.18) !important;
    box-shadow: 0 4px 24px 0 rgba(34,60,44,0.10) !important;
    backdrop-filter: blur(10px) !important;
    color: #eaf7e1 !important;
}

.dayun-selector-header h5 {
    color: #a8d5ba !important;
}

.dayun-selector-header p {
    color: #b7d8c2 !important;
}

.dayun-period-btn {
    background: rgba(34, 60, 44, 0.22) !important;
    border: 1.5px solid rgba(168, 213, 186, 0.18) !important;
    color: #eaf7e1 !important;
    border-radius: 5px !important;
    box-shadow: 0 2px 8px rgba(34,60,44,0.10) !important;
    backdrop-filter: blur(8px) !important;
}

.dayun-period-btn.active {
    border-color: #a8d5ba !important;
    background: rgba(114,114,114,0.20) !important;
    box-shadow: 0 3px 10px rgba(168,213,186,0.28) !important;
}

.dayun-period-btn.original-period.active {
    background: rgba(176,175,80,0.20) !important;
    border-color: #a8d5ba !important;
    box-shadow: 0 6px 20px rgba(76,175,80,0.20) !important;
}

.period-title {
    color: #a8d5ba !important;
}

.dayun-period-btn.original-period .period-title {
    color: #7ed6a8 !important;
}

.period-subtitle {
    color: #b7d8c2 !important;
}

.period-years {
    color: #b7d8c2 !important;
}

/* ====== 流年六月和格局分析卡片区域基础色提升（纯度+10%） ====== */
/* 流年六月分析卡片（假设有.month-impact-card[data-month="6"]） */
.month-impact-card[data-month="6"],
/* 格局分析主卡片（假设有.geju-analysis-card 或 .geju-main-card） */
.geju-analysis-card, .geju-main-card {
    background: rgba(56, 110, 72, 0.38) !important; /* 纯度提升后的森林绿 */
    border: 1.5px solid rgba(120, 200, 140, 0.22) !important;
    color: #eaf7e1 !important;
    box-shadow: 0 6px 28px 0 rgba(56,110,72,0.13) !important;
    backdrop-filter: blur(12px) !important;
}

/* 文字色略提升明度 */
.month-impact-card[data-month="6"] *,
.geju-analysis-card *, .geju-main-card * {
    color: #e3fbe7 !important;
}

/* ====== 流年流月分析区域（barChartHTML）视觉微调，贴合森林主题 ====== */
.analysis-section h4 {
    color: #a8d5ba !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 8px 12px !important;
}

.chart-nav-btn {
    background: rgba(56, 110, 72, 0.22) !important;
    color: #a8d5ba !important;
    border: 1.5px solid rgba(168,213,186,0.18) !important;
    border-radius: 5px !important;
    box-shadow: 0 2px 8px rgba(34,60,44,0.10) !important;
    backdrop-filter: blur(6px) !important;
}

#chart-target-year {
    color: #eaf7e1 !important;
    border: 1.5px solid rgba(168,213,186,0.18) !important;
    border-radius: 5px !important;
    font-size: 14px !important;
}

.chart-explanation {
    color: #b7d8c2 !important;
    background: rgba(34,60,44,0.10) !important;
    border-radius: 8px !important;
}

#yearly-influence-content {
    color: #eaf7e1 !important;
}

/* ====== 滚动条主题 ====== */
::-webkit-scrollbar {
    width: 10px;
    background: rgba(34, 60, 44, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(68, 13, 86, 0.1) 0%, rgba(34, 60, 44, 0.1) 100%);
    border-radius: 8px;
    border: 2px solid rgba(34, 60, 44, 0.15);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(68, 13, 86, 0.1) 0%, rgba(34, 60, 44, 0.1) 100%);
}

::-webkit-scrollbar-corner {
    background: rgba(34, 60, 44, 0.05);
}











