:root {
    --primary-gradient: linear-gradient(135deg, #1a6c1a, #1f8fb2, #2dfdbb);
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-dark: #2c3e50;
    --text-light: #f8f9fa;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --orange: #ff7a00;
    --orange-dark: #e66a00;
    --orange-light: rgba(255, 122, 0, 0.03);
    --orange-border: #ffd0a8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--primary-gradient);
    color: var(--text-dark);
    min-height: 100vh;
    padding: 20px;
    background-attachment: fixed;
}

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

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-light);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 300;
    margin-bottom: 15px;
}

/* 按钮通用样式 */
.route-btn, .filter-btn {
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    border-radius: 50px;
    border: none;
}

/* 线路切换按钮 */
.route-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.route-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    backdrop-filter: blur(5px);
}

.route-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.route-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #1a6c1a;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 统计卡片（默认注释） */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 20px;
    min-width: 180px;
    text-align: center;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    animation: slideUp 0.5s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-light);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 控制栏 */
.control-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    animation: slideUp 0.7s ease;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 5px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex: 1;
    max-width: 400px;
    margin-right: 15px;
    transition: var(--transition);
}

.search-box:focus-within {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.search-box input {
    border: none;
    outline: none;
    padding: 10px;
    font-size: 1rem;
    width: 100%;
    background: transparent;
}

/* 筛选按钮 */
.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background: white;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.filter-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #1a6c1a;
    color: white;
}

/* 排行榜主体 */
.leaderboard {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: fadeIn 1s ease;
}

.participants-list {
    max-height: 70vh;
    overflow-y: auto;
}

/* 参赛者行样式 */
.participant {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    align-items: stretch;
    transition: var(--transition);
    position: relative;
}

.participant:hover {
    background: #f9f9f9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.participant-main {
    display: flex;
    align-items: center;
}

/* 赛季和日期详情样式 */
.participant-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    padding: 0 100px;
    color: var(--orange);
    font-size: 1rem;
    display: flex;
    gap: 30px;
    align-items: center;
    opacity: 0;
    justify-content: center;
}

.participant:hover .participant-details {
    max-height: 40px;
    padding: 15px 100px;
    border-top: 1px dashed var(--orange-border);
    margin-top: 5px;
    opacity: 1;
    background: linear-gradient(to right, var(--orange-light), transparent);
}

.detail-item {
    display: flex;
    align-items: center;
}

.detail-item strong {
    margin-right: 8px;
    position: relative;
    padding-right: 10px;
    color: var(--orange-dark);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.detail-item strong::after {
    content: "";
    position: absolute;
    right: 0;
    top: 3px;
    height: 70%;
    width: 1px;
    background-color: rgba(255, 122, 0, 0.3);
}

.detail-value {
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease;
}

.participant:hover .detail-value {
    transform: translateX(5px);
}

/* 参赛者信息样式 */
.participant-info {
    display: flex;
    align-items: center;
    width: 240px;
    flex-shrink: 0;
    padding-left: 20px;
}

.rankup {
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 15px;
    color: var(--text-dark);
    min-width: 30px;
    text-align: center;
    transition: var(--transition);
}

.top-3 .rankup {
    color: var(--gold);
    font-size: 2rem;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid #e0e0e0;
    transition: var(--transition);
}

.top-3 .avatar {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.name-container {
    display: flex;
    align-items: center;
    flex: 1;
}

.name {
    font-weight: bold;
    font-size: 1.2rem;
    flex: 1;
}

.medal-container {
    margin-left: auto;
    padding-right: 10px;
}

.time-display {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 20px;
    margin-left: 20px;
}

.time-bar {
    height: 25px;
    background: linear-gradient(90deg, #4cd964, #5ac8fa);
    border-radius: 12px;
    position: relative;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: width;
    margin-right: 15px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

.time-bar-over-8h {
    background: linear-gradient(90deg, #ff6b6b, #ff8e53);
}

.time-label {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-dark);
    min-width: 90px;
    text-align: right;
}

.medal {
    font-size: 1.3rem;
    transition: var(--transition);
}

.gold {
    color: var(--gold);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.silver {
    color: var(--silver);
    text-shadow: 0 0 8px rgba(192, 192, 192, 0.4);
}

.bronze {
    color: var(--bronze);
    text-shadow: 0 0 8px rgba(205, 127, 50, 0.4);
}

.highlight {
    animation: highlight 2s ease;
}

/* 动画定义 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes highlight {
    0% { background-color: transparent; }
    50% { background-color: rgba(255, 215, 0, 0.3); }
    100% { background-color: transparent; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .control-bar {
        flex-direction: column;
        align-items: center;
    }
    
    .search-box {
        width: 100%;
        max-width: none;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .filter-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .participant-main {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 0;
    }
    
    .participant-info {
        width: 100%;
        margin-bottom: 10px;
        padding-left: 15px;
    }
    
    .time-display {
        width: 100%;
        padding: 0 15px;
        margin-left: 0;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .route-buttons {
        flex-wrap: wrap;
    }
    
    .route-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .participant-details {
        padding: 0 20px;
    }
    
    .participant:hover .participant-details {
        padding: 15px 20px;
    }
}

footer {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    opacity: 0.8;
    animation: fadeIn 1.5s ease;
    margin-top: 2px; /* 调整与上方内容的距离（增大值=距离更远） */
     margin-bottom: 0px; /*增加底部外边距，避免贴紧浏览器边缘 */
    padding: 4px;  /*8调整内部上下 padding（增大值=整体变高） */
     /*可选：固定高度 */
    height: 4px; 
}