/* ===================================
   PVP专精分布数据页面样式
   优化版本 - 2026
   使用统一设计令牌系统
   =================================== */

/* 
 * 页面特有的CSS变量（扩展 design-tokens.css）
 * 确保已引入 design-tokens.css
 */
:root {
    /* 字体 - 此页面使用中文字体 */
    --main-font: 'Noto Sans SC', var(--font-body);
    --number-font: 'Roboto', 'Noto Sans SC', var(--font-body);
    
    /* 页面特有颜色别名（映射到全局令牌） */
    --primary-gold: var(--color-primary);
    --secondary-gold: var(--color-secondary);
    --tertiary-gold: var(--color-secondary-dark);
    --dark-gold: var(--color-text-secondary);
    --dark-bg: var(--color-bg-primary);
    --card-bg: var(--color-bg-card);
    --border-color: var(--color-border-primary);
    --border-secondary: var(--color-border-secondary);
    --hover-bg: var(--color-bg-card-hover);
}

/* ===================================
   基础样式
   =================================== */
body {
    margin: 0;
    padding: 0;
    background-color: var(--dark-bg);
    background-image: linear-gradient(to bottom, #0a1320, #152234);
    color: var(--secondary-gold);
    min-height: 100vh;
    font-family: var(--main-font);
}

.page-container {
    width: 100%;
    max-width: 1200px;
    margin: 100px auto var(--spacing-xl) auto;
    position: relative;
    padding: 0 var(--spacing-lg);
    box-sizing: border-box;
}

/* ===================================
   头部样式
   =================================== */
h1 {
    color: var(--primary-gold);
    text-align: center;
    font-size: 28px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.subtitle {
    color: var(--dark-gold);
    text-align: center;
    font-size: 15px;
    margin: var(--spacing-2) auto;
}

/* 注意：season-tag 和 update-time-badge 已移至导航栏，此处样式保留用于兼容性 */

.header-divider {
    overflow: hidden;
    border: 0;
    width: 50%;
    position: relative;
    height: 30px;
    background-image: url(https://image.ddkwow.cool/divider.png);
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: contain;
    background-color: transparent;
    margin: 0 auto var(--spacing-3);
}

/* 早期数据警告样式 */
.early-period-warning {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    margin: var(--spacing-sm) auto;
    background-color: rgba(255, 152, 0, 0.2);
    border-left: 4px solid #ff9800;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: fit-content;
}

.warning-icon {
    font-size: 18px;
    color: #ff9800;
    margin-right: var(--spacing-sm);
}

.warning-text {
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

/* ===================================
   主标签页系统
   =================================== */
.main-tabs {
    background-color: var(--card-bg);
    border-radius: 5px;
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.main-tabs-header {
    display: flex;
    border-bottom: 1px solid rgba(99, 79, 44, 0.5);
    background-color: rgba(15, 25, 40, 0.6);
}

.main-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--dark-gold);
    padding: var(--spacing-md) var(--spacing-lg);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: var(--transition-normal);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-tab-btn:hover:not(.active) {
    color: var(--secondary-gold);
    background-color: rgba(40, 50, 65, 0.3);
}

.main-tab-btn.active {
    color: var(--primary-gold);
    border-bottom-color: var(--primary-gold);
    background-color: rgba(40, 50, 65, 0.5);
    font-weight: bold;
}

.main-tab-content {
    display: none;
    padding: var(--spacing-lg);
    animation: fadeIn var(--transition-slow) ease-out;
}

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

/* ===================================
   统计卡片
   =================================== */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.stat-box {
    background: linear-gradient(135deg, 
        rgba(20, 30, 45, 0.95) 0%, 
        rgba(30, 40, 55, 0.9) 100%);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-wow-card);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    will-change: transform;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 160px;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(248, 209, 108, 0.05) 0%, 
        transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-wow-card-hover), var(--shadow-glow);
    border-color: var(--border-accent);
}

.stat-box:hover::before {
    opacity: 1;
}

.stat-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(248, 209, 108, 0.1) 0%, 
        transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-slow);
    pointer-events: none;
}

.stat-box:hover .stat-glow {
    opacity: 1;
}

