/* stat.css */
:root {
    /* 使用与base.css一致的变量定义 */
    --primary-color: #4e54c8;
    --primary-hover: #3a3f9d;
    --secondary-color: #8f94fb;
    --text-color: #333;
    --light-text: #666;
    --lighter-text: #999;
    --border-color: #e0e0e0;
    --background: #f8f9fa;
    --card-background: #ffffff;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --info-color: #2196f3;
    --warning-color: #f39c12;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 深色模式变量 */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #6c7ce7;
        --primary-hover: #5a6fd8;
        --secondary-color: #a29bfe;
        --text-color: #e4e6ea;
        --light-text: #b0b3b8;
        --lighter-text: #8a8d91;
        --border-color: #3e4042;
        --background: #18191a;
        --card-background: #242526;
        --white: #242526;
        --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        --danger-color: #f56565;
        --success-color: #48bb78;
        --info-color: #4299e1;
        --warning-color: #ed8936;
    }
}

/* 强制深色模式 */
[data-theme="dark"] {
    --primary-color: #6c7ce7;
    --primary-hover: #5a6fd8;
    --secondary-color: #a29bfe;
    --text-color: #e4e6ea;
    --light-text: #b0b3b8;
    --lighter-text: #8a8d91;
    --border-color: #3e4042;
    --background: #18191a;
    --card-background: #242526;
    --white: #242526;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --danger-color: #f56565;
    --success-color: #48bb78;
    --info-color: #4299e1;
    --warning-color: #ed8936;
}

/* 强制浅色模式 */
[data-theme="light"] {
    --primary-color: #4e54c8;
    --primary-hover: #3a3f9d;
    --secondary-color: #8f94fb;
    --text-color: #333;
    --light-text: #666;
    --lighter-text: #999;
    --border-color: #e0e0e0;
    --background: #f8f9fa;
    --card-background: #ffffff;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --info-color: #2196f3;
    --warning-color: #f39c12;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.stat-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.section-header .subtitle {
    font-size: 1rem;
    color: var(--light-text);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.data-explanation {
    background-color: rgba(78, 84, 200, 0.05);
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px auto;
    max-width: 750px;
    text-align: center;
    border: 1px solid rgba(78, 84, 200, 0.1);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* 深色模式下的数据说明 */
[data-theme="dark"] .data-explanation {
    background-color: rgba(108, 124, 231, 0.1);
    border: 1px solid rgba(108, 124, 231, 0.2);
}

@media (prefers-color-scheme: dark) {
    .data-explanation {
        background-color: rgba(108, 124, 231, 0.1);
        border: 1px solid rgba(108, 124, 231, 0.2);
    }
}

.data-explanation p {
    margin: 5px 0;
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.7;
    transition: color 0.3s ease;
}

.data-explanation strong {
    color: var(--primary-color);
    font-weight: 600;
}

.data-explanation a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.data-explanation a:hover {
    text-decoration: underline;
}

/* Tab Switcher */
.tab-switcher {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 25px auto;
    max-width: 400px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 4px;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* 深色模式下的切换器 */
[data-theme="dark"] .tab-switcher {
    background-color: rgba(255, 255, 255, 0.05);
}

@media (prefers-color-scheme: dark) {
    .tab-switcher {
        background-color: rgba(255, 255, 255, 0.05);
    }
}

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--light-text);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.5);
}

