/* Leaderboards - Production Style Guide Aligned */

/* Header Styles */
.leaderboard-header {
    text-align: center;
    margin-top: 20px;
}

.leaderboard-header h1 {
    font-size: 2.5rem;
    color: var(--off-yellow);
    font-weight: 700;
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: -0.02em;
}

.leaderboard-header .subtitle {
    font-size: 1.1rem;
    color: var(--off-white);
    margin-bottom: 20px;
    opacity: 0.8;
}

.leaderboard-subtitle {
    font-size: 1rem;
    color: var(--off-white);
    margin-top: 8px;
    margin-bottom: 20px;
    opacity: 0.7;
    font-style: italic;
}

/* Content Layout - Removed, table is now direct child */

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.empty-state h2 {
    font-size: 2rem;
    color: var(--off-yellow);
    margin-bottom: 15px;
    font-weight: 600;
}

.empty-state p {
    font-size: 1.2rem;
    color: var(--off-white);
    margin-bottom: 30px;
    opacity: 0.8;
}

/* Table Styles */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin-top: 40px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}


/* Table header styles removed - no longer using headers */

/* Column Widths */
.rank-col {
    width: 60px;
    text-align: center;
}

.player-col {
    width: 50%;
}

.weekly-wins-col {
    width: 40%;
}

/* Ranked Table Specific Styles */
.ranked-table {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.ranked-table thead {
    background: rgba(0, 0, 0, 0.1);
}

.ranked-table th {
    padding: 12px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--off-yellow);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Ranked Table Column Widths */
.ranked-table .rank-col {
    width: 15%;
}

.ranked-table .player-col {
    width: 35%;
}

.ranked-table .elo-cell,
.ranked-table .winrate-cell,
.ranked-table .games-cell {
    width: 16.67%;
    text-align: center;
}


/* Table Rows */
.leaderboard-row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

.leaderboard-row:first-child td {
    padding-top: 20px;
}

.leaderboard-row:last-child td {
    padding-bottom: 20px;
    border-bottom: none;
}

.leaderboard-row:hover {
    background: rgba(0, 0, 0, 0.02);
}

.leaderboard-row.top-three {
    background: rgba(0, 0, 0, 0.05);
}

.leaderboard-row.top-three:hover {
    background: rgba(0, 0, 0, 0.08);
}

.leaderboard-table td {
    padding: 15px;
    vertical-align: middle;
    color: var(--off-white);
}

/* Rank Cell */
.rank-cell {
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--off-yellow);
}

/* Player Info */
.player-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

.player-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--lavendar);
}

/* Weekly Wins */
.weekly-wins-cell {
    text-align: center;
}

.wins-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--coral);
    display: block;
    margin-bottom: 2px;
}

/* ELO Cell Styles */
.elo-cell {
    text-align: center;
}

.elo-number {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--off-yellow);
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 50px;
}

/* Win Rate Cell Styles */
.winrate-cell {
    text-align: center;
}

.winrate-number {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--off-white);
    padding: 4px 6px;
    border-radius: 4px;
    min-width: 45px;
}

/* Win rate background colors based on performance */
.winrate-number[data-rate]:before {
    content: "";
}

/* Games Cell Styles */
.games-cell {
    text-align: center;
}

.games-number {
    font-size: 1rem;
    font-weight: 500;
    color: var(--off-white);
    opacity: 0.8;
}


/* Small Screen Adjustments for Ranked Table */
@media (max-width: 480px) {
    /* Ranked table specific adjustments for small screens */
    .ranked-table th {
        padding: 6px 4px;
        font-size: 10px;
        letter-spacing: 0.3px;
    }

    .ranked-table td {
        padding: 8px 4px;
    }

    .ranked-table .rank-col {
        width: 12%;
    }

    .ranked-table .player-col {
        width: 38%;
    }

    .ranked-table .elo-cell,
    .ranked-table .winrate-cell,
    .ranked-table .games-cell {
        width: 16.67%;
    }

    .ranked-table .rank-cell {
        font-size: 14px;
    }

    .ranked-table .player-avatar {
        width: 25px;
        height: 25px;
    }

    .ranked-table .player-name {
        font-size: 14px;
    }

    .ranked-table .player-info {
        gap: 6px;
    }

    .ranked-table .elo-number {
        font-size: 12px;
        padding: 2px 4px;
        min-width: auto;
    }

    .ranked-table .winrate-number {
        font-size: 12px;
        padding: 2px 3px;
        min-width: auto;
    }

    .ranked-table .games-number {
        font-size: 12px;
    }

    /* Reduce padding on first and last rows */
    .ranked-table .leaderboard-row:first-child td {
        padding-top: 12px;
    }

    .ranked-table .leaderboard-row:last-child td {
        padding-bottom: 12px;
    }
}

/* Very small screens - hide avatar */
@media (max-width: 380px) {
    .ranked-table .player-avatar {
        display: none;
    }

    .ranked-table .player-info {
        gap: 0;
    }
}

/* Tablet and Desktop Styles */
@media (min-width: 768px) {
    .leaderboard-header h1 {
        font-size: 2.5rem;
    }

    .leaderboard-subtitle {
        font-size: 1.1rem;
    }

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

    .leaderboard-table td {
        padding: 15px 20px;
    }

    .rank-col {
        width: 80px;
    }

    .player-col {
        width: 60%;
    }

    .player-avatar {
        width: 40px;
        height: 40px;
    }

    .player-name {
        font-size: 1.1rem;
    }

    .wins-number {
        font-size: 1.5rem;
    }

    .player-info {
        gap: 12px;
    }

    .rank-cell {
        font-size: 1.1rem;
    }

    /* Ranked Table Tablet Styles */
    .ranked-table th {
        padding: 15px 12px;
        font-size: 0.8rem;
    }

    .ranked-table .elo-number {
        font-size: 1.2rem;
        padding: 6px 10px;
        min-width: 60px;
    }

    .winrate-number {
        font-size: 1.1rem;
        padding: 6px 8px;
        min-width: 50px;
    }

    .games-number {
        font-size: 1.1rem;
    }
}

@media (min-width: 1024px) {
    .ranked-table th {
        padding: 15px 15px;
        font-size: 0.85rem;
    }

    .ranked-table .rank-col {
        width: 10%;
    }

    .ranked-table .player-col {
        width: 40%;
    }

    .ranked-table .elo-cell,
    .ranked-table .winrate-cell,
    .ranked-table .games-cell {
        width: 16.67%;
    }

    .elo-number {
        font-size: 1.3rem;
        padding: 8px 12px;
        min-width: 70px;
    }

    .winrate-number {
        font-size: 1.1rem;
        padding: 6px 10px;
        min-width: 55px;
    }

    .games-number {
        font-size: 1.1rem;
    }
}