:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0a0d12;
  color: #f8fafc;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.16), transparent 28rem),
    linear-gradient(225deg, rgba(56, 189, 248, 0.18), transparent 30rem),
    #0a0d12;
}

.leaderboard-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(28px, 6vh, 64px) 0;
}

.leaderboard-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: end;
}

.back-link {
  align-self: start;
  color: rgba(248, 250, 252, 0.72);
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: #8fd7ff;
}

.kicker {
  margin: 0 0 8px;
  color: #8fd7ff;
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

.game-picker {
  display: grid;
  gap: 7px;
  min-width: 210px;
  color: rgba(248, 250, 252, 0.72);
  font-size: 12px;
  font-weight: 760;
}

.game-picker select {
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #121925;
  color: #f8fafc;
  padding: 0 12px;
  font: inherit;
}

.leaderboard-panel {
  margin-top: clamp(28px, 6vh, 56px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(17, 23, 34, 0.86);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.34);
}

.table-header,
.record-row {
  display: grid;
  grid-template-columns: 72px minmax(110px, 1fr) 110px minmax(180px, 1.6fr) 150px;
  gap: 14px;
  align-items: center;
}

.table-header {
  padding: 14px 18px;
  color: rgba(248, 250, 252, 0.52);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.records {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.record-row {
  min-height: 66px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.rank {
  color: #8fd7ff;
  font-size: 20px;
  font-weight: 820;
}

.player,
.score {
  color: #f8fafc;
  font-weight: 820;
}

.details,
.date {
  color: rgba(248, 250, 252, 0.68);
  font-size: 14px;
  line-height: 1.35;
}

.empty-state {
  margin: 0;
  padding: 34px 18px 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(248, 250, 252, 0.68);
  text-align: center;
  font-weight: 720;
}

@media (max-width: 760px) {
  .leaderboard-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .game-picker {
    width: 100%;
  }

  .table-header {
    display: none;
  }

  .record-row {
    grid-template-columns: 52px 1fr auto;
    gap: 8px 12px;
  }

  .details,
  .date {
    grid-column: 2 / -1;
  }
}
