/**
 * paipan.html 页面专用样式
 * 基于 style.css 的通用样式
 */

/* ===== 欢迎区 ===== */
.hero-section {
    background: linear-gradient(135deg, #fff 0%, #FFF8F2 100%);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 700px;
    box-sizing: border-box;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(139, 111, 212, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-greeting {
    font-family: 'Noto Serif SC', serif;
    font-size: 22px;
    font-weight: 700;
    color: #3A2A1A;
    margin-bottom: 8px;
}

.hero-sub {
    font-size: 14px;
    color: #8C7060;
    line-height: 1.6;
}

.hero-tip {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(122, 75, 34, 0.06);
    border-radius: 10px;
    font-size: 13px;
    color: var(--primary-brown);
}

/* ===== 快速入口 ===== */
.quick-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.qn-btn {
    background: var(--bg-card);
    border: 1.5px solid #F0E8DE;
    border-radius: 12px;
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.qn-btn:hover {
    border-color: var(--primary-purple-light);
    background: var(--primary-purple-bg);
}

.qn-icon {
    font-size: 24px;
}

.qn-label {
    font-size: 13px;
    font-weight: 600;
    color: #3A2A1A;
}

/* ===== 输入表单样式 ===== */
.input-wrapper {
    width: 100%;
    max-width: 700px;
}

.input-card {
    background: var(--bg-card);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 24px;
    border: 1px solid #F0E8DE;
}

.input-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-brown);
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.form-row .form-group {
    flex: 1;
    min-width: 140px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #8C7060;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #E8D8CC;
    border-radius: 10px;
    font-size: 14px;
    color: #3A2A1A;
    background: #fff;
    transition: border-color 0.2s;
    font-family: var(--font-main);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-purple-light);
}

.zty-select {
    background: linear-gradient(135deg, rgba(176, 122, 72, 0.08), rgba(122, 75, 34, 0.05));
    border-color: var(--primary-brown-light);
    font-weight: 500;
}

.zty-select option {
    padding: 4px;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-brown), #5C3310);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    margin-top: 6px;
    border: none;
    cursor: pointer;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(122, 75, 34, 0.3);
}

.form-note {
    font-size: 12px;
    color: #B0A090;
    text-align: center;
    margin-top: 14px;
    line-height: 1.6;
}

/* ===== 加载动画 ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(250, 243, 237, 0.95);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: opacity 0.4s;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-purple), #6B4DC0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    animation: pulseLoad 1.2s ease-in-out infinite;
}

@keyframes pulseLoad {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.loading-text {
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    color: #8C7060;
    letter-spacing: 2px;
}

/* ===== 分析结果区域 ===== */
#resultSection,
.result-section {
    display: none;
    width: 100%;
    max-width: 700px;
}

/* ===== 编码卡片 ===== */
.code-display {
    background: linear-gradient(135deg, #8B6FD4, #6A4FC0);
    color: #fff;
    border-radius: var(--card-radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.code-main {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
}

.code-details {
    flex: 1;
    min-width: 200px;
}

.code-row {
    font-size: 12px;
    line-height: 1.8;
    opacity: 0.9;
}

.code-badge {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 12px;
    text-align: center;
}

/* ===== 五行统计 ===== */
.stats-format {
    background: #F5EFEB;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.stats-line {
    margin-bottom: 4px;
    color: #5A3A1A;
}

.stats-line:last-child {
    margin-bottom: 0;
}

.wuxing-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
}

.wx-item {
    text-align: center;
    min-width: 60px;
}

.wx-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 auto 6px;
}

.wx-label {
    font-size: 12px;
    color: #8C7060;
}

.wx-jin { background: #C8922A; }
.wx-mu { background: #3BB36A; }
.wx-shui { background: #3D8BFF; }
.wx-huo { background: #F04B4B; }
.wx-tu { background: #D4A24A; }

/* ===== 九宫格模块导航 ===== */
.module-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.mn-btn {
    background: var(--bg-card);
    border: 1.5px solid #F0E8DE;
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.mn-btn:hover,
.mn-btn.active {
    border-color: var(--primary-purple);
    background: var(--primary-purple-bg);
}

.mn-icon {
    font-size: 20px;
}

.mn-label {
    font-size: 11px;
    font-weight: 600;
    color: #3A2A1A;
}

/* ===== 模块内容区 ===== */
.module-section {
    display: none;
}

.module-section.active {
    display: block;
}

/* 饮食模块 */
.food-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.food-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-brown);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.food-section-title[onclick] {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.food-section-title[onclick]:hover {
    color: #5D4037;
}

.food-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.food-tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: #FFF8E1;
    color: var(--primary-brown);
    border: 1px solid #FFE082;
}

.food-tag.avoid {
    background: #FFF3F3;
    color: #C62828;
    border-color: #FFCDD2;
}

/* 运动穿搭 */
.sport-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.color-dots {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.color-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.sport-item {
    background: #FDFBF9;
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid #F0E8DE;
}

.sport-name {
    font-size: 13px;
    font-weight: 600;
    color: #3A2A1A;
    margin-bottom: 3px;
}

.sport-desc {
    font-size: 12px;
    color: #8C7060;
    line-height: 1.5;
}

/* 大小厄 */
.calamity-levels {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cal-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cal-level {
    width: 48px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    padding: 4px;
    border-radius: 8px;
    flex-shrink: 0;
}

.cal-level.da {
    background: #C62828;
}

.cal-level.xiao {
    background: #FFC107;
    color: #333;
}

.cal-content {
    flex: 1;
}

.cal-period {
    font-size: 13px;
    font-weight: 600;
    color: #3A2A1A;
    margin-bottom: 2px;
}

.cal-desc {
    font-size: 12px;
    color: #8C7060;
    line-height: 1.5;
}

.cal-tip {
    font-size: 11px;
    color: var(--primary-brown-light);
    margin-top: 2px;
    background: #FFF8E1;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
}

/* 孩子天赋 */
.talent-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.talent-item {
    background: #FDFBF9;
    border-radius: 12px;
    padding: 14px;
    border: 1.5px solid #F0E8DE;
}

.talent-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.talent-name {
    font-size: 14px;
    font-weight: 700;
    color: #3A2A1A;
    margin-bottom: 4px;
}

.talent-desc {
    font-size: 12px;
    color: #8C7060;
    line-height: 1.5;
}

/* 人补 */
.person-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.person-card {
    background: #FDFBF9;
    border-radius: 12px;
    padding: 14px;
    border: 1.5px solid #F0E8DE;
}

.person-role {
    font-size: 14px;
    font-weight: 700;
    color: #3A2A1A;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.person-desc {
    font-size: 12px;
    color: #8C7060;
    line-height: 1.6;
}

/* 择业 */
.career-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.career-tag {
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
}

/* ===== 操作按钮 ===== */
.action-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.cfbtn {
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    min-width: 120px;
}

.cfbtn.secondary {
    background: var(--bg-card);
    color: #3A2A1A;
    border: 1.5px solid #F0E8DE;
}

.cfbtn.secondary:hover {
    border-color: var(--primary-brown-light);
}

.cfbtn.primary {
    background: linear-gradient(135deg, var(--primary-brown), #5C3310);
    color: #fff;
}

.cfbtn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(122, 75, 34, 0.3);
}

/* ===== 四柱命盘样式 ===== */
.sizhu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

/* ===== 生命地图显示模式 ===== */
.mode-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 14px;
    background: #F0E8DE;
    color: #8C7060;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.mode-btn:hover {
    background: #E8D8CC;
    transform: scale(1.1);
}

.mode-btn.active {
    background: linear-gradient(135deg, var(--primary-brown), #5C3310);
    color: #fff;
    border-color: var(--primary-brown);
}

.mode-btn-tooltip {
    position: relative;
}

.mode-btn-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 4px;
}

.mode-btn-tooltip:hover::after {
    opacity: 1;
}

.mode-divider {
    width: 1px;
    height: 24px;
    background: #E0D5C5;
    margin: 0 4px;
}

/* ===== 图层切换开关 ===== */
.layer-toggles {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #8C7060;
    cursor: pointer;
}

.toggle-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-brown);
}

.layer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* ===== 画布容器 ===== */
.canvas-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin: 16px 0;
}

.zhu-col {
    background: #FDFBF9;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    border: 1.5px solid #F0E8DE;
    position: relative;
}

.zhu-col.day-col {
    border-color: #8B6FD4;
    background: #F3E5F5;
}

.zhu-label {
    font-size: 11px;
    color: #B0A090;
    margin-bottom: 8px;
    font-weight: 500;
}

.zhu-tg {
    font-size: 22px;
    font-weight: 700;
    color: #3A2A1A;
    margin-bottom: 4px;
    line-height: 1;
}

.zhu-dz {
    font-size: 18px;
    color: #7A4B22;
    margin-bottom: 6px;
    font-weight: 600;
}

.zhu-detail {
    font-size: 11px;
    color: #8C7060;
    line-height: 1.5;
}

.zhu-nayin {
    font-size: 10px;
    color: #B07A48;
    background: #FFF8E1;
    padding: 2px 6px;
    border-radius: 6px;
    margin-top: 4px;
    display: inline-block;
}

/* ===== 打印样式 ===== */
@media print {
    .module-nav,
    .hero-section,
    .input-section,
    .hero-buttons,
    .print-hide {
        display: none !important;
    }

    .result-section {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .card {
        break-inside: avoid;
        margin-bottom: 16px;
        border: 1px solid #ccc;
    }

    .life-map-container {
        flex-direction: column;
    }
}

/* ===== 响应式：手机端 (< 640px) ===== */
@media (max-width: 640px) {
    /* 四柱命盘响应式 */
    .sizhu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* 覆盖 body 的 flex 布局 */
    body {
        display: block !important;
    }

    /* 显示手机端导航容器 */
    #mobile-topbar-container,
    #bottom-nav-container {
        display: block !important;
    }

    /* 隐藏侧边栏导航 */
    .sidebar {
        display: none !important;
    }

    /* 主内容区 */
    .main-content {
        margin-left: 0 !important;
        padding: 16px 14px 80px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: block !important;
        min-height: auto !important;
    }

    /* 主内容内部元素适配 */
    .input-wrapper,
    .hero-section,
    .content-area,
    .result-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }

    /* 卡片响应式 */
    .card {
        padding: 16px;
    }

    /* 表单响应式 */
    .form-row {
        flex-direction: column;
    }

    .form-row .form-group {
        min-width: 100%;
    }

    /* 快速入口响应式 */
    .quick-nav {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    /* 模块导航响应式 */
    .module-nav {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 网格响应式 */
    .food-grid,
    .sport-grid,
    .talent-grid,
    .person-grid {
        grid-template-columns: 1fr;
    }

    /* 操作按钮响应式 */
    .action-btns {
        position: fixed;
        bottom: 60px;
        left: 0;
        right: 0;
        background: rgba(250, 243, 237, 0.95);
        padding: 10px 16px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }
}

/* ===== 从 paipan.html 提取的内联样式 ===== */

/* 输入区顶部间距 */
.input-wrapper { margin-top: 24px; }

/* 输入标题图标 */
.input-title i { color: var(--primary-brown); margin-right: 8px; }

/* 真太阳时标签内的信息图标 */
.form-group .info-icon { font-size: 11px; color: #B07A48; cursor: help; }

/* 结果区域 */
.content-area { margin-top: 20px; }

/* 卡片间距（用于包裹卡片的 div）*/
.card-wrap { margin-bottom: 16px; }
.card-wrap-sm { margin-bottom: 12px; }

/* Canvas 画布 */
.canvas-container canvas { display: block; margin: 0 auto; max-width: 100%; }

/* 图层切换顶部间距 */
.layer-toggles { margin-top: 12px; }

/* 图层圆点颜色 */
.layer-dot-huo { background: #FF5722; }
.layer-dot-mu { background: #4CAF50; }
.layer-dot-shui { background: #2196F3; }

/* 图例区 */
.chart-legend {
    font-size: 11px;
    color: #8C7060;
    text-align: center;
    margin-top: 10px;
}
.chart-legend .legend-dz { color: #8B5A2B; }
.chart-legend .legend-tg { color: #FFFFFF; text-shadow: 0 0 2px #333; }
.chart-legend .legend-dae { color: #FF5722; }
.chart-legend .legend-xiaoe { color: #FFC107; }
.chart-legend .legend-zhiliao { color: #4CAF50; }

/* 用户信息区字体 */
.user-info-text { font-size: 14px; }

/* 内容描述文字（地补/人补/运动/天赋/择业模块通用）*/
.desc-text { font-size: 12px; color: #666; line-height: 1.8; }
.desc-text-md { font-size: 13px; color: #8C7060; line-height: 1.8; }
.desc-text-brief { font-size: 13px; color: #8C7060; }

/* 推荐主食提示 */
.food-intro { font-size: 12px; color: #8C7060; margin-bottom: 12px; }

/* 食物详情折叠 */
.food-detail-expand {
    display: none;
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    padding: 8px;
    background: #F5F5F5;
    border-radius: 6px;
}

/* 体质编码区域（由 JS 生成）*/
.code-center { text-align: center; }
.code-sub-label { font-size: 11px; color: #888; margin-bottom: 4px; }
.code-main-text { font-size: 20px; font-weight: 900; letter-spacing: 2px; color: #8B6FD4; }
.code-abc-row { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; }
.code-abc-item { text-align: center; }
.code-abc-val { font-size: 12px; font-weight: 700; }
.code-abc-label { font-size: 10px; color: #888; }
.code-def-row { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; font-size: 10px; color: #888; }
.code-abc-a { color: #E74C3C; }
.code-abc-b { color: #D4A24A; }
.code-abc-c { color: #3498DB; }
.code-summary { background: #F5EFEB; border-radius: 8px; padding: 8px 12px; font-size: 12px; color: #5A3A1A; text-align: center; }
.code-summary span { margin-right: 15px; }

/* 用户信息卡片（由 JS 生成）*/
.user-card { padding: 14px 16px; }
.user-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.user-card-name { display: flex; align-items: center; gap: 10px; }
.user-card-name-text { font-size: 18px; font-weight: 700; color: #3A2A1A; }
.user-card-region { font-size: 12px; color: #8C7060; padding: 4px 8px; background: #EDE8E4; border-radius: 4px; }
.user-card-code { font-size: 16px; font-weight: 700; letter-spacing: 2px; background: linear-gradient(135deg,#8B6FD4,#6A4FC0); color: #fff; padding: 6px 14px; border-radius: 20px; }
.user-card-date-row { display: flex; align-items: center; margin-bottom: 10px; padding: 8px 12px; background: #F8F4F0; border-radius: 8px; }
.user-card-date-label { font-size: 12px; color: #B0A090; margin-right: 10px; }
.user-card-date-value { font-size: 14px; font-weight: 600; color: #3A2A1A; }
.user-card-detail-row { display: flex; gap: 12px; }
.user-card-detail-item { flex: 1; display: flex; align-items: center; padding: 8px 12px; background: #F8F4F0; border-radius: 8px; }
.user-card-detail-label { font-size: 12px; color: #B0A090; margin-right: 10px; }
.user-card-detail-value { font-size: 14px; font-weight: 600; }

/* 大小厄卡片（由 JS 生成）*/
.tianbu-intro { margin-bottom: 14px; font-size: 13px; color: #8C7060; }
.tianbu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.calamity-card { border-radius: 12px; padding: 12px; text-align: center; }
.calamity-card.da-e { background: #FFEBEE; border: 1.5px solid #C62828; }
.calamity-card.xiao-e { background: #FFFDE7; border: 1.5px solid #FFC107; }
.calamity-card.zhiliao { background: #E8F5E9; border: 1.5px solid #4CAF50; }
.calamity-time { font-size: 16px; font-weight: 700; }
.calamity-time.da-e { color: #C62828; }
.calamity-time.xiao-e { color: #F57F17; }
.calamity-time.zhiliao { color: #2E7D32; }
.calamity-period { font-size: 11px; color: #8C7060; margin-bottom: 6px; }
.calamity-badge { padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 600; }
.calamity-badge.da-e { background: #C62828; color: #fff; }
.calamity-badge.xiao-e { background: #FFC107; color: #333; }
.calamity-badge.zhiliao { background: #4CAF50; color: #fff; }
.tianbu-tip { background: #E3F2FD; border-radius: 10px; padding: 10px 14px; font-size: 12px; color: #1565C0; line-height: 1.7; }

/* 运动卡片（由 JS 生成）*/
.sport-intro { font-size: 13px; color: #8C7060; margin-bottom: 12px; }
.sport-time-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.sport-time-item { background: #E8F5E9; border-radius: 8px; padding: 8px; text-align: center; }
.sport-time-period { font-size: 11px; color: #666; }

/* 天干颜色（动态 style 生成）- 使用 data-wx 属性选择器 */
.zhu-tg[data-wx="mu"] { color: #4CAF50; }
.zhu-tg[data-wx="huo"] { color: #F44336; }
.zhu-tg[data-wx="tu"] { color: #9C6B30; }
.zhu-tg[data-wx="jin"] { color: #E8A427; }
.zhu-tg[data-wx="shui"] { color: #2196F3; }

/* 主食高亮 */
.food-highlight { background: #E8F5E9; padding: 2px 8px; border-radius: 4px; }
.food-wx-highlight { color: #FF7043; font-weight: 600; }

/* 大小厄提醒 */
.tianbu-warning-must { color: #FF4444; }
.tianbu-warning-rest { color: #FF8800; }
.tianbu-warning-heal { color: #4CAF50; }

/* 五行幸运色圆点（动态 style 生成）*/
.color-dot[data-wx="mu"] { background: #4CAF50; }
.color-dot[data-wx="huo"] { background: #F44336; }
.color-dot[data-wx="tu"] { background: #E8A427; }
.color-dot[data-wx="jin"] { background: #C0C0C0; }
.color-dot[data-wx="shui"] { background: #191970; }

/* 择业标签（动态 style 生成）*/
.career-tag.mu { background: #E8F5E9; color: #2E7D32; }
.career-tag.shui { background: #E3F2FD; color: #1565C0; }
.career-tag.huo { background: #FFF3E0; color: #E65100; }

/* 分隔线 */
.divider-line { border-color: #E0D5C5; margin: 8px 0; }

/* ===== 地补模块增强样式 ===== */

/* 辅食分段 */
.food-assist-seg {
    font-size: 12px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 6px;
    padding: 4px 0;
}
.food-assist-avoid {
    font-size: 12px;
    color: #C62828;
    line-height: 1.8;
    margin-bottom: 6px;
    padding: 6px 8px;
    background: #FFF3F3;
    border-radius: 8px;
    border-left: 3px solid #C62828;
}

/* 五行宜忌食物卡片 */
.food-wx-assist-card {
    background: #F8F4F0;
    border-radius: 10px;
    padding: 12px;
    margin-top: 10px;
}
.food-wx-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}
.food-wx-row:last-child { margin-bottom: 0; }
.food-wx-label {
    display: inline-block;
    min-width: 36px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
    margin-top: 2px;
}
.food-wx-good {
    background: #E8F5E9;
    color: #2E7D32;
}
.food-wx-bad {
    background: #FFEBEE;
    color: #C62828;
}
.food-tag-good {
    background: #E8F5E9;
    color: #2E7D32;
    border-color: #A5D6A7;
}

/* ===== 人补模块增强样式 ===== */

/* 角色卡片 - 主角色高亮 */
.person-card-main {
    border-color: #8B6FD4;
    background: #F3E5F5;
}

/* 角色徽章 */
.role-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 4px;
    vertical-align: middle;
}
.role-badge-main {
    background: #8B6FD4;
    color: #fff;
}
.role-badge-complement {
    background: #4CAF50;
    color: #fff;
}
.role-badge-optional {
    background: #E0D5C5;
    color: #8C7060;
}

/* 团队角色列表 */
.team-role-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.team-role-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #F8F4F0;
    border-radius: 8px;
    font-size: 13px;
}
.team-role-main {
    background: #F3E5F5;
    font-weight: 600;
}
.team-role-optional {
    opacity: 0.6;
}

/* 姻缘匹配 */
.yinyuan-match-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0;
}
.yinyuan-match-item {
    border-radius: 10px;
    padding: 12px;
}
.yinyuan-good {
    background: #E8F5E9;
    border: 1.5px solid #A5D6A7;
}
.yinyuan-bad {
    background: #FFEBEE;
    border: 1.5px solid #FFCDD2;
}
.yinyuan-match-label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}
.yinyuan-good .yinyuan-match-label { color: #2E7D32; }
.yinyuan-bad .yinyuan-match-label { color: #C62828; }
.yinyuan-match-value {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}
.yinyuan-match-desc {
    font-size: 11px;
    color: #8C7060;
    line-height: 1.5;
}

/* 大厄冲突预警卡片 */
.yinyuan-warning-card {
    background: #FFF8E1;
    border-radius: 10px;
    padding: 12px;
    margin: 10px 0;
    border: 1.5px solid #FFE082;
}
.yinyuan-alert {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}
.yinyuan-alert:last-child { margin-bottom: 0; }
.yinyuan-alert-red {
    background: #FFEBEE;
    color: #C62828;
}
.yinyuan-alert-yellow {
    background: #FFF8E1;
    color: #F57F17;
}
.yinyuan-alert-green {
    background: #E8F5E9;
    color: #2E7D32;
}
.alert-icon {
    flex-shrink: 0;
}

/* 中和度说明卡片 */
.yinyuan-zhonghe-card {
    background: #F5EFEB;
    border-radius: 10px;
    padding: 12px;
    margin: 10px 0;
}

/* ===== 运动模块增强样式 ===== */

.sport-detail-card {
    background: #F8F4F0;
    border-radius: 10px;
    padding: 12px;
    margin-top: 10px;
}
.sport-detail-row {
    font-size: 13px;
    color: #3A2A1A;
    margin-bottom: 6px;
    line-height: 1.6;
}

/* 穿搭颜色展示 */
.sport-color-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sport-color-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sport-color-label {
    font-size: 13px;
    font-weight: 700;
    color: #3A2A1A;
}
.sport-color-items {
    display: flex;
    gap: 12px;
}
.sport-color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.sport-color-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.sport-color-name {
    font-size: 12px;
    font-weight: 600;
    color: #3A2A1A;
}
.sport-color-wx {
    font-size: 10px;
    color: #8C7060;
}

/* ===== 天赋模块增强样式 ===== */

/* 天赋维度进度条 */
.talent-dims {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.talent-dim-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.talent-dim-icon {
    font-size: 20px;
    flex-shrink: 0;
}
.talent-dim-info {
    flex: 1;
    min-width: 0;
}
.talent-dim-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.talent-dim-name {
    font-size: 13px;
    font-weight: 600;
    color: #3A2A1A;
}
.talent-bar-bg {
    height: 8px;
    background: #E0D5C5;
    border-radius: 4px;
    overflow: hidden;
}
.talent-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: #C0B0A0;
    transition: width 0.3s;
}
.talent-bar-main {
    background: linear-gradient(135deg, #8B6FD4, #6A4FC0);
}
.talent-bar-sub {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
}
.talent-dim-score {
    font-size: 11px;
    color: #8C7060;
    text-align: right;
    margin-top: 2px;
}

/* 天赋总结卡片 */
.talent-summary-card {
    background: #F3E5F5;
    border-radius: 10px;
    padding: 12px;
    margin-top: 12px;
    border: 1.5px solid #CE93D8;
}
.talent-summary-title {
    font-size: 15px;
    font-weight: 700;
    color: #6A1B9A;
    margin-bottom: 6px;
}

/* 先天弱脏详情卡片 */
.weak-organ-card {
    background: #FFF8E1;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1.5px solid #FFE082;
}
.weak-organ-row {
    font-size: 13px;
    color: #3A2A1A;
    margin-bottom: 6px;
    line-height: 1.8;
}

/* 文理判定进度条 */
.wenli-bar-bg {
    height: 12px;
    background: #E0D5C5;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    margin: 8px 0 4px;
}
.wenli-bar-wen {
    background: linear-gradient(135deg, #8B6FD4, #6A4FC0);
    border-radius: 6px 0 0 6px;
}
.wenli-bar-li {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    border-radius: 0 6px 6px 0;
}
.wenli-legend {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #8C7060;
    margin-bottom: 8px;
}

/* ===== 择业模块增强样式 ===== */

/* 行业五行分组 */
.career-wx-group {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #FDFBF9;
}
.career-wx-main {
    background: #F3E5F5;
    border: 1.5px solid #CE93D8;
}
.career-wx-label {
    display: inline-block;
    min-width: 28px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    flex-shrink: 0;
    margin-top: 2px;
}
.career-wx-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.career-tag-active {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    font-weight: 700;
}

/* 职业决策建议卡片 */
.career-decision-card {
    background: #E3F2FD;
    border-radius: 10px;
    padding: 12px;
    margin-top: 12px;
    border: 1.5px solid #90CAF9;
}

/* ===== 响应式补充 ===== */
@media (max-width: 640px) {
    .yinyuan-match-row {
        grid-template-columns: 1fr;
    }
    .sport-color-items {
        gap: 8px;
    }
}