.stat-icon-wrapper {
    position: relative;
    width: 56px;
    height: 56px;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        rgba(248, 209, 108, 0.15) 0%, 
        rgba(224, 199, 159, 0.1) 100%);
    border-radius: var(--radius-full);
    border: 2px solid rgba(248, 209, 108, 0.3);
    box-shadow: 0 0 15px rgba(248, 209, 108, 0.2);
    transition: all var(--transition-normal);
}

.stat-box:hover .stat-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 25px rgba(248, 209, 108, 0.4);
    border-color: rgba(248, 209, 108, 0.5);
}

.stat-icon {
    font-size: 24px;
    color: var(--primary-gold);
    transition: all var(--transition-normal);
}

.stat-box:hover .stat-icon {
    color: var(--color-primary-light);
    text-shadow: 0 0 10px rgba(248, 209, 108, 0.6);
}

.stat-content {
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

.stat-title {
    color: var(--dark-gold);
    font-size: 13px;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    color: var(--primary-gold);
    font-size: 32px;
    font-weight: bold;
    font-family: var(--number-font);
    line-height: 1.2;
    margin-bottom: var(--spacing-xs);
    text-shadow: 0 0 10px rgba(248, 209, 108, 0.3);
}

.stat-percent {
    color: var(--secondary-gold);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    font-family: var(--number-font);
}

.stat-subtitle {
    color: var(--color-text-tertiary);
    font-size: 12px;
    margin-top: var(--spacing-xs);
    opacity: 0.8;
}

/* 不同职责类型的卡片特殊样式 */
.stat-box-melee .stat-icon-wrapper {
    background: linear-gradient(135deg, 
        rgba(200, 168, 100, 0.2) 0%, 
        rgba(200, 168, 100, 0.1) 100%);
    border-color: rgba(200, 168, 100, 0.4);
}

.stat-box-range .stat-icon-wrapper {
    background: linear-gradient(135deg, 
        rgba(224, 199, 159, 0.2) 0%, 
        rgba(224, 199, 159, 0.1) 100%);
    border-color: rgba(224, 199, 159, 0.4);
}

.stat-box-healer .stat-icon-wrapper {
    background: linear-gradient(135deg, 
        rgba(161, 136, 92, 0.2) 0%, 
        rgba(161, 136, 92, 0.1) 100%);
    border-color: rgba(161, 136, 92, 0.4);
}

.stat-box-total .stat-icon-wrapper {
    background: linear-gradient(135deg, 
        rgba(248, 209, 108, 0.2) 0%, 
        rgba(248, 209, 108, 0.1) 100%);
    border-color: rgba(248, 209, 108, 0.4);
}

/* ===================================
   筛选器样式
   =================================== */
.filter-container {
    background-color: var(--card-bg);
    padding: var(--spacing-lg);
    border-radius: 5px;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--border-color);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-gold);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.filter-select {
    width: 100%;
    padding: 10px var(--spacing-md);
    background-color: rgba(20, 25, 35, 0.8);
    color: var(--secondary-gold);
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggZmlsbD0iI2M4YTg2NCIgZD0iTTUsMSBMMTUsMSBMMTAsMTUgWiIvPjwvc3ZnPg==');
    background-repeat: no-repeat;
    background-position: right var(--spacing-md) center;
    background-size: 12px;
    transition: var(--transition-normal);
    cursor: pointer;
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 8px rgba(248, 209, 108, 0.5);
    outline: none;
}

.filter-select option {
    background-color: #1a2536;
    color: var(--secondary-gold);
}

/* ===================================
   数据表格样式
   =================================== */
