/* ── Leaderboard ── */
.leaderboard-wrap {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.leaderboard-table th {
  padding: var(--space-3) var(--space-4);
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  text-align: left;
}

.leaderboard-table td {
  padding: var(--space-4) var(--space-4);
  background: var(--bg-card);
  font-size: var(--font-size-sm);
  vertical-align: middle;
}

.leaderboard-table tr td:first-child { border-radius: var(--border-radius) 0 0 var(--border-radius); }
.leaderboard-table tr td:last-child  { border-radius: 0 var(--border-radius) var(--border-radius) 0; }

.leaderboard-table tr.current-user td {
  background: rgba(240, 180, 41, 0.12);
  border-top: 1px solid rgba(240, 180, 41, 0.3);
  border-bottom: 1px solid rgba(240, 180, 41, 0.3);
}
.leaderboard-table tr.current-user td:first-child { border-left: 3px solid var(--gold); }

/* Rank badges */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 800;
  font-size: var(--font-size-sm);
}
.rank-1 { background: linear-gradient(135deg, #f0b429, #f9d87a); color: #000; box-shadow: 0 0 10px rgba(240,180,41,0.5); }
.rank-2 { background: linear-gradient(135deg, #bdc3c7, #ecf0f1); color: #000; }
.rank-3 { background: linear-gradient(135deg, #cd6133, #e67e22); color: #fff; }
.rank-other { background: var(--bg-secondary); color: var(--text-muted); }

.player-cell {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.player-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blue-btn);
  border: 2px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: var(--font-size-xs);
  color: var(--gold); text-transform: uppercase; flex-shrink: 0;
}
.player-name { font-weight: 600; color: var(--text-primary); }
.score-cell   { font-weight: 800; color: var(--gold); font-size: var(--font-size-md); }

/* Empty state */
.leaderboard-empty {
  text-align: center;
  padding: var(--space-16);
  color: var(--text-muted);
}
.leaderboard-empty .icon { font-size: 3rem; margin-bottom: var(--space-4); }

@media (max-width: 600px) {
  .leaderboard-table th:nth-child(4),
  .leaderboard-table td:nth-child(4) { display: none; }
}
