.stats-page {
    display: grid;
    gap: 1.25rem;
    color: #eef4ff;
}

.stats-kicker {
    display: inline-flex;
    font-size: .76rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(214, 225, 255, .72);
    margin-bottom: .35rem;
}

.stats-title,
.stats-section-title,
.stats-player-name,
.stats-top-name {
    color: #fff;
    margin: 0;
    font-weight: 800;
}

.stats-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.stats-subtitle,
.stats-muted { color: rgba(230,236,255,.72); }
.stats-section { display: grid; gap: .85rem; }
.stats-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.stats-section-title { font-size: 1.05rem; }

.stats-hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
}

.stats-toolbar {
    display: flex;
    align-items: end;
    gap: .8rem;
    flex-wrap: wrap;
}

.stats-search-wrap,
.stats-sort-wrap {
    display: grid;
    gap: .45rem;
}

.stats-sort-label {
    color: rgba(230,236,255,.72);
    font-size: .84rem;
}

.stats-input,
.stats-select {
    min-height: 48px;
    background: rgba(255,255,255,.06);
    color: #f7faff;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: .8rem 1rem;
    outline: none;
    box-shadow: none;
}

.stats-input {
    min-width: 240px;
}

.stats-input::placeholder { color: rgba(230,236,255,.48); }
.stats-input:focus,
.stats-select:focus {
    border-color: rgba(112, 160, 255, .42);
    background: rgba(255,255,255,.08);
}

.stats-btn {
    min-height: 48px;
    padding: 0 1.05rem;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-weight: 700;
}

.stats-player-card,
.stats-top-card,
.stats-table-wrap {
    background: transparent;
}

.stats-player-main {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.stats-player-copy { display: grid; gap: .8rem; flex: 1 1 auto; }

.stats-player-headline {
    display: flex;
    align-items: center;
    gap: .85rem;
    flex-wrap: wrap;
}

.stats-avatar {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.14);
    box-shadow: 0 10px 22px rgba(0,0,0,.22);
    background: rgba(255,255,255,.05);
}

.stats-avatar--hero {
    width: 62px;
    height: 62px;
}

.stats-avatar--top {
    width: 58px;
    height: 58px;
}

.stats-avatar--table {
    width: 42px;
    height: 42px;
}

.stats-player-name { font-size: clamp(1.2rem, 2.4vw, 1.7rem); }
.stats-mini-metrics { display: flex; flex-wrap: wrap; gap: .8rem; }
.stats-mini-chip {
    min-width: 130px;
    padding: .85rem 1rem;
    border-radius: 16px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.07);
}
.stats-mini-chip span { display: block; color: rgba(230,236,255,.66); font-size: .82rem; margin-bottom: .2rem; }
.stats-mini-chip strong { font-size: 1rem; color: #fff; }

.stats-rank-art-wrap,
.stats-top-art {
    width: auto;
}

.stats-rank-art-wrap--profile {
    margin-left: auto;
}

.stats-premier-card,
.stats-table-premier {
    position: relative;
    display: inline-block;
}

.stats-premier-art,
.stats-table-premier__img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 24px rgba(0,0,0,.36));
}

.stats-premier-art--profile { max-width: 136px; }
.stats-premier-art--top { max-width: 132px; }

.stats-premier-points,
.stats-table-premier__points {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -56%);
    font-weight: 900;
    font-style: italic;
    color: #f7fbff;
    text-shadow: 0 2px 12px rgba(0,0,0,.72), 0 0 16px rgba(255,255,255,.12);
    letter-spacing: .03em;
    white-space: nowrap;
}

.stats-premier-points { font-size: .88rem; }
.stats-rank-icon {
    width: 60px;
    height: auto;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,.5));
}

.stats-rank-icon--profile { width: 58px; }
.stats-rank-icon--top { width: 56px; }

.stats-top-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.stats-top-card {
    position: relative;
    text-align: center;
    overflow: hidden;
}

.stats-top-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
}

.stats-top-player {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:.55rem;
    margin-bottom:.45rem;
}

.stats-top-name { font-size: 1.03rem; }
.stats-top-meta { color: rgba(230,236,255,.7); margin-top: .45rem; font-size: .92rem; }

.stats-table {
    --bs-table-bg: transparent;
    --bs-table-color: #eef4ff;
    --bs-table-border-color: rgba(255,255,255,.07);
    margin: 0;
}

