/* ============================================
   Leaderboard Page Styling
   ============================================ */

.leaderboard-page {
    background:
        radial-gradient(circle at 50% 0%, rgba(245, 200, 66, .1), transparent 32rem),
        radial-gradient(circle at 15% 70%, rgba(0, 207, 255, .08), transparent 28rem),
        linear-gradient(180deg, #01050a 0%, #05111d 50%, #01050a 100%);
}

.leaderboard-shell {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 32px 18px 56px;
    color: #e6f4ff;
}

/* Top Navigation */
.leaderboard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.leaderboard-nav-left {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.leaderboard-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: rgba(126, 233, 255, .08);
    border: 1px solid rgba(126, 233, 255, .25);
    border-radius: 6px;
    color: #e6f4ff;
    text-decoration: none;
    font-size: .87rem;
    font-weight: 600;
    transition: all .18s ease;
}

.leaderboard-nav-btn:hover {
    background: rgba(126, 233, 255, .18);
    border-color: rgba(126, 233, 255, .4);
    color: #fff;
    transform: translateY(-1px);
}

.leaderboard-nav-btn--primary {
    background: #00cfff;
    border-color: #00cfff;
    color: #03101a;
}

.leaderboard-nav-btn--primary:hover {
    background: #00b8e6;
    border-color: #00b8e6;
    color: #03101a;
}

/* Title */
.leaderboard-title-section {
    text-align: center;
    margin-bottom: 32px;
}

.leaderboard-title {
    margin: 0;
    font-family: "Bebas Neue", system-ui, sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1;
    color: #fff;
}

.leaderboard-title-accent {
    background: linear-gradient(90deg, #f5c842, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.leaderboard-subtitle {
    margin: 10px 0 0;
    color: #b9d4e8;
    font-size: 1rem;
}

/* Current User Card */
.leaderboard-me {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 26px;
    background: linear-gradient(135deg, rgba(0, 207, 255, .12), rgba(126, 233, 255, .04));
    border: 2px solid #00cfff;
    border-radius: 14px;
    margin-bottom: 32px;
    box-shadow: 0 0 32px rgba(0, 207, 255, .12);
    flex-wrap: wrap;
}

.leaderboard-me-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    background-size: cover;
    background-position: center;
    border: 3px solid rgba(0, 207, 255, .4);
    flex-shrink: 0;
}

.leaderboard-me-info {
    flex: 1;
    min-width: 0;
}

.leaderboard-me-label {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}

.leaderboard-me-sub {
    color: #7fe9ff;
    font-size: .9rem;
    margin-top: 2px;
}

.leaderboard-me-stats {
    display: flex;
    gap: 22px;
    text-align: center;
}

.leaderboard-me-stat strong {
    display: block;
    color: #00cfff;
    font-size: 1.2rem;
    font-weight: 800;
}

.leaderboard-me-stat span {
    display: block;
    color: #8fa6ba;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 4px;
}

.leaderboard-me-progress {
    flex-basis: 100%;
    color: #cbd5e1;
    font-size: .88rem;
    margin-top: 4px;
}

/* Podium */
.leaderboard-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 36px;
    flex-wrap: nowrap;
}

.leaderboard-podium-position {
    text-align: center;
    flex-shrink: 0;
}

.leaderboard-podium-position[data-rank="1"] {
    order: 2;
}

.leaderboard-podium-position[data-rank="2"] {
    order: 1;
}

.leaderboard-podium-position[data-rank="3"] {
    order: 3;
}

.leaderboard-podium-avatar {
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
}

.leaderboard-podium-position[data-rank="1"] .leaderboard-podium-avatar {
    width: 96px;
    height: 96px;
    font-size: 2rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: 4px solid #fbbf24;
    box-shadow: 0 0 32px rgba(251, 191, 36, .45);
}

.leaderboard-podium-position[data-rank="2"] .leaderboard-podium-avatar {
    width: 76px;
    height: 76px;
    font-size: 1.55rem;
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    border: 3px solid #cbd5e1;
}

.leaderboard-podium-position[data-rank="3"] .leaderboard-podium-avatar {
    width: 66px;
    height: 66px;
    font-size: 1.4rem;
    background: linear-gradient(135deg, #d4a574, #cd7f32);
    border: 3px solid #cd7f32;
}

.leaderboard-podium-base {
    margin: 14px auto 0;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
    color: #fff;
    font-weight: 800;
    font-size: .9rem;
}

.leaderboard-podium-position[data-rank="1"] .leaderboard-podium-base {
    height: 110px;
    width: 100px;
    background: linear-gradient(180deg, #f59e0b, #b45309);
}

.leaderboard-podium-position[data-rank="2"] .leaderboard-podium-base {
    height: 84px;
    width: 86px;
    background: linear-gradient(180deg, #94a3b8, #64748b);
}

.leaderboard-podium-position[data-rank="3"] .leaderboard-podium-base {
    height: 62px;
    width: 76px;
    background: linear-gradient(180deg, #cd7f32, #92400e);
}

.leaderboard-podium-name {
    color: #fff;
    font-weight: 700;
    margin-top: 8px;
    font-size: .95rem;
}

.leaderboard-podium-points {
    color: #7fe9ff;
    font-size: .82rem;
    margin-top: 2px;
}

/* Rankings Table */
.leaderboard-table-wrap {
    background: rgba(0, 8, 18, .92);
    border: 1px solid rgba(126, 233, 255, .2);
    border-radius: 12px;
    overflow: hidden;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table thead {
    background: rgba(126, 233, 255, .08);
    border-bottom: 1px solid rgba(126, 233, 255, .2);
}

.leaderboard-table th {
    padding: 14px 16px;
    text-align: left;
    color: #7fe9ff;
    font-weight: 700;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.leaderboard-table th.text-center {
    text-align: center;
}

.leaderboard-table th.text-right {
    text-align: right;
}

.leaderboard-table tr {
    border-bottom: 1px solid rgba(126, 233, 255, .08);
    transition: background .16s ease;
}

.leaderboard-table tr:hover {
    background: rgba(126, 233, 255, .04);
}

.leaderboard-table tr.is-me {
    background: rgba(0, 207, 255, .1);
}

.leaderboard-table td {
    padding: 14px 16px;
    color: #d6eaff;
}

.leaderboard-table td.text-center {
    text-align: center;
}

.leaderboard-table td.text-right {
    text-align: right;
}

.leaderboard-rank {
    font-weight: 800;
    font-size: 1.05rem;
    color: #8fa6ba;
}

.leaderboard-rank.top {
    color: #fbbf24;
}

.leaderboard-user-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.leaderboard-user-link:hover .leaderboard-username {
    color: #00cfff;
}

.leaderboard-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 800;
    color: #fff;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.leaderboard-username {
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    transition: color .16s ease;
}

.leaderboard-userloc {
    color: #8fa6ba;
    font-size: .8rem;
}

.leaderboard-points {
    color: #00cfff;
    font-weight: 800;
    font-size: 1.05rem;
}

/* Responsive */
@media (max-width: 768px) {
    .leaderboard-podium {
        gap: 8px;
    }

    .leaderboard-podium-position[data-rank="1"] .leaderboard-podium-avatar {
        width: 80px;
        height: 80px;
        font-size: 1.6rem;
    }

    .leaderboard-me {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .leaderboard-me-stats {
        justify-content: center;
        gap: 16px;
    }

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

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 10px 8px;
    }

    .leaderboard-table .hide-mobile {
        display: none;
    }
}
