/* Global leaderboard: compact ranked list shown from the profile panel. */

.auth-leaderboard-status,
.auth-leaderboard-empty {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 12px 8px;
}

.auth-leaderboard-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.auth-leaderboard-current strong {
  color: var(--text);
  font-size: 16px;
}

.auth-leaderboard-current.muted {
  display: block;
  text-align: center;
}

.auth-leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: min(44vh, 330px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.auth-leaderboard-row {
  display: grid;
  grid-template-columns: 42px 28px minmax(0, 1fr) minmax(64px, auto) 54px;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}

.auth-leaderboard-row:last-child { border-bottom: 0; }
.auth-leaderboard-row.current { background: color-mix(in srgb, var(--n1-bg), transparent 88%); }

.auth-leaderboard-rank,
.auth-leaderboard-level {
  color: var(--text-muted);
  font-weight: 600;
}

.auth-leaderboard-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-leaderboard-icon .fi {
  width: 22px;
  height: 16px;
  border-radius: 2px;
}

.auth-leaderboard-name {
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-leaderboard-score {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

@media (max-width: 420px) {
  .auth-leaderboard-row {
    grid-template-columns: 36px 24px minmax(0, 1fr) 58px;
  }

  .auth-leaderboard-level {
    grid-column: 3 / 5;
    margin-left: 0;
    font-size: 12px;
  }
}