.stats-table thead th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(230,236,255,.62);
    border-bottom: 1px solid rgba(255,255,255,.08);
    white-space: nowrap;
    padding: 1rem 1rem .9rem;
}

.stats-table tbody td {
    padding: .95rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.05);
    vertical-align: middle;
}

.stats-table tbody tr:last-child td { border-bottom: 0; }
.stats-table-pos,
.stats-table-value { font-weight: 800; color: #fff; white-space: nowrap; }
.stats-player-cell { display:flex; align-items:center; gap:.8rem; }
.stats-player-cell__name { font-weight: 700; color: #fff; }
.stats-player-cell__name--link {
    text-decoration: none;
    transition: color .18s ease, text-shadow .18s ease, opacity .18s ease;
}
.stats-player-cell__name--link:hover,
.stats-player-cell__name--link:focus-visible {
    color: #ffffff;
    opacity: .92;
    text-shadow: 0 0 14px rgba(255,255,255,.18);
}

.stats-table-premier,
.stats-table-premier__img {
    width: 72px;
}

.stats-table-premier__points { font-size: .66rem; }
.stats-table-rank-icon { width: 52px; height: auto; filter: drop-shadow(0 8px 16px rgba(0,0,0,.45)); }
.stats-table-lastonline { white-space: nowrap; color: rgba(230,236,255,.72); }

.stats-pagination-wrap { display:flex; justify-content:center; }
.stats-pagination { display:flex; align-items:center; gap:.45rem; }
.stats-page-link {
    min-width:40px;
    height:40px;
    padding:0 .9rem;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:12px;
    text-decoration:none;
    color:#eef4ff;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.08);
    font-weight:700;
}
.stats-page-link:hover { color:#fff; background:rgba(255,255,255,.08); }
.stats-page-link.is-active { background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.14); }
.stats-page-link.is-disabled { opacity:.45; pointer-events:none; }

@media (max-width: 991.98px) {
    .stats-top-grid { grid-template-columns: 1fr; }
    .stats-hero,
    .stats-player-main { display: grid; align-items: start; }
    .stats-toolbar { width: 100%; }
    .stats-input { min-width: 0; width: 100%; }
    .stats-search-wrap,
    .stats-sort-wrap { flex: 1 1 220px; }
    .stats-rank-art-wrap,
    .stats-top-art { width: min(132px, 100%); margin: 0 auto; }
}

@media (max-width: 575.98px) {
    .stats-toolbar { display: grid; width: 100%; }
    .stats-search-wrap,
    .stats-sort-wrap,
    .stats-btn,
    .stats-input,
    .stats-select { width: 100%; }
    .stats-premier-points { font-size: .8rem; }
    .stats-table-premier,
    .stats-table-premier__img { width: 66px; }
    .stats-pagination { flex-wrap: wrap; justify-content: center; }
}


.stats-section-head--leaderboard {
    align-items: end;
}

.stats-search-inline {
    display: grid;
    gap: .45rem;
    justify-items: end;
}

.stats-search-inline__controls {
    display: flex;
    gap: .75rem;
    align-items: center;
}

.stats-search-inline .stats-input {
    min-width: 280px;
}

.stats-btn--soft {
    background: rgba(255,255,255,.05);
}

.stats-player-actions {
    display: flex;
    gap: .7rem;
    flex-wrap: wrap;
}

.stats-rank-art-wrap,
.stats-top-art {
    width: 126px;
    margin-left: 0;
    margin-right: 12px;
    padding: 8px 0 12px;
}

.stats-rank-art-wrap--profile {
    width: 118px;
    margin-right: 18px;
}

.stats-premier-art--profile { max-width: 118px; }
.stats-premier-art--top { max-width: 108px; }
.stats-premier-points {
    transform: translate(-53%, -56%);
}
.stats-rank-icon {
    right: 6px;
    bottom: 2px;
}
.stats-rank-icon--profile {
    width: 52px;
    right: 4px;
    bottom: 4px;
}
.stats-rank-icon--top {
    width: 48px;
    right: 6px;
    bottom: 4px;
}

.stats-top-card-1 {
    background: linear-gradient(180deg, rgba(255,215,90,.12), rgba(255,255,255,.03));
    border: 1px solid rgba(255,215,90,.22);
    box-shadow: 0 18px 42px rgba(255,185,54,.12);
}
.stats-top-card-2 {
    background: linear-gradient(180deg, rgba(224,232,255,.12), rgba(255,255,255,.03));
    border: 1px solid rgba(224,232,255,.18);
    box-shadow: 0 18px 42px rgba(160,180,220,.10);
}
.stats-top-card-3 {
    background: linear-gradient(180deg, rgba(205,127,50,.12), rgba(255,255,255,.03));
    border: 1px solid rgba(205,127,50,.18);
    box-shadow: 0 18px 42px rgba(180,110,40,.10);
}

@media (max-width: 991.98px) {
    .stats-search-inline {
        justify-items: stretch;
        width: 100%;
    }
    .stats-search-inline__controls {
        width: 100%;
    }
    .stats-search-inline .stats-input {
        min-width: 0;
        width: 100%;
    }
    .stats-section-head--leaderboard {
        align-items: stretch;
    }
    .stats-rank-art-wrap,
    .stats-top-art,
    .stats-rank-art-wrap--profile {
        margin-right: 0;
    }
}

@media (max-width: 575.98px) {
    .stats-search-inline__controls,
    .stats-player-actions {
        display: grid;
        width: 100%;
    }
}


.stats-alert {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    color: rgba(255,255,255,.92);
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    font-size: .92rem;
}

.stats-rank-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.stats-top-art {
    width: 100%;
}

.stats-top-art .stats-premier-card,
.stats-rank-art-wrap .stats-premier-card {
    flex: 0 0 auto;
}

.stats-top-art .stats-rank-icon,
.stats-rank-art-wrap .stats-rank-icon {
    flex: 0 0 auto;
    margin-left: 0 !important;
}

.stats-premier-art--profile {
    max-width: 150px !important;
}

.stats-premier-art--top {
    max-width: 130px !important;
}

.stats-rank-icon--profile {
    max-width: 86px;
}

.stats-rank-icon--top {
    max-width: 72px;
}


#stats-leaderboard-section.is-loading { opacity: .7; pointer-events: none; transition: opacity .18s ease; }

.stats-search-inline { gap: 0; }
.stats-premier-art--profile { max-width: 110px; }
.stats-premier-art--top { max-width: 100px; }
.stats-rank-art-wrap--profile { width: 110px; }
.stats-top-art { width: 116px; }


.stats-rank-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.stats-rank-art-wrap--profile.stats-rank-row {
    justify-content: flex-end;
    gap: .9rem;
}

.stats-top-art.stats-rank-row {
    justify-content: center;
    gap: .95rem;
    margin: .55rem auto .1rem;
}

.stats-top-art .stats-premier-card,
.stats-rank-art-wrap--profile .stats-premier-card {
    flex: 0 0 auto;
}

.stats-top-art .stats-rank-icon,
.stats-rank-art-wrap--profile .stats-rank-icon {
    position: static;
    flex: 0 0 auto;
}

.stats-alert {
    padding: 0;
    border: 0;
    background: transparent;
    color: #57d48a;
    font-weight: 700;
    box-shadow: none;
}

.stats-pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: .2rem;
}

.stats-pagination {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}


.stats-player-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}

