/* CSS Reset - 统一各页面样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 90px 20px 300px 20px;
    display: flex;
    flex-direction: column;
    gap: 90px;
}

.page-title {
    font-size: 46px;
    font-weight: normal;
    text-align: center;
}

.section-group-1 {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.section-header {
    padding: 15px 30px;
    font-size: 18px;
    text-align: center;
    border: 2px solid #454545;
}

/* 成绩网格布局 */
.results-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 40px;
    justify-content: flex-start;
}

/* 成绩卡片 */
.result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    margin: 0 12px 20px 0;
    transition: all 0.3s ease;
    width: 320px;
    height: 350px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* 头像容器 */
.driver-avatar-container {
    margin-bottom: 16px;
}

.driver-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
    transition: border-color 0.3s ease;
}

.result-card:hover .driver-avatar {
    border-color: #ff0000;
}

/* 选手信息容器 */
.driver-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex: 1;
}

/* 选手姓名 */
.driver-name {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* 排名信息 */
.rank-info {
    font-size: 24px;
    color: #666;
    margin-bottom: 6px;
    text-align: center;
    font-weight: 500;
}

/* 得分信息 */
.score-info {
    font-size: 24px;
    color: #666;
    text-align: center;
    font-weight: 500;
}

/* 加载状态样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* 错误信息样式 */
.error-message {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.error-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.error-message h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.error-message p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

/* 无成绩数据样式 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
}

.all-empty-hint {
    margin-top: -40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* 排行榜表格样式 */
.table-container {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 0;
}

.points-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.points-table th,
.points-table td {
    border: 1px solid #e0e0e0;
    padding: 16px 12px;
    text-align: center;
    font-size: 16px;
    color: #333;
}

.points-table th {
    background-color: #f8f8f8;
    font-weight: 600;
}

.points-table tbody tr:hover {
    background-color: #f9f9f9;
}

.points-table tbody tr:nth-child(even) {
    background-color: #fcfcfc;
}

.points-table td:first-child {
    font-weight: bold;
}

.table-empty-row td {
    color: #999;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-title {
        font-size: 38px;
        font-weight: normal;
    }

    .main-content {
        padding: 60px 15px 200px 15px;
        gap: 60px;
    }

    .section-group-1 {
        gap: 40px;
    }

    .results-grid {
        gap: 16px;
    }

    .result-card {
        flex: 1;
        padding: 16px;
        margin: 0 8px 16px 0;
    }

    .driver-avatar {
        width: 150px;
        height: 150px;
    }

    .driver-name {
        font-size: 20px;
    }

    .rank-info, .score-info {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 28px;
        font-weight: normal;
    }

    .main-content {
        padding: 40px 10px 150px 10px;
        gap: 40px;
    }

    .section-group-1 {
        gap: 30px;
    }

    .results-grid {
        gap: 12px;
    }

    .result-card {
        width: 100vw;
        padding: 12px;
        margin: 0 4px 12px 0;
    }

    .driver-avatar {
        width: 150px;
        height: 150px;
    }

    .driver-name {
        font-size: 20px;
    }

    .rank-info, .score-info {
        font-size: 20px;
    }
}
