/* Leaderboard Page Styles --------------------------------------------------------- */

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(19, 53, 82, 0.4) 0%, rgba(11, 15, 27, 0.6) 100%);
    border: 1px solid rgba(83, 195, 255, 0.2);
    border-radius: 16px;
    margin-bottom: 40px;
}

.hero-section {
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
    padding: 36px 20px;
}

.hero-section .highlight-title {
    font-size: clamp(1.5rem, 5vw, 3rem);
    margin-bottom: 12px;
    letter-spacing: 1px;
    color: #ffea63;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-block;
}

.hero-section p {
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    max-width: 720px;
}

/* ── Main container ──────────────────────────────────────── */

.lb-container {
    background: #131a26;
    border: 1px solid #42437C;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    max-width: 900px;
    margin: 0 auto 50px;
    width: calc(100% - 24px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* ── Mode toggle bar ─────────────────────────────────────── */

.lb-mode-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px 24px 18px;
    background: #0b0f1b;
    border-bottom: 1px solid rgba(66, 67, 124, 0.4);
}

.lb-mode-btn {
    padding: 9px 26px;
    background: transparent;
    border: 1px solid rgba(66, 67, 124, 0.55);
    border-radius: 6px;
    color: #888;
    font-family: 'WMCT_One', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.lb-mode-btn:hover {
    color: #ddd;
    border-color: rgba(83, 195, 255, 0.45);
    background: rgba(255, 255, 255, 0.04);
}

.lb-mode-btn.active {
    color: #ffea63;
    border-color: #ffea63;
    background: rgba(255, 234, 99, 0.09);
}

/* ── Season tabs ─────────────────────────────────────────── */

.lb-season-tabs {
    display: flex;
    background: #0b0f1b;
    border-bottom: 2px solid #42437C;
    flex-wrap: wrap;
}

.lb-season-tab {
    flex: 1;
    padding: 14px 12px;
    background: transparent;
    border: none;
    color: #888;
    font-family: 'WMCT_One', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.lb-season-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.lb-season-tab.active {
    color: #ffea63;
    background: #131a26;
    border-bottom: 3px solid #ffea63;
}

/* ── Body / list area ────────────────────────────────────── */

.lb-body {
    padding: 20px 24px 28px;
}

.lb-header-row {
    display: flex;
    align-items: center;
    padding: 6px 15px 10px;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Blogger', sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 10px;
    box-sizing: border-box;
}

.lb-col-rank {
    width: 66px;
    flex-shrink: 0;
}

.lb-col-name {
    flex: 1;
    min-width: 0;
}

.lb-col-score {
    width: 96px;
    flex-shrink: 0;
    text-align: right;
}

.lb-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ── Row ─────────────────────────────────────────────────── */

.lb-row {
    display: flex;
    align-items: center;
    padding: 11px 15px;
    background: rgba(255, 255, 255, 0.025);
    margin-bottom: 7px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    box-sizing: border-box;
}

.lb-row:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(83, 195, 255, 0.15);
}

/* Rank column */
.lb-rank {
    width: 66px;
    flex-shrink: 0;
    font-family: 'Blogger', sans-serif;
    font-size: 0.92rem;
    color: #ffffff;
    text-align: left;
}

/* Score column */
.lb-score {
    width: 96px;
    flex-shrink: 0;
    text-align: right;
    font-family: 'Blogger', sans-serif;
    font-weight: bold;
    color: #ffea63;
    font-size: 1rem;
}

/* ── Ordinal color system ────────────────────────────────── */

.lb-row[data-rank="1"] .lb-rank,
.lb-row[data-rank="1"] .lb-name {
    color: #ffd700;
    font-weight: bold;
}

.lb-row[data-rank="2"] .lb-rank,
.lb-row[data-rank="2"] .lb-name {
    color: #c0c0c0;
}

.lb-row[data-rank="3"] .lb-rank,
.lb-row[data-rank="3"] .lb-name {
    color: #cd7f32;
}

/* ── Player identity ─────────────────────────────────────── */

.lb-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex: 1;
    min-width: 0;
    transition: opacity 0.15s ease;
}

.lb-identity:hover {
    opacity: 0.8;
}

.lb-pfp {
    width: 40px;
    height: 40px;
    border-radius: 7px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.09);
    flex-shrink: 0;
    box-sizing: border-box;
}

.lb-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
    font-size: 1rem;
}

/* ── Loading / empty states ──────────────────────────────── */

.lb-loading,
.lb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 48px 16px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Blogger', sans-serif;
    font-size: 1rem;
    list-style: none;
}

.loader-inline {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-top-color: #ffea63;
    border-radius: 50%;
    animation: lb-spin 0.7s linear infinite;
    flex-shrink: 0;
}

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

/* ── Paginator ───────────────────────────────────────────── */

.lb-paginator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 18px 0 4px;
    min-height: 52px;
}

.lb-page-btn {
    padding: 7px 20px;
    background: transparent;
    border: 1px solid rgba(66, 67, 124, 0.6);
    border-radius: 6px;
    color: #aaa;
    font-family: 'Blogger', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.lb-page-btn:hover:not(:disabled) {
    color: #fff;
    border-color: rgba(83, 195, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.lb-page-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.lb-page-info {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.88rem;
    min-width: 90px;
    text-align: center;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 1100px) {
    .main-container {
        margin-left: 12px;
        margin-right: 12px;
        box-sizing: border-box;
    }

    .lb-container {
        width: calc(100% - 24px);
    }
}

@media (max-width: 600px) {
    .lb-body {
        padding: 14px 10px 20px;
    }

    .lb-header-row {
        padding: 6px 8px 10px;
    }

    .lb-row {
        padding: 10px 8px;
    }

    .lb-col-rank,
    .lb-rank {
        width: 50px;
    }

    .lb-col-score,
    .lb-score {
        width: 74px;
        font-size: 0.9rem;
    }

    .lb-pfp {
        width: 34px;
        height: 34px;
    }

    .lb-name {
        font-size: 0.92rem;
    }

    .lb-season-tab {
        font-size: 0.82rem;
        padding: 12px 8px;
    }

    .lb-mode-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}