.stats-btn--soft {
    background: rgba(255,255,255,.08);
}

.stats-btn--danger {
    background: linear-gradient(180deg, rgba(220, 53, 69, .96), rgba(164, 28, 44, .96));
    border-color: rgba(255, 110, 127, .4);
    color: #fff;
    box-shadow: 0 12px 26px rgba(130, 20, 33, .34);
}

.stats-btn--danger:hover,
.stats-btn--danger:focus {
    background: linear-gradient(180deg, rgba(232, 71, 87, 1), rgba(175, 31, 48, 1));
    color: #fff;
}

.stats-alert {
    padding: .8rem 1rem;
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    color: #fff;
}

.stats-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #0f1724;
    background-image: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
    color: #f7faff;
    border-color: rgba(255,255,255,.10);
    color-scheme: dark;
}

.stats-select option,
.stats-select optgroup {
    background: #121826;
    color: #f7faff;
}

.stats-premier-art--profile {
    max-width: 98px;
}

.stats-premier-art--top {
    max-width: 116px;
}

.stats-premier-points {
    font-size: 1.08rem;
}

.stats-table-premier__points {
    font-size: .82rem;
    font-style: italic;
    letter-spacing: .04em;
}

.stats-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.stats-confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 10, 20, .72);
    backdrop-filter: blur(7px);
}

