:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #f9fafb;
    --bg-secondary: #e5e7eb;
    --card-bg: #ffffff;
    --border: #e5e7eb;
}
  
.dark {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --secondary: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    --text: #f3f4f6;
    --text-light: #9ca3af;
    --bg: #111827;
    --bg-secondary: #1f2937;
    --card-bg: #1e293b;
    --border: #374151;
}
  
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
  
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
  
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
  
.header {
    background-color: var(--bg-secondary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
  
.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}
  
.logo {
    height: 40px;
    width: auto;
}
  
.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}
  
.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}
  
.nav-link.active {
    color: var(--primary);
}
  
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}
  
.theme-toggle {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: auto;
}
  
.section {
    padding: 3rem 0;
    display: none;
}
  
.section.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}
  
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
  
.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
}
  
.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 50%;
    height: 3px;
    background-color: var(--primary);
}

/* 首页滑动容器 */
.slider-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 50px;
}

.card-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 2rem;
    padding: 1rem 0;
}

.card-slider .match-card {
    flex: 0 0 calc(100% - 2rem);
    scroll-snap-align: start;
}

/* 比赛记录列表 */
.cards-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.cards-list .match-card {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* 比赛卡片通用样式 */
.match-card {
    background-color: var(--card-bg);
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid var(--primary);
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.match-header {
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.match-header h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
    line-height: 1.3;
    word-break: break-word;
}

.match-result {
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 0.3rem;
}

.match-result.win {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
}

.match-result.lose {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.match-content {
    padding: 1.5rem;
}

.teams-container {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.team {
    flex: 1;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
}

.team-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    text-align: center;
    color: var(--primary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.player {
    display: flex;
    align-items: center;
    padding: 0.6rem;
    margin-bottom: 0.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.3rem;
    gap: 0.8rem;
}

/* 玩家信息容器 */
.player-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* 玩家名字和角色 */
.player-name-role {
    flex: 1;
    min-width: 0;
}

.player-name {
    font-weight: 500;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-role {
    font-size: 0.85rem;
    color: var(--text-light);
    opacity: 0.8;
    white-space: nowrap;
}


.player > div {
    flex: 1;
    min-width: 0; /* 防止flex容器溢出 */
}

.player-role {
    font-size: 0.85rem;
    color: var(--text-light);
    opacity: 0.8;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 24px;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

/* 队伍颜色 */
.hero-tag.blue-team {
    background-color: #3b82f6;
    color: white;
}

.hero-tag.red-team {
    background-color: #ef4444;
    color: white;
}

.hero-icon.winner {
    background-color: var(--secondary);
    color: white;
}

/* 视频容器 */
.video-container {
    position: relative;
}

.video-container::before {
    content: '';
    display: block;
    padding-top: 56.25%; /* 16:9 宽高比 */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background-color: #000;
}

/* 播放按钮 */
.play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    font-size: 0.95rem;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.play-btn i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* 时间分类按钮 */
.time-filter {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
}

.time-btn {
    padding: 0.5rem 1rem;
    background-color: var(--bg-secondary);
    border: none;
    border-radius: 2rem;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.time-btn.active {
    background-color: var(--primary);
    color: white;
}

/* 滑动按钮美化 */
.fancy-btn {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.fancy-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.1);
}

.fancy-btn:disabled {
    opacity: 0.3;
    transform: translateY(-50%);
    cursor: not-allowed;
}

#home-prev {
    left: -25px;
}

#home-next {
    right: -25px;
}

/* 数据统计 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.stat-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-bar {
    height: 8px;
    background-color: var(--bg-secondary);
    border-radius: 4px;
    margin-top: 0.25rem;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 4px;
}

/* 视频模态框 */
#video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    width: 90%;
    max-width: 900px;
    border-radius: 0.5rem;
    padding: 1.5rem;
    position: relative;
}

#modal-video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

#modal-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .fancy-btn {
        width: 40px;
        height: 40px;
    }
    
    #home-prev {
        left: -15px;
    }
    
    #home-next {
        right: -15px;
    }
    
    .slider-container {
        padding: 0 30px;
    }
    
    .teams-container {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .match-header h3 {
        font-size: 1.1rem;
    }

    .player {
        padding: 0.5rem;
        gap: 0.6rem;
    }
    
    .player-name {
        font-size: 0.95rem;
    }
    
    .player-role {
        font-size: 0.8rem;
    }
    
    .hero-tag {
        min-width: 36px;
        font-size: 0.85rem;
        padding: 0 6px;
    }
}

/* 加载动画 */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin: 2rem auto;
    display: block;
}

/* 错误提示 */
.error-message {
    background-color: var(--danger);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    margin: 2rem 0;
}

/* 关于页面 */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.rules-list {
    margin: 1rem 0 2rem 1.5rem;
}

.rules-list li {
    margin-bottom: 0.5rem;
}

.bilibili-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.bilibili-link:hover {
    text-decoration: underline;
}

.footer {
    background-color: var(--bg-secondary);
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 2rem;
}

/* 动画类 */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}