.data-container {
    background-color: var(--card-bg);
    padding: var(--spacing-lg);
    border-radius: 5px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    position: relative;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin-top: var(--spacing-lg);
    background-color: rgba(25, 25, 40, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th {
    background-color: rgba(25, 25, 40, 0.6);
    color: var(--secondary-gold);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table td {
    font-size: 15px;
    line-height: 1.6;
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background-color: var(--hover-bg);
}

/* 表头样式 - 备选1：渐变+双边框+内阴影 */
.table-header-alt1 {
    background: linear-gradient(to bottom, 
        rgba(45, 55, 70, 0.75) 0%, 
        rgba(40, 50, 65, 0.7) 100%);
    color: var(--primary-gold) !important;
    font-size: 16px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px solid rgba(248, 209, 108, 0.2);
    border-bottom: 2px solid rgba(248, 209, 108, 0.45);
    box-shadow: 
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 2px 6px rgba(0, 0, 0, 0.25);
    padding: 14px var(--spacing-md) !important;
}

/* 表头样式 - 备选2：简洁+强化边框 */
.table-header-alt2 {
    background-color: rgba(35, 45, 60, 0.8);
    color: var(--primary-gold) !important;
    font-size: 16px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: 3px solid rgba(248, 209, 108, 0.5);
    border-bottom: 2px solid rgba(248, 209, 108, 0.5);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    padding: 14px var(--spacing-md) !important;
}

/* 表头样式 - 备选3：subtle增强+顶部装饰线 */
.table-header-alt3 {
    background-color: rgba(38, 48, 63, 0.75);
    color: var(--primary-gold) !important;
    font-size: 16px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(248, 209, 108, 0.4);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    padding: 14px var(--spacing-md) !important;
}

.table-header-alt3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(248, 209, 108, 0.3) 20%,
        rgba(248, 209, 108, 0.5) 50%,
        rgba(248, 209, 108, 0.3) 80%,
        transparent
    );
    pointer-events: none;
}

/* 表头样式 - 备选4：参考标签页风格，更协调统一 */
.table-header {
    background-color: rgba(30, 40, 55, 0.7);
    color: var(--primary-gold) !important;
    font-size: 16px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px solid rgba(99, 79, 44, 0.4);
    border-bottom: 1px solid rgba(99, 79, 44, 0.5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    padding: 14px var(--spacing-md) !important;
}

/* 可排序列样式 */
.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 30px !important;
}

.sortable:hover {
    background-color: rgba(224, 199, 159, 0.1);
}

.sortable::after {
    content: '↑↓';
    position: absolute;
    right: 8px;
    opacity: 0.4;
    font-size: 0.8em;
}

.sort-asc::after {
    content: '↑';
    opacity: 1;
}

.sort-desc::after {
    content: '↓';
    opacity: 1;
}

.sort-active {
    background-color: rgba(224, 199, 159, 0.2);
}

/* 数字列样式 */
.data-table td:nth-child(3),
.data-table td:nth-child(4) {
    font-family: var(--number-font);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    font-size: 15px;
    vertical-align: top;
    padding-top: 14px;
    padding-bottom: 14px;
}

/* 评级列样式 */
.data-table td:nth-child(5) {
    text-align: center;
    vertical-align: middle;
}

/* 评级记录列样式 */
.data-table td:nth-child(6) {
    vertical-align: middle;
}

.data-table td:first-child {
    font-family: var(--number-font);
    font-weight: 600;
    text-align: center;
    font-size: 16px;
}

/* 专精名称 */
.spec-name {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.spec-icon {
    width: 24px;
    height: 24px;
    margin-right: var(--spacing-sm);
    border-radius: 50%;
    border: 1px solid rgba(99, 79, 44, 0.4);
    box-shadow: 0 0 4px rgba(248, 209, 108, 0.15),
                inset 0 0 8px rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    transition: all var(--transition-fast);
    opacity: 0.9;
}

.spec-icon:hover {
    opacity: 1;
    border-color: rgba(248, 209, 108, 0.5);
    box-shadow: 0 0 6px rgba(248, 209, 108, 0.25),
                inset 0 0 8px rgba(0, 0, 0, 0.2);
}

/* 数值单元格内容容器 */
.value-cell-content {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 2px;
}

.value-number {
    font-weight: 600;
    color: var(--secondary-gold);
}

/* 变化指标 */
.change-indicator {
    display: inline-flex;
    align-items: center;
    vertical-align: baseline;
    font-weight: bold;
    line-height: 1.2;
    font-family: var(--number-font);
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 3px;
    transition: var(--transition-fast);
    font-size: 13px;
}

.change-indicator:hover {
    box-shadow: 0 0 5px rgba(248, 209, 108, 0.5);
    transform: scale(1.1);
}

.change-up {
    color: #FF4444;
}

.change-down {
    color: #44BB44;
}

/* 进度条 */
.value-bar {
    height: 8px;
    background-color: rgba(99, 79, 44, 0.5);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.value-bar-fill {
    height: 100%;
    background-image: linear-gradient(to right, 
        rgba(161, 136, 92, 0.9), 
        rgba(224, 199, 159, 0.95), 
        var(--primary-gold));
    border-radius: 4px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 8px rgba(248, 209, 108, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

.value-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.15) 0%, 
        transparent 50%);
    border-radius: 4px;
    pointer-events: none;
}

.value-bar-fill-zero {
    height: 100%;
    background-color: rgba(85, 85, 85, 0.6);
    border-radius: 4px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===================================
   职业颜色
   =================================== */
.class-color-deathknight { color: #C41E3A; }
.class-color-demonhunter { color: #A330C9; }
.class-color-druid { color: #FF7C0A; }
.class-color-evoker { color: #33937F; }
.class-color-hunter { color: #AAD372; }
.class-color-mage { color: #3FC7EB; }
.class-color-monk { color: #00FF98; }
.class-color-paladin { color: #F48CBA; }
.class-color-priest { color: #FFFFFF; }
.class-color-rogue { color: #FFF468; }
.class-color-shaman { color: #0070DD; }
.class-color-warlock { color: #8788EE; }
.class-color-warrior { color: #C69B6D; }

/* ===================================
   评级记录样式
   =================================== */
.tier-count-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    cursor: pointer;
}

.tier-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    transition: var(--transition-fast);
    border: 1.5px solid;
    position: relative;
    overflow: hidden;
    cursor: default;
    backdrop-filter: blur(4px);
}

.tier-count-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.tier-count-badge:hover {
    transform: translateY(-1px);
}

.tier-count-letter {
    font-size: 14px;
    font-weight: 700;
    margin-right: 2px;
    z-index: 1;
    position: relative;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.tier-count-number {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.95;
    z-index: 1;
    position: relative;
    margin-left: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.tier-count-empty {
    color: var(--dark-gold);
    font-size: 13px;
    opacity: 0.5;
    font-style: italic;
}

/* 不同评级的颜色样式 - 使用设计令牌，增强可读性 */
.tier-count-S {
    border-color: var(--color-tier-s-border);
    color: var(--color-tier-s);
    background-color: rgba(248, 209, 108, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 4px var(--color-tier-s-shadow);
}

.tier-count-S::before {
    background: linear-gradient(135deg, rgba(248, 209, 108, 0.25) 0%, transparent 100%);
}

.tier-count-S:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 8px var(--color-tier-s-shadow);
    background-color: rgba(248, 209, 108, 0.35);
}

.tier-count-A {
    border-color: var(--color-tier-a-border);
    color: var(--color-tier-a);
    background-color: rgba(224, 199, 159, 0.25);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 3px var(--color-tier-a-shadow);
}

.tier-count-A::before {
    background: linear-gradient(135deg, rgba(224, 199, 159, 0.2) 0%, transparent 100%);
}

.tier-count-A:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35), 0 0 6px var(--color-tier-a-shadow);
    background-color: rgba(224, 199, 159, 0.3);
}

.tier-count-B {
    border-color: var(--color-tier-b-border);
    color: var(--color-tier-b);
    background-color: rgba(200, 168, 100, 0.22);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 0 3px var(--color-tier-b-shadow);
}

.tier-count-B::before {
    background: linear-gradient(135deg, rgba(200, 168, 100, 0.18) 0%, transparent 100%);
}

.tier-count-B:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 5px var(--color-tier-b-shadow);
    background-color: rgba(200, 168, 100, 0.28);
}

.tier-count-C {
    border-color: var(--color-tier-c-border);
    color: var(--color-tier-c);
    background-color: rgba(161, 136, 92, 0.22);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 0 2px var(--color-tier-c-shadow);
}

.tier-count-C::before {
    background: linear-gradient(135deg, rgba(161, 136, 92, 0.18) 0%, transparent 100%);
}

.tier-count-C:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 4px var(--color-tier-c-shadow);
    background-color: rgba(161, 136, 92, 0.28);
}

.tier-count-D {
    border-color: var(--color-tier-d-border);
    color: var(--color-tier-d);
    background-color: rgba(138, 113, 66, 0.22);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 2px var(--color-tier-d-shadow);
}

.tier-count-D::before {
    background: linear-gradient(135deg, rgba(138, 113, 66, 0.18) 0%, transparent 100%);
}

.tier-count-D:hover {
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25), 0 0 3px var(--color-tier-d-shadow);
    background-color: rgba(138, 113, 66, 0.28);
}

.tier-count-E {
    border-color: var(--color-tier-e-border);
    color: #b8b8b8;
    background-color: rgba(102, 102, 102, 0.25);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 2px var(--color-tier-e-shadow);
}

.tier-count-E::before {
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.2) 0%, transparent 100%);
}

.tier-count-E:hover {
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25), 0 0 3px var(--color-tier-e-shadow);
    background-color: rgba(102, 102, 102, 0.3);
}

/* ===================================
   评级徽章样式（单个评级列）
   =================================== */
.tier-badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 26px;
    font-size: 15px;
    font-weight: 700;
    position: relative;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    border-radius: 13px;
    color: white;
    border: 1.5px solid;
    transition: var(--transition-fast);
    background-position: center;
    background-size: cover;
    overflow: hidden;
    cursor: pointer;
}

.tier-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.tier-badge:hover {
    transform: translateY(-1px);
}

.tier-badge[data-tier="S"] {
    border-color: var(--color-tier-s-border);
    color: var(--color-tier-s);
    background-color: rgba(248, 209, 108, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 4px var(--color-tier-s-shadow);
    animation: pulse-s 2s infinite alternate;
}

.tier-badge[data-tier="S"]::before {
    background: linear-gradient(135deg, rgba(248, 209, 108, 0.25) 0%, transparent 100%);
}

.tier-badge[data-tier="S"]:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 8px var(--color-tier-s-shadow);
    background-color: rgba(248, 209, 108, 0.35);
}

.tier-badge[data-tier="A"] {
    border-color: var(--color-tier-a-border);
    color: var(--color-tier-a);
    background-color: rgba(224, 199, 159, 0.25);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 3px var(--color-tier-a-shadow);
    animation: pulse-a 3s infinite alternate;
}

.tier-badge[data-tier="A"]::before {
    background: linear-gradient(135deg, rgba(224, 199, 159, 0.2) 0%, transparent 100%);
}

.tier-badge[data-tier="A"]:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35), 0 0 6px var(--color-tier-a-shadow);
    background-color: rgba(224, 199, 159, 0.3);
}

.tier-badge[data-tier="B"] {
    border-color: var(--color-tier-b-border);
    color: var(--color-tier-b);
    background-color: rgba(200, 168, 100, 0.22);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 0 3px var(--color-tier-b-shadow);
}

.tier-badge[data-tier="B"]::before {
    background: linear-gradient(135deg, rgba(200, 168, 100, 0.18) 0%, transparent 100%);
}

.tier-badge[data-tier="B"]:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 5px var(--color-tier-b-shadow);
    background-color: rgba(200, 168, 100, 0.28);
}

.tier-badge[data-tier="C"] {
    border-color: var(--color-tier-c-border);
    color: var(--color-tier-c);
    background-color: rgba(161, 136, 92, 0.22);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 0 2px var(--color-tier-c-shadow);
}

.tier-badge[data-tier="C"]::before {
    background: linear-gradient(135deg, rgba(161, 136, 92, 0.18) 0%, transparent 100%);
}

.tier-badge[data-tier="C"]:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 4px var(--color-tier-c-shadow);
    background-color: rgba(161, 136, 92, 0.28);
}

.tier-badge[data-tier="D"] {
    border-color: var(--color-tier-d-border);
    color: var(--color-tier-d);
    background-color: rgba(138, 113, 66, 0.22);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 2px var(--color-tier-d-shadow);
}

.tier-badge[data-tier="D"]::before {
    background: linear-gradient(135deg, rgba(138, 113, 66, 0.18) 0%, transparent 100%);
}

.tier-badge[data-tier="D"]:hover {
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25), 0 0 3px var(--color-tier-d-shadow);
    background-color: rgba(138, 113, 66, 0.28);
}

.tier-badge[data-tier="E"] {
    border-color: var(--color-tier-e-border);
    color: #b8b8b8;
    background-color: rgba(102, 102, 102, 0.25);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 2px var(--color-tier-e-shadow);
}

.tier-badge[data-tier="E"]::before {
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.2) 0%, transparent 100%);
}

