.leaderboard-page {
    background: linear-gradient(165deg, #102e43 0%, #0a2333 58%, #081e2b 100%);
    border: 1px solid #2b556d;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.leaderboard-header {
    padding: 20px 24px 14px;
    border-bottom: 1px solid #22495f;
    background: linear-gradient(180deg, rgba(52, 112, 149, 0.16) 0%, rgba(12, 36, 52, 0.05) 100%);
}

.leaderboard-header h1 {
    margin: 0;
    font-size: 2rem;
    color: #eef9ff;
    letter-spacing: 0.3px;
}

.leaderboard-header p {
    margin: 6px 0 0;
    color: #a8c8da;
    font-size: 0.95rem;
}

.leaderboard-control-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px 10px;
}

.leaderboard-control-group {
    background: #17384c;
    border: 1px solid #2f5a71;
    border-radius: 10px;
    padding: 10px;
    min-width: 280px;
}

.control-label {
    display: block;
    color: #8fb2c6;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 8px;
    font-weight: 700;
}

.control-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lb-toggle-btn {
    border: 1px solid #365f74;
    background: #1e4660;
    color: #d5e9f5;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lb-toggle-btn:hover {
    background: #285872;
    color: #ffffff;
}

.lb-toggle-btn.is-active {
    background: linear-gradient(180deg, #338ce1 0%, #2b79c5 100%);
    border-color: #5ba7f0;
    color: #ffffff;
}

.lb-toggle-btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    position: relative;
}

.lb-toggle-btn.is-disabled:hover {
    background: #1e4660;
    color: #d5e9f5;
}

.lb-toggle-btn.is-disabled::after {
    content: attr(data-coming-soon);
    margin-left: 8px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #d4dde3;
}

.lb-toggle-btn .lb-coin {
    margin-right: 6px;
    vertical-align: middle;
}

.leaderboard-tabs {
    padding: 6px 18px 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.leaderboard-tab-btn {
    border: 1px solid #315e74;
    background: #1a4158;
    color: #d5e8f4;
    border-radius: 9px;
    padding: 9px 12px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
}

.leaderboard-tab-btn.is-active {
    background: linear-gradient(180deg, #2d8de9 0%, #2775bf 100%);
    border-color: #5daaf0;
    color: #ffffff;
}

.leaderboard-panel {
    display: none;
}

.leaderboard-panel.is-active {
    display: block;
}

.leaderboard-panel-head {
    padding: 0 18px 10px;
}

.leaderboard-panel-head h3 {
    margin: 0;
    color: #edf8ff;
    font-size: 1.16rem;
}

.leaderboard-panel-head p {
    margin: 4px 0 0;
    color: #98bdd1;
    font-size: 0.88rem;
}

.leaderboard-table-wrap {
    padding: 0 18px 18px;
    overflow-x: auto;
}

.leaderboard-table {
    width: 100%;
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
    background: #132f42;
    border: 1px solid #2b5268;
    border-radius: 11px;
    overflow: hidden;
}

.leaderboard-table thead th {
    background: #1b4158;
    color: #d9eef9;
    text-align: left;
    padding: 10px 11px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #2f5a73;
    white-space: nowrap;
}

.leaderboard-table tbody td {
    padding: 10px 11px;
    border-bottom: 1px solid #21495f;
    color: #e4f3fc;
    font-size: 0.9rem;
    white-space: nowrap;
}

.leaderboard-table tbody tr:last-child td {
    border-bottom: 0;
}

.leaderboard-table tbody tr:hover td {
    background: #1a3e54;
}

.leaderboard-table tbody tr.is-current-user td {
    background: #204b64;
}

.leader-name {
    display: inline-block;
    font-weight: 700;
    color: #f4fbff;
}

.leader-sub {
    display: block;
    margin-top: 2px;
    color: #9dc0d5;
    font-size: 0.76rem;
}

.you-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 7px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #28a4d4;
    color: #f8ffff;
    font-size: 0.68rem;
    font-weight: 700;
    vertical-align: middle;
}

.rank-cell {
    font-weight: 700;
}

.rank-cell i {
    margin-right: 5px;
}

.rank-cell.rank-1 {
    color: #ffd45e;
}

.rank-cell.rank-2 {
    color: #bdd7f5;
}

.rank-cell.rank-3 {
    color: #ff9f64;
}

.percentile-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #3c667d;
    background: #254e66;
    color: #d7ebf8;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 4px 8px;
}

.lb-money {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-variant-numeric: tabular-nums;
}

.lb-code {
    color: #9cc0d4;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.lb-coin {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    color: #0b1d29;
}

.lb-coin.gc {
    background: #ffd400;
}

.lb-coin.sc {
    background: #66f300;
}

.leaderboard-pagination {
    padding: 0 18px 18px;
    display: flex;
    gap: 8px;
}

.pagination-btn {
    border: 1px solid #335f77;
    background: #1d435a;
    color: #d7ebf8;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.pagination-btn.is-active {
    background: linear-gradient(180deg, #2d8de9 0%, #2775bf 100%);
    border-color: #5daaf0;
    color: #ffffff;
}

.pagination-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

@media (max-width: 980px) {
    .leaderboard-control-group {
        min-width: 100%;
    }
}

@media (max-width: 760px) {
    .leaderboard-header h1 {
        font-size: 1.65rem;
    }

    .leaderboard-tabs {
        gap: 6px;
    }

    .leaderboard-tab-btn {
        width: calc(50% - 3px);
        text-align: center;
    }
}
