/* ============================================================================
   GunMoney — Terminal Console UI
   State-of-the-art dark "hacker" aesthetic for the d3frk GunMoney UrT server.

   Design notes
   - Pure CSS, zero external dependencies (works fully offline).
   - Every selector the JS/markup depends on is preserved; this file only
     elevates the presentation layer (depth, motion, typography, a11y).
   - Honors prefers-reduced-motion and prefers-reduced-transparency.
   ========================================================================== */

:root {
  /* ---- Surface ramp (darkest → lightest) ------------------------------- */
  --term-bg:           #07090c;
  --term-bg2:          #0e1217;
  --term-bg3:          #0a0d11;
  --surface-0:         #07090c;
  --surface-1:         #0c0f14;
  --surface-2:         #11161c;
  --surface-3:         #161c24;
  --surface-glass:     rgba(12, 16, 21, 0.72);

  /* ---- Accents --------------------------------------------------------- */
  --term-fg:           #2bffae;   /* primary neon green */
  --term-fg-soft:      #7affce;
  --term-amber:        #ffc149;
  --term-cyan:         #6cf3ff;
  --term-red:          #ff6b6b;
  --term-green:        #2ee089;
  --term-purple:       #b39bff;
  --term-gold:         #facc15;
  --money:             #41ffa6;

  /* ---- Lines / text ---------------------------------------------------- */
  --term-border:       #1a212b;
  --term-border-light: #2b3744;
  --term-dim:          #6b8a7d;
  --text:              #cfe9df;
  --text-strong:       #f3fbf7;

  /* ---- Effects --------------------------------------------------------- */
  --glow-fg:           0 0 0.5px rgba(43,255,174,.9), 0 0 14px rgba(43,255,174,.28);
  --glow-soft:         0 0 22px rgba(43,255,174,.10);
  --ring:              0 0 0 1px rgba(43,255,174,.55), 0 0 0 4px rgba(43,255,174,.14);
  --shadow-card:       0 1px 0 rgba(255,255,255,.03) inset, 0 18px 40px -24px rgba(0,0,0,.9);
  --shadow-pop:        0 30px 70px -20px rgba(0,0,0,.85);

  --radius:            10px;
  --radius-sm:         7px;
  --ease:             cubic-bezier(.2, .7, .25, 1);

  --maxw:             1200px;

  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'SF Mono', 'Consolas',
               'DejaVu Sans Mono', ui-monospace, 'Courier New', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(43,255,174,.06), transparent 60%),
    radial-gradient(900px 600px at 6% 4%, rgba(108,243,255,.045), transparent 55%),
    var(--term-bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* Faint global grid + vignette — sits behind everything, never interactive. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(43,255,174,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43,255,174,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 92%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 92%);
}

/* keep real content above the decorative layers */
header, .container, footer, .modal, .toast { position: relative; z-index: 1; }

a {
  color: var(--term-cyan);
  text-decoration: none;
  transition: color .15s var(--ease);
}
a:hover { color: var(--text-strong); text-shadow: 0 0 12px rgba(108,243,255,.4); }

::selection { background: rgba(43,255,174,.28); color: #fff; }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 4px;
}

/* Custom scrollbars (WebKit + Firefox) */
* { scrollbar-width: thin; scrollbar-color: #2c3a44 transparent; }
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(#2c3a44, #1c2530);
  border: 2px solid var(--term-bg);
  border-radius: 20px;
}
*::-webkit-scrollbar-thumb:hover { background: #3a4d5a; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================================
   Header / Nav
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-glass);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--term-border-light);
  box-shadow: 0 1px 0 rgba(43,255,174,.06), 0 12px 30px -20px rgba(0,0,0,.9);
}
/* animated accent hairline under the header */
header::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(43,255,174,.7), rgba(108,243,255,.5), transparent);
  background-size: 200% 100%;
  animation: sweep 6s linear infinite;
  opacity: .6;
}
@keyframes sweep { to { background-position: 200% 0; } }

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--term-amber);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .2px;
  text-shadow: 0 0 18px rgba(255,193,73,.25);
}
.logo .prompt { color: var(--term-fg); font-weight: 400; }
/* blinking terminal cursor appended to the logo */
.logo::after {
  content: "";
  width: 9px;
  height: 1.05em;
  margin-left: 2px;
  background: var(--term-fg);
  box-shadow: var(--glow-fg);
  animation: blink 1.15s steps(1) infinite;
  transform: translateY(1px);
}
@keyframes blink { 50% { opacity: 0; } }