.tier-badge[data-tier="E"]:hover {
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25), 0 0 3px var(--color-tier-e-shadow);
    background-color: rgba(102, 102, 102, 0.3);
}

@keyframes pulse-s {
    0% { box-shadow: 0 0 8px rgba(248, 209, 108, 0.6), inset 0 0 8px rgba(248, 209, 108, 0.3); }
    100% { box-shadow: 0 0 15px rgba(248, 209, 108, 0.9), inset 0 0 12px rgba(248, 209, 108, 0.5); }
}

@keyframes pulse-a {
    0% { box-shadow: 0 0 6px rgba(224, 199, 159, 0.5), inset 0 0 6px rgba(224, 199, 159, 0.2); }
    100% { box-shadow: 0 0 12px rgba(224, 199, 159, 0.7), inset 0 0 10px rgba(224, 199, 159, 0.3); }
}

/* ===================================
   图表样式
   =================================== */
.charts-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.chart-wrapper {
    background-color: rgba(30, 40, 55, 0.5);
    border-radius: 5px;
    border: 1px solid rgba(99, 79, 44, 0.3);
    padding: var(--spacing-lg);
    animation: fadeIn var(--transition-slow) ease-out;
}

.pie-chart-wrapper {
    flex: 1;
    min-width: 250px;
}

