/* ============================================================
   Climatle — leaderboard page.
   Re-uses the climatle design tokens for cohesion with the game.
============================================================ */

.climatle-leaderboard { max-width: 760px; }

.climatle-lb__back {
    font-family: var(--cl-font-ui);
    font-weight: 600;
    font-size: 13px;
    color: var(--cl-accent);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1.5px solid var(--cl-accent-3);
    background: var(--cl-card);
    transition: background .15s var(--cl-ease), color .15s var(--cl-ease);
    flex-shrink: 0;
}
.climatle-lb__back:hover { background: var(--cl-accent-3); color: var(--cl-accent); }

.climatle-lb__tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--cl-card);
    border: 1.5px solid var(--cl-line);
    border-radius: 999px;
    box-shadow: var(--cl-shadow-xs);
    margin: 4px 0 18px;
}
.climatle-lb__tab {
    appearance: none;
    border: none;
    background: transparent;
    font-family: var(--cl-font-ui);
    font-weight: 700;
    font-size: 13px;
    color: var(--cl-mute);
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s var(--cl-ease), color .15s var(--cl-ease);
}
.climatle-lb__tab:hover    { color: var(--cl-ink); }
.climatle-lb__tab.is-active {
    background: linear-gradient(135deg, var(--cl-primary), var(--cl-warm));
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 74, 0.28);
}

.climatle-lb__panel {
    background: var(--cl-card);
    border: 1.5px solid var(--cl-line);
    border-radius: var(--cl-radius-lg);
    box-shadow: var(--cl-shadow-md);
    padding: 14px;
}

.climatle-lb__loading,
.climatle-lb__empty {
    padding: 36px 16px;
    text-align: center;
    color: var(--cl-mute);
    font-size: 14px;
}

.climatle-lb__table-wrap { width: 100%; overflow-x: auto; }
.climatle-lb__table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--cl-font-ui);
}
.climatle-lb__th {
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cl-mute);
    padding: 10px 12px;
    border-bottom: 1.5px solid var(--cl-line);
}
.climatle-lb__th--rank   { width: 56px; }
.climatle-lb__th--num,
.climatle-lb__td--num    { text-align: right; width: 80px; }
.climatle-lb__th--player { width: auto; }

.climatle-lb__tr {
    border-bottom: 1px solid var(--cl-line-2);
    transition: background .15s var(--cl-ease);
}
.climatle-lb__tr:last-child { border-bottom: none; }
.climatle-lb__tr:hover      { background: var(--cl-card-soft); }
.climatle-lb__tr.is-you {
    background: linear-gradient(90deg, rgba(26, 107, 255, 0.06), rgba(26, 107, 255, 0.02));
}
.climatle-lb__tr.is-you:hover { background: rgba(26, 107, 255, 0.10); }

.climatle-lb__td {
    padding: 12px;
    font-size: 14px;
    color: var(--cl-ink-2);
    vertical-align: middle;
}
.climatle-lb__td--rank   { width: 56px; }
.climatle-lb__td--player { font-weight: 600; color: var(--cl-ink); }

.climatle-lb__rank {
    display: inline-block;
    min-width: 28px;
    text-align: center;
    font-family: var(--cl-font-mono);
    font-weight: 500;
    font-size: 13px;
    color: var(--cl-mute);
}
.climatle-lb__medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    font-family: var(--cl-font-ui);
    font-weight: 800;
    font-size: 13px;
    color: white;
    box-shadow: var(--cl-shadow-xs);
}
.climatle-lb__medal--gold   { background: linear-gradient(135deg, #ffd84a, #ffb347); }
.climatle-lb__medal--silver { background: linear-gradient(135deg, #d8dee9, #aab2c0); color: #353a5a; }
.climatle-lb__medal--bronze { background: linear-gradient(135deg, #f3c878, #c39a4a); }

.climatle-lb__name {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}
.climatle-lb__you-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--cl-accent-3);
    color: var(--cl-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

/* "Your position" panel below the main table */
.climatle-lb__you-wrap {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1.5px dashed var(--cl-line);
}
.climatle-lb__you-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cl-mute);
    margin: 0 0 8px 12px;
}
.climatle-lb__table--you .climatle-lb__td { padding-top: 10px; padding-bottom: 10px; }

@media (max-width: 560px) {
    .climatle-leaderboard { padding-left: 8px; padding-right: 8px; }
    .climatle-lb__panel   { padding: 6px; }
    .climatle-lb__td      { padding: 10px 8px; font-size: 13px; }
    .climatle-lb__th      { padding: 8px; }
    .climatle-lb__name    { max-width: 140px; }
    .climatle-lb__tab     { padding: 7px 12px; font-size: 12px; }
}