/* 深色模式下的按钮悬停 */
[data-theme="dark"] .tab-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: dark) {
    .tab-btn:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

.tab-btn.active {
    background-color: var(--card-background);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
}

/* 数据概览卡片 - 水平一行布局 */
.data-overview {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
    grid-template-columns: repeat(4, 1fr);
}

/* 中等屏幕：2x2布局 */
@media (min-width: 768px) and (max-width: 1199px) {
    .data-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* 小屏幕：单列布局 */
@media (max-width: 767px) {
    .data-overview {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.overview-card {
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 24px 20px;
    text-align: center;
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.overview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--card-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* 深色模式下的卡片悬停阴影 */
[data-theme="dark"] .overview-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
    .overview-card:hover {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    }
}

.overview-card:hover::before {
    opacity: 1;
}

/* 为4个不同类型的卡片定义颜色主题 */
.overview-card.highest { 
    border-top-color: var(--success-color); 
    --card-color: var(--success-color);
}
.overview-card.lowest { 
    border-top-color: var(--danger-color); 
    --card-color: var(--danger-color);
}
.overview-card.current-high { 
    border-top-color: var(--info-color); 
    --card-color: var(--info-color);
}
.overview-card.current-low { 
    border-top-color: var(--warning-color); 
    --card-color: var(--warning-color);
}

/* 保持向后兼容 */
.overview-card.current { 
    border-top-color: var(--info-color); 
    --card-color: var(--info-color);
}

.card-icon {
    font-size: 2.8rem;
    margin-bottom: 16px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.overview-card:hover .card-icon {
    transform: scale(1.1);
}

.overview-card.highest .card-icon { color: var(--success-color); }
.overview-card.lowest .card-icon  { color: var(--danger-color); }
.overview-card.current-high .card-icon { color: var(--info-color); }
.overview-card.current-low .card-icon { color: var(--warning-color); }
.overview-card.current .card-icon { color: var(--info-color); }

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
    line-height: 1.3;
    transition: color 0.3s ease;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-bottom: 16px;
    min-height: 2.8em;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.card-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    background-color: rgba(78, 84, 200, 0.08);
    padding: 12px 20px;
    border-radius: 25px;
    display: inline-block;
    min-width: 80px;
    transition: all 0.3s ease;
}

/* 深色模式下的卡片值背景 */
[data-theme="dark"] .card-value {
    background-color: rgba(108, 124, 231, 0.15);
}

@media (prefers-color-scheme: dark) {
    .card-value {
        background-color: rgba(108, 124, 231, 0.15);
    }
}

.overview-card:hover .card-value {
    background-color: rgba(78, 84, 200, 0.12);
    transform: scale(1.05);
}

/* 深色模式下的卡片值悬停 */
[data-theme="dark"] .overview-card:hover .card-value {
    background-color: rgba(108, 124, 231, 0.2);
}

@media (prefers-color-scheme: dark) {
    .overview-card:hover .card-value {
        background-color: rgba(108, 124, 231, 0.2);
    }
}

/* 统计部分 */
.stat-section {
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 40px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.section-title {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    transition: border-color 0.3s ease;
}

.section-title h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 5px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.title-desc {
    min-height: 1em;
}

.stat-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* 身高统计始终保持单列，服装统计不受影响 */
#height-stats .stat-content {
    grid-template-columns: 1fr;
}

/* 图表 */
.chart-container {
    margin-bottom: 20px;
}

.chart-placeholder {
    position: relative;
    height: 45px;
    background-color: var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    display: flex;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.percentile {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.percentile:hover {
    filter: brightness(110%);
}

/* 最高身高图表颜色 */
.max-height-chart .percentile:nth-child(1) { background-color: #388e3c; }
.max-height-chart .percentile:nth-child(2) { background-color: #43a047; }
.max-height-chart .percentile:nth-child(3) { background-color: #4caf50; }
.max-height-chart .percentile:nth-child(4) { background-color: #66bb6a; }
.max-height-chart .percentile:nth-child(5) { background-color: #81c784; }

/* 最矮身高图表颜色 */
.min-height-chart .percentile:nth-child(2) { background-color: #c62828; }
.min-height-chart .percentile:nth-child(3) { background-color: #d32f2f; }
.min-height-chart .percentile:nth-child(4) { background-color: #e53935; }
.min-height-chart .percentile:nth-child(5) { background-color: #f44336; }
.min-height-chart .percentile:nth-child(6) { background-color: #ef5350; }

/* 当前身高图表颜色 */
.current-height-chart .percentile:nth-child(1) { background-color: #1565c0; }
.current-height-chart .percentile:nth-child(2) { background-color: #1976d2; }
.current-height-chart .percentile:nth-child(3) { background-color: #1e88e5; }
.current-height-chart .percentile:nth-child(4) { background-color: #2196f3; }
.current-height-chart .percentile:nth-child(5) { background-color: #42a5f5; }

/* 深色模式下的图表颜色调整 */
[data-theme="dark"] .max-height-chart .percentile:nth-child(1) { background-color: #43a047; }
[data-theme="dark"] .max-height-chart .percentile:nth-child(2) { background-color: #4caf50; }
[data-theme="dark"] .max-height-chart .percentile:nth-child(3) { background-color: #66bb6a; }
[data-theme="dark"] .max-height-chart .percentile:nth-child(4) { background-color: #81c784; }
[data-theme="dark"] .max-height-chart .percentile:nth-child(5) { background-color: #a5d6a7; }

[data-theme="dark"] .min-height-chart .percentile:nth-child(2) { background-color: #d32f2f; }
[data-theme="dark"] .min-height-chart .percentile:nth-child(3) { background-color: #e53935; }
[data-theme="dark"] .min-height-chart .percentile:nth-child(4) { background-color: #f44336; }
[data-theme="dark"] .min-height-chart .percentile:nth-child(5) { background-color: #ef5350; }
[data-theme="dark"] .min-height-chart .percentile:nth-child(6) { background-color: #e57373; }

[data-theme="dark"] .current-height-chart .percentile:nth-child(1) { background-color: #1976d2; }
[data-theme="dark"] .current-height-chart .percentile:nth-child(2) { background-color: #1e88e5; }
[data-theme="dark"] .current-height-chart .percentile:nth-child(3) { background-color: #2196f3; }
[data-theme="dark"] .current-height-chart .percentile:nth-child(4) { background-color: #42a5f5; }
[data-theme="dark"] .current-height-chart .percentile:nth-child(5) { background-color: #64b5f6; }

/* 媒体查询版本的深色模式图表 */
@media (prefers-color-scheme: dark) {
    .max-height-chart .percentile:nth-child(1) { background-color: #43a047; }
    .max-height-chart .percentile:nth-child(2) { background-color: #4caf50; }
    .max-height-chart .percentile:nth-child(3) { background-color: #66bb6a; }
    .max-height-chart .percentile:nth-child(4) { background-color: #81c784; }
    .max-height-chart .percentile:nth-child(5) { background-color: #a5d6a7; }

    .min-height-chart .percentile:nth-child(2) { background-color: #d32f2f; }
    .min-height-chart .percentile:nth-child(3) { background-color: #e53935; }
    .min-height-chart .percentile:nth-child(4) { background-color: #f44336; }
    .min-height-chart .percentile:nth-child(5) { background-color: #ef5350; }
    .min-height-chart .percentile:nth-child(6) { background-color: #e57373; }

    .current-height-chart .percentile:nth-child(1) { background-color: #1976d2; }
    .current-height-chart .percentile:nth-child(2) { background-color: #1e88e5; }
    .current-height-chart .percentile:nth-child(3) { background-color: #2196f3; }
    .current-height-chart .percentile:nth-child(4) { background-color: #42a5f5; }
    .current-height-chart .percentile:nth-child(5) { background-color: #64b5f6; }
}

.percentile.empty {
    background-color: var(--border-color);
}

.chart-values {
    display: flex;
    justify-content: space-around;
    font-size: 0.8rem;
    color: var(--text-color);
    margin-bottom: 5px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.chart-values.reverse {
    flex-direction: row-reverse;
}

.chart-values span {
    text-align: center;
    flex-basis: 0;
    flex-grow: 1;
}

.chart-labels {
    display: flex;
    justify-content: space-around;
    font-size: 0.75rem;
    color: var(--light-text);
    margin-top: 5px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.chart-labels div {
    text-align: center;
    flex-basis: 0;
    flex-grow: 1;
    padding: 0 2px;
}

.chart-labels.reverse {
    flex-direction: row-reverse;
}

/* Table styling */
.table-container {
    overflow-x: auto;
}

.stat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.stat-table th, .stat-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    transition: border-color 0.3s ease;
}

.stat-table th {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.02);
    color: var(--text-color);
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 深色模式下的表格头 */
[data-theme="dark"] .stat-table th {
    background-color: rgba(255, 255, 255, 0.03);
}

@media (prefers-color-scheme: dark) {
    .stat-table th {
        background-color: rgba(255, 255, 255, 0.03);
    }
}

.stat-table td.threshold-value {
    font-weight: 500;
    color: var(--primary-color);
    white-space: nowrap;
    transition: color 0.3s ease;
}

.stat-table tr.highlight td.threshold-value {
    font-weight: 600;
    color: var(--primary-color);
}

.stat-table td:nth-child(1) {
    white-space: nowrap;
}

.stat-table tr.highlight {
    background-color: rgba(78, 84, 200, 0.05);
    transition: background-color 0.3s ease;
}

/* 深色模式下的高亮行 */
[data-theme="dark"] .stat-table tr.highlight {
    background-color: rgba(108, 124, 231, 0.1);
}

@media (prefers-color-scheme: dark) {
    .stat-table tr.highlight {
        background-color: rgba(108, 124, 231, 0.1);
    }
}

.stat-table tr.highlight td {
    font-weight: 600;
}

/* Cosmetic Statistics */
.cosmetic-section {
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.cosmetic-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* 深色模式下的服装区块悬停 */
[data-theme="dark"] .cosmetic-section:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
    .cosmetic-section:hover {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }
}

.cosmetic-section .section-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.cosmetic-section .section-title h2 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin: 0;
    font-weight: 600;
    transition: color 0.3s ease;
}

.cosmetic-ranking {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rank-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(145deg, rgba(249, 249, 249, 0.8), rgba(255, 255, 255, 1));
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 深色模式下的排名项背景 */
[data-theme="dark"] .rank-item {
    background: linear-gradient(145deg, rgba(36, 37, 38, 0.8), rgba(42, 43, 44, 1));
}

@media (prefers-color-scheme: dark) {
    .rank-item {
        background: linear-gradient(145deg, rgba(36, 37, 38, 0.8), rgba(42, 43, 44, 1));
    }
}

.rank-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

/* 深色模式下的排名项悬停 */
[data-theme="dark"] .rank-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
    .rank-item:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

.rank-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--border-color);
    transition: background 0.3s ease;
}

.rank-item.rank-1::before { background: #ffd700; }
.rank-item.rank-2::before { background: #c0c0c0; }
.rank-item.rank-3::before { background: #cd7f32; }

.rank-item:hover::before {
    background: var(--primary-color);
}

.rank-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 16px;
    flex-shrink: 0;
    color: white;
    background: var(--light-text);
    transition: all 0.3s ease;
}

.rank-1 .rank-number { 
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}
.rank-2 .rank-number { 
    background: linear-gradient(135deg, #c0c0c0, #e5e5e5);
    color: #333;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3);
}
.rank-3 .rank-number { 
    background: linear-gradient(135deg, #cd7f32, #e69c5a);
    color: white;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.3);
}

.rank-item:hover .rank-number {
    transform: scale(1.1);
}

.item-info {
    flex: 1;
}

.item-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.item-percentage {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 80px;
    text-align: right;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

/* Info Section */
.info-section {
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 25px;
    margin-top: 30px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.info-section h3 {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.info-section ul {
    list-style-type: none;
    padding-left: 0;
    font-size: 0.9rem;
}

.info-section li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: var(--text-color);
    line-height: 1.7;
    transition: color 0.3s ease;
}

.info-section li:before {
    content: "✔";
    position: absolute;
    left: 5px;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.1em;
}

.info-section li strong {
    color: var(--primary-color);
    font-weight: 600;
}

.info-section li a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.info-section li a:hover {
    text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .section-header h1 {
        font-size: 1.75rem;
    }
    .section-header .subtitle {
        font-size: 0.9rem;
    }
    .stat-section {
        padding: 20px 15px;
    }
    .section-title h2 {
        font-size: 1.3rem;
    }
    .chart-placeholder {
        height: 40px;
    }
    .chart-values {
        font-size: 0.75rem;
    }
    .chart-labels {
        font-size: 0.7rem;
    }
    .stat-table {
        font-size: 0.85rem;
    }
    .stat-table th, .stat-table td {
        padding: 8px 10px;
    }
    .overview-card {
        padding: 20px 16px;
    }
    .card-title {
        font-size: 1rem;
    }
    .card-desc {
        min-height: auto;
        font-size: 0.82rem;
    }
    .card-icon {
        font-size: 2.4rem;
    }
    .card-value {
        font-size: 1rem;
        padding: 10px 16px;
    }
    
    /* Tab Switcher Mobile */
    .tab-switcher {
        max-width: 100%;
        margin: 20px auto;
    }
    
    .tab-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    /* Cosmetic Section Mobile */
    .cosmetic-section {
        padding: 16px 14px;
        margin-bottom: 20px;
    }
    
    .cosmetic-section .section-title h2 {
        font-size: 1.15rem;
    }
    
    .rank-item {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .rank-number {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
        margin-right: 10px;
    }
    
    .item-info {
        flex: 1;
        min-width: 0;
    }
    
    .item-name {
        font-size: 0.9rem;
    }
    
    .item-percentage {
        font-size: 0.9rem;
        min-width: 55px;
    }
    
    /* 在很小的屏幕上调整布局 */
    @media (max-width: 380px) {
        .rank-item {
            flex-direction: column;
            align-items: flex-start;
            text-align: left;
        }
        
        .rank-item .rank-number {
            align-self: flex-start;
            margin-bottom: 8px;
            margin-right: 0;
        }
        
        .item-info {
            width: 100%;
            margin-bottom: 8px;
        }
        
        .item-percentage {
            align-self: flex-end;
            text-align: right;
        }
    }
}

@media (max-width: 480px) {
    .section-header h1 {
        font-size: 1.5rem;
    }
    .stat-table {
        font-size: 0.8rem;
    }
    .stat-table th, .stat-table td {
        padding: 8px 6px;
    }
    .overview-card {
        padding: 18px 14px;
    }
    .card-title {
        font-size: 0.95rem;
    }
    .card-icon {
        font-size: 2.2rem;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .cosmetic-section {
        padding: 14px 10px;
    }
    
    .cosmetic-section .section-title h2 {
        font-size: 1.05rem;
    }
    
    .item-percentage {
        font-size: 0.85rem;
        min-width: 50px;
    }
}