.bar-chart-wrapper {
    flex: 2;
    min-width: 300px;
}

.chart-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.chart-title {
    color: var(--primary-gold);
    font-size: 18px;
    margin: 0;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-title-icon {
    color: var(--primary-gold);
    font-size: 16px;
    opacity: 0.8;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    position: relative;
}

.chart-header .chart-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.chart-filter {
    position: relative;
    z-index: 1;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    min-width: fit-content;
}

.chart-filter .filter-select {
    width: auto !important;
    min-width: 110px !important;
    padding: 6px 30px 6px 12px !important;
    height: 34px !important;
    font-size: 13px !important;
    background-position: right 8px center !important;
}

.chart-canvas-container {
    position: relative;
    width: 100%;
    height: 300px;
}

/* 竖屏提示 */
.portrait-mode-tip {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-16) var(--spacing-lg);
    text-align: center;
    background-color: var(--card-bg);
    border-radius: 5px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: var(--spacing-xl);
    min-height: 300px;
}

.portrait-mode-tip i {
    font-size: 48px;
    color: var(--secondary-gold);
    margin-bottom: var(--spacing-lg);
    opacity: 0.8;
}

.portrait-mode-tip p {
    color: var(--color-text-primary);
    font-size: var(--font-size-lg);
    margin: 0;
    font-weight: 500;
}