.nav-links { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }

.nav-link {
  position: relative;
  padding: 7px 15px;
  font-size: 14px;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
  font-family: inherit;
  transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
}
.nav-link::before {
  content: "›";
  color: var(--term-fg);
  opacity: 0;
  margin-right: 0;
  width: 0;
  display: inline-block;
  transition: opacity .15s var(--ease), width .15s var(--ease), margin .15s var(--ease);
}
.nav-link:hover {
  background: var(--surface-2);
  border-color: var(--term-border-light);
  color: var(--text-strong);
}
.nav-link.active {
  background: var(--surface-2);
  border-color: rgba(43,255,174,.45);
  color: var(--text-strong);
  box-shadow: 0 0 18px -6px rgba(43,255,174,.5);
}
.nav-link.active::before { opacity: 1; width: auto; margin-right: 6px; }

.nav-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.nav-right .connect-btn { max-width: 100%; }
.nav-right .connect-btn .connect-addr { max-width: 150px; }

.live-pill {
  background: var(--surface-1);
  border: 1px solid var(--term-border-light);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  white-space: nowrap;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.live-pill .count { color: var(--term-green); font-weight: 700; }
.live-pill > span:first-child {
  color: var(--term-green);
  font-size: 10px;
  line-height: 0;
  position: relative;
}
/* pulsing "online" halo on the status dot */
.live-pill > span:first-child::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 0 rgba(46,224,137,.6);
  animation: ping 2s var(--ease) infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(46,224,137,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(46,224,137,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,224,137,0); }
}
.live-pill:not(.offline) { box-shadow: 0 0 22px -10px rgba(46,224,137,.7); }
.live-pill.offline { border-color: #5a2f2f; color: var(--term-dim); }
.live-pill.offline > span:first-child { color: var(--term-red); }
.live-pill.offline > span:first-child::after { animation: none; }

/* Connect chip — a one-click "copy the connect command" control. */
.connect-btn {
  background: linear-gradient(180deg, var(--term-fg-soft), var(--term-fg));
  color: #042016;
  border: none;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 0 1px rgba(43,255,174,.4), 0 10px 26px -12px rgba(43,255,174,.8);
  transition: transform .12s var(--ease), box-shadow .15s var(--ease), filter .15s var(--ease), background .25s var(--ease);
}
.connect-btn:hover { filter: brightness(1.07); box-shadow: 0 0 0 1px rgba(43,255,174,.6), 0 14px 30px -10px rgba(43,255,174,.9); transform: translateY(-1px); }
.connect-btn:active { transform: translateY(0) scale(.985); }
.connect-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--term-bg), 0 0 0 4px var(--term-fg); }

.connect-ic {
  flex: none;
  font-size: 15px;
  line-height: 1;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: rgba(4,32,22,.16);
  transition: transform .15s var(--ease);
}
.connect-btn:hover .connect-ic { transform: scale(1.08); }
.connect-addr {
  display: inline-grid;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
  max-width: 170px;
}
.connect-addr-sizer,
.connect-addr-label {
  grid-area: 1 / 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.connect-addr-sizer {
  visibility: hidden;
  pointer-events: none;
}
/* Success flash after a copy. */
.connect-btn.copied { background: linear-gradient(180deg, #c8ffe2, #4dee94); }
.connect-btn.copied .connect-ic { background: rgba(4,32,22,.24); }

.hamburger {
  display: none;
  background: var(--surface-1);
  border: 1px solid var(--term-border-light);
  color: var(--term-fg);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav { row-gap: 10px; }
  /* logo + hamburger share the top row; controls move to their own row */
  .logo { order: 1; }
  .hamburger { display: block; order: 2; }
  .nav-right { order: 3; width: 100%; justify-content: flex-start; gap: 8px; }
  .nav-links {
    order: 4;
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    padding-top: 6px;
  }
  .nav-links.open { display: flex; animation: dropIn .2s var(--ease); }
  .nav-links .nav-link { width: 100%; text-align: left; }
  .nav-right .live-pill { margin-left: auto; }   /* push pill+connect to the right */
}
@media (max-width: 460px) {
  /* icon-only theme button to save room on phones */
  .theme-btn #theme-name { display: none; }
  .nav-right .connect-btn .connect-addr { max-width: 140px; font-size: 12.5px; }
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } }

/* ============================================================================
   Terminal primitives
   ========================================================================== */
.terminal-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent), var(--surface-1);
  border: 1px solid var(--term-border);
  border-bottom: 1px solid var(--term-border-light);
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 13px;
  color: var(--term-dim);
  margin-bottom: 12px;
}
.prompt {
  color: var(--term-amber);
  font-weight: 700;
  text-shadow: 0 0 14px rgba(255,193,73,.3);
}

