/* ========================================
   紫微斗数页面样式 - 专业版
   ======================================== */

.ziwei-main {
    min-height: 100vh;
    padding-top: 70px;
    background: var(--bg-cream);
}

.ziwei-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* 主Tab切换 */
.main-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px;
    border-radius: 25px;
}

.main-tab {
    padding: 10px 30px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s;
}

.main-tab.active {
    background: linear-gradient(135deg, #6B5B95 0%, #8B7BAF 100%);
    color: white;
}

.main-tab:hover:not(.active) {
    background: rgba(107, 91, 149, 0.1);
}

/* 用户信息栏 */
.user-bar {
    text-align: center;
    padding: 15px;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.user-bar span {
    margin: 0 10px;
}

.user-name {
    font-weight: 600;
    color: var(--red-deep);
}

/* 命盘网格 */
.chart-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.ziwei-chart {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, auto);
    gap: 2px;
    background: #6B5B95;
    border: 2px solid #6B5B95;
    border-radius: 10px;
    overflow: hidden;
    min-width: 700px;
}

/* 宫位样式 */
.palace {
    background: white;
    padding: 10px 8px;
    min-height: 120px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.palace-name {
    position: absolute;
    bottom: 5px;
    right: 8px;
    font-size: 0.8rem;
    color: #999;
}

.palace-title {
    font-size: 0.75rem;
    color: #6B5B95;
    margin-bottom: 5px;
    font-weight: 500;
}

.palace-stars {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.6;
}

.palace-stars .main-star {
    color: #6B5B95;
    font-weight: 600;
}

.palace-stars .sub-star {
    color: #E74C3C;
    font-size: 0.75rem;
}

.palace-stars .aux-star {
    color: #666;
    font-size: 0.7rem;
}

/* 星耀状态 */
.star-status {
    font-size: 0.65rem;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 2px;
}

.star-status.wang { background: #FFE4E1; color: #E74C3C; }
.star-status.miao { background: #E8F5E9; color: #4CAF50; }
.star-status.de { background: #FFF3E0; color: #FF9800; }
.star-status.ping { background: #F5F5F5; color: #666; }
.star-status.xian { background: #FFEBEE; color: #F44336; }

/* 四化标记 */
.sihua {
    font-size: 0.65rem;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 2px;
    font-weight: 600;
}

.sihua.lu { background: #4CAF50; color: white; }
.sihua.quan { background: #2196F3; color: white; }
.sihua.ke { background: #9C27B0; color: white; }
.sihua.ji { background: #F44336; color: white; }

.palace-info {
    font-size: 0.7rem;
    color: #999;
    margin-top: 5px;
}

.palace-info .daxian {
    color: #E74C3C;
}

.palace-info .liuyear {
    color: #2196F3;
}

/* 中央信息区 */
.center-info {
    grid-column: 2 / 4;
    background: linear-gradient(135deg, #F8F6FF 0%, #EDE9F7 100%);
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.center-title {
    font-family: 'Ma Shan Zheng', serif;
    font-size: 1.5rem;
    color: #6B5B95;
    margin-bottom: 10px;
}

.center-name {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.center-detail {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.center-bazi {
    margin-bottom: 15px;
}

.bazi-row {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.bazi-row span {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #6B5B95;
    border-radius: 5px;
    font-size: 1.1rem;
    color: #6B5B95;
}

.bazi-row:first-child span {
    background: #6B5B95;
    color: white;
}

.center-extra {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.center-extra strong {
    color: #6B5B95;
}

/* 中央下部 - 大限 */
.center-bottom {
    grid-column: 2 / 4;
    background: white;
    padding: 15px;
    text-align: center;
}

.dayun-title {
    font-size: 0.85rem;
    color: #6B5B95;
    margin-bottom: 10px;
    font-weight: 500;
}

.dayun-list {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dayun-item {
    padding: 5px 10px;
    background: #F8F6FF;
    border-radius: 5px;
    font-size: 0.75rem;
    color: #6B5B95;
    cursor: pointer;
    transition: all 0.3s;
}

.dayun-item:hover,
.dayun-item.active {
    background: #6B5B95;
    color: white;
}

.dayun-item .age {
    display: block;
    font-size: 0.65rem;
    color: inherit;
    opacity: 0.8;
}

/* 四化图例 */
.sihua-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    margin-bottom: 20px;
}

.sihua-item {
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.sihua-item.lu { background: #E8F5E9; color: #4CAF50; }
.sihua-item.quan { background: #E3F2FD; color: #2196F3; }
.sihua-item.ke { background: #F3E5F5; color: #9C27B0; }
.sihua-item.ji { background: #FFEBEE; color: #F44336; }

/* 子Tab */
.sub-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.sub-tab {
    padding: 10px 20px;
    border: 1.5px solid #6B5B95;
    background: white;
    color: #6B5B95;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.sub-tab.active {
    background: #6B5B95;
    color: white;
}

/* 解读内容 */
.interpret-content {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 25px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    margin-bottom: 20px;
    color: #6B5B95;
    font-size: 1.1rem;
    font-weight: 500;
}

.section-header::before,
.section-header::after {
    content: '◇';
    color: #D4C4E8;
}

/* 宫位预览 */
.palace-preview {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    overflow-x: auto;
    padding: 10px 0;
}

.preview-palace {
    min-width: 120px;
    padding: 15px;
    background: #F8F6FF;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #E8E0F0;
}

.preview-palace .stars {
    font-size: 0.8rem;
    color: #6B5B95;
    margin-bottom: 10px;
    line-height: 1.5;
}

.preview-palace .info {
    font-size: 0.7rem;
    color: #999;
}

/* 解读卡片 */
.interpret-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #F0EBF7;
}

.card-title {
    color: #6B5B95;
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.interpret-card p {
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* 会员模糊区域 */
.member-blur-section {
    position: relative;
}

.member-blur-section .blurred {
    filter: blur(5px);
    user-select: none;
}

.unlock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.vip-unlock-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: #6B5B95;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(107, 91, 149, 0.3);
}

.vip-unlock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 91, 149, 0.4);
}

/* 流年页面 */
.year-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
}

.year-nav {
    width: 40px;
    height: 40px;
    border: 1.5px solid #6B5B95;
    background: white;
    border-radius: 50%;
    color: #6B5B95;
    cursor: pointer;
    transition: all 0.3s;
}

.year-nav:hover {
    background: #6B5B95;
    color: white;
}

.current-year {
    font-size: 1.5rem;
    font-weight: 600;
    color: #6B5B95;
    padding: 10px 40px;
    background: #F8F6FF;
    border-radius: 25px;
}

.fortune-content {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 25px;
}

.fortune-palace {
    background: #F8F6FF;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.fortune-summary {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
}

.fortune-item {
    text-align: center;
}

.fortune-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.fortune-value {
    font-size: 1.1rem;
    color: #6B5B95;
    font-weight: 500;
}

.fortune-title-text {
    color: #6B5B95;
    font-weight: 600;
    margin-bottom: 10px;
}

.full-unlock-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6B5B95 0%, #8B7BAF 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    transition: all 0.3s;
}

.full-unlock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 91, 149, 0.3);
}

/* 操作按钮 */
.action-section {
    text-align: center;
    padding: 30px 0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 35px;
    background: transparent;
    border: 2px solid #6B5B95;
    color: #6B5B95;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #6B5B95;
    color: white;
}

/* 响应式 */
@media (max-width: 768px) {
    .ziwei-chart {
        min-width: 600px;
        font-size: 0.85rem;
    }
    
    .palace {
        min-height: 100px;
        padding: 8px 6px;
    }
    
    .center-info {
        padding: 15px;
    }
    
    .bazi-row span {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }
    
    .sub-tabs {
        justify-content: flex-start;
    }
    
    .fortune-summary {
        flex-direction: column;
        gap: 15px;
    }
}