.stats-confirm-modal__dialog {
    position: relative;
    width: min(100%, 460px);
    padding: 1.2rem;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 24px 70px rgba(0,0,0,.45);
}

.stats-confirm-modal__content {
    display: grid;
    gap: .45rem;
}

.stats-confirm-modal__actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    flex-wrap: wrap;
}

@media (max-width: 991.98px) {
    .stats-player-main {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-rank-art-wrap--profile {
        margin-left: 0;
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .stats-player-actions,
    .stats-confirm-modal__actions {
        flex-direction: column;
    }

    .stats-player-actions .stats-btn,
    .stats-confirm-modal__actions .stats-btn {
        width: 100%;
    }
}


/* v7 fixes */
#stats-leaderboard-section {
    position: relative;
}

#stats-leaderboard-section.is-loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 38%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(88,166,255,0), rgba(88,166,255,.95), rgba(88,166,255,0));
    box-shadow: 0 0 14px rgba(88,166,255,.45);
    animation: statsLoadingBar 1s linear infinite;
    z-index: 5;
}

@keyframes statsLoadingBar {
    0% { left: -38%; }
    100% { left: 100%; }
}

#stats-leaderboard-section.is-loading [data-stats-results] {
    opacity: .58;
    transition: opacity .18s ease;
}

.stats-alert {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #57d48a !important;
    font-weight: 700;
}

.stats-table-premier__points {
    top: 4px;
    right: 4px;
    left: auto;
    inset: 4px 4px auto auto;
    transform: none;
    font-size: .82rem;
    font-style: italic;
    letter-spacing: .04em;
    text-align: right;
}

@media (max-width: 575.98px) {
    .stats-player-card {
        overflow: hidden;
    }

    .stats-player-main {
        gap: 1rem;
    }

    .stats-rank-art-wrap--profile,
    .stats-rank-art-wrap--profile.stats-rank-row {
        width: 100% !important;
        margin-left: 0 !important;
        justify-content: center !important;
        gap: .75rem !important;
    }

    .stats-rank-art-wrap--profile .stats-premier-card {
        max-width: 96px;
    }

    .stats-rank-art-wrap--profile .stats-rank-icon,
    .stats-rank-icon--profile {
        width: 52px;
        max-width: 52px;
    }

    .stats-premier-art--profile {
        max-width: 96px !important;
    }

    .stats-premier-points {
        font-size: .95rem;
    }
}


/* v8 fixes */
.stats-select {
    background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05)) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-color: rgba(255,255,255,.12) !important;
}

.stats-select:hover,
.stats-select:focus {
    background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.07)) !important;
}

.stats-table-premier__points {
    right: 12px !important;
    inset: 4px 18px auto auto !important;
}

body.stats-ui-loading::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(7, 12, 24, .26);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 2000;
}

body.stats-ui-loading::after {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    width: 54px;
    height: 54px;
    margin: -27px 0 0 -27px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.18);
    border-top-color: rgba(255,255,255,.95);
    border-right-color: rgba(255, 145, 0, 0.92);
    box-shadow: 0 0 28px rgba(88,166,255,.18);
    animation: statsSpinner .8s linear infinite;
    z-index: 2001;
}

@keyframes statsSpinner {
    to { transform: rotate(360deg); }
}

#stats-leaderboard-section.is-loading::before {
    display: none !important;
}

.stats-top-player {
    position: relative;
}

.stats-top-avatar-ring {
    position: relative;
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    isolation: isolate;
}

.stats-top-avatar-ring::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    animation: statsOrbit 2.8s linear infinite;
    z-index: -1;
}

.stats-top-avatar-ring::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: inherit;
    background: rgba(8, 12, 20, .72);
    z-index: -1;
}

.stats-top-avatar-ring--1::before {
    background: conic-gradient(from 0deg, rgba(255,215,90,.16), rgba(255,215,90,1), rgba(255,239,170,.25), rgba(255,215,90,.16));
    box-shadow: 0 0 18px rgba(255,215,90,.25);
}

.stats-top-avatar-ring--2::before {
    background: conic-gradient(from 0deg, rgba(214,224,236,.18), rgba(214,224,236,.98), rgba(255,255,255,.25), rgba(214,224,236,.18));
    box-shadow: 0 0 18px rgba(214,224,236,.20);
}