.terminal-box {
  border: 1px solid var(--term-border-light);
  background:
    linear-gradient(180deg, rgba(255,255,255,.015), transparent 40%),
    var(--surface-1);
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.terminal-box p { color: var(--text); }

.section { margin-bottom: 32px; }

h1, h2, h3 {
  font-family: inherit;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text-strong);
  letter-spacing: .3px;
}
h2 {
  font-size: 20px;
  padding-bottom: 8px;
  margin-top: 4px;
  position: relative;
}
h2::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--term-border-light), transparent 70%);
}

.dim { color: var(--term-dim); }
.mono { font-family: var(--font-mono); }
.green  { color: var(--term-green); }
.cyan   { color: var(--term-cyan); }
.amber  { color: var(--term-amber); }
.red    { color: var(--term-red); }
.purple { color: var(--term-purple); }
.gold   { color: var(--term-gold); }

/* ============================================================================
   Levelshot card
   ========================================================================== */
.levelshot-card {
  border: 1px solid var(--term-border-light);
  background: var(--surface-0);
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card), var(--glow-soft);
}

.levelshot-header {
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  padding: 8px 14px;
  font-size: 13px;
  color: var(--term-dim);
  border-bottom: 1px solid var(--term-border-light);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.levelshot-header > span:nth-child(2) {
  color: var(--term-fg-soft);
  letter-spacing: 1px;
  text-shadow: var(--glow-fg);
}
.levelshot-header > span:last-child { text-align: right; }

.levelshot-image-area {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(43,255,174,.05), transparent 60%),
    repeating-linear-gradient(45deg, #0b0e12 0 14px, #090c10 14px 28px);
  height: 320px;
  max-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.levelshot-image-area img,
.levelshot-image-area .levelshot-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  image-rendering: crisp-edges;
  border: 1px solid rgba(43,255,174,.15);
  border-radius: 4px;
  box-shadow: 0 20px 50px -24px #000;
  animation: imgFade .5s var(--ease);
}
@keyframes imgFade { from { opacity: 0; transform: scale(.985); } }
.levelshot-image-area .placeholder {
  padding: 36px;
  text-align: center;
  color: #4a6258;
  font-size: 13px;
}

/* Levelshot slideshow controls (only present when a map has multiple shots) */
.ls-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 38px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 9, 12, .55);
  border: 1px solid var(--term-border-light);
  color: var(--term-fg);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: background .14s var(--ease), border-color .14s var(--ease), color .14s var(--ease);
}
.ls-nav:hover { background: rgba(7,9,12,.8); border-color: var(--term-fg); box-shadow: 0 0 16px -6px var(--term-fg); }
.ls-prev { left: 10px; }
.ls-next { right: 10px; }
.ls-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 7px;
  padding: 5px 9px;
  background: rgba(7, 9, 12, .5);
  border: 1px solid var(--term-border);
  border-radius: 999px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.ls-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #3a4a44;
  border: 1px solid #4a5d54;
  cursor: pointer;
  transition: background .14s var(--ease), box-shadow .14s var(--ease);
}
.ls-dot:hover { background: var(--term-fg-soft); }
.ls-dot.active { background: var(--term-fg); box-shadow: 0 0 8px var(--term-fg); border-color: var(--term-fg); }
.ls-counter {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 3;
  font-size: 11px;
  color: var(--term-fg);
  background: rgba(7, 9, 12, .55);
  border: 1px solid var(--term-border);
  border-radius: 999px;
  padding: 2px 9px;
  letter-spacing: .5px;
}

