/* 炉石传说风格样式表 */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cinzel', serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #f0f0f0;
    min-height: 100vh;
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
    border-radius: 15px;
    padding: 30px 20px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.title {
    display: flex;
    align-items: center;
    font-size: 2.5em;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.title-icon {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.last-update {
    color: #b0b0b0;
    font-size: 1.1em;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

/* 数据区域网格布局 */
.data-sections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

/* 数据区域样式 */
.data-section {
    background: linear-gradient(135deg, rgba(30, 30, 60, 0.8), rgba(20, 20, 40, 0.6));
    border-radius: 20px;
    padding: 30px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    height: fit-content;
}

.data-header {
    margin-bottom: 25px;
    text-align: center;
}

.data-title {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2em;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    margin-bottom: 20px;
}

.data-icon {
    width: 48px;
    height: 48px;
    margin-right: 15px;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
}

/* 区域内标签页样式 */
.section-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    padding: 6px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.section-tab {
    padding: 12px 30px;
    margin: 0 3px;
    background: linear-gradient(145deg, rgba(60, 60, 90, 0.6), rgba(40, 40, 70, 0.8));
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 1.1em;
    color: #e0e0e0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

.section-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    transition: left 0.6s ease;
}

.section-tab:hover::before {
    left: 100%;
}

.section-tab:hover {
    background: linear-gradient(145deg, rgba(80, 80, 120, 0.8), rgba(60, 60, 100, 0.9));
    border-color: rgba(255, 215, 0, 0.6);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.section-tab.active {
    background: linear-gradient(145deg, #ffd700, #ffb347);
    color: #1a1a2e;
    border-color: #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.section-content {
    min-height: 200px;
}

/* 排名列表样式 */
.ranking-container {
    display: grid;
    gap: 12px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 60px 1fr 90px;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    border-radius: 12px;
    border: 2px solid;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    min-height: 65px;
}

.ranking-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.ranking-item:hover::before {
    left: 100%;
}

.ranking-item:hover {
    transform: translateX(15px) translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.2);
    border-width: 3px;
}

.ranking-number {
    font-size: 1.6em;
    font-weight: 700;
    width: 50px;
    height: 50px;
    text-align: center;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.6) 0%, rgba(255, 179, 71, 0.6) 50%, rgba(255, 140, 0, 0.6) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 215, 0, 0.8);
    box-shadow: 
        0 6px 15px rgba(255, 215, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
}

.ranking-number::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, transparent 100%);
    border-radius: 50% 50% 50% 50% / 100% 100% 0% 0%;
    z-index: -1;
}

.class-info {
    text-align: center;
    min-width: 0;
}

.class-name {
    font-size: 1.6em;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.1;
}

.win-rate {
    font-size: 1.6em;
    font-weight: 800;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0px 0px 10px rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 25%, #FF8C00 50%, #DAA520 75%, #B8860B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: brightness(1.2) contrast(1.1);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}

/* 图表样式 */
.chart-container {
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.8), rgba(10, 10, 30, 0.6));
    border-radius: 20px;
    padding: 30px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    min-height: 400px; /* 确保有足够高度显示图表 */
}

.chart-container canvas {
    height: 350px !important; /* 强制设置canvas高度 */
}

.chart-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.period-selector {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    color: #ffd700;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.period-selector:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
}

.period-selector:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.chart-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.chart-wrapper {
    position: relative;
    height: 450px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 社交媒体链接 */
.social-links {
    position: fixed;
    bottom: 100px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.social-icon:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

/* 页脚样式 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
    border-top: 2px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
    z-index: 999;
}

.footer-content {
    text-align: center;
    padding: 15px 20px;
    color: #b0b0b0;
    font-size: 0.9em;
}

.footer-content p {
    margin: 2px 0;
}

/* 职业颜色样式 */
.class-mage { border-color: #69CCF0; }
.class-paladin { border-color: #F58CBA; }
.class-hunter { border-color: #ABD473; }
.class-rogue { border-color: #FFF569; }
.class-priest { border-color: #FFFFFF; }
.class-shaman { border-color: #0070DE; }
.class-warlock { border-color: #9482C9; }
.class-warrior { border-color: #C79C6E; }
.class-druid { border-color: #FF7D0A; }
.class-deathknight { border-color: #C41F3B; }
.class-demonhunter { border-color: #1A3E22; }

/* 加载动画 */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2em;
    color: #ffd700;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ffd700;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .data-sections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .data-sections-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .data-section {
        padding: 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .title {
        font-size: 2em;
    }
    
    .title-icon {
        width: 48px;
        height: 48px;
    }
    
    .data-title {
        font-size: 1.8em;
    }
    
    .data-icon {
        width: 36px;
        height: 36px;
    }
    
    .section-tabs {
        flex-direction: column;
    }
    
    .section-tab {
        width: 100%;
        justify-content: center;
        margin: 3px 0;
        padding: 10px 20px;
        font-size: 1em;
    }
    
    .ranking-item {
        display: grid;
        grid-template-columns: 50px 1fr 75px;
        gap: 12px;
        padding: 10px 15px;
        align-items: center;
        min-height: 55px;
    }
    
    .ranking-number {
        font-size: 1.4em;
        width: 45px;
        height: 45px;
    }
    
    .class-info {
        text-align: center;
        min-width: 0;
    }
    
    .class-name {
        font-size: 1.4em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .win-rate {
        font-size: 1.6em;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .social-links {
        position: static;
        flex-direction: row;
        justify-content: center;
        margin: 30px 0;
        gap: 20px;
    }
    
    .footer {
        position: static;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.6em;
    }
    
    .title-icon {
        width: 40px;
        height: 40px;
    }
    
    .data-title {
        font-size: 1.5em;
    }
    
    .data-icon {
        width: 32px;
        height: 32px;
    }
    
    .section-tab {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    .ranking-item {
        display: grid;
        grid-template-columns: 55px 1fr 75px;
        gap: 10px;
        padding: 12px 15px;
        align-items: center;
    }
    
    .ranking-number {
        font-size: 1.4em;
        width: 45px;
        height: 45px;
    }
    
    .class-info {
        text-align: center;
        min-width: 0;
    }
    
    .class-name {
        font-size: 1.2em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .win-rate {
        font-size: 1.4em;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}