/* ============ 90s ARCADE ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --neon-pink: #ff2bd6;
  --neon-cyan: #2bfff2;
  --neon-yellow: #ffe12b;
  --amber: #ffb13b;
  --cab-dark: #1a0b2e;
  --cab-red: #6d1030;
  --screen-green: #3bff9d;
}

body {
  background: radial-gradient(ellipse at 50% -20%, #2a1054 0%, #12062b 45%, #05010f 100%);
  min-height: 100vh;
  color: #eee;
  font-family: 'VT323', monospace;
  font-size: 20px;
  overflow-x: hidden;
}

.hidden { display: none !important; }
.muted { color: #8a7fb0; font-size: 17px; }
.amber { color: var(--amber); }

/* starfield */
#stars {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff 50%, transparent 50%),
    radial-gradient(1px 1px at 60% 70%, #fff 50%, transparent 50%),
    radial-gradient(2px 2px at 80% 20%, var(--neon-cyan) 50%, transparent 50%),
    radial-gradient(1px 1px at 40% 80%, #fff 50%, transparent 50%),
    radial-gradient(2px 2px at 90% 60%, var(--neon-pink) 50%, transparent 50%),
    radial-gradient(1px 1px at 10% 60%, #fff 50%, transparent 50%),
    radial-gradient(1px 1px at 70% 40%, #fff 50%, transparent 50%);
  background-size: 550px 550px;
  animation: twinkle 4s steps(2) infinite;
}
@keyframes twinkle { 50% { opacity: 0.6; } }

/* ============ header ============ */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px 10px;
  flex-wrap: wrap;
}

.neon-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 26px;
  color: #fff;
  text-shadow:
    0 0 6px var(--neon-pink),
    0 0 18px var(--neon-pink),
    0 0 40px var(--neon-pink),
    3px 3px 0 #4a0a3a;
  animation: neon-flicker 3.5s infinite;
  letter-spacing: 2px;
  padding: 10px 6px;
}
@keyframes neon-flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.55; }
  94% { opacity: 1; }
  96% { opacity: 0.7; }
  97% { opacity: 1; }
}