.levelshot-footer {
  padding: 11px 14px;
  background: linear-gradient(180deg, var(--surface-1), var(--surface-0));
  color: var(--term-amber);
  border-top: 1px solid var(--term-border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  flex-wrap: wrap;
  gap: 6px;
}
.levelshot-footer .mapname { color: var(--term-fg); font-weight: 700; text-shadow: var(--glow-fg); }

/* CRT scanlines + faint flicker */
.scanlines::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(rgba(0,0,0,0) 50%, rgba(0,255,157,0.02) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
  animation: flicker 7s infinite steps(60);
}
.scanlines { position: relative; }
@keyframes flicker { 0%,97%,100% { opacity: 1; } 98% { opacity: .85; } 99% { opacity: .95; } }

/* ============================================================================
   Stat bar (server view)
   ========================================================================== */
.statbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.statbar .s {
  display: flex;
  align-items: center;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 55%),
    var(--surface-1);
  padding: 12px 16px;
  border: 1px solid var(--term-border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.statbar .s:hover { transform: translateY(-2px); border-color: rgba(43,255,174,.35); }
.statbar .s-ic {
  flex: none;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  color: var(--term-fg);
  border: 1px solid var(--term-border-light);
  border-radius: 9px;
  background: var(--surface-0);
}
.statbar .s-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.statbar .s-label {
  font-size: 10px;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: var(--term-dim);
}
.statbar .s-val {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-strong);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.statbar .s-val .s-cur { opacity: .65; font-size: 15px; margin-right: 1px; }
.statbar .s-val .s-unit { font-size: 12px; color: var(--term-dim); font-weight: 600; }
/* Jackpot tile — the headline number, given a gold treatment. */
.statbar .s-jackpot {
  border-color: rgba(250,204,21,.4);
  box-shadow: var(--shadow-card), 0 0 30px -16px rgba(250,204,21,.6);
}
.statbar .s-jackpot:hover { border-color: rgba(250,204,21,.7); }
.statbar .s-jackpot .s-ic { color: var(--term-gold); border-color: rgba(250,204,21,.4); }
.statbar .s-jackpot .s-val {
  font-size: 24px;
  text-shadow: 0 0 18px rgba(250,204,21,.35);
}

/* ============================================================================
   Live scoreboard
   ========================================================================== */
.terminal-scoreboard {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14.5px;
  background: var(--surface-0);
  border: 1px solid var(--term-border-light);
  border-radius: var(--radius);
  overflow: hidden;
}
.terminal-scoreboard th,
.terminal-scoreboard td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--term-border);
  white-space: nowrap;
}
.terminal-scoreboard tr:last-child td { border-bottom: none; }
.terminal-scoreboard th {
  background: var(--surface-2);
  color: var(--term-dim);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--term-border-light);
  position: sticky;
  top: 0;
}
.terminal-scoreboard tr.player-row { cursor: pointer; transition: background .12s var(--ease); }
.terminal-scoreboard tr.player-row:hover {
  background: linear-gradient(90deg, rgba(43,255,174,.07), transparent);
  color: var(--text-strong);
  box-shadow: inset 2px 0 0 var(--term-fg);
}
.terminal-scoreboard tr.bot { color: #51635c; cursor: default; }
.terminal-scoreboard tr.bot:hover { background: transparent; box-shadow: none; }

.bot-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .6px;
  padding: 1px 6px;
  margin-left: 7px;
  border: 1px solid #5a5030;
  border-radius: 999px;
  color: #e0c065;
  background: rgba(40,33,10,.7);
  vertical-align: middle;
}
.terminal-scoreboard .num   { width: 30px; color: var(--term-dim); text-align: right; }
.terminal-scoreboard .name  { font-weight: 600; }
.terminal-scoreboard .level { color: var(--term-cyan); text-align: right; }
.terminal-scoreboard .score { text-align: right; color: var(--text-strong); }
.terminal-scoreboard .ping  { text-align: right; color: var(--term-dim); }
.terminal-scoreboard .money { text-align: right; color: var(--money); font-weight: 600; }

