/* Survivor Arena - HUD: Leaderboard */

/* ---- Leaderboard (top-right) ---- */

#hud-leaderboard,
.hud-leaderboard {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 190px;
  max-width: 220px;
  background: rgba(0, 5, 15, 0.92);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  font-size: 0.72rem;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.lb-title,
.leaderboard-title {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.leaderboard-entry,
.lb-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
  animation: leaderboardSlideIn 0.3s ease backwards;
}

.leaderboard-entry:nth-child(1),
.lb-entry:nth-child(1) { animation-delay: 0s; }
.leaderboard-entry:nth-child(2),
.lb-entry:nth-child(2) { animation-delay: 0.04s; }
.leaderboard-entry:nth-child(3),
.lb-entry:nth-child(3) { animation-delay: 0.08s; }
.leaderboard-entry:nth-child(4),
.lb-entry:nth-child(4) { animation-delay: 0.12s; }
.leaderboard-entry:nth-child(5),
.lb-entry:nth-child(5) { animation-delay: 0.16s; }
.leaderboard-entry:nth-child(6),
.lb-entry:nth-child(6) { animation-delay: 0.2s; }
.leaderboard-entry:nth-child(7),
.lb-entry:nth-child(7) { animation-delay: 0.24s; }

/* First place highlight */
.leaderboard-entry:first-child,
.lb-entry:first-child {
  color: var(--gold);
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}

.leaderboard-entry.self,
.lb-entry.self {
  color: var(--primary);
  font-weight: 700;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
  position: relative;
}

.leaderboard-entry.self::before,
.lb-entry.self::before {
  content: '';
  position: absolute;
  inset: -2px -6px;
  border-radius: var(--radius-sm);
  background: rgba(0, 240, 255, 0.06);
  pointer-events: none;
}

.leaderboard-rank,
.lb-rank {
  min-width: 18px;
  color: var(--text-dim);
  font-weight: 600;
}

.leaderboard-name,
.lb-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 6px;
}

.leaderboard-score,
.lb-score {
  color: var(--text-dim);
  font-weight: 600;
}
