/* =====================================================================
   Leaderboard (/leaderboard) – filters, podium and ranking table in the
   classic BFP4F look (gold #f0b73b on dark panels, see phoenix-classic.css).
   ===================================================================== */

.web .lb-page {
    --lb-gold: #f0b73b;
    --lb-silver: #c9d0d6;
    --lb-bronze: #d08a4e;
    --lb-panel: rgba(0, 0, 0, 0.42);
    --lb-line: #2c2c2c;
    --lb-muted: #8f8f8f;
    --lb-text: #dfdfdf;
}

/* ---------- Head ---------- */
.web .box-wrapper .box-fullwidth.lb-page h1 {
    padding: 28px 0 6px;
}
.web .lb-sub {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 22px;
    margin: 0 0 18px;
    color: var(--lb-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.web .lb-sub b {
    color: var(--lb-text);
}
.web .lb-label {
    display: block;
    margin: 0 0 3px;
    color: var(--lb-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* ---------- Your position ---------- */
.web .lb-me {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 12px;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(240, 183, 59, 0.16), rgba(240, 183, 59, 0.02) 60%), var(--lb-panel);
    border: 1px solid #5a4620;
    border-left: 3px solid var(--lb-gold);
}
.web .lb-me-rank {
    flex: 0 0 auto;
}
.web .lb-me-text {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--lb-text);
}
.web .lb-me-text strong {
    color: var(--lb-gold);
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}
.web .lb-me-of {
    color: var(--lb-muted);
    font-size: 12px;
}
.web .lb-me-name {
    display: block;
    margin-top: 2px;
    color: #bdbdbd;
    font-size: 12px;
}

/* ---------- Filters ---------- */
.web .lb-filters {
    margin: 0 0 16px;
    padding: 12px 14px;
    background: var(--lb-panel);
    border: 1px solid var(--lb-line);
}
.web .lb-kits {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 12px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--lb-line);
}
.web .lb-kit {
    position: relative;
    padding: 7px 16px;
    background: #141414;
    border: 1px solid #333;
    color: #bdbdbd;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
}
.web .lb-kit input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
/* The game's class icons (white, 13 px; the same sprite the daily draw uses): recon, assault, medic, engineer. */
.web .lb-kit[class*="lb-kit-"]::before {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 7px;
    vertical-align: -2px;
    background: url('../images/class-icons/gfx_kiticons-sprite.png') no-repeat 0 0;
    opacity: .55;
    transition: opacity .15s, filter .15s;
}
.web .lb-kit.lb-kit-recon[class]::before { background-position: 0 0; }
.web .lb-kit.lb-kit-assault[class]::before { background-position: 0 -39px; }
.web .lb-kit.lb-kit-medic[class]::before { background-position: 0 -80px; }
.web .lb-kit.lb-kit-engineer[class]::before { background-position: 0 -119px; }
.web .lb-kit:hover {
    border-color: #6b5626;
    color: var(--lb-text);
}
.web .lb-kit:hover::before {
    opacity: .9;
}
.web .lb-kit.active {
    background: linear-gradient(#3b301a, #221c10);
    border-color: var(--lb-gold);
    color: var(--lb-gold);
}
.web .lb-kit.active::before {
    opacity: 1;
    filter: drop-shadow(0 0 3px rgba(240, 183, 59, .9));
}
.web .lb-kit:has(input:focus-visible) {
    outline: 1px solid var(--lb-gold);
    outline-offset: 2px;
}
.web .lb-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
}
.web .lb-field select,
.web .lb-field input {
    height: 30px;
    box-sizing: border-box;
    padding: 4px 8px;
    background: #0e0e0e;
    color: var(--lb-text);
    border: 1px solid #3a3a3a;
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
    font-size: 12px;
}
.web .lb-field select {
    min-width: 150px;
}
.web .lb-field select:focus,
.web .lb-field input:focus {
    border-color: var(--lb-gold);
    outline: none;
}
.web .lb-search {
    flex: 1 1 180px;
}
.web .lb-search input {
    width: 100%;
}
.web .lb-btn {
    display: inline-block;
    height: 30px;
    box-sizing: border-box;
    padding: 0 16px;
    line-height: 28px;
    background: var(--lb-gold);
    border: 1px solid var(--lb-gold);
    color: #111;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}
.web .lb-btn:hover {
    background: #ffcd5c;
    text-decoration: none !important;
}
.web .lb-btn-ghost {
    flex: 0 0 auto;
    background: transparent;
    color: var(--lb-gold);
}
.web .lb-btn-ghost:hover {
    background: rgba(240, 183, 59, 0.12);
}
.web .lb-reset {
    height: 30px;
    line-height: 30px;
    color: var(--lb-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.web .lb-hint {
    margin: 10px 0 0;
    color: var(--lb-muted);
    font-size: 11px;
}

/* ---------- Podium ---------- */
.web .lb-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
    margin: 0 0 16px;
}
.web .lb-podium-card {
    --place: var(--lb-bronze);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 10px 14px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--place) 18%, transparent), rgba(0, 0, 0, 0.5) 70%);
    border: 1px solid color-mix(in srgb, var(--place) 45%, #222);
    border-top: 3px solid var(--place);
    color: var(--lb-text);
    text-align: center;
    text-decoration: none;
    transition: transform .15s, border-color .15s;
}
.web .lb-podium-card:hover {
    transform: translateY(-2px);
    border-color: var(--place);
    text-decoration: none !important;
}
.web .lb-place-1 {
    --place: var(--lb-gold);
    padding-top: 26px;
    padding-bottom: 22px;
}
.web .lb-place-2 {
    --place: var(--lb-silver);
}
.web .lb-place {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 26px;
    padding: 1px 6px 2px;
    background: var(--place);
    color: #111;
    font-size: 13px;
    font-weight: 800;
    line-height: 18px;
}
.web .lb-portrait {
    position: relative;
    display: block;
    width: 72px;
    height: 72px;
    margin-top: 6px;
    padding: 2px;
    background: var(--place);
    box-shadow: 0 0 14px color-mix(in srgb, var(--place) 35%, transparent);
}
.web .lb-place-1 .lb-portrait {
    width: 88px;
    height: 88px;
}
.web .lb-portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #111;
}.web .lb-podium-name {
    max-width: 100%;
    margin-top: 6px;
    overflow: hidden;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.web .lb-podium-meta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--lb-muted);
    font-size: 11px;
    text-transform: uppercase;
}
.web .lb-podium-value {
    margin-top: 4px;
    color: var(--place);
    font-size: 20px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.web .lb-place-1 .lb-podium-value {
    font-size: 24px;
}

/* ---------- Table ---------- */
.web .lb-table-wrap {
    overflow-x: auto;
    background: var(--lb-panel);
    border: 1px solid var(--lb-line);
}
.web table.lb-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--lb-text);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.web table.lb-table th,
.web table.lb-table td {
    padding: 6px 8px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #262626;
    white-space: nowrap;
}
.web table.lb-table th {
    position: sticky;
    top: 0;
    background: #0d0d0d;
    color: var(--lb-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}
.web table.lb-table th a {
    color: inherit;
    text-decoration: none;
}
.web table.lb-table th a:hover {
    color: var(--lb-gold);
}
.web table.lb-table th.sorted,
.web table.lb-table th.sorted a {
    color: var(--lb-gold);
}
.web table.lb-table th.sorted a::after {
    content: " \25BE";
}
.web table.lb-table td.sorted {
    background: rgba(240, 183, 59, 0.07);
    color: #fff;
    font-weight: 800;
}
.web table.lb-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.025);
}
.web table.lb-table tbody tr:hover {
    background: #262626;
}
.web table.lb-table .lb-col-rank {
    width: 42px;
}
.web table.lb-table .lb-col-name {
    text-align: left;
}
.web .lb-rank {
    display: inline-block;
    min-width: 26px;
    color: var(--lb-muted);
    font-weight: 800;
}
.web tr.lb-top .lb-rank {
    padding: 2px 0;
    color: #111;
    background: var(--lb-bronze);
}
.web tr.lb-top-1 .lb-rank { background: var(--lb-gold); }
.web tr.lb-top-2 .lb-rank { background: var(--lb-silver); }
.web .lb-soldier {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--lb-text);
    text-decoration: none;
}
.web .lb-soldier:hover {
    text-decoration: none !important;
}
.web .lb-soldier:hover .lb-soldier-name {
    color: var(--lb-gold);
}
.web .lb-avatar {
    position: relative;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    background: #111;
    border: 1px solid #3a3a3a;
}
.web .lb-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.web .lb-soldier-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}
.web .lb-soldier-name {
    color: #fff;
    font-weight: 800;
}
.web .lb-kit-tag {
    color: var(--lb-muted);
    font-size: 10px;
    text-transform: uppercase;
}
.web .lb-kit-tag.lb-kit-assault { color: #d9846f; }
.web .lb-kit-tag.lb-kit-medic { color: #86c776; }
.web .lb-kit-tag.lb-kit-engineer { color: #e0b864; }
.web .lb-kit-tag.lb-kit-recon { color: #7fb2e2; }
.web .lb-level img {
    margin-right: 3px;
    vertical-align: middle;
}
/* tbody + class beats the zebra stripes (tr:nth-child) */
.web table.lb-table tbody tr.lb-is-me,
.web table.lb-table tbody tr.lb-is-me:hover {
    background: linear-gradient(90deg, rgba(240, 183, 59, 0.24), rgba(240, 183, 59, 0.08));
    box-shadow: inset 3px 0 0 var(--lb-gold);
}
.web table.lb-table tbody tr.lb-is-me .lb-soldier-name,
.web table.lb-table tbody tr.lb-is-me .lb-rank {
    color: var(--lb-gold);
}
.web table.lb-table tr.lb-empty td {
    padding: 28px;
    color: var(--lb-muted);
    white-space: normal;
}

/* ---------- Pages ---------- */
.web .lb-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin: 14px 0 0;
}
.web .lb-pages a,
.web .lb-pages span {
    min-width: 30px;
    padding: 5px 9px;
    box-sizing: border-box;
    background: #141414;
    border: 1px solid #333;
    color: #bdbdbd;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}
.web .lb-pages a:hover {
    border-color: var(--lb-gold);
    color: var(--lb-gold);
    text-decoration: none !important;
}
.web .lb-pages .current {
    background: var(--lb-gold);
    border-color: var(--lb-gold);
    color: #111;
}
.web .lb-pages .lb-gap {
    background: none;
    border-color: transparent;
}
.web .lb-foot {
    margin: 10px 0 0;
    color: #6f6f6f;
    font-size: 11px;
    text-align: center;
}

@media (max-width: 720px) {
    .web .lb-podium {
        grid-template-columns: 1fr;
    }
    .web .lb-podium-card.lb-place-1 {
        order: -1;
    }
    .web .lb-controls > * {
        flex: 1 1 100%;
    }
    .web .lb-field select {
        width: 100%;
    }
}