/* UrT colour codes */
.color-1 { color: #ff5f5f; }
.color-2 { color: #33ff66; }
.color-3 { color: #ffff66; }
.color-4 { color: #6699ff; }
.color-5 { color: #66ffff; }
.color-6 { color: #ff66ff; }
.color-7 { color: #e8e8e8; }
.color-8 { color: #ffaa44; }
.color-9 { color: #aaaaaa; }

/* ============================================================================
   Data tables (leaderboard / mapcycle)
   ========================================================================== */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface-0);
  border: 1px solid var(--term-border-light);
  border-radius: var(--radius);
  overflow: hidden;
}
.data-table th, .data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--term-border);
  text-align: left;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table th {
  background: var(--surface-2);
  color: var(--term-dim);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  user-select: none;
  transition: color .12s var(--ease);
}
.data-table th:hover { color: var(--text-strong); }
.data-table th.sortable { cursor: pointer; white-space: nowrap; }
.data-table th .sort-arrow { color: var(--term-cyan); font-size: 10px; }
.data-table tbody tr { transition: background .12s var(--ease); }
.data-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(108,243,255,.06), transparent);
  box-shadow: inset 2px 0 0 var(--term-cyan);
}
.data-table .rank { width: 46px; color: var(--term-dim); text-align: right; font-weight: 700; }
.data-table .money-col { color: var(--money); text-align: right; }
.data-table .kd { text-align: right; }
.data-table .clickable { cursor: pointer; }

/* ============================================================================
   Filters & search
   ========================================================================== */
.search-bar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.search-bar input[type="text"] {
  flex: 1;
  min-width: 220px;
  background: var(--surface-0);
  border: 1px solid var(--term-border-light);
  color: var(--text-strong);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.search-bar input[type="text"]::placeholder { color: #50685e; }
.search-bar input:focus {
  outline: none;
  border-color: var(--term-fg);
  box-shadow: 0 0 0 3px rgba(43,255,174,.13);
}

.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pill {
  padding: 5px 14px;
  font-size: 13px;
  background: var(--surface-1);
  border: 1px solid var(--term-border-light);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: all .15s var(--ease);
}
.pill:hover { border-color: var(--term-fg-soft); color: var(--text-strong); }
.pill.active {
  border-color: var(--term-fg);
  background: rgba(43,255,174,.12);
  color: var(--text-strong);
  box-shadow: 0 0 16px -6px rgba(43,255,174,.7);
}

.toggle-group {
  display: inline-flex;
  border: 1px solid var(--term-border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.toggle-group button {
  background: var(--surface-1);
  color: var(--text);
  border: none;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.toggle-group button:hover { background: var(--surface-3); color: var(--text-strong); }
.toggle-group button.active {
  background: linear-gradient(180deg, var(--term-fg-soft), var(--term-fg));
  color: #042016;
  font-weight: 700;
}

/* radio labels in the buylist */
label { cursor: pointer; }
input[type="radio"] { accent-color: var(--term-fg); }

/* ============================================================================
   Buylist / cards
   ========================================================================== */
.buylist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.buy-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.018), transparent 45%),
    var(--surface-1);
  border: 1px solid var(--term-border-light);
  padding: 13px 14px;
  font-size: 14px;
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .14s var(--ease), border-color .14s var(--ease), box-shadow .14s var(--ease);
}
.buy-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--term-fg), var(--term-cyan));
  opacity: 0;
  transition: opacity .14s var(--ease);
}
.buy-card:hover {
  transform: translateY(-2px);
  border-color: rgba(43,255,174,.45);
  box-shadow: var(--shadow-card), 0 16px 34px -22px rgba(43,255,174,.6);
}
.buy-card:hover::before { opacity: 1; }
.buy-card .item-name { font-weight: 700; margin-bottom: 5px; color: var(--text-strong); }
.buy-card .cost { color: var(--money); font-size: 13px; font-weight: 600; }
.buy-card .cost .sc { color: var(--term-purple); }
.buy-card .meta { font-size: 12px; color: var(--term-dim); display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.buy-card .cmd {
  font-size: 12px;
  background: var(--surface-0);
  border: 1px solid var(--term-border);
  padding: 3px 8px;
  border-radius: 5px;
  color: var(--term-amber);
  display: inline-block;
  margin-top: 8px;
}

.badge {
  font-size: 10px;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid;
  border-radius: 999px;
  display: inline-block;
  line-height: 1.3;
}
.badge-weapon   { border-color: #3e7a67; color: #7fd9bd; background: rgba(62,122,103,.12); }
.badge-gear     { border-color: #3f6a96; color: #88b6e0; background: rgba(63,106,150,.12); }
.badge-ability  { border-color: #8a4a5e; color: #e09aa9; background: rgba(138,74,94,.12); }
.badge-map      { border-color: #7a4a7f; color: #d39ad6; background: rgba(122,74,127,.12); }
.badge-prestige { border-color: #5e4f96; color: var(--term-purple); background: rgba(94,79,150,.12); }
.badge-colour   { border-color: #5a6a55; color: #cfe9df; background: rgba(90,106,85,.14); }

/* ============================================================================
   Profile modal
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 7, .78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal.open { display: flex; animation: fadeIn .18s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } }
.modal-content {
  background: var(--surface-2);
  border: 1px solid var(--term-border-light);
  max-width: 840px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop), var(--glow-soft);
  animation: popIn .22s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-header {
  padding: 13px 16px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface-1));
  border-bottom: 1px solid var(--term-border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
}
.modal-body { padding: 16px; }
.modal-body table th { color: var(--term-dim); font-weight: 600; padding-bottom: 6px; }
.modal-body table td { padding: 3px 0; }
.modal-close {
  background: var(--surface-0);
  border: 1px solid var(--term-border-light);
  color: var(--text);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  transition: all .15s var(--ease);
}
.modal-close:hover { border-color: var(--term-red); color: var(--term-red); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.stat {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.022), transparent 55%),
    var(--surface-0);
  border: 1px solid var(--term-border-light);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
/* accent hairline along the top of each stat card, tinted per metric */
.stat::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--term-border-light);
  opacity: .8;
}
.stat:hover { transform: translateY(-2px); border-color: rgba(43,255,174,.35); }
.stat.s-money::before  { background: linear-gradient(90deg, var(--term-green), transparent); }
.stat.s-sc::before     { background: linear-gradient(90deg, var(--term-purple), transparent); }
.stat.s-kd::before     { background: linear-gradient(90deg, var(--term-cyan), transparent); }
.stat.s-rank::before   { background: linear-gradient(90deg, var(--term-amber), transparent); }
.stat .label { font-size: 10px; color: var(--term-dim); text-transform: uppercase; letter-spacing: .7px; }
.stat .value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-strong);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.stat .value.green  { color: var(--term-green); text-shadow: 0 0 14px rgba(46,224,137,.25); }
.stat .value.purple { color: var(--term-purple); text-shadow: 0 0 14px rgba(179,155,255,.25); }
.stat.stat-wide::before { display: none; }
.stat-wide { box-shadow: none; }

/* Profile modal sections */
.profile-section { margin: 16px 0 0; }
.profile-h {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  color: var(--text-strong);
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--term-border);
}

.progress {
  height: 7px;
  background: var(--surface-0);
  border: 1px solid var(--term-border);
  border-radius: 999px;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--term-cyan), var(--term-fg));
  box-shadow: 0 0 12px rgba(43,255,174,.6);
  border-radius: 999px;
  transition: width .6s var(--ease);
}

/* ============================================================================
   Join box — styled as a small terminal window
   ========================================================================== */
.join-box {
  margin: 18px 0;
  border: 1px solid var(--term-border-light);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-0);
  box-shadow: var(--shadow-card), 0 0 34px -18px rgba(43,255,174,.6);
}
.join-titlebar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent), var(--surface-1);
  border-bottom: 1px solid var(--term-border-light);
  font-size: 13px;
  color: var(--term-dim);
}
.join-body {
  padding: 16px;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(43,255,174,.05), transparent 55%),
    var(--surface-0);
}
.join-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 16px;
}
.join-cmd { color: var(--text-strong); }
.join-box .ip {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--term-fg);
  text-shadow: var(--glow-fg);
}
.join-cursor {
  width: 9px;
  height: 1.05em;
  background: var(--term-fg);
  box-shadow: var(--glow-fg);
  animation: blink 1.15s steps(1) infinite;
  transform: translateY(2px);
  display: inline-block;
}
.join-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 8px; }
.join-actions .copy-btn { margin-left: 0; padding: 7px 14px; font-size: 12px; }
.join-hint { font-size: 12px; }