/* 历史图表 */
.history-chart-container {
    background: linear-gradient(135deg, 
        rgba(20, 30, 45, 0.95) 0%, 
        rgba(30, 40, 55, 0.9) 50%, 
        rgba(20, 30, 45, 0.95) 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-wow-card), 
                0 0 20px rgba(248, 209, 108, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: visible;
}

.history-chart-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(248, 209, 108, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(224, 199, 159, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.history-chart-container .chart-header {
    position: relative;
    z-index: 1;
}

.history-chart-container .chart-body {
    position: relative;
    z-index: 1;
}

#historyChart {
    width: 100%;
    height: 500px;
    position: relative;
    z-index: 1;
}

/* 按钮样式 */
.toggle-btn {
    background-color: rgba(30, 40, 55, 0.95);
    color: var(--secondary-gold);
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    padding: 0 var(--spacing-md);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition-normal);
    height: 34px;
    line-height: 32px;
    white-space: nowrap;
    min-width: fit-content;
    box-sizing: border-box;
}

.toggle-btn:hover {
    border-color: var(--primary-gold);
    box-shadow: 0 0 8px rgba(248, 209, 108, 0.5);
    color: var(--primary-gold);
}

.toggle-btn.active {
    border-color: var(--primary-gold);
    box-shadow: 0 0 8px rgba(248, 209, 108, 0.5);
    color: var(--primary-gold);
}

/* ===================================
   工具提示
   =================================== */
/* 确保 ECharts tooltip 容器不会被裁剪 */
body > div[class*="echarts"] {
    overflow: visible !important;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: rgba(20, 30, 45, 0.95);
    color: var(--secondary-gold);
    text-align: center;
    border-radius: 5px;
    padding: 8px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity var(--transition-normal);
    font-size: 14px;
    border: 1px solid var(--border-secondary);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--border-secondary) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ==================== Spec Tooltip (悬浮提示) ==================== */
.spec-tooltip {
    position: fixed;
    display: none;
    z-index: 10000;
    background: rgba(20, 30, 45, 0.95);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-3);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    pointer-events: none;
    font-family: 'Noto Sans SC', sans-serif;
    animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spec-tooltip .tooltip-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: var(--spacing-2);
    padding-bottom: var(--spacing-1);
    border-bottom: 1px solid var(--color-border-secondary);
}

