/* ============================================================================
   SANJE Leaderboard — design tokens
   Palette: near-black ground, teal signature accent (nods to the "joint
   evaluation" / network idea in the project name), amber->green heat scale
   for scores (functional, not decorative — carried over because it's a real
   usability pattern for “low vs high score” at a glance).
   Type: Inter for UI text, JetBrains Mono for every number (tabular figures
   make a benchmark table scannable — scores should visually line up).
============================================================================ */

/* No external font CDN — system stacks render instantly with zero network
   dependency, which matters for a Space that should "just work" the moment
   it's uploaded. The UI stack favors the same geometric-humanist shapes
   Inter uses; the mono stack keeps tabular figures for aligned score columns. */

:root {
  /* ground */
  --bg: #090c11;
  --bg-raised: #0f141c;
  --panel: #131924;
  --panel-2: #171f2c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  /* text */
  --text: #e8ecf3;
  --text-muted: #8b95a7;
  --text-faint: #5a6478;

  /* signature accent — teal */
  --accent: #4fd1c5;
  --accent-strong: #2dd4bf;
  --accent-dim: rgba(79, 209, 197, 0.14);
  --accent-glow: rgba(79, 209, 197, 0.25);

  /* rank medals */
  --gold: #f2b705;
  --silver: #c7d0dd;
  --bronze: #d97a4d;

  /* heat scale (low -> high), reused from the working prior app because the
     amber->green read is genuinely legible for 0-100 scores */
  --heat-low: #b45309;
  --heat-mid: #a3a832;
  --heat-high: #16a34a;

  /* semantic */
  --danger: #f87171;
  --success: #4ade80;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);

  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background-image: radial-gradient(1000px 500px at 15% -10%, rgba(79, 209, 197, 0.08), transparent 60%),
    radial-gradient(800px 400px at 95% 0%, rgba(217, 122, 77, 0.06), transparent 55%);
  background-attachment: fixed;
  min-height: 100vh;
}

#root {
  min-height: 100vh;
}

::selection {
  background: var(--accent-glow);
  color: var(--text);
}

/* scrollbars */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
}

/* visible keyboard focus everywhere, per quality floor */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