.stats-top-avatar-ring--3::before {
    background: conic-gradient(from 0deg, rgba(205,127,50,.18), rgba(205,127,50,.98), rgba(245,180,130,.24), rgba(205,127,50,.18));
    box-shadow: 0 0 18px rgba(205,127,50,.20);
}

@keyframes statsOrbit {
    to { transform: rotate(360deg); }
}

.stats-top-avatar-ring .stats-avatar--top {
    width: 58px;
    height: 58px;
    border-width: 2px;
    background: rgba(255,255,255,.06);
}


/* leaderboard premier points alignment fix */
.stats-table-premier {
    position: relative;
    width: 72px;
    display: inline-block;
}

.stats-table-premier__points {
    top: 4px !important;
    right: 8px !important;
    left: auto !important;
    inset: 4px 15px auto auto !important;
    width: 42px;
    min-width: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: none !important;
    text-align: center;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.stats-table-premier__points--compact {
    right: 10px !important;
    inset: 4px 20px auto auto !important;
    width: 38px;
    min-width: 38px;
}

.stats-table-premier__points--wide {
    right: 4px !important;
    inset: 6px 12px auto auto !important;
    width: 48px;
    min-width: 48px;
    font-size: .76rem;
    letter-spacing: .02em;
}

/* v9: fixed-height scroll area + split premier point sizing */
.stats-table-wrap {
    max-height: 620px;
    overflow-y: auto !important;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.24) rgba(255,255,255,.06);
}

.stats-table-wrap::-webkit-scrollbar {
    width: 8px;
}

.stats-table-wrap::-webkit-scrollbar-track {
    background: rgba(255,255,255,.06);
    border-radius: 999px;
}

.stats-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.24);
    border-radius: 999px;
}

.stats-table-wrap .table-responsive {
    overflow-x: auto;
    overflow-y: visible;
}

.stats-premier-points,
.stats-table-premier__points {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 0;
}

.stats-premier-points__main,
.stats-premier-points__rest {
    display: inline-block;
    line-height: 1;
}

.stats-premier-points .stats-premier-points__main {
    font-size: 1.14em;
}

.stats-premier-points .stats-premier-points__rest--featured {
    font-size: .94em;
}

.stats-table-premier__points .stats-premier-points__main {
    font-size: 1em;
}

.stats-table-premier__points .stats-premier-points__rest--leaderboard {
    font-size: .78em;
    letter-spacing: .01em;
}

@media (max-width: 575.98px) {
    .stats-table-wrap {
        max-height: 520px;
    }
}

/* v10: make the whole stats page/section scrollable, not only the leaderboard table */
.stats-page {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: .35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.24) rgba(255,255,255,.06);
}

.stats-page::-webkit-scrollbar {
    width: 8px;
}

.stats-page::-webkit-scrollbar-track {
    background: rgba(255,255,255,.06);
    border-radius: 999px;
}

.stats-page::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.24);
    border-radius: 999px;
}

/* keep the leaderboard table natural inside the scrolling section */
.stats-table-wrap {
    max-height: none !important;
    overflow-y: visible !important;
    overflow-x: hidden;
}

.stats-table-wrap .table-responsive {
    overflow-x: auto;
    overflow-y: visible;
}

@media (max-width: 575.98px) {
    .stats-page {
        max-height: calc(100vh - 90px);
        padding-right: .15rem;
    }
}

/* v11: mini navigation for the scrollable stats section */
.stats-mini-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem;
    backdrop-filter: blur(18px);
}

.stats-mini-nav__btn {
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.06);
    color: rgba(238,244,255,.82);
    border-radius: 999px;
    padding: .62rem 1rem;
    font-weight: 800;
    font-size: .88rem;
    line-height: 1;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.stats-mini-nav__btn:hover,
.stats-mini-nav__btn.is-active {
    color: #fff;
    background: rgba(255, 195, 112, 0.16);
    border-color: rgb(255, 145, 0);
    box-shadow: 0 10px 26px rgba(190, 136, 42, 0.16);
    transform: translateY(-1px);
}

@media (max-width: 575.98px) {
    .stats-mini-nav {
        overflow-x: auto;
        padding: .55rem;
    }

    .stats-mini-nav__btn {
        flex: 0 0 auto;
        padding: .58rem .85rem;
        font-size: .82rem;
    }
}