.spec-tooltip .tooltip-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-1);
    font-size: 14px;
    line-height: 1.6;
}

.spec-tooltip .tooltip-item:last-child {
    margin-bottom: 0;
}

.spec-tooltip .tooltip-label {
    color: var(--color-text-secondary);
    margin-right: var(--spacing-2);
}

.spec-tooltip .tooltip-value {
    color: var(--color-text-primary);
    font-weight: 500;
}

/* 移动端 tooltip 样式调整 */
@media (max-width: 768px) {
    .spec-tooltip {
        min-width: 180px;
        padding: var(--spacing-2);
        font-size: 12px;
    }

    .spec-tooltip .tooltip-title {
        font-size: 14px;
    }

    .spec-tooltip .tooltip-item {
        font-size: 12px;
    }
}

/* ===================================
   返回顶部按钮
   =================================== */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--card-bg);
    border: 2px solid var(--primary-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-gold);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.back-to-top i {
    color: var(--primary-gold);
    font-size: 20px;
}

.back-to-top:hover i {
    color: var(--dark-bg);
}

/* ===================================
   动画效果
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.data-table tbody tr {
    animation: fadeIn 0.3s ease-out forwards;
    animation-delay: calc(var(--row-index, 0) * 0.05s);
    opacity: 0;
}

/* 加载骨架屏 */
.skeleton {
    background: linear-gradient(90deg, rgba(99, 79, 44, 0.2) 25%, rgba(99, 79, 44, 0.3) 50%, rgba(99, 79, 44, 0.2) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===================================
   表格加载/空状态/错误状态样式
   =================================== */
.table-loading-state,
.table-empty-state,
.table-error-state {
    text-align: center;
    padding: 50px var(--spacing-lg);
    color: var(--secondary-gold);
}

.table-loading-content,
.table-empty-content,
.table-error-content {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg) var(--spacing-xl);
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-secondary);
    box-shadow: var(--shadow-md);
    min-width: 200px;
}

.table-loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(160, 137, 92, 0.2);
    border-radius: 50%;
    border-top: 2px solid var(--primary-gold);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.table-loading-text,
.table-empty-text,
.table-error-text {
    color: var(--primary-gold);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-family: var(--main-font);
}

.table-empty-text {
    color: var(--dark-gold);
}

.table-error-text {
    color: #ff6b6b;
}

.table-loading-icon,
.table-empty-icon,
.table-error-icon {
    font-size: 24px;
    color: var(--primary-gold);
}

.table-empty-icon {
    color: var(--dark-gold);
    opacity: 0.7;
}

.table-error-icon {
    color: #ff6b6b;
}

/* ===================================
   响应式设计 - 平板
   =================================== */
