/* Wrapper */
.leaderboard-wrapper {
    max-width: 960px;
    margin: auto;
    padding: 40px 20px;
    text-align: center;
}

.leaderboard-title {
    font-family: 'Limelight', sans-serif;
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--retro-red);
}

/* Tabs */
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.tab-button {
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 6px;
    border: 2px solid var(--retro-green);
    background: #fff;
    text-decoration: none;
    color: var(--retro-green);
    transition: 0.3s;
}

.tab-button:hover {
    background-color: var(--retro-green);
    color: white;
}

.tab-button.active {
    background: var(--retro-green);
    color: #fff;
}

.tab-button.disabled {
    color: #999;
    border-color: #ccc;
    background: #eee;
    cursor: not-allowed;
    position: relative;
}

.tab-button.disabled .coming-soon {
    font-size: 0.75rem;
    display: block;
    color: #888;
}

/* Sort Filters */
.sort-filters {
    margin-bottom: 30px;
}

.sort-filters a {
    margin: 0 10px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--retro-green);
    text-decoration: none;
}

.sort-filters a.active {
    color: var(--retro-red);
    text-decoration: underline;
}

/* Leaderboard List */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.leaderboard-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 2px solid var(--retro-green);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 4px 4px 0 var(--retro-yellow);
    text-align: left;
    transition: 0.2s;
}

.leaderboard-player:hover {
    transform: translateY(-1px);
    box-shadow: 6px 6px 0 var(--retro-yellow);
}

.leaderboard-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.leaderboard-rank {
    font-size: 1.4rem;
    font-weight: bold;
    width: 32px;
    text-align: center;
}

.leaderboard-photo {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
}

.leaderboard-name {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.leaderboard-name a {
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-dark);
}

.games-played {
    font-size: 0.85rem;
    color: #555;
}

/* Stats */
.leaderboard-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: 20px;
    flex-shrink: 0;
}

.inline-ratings {
    display: flex;
    gap: 24px;
    font-size: 0.95rem;
}

.inline-ratings .rating-label {
    font-weight: 600;
    margin-right: 4px;
}

.inline-ratings .rating-set {
    display: flex;
    align-items: center;
    gap: 4px;
}

.result-stars i {
    color: var(--retro-yellow);
}

.rating-number {
    font-weight: bold;
    font-size: 0.9rem;
}

/* Overall Circle */
.overall-score-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f2f2f2;
    border: 3px solid var(--retro-yellow);
    color: var(--text-dark); /* If defined */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    color: #222;
    flex-shrink: 0;
}

/* Tier Colors */
.rating-gold { border-color: gold; }
.rating-silver { border-color: silver; }
.rating-bronze { border-color: #cd7f32; }
.rating-red { border-color: #e63946;  }

/* Sparkle effect */
.sparkle {
    animation: sparkle 0.8s ease-in-out infinite alternate;
}

@keyframes sparkle {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.2); opacity: 0.8; }
}

/* ✅ Mobile Responsive Tweaks */
@media (max-width: 600px) {
    .leaderboard-player {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .leaderboard-left {
        flex-direction: row;
        justify-content: flex-start;
        width: 100%;
    }

    .leaderboard-photo {
        width: 42px;
        height: 42px;
    }

    .leaderboard-name a {
        font-size: 1rem;
    }

    .games-played {
        font-size: 0.75rem;
    }

    .leaderboard-stats {
        margin-top: 8px;
        width: 100%;
    }

    .inline-ratings {
        flex-direction: column; /* ✅ Stack vertically */
        align-items: flex-start;
        gap: 8px;
        font-size: 0.85rem;
    }

    .inline-ratings .rating-set {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .overall-score-circle {
        width: 52px;
        height: 52px;
        font-size: 1.05rem;
        align-self: flex-end;
        margin-top: 10px;
    }

    .rating-number {
        font-size: 0.85rem;
    }
}