/* ============================================================================
   Footer
   ========================================================================== */
footer {
  margin-top: 48px;
  padding: 24px 20px;
  border-top: 1px solid var(--term-border-light);
  font-size: 12px;
  color: var(--term-dim);
  text-align: center;
}

/* ============================================================================
   Toast / buttons / misc
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-2);
  border: 1px solid var(--term-fg);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-strong);
  z-index: 300;
  display: none;
  box-shadow: var(--shadow-pop), 0 0 24px -8px rgba(43,255,174,.7);
}
.toast.show { display: block; animation: toastIn .22s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

.copy-btn {
  font-size: 11px;
  padding: 3px 9px;
  border: 1px solid var(--term-border-light);
  border-radius: 5px;
  background: var(--surface-1);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  margin-left: 4px;
  transition: all .14s var(--ease);
}
.copy-btn:hover { border-color: var(--term-fg); color: var(--term-fg); }

.empty { padding: 24px; color: var(--term-dim); text-align: center; }
.loading { opacity: .6; pointer-events: none; }

/* ============================================================================
   Levelshot lightbox (full / original-size viewer)
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: none;
  flex-direction: column;
  background: rgba(3, 5, 7, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox.open { display: flex; animation: fadeIn .18s var(--ease); }
.lightbox-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--term-border-light);
  background: var(--surface-glass);
  font-size: 13px;
  color: var(--term-dim);
}
.lightbox-bar .lightbox-cap { color: var(--term-fg); text-shadow: var(--glow-fg); }
.lightbox-bar .modal-close { margin-left: auto; }
.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 24px;
}
.lightbox-stage img {
  max-width: none;          /* allow original size + scroll */
  border: 1px solid rgba(43,255,174,.2);
  border-radius: 6px;
  box-shadow: var(--shadow-pop);
  image-rendering: crisp-edges;
  cursor: zoom-out;
  animation: popIn .22s var(--ease);
}