@media (max-width: 1024px) {
    h1 {
        font-size: 26px;
    }
    
    .subtitle {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-lg: 15px;
        --spacing-xl: 20px;
    }
    
    .page-container {
        margin: 80px auto var(--spacing-md) auto;
        padding: 0 var(--spacing-sm);
    }
    
    h1 {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 14px;
        padding: 0 var(--spacing-sm);
    }
    
    /* 筛选器 */
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 标签页 */
    .main-tab-btn {
        font-size: 14px;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .main-tab-content {
        padding: var(--spacing-md);
    }
    
    /* 统计卡片 */
    .stats-container {
        grid-template-columns: 1fr;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
        gap: var(--spacing-sm);
    }
    
    .stat-box {
        padding: var(--spacing-md);
        min-height: 140px;
    }
    
    .stat-icon-wrapper {
        width: 48px;
        height: 48px;
        margin-bottom: var(--spacing-sm);
    }
    
    .stat-icon {
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-percent {
        font-size: 13px;
    }
    
    /* 筛选器 */
    .filter-container {
        padding: var(--spacing-md);
        position: static;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-select {
        font-size: 16px;
        padding: 12px 36px 12px var(--spacing-md);
        height: 48px;
    }
    
    /* 表格 */
    .data-container {
        padding: var(--spacing-sm);
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
        font-size: 13px;
    }
    
    .spec-icon {
        width: 20px;
        height: 20px;
    }
    
    .value-bar {
        height: 6px;
        margin-top: 6px;
    }
    
    .value-cell-content {
        gap: 3px;
    }
    
    .value-number {
        font-size: 14px;
    }
    
    .change-indicator {
        font-size: 12px;
        padding: 1px 4px;
    }
    
    .tier-badge {
        width: 28px !important;
        height: 22px !important;
        font-size: 13px !important;
        border-radius: 11px !important;
        animation: none !important;
    }
    
    .tier-count-letter {
        font-size: 12px;
        margin-right: 1px;
    }
    
    .tier-count-number {
        font-size: 10px;
    }
    
    /* 表格加载/空状态/错误状态 - 移动端 */
    .table-loading-content,
    .table-empty-content,
    .table-error-content {
        padding: var(--spacing-md) var(--spacing-lg);
        min-width: 160px;
    }
    
    .table-loading-spinner {
        width: 28px;
        height: 28px;
    }
    
    .table-loading-text,
    .table-empty-text,
    .table-error-text {
        font-size: 14px;
    }
    
    .table-loading-icon,
    .table-empty-icon,
    .table-error-icon {
        font-size: 20px;
    }
    
    .tier-count-container {
        gap: 4px;
    }
    
    .tier-count-badge {
        padding: 3px 6px;
        font-size: 11px;
        border-radius: 8px;
    }
    
    .tier-count-letter {
        font-size: 12px;
        margin-right: 3px;
    }
    
    .tier-count-number {
        font-size: 10px;
    }
    
    /* 图表 */
    .charts-row {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .chart-wrapper {
        padding: var(--spacing-md);
        min-width: 100%;
    }
    
    .chart-canvas-container {
        height: 250px;
    }
    
    .chart-title {
        font-size: 16px;
    }
    
    /* 历史图表 */
    #historyChart {
        height: 350px;
    }
    
    .history-chart-container {
        padding: var(--spacing-lg);
    }
    
    /* 警告信息 */
    .early-period-warning {
        flex-direction: column;
        text-align: center;
    }
    
    .warning-icon {
        margin-bottom: var(--spacing-xs);
        margin-right: 0;
    }
    
    .warning-text {
        font-size: 13px;
    }
    
    /* 返回顶部 */
    .back-to-top {
        bottom: 70px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
}

/* ===================================
   响应式设计 - 手机
   =================================== */
@media (max-width: 480px) {
    h1 {
        font-size: 22px;
    }
    
    .subtitle {
        font-size: 13px;
    }
    
    .season-tag {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .season-tag::before {
        font-size: 13px;
        margin-right: 5px;
    }
    
    /* 筛选器 - 单列 */
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    /* 表格 - 隐藏部分列 */
    .data-table th:nth-child(4),
    .data-table td:nth-child(4) {
        display: none;
    }
    
    /* 历史图表 - 默认隐藏 */
    .history-chart-container {
        display: none;
    }
}

/* 移动端竖屏模式 - 显示提示 */
@media (max-width: 576px) and (orientation: portrait) {
    .portrait-mode-tip {
        display: flex;
    }
    
    .history-chart-container {
        display: none;
    }
    
    /* 表格 - 竖屏模式下隐藏样本评分列，显示进阶率列 */
    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        display: none;
    }
    
    .data-table th:nth-child(4),
    .data-table td:nth-child(4) {
        display: table-cell;
    }
}

/* 移动端横屏模式 - 显示图表 */
@media (max-width: 576px) and (orientation: landscape) {
    .portrait-mode-tip {
        display: none;
    }
    
    .history-chart-container {
        display: block;
    }
}

/* ===================================
   打印样式
   =================================== */
@media print {
    .back-to-top,
    .filter-container,
    .main-tabs-header,
    .charts-row {
        display: none !important;
    }
    
    .page-container {
        margin: 0;
        padding: 0;
    }
    
    .data-table {
        page-break-inside: avoid;
    }
}

/* ===================================
   性能优化
   =================================== */
.stat-box,
.chart-wrapper,
.tier-badge {
    will-change: transform;
}

/* 减少重绘 */
.data-table tbody tr {
    contain: layout style;
}

/* GPU加速 */
.back-to-top,
.filter-container {
    transform: translateZ(0);
}
