:root {
    --bg-color: #05152F;
    --card-bg: rgba(22, 43, 75, 0.6);
    --card-border: #1F3B63;
    --text-main: #ffffff;
    --text-sub: #aebfd1;
}

.charts-header {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}

.charts-title {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    letter-spacing: 1px;
    color: var(--text-main);
}

.charts-subtitle {
    color: var(--text-sub);
    font-size: 0.95rem;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.charts-subtitle span {
    background: rgba(255,255,255,0.05);
    padding: 4px 12px;
    border-radius: 12px;
    white-space: nowrap;
}

/* 顶部百分比卡片布局 - Grid 布局更适合响应式 */
.charts-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    width: 100%;
    /*max-width: 1000px;*/
    margin-bottom: 20px;
}

.charts-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    min-height: 80px;
}

.charts-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

/* 为每个卡片添加对应颜色的侧边条 */
.charts-card.charts-c-1::before { background-color: #E05452; }
.charts-card.charts-c-2::before { background-color: #384E61; }
.charts-card.charts-c-3::before { background-color: #639FA6; }
.charts-card.charts-c-4::before { background-color: #D68063; }
.charts-card.charts-c-5::before { background-color: #91C7AE; }
.charts-card.charts-c-6::before { background-color: #8e31e1; }

.charts-card-title {
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-bottom: 4px;
    line-height: 1.2;
}

.charts-card-value {
    font-size: 1.2rem;
    font-weight: bold;
}

/* 图表容器 */
#charts-main {
    width: 100%;
    max-width: 900px;
    height: 50vh; /* 使用视口高度，更适应移动端 */
    min-height: 350px;
    max-height: 600px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.02) 0%, transparent 70%);
    border-radius: 20px;
}

/* H5 移动端适配 CSS */
@media (max-width: 768px) {
    .charts-title { font-size: 1.4rem; }
    
    .charts-subtitle { 
        gap: 8px; 
        font-size: 0.85rem;
    }

    /* 移动端强制两列显示，更紧凑 */
    .charts-cards-container {
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px;
    }
    
    /* 让最后一个奇数个的卡片跨两列，保持美观 (可选) */
    .charts-cards-container .charts-card:last-child:nth-child(odd) {
        grid-column: span 2;
    }

    .charts-card {
        padding: 10px;
        min-height: 70px;
    }

    .charts-card-title { font-size: 0.75rem; }
    .charts-card-value { font-size: 1.1rem; }

    #charts-main {
        min-height: 300px;
        height: 45vh;
    }
}