/* ============================================================================
   About view
   ========================================================================== */
.about-hero { position: relative; overflow: hidden; }
.about-title { font-size: 30px; margin: 0 0 6px; letter-spacing: .5px; }
.about-lede { font-size: 15.5px; color: var(--text); max-width: 70ch; margin: 0 0 14px; }
.about-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.fact {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 14px;
  background: var(--surface-0);
  border: 1px solid var(--term-border-light);
  border-radius: var(--radius-sm);
}
.fact-k { font-size: 10px; letter-spacing: .8px; color: var(--term-dim); text-transform: uppercase; }
.fact-v { font-size: 15px; font-weight: 700; color: var(--text-strong); }

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.about-card { transition: border-color .15s var(--ease), transform .15s var(--ease); }
.about-card:hover { border-color: rgba(43,255,174,.35); transform: translateY(-2px); }
.about-card p { margin: 8px 0 0; color: var(--text); }
.about-card-head { display: flex; align-items: center; gap: 10px; }
.about-card-head .item-name { font-weight: 700; letter-spacing: .4px; }
.about-icon {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid currentColor;
  border-radius: 7px;
  font-weight: 700;
  flex: none;
}

.cmd-list { list-style: none; margin: 10px 0 0; padding: 0; }
.cmd-list li { padding: 4px 0; border-bottom: 1px dashed var(--term-border); color: var(--text); }
.cmd-list li:last-child { border-bottom: none; }
.cmd-list code,
.about-card code {
  background: var(--surface-0);
  border: 1px solid var(--term-border);
  color: var(--term-amber);
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 13px;
}

.about-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
a.about-link:hover { border-color: rgba(108,243,255,.45); transform: translateY(-2px); text-decoration: none; }
.about-link strong { color: var(--text-strong); }

/* ============================================================================
   Theme switcher button
   ========================================================================== */
.theme-btn {
  background: var(--surface-1);
  border: 1px solid var(--term-border-light);
  color: var(--term-fg);
  padding: 5px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: .3px;
  cursor: pointer;
  text-transform: uppercase;
  transition: border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
}
.theme-btn:hover { border-color: var(--term-fg); box-shadow: 0 0 16px -6px var(--term-fg); }

/* ============================================================================
   Chat-colour swatches (profile owned colours)
   ========================================================================== */
.swatch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 13px;
  background: var(--surface-0);
  border: 1px solid var(--term-border-light);
  border-radius: 999px;
}
.swatch .color-1,.swatch .color-2,.swatch .color-3,.swatch .color-4,
.swatch .color-5,.swatch .color-6,.swatch .color-7,.swatch .color-8,.swatch .color-9 {
  text-shadow: 0 0 8px currentColor;
}
.swatch.active {
  border-color: var(--term-fg);
  background: rgba(43,255,174,.10);
  box-shadow: 0 0 16px -7px var(--term-fg);
}

/* ============================================================================
   Jackpot Hall of Fame
   ========================================================================== */
