/* JEV ARCADE: neon cabinets on a starfield. */
:root {
  --bg: #07061a;
  --bg-2: #120f33;
  --pink: #ff2e97;
  --cyan: #22e6ff;
  --yellow: #ffe14d;
  --green: #39ff88;
  --text: #e9e6ff;
  --muted: #9b95c9;
  --line: #2c2766;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(ellipse at 50% -10%, #2a1466 0%, transparent 55%), var(--bg);
  color: var(--text);
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 22px;
  line-height: 1.25;
  min-height: 100vh;
  overflow-x: hidden;
}
/* CRT scanlines */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
}
.stars {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .6;
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 70% 10%, #fff, transparent),
    radial-gradient(1px 1px at 40% 80%, #fff, transparent),
    radial-gradient(1px 1px at 85% 60%, #fff, transparent),
    radial-gradient(1px 1px at 10% 70%, #fff, transparent),
    radial-gradient(1px 1px at 55% 45%, #fff, transparent);
  background-size: 300px 300px;
  animation: drift 60s linear infinite;
}
@keyframes drift { to { background-position: 0 300px; } }
a { color: var(--cyan); }
a:hover { color: var(--yellow); }
:focus-visible { outline: 2px dashed var(--yellow); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Marquee ---------- */
.marquee { text-align: center; padding: 40px 16px 18px; }
.coin-op { font-family: 'Press Start 2P', monospace; font-size: 11px; letter-spacing: 3px; color: var(--yellow); margin: 0 0 18px; animation: pulse 1.6s steps(2) infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.logo { margin: 0; font-family: 'Press Start 2P', monospace; line-height: 1.1; }
.logo span { display: block; }
.l1 { font-size: clamp(22px, 5vw, 40px); color: var(--cyan); text-shadow: 0 0 8px var(--cyan), 0 0 24px rgba(34,230,255,.5); letter-spacing: 12px; }
.l2 {
  font-size: clamp(38px, 10vw, 88px); color: var(--pink); letter-spacing: 4px; margin-top: 8px;
  text-shadow: 0 0 6px var(--pink), 0 0 22px rgba(255,46,151,.6), 4px 4px 0 #3a0a2a;
}
.tagline { max-width: 640px; margin: 20px auto 0; color: var(--muted); }

/* ---------- Layout ---------- */
.floor {
  max-width: 1200px; margin: 0 auto; padding: 12px 16px 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start;
}
@media (max-width: 900px) { .floor { grid-template-columns: 1fr; } }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; }
.tab {
  font-family: 'Press Start 2P', monospace; font-size: 12px; cursor: pointer;
  color: var(--muted); background: transparent; padding: 10px 14px;
  border: 2px solid var(--line);
}
.tab[aria-selected="true"] { color: var(--bg); background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 14px rgba(34,230,255,.5); }
.credits { font-family: 'Press Start 2P', monospace; font-size: 11px; color: var(--muted); margin: 0; }
.credits b { color: var(--yellow); font-weight: normal; }

/* ---------- Cabinets ---------- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.cab {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #1b1650, #0d0b26);
  border: 3px solid var(--line); border-top: 10px solid var(--pink);
  border-radius: 14px 14px 6px 6px;
  box-shadow: 0 0 0 2px #000, 0 10px 30px rgba(0,0,0,.5);
  transition: transform .15s, box-shadow .15s;
}
.cab:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px #000, 0 0 24px rgba(255,46,151,.35); }
.cab:nth-child(3n+2) { border-top-color: var(--cyan); }
.cab:nth-child(3n+3) { border-top-color: var(--yellow); }
.screen {
  position: relative; display: block; margin: 12px 12px 0; aspect-ratio: 1200 / 630;
  background: #000; border: 3px solid #000; border-radius: 10px; overflow: hidden;
  box-shadow: inset 0 0 30px rgba(34,230,255,.15);
}
.screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.screen::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.18) 0 1px, transparent 1px 3px); pointer-events: none; }
.no-signal {
  position: absolute; inset: 0; display: none; place-items: center;
  font-family: 'Press Start 2P', monospace; font-size: 12px; color: var(--muted);
  background: repeating-linear-gradient(45deg, #111 0 6px, #181818 6px 12px);
}
.screen.blank .no-signal { display: grid; }
.screen.blank img { display: none; }
.cab-body { padding: 12px 14px 60px; }
.cab-title { margin: 0 0 6px; font-family: 'Press Start 2P', monospace; font-size: 13px; line-height: 1.5; }
.cab-title a { color: var(--text); text-decoration: none; }
.cab-title a:hover { color: var(--yellow); }
.cab-desc { margin: 0 0 8px; color: var(--muted); font-size: 19px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cab-meta { margin: 0; font-size: 17px; color: var(--muted); }
.cab-meta .tag { color: var(--green); }

.vote {
  position: absolute; right: 12px; bottom: 12px;
  display: flex; align-items: center; gap: 8px;
  font-family: 'Press Start 2P', monospace; font-size: 12px; color: var(--yellow);
  background: #000; border: 2px solid var(--yellow); border-radius: 20px; padding: 8px 12px 8px 8px; cursor: pointer;
}
.vote:hover { box-shadow: 0 0 12px rgba(255,225,77,.5); }
.vote[aria-pressed="true"] { background: var(--yellow); color: #000; }
.coin { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6b0, #e0a800 60%, #8a6200); box-shadow: inset 0 0 0 2px #b58400; }
.vote.bump .coin { animation: drop .4s ease-in; }
@keyframes drop { 0% { transform: translateY(-14px) scale(1.2); } 100% { transform: translateY(0); } }
.empty { font-family: 'Press Start 2P', monospace; font-size: 12px; color: var(--muted); text-align: center; padding: 40px 0; line-height: 2; }

/* ---------- Side panels ---------- */
.side { display: grid; gap: 22px; }
.panel { background: #000; border: 3px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 0 0 2px #000, inset 0 0 40px rgba(255,46,151,.08); }
.panel-title { font-family: 'Press Start 2P', monospace; font-size: 14px; margin: 0 0 14px; text-align: center; color: var(--pink); text-shadow: 0 0 8px rgba(255,46,151,.7); }
.blink-title { animation: pulse 1.2s steps(2) infinite; }
.hs { list-style: none; margin: 0; padding: 0; font-family: 'Press Start 2P', monospace; font-size: 11px; }
.hs li { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; padding: 7px 0; border-bottom: 1px dashed #221e4d; align-items: baseline; }
.hs li:nth-child(1) { color: var(--yellow); }
.hs li:nth-child(2) { color: var(--cyan); }
.hs li:nth-child(3) { color: var(--pink); }
.hs .rank { color: var(--muted); }
.hs a { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs a:hover { color: var(--green); }
.hs .pts { text-align: right; }
.hs .none { display: block; color: var(--muted); text-align: center; border: 0; }

.hint { margin: 0 0 14px; color: var(--muted); font-size: 19px; }
form label { display: block; font-family: 'Press Start 2P', monospace; font-size: 10px; color: var(--cyan); margin: 12px 0 6px; }
form input {
  width: 100%; font: inherit; font-size: 22px; color: var(--green); background: #06051a;
  border: 2px solid var(--line); padding: 8px 10px; caret-color: var(--green);
}
form input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 10px rgba(57,255,136,.35); }
#initials { width: 5.5em; text-transform: uppercase; letter-spacing: 6px; }
.coin-btn {
  margin-top: 18px; width: 100%; font-family: 'Press Start 2P', monospace; font-size: 13px; cursor: pointer;
  color: #000; background: var(--yellow); border: 0; padding: 14px; box-shadow: 0 4px 0 #b58400, 0 0 18px rgba(255,225,77,.4);
}
.coin-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b58400; }
.coin-btn:disabled { opacity: .6; cursor: wait; }
.form-msg { min-height: 1.3em; margin: 12px 0 0; font-size: 19px; }
.form-msg.ok { color: var(--green); }
.form-msg.err { color: var(--pink); }

.foot { text-align: center; color: var(--muted); font-size: 18px; padding: 10px 16px 40px; }
.foot p { margin: 4px 0; }

@media (prefers-reduced-motion: reduce) {
  .stars, .coin-op, .blink-title, .vote.bump .coin { animation: none; }
  .cab { transition: none; }
}
