/**
 * 八字排盘样式
 */

/* Tab切换按钮 */
.result-tabs {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(58, 63, 94, 0.6) 0%, rgba(42, 46, 70, 0.6) 100%);
    border-bottom: 2px solid rgba(124, 58, 237, 0.3);
    border-radius: 12px 12px 0 0;
}

.result-tab {
    flex: 1;
    padding: 12px 24px;
    background: rgba(51, 55, 82, 0.5);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 8px;
    color: #a0a0b8;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.3), transparent);
    transition: left 0.5s;
}

.result-tab:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.4);
    color: #e8e8f0;
    transform: translateY(-2px);
}

.result-tab:hover::before {
    left: 100%;
}

.result-tab.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
    border-color: #7c3aed;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

/* Tab内容 */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 八字排盘显示 */
.bazi-container {
    padding: 25px;
    background: linear-gradient(135deg, rgba(42, 46, 70, 0.4) 0%, rgba(28, 31, 50, 0.4) 100%);
    border-radius: 12px;
    margin: 20px;
}

.bazi-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(124, 58, 237, 0.3);
}

.bazi-title {
    font-size: 24px;
    font-weight: 600;
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.bazi-time-info {
    font-size: 14px;
    color: #a0a0b8;
    line-height: 1.6;
}

/* 四柱显示 */
.bazi-pillars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.bazi-pillar {
    background: linear-gradient(135deg, rgba(58, 63, 94, 0.5) 0%, rgba(42, 46, 70, 0.5) 100%);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.bazi-pillar:hover {
    border-color: #7c3aed;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.pillar-label {
    font-size: 13px;
    color: #a0a0b8;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pillar-gan-zhi {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b 0%, #eab308 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 10px 0;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.pillar-wu-xing {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
    font-size: 12px;
}

.wu-xing-tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.wu-xing-tag.wood {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.wu-xing-tag.fire {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.wu-xing-tag.earth {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.wu-xing-tag.metal {
    background: rgba(229, 229, 229, 0.2);
    color: #e5e5e5;
    border: 1px solid rgba(229, 229, 229, 0.4);
}

.wu-xing-tag.water {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.pillar-shi-shen {
    font-size: 13px;
    color: #8b5cf6;
    margin-top: 8px;
    font-weight: 500;
}

/* 十神分析 */
.bazi-section {
    background: linear-gradient(135deg, rgba(58, 63, 94, 0.3) 0%, rgba(42, 46, 70, 0.3) 100%);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #e8e8f0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.3);
}

.section-title::before {
    content: '◆ ';
    color: #7c3aed;
    margin-right: 8px;
}

/* 五行分析 */
.wu-xing-analysis {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding-top: 120px;
    /* 为向上显示的tooltip预留空间 */
    margin-top: -100px;
    /* 补偿padding，保持视觉位置 */
}

.wu-xing-item {
    text-align: center;
    padding: 15px;
    background: rgba(51, 55, 82, 0.5);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.wu-xing-item:hover {
    border-color: rgba(124, 58, 237, 0.5);
    transform: scale(1.05);
}

.wu-xing-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.wu-xing-count {
    font-size: 24px;
    font-weight: 700;
    margin: 8px 0;
}

.wu-xing-percentage {
    font-size: 12px;
    color: #a0a0b8;
}

.wu-xing-level {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    margin-top: 6px;
    display: inline-block;
}

.wu-xing-level.strong {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.wu-xing-level.balanced {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.wu-xing-level.weak {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* 五行 Tooltip 效果 */
.wu-xing-item:hover .wu-xing-tooltip {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* 大运显示 */
.da-yun-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.da-yun-item {
    background: rgba(51, 55, 82, 0.5);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.da-yun-item:hover {
    border-color: #7c3aed;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.da-yun-gan-zhi {
    font-size: 20px;
    font-weight: 600;
    color: #f59e0b;
    margin-bottom: 5px;
}

.da-yun-age {
    font-size: 12px;
    color: #a0a0b8;
}

/* 神煞显示 */
.shen-sha-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.shen-sha-item {
    background: rgba(51, 55, 82, 0.5);
    border-left: 3px solid #7c3aed;
    border-radius: 6px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.shen-sha-item:hover {
    background: rgba(124, 58, 237, 0.1);
    transform: translateX(5px);
}

.shen-sha-name {
    font-size: 14px;
    font-weight: 600;
    color: #8b5cf6;
    margin-bottom: 5px;
}

.shen-sha-desc {
    font-size: 12px;
    color: #a0a0b8;
    line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════
   增强版八字样式 — 人生维度、喜用神、四柱重构
   ══════════════════════════════════════════════════════════════ */

/* 头部增强 */
.bazi-subtitle {
    font-size: 16px;
    letter-spacing: 6px;
    color: #f59e0b;
    margin: 6px 0 4px;
    font-weight: 600;
}

.bazi-time-sep { color: rgba(255,255,255,0.2); margin: 0 8px; }
.bazi-jieqi-badge {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.4);
    border-radius: 20px;
    color: #10b981;
    font-size: 12px;
}

.bazi-strength-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
}
.bazi-strength-badge.strength-strong {
    background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(79,70,229,0.25));
    border: 1px solid rgba(124,58,237,0.5);
    color: #a78bfa;
}
.bazi-strength-badge.strength-weak {
    background: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(220,38,38,0.2));
    border: 1px solid rgba(239,68,68,0.4);
    color: #f87171;
}
.bazi-strength-badge.strength-neutral {
    background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(5,150,105,0.2));
    border: 1px solid rgba(16,185,129,0.4);
    color: #34d399;
}

/* 四柱增强 */
.pillar-subtitle { font-size: 11px; color: #6b7280; margin-bottom: 6px; }
.pillar-nayin { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 4px; }
.pillar-hide-gan { font-size: 11px; color: #8b5cf6; margin-top: 3px; }
.pillar-yin-yang { font-size: 12px; color: #9ca3af; margin-top: 5px; }

/* 五行条形图 */
.wu-xing-note {
    font-size: 12px; color: #6b7280; margin-bottom: 10px; line-height: 1.5;
    padding: 6px 10px; background: rgba(255,255,255,.02); border-radius: 6px;
}

.wu-xing-bars { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.wx-bar-row { display: flex; align-items: center; gap: 8px; }
.wx-bar-label { width: 20px; font-size: 15px; font-weight: 700; text-align: center; flex-shrink: 0; }
.wx-bar-track {
    flex: 1; height: 18px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
}
.wx-bar-fill { height: 100%; border-radius: 4px; transition: width 0.8s cubic-bezier(.4,0,.2,1); }
.wx-bar-count { width: 20px; text-align: center; font-size: 15px; font-weight: 700; color: #e5e7eb; flex-shrink: 0; }
.wx-bar-pct { width: 40px; text-align: right; font-size: 11px; color: #6b7280; flex-shrink: 0; }
.wx-bar-level {
    width: 36px; text-align: center; font-size: 11px; padding: 2px 6px;
    border-radius: 10px; flex-shrink: 0;
}
.wx-bar-level.level-strong { background: rgba(34,197,94,.15); color: #22c55e; border: 1px solid rgba(34,197,94,.3); }
.wx-bar-level.level-weak   { background: rgba(239,68,68,.15);  color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.wx-bar-level.level-balanced { background: rgba(59,130,246,.12); color: #60a5fa; border: 1px solid rgba(59,130,246,.25); }

/* ── 日主旺衰评分透明面板 ─────────────────────────────────── */
.strength-detail-panel {
    margin-top: 14px;
    border-radius: 10px;
    border: 1px solid rgba(124,58,237,.22);
    overflow: hidden;
}
.sdp-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    background: rgba(124,58,237,.1);
    cursor: pointer;
    user-select: none;
    gap: 10px;
}
.sdp-header:hover { background: rgba(124,58,237,.16); }
.sdp-title { font-size: 12px; color: #a78bfa; font-weight: 500; }
.sdp-result { font-size: 12px; white-space: nowrap; }
.sdp-result strong { font-size: 13px; }

.sdp-body {
    display: none;
    padding: 14px;
    background: rgba(0,0,0,.2);
}
.strength-detail-panel.sdp-open .sdp-body { display: block; }

.sdp-explain {
    font-size: 12px; color: #9ca3af; line-height: 1.7; margin-bottom: 12px;
    padding: 8px 12px; background: rgba(124,58,237,.06); border-radius: 6px;
}
.sdp-explain b { color: #c4b5fd; }

.sdp-score-bar {
    height: 6px; background: rgba(255,255,255,.06);
    border-radius: 3px; overflow: hidden; margin-bottom: 14px;
}
.sdp-score-fill { height: 100%; border-radius: 3px; transition: width 0.8s ease; }

.sdp-rows { display: flex; flex-direction: column; gap: 4px; }
.sd-row {
    display: grid;
    grid-template-columns: 36px 36px 36px 70px 1fr;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 12px;
}
.sd-header {
    background: rgba(255,255,255,.04);
    color: #6b7280; font-size: 11px; font-weight: 600;
}
.sd-support { background: rgba(34,197,94,.06); }
.sd-neutral { background: rgba(255,255,255,.02); }
.sd-moon { background: rgba(167,139,250,.1) !important; border: 1px solid rgba(167,139,250,.2); }
.sd-total {
    background: rgba(124,58,237,.12);
    border-top: 1px solid rgba(124,58,237,.2);
    margin-top: 4px;
    font-weight: 600;
}

.sd-pos { color: #9ca3af; }
.sd-char { color: #e5e7eb; font-weight: 600; text-align: center; }
.sd-wx  { color: #c4b5fd; text-align: center; }
.sd-pt  { text-align: center; font-weight: 700; }
.sd-pt-yes { color: #34d399; }
.sd-pt-no  { color: #4b5563; }
.sd-note   { color: #6b7280; font-size: 11px; }
.sd-moon-tag {
    display: inline-block; margin-left: 4px;
    font-size: 10px; color: #a78bfa; font-weight: 500;
    background: rgba(124,58,237,.2); border-radius: 3px;
    padding: 0px 4px;
}

/* 喜用神重构 */
.xiyong-section { border-left-color: #10b981 !important; }
.xiyong-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.xiyong-col {}
.xiyong-group-label { font-size: 12px; color: #9ca3af; margin-bottom: 10px; font-weight: 500; }
.xiyong-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.xiyong-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 14px; border-radius: 20px; border: 1px solid;
    font-size: 14px; font-weight: 600; letter-spacing: 1px;
    transition: all .2s ease;
}
.xiyong-tag.favorable { background: rgba(255,255,255,.05); }
.xiyong-tag.unfavorable { background: rgba(255,255,255,.02); }
.xiyong-tag-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.xiyong-reason {
    padding: 14px 16px;
    background: rgba(0,0,0,.2);
    border-radius: 8px;
    border: 1px dashed rgba(16,185,129,.3);
    margin-bottom: 10px;
}
.xiyong-reason-icon { font-size: 11px; color: #10b981; font-weight: 500; margin-bottom: 6px; }
.xiyong-reason-text { font-size: 13px; color: #d1d5db; line-height: 1.7; }

.xiyong-basis {
    padding: 10px 14px;
    background: rgba(99,102,241,.07);
    border-radius: 8px;
    border: 1px dashed rgba(99,102,241,.25);
    margin-bottom: 14px;
}
.xiyong-basis-icon { font-size: 11px; color: #818cf8; font-weight: 500; margin-bottom: 5px; }
.xiyong-basis-text { font-size: 12px; color: #a5b4fc; line-height: 1.7; }

.xiyong-tips { padding: 12px 0 0; }
.xiyong-tips-title { font-size: 12px; color: #6b7280; margin-bottom: 10px; font-weight: 500; }
.xiyong-tip-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; margin-bottom: 6px;
    background: rgba(255,255,255,.03); border-radius: 6px;
    font-size: 12px; color: #9ca3af;
}
.tip-wx {
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(124,58,237,.2);
    font-size: 12px; font-weight: 700; color: #a78bfa; flex-shrink: 0;
}
.tip-detail { flex: 1; line-height: 1.5; }
.tip-detail b { color: #e5e7eb; }

/* ── 人生维度卡片 ──────────────────────────────────────────── */
.life-dimensions-section { border-color: rgba(124,58,237,.3) !important; }

.life-dim-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.life-dim-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(28,31,50,.5);
    transition: transform .2s ease, box-shadow .2s ease;
}
.life-dim-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,.4);
}

.life-dim-header {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
}
.life-dim-icon { font-size: 22px; opacity: .9; }
.life-dim-title { font-size: 15px; font-weight: 700; color: #fff; }
.life-dim-subtitle { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 2px; }

.life-dim-body {
    padding: 16px;
    font-size: 13px;
    color: #d1d5db;
    line-height: 1.6;
}

.dim-block { margin-bottom: 14px; }
.dim-block:last-child { margin-bottom: 0; }
.dim-block-title {
    font-size: 11px; font-weight: 600; color: #8b5cf6;
    text-transform: uppercase; letter-spacing: .5px;
    margin-bottom: 5px;
}
.dim-text { font-size: 13px; color: #c4c9d4; line-height: 1.65; margin: 0; }

.dim-tags-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dim-badge {
    padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
}
.dim-badge.purple { background: rgba(124,58,237,.2); color: #a78bfa; border: 1px solid rgba(124,58,237,.35); }
.dim-badge.blue   { background: rgba(59,130,246,.15); color: #60a5fa; border: 1px solid rgba(59,130,246,.3); }
.dim-badge.red    { background: rgba(239,68,68,.15);  color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.dim-badge.green  { background: rgba(16,185,129,.15); color: #34d399; border: 1px solid rgba(16,185,129,.3); }
.dim-badge.amber  { background: rgba(245,158,11,.15); color: #fbbf24; border: 1px solid rgba(245,158,11,.3); }
.dim-badge.gray   { background: rgba(107,114,128,.15);color: #9ca3af; border: 1px solid rgba(107,114,128,.3); }

/* 健康五行格 */
.health-elements-grid {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 8px; margin-bottom: 16px;
}
.health-item {
    text-align: center; padding: 10px 6px;
    background: rgba(255,255,255,.04);
    border-radius: 8px; border: 1px solid rgba(255,255,255,.07);
    position: relative; transition: all .2s;
}
.health-item.health-weak {
    border-color: rgba(239,68,68,.4);
    background: rgba(239,68,68,.06);
}
.health-item.health-strong {
    border-color: rgba(245,158,11,.4);
    background: rgba(245,158,11,.06);
}
.health-el-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.health-organ { font-size: 10px; color: #9ca3af; line-height: 1.3; }
.health-pct { font-size: 13px; font-weight: 600; color: #d1d5db; margin-top: 4px; }
.health-warn-badge {
    font-size: 9px; color: #f87171; background: rgba(239,68,68,.1);
    border-radius: 4px; padding: 1px 5px; margin-top: 4px; display: inline-block;
}
.health-strong-badge {
    font-size: 9px; color: #fbbf24; background: rgba(245,158,11,.1);
    border-radius: 4px; padding: 1px 5px; margin-top: 4px; display: inline-block;
}

.health-advice-section { padding-top: 12px; border-top: 1px solid rgba(255,255,255,.06); }
.health-advice-item {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 8px 10px; margin-bottom: 6px;
    background: rgba(0,0,0,.15); border-radius: 6px;
    font-size: 12px; color: #c4c9d4; line-height: 1.6;
}
.advice-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* 十神卡片增强 */
.shi-shen-card {
    background: linear-gradient(135deg, rgba(51,55,82,.6), rgba(51,55,82,.4));
    padding: 14px; border-radius: 10px;
    border-left: 3px solid #7c3aed;
    transition: all .25s ease;
}
.shi-shen-card:hover { background: linear-gradient(135deg, rgba(124,58,237,.15), rgba(51,55,82,.5)); transform: translateY(-2px); }
.ssc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ssc-pos { font-size: 11px; color: #6b7280; }
.ssc-name { font-size: 16px; font-weight: 600; color: #e8e8f0; }
.ssc-desc { font-size: 11px; color: #9ca3af; line-height: 1.5; margin-bottom: 6px; padding: 6px 8px; background: rgba(0,0,0,.2); border-radius: 5px; border-left: 2px solid #7c3aed; }
.ssc-life { font-size: 11px; color: #8b5cf6; margin-top: 4px; }

/* 大运增强 */
.da-yun-item {
    background: rgba(51,55,82,.5);
    border: 1px solid rgba(124,58,237,.2);
    border-radius: 8px; padding: 12px;
    text-align: center; transition: all .25s ease;
    cursor: pointer;
}
.da-yun-item:hover { border-color: #7c3aed; box-shadow: 0 4px 16px rgba(124,58,237,.3); transform: scale(1.04); }
.da-yun-year { font-size: 10px; color: #6b7280; margin-top: 2px; }
.da-yun-desc {
    margin-top: 8px; padding: 6px 8px;
    background: rgba(0,0,0,.25); border-radius: 5px;
    font-size: 10px; color: #9ca3af; line-height: 1.4;
    border-left: 2px solid #f59e0b; text-align: left;
}

/* AI深度解读按钮 */
.bazi-ai-btn-wrap { text-align: center; padding: 24px 0 10px; }
.bazi-ai-deep-btn {
    position: relative; overflow: hidden;
    padding: 14px 40px; font-size: 15px; font-weight: 600;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff; border: none; border-radius: 30px;
    cursor: pointer; transition: all .3s ease;
    box-shadow: 0 4px 20px rgba(124,58,237,.4);
}
.bazi-ai-deep-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(124,58,237,.6); }
.bazi-ai-deep-btn:active { transform: translateY(0); }
.ai-btn-glow {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }

.bazi-ai-deep-btn:disabled {
    opacity: .6; cursor: not-allowed; transform: none !important;
}

.bazi-ai-result {
    margin-top: 20px; border-radius: 14px; overflow: hidden;
    border: 1px solid rgba(124,58,237,.3); text-align: left;
    animation: fadeInUp .4s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* AI 加载态 */
.bazi-ai-loading {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    padding: 40px 20px;
    background: rgba(15,20,45,.7);
    color: #a0a0b8; font-size: 14px;
}
.bazi-ai-loading-ring {
    width: 40px; height: 40px;
    border: 3px solid rgba(124,58,237,.2);
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* AI 报告卡片 */
.bazi-ai-report { background: rgba(12,15,36,.85); }

.bar-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(124,58,237,.35), rgba(79,70,229,.25));
    border-bottom: 1px solid rgba(124,58,237,.25);
}
.bar-icon { font-size: 20px; }
.bar-title { font-size: 16px; font-weight: 700; color: #e9d5ff; }
.bar-sub {
    margin-left: auto; font-size: 12px; color: #a78bfa;
    background: rgba(124,58,237,.2); padding: 2px 10px;
    border-radius: 10px; white-space: nowrap;
}

.bar-body {
    padding: 20px 24px;
    font-size: 14px; color: #d1d5db; line-height: 1.85;
    max-height: 600px; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: rgba(124,58,237,.3) transparent;
}
.bar-body::-webkit-scrollbar { width: 5px; }
.bar-body::-webkit-scrollbar-thumb { background: rgba(124,58,237,.3); border-radius: 3px; }

.bar-h3 {
    font-size: 15px; font-weight: 700; color: #c4b5fd;
    margin: 20px 0 10px;
    padding-left: 10px;
    border-left: 3px solid #7c3aed;
}
.bar-h4 {
    font-size: 13px; font-weight: 600; color: #a78bfa;
    margin: 14px 0 6px;
}
.bar-p { margin: 0 0 10px; }
.bar-body strong { color: #e9d5ff; }
.bar-body em { color: #fbbf24; font-style: normal; }

.bar-footer {
    padding: 10px 20px;
    font-size: 11px; color: #4b5563;
    background: rgba(0,0,0,.2);
    border-top: 1px solid rgba(255,255,255,.05);
}

/* 错误态 */
.bazi-ai-error {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px;
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.2);
    border-radius: 10px; color: #f87171; font-size: 13px;
    margin-top: 16px;
}
.bazi-ai-retry-btn {
    margin-left: auto; padding: 4px 14px; font-size: 12px;
    background: rgba(239,68,68,.15); color: #f87171;
    border: 1px solid rgba(239,68,68,.3); border-radius: 6px;
    cursor: pointer; transition: all .2s;
}
.bazi-ai-retry-btn:hover { background: rgba(239,68,68,.25); }

/* Loading ring */
.bazi-loading-ring {
    width: 48px; height: 48px; margin: 0 auto;
    border: 3px solid rgba(124,58,237,.2);
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 响应式 */
@media (max-width: 900px) {
    .life-dim-grid { grid-template-columns: 1fr; }
    .xiyong-grid { grid-template-columns: 1fr; }
    .health-elements-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .bazi-pillars { grid-template-columns: repeat(2, 1fr); }
    .wu-xing-analysis { grid-template-columns: repeat(3, 1fr); }
    .shen-sha-list { grid-template-columns: 1fr; }
    .da-yun-list { grid-template-columns: repeat(3, 1fr); }
    .life-dim-grid { grid-template-columns: 1fr; }
}