.jackpot-now {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  border-color: var(--term-gold);
  box-shadow: var(--shadow-card), 0 0 34px -16px rgba(250,204,21,.55);
}
.jackpot-now-val {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .5px;
  text-shadow: 0 0 18px rgba(250,204,21,.4);
}
.jackpot-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
/* Recent winners — a grid of "winning ticket" cards. */
.jackpot-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.jp-win {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  background:
    linear-gradient(180deg, rgba(250,204,21,.04), transparent 60%),
    var(--surface-1);
  border: 1px solid var(--term-border-light);
  border-left: 3px solid rgba(250,204,21,.45);
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color .14s var(--ease), transform .14s var(--ease), box-shadow .14s var(--ease);
}
.jp-win:hover {
  transform: translateY(-2px);
  border-color: var(--term-gold);
  border-left-color: var(--term-gold);
  box-shadow: 0 14px 30px -20px rgba(250,204,21,.8);
}
.jp-win-coin {
  flex: none;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--term-gold);
  background: rgba(250,204,21,.08);
  border: 1px solid rgba(250,204,21,.3);
  border-radius: 8px;
  text-shadow: 0 0 10px rgba(250,204,21,.5);
}
.jp-win-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.jp-win-amt { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.jp-win-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jp-win-when {
  margin-left: auto;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-size: 11px;
  color: var(--term-dim);
  white-space: nowrap;
}
.jp-win-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .6px;
  padding: 1px 6px;
  border-radius: 999px;
  color: #1a1505;
  background: linear-gradient(180deg, #ffe07a, var(--term-gold));
}
/* The most-recent win gets a brighter frame + a soft sheen sweep. */
.jp-win.latest {
  border-color: rgba(250,204,21,.55);
  border-left-color: var(--term-gold);
  box-shadow: 0 0 26px -14px rgba(250,204,21,.8);
}
.jp-win.latest::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(250,204,21,.10) 50%, transparent 60%);
  background-size: 250% 100%;
  animation: jpSheen 5s linear infinite;
  pointer-events: none;
}
@keyframes jpSheen { to { background-position: -200% 0; } }

/* ============================================================================
   Server chat feed
   ========================================================================== */
.chatlog {
  background: var(--surface-0);
  border: 1px solid var(--term-border-light);
  border-radius: var(--radius);
  max-height: 60vh;
  min-height: 220px;
  overflow-y: auto;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.7;
  box-shadow: var(--shadow-card);
}
.chat-line {
  padding: 2px 0;
  border-bottom: 1px solid rgba(255,255,255,.03);
  word-break: break-word;
}
.chat-line:last-child { border-bottom: none; }
.chat-time { color: var(--term-dim); font-size: 11px; margin-right: 8px; }
.chat-name { font-weight: 600; }
.chat-sep { color: var(--term-dim); margin: 0 6px 0 1px; }
.chat-msg { color: var(--text); }
.chat-team {
  color: var(--term-amber);
  font-size: 11px;
  font-weight: 700;
  margin-right: 4px;
}

/* ============================================================================
   Boot sequence overlay
   ========================================================================== */
.boot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    radial-gradient(900px 600px at 50% 40%, rgba(43,255,174,.06), transparent 60%),
    var(--term-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity .5s var(--ease);
}
.boot.done { opacity: 0; pointer-events: none; }
.boot-log {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(12px, 2.4vw, 16px);
  line-height: 1.7;
  color: var(--term-fg);
  text-shadow: var(--glow-fg);
  white-space: pre-wrap;
  width: min(680px, 92vw);
  min-height: 280px;
}
.boot-log::after {
  content: "▮";
  animation: blink 1.05s steps(1) infinite;
}
.boot-skip {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: .5px;
}

/* ============================================================================
   Themes (accent overrides — applied via <html data-theme="…">)
   ========================================================================== */
[data-theme="amber"] {
  --term-fg: #ffc149; --term-fg-soft: #ffd98a; --money: #ffd070;
  --glow-fg: 0 0 0.5px rgba(255,193,73,.9), 0 0 14px rgba(255,193,73,.32);
  --term-fg-rgb: 255,193,73;
}
[data-theme="ice"] {
  --term-fg: #6cf3ff; --term-fg-soft: #b3f8ff; --money: #7fe9ff;
  --glow-fg: 0 0 0.5px rgba(108,243,255,.9), 0 0 14px rgba(108,243,255,.32);
}
[data-theme="matrix"] {
  --term-fg: #00ff41; --term-fg-soft: #74ff97; --money: #2bff6a;
  --glow-fg: 0 0 0.5px rgba(0,255,65,.95), 0 0 16px rgba(0,255,65,.4);
  --term-bg: #050a05; --term-dim: #4f7a5a;
}

/* ============================================================================
   Responsive
   ========================================================================== */
@media (max-width: 700px) {
  body { font-size: 14px; }
  .terminal-scoreboard, .data-table { font-size: 13px; }
  .terminal-scoreboard th, .terminal-scoreboard td,
  .data-table th, .data-table td { padding: 8px 9px; }
  .buylist-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .jackpot-cols { grid-template-columns: 1fr; }
  .levelshot-image-area { height: 220px; }
  .join-box .ip { font-size: 18px; }
}

/* ============================================================================
   Motion / transparency preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .logo::after { opacity: 1; }
}
@media (prefers-reduced-transparency: reduce) {
  header { background: var(--surface-1); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .modal { background: rgba(3,5,7,.96); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
