/* ========================================
   专业八字排盘样式 - 对标天启排盘
   ======================================== */

/* ========================================
   基础信息区
   ======================================== */
.bazi-basic-info {
    background: linear-gradient(180deg, #FDFCFB 0%, #F8F6F3 100%);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.bazi-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 30px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.bazi-info-row:last-child {
    margin-bottom: 0;
}

.bazi-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bazi-info-label {
    color: var(--text-muted);
}

.bazi-info-value {
    font-weight: 500;
}

.bazi-info-value.highlight {
    color: var(--red-deep);
    font-weight: 600;
}

/* 四柱快捷显示 */
.bazi-quick-sizhu {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.quick-pillar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: bold;
}

.quick-pillar.year { background: #E8F5E9; color: #2E7D32; }
.quick-pillar.month { background: #FFEBEE; color: #C62828; }
.quick-pillar.day { background: #FFF3E0; color: #E65100; }
.quick-pillar.hour { background: #E3F2FD; color: #1565C0; }

.quick-pillar .ganzhi {
    font-size: 1rem;
}

.quick-pillar .dizhi-sub {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* ========================================
   专业四柱排盘 - 列式布局（对标天启排盘）
   ======================================== */
.bazi-columns {
    display: flex;
    border: 2px solid var(--red-deep);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
    background: white;
}

.bazi-side-label {
    width: 45px;
    background: linear-gradient(135deg, var(--red-deep), var(--red-medium));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bazi-side-label span {
    color: white;
    font-size: 1.8rem;
    font-family: 'Ma Shan Zheng', serif;
    font-weight: bold;
}

.bazi-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-light);
    text-align: center;
}

.bazi-column.day-col {
    background: linear-gradient(180deg, #FFF5F5, #FFE8E8);
    border-left: 2px solid var(--red-deep);
    border-right: 2px solid var(--red-deep);
}

.bazi-column.day-col .col-tiangan .gan {
    color: var(--red-deep);
}

.bazi-column.day-col .col-dizhi .zhi {
    color: var(--red-deep);
}

/* 表头 */
.col-header {
    padding: 10px 4px;
    background: linear-gradient(180deg, #F5F0E6, #EDE5D8);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-light);
}

.bazi-column.day-col .col-header {
    background: linear-gradient(180deg, #FFE0E0, #FFD0D0);
}

/* 十神 */
.col-shishen {
    padding: 8px 4px;
    font-size: 0.85rem;
    color: var(--red-medium);
    background: rgba(139,35,35,0.03);
    border-bottom: 1px solid var(--border-light);
    font-weight: 500;
}

/* 天干 */
.col-tiangan {
    padding: 15px 4px;
    position: relative;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.col-tiangan .gan {
    font-size: 2.5rem;
    font-weight: bold;
    font-family: 'Ma Shan Zheng', serif;
}

.col-tiangan .ss-left,
.col-tiangan .ss-right {
    position: absolute;
    top: 3px;
    font-size: 0.55rem;
    color: var(--gold-dark);
    font-weight: 500;
}

.col-tiangan .ss-left { left: 4px; }
.col-tiangan .ss-right { right: 4px; }

/* 地支 */
.col-dizhi {
    padding: 12px 4px;
    position: relative;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.col-dizhi .zhi {
    font-size: 2.2rem;
    font-weight: bold;
    font-family: 'Ma Shan Zheng', serif;
}

.col-dizhi .zhi-ss-list {
    position: absolute;
    left: 3px;
    top: 3px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 0.5rem;
    line-height: 1.3;
    text-align: left;
}

.col-dizhi .zhi-ss-list .ji { color: #2E7D32; }
.col-dizhi .zhi-ss-list .xiong { color: #C62828; }

/* 藏干 */
.col-canggan {
    padding: 8px 4px;
    background: rgba(139,35,35,0.02);
    border-bottom: 1px solid var(--border-light);
    height: 70px;  /* 固定高度，确保各列对齐 */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.col-canggan .cg-item {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    font-size: 0.8rem;
    line-height: 1.5;
}

.col-canggan .cg-g {
    font-weight: bold;
}

.col-canggan .cg-s {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* 十二长生 */
.col-changsheng {
    padding: 6px 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(139,35,35,0.03);
    border-bottom: 1px solid var(--border-light);
    height: 32px;  /* 固定高度，确保各列对齐 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 纳音 */
.col-nayin {
    padding: 6px 4px;
    font-size: 0.75rem;
    color: #1565C0;
    background: rgba(21,101,192,0.05);
    height: 32px;  /* 固定高度，确保各列对齐 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 五行颜色 */
.wx-wood { color: #2E7D32 !important; }
.wx-fire { color: #C62828 !important; }
.wx-earth { color: #E65100 !important; }
.wx-metal { color: #B8860B !important; }
.wx-water { color: #1565C0 !important; }

/* ========================================
   命理信息区（胎元、命宫等）- 横排紧凑版
   ======================================== */
.bazi-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #F8F6F3, #F5F3F0);
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

.meta-tag {
    font-size: 0.85rem;
    color: var(--text-dark);
}

.meta-tag b {
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 5px;
}

.meta-tag em {
    font-style: normal;
    color: #1565C0;
    font-size: 0.75rem;
    margin-left: 3px;
}

/* ========================================
   喜用神区域
   ======================================== */
.xiyong-section {
    margin-bottom: 20px;
}

.xiyong-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.xiyong-item {
    text-align: center;
    padding: 15px 10px;
    border-radius: 10px;
    border: 2px solid;
}

.xiyong-item.xishen {
    background: linear-gradient(180deg, #E8F5E9, #C8E6C9);
    border-color: #4CAF50;
}

.xiyong-item.yongshen {
    background: linear-gradient(180deg, #E3F2FD, #BBDEFB);
    border-color: #2196F3;
}

.xiyong-item.jishen {
    background: linear-gradient(180deg, #FFEBEE, #FFCDD2);
    border-color: #F44336;
}

.xiyong-item.choushen {
    background: linear-gradient(180deg, #FFF3E0, #FFE0B2);
    border-color: #FF9800;
}

.xiyong-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.xiyong-value {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Ma Shan Zheng', serif;
}

/* ========================================
   神煞标签区
   ======================================== */
.shensha-section {
    margin-bottom: 20px;
}

.shensha-title {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 3px solid var(--red-deep);
}

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

.shensha-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.shensha-tag.ji {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    color: #2E7D32;
    border: 1px solid #A5D6A7;
}

.shensha-tag.xiong {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    color: #C62828;
    border: 1px solid #EF9A9A;
}

.shensha-tag.zhong {
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    color: #F57F17;
    border: 1px solid #FFE082;
}

/* ========================================
   大运时间线
   ======================================== */
.dayun-section {
    margin-bottom: 20px;
}

.dayun-title {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid var(--red-deep);
}

.dayun-timeline {
    display: flex;
    overflow-x: auto;
    gap: 0;
    padding-bottom: 10px;
}

.dayun-item {
    flex: 0 0 auto;
    min-width: 70px;
    text-align: center;
    padding: 10px 8px;
    border: 1px solid var(--border-light);
    border-right: none;
    background: white;
    position: relative;
}

.dayun-item:first-child {
    border-radius: 8px 0 0 8px;
}

.dayun-item:last-child {
    border-radius: 0 8px 8px 0;
    border-right: 1px solid var(--border-light);
}

.dayun-item.current {
    background: linear-gradient(180deg, #FFF8F8, #FFEFEF);
    border-color: var(--red-deep);
    border-width: 2px;
}

.dayun-item.current::after {
    content: '当前';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--red-deep);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 8px;
}

.dayun-year {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.dayun-age {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.dayun-ganzhi {
    font-size: 1.1rem;
    font-weight: bold;
    font-family: 'Ma Shan Zheng', serif;
    color: var(--text-dark);
    line-height: 1.2;
}

.dayun-ganzhi .gan {
    display: block;
}

.dayun-ganzhi .zhi {
    display: block;
}

.dayun-shishen {
    font-size: 0.6rem;
    color: var(--red-medium);
    margin-top: 4px;
}

/* 小运标识 */
.dayun-item.xiaoyun {
    background: linear-gradient(180deg, #F5F5F5, #EEEEEE);
}

.dayun-item.xiaoyun .dayun-ganzhi {
    color: var(--text-muted);
}

/* ========================================
   流年卡片
   ======================================== */
.liunian-section {
    margin-bottom: 20px;
}

.liunian-title {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid var(--gold);
}

.liunian-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.liunian-card-mini {
    background: linear-gradient(180deg, #FDFCFB, #F8F6F3);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.liunian-card-mini.current {
    border-color: var(--gold);
    border-width: 2px;
    background: linear-gradient(180deg, #FFFBF0, #FFF8E7);
}

.liunian-card-year {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.liunian-card-ganzhi {
    font-size: 1.4rem;
    font-weight: bold;
    font-family: 'Ma Shan Zheng', serif;
    color: var(--red-deep);
    margin-bottom: 6px;
}

.liunian-card-nayin {
    font-size: 0.75rem;
    color: #1565C0;
    background: rgba(21,101,192,0.08);
    padding: 3px 10px;
    border-radius: 10px;
    display: inline-block;
}

/* 增强版流年卡片 */
.liunian-cards-enhanced {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.liunian-card-enhanced {
    background: linear-gradient(180deg, #FDFCFB, #F8F6F3);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 18px 15px;
    text-align: center;
}

.liunian-card-enhanced.current {
    border-color: var(--gold);
    border-width: 2px;
    background: linear-gradient(180deg, #FFFBF0, #FFF8E7);
}

.liunian-card-enhanced .ln-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.liunian-card-enhanced .ln-year {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.liunian-card-enhanced .ln-badge {
    background: var(--red-deep);
    color: white;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.liunian-card-enhanced .ln-ganzhi {
    font-size: 1.6rem;
    font-weight: bold;
    font-family: 'Ma Shan Zheng', serif;
    color: var(--red-deep);
    margin-bottom: 5px;
}

.liunian-card-enhanced .ln-nayin {
    font-size: 0.75rem;
    color: #1565C0;
    margin-bottom: 12px;
}

.liunian-card-enhanced .ln-details {
    background: rgba(139,35,35,0.03);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.liunian-card-enhanced .ln-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.liunian-card-enhanced .ln-row:last-child {
    margin-bottom: 0;
}

.liunian-card-enhanced .ln-label {
    color: var(--text-muted);
}

.liunian-card-enhanced .ln-value {
    color: var(--text-dark);
    font-weight: 500;
}

.liunian-card-enhanced .ln-comment {
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 15px;
    font-weight: 500;
}

.liunian-card-enhanced .ln-comment.good {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    color: #2E7D32;
}

.liunian-card-enhanced .ln-comment.bad {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    color: #C62828;
}

.liunian-card-enhanced .ln-comment.normal {
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    color: #F57F17;
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 768px) {
    .bazi-info-row {
        gap: 10px 20px;
        font-size: 0.85rem;
    }
    
    .bazi-meta-row {
        gap: 10px;
        padding: 10px;
    }
    
    .xiyong-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bazi-columns {
        flex-wrap: wrap;
    }
    
    .bazi-side-label {
        width: 100%;
        height: 35px;
    }
    
    .bazi-column {
        min-width: 25%;
    }
    
    .col-tiangan .gan {
        font-size: 1.6rem;
    }
    
    .col-dizhi .zhi {
        font-size: 1.4rem;
    }
    
    .dayun-item {
        min-width: 60px;
        padding: 8px 6px;
    }
    
    .liunian-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

/* ========================================
   五行分析增强样式
   ======================================== */
.wuxing-item.strong {
    border-color: #C62828;
    background: linear-gradient(180deg, #FFEBEE, #FFCDD2);
}

.wuxing-stats {
    margin-top: 15px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #F5F5F5, #EEEEEE);
    border-radius: 8px;
    font-size: 0.9rem;
}

.stats-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.stats-row:last-child {
    margin-bottom: 0;
}

.stats-label {
    color: var(--text-muted);
}

.stats-value {
    font-weight: 500;
    color: var(--text-dark);
}

.wuxing-analysis {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wuxing-strong {
    color: #C62828;
    font-weight: 600;
}

.wuxing-missing {
    color: #1565C0;
    font-weight: 600;
}

.wuxing-daymaster-analysis {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(139,35,35,0.03), rgba(139,35,35,0.06));
    border-radius: 10px;
    border-left: 3px solid var(--red-deep);
}

.wuxing-daymaster-analysis .analysis-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--red-deep);
    margin-bottom: 8px;
}

.wuxing-daymaster-analysis .analysis-content {
    font-size: 0.85rem;
    color: var(--text-dark);
    line-height: 1.7;
}

/* ========================================
   五行详解区域
   ======================================== */
.wuxing-detail-section {
    margin-top: 25px;
}

.detail-block {
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(180deg, #FDFCFB, #F8F6F3);
    border: 1px solid var(--border-light);
    border-radius: 10px;
}

.detail-block:last-child {
    margin-bottom: 0;
}

.detail-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-title i {
    color: var(--red-deep);
}

.detail-content {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.8;
    text-align: justify;
}