.bulbs {
  height: 10px;
  background-image: radial-gradient(circle 3px at 10px 5px, var(--neon-yellow) 60%, #4a3a00 65%);
  background-size: 20px 10px;
  animation: chase 0.8s steps(2) infinite;
}
.bulbs.bottom { animation-delay: 0.4s; }
@keyframes chase {
  50% { background-image: radial-gradient(circle 3px at 10px 5px, #4a3a00 60%, var(--neon-yellow) 65%); }
}

/* ============ buttons ============ */
.pixel-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: #000;
  background: var(--neon-cyan);
  border: 3px solid #fff;
  box-shadow: 4px 4px 0 #0b7c72, 4px 4px 0 3px #000;
  padding: 12px 16px;
  cursor: pointer;
  text-transform: uppercase;
}
.pixel-btn:hover:not(:disabled) { background: #7dfff7; }
.pixel-btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #0b7c72, 1px 1px 0 2px #000; }
.pixel-btn:disabled { opacity: 0.4; cursor: default; }

.buy-btn {
  background: linear-gradient(180deg, #6dff8a 0%, var(--screen-green) 100%);
  box-shadow: 4px 4px 0 #0b7c3a, 4px 4px 0 3px #000, 0 0 24px rgba(59, 255, 157, 0.45);
  text-decoration: none;
  display: inline-block;
}
.buy-btn:hover { background: linear-gradient(180deg, #9dffb0 0%, #6dff8a 100%); }

#wallet-addr {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  background: #0d0d22;
  border: 3px solid var(--neon-cyan);
  box-shadow: 0 0 12px rgba(43, 255, 242, 0.4);
  padding: 12px 14px;
  color: var(--neon-cyan);
}

/* ============ layout ============ */
main { display: flex; justify-content: center; padding: 18px 16px 0; }
#lobby { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; align-items: flex-start; }

/* ============ home: arcade floor ============ */
#floor { display: flex; flex-direction: column; align-items: center; gap: 18px; max-width: 780px; }

.floor-tagline {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(43, 255, 242, 0.7);
  letter-spacing: 2px;
}

.floor-grid { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }

.cab-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 218px;
  padding: 0 14px 16px;
  background: linear-gradient(180deg, #3d1258 0%, var(--cab-dark) 30%, #0e0620 100%);
  border: 4px solid #000;
  border-radius: 14px 14px 6px 6px;
  box-shadow: inset 3px 0 0 #5a2a80, inset -3px 0 0 #120428, 0 10px 30px rgba(0, 0, 0, 0.7);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
a.cab-card:hover {
  transform: translateY(-6px);
  box-shadow: inset 3px 0 0 #5a2a80, inset -3px 0 0 #120428, 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 43, 214, 0.25);
}

.cab-card-marquee {
  width: calc(100% + 28px);
  margin: 0 -14px;
  text-align: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  padding: 12px 0 10px;
  background: linear-gradient(180deg, #000 0%, #1c0533 100%);
  border-bottom: 3px solid #000;
  border-radius: 10px 10px 0 0;
  color: #8a7fb0;
  letter-spacing: 3px;
}
.pac-marquee { color: var(--neon-yellow); text-shadow: 0 0 8px var(--neon-yellow), 0 0 22px #ff8c00; }
.inv-marquee { color: var(--screen-green); text-shadow: 0 0 8px var(--screen-green), 0 0 22px #00a86b; }
.tet-marquee { color: var(--neon-pink); text-shadow: 0 0 8px var(--neon-pink), 0 0 22px #a8006b; }
.snk-marquee { color: #7dffb0; text-shadow: 0 0 8px #7dffb0, 0 0 22px #00a850; }
.brk-marquee { color: #3bd6ff; text-shadow: 0 0 8px #3bd6ff, 0 0 22px #0068a8; }

.cab-card-screen {
  width: 100%;
  background: #000;
  border: 6px solid #08040f;
  border-radius: 8px;
  box-shadow: inset 0 0 20px rgba(59, 255, 157, 0.08), 0 0 0 2px #241640;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 118px;
}
.cab-card-screen canvas { width: 100%; height: auto; image-rendering: pixelated; }

.play-link { pointer-events: none; }
.cab-card-gate { font-size: 15px; color: #8a7fb0; text-align: center; }

.cab-card.soon { opacity: 0.75; }
.cab-card.soon .cab-card-marquee { color: #5a4a85; }
.soon-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: #5a4a85;
  text-align: center;
  line-height: 2;
}

.floor-sub {
  text-align: center;
  color: #b9a8e8;
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: 1px;
}

/* ============ the cabinet ============ */
.cabinet {
  width: 100%;
  max-width: 502px;
  background: linear-gradient(180deg, #3d1258 0%, var(--cab-dark) 30%, #0e0620 100%);
  border: 4px solid #000;
  border-radius: 18px 18px 8px 8px;
  padding: 0 18px 14px;
  box-shadow:
    inset 4px 0 0 #5a2a80, inset -4px 0 0 #120428,
    0 12px 40px rgba(0, 0, 0, 0.8),
    0 0 60px rgba(255, 43, 214, 0.12);
}

.game-select {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 10px 0 8px;
}
.game-tab {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #8a7fb0;
  background: #12062b;
  border: 3px solid #23234a;
  padding: 9px 14px;
  cursor: pointer;
  letter-spacing: 1px;
}
.game-tab.selected {
  color: var(--neon-yellow);
  border-color: var(--neon-yellow);
  text-shadow: 0 0 8px rgba(255, 225, 43, 0.7);
  box-shadow: 0 0 14px rgba(255, 225, 43, 0.3);
}
.game-tab:hover:not(.selected) { color: #b9a8e8; border-color: #3a3a6a; }

.cab-marquee {
  margin: 0 -18px;
  background: linear-gradient(180deg, #000 0%, #1c0533 100%);
  border-bottom: 3px solid #000;
  border-radius: 14px 14px 0 0;
  padding: 14px 0 10px;
  text-align: center;
}
.cab-marquee-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 20px;
  color: var(--neon-yellow);
  text-shadow: 0 0 8px var(--neon-yellow), 0 0 26px #ff8c00, 2px 2px 0 #4a2a00;
  letter-spacing: 6px;
}

.bulb-strip {
  margin: 0 -18px 12px;
  height: 12px;
  background:
    radial-gradient(circle 3.5px at 12px 6px, #fff 40%, var(--neon-yellow) 55%, #3a2a00 70%);
  background-size: 24px 12px;
  border-bottom: 3px solid #000;
  animation: chase 0.5s steps(2) infinite;
}

/* CRT screen */
.crt {
  position: relative;
  background: #000;
  border: 10px solid #08040f;
  border-radius: 14px;
  box-shadow:
    inset 0 0 40px rgba(59, 255, 157, 0.10),
    inset 0 0 8px rgba(0, 0, 0, 0.9),
    0 0 0 3px #241640;
  overflow: hidden;
}
#game {
  display: block;
  background: #000;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.scanlines {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.28) 0px, rgba(0, 0, 0, 0.28) 1px,
    transparent 1px, transparent 3px
  );
  mix-blend-mode: multiply;
}
.scanlines::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
}

/* overlay (attract mode) */
#overlay {
  position: absolute; inset: 0; z-index: 3;
  background: rgba(2, 0, 8, 0.86);
  display: flex; align-items: center; justify-content: center;
}
#overlay-inner { text-align: center; padding: 20px; }
#overlay-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  color: var(--neon-yellow);
  text-shadow: 0 0 10px var(--neon-yellow);
  margin-bottom: 16px;
}
.blink-slow { animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
#overlay-sub { color: #b9a8e8; font-size: 19px; line-height: 1.6; margin-bottom: 22px; letter-spacing: 1px; }

.coin-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  color: #000;
  background: linear-gradient(180deg, #ffd94d 0%, var(--amber) 100%);
  border: 3px solid #fff;
  box-shadow: 4px 4px 0 #7c4a00, 4px 4px 0 3px #000, 0 0 24px rgba(255, 177, 59, 0.5);
  padding: 15px 20px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 12px;
}
.coin-btn:hover:not(:disabled) { background: linear-gradient(180deg, #ffe98a 0%, #ffc86a 100%); }
.coin-btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #7c4a00, 1px 1px 0 2px #000; }
.coin-btn:disabled { opacity: 0.4; cursor: default; }
.coin-slot {
  width: 8px; height: 22px;
  background: #000;
  border: 2px solid #6d5200;
  border-radius: 2px;
}

#status {
  margin-top: 16px;
  font-size: 18px;
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(43, 255, 242, 0.6);
  min-height: 22px;
  letter-spacing: 1px;
}

/* control deck */
.control-deck {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px;
  padding: 10px 18px;
  background: linear-gradient(180deg, #2a0d45 0%, #160530 100%);
  border: 3px solid #000;
  border-radius: 6px;
  box-shadow: inset 0 2px 0 #5a2a80;
}
.joystick { position: relative; width: 40px; height: 40px; }
.joystick .stick {
  position: absolute; left: 17px; bottom: 4px;
  width: 6px; height: 26px;
  background: linear-gradient(90deg, #666, #222);
  border-radius: 3px;
}
.joystick .ball {
  position: absolute; left: 8px; top: -6px;
  width: 24px; height: 24px;
  background: radial-gradient(circle at 35% 30%, #ff8a8a 0%, #e00 40%, #700 100%);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}
.deck-label { font-size: 15px; color: #6a5a95; letter-spacing: 2px; }
.deck-buttons { display: flex; gap: 10px; }
.arcade-btn {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid #000;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.45), inset 0 3px 2px rgba(255,255,255,0.5);
}
.arcade-btn.red { background: #e02020; }
.arcade-btn.yellow { background: var(--neon-yellow); }

/* ============ side panels ============ */
#sidebar { display: flex; flex-direction: column; gap: 20px; width: 280px; }

.panel {
  background: #0d0522;
  border: 4px solid var(--neon-cyan);
  outline: 3px solid #000;
  box-shadow: 0 0 18px rgba(43, 255, 242, 0.25), inset 0 0 30px rgba(43, 255, 242, 0.05);
  padding: 16px;
}
.panel h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(43, 255, 242, 0.7);
  margin-bottom: 12px;
  text-align: center;
  letter-spacing: 1px;
}
.big {
  font-size: 34px;
  color: var(--screen-green);
  text-shadow: 0 0 12px rgba(59, 255, 157, 0.7);
  text-align: center;
}

#odds-table { width: 100%; border-collapse: collapse; font-size: 20px; }
#odds-table th {
  text-align: left; color: #8a7fb0;
  font-family: 'Press Start 2P', monospace; font-size: 9px;
  padding-bottom: 8px;
}
#odds-table td { padding: 2px 0; border-top: 1px dashed #2a1a55; color: var(--amber); }
#odds-table td:last-child { text-align: right; color: #b9a8e8; }

.pot-banner {
  text-align: center;
  border: 3px double var(--neon-yellow);
  background: rgba(255, 225, 43, 0.05);
  box-shadow: 0 0 16px rgba(255, 225, 43, 0.2), inset 0 0 20px rgba(255, 225, 43, 0.05);
  padding: 10px 8px;
  margin-bottom: 12px;
}
.pot-banner span {
  display: block;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--neon-yellow);
  text-shadow: 0 0 8px rgba(255, 225, 43, 0.7);
  letter-spacing: 1px;
}
.pot-banner b {
  display: block;
  font-size: 28px;
  color: var(--screen-green);
  text-shadow: 0 0 12px rgba(59, 255, 157, 0.7);
  margin: 4px 0 2px;
}
.pot-banner small { color: #8a7fb0; font-size: 14px; }

.hs-game {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--amber);
  text-shadow: 0 0 6px rgba(255, 177, 59, 0.5);
  margin: 10px 0 6px;
  letter-spacing: 1px;
}
.hs-game:first-child { margin-top: 0; }
.hs-list {
  list-style: none;
  counter-reset: hs;
  font-size: 19px;
}
.hs-list li {
  counter-increment: hs;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  border-top: 1px dashed #2a1a55;
}
.hs-list li::before {
  content: counter(hs) '.';
  color: #667;
  min-width: 18px;
}
.hs-list li b { flex: 1; color: var(--neon-cyan); }
.hs-list li span { color: var(--screen-green); }
.hs-list li:first-child b { color: var(--neon-yellow); text-shadow: 0 0 8px rgba(255, 225, 43, 0.6); }
.hs-empty { font-size: 16px; margin-bottom: 4px; }
.hs-reset { font-size: 13px; margin-top: 10px; text-align: center; }

#wins-list { list-style: none; font-size: 19px; }
#wins-list li { padding: 5px 0; border-top: 1px dashed #2a1a55; }
#wins-list li:first-child { border-top: none; }
#wins-list b { color: var(--screen-green); text-shadow: 0 0 8px rgba(59, 255, 157, 0.5); }

/* ============ carpet footer ============ */
footer { margin-top: 34px; }
.carpet {
  height: 46px;
  border-top: 3px solid #000;
  background:
    linear-gradient(135deg, var(--neon-pink) 25%, transparent 25%),
    linear-gradient(225deg, var(--neon-pink) 25%, transparent 25%),
    linear-gradient(315deg, var(--neon-cyan) 25%, transparent 25%),
    linear-gradient(45deg, var(--neon-cyan) 25%, transparent 25%),
    repeating-linear-gradient(90deg, #2a0d45 0 20px, #1c0533 20px 40px);
  background-size: 40px 40px, 40px 40px, 40px 40px, 40px 40px, auto;
  opacity: 0.55;
}

/* ============ prize modal ============ */
#prize-modal {
  position: fixed; inset: 0; z-index: 10;
  background: rgba(2, 0, 10, 0.9);
  display: flex; align-items: center; justify-content: center;
}
#prize-box {
  background: #0d0522;
  border: 4px solid var(--neon-yellow);
  outline: 3px solid #000;
  box-shadow: 0 0 50px rgba(255, 225, 43, 0.4), inset 0 0 40px rgba(255, 225, 43, 0.05);
  padding: 40px 60px;
  text-align: center;
}
#prize-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  letter-spacing: 3px;
  color: #b9a8e8;
}
#prize-amount {
  font-family: 'Press Start 2P', monospace;
  font-size: 52px;
  margin: 24px 0;
}
#prize-amount.rolling { color: var(--neon-cyan); text-shadow: 0 0 20px rgba(43, 255, 242, 0.8); }
#prize-amount.won { color: var(--screen-green); text-shadow: 0 0 24px rgba(59, 255, 157, 0.8); animation: blink 0.5s steps(1) 4; }
#prize-amount.lost { color: #5a4a85; }
#prize-detail { color: #b9a8e8; font-size: 20px; margin-bottom: 26px; }

/* ============ prize room ============ */
.prize-neon {
  text-shadow:
    0 0 6px var(--neon-cyan),
    0 0 18px var(--neon-cyan),
    0 0 40px var(--neon-cyan),
    3px 3px 0 #0a3a3a;
}
.back-btn { text-decoration: none; display: inline-block; }

#prize-room {
  display: flex; flex-direction: column; gap: 22px;
  width: 100%; max-width: 560px;
}

.counter-sign {
  text-align: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  color: var(--neon-yellow);
  text-shadow: 0 0 10px var(--neon-yellow);
  padding: 14px;
  border: 3px dashed #6d5200;
  background: rgba(255, 225, 43, 0.04);
}

.room-panel h2 { margin-bottom: 14px; }
#room-status { text-align: center; margin-bottom: 12px; font-size: 19px; color: var(--neon-cyan); }

#ticket-list, #redeemed-list { display: flex; flex-direction: column; gap: 14px; }

.ticket {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "no btn" "prize btn" "meta btn";
  align-items: center;
  gap: 2px 16px;
  background:
    radial-gradient(circle 5px at 0 50%, #0d0522 98%, transparent) left center / 10px 18px repeat-y,
    radial-gradient(circle 5px at 100% 50%, #0d0522 98%, transparent) right center / 10px 18px repeat-y,
    linear-gradient(135deg, #b8860b 0%, #ffd94d 30%, #ffb13b 60%, #8a6508 100%);
  border: 3px solid #000;
  padding: 14px 24px;
  color: #241600;
}
.ticket-no { grid-area: no; font-family: 'Press Start 2P', monospace; font-size: 9px; letter-spacing: 1px; }
.ticket-prize { grid-area: prize; font-family: 'Press Start 2P', monospace; font-size: 20px; }
.ticket-prize small { font-size: 10px; }
.ticket-meta { grid-area: meta; font-size: 16px; opacity: 0.75; }
.redeem-btn { grid-area: btn; font-size: 10px; padding: 10px 12px; }

.ticket.redeemed { filter: grayscale(0.7) brightness(0.7); }
.ticket-stamp {
  grid-area: btn;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #7c0a0a;
  border: 3px solid #7c0a0a;
  padding: 6px 8px;
  transform: rotate(-12deg);
  background: rgba(255, 255, 255, 0.25);
}
.ticket.just-redeemed { animation: stamp-in 0.3s ease-out; }
@keyframes stamp-in { 0% { transform: scale(1.04); } 100% { transform: scale(1); } }

/* header nav link on the arcade page */
.room-link {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--neon-yellow);
  text-shadow: 0 0 8px rgba(255, 225, 43, 0.7);
  text-decoration: none;
  padding: 12px 6px;
}
.room-link:hover { text-decoration: underline; }

/* ============ mobile d-pad ============ */
#dpad {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(3, 58px);
  grid-template-rows: repeat(3, 58px);
  touch-action: none;
  opacity: 0.94;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.7));
}
#dpad button {
  font-size: 20px;
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(43, 255, 242, 0.8);
  background: linear-gradient(180deg, #2a0d45 0%, #12062b 100%);
  border: 3px solid #000;
  box-shadow: inset 0 3px 0 #5a2a80, inset 0 -4px 0 rgba(0, 0, 0, 0.5);
  padding: 0;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
#dpad button:active {
  background: #3a1f60;
  box-shadow: inset 0 -3px 0 #5a2a80, inset 0 4px 0 rgba(0, 0, 0, 0.5);
}
#dpad [data-dir="up"]    { grid-area: 1 / 2; border-radius: 10px 10px 0 0; }
#dpad [data-dir="left"]  { grid-area: 2 / 1; border-radius: 10px 0 0 10px; }
#dpad .dpad-center       { grid-area: 2 / 2; background: linear-gradient(180deg, #2a0d45, #12062b); border-top: 3px solid #000; border-bottom: 3px solid #000; }
#dpad [data-dir="right"] { grid-area: 2 / 3; border-radius: 0 10px 10px 0; }
#dpad [data-dir="down"]  { grid-area: 3 / 2; border-radius: 0 0 10px 10px; }

/* invaders mode: left/right only, d-pad hugs the left, FIRE on the right */
#dpad.lr-only { left: 18px; transform: none; grid-template-rows: 58px; }
#dpad.lr-only [data-dir="up"], #dpad.lr-only [data-dir="down"] { display: none; }
#dpad.lr-only [data-dir="left"] { grid-area: 1 / 1; }
#dpad.lr-only .dpad-center { grid-area: 1 / 2; border: 3px solid #000; }
#dpad.lr-only [data-dir="right"] { grid-area: 1 / 3; }

#fire-btn {
  position: fixed;
  bottom: 14px;
  right: 18px;
  z-index: 8;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: #fff;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
  background: radial-gradient(circle at 35% 30%, #ff6a6a 0%, #e02020 45%, #7c0a0a 100%);
  border: 4px solid #000;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.4), inset 0 4px 3px rgba(255, 255, 255, 0.4), 0 6px 16px rgba(0, 0, 0, 0.7);
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
#fire-btn:active { box-shadow: inset 0 6px 0 rgba(0, 0, 0, 0.4), 0 3px 8px rgba(0, 0, 0, 0.7); }

/* stop the page from panning/bouncing while steering the game */
#game, .crt { touch-action: none; }
body { overscroll-behavior: none; }
body.playing { overflow: hidden; touch-action: none; }
body.playing main { touch-action: none; }

/* ============ responsive ============ */
@media (max-width: 860px) {
  .neon-title { font-size: 18px; }
  #sidebar { width: 100%; max-width: 500px; }
  #prize-box { padding: 30px 24px; }
  #prize-amount { font-size: 36px; }
  #overlay-inner { padding: 8px; }
  #overlay-title { font-size: 13px; margin-bottom: 10px; }
  #overlay-sub { font-size: 16px; line-height: 1.45; margin-bottom: 14px; }
  .coin-btn { font-size: 11px; padding: 12px 14px; gap: 8px; }
  #status { font-size: 15px; margin-top: 10px; }
}
