/* ── Leaderboard Page ── */

/* Tabs */
.lb-tabs {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 4px;
}

.lb-tab {
    flex: 1;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(245, 243, 255, 0.6);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lb-tab:hover {
    color: rgba(245, 243, 255, 0.85);
    background: rgba(255, 255, 255, 0.05);
}

.lb-tab--active {
    background: rgba(255, 199, 95, 0.15);
    color: #ffc75f;
    box-shadow: 0 2px 8px rgba(255, 199, 95, 0.15);
}

/* Select inputs */
.lb-select {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f5f3ff !important;
    font-size: 15px !important;
    border-radius: 8px !important;
}

.lb-select:focus {
    border-color: rgba(255, 199, 95, 0.4) !important;
    box-shadow: 0 0 0 2px rgba(255, 199, 95, 0.1) !important;
}

.lb-select option {
    background: #1a1025;
    color: #f5f3ff;
}

/* ── Podium ── */
.lb-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    padding: 28px 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lb-podium__slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 14px 12px;
    border-radius: 12px;
    min-width: 120px;
    position: relative;
    transition: transform 0.2s ease;
}

.lb-podium__slot:hover {
    transform: translateY(-2px);
}

.lb-podium__slot--1 {
    background: linear-gradient(180deg, rgba(255, 199, 95, 0.18) 0%, rgba(255, 199, 95, 0.05) 100%);
    border: 1px solid rgba(255, 199, 95, 0.25);
    order: 2;
    padding-bottom: 18px;
}

.lb-podium__slot--2 {
    background: linear-gradient(180deg, rgba(192, 192, 210, 0.14) 0%, rgba(192, 192, 210, 0.04) 100%);
    border: 1px solid rgba(192, 192, 210, 0.2);
    order: 1;
}

.lb-podium__slot--3 {
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.14) 0%, rgba(205, 127, 50, 0.04) 100%);
    border: 1px solid rgba(205, 127, 50, 0.2);
    order: 3;
}

.lb-podium__medal {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
}

.lb-podium__slot--1 .lb-podium__medal {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #3a2600;
    width: 46px;
    height: 46px;
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.35);
}

.lb-podium__slot--2 .lb-podium__medal {
    background: linear-gradient(135deg, #e0e0e8, #b0b0c0);
    color: #2a2a3a;
    box-shadow: 0 4px 10px rgba(192, 192, 210, 0.25);
}

.lb-podium__slot--3 .lb-podium__medal {
    background: linear-gradient(135deg, #cd7f32, #b06a28);
    color: #fff;
    box-shadow: 0 4px 10px rgba(205, 127, 50, 0.25);
}

.lb-podium__name {
    font-weight: 700;
    font-size: 15px;
    color: #f5f3ff;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.lb-podium__score {
    font-size: 14px;
    color: rgba(245, 243, 255, 0.6);
    font-weight: 600;
}

.lb-podium__slot--1 .lb-podium__name {
    color: #ffc75f;
}

/* ── Table ── */
.lb-table {
    background: transparent !important;
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
    font-size: 15px;
}

.lb-table thead th {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(245, 243, 255, 0.5);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    padding: 10px 14px;
}

.lb-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
    color: #f5f3ff;
}

.lb-table tbody tr:last-child td {
    border-bottom: none;
}

/* Rank column */
.lb-rank {
    font-weight: 800;
    font-size: 16px;
    color: rgba(245, 243, 255, 0.5);
}

.lb-rank--1 { color: #ffd700; }
.lb-rank--2 { color: #c0c0d2; }
.lb-rank--3 { color: #cd7f32; }

/* Highlight current user row */
.lb-row--me {
    background: rgba(255, 199, 95, 0.08) !important;
    border-left: 3px solid #ffc75f;
}

.lb-row--me td:first-child {
    padding-left: 11px;
}

.lb-username {
    font-weight: 600;
    font-size: 15px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.lb-username--me {
    color: #ffc75f;
}

.lb-country {
    font-size: 13px;
    color: rgba(245, 243, 255, 0.4);
    margin-left: 6px;
}

/* Score values */
.lb-score {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.lb-time {
    font-variant-numeric: tabular-nums;
    color: rgba(245, 243, 255, 0.7);
}

/* ── My Position (sticky footer) ── */
.lb-my-position {
    background: rgba(255, 199, 95, 0.1);
    border-top: 1px solid rgba(255, 199, 95, 0.2);
    padding: 12px 16px;
    border-radius: 0 0 12px 12px;
}

.lb-my-position__rank {
    background: linear-gradient(135deg, #ffc75f, #ff9671);
    color: #1a1025;
    font-weight: 800;
    font-size: 18px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-my-position__label {
    color: rgba(245, 243, 255, 0.7);
    font-size: 15px;
    font-weight: 600;
}

.lb-my-position__stat {
    color: #ffc75f;
    font-weight: 700;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

/* ── Empty / loading states ── */
.lb-empty {
    text-align: center;
    padding: 48px 20px;
    color: rgba(245, 243, 255, 0.4);
}

.lb-empty__icon {
    font-size: 52px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.lb-empty__text {
    font-size: 16px;
    font-weight: 500;
}

/* ── Responsive ── */
@media (max-width: 576px) {
    .lb-podium {
        gap: 8px;
        padding: 20px 8px 16px;
    }

    .lb-podium__slot {
        min-width: 95px;
        padding: 12px 8px 10px;
    }

    .lb-podium__name {
        font-size: 14px;
        max-width: 90px;
    }

    .lb-table {
        font-size: 14px;
    }

    .lb-table thead th,
    .lb-table tbody td {
        padding: 8px 10px;
    }

    .lb-username {
        max-width: 120px;
    }
}
