/* Scores Container */
.scores-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 2rem 2rem;
    background-color: var(--bg);
    min-height: 100vh;
}

/* Scores Header */
.scores-header {
    background: var(--hero);
    color: var(--card-text);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.scores-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Moara Demo', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.subtitle {
    margin: 0;
    opacity: 0.95;
    font-size: 1rem;
    font-family: 'Stack Sans Text', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Scores Content */
.scores-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Benchmark Tabs */
.benchmark-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.tab-button {
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Stack Sans Text', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background-color: var(--bg);
    border-color: var(--hero);
    transform: translateY(-2px);
}

.tab-button.active {
    background: var(--hero);
    color: var(--card-text);
    border-color: var(--hero);
}

/* Leaderboard Section */
.leaderboard-section {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    min-height: 400px;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.leaderboard-header h2 {
    margin: 0 0 0.5rem 0;
    color: var(--text);
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'Moara Demo', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.benchmark-description {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    font-family: 'Stack Sans Text', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--hero);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-state p {
    margin-top: 1rem;
    color: var(--muted);
    font-family: 'Stack Sans Text', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 3rem;
    color: #d32f2f;
    font-family: 'Stack Sans Text', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--muted);
    font-family: 'Stack Sans Text', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Leaderboard Table */
.leaderboard-table-container {
    overflow-x: auto;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.leaderboard-table thead {
    background-color: var(--bg);
}

.leaderboard-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--text);
    border-bottom: 2px solid var(--border);
    font-family: 'Stack Sans Text', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.leaderboard-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-family: 'Stack Sans Text', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.leaderboard-table tbody tr:hover {
    background-color: var(--bg);
    transition: background-color 0.2s ease;
}

.leaderboard-table tbody tr.highlight {
    background-color: var(--hero);
    opacity: 0.15;
}

/* Table Columns */
.rank-column {
    width: 80px;
    text-align: center !important;
}

.player-column {
    width: auto;
}

.score-column {
    width: 150px;
    text-align: center !important;
}

.attempts-column {
    width: 120px;
    text-align: center !important;
}

.date-column {
    width: 200px;
}

.rank-column td,
.score-column td,
.attempts-column td {
    text-align: center;
}

/* Rank Badge */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1B211A;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #1B211A;
    box-shadow: 0 2px 4px rgba(192, 192, 192, 0.3);
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e8a87c 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(205, 127, 50, 0.3);
}

.rank-other {
    background: var(--bg);
    color: var(--muted);
}

/* Score Display */
.score-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--hero);
}

/* Player Name */
.player-name {
    font-weight: 600;
    color: var(--text);
}

/* Responsive Design */
@media (max-width: 768px) {
    .scores-container {
        padding: 1rem;
    }

    .scores-header {
        padding: 1.5rem;
    }

    .scores-header h1 {
        font-size: 1.5rem;
    }

    .benchmark-tabs {
        gap: 0.5rem;
    }

    .tab-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .leaderboard-section {
        padding: 1.5rem;
    }

    .leaderboard-header h2 {
        font-size: 1.4rem;
    }

    .leaderboard-table {
        font-size: 0.85rem;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.75rem 0.5rem;
    }

    .rank-badge {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .score-value {
        font-size: 1rem;
    }

    /* Hide date column on mobile */
    .date-column {
        display: none;
    }
}

@media (max-width: 480px) {
    .tab-button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    /* Hide attempts column on very small screens */
    .attempts-column {
        display: none;
    }
}
