/* ================= BODY ================= */

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(135deg, #eef2ff, #f8fafc);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
}

/* ================= TITLE ================= */

h2 {
    font-size: 32px;
    margin-bottom: 35px;
    color: #1e293b;
    letter-spacing: 0.5px;
}

/* ================= MAIN CARD CONTAINER ================= */

#leaderboardContainer {
    width: 95%;
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
}

/* ================= ROW ================= */

.leaderboard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    margin-bottom: 18px;
    border-radius: 14px;
    transition: all 0.25s ease;
}

.leaderboard-row:hover {
    background: #f1f5ff;
    transform: translateY(-3px);
}

/* ================= RANK BADGE ================= */

.rank {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

/* Top 3 Glow */

.leaderboard-row:nth-child(1) .rank {
    background: gold;
    color: white;
    box-shadow: 0 0 18px gold;
}

.leaderboard-row:nth-child(2) .rank {
    background: silver;
    color: white;
    box-shadow: 0 0 18px silver;
}

.leaderboard-row:nth-child(3) .rank {
    background: #cd7f32;
    color: white;
    box-shadow: 0 0 18px #cd7f32;
}

/* ================= USER INFO ================= */

.user-info {
    flex: 1;
    padding-left: 20px;
}

.username {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.percentage {
    font-size: 14px;
    margin-top: 6px;
    color: #16a34a;
}

/* ================= SCORE ================= */

.score {
    font-size: 18px;
    font-weight: 700;
    color: #2563eb;
}

/* ================= CURRENT USER ================= */

.current-user {
    border: 2px solid #2563eb;
    background: #e0e7ff;
}

/* ================= BUTTON ================= */

.leaderboard-actions {
    margin-top: 35px;
    text-align: center;
}

.leaderboard-actions button {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    border: none;
    padding: 14px 26px;
    font-size: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.leaderboard-actions button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.4);
}

/* ================= RESPONSIVE ================= */

@media (max-width: 600px) {

    #leaderboardContainer {
        padding: 20px;
    }

    .leaderboard-row {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .user-info {
        padding-left: 0;
        width: 100%;
    }

    .rank {
        width: 42px;
        height: 42px;
        font-size: 15px;
    }

    .username {
        font-size: 15px;
    }

    .score {
        font-size: 15px;
        width: 100%;
        text-align: left;
    }

    h2 {
        font-size: 24px;
    }
}