/* Lucky Strike Pokies — upright club cabinet chrome
   Original CSS art · Play credits only — no real money gambling. */

:root {
  --felt: #0a2f24;
  --felt-deep: #061a14;
  --carpet: #3a1810;
  --chrome: #c8d0dc;
  --chrome-hi: #f4f7fb;
  --chrome-lo: #6a7384;
  --gold: #ffd700;
  --gold-lo: #a67c00;
  --neon: #ffd700;
  --neon-pink: #ff2d55;
  --neon-cyan: #00e8ff;
  --panel: #141820;
  --panel-2: #1c2430;
  --cabinet: #1a1014;
  --cabinet-hi: #2e1c24;
  --text: #f5f7fa;
  --muted: #8b95a5;
  --win: #39ff14;
  --led: #ff3b30;
  --radius: 12px;
  --punch: 0px;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Hide Netlify deploy badge so it doesn't cover the cash panel */
body > a[href*="netlify"],
body > div[style*="position: fixed"][style*="bottom"] a[href*="netlify"],
iframe[src*="netlify"],
[data-netlify-badge],
a#netlify-badge,
.netlify-badge {
  display: none !important;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: #120808;
}

/* Disclaimer — always visible */
.disclaimer-bar {
  flex: 0 0 auto;
  text-align: center;
  padding: 6px 12px;
  font-size: clamp(11px, 2.8vw, 13px);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #1a1200;
  background: linear-gradient(90deg, #ffd700, #ffec8b, #ffd700);
  border-bottom: 2px solid #b8860b;
  z-index: 50;
}

/* Club carpet / felt floor behind cabinet */
.club-floor {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(80, 20, 30, 0.35), transparent 55%),
    repeating-linear-gradient(
      90deg,
      #2a100c 0px,
      #2a100c 18px,
      #24100e 18px,
      #24100e 36px
    ),
    linear-gradient(180deg, #1a0c0a 0%, #0e0606 100%);
  padding: 6px 4px 10px;
  overflow: auto;
}

.app {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  width: 100%;
  min-height: 0;
}

/* ─── UPRIGHT CABINET ─── */
.cabinet {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  position: relative;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
}

.cabinet.punch {
  animation: punch 0.35s ease-out;
}
@keyframes punch {
  0% { transform: translate(0, 0) scale(1); }
  20% { transform: translate(calc(var(--punch) * -1), calc(var(--punch) * 0.5)) scale(1.008); }
  40% { transform: translate(var(--punch), calc(var(--punch) * -0.4)) scale(0.996); }
  100% { transform: translate(0, 0) scale(1); }
}

.cab-pillar {
  width: clamp(10px, 2.8vw, 18px);
  flex: 0 0 auto;
  border-radius: 6px;
  background:
    linear-gradient(90deg,
      #8a929e 0%,
      #e8eef6 18%,
      #a8b0bc 35%,
      #f8fbff 50%,
      #9098a4 68%,
      #c8d0dc 85%,
      #6a7280 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 0 12px rgba(255, 215, 0, 0.12);
  position: relative;
}
.cab-pillar::before {
  content: '';
  position: absolute;
  inset: 8% 22%;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 10px,
    rgba(0, 0, 0, 0.12) 10px 12px
  );
  border-radius: 2px;
  pointer-events: none;
}

.cab-body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, #3a2430 0%, #22141c 18%, #161018 55%, #120c10 100%);
  border: 2px solid #5a4850;
  border-left: none;
  border-right: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 180, 0.2),
    inset 0 -2px 8px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

/* ─── MARQUEE / TOPPER ─── */
.marquee {
  flex: 0 0 auto;
  position: relative;
  padding: 6px 10px 8px;
  background:
    linear-gradient(180deg, #5a2030 0%, #2a1018 60%, #1a0c10 100%);
  border-bottom: 3px solid var(--gold-lo);
  box-shadow:
    inset 0 0 40px rgba(255, 45, 85, 0.25),
    0 4px 16px rgba(0, 0, 0, 0.4);
}

.marquee-title {
  text-align: center;
  padding: 2px 48px 0;
}

.logo {
  font-size: clamp(1.05rem, 4.5vw, 1.55rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fffef0, #ffd700 40%, #c9a000 70%, #ffe566);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.55));
  line-height: 1.05;
  animation: marqueePulse 3.2s ease-in-out infinite;
}
.logo span {
  display: block;
  font-size: 0.48em;
  letter-spacing: 0.32em;
  color: var(--neon-cyan);
  -webkit-text-fill-color: var(--neon-cyan);
  background: none;
  filter: drop-shadow(0 0 8px rgba(0, 232, 255, 0.6));
  opacity: 0.95;
}
@keyframes marqueePulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4)); }
  50% { filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.85)); }
}

.marquee-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 5px;
  z-index: 2;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 0, 0.45);
  background: radial-gradient(circle at 30% 30%, #3a3040, #121018);
  color: var(--neon);
  font-size: 0.9rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 0 #000, inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform 0.12s;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn.muted { opacity: 0.45; }

.marquee-lights {
  display: flex;
  justify-content: space-between;
  gap: 3px;
  padding: 0 4px;
  margin-bottom: 3px;
}
.marquee-lights-b { margin: 4px 0 0; margin-bottom: 0; }
.marquee-lights span {
  flex: 1;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff6a0, #ffd700 45%, #a06000);
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.7);
  animation: bulbPulse 1.6s ease-in-out infinite;
  opacity: 0.85;
}
.marquee-lights span:nth-child(odd) { animation-delay: 0.4s; }
.marquee-lights span:nth-child(3n) { animation-delay: 0.8s; }
.marquee-lights-b span { animation-delay: 0.2s; }
.marquee-lights-b span:nth-child(even) { animation-delay: 0.9s; }
@keyframes bulbPulse {
  0%, 100% { opacity: 0.45; box-shadow: 0 0 3px rgba(255, 215, 0, 0.3); }
  50% { opacity: 1; box-shadow: 0 0 10px rgba(255, 215, 0, 0.9); }
}

/* ─── TOP METER STRIP (CREDITS dominant) ─── */
.meter-strip {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 6px;
  padding: 6px 8px 6px;
  background: linear-gradient(180deg, #1a1e24 0%, #0c1016 100%);
  border-bottom: 2px solid #3a4048;
  position: relative;
  z-index: 1;
}

.meter {
  background: #050608;
  border: 2px solid #3a4048;
  border-radius: 4px;
  padding: 4px 6px 5px;
  text-align: center;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.85);
}
.meter label {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #6a7380;
  margin-bottom: 2px;
  font-weight: 800;
}
.led-display {
  background: #0a0505;
  border-radius: 2px;
  padding: 3px 4px;
  box-shadow: inset 0 0 10px rgba(255, 40, 40, 0.12);
}
.meter .value {
  font-variant-numeric: tabular-nums;
  font-family: "Courier New", "Lucida Console", monospace;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* CREDITS — largest, top-left glass LED */
.meter-credits {
  border-color: #5a3030;
  box-shadow:
    inset 0 0 16px rgba(255, 40, 30, 0.18),
    0 0 12px rgba(255, 50, 40, 0.15);
  padding: 6px 8px 7px;
}
.meter-credits label {
  color: #c07070;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
}
.meter-credits .value {
  font-size: clamp(1.45rem, 6.5vw, 2.15rem);
  color: #ff4a3a;
  text-shadow:
    0 0 8px rgba(255, 50, 40, 0.95),
    0 0 18px rgba(255, 40, 30, 0.5);
  line-height: 1.1;
}
.meter-credits.ticking .value {
  animation: creditTickFlash 0.12s ease;
}
@keyframes creditTickFlash {
  0% { filter: brightness(1.6); }
  100% { filter: brightness(1); }
}

.meter-row-side {
  display: grid;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 4px;
}
.meter-row-side .meter { padding: 2px 4px 3px; }
.meter-row-side .value {
  font-size: clamp(0.78rem, 2.8vw, 1rem);
}
.meter-bet .value {
  color: #ffd700;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.85), 0 0 12px rgba(255, 180, 0, 0.4);
}
.meter-win .value {
  color: #39ff14;
  text-shadow: 0 0 6px rgba(57, 255, 20, 0.9), 0 0 12px rgba(40, 220, 20, 0.45);
}
.meter-bank .value {
  color: #7ec8ff;
  text-shadow: 0 0 6px rgba(100, 180, 255, 0.7);
  font-size: clamp(0.72rem, 2.5vw, 0.92rem) !important;
}

/* ─── SCREEN BEZEL ─── */
.screen-bezel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 8px 5px;
  background:
    linear-gradient(180deg, #2a3038 0%, #12161c 30%, #0a0c10 100%);
  border: 3px solid #7a8494;
  border-radius: 4px;
  margin: 6px 6px 0;
  box-shadow:
    inset 0 0 0 1px #c8d0dc,
    inset 0 0 24px rgba(0, 0, 0, 0.6),
    0 0 0 1px #3a4048;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.feature-banner {
  text-align: center;
  padding: 5px;
  background: linear-gradient(90deg, #ff2d55, #ff6b35, #ff2d55);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  flex: 0 0 auto;
}
@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Attract when credits = 0 */
.attract-banner {
  flex: 0 0 auto;
  text-align: center;
  padding: 7px 8px;
  background: linear-gradient(90deg, #1a2808, #2a4010, #1a2808);
  border: 1px solid #4a7020;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.attract-banner[hidden] { display: none !important; }
/* Avoid double "INSERT CASH" — attract banner already says it */
.attract-banner:not([hidden]) ~ .win-message {
  visibility: hidden;
  min-height: 0;
  height: 0;
  padding: 0;
  overflow: hidden;
}
.attract-pulse {
  font-weight: 900;
  letter-spacing: 0.14em;
  font-size: clamp(0.85rem, 3.2vw, 1.05rem);
  color: #9cff4a;
  text-shadow: 0 0 12px rgba(100, 255, 40, 0.7);
  animation: attractBlink 1.4s ease-in-out infinite;
}
.attract-rate {
  font-size: 0.65rem;
  color: #8aaa70;
  letter-spacing: 0.06em;
  font-weight: 600;
}
@keyframes attractBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Glass reel window — must stay inside bezel; never overlap button deck */
.glass-window {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(42vh, 320px);
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.payline-rail {
  width: 14px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  background: linear-gradient(90deg, #1a1e24, #0c0e12);
  border: 1px solid #3a4048;
}
.payline-rail i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #ff2d55 50%, #7a0018);
  box-shadow: 0 0 6px rgba(255, 45, 85, 0.7);
  transition: box-shadow 0.2s, transform 0.2s;
}
.payline-rail.lit i {
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.95), 0 0 4px #ffd700;
  transform: scale(1.15);
  background: radial-gradient(circle at 35% 35%, #fff, #ffd700 50%, #a67c00);
}
.payline-rail-l { border-radius: 6px 0 0 6px; border-right: none; }
.payline-rail-r { border-radius: 0 6px 6px 0; border-left: none; }

.reels-wrap {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
  border: 2px solid #1a1008;
  background: #041810;
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 215, 0, 0.25),
    0 0 20px rgba(0, 40, 20, 0.4);
}

#reels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  min-height: 0;
}

.glass-reflection {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      115deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.04) 22%,
      transparent 40%,
      transparent 70%,
      rgba(255, 255, 255, 0.05) 100%
    );
  z-index: 3;
}
.glass-vignette {
  pointer-events: none;
  position: absolute;
  inset: 0;
  box-shadow:
    inset 0 18px 28px rgba(0, 0, 0, 0.55),
    inset 0 -18px 28px rgba(0, 0, 0, 0.5),
    inset 20px 0 24px rgba(0, 0, 0, 0.25),
    inset -20px 0 24px rgba(0, 0, 0, 0.25);
  z-index: 2;
}
.glass-lamp {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 220, 160, 0.08), transparent 55%);
  z-index: 2;
  mix-blend-mode: screen;
}

#line-trace {
  pointer-events: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  overflow: visible;
}
#line-trace path {
  fill: none;
  stroke: #ffd700;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px #ffd700);
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: lineDraw 0.55s ease-out forwards;
}
@keyframes lineDraw {
  to { stroke-dashoffset: 0; }
}

#fx-layer {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 4;
}

.coin {
  position: absolute;
  bottom: 20%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff6a0, #ffd700 50%, #b8860b);
  box-shadow: 0 0 6px #ffd700;
  animation: coinFly var(--dur, 1s) ease-out var(--delay, 0s) forwards;
}
@keyframes coinFly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), -180px) scale(0.4); opacity: 0; }
}

.win-message {
  text-align: center;
  min-height: 1.35em;
  font-weight: 800;
  font-size: clamp(0.78rem, 2.6vw, 0.95rem);
  color: var(--gold);
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
  flex: 0 0 auto;
  padding: 2px 0;
}

/* ─── BUTTON DECK ─── */
.button-deck {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 8px 6px;
  margin: 0 6px;
  background:
    linear-gradient(180deg, #3a4048 0%, #1e2228 40%, #14181e 100%);
  border: 2px solid #8a929e;
  border-top: 3px solid #c8d0dc;
  border-radius: 0 0 6px 6px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 0 #0a0c10;
  position: relative;
  z-index: 2;
}

.bet-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.adj {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0c1016;
  border: 1px solid #4a5460;
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5);
}
.adj .adj-label {
  flex: 1;
  text-align: center;
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.adj .adj-label strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
}
.adj button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #8a929e;
  background: radial-gradient(circle at 35% 30%, #5a6575, #2a3038);
  color: var(--gold);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 0 #0a0c10, inset 0 1px 0 rgba(255,255,255,0.25);
}
.adj button:disabled { opacity: 0.35; cursor: not-allowed; }
.adj button:not(:disabled):active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #0a0c10;
}

.action-row {
  display: grid;
  grid-template-columns: minmax(56px, 1fr) minmax(88px, 1.8fr) minmax(56px, 1fr) minmax(56px, 1fr);
  gap: 7px;
  align-items: center;
}

.btn {
  border: none;
  border-radius: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-transform: uppercase;
  transition: transform 0.1s, filter 0.1s;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:not(:disabled):active { transform: scale(0.96) translateY(1px); }

.btn-spin {
  background:
    radial-gradient(circle at 50% 30%, #ffe566, transparent 55%),
    linear-gradient(180deg, #ffe566, #ffb700 40%, #c07000);
  color: #1a1000;
  font-size: clamp(1.05rem, 4vw, 1.4rem);
  padding: 12px 8px;
  border-radius: 999px;
  min-height: 52px;
  width: 100%;
  box-shadow:
    0 5px 0 #6a4000,
    0 0 22px rgba(255, 215, 0, 0.45),
    inset 0 2px 0 rgba(255, 255, 255, 0.45);
  border: 3px solid #fff6a0;
}
.btn-spin:not(:disabled):hover { filter: brightness(1.08); }

.btn-max {
  background: linear-gradient(180deg, #ff6b8a, #c01838);
  color: #fff;
  padding: 10px 6px;
  font-size: 0.68rem;
  border-radius: 10px;
  box-shadow: 0 3px 0 #6a0820, inset 0 1px 0 rgba(255,255,255,0.3);
  border: 1px solid #ff8aa0;
  line-height: 1.15;
  min-height: 52px;
  width: 100%;
}

.btn-collect {
  background: linear-gradient(180deg, #3d6a40, #1a301c);
  color: #b8f5c0;
  border: 1px solid #4a8a50;
  padding: 10px 6px;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  box-shadow: 0 3px 0 #0a180c, inset 0 1px 0 rgba(255,255,255,0.15);
  min-height: 52px;
  width: 100%;
}

.btn-turbo {
  background: linear-gradient(180deg, #2a3544, #12181f);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 232, 255, 0.45);
  padding: 10px 6px;
  font-size: 0.62rem;
  box-shadow: 0 3px 0 #05070a, inset 0 1px 0 rgba(255,255,255,0.1);
  min-height: 52px;
  width: 100%;
}
.btn-turbo.active {
  background: rgba(0, 232, 255, 0.18);
  box-shadow: 0 0 14px rgba(0, 232, 255, 0.45), 0 3px 0 #05070a;
}

.secondary-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-ghost {
  background: transparent;
  border: 1px solid #4a5460;
  color: var(--muted);
  padding: 5px 14px;
  font-size: 0.7rem;
  border-radius: 999px;
}
.btn-ghost:hover { color: var(--text); border-color: var(--gold); }

/* ─── NOTE ACCEPTOR ─── */
.acceptor-panel {
  flex: 0 0 auto;
  margin: 6px 6px 8px;
  padding: 8px 10px 10px;
  border-radius: 6px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(40, 80, 40, 0.35), transparent 55%),
    linear-gradient(180deg, #1e2820 0%, #101610 100%);
  border: 2px solid #3a5040;
  box-shadow:
    inset 0 0 20px rgba(0, 0, 0, 0.4),
    0 2px 0 #0a0608;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.acceptor-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.acceptor-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
  font-size: clamp(0.75rem, 2.8vw, 0.9rem);
  color: #b8f5c0;
}
.acceptor-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2a4a2a;
  box-shadow: inset 0 0 4px #000;
  transition: background 0.15s, box-shadow 0.15s;
}
.acceptor-led.on {
  background: #39ff14;
  box-shadow: 0 0 10px #39ff14, 0 0 4px #9cff4a;
  animation: ledPulse 0.35s ease;
}
.acceptor-led.busy {
  background: #ffd700;
  box-shadow: 0 0 10px #ffd700;
  animation: ledPulse 0.2s ease infinite;
}
@keyframes ledPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.acceptor-rate {
  font-size: 0.65rem;
  color: #7a9a7a;
  letter-spacing: 0.04em;
}
.acceptor-rate strong { color: #ffd700; }

.bill-slot-wrap {
  height: 28px;
  margin-bottom: 8px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bill-slot {
  width: min(220px, 70%);
  height: 14px;
  background: #050805;
  border: 2px solid #4a6050;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 3px 8px rgba(0,0,0,0.8);
}
.bill-guide {
  position: absolute;
  inset: 3px 8%;
  border-top: 1px dashed #2a3a2a;
  opacity: 0.6;
}
.bill-note {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 36px;
  margin-left: -36px;
  margin-top: -18px;
  background:
    linear-gradient(135deg, #1a5a3a 0%, #2a8a50 40%, #1a6a40 100%);
  border: 1px solid #8affb0;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(48px) scale(0.85);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.bill-note.feeding {
  animation: billFeed 0.85s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes billFeed {
  0% { transform: translateY(48px) scale(0.9); opacity: 0; }
  18% { transform: translateY(10px) scale(1); opacity: 1; }
  45% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-28px) scale(0.7); opacity: 0; }
}
.bill-denom {
  font-weight: 900;
  font-size: 0.95rem;
  color: #e8ffe8;
  letter-spacing: 0.04em;
  line-height: 1;
}
.bill-tag {
  font-size: 0.4rem;
  letter-spacing: 0.12em;
  color: #a0e8b8;
  font-weight: 700;
}

.bill-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.bill-btn {
  appearance: none;
  border: 2px solid #4a8a58;
  border-radius: 8px;
  padding: 10px 4px;
  font-weight: 900;
  font-size: clamp(0.85rem, 3.2vw, 1.05rem);
  letter-spacing: 0.02em;
  cursor: pointer;
  color: #e8ffe8;
  background:
    linear-gradient(180deg, #2a5a38 0%, #1a3824 100%);
  box-shadow:
    0 3px 0 #0a1a10,
    inset 0 1px 0 rgba(255,255,255,0.18);
  transition: transform 0.1s, filter 0.1s, border-color 0.15s;
}
.bill-btn:hover:not(:disabled) {
  filter: brightness(1.12);
  border-color: #7aff9a;
}
.bill-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0a1a10;
}
.bill-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.bill-btn[data-dollars="50"] {
  border-color: #8a6a20;
  background: linear-gradient(180deg, #5a4820 0%, #3a3010 100%);
  color: #ffe8a0;
}

.acceptor-foot {
  margin-top: 7px;
  text-align: center;
  font-size: 0.6rem;
  color: #6a7a6a;
  letter-spacing: 0.03em;
  line-height: 1.35;
}

/* ─── COLLECT VOUCHER ─── */
.voucher-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: grid;
  place-items: center;
  z-index: 90;
  padding: 20px;
}
.voucher-overlay[hidden] { display: none !important; }

.voucher {
  width: min(320px, 92vw);
  background:
    repeating-linear-gradient(
      0deg,
      #f5f0e0 0px,
      #f5f0e0 14px,
      #efe8d4 14px,
      #efe8d4 28px
    );
  color: #1a1408;
  border: 2px dashed #8a7040;
  border-radius: 4px;
  padding: 18px 16px 14px;
  text-align: center;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  animation: voucherPrint 0.55s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes voucherPrint {
  0% { transform: translateY(-40%) scaleY(0.3); opacity: 0; }
  60% { transform: translateY(4%) scaleY(1.02); opacity: 1; }
  100% { transform: translateY(0) scaleY(1); }
}
.voucher-perf {
  position: absolute;
  top: -1px;
  left: 8px;
  right: 8px;
  height: 8px;
  background:
    radial-gradient(circle, transparent 3px, #1a0a08 3.5px) 0 0 / 12px 8px;
  opacity: 0.35;
}
.voucher-brand {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #6a5020;
  margin-bottom: 8px;
}
.voucher-amount {
  font-size: 2.1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #1a4010;
  line-height: 1.1;
}
.voucher-credits {
  font-size: 0.85rem;
  color: #4a4030;
  margin: 4px 0 10px;
  font-weight: 600;
}
.voucher-stamp {
  display: inline-block;
  border: 2px solid #c01838;
  color: #c01838;
  font-weight: 900;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  transform: rotate(-3deg);
  margin-bottom: 10px;
}
.voucher-meta {
  font-size: 0.65rem;
  color: #7a6a50;
  margin-bottom: 12px;
  line-height: 1.4;
}
.voucher-ok {
  appearance: none;
  border: none;
  background: linear-gradient(180deg, #2a5a38, #1a3824);
  color: #e8ffe8;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 10px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
}

/* Toast */
#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(120%);
  background: rgba(10, 14, 20, 0.95);
  border: 1px solid var(--gold);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  max-width: 90vw;
  text-align: center;
  z-index: 100;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: grid;
  place-items: center;
  z-index: 80;
  padding: 16px;
}
.modal[hidden] { display: none !important; }
.modal-card {
  background: var(--panel);
  border: 2px solid var(--chrome);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  max-height: 85dvh;
  overflow: auto;
  padding: 18px;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.15);
}
.modal-card h2 {
  color: var(--gold);
  margin-bottom: 12px;
  font-size: 1.25rem;
}
.modal-card h3 {
  margin: 14px 0 8px;
  color: var(--neon-pink);
  font-size: 1rem;
}
.modal-close {
  float: right;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.pay-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.pay-table th, .pay-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #2a3340;
  text-align: center;
}
.pay-table th { color: var(--muted); font-weight: 600; }
.pay-table td:first-child, .pay-table th:first-child { text-align: left; }
.pay-note {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.disclaimer-inline {
  color: var(--gold) !important;
  font-weight: 700;
}
.scatter-list {
  padding-left: 1.2em;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
}
.info-body p { margin-bottom: 10px; font-size: 0.9rem; line-height: 1.45; color: #c8d0dc; }

/* Desktop — centred machine on carpet */
@media (min-width: 640px) {
  .club-floor {
    padding: 18px 20px 24px;
    background:
      radial-gradient(ellipse at 50% 45%, rgba(60, 16, 24, 0.4), transparent 50%),
      radial-gradient(ellipse at 50% 100%, #1a0808, #0a0404),
      repeating-linear-gradient(
        0deg,
        #2e1410 0px,
        #2e1410 2px,
        #261210 2px,
        #261210 28px
      );
  }
  .app { max-width: 520px; }
  .glass-window { max-height: min(42vh, 320px); }
  .cab-pillar { width: 20px; }
  .action-row { grid-template-columns: minmax(64px, 1fr) minmax(100px, 1.9fr) minmax(64px, 1fr) minmax(64px, 1fr); }
  .meter-strip { padding: 10px 10px 0; gap: 8px; }
}

@media (min-height: 860px) and (min-width: 500px) {
  .glass-window { max-height: min(46vh, 360px); }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .disclaimer-bar { padding: 3px; font-size: 10px; }
  .logo { font-size: 0.9rem; }
  .marquee { padding: 3px 8px 4px; }
  .marquee-lights span { height: 4px; }
  .meter-credits .value { font-size: 1.1rem; }
  .meter-row-side .value { font-size: 0.75rem; }
  .glass-window { max-height: 120px; min-height: 90px; }
  .btn-spin { padding: 8px; font-size: 1rem; min-height: 44px; }
  .acceptor-foot { display: none; }
  .bill-slot-wrap { height: 18px; margin-bottom: 4px; }
  .cab-pillar { width: 8px; }
  .attract-banner { padding: 4px; }
}

/* ─── VENUE JACKPOT / LOTTERY TODAY BOARD ─── */
.jackpot-board {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 6px 6px 0;
  padding: 7px 10px;
  border-radius: 6px;
  z-index: 5;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 215, 0, 0.22), transparent 55%),
    linear-gradient(180deg, #2a1a08 0%, #120c06 100%);
  border: 2px solid #a67c00;
  box-shadow:
    inset 0 0 24px rgba(255, 180, 0, 0.15),
    0 0 18px rgba(255, 180, 0, 0.2),
    0 2px 0 #0a0600;
  position: relative;
  overflow: hidden;
}
.jackpot-board::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: jpShine 4s linear infinite;
  pointer-events: none;
}
@keyframes jpShine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.jackpot-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 1;
}
.jackpot-tag {
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #c09040;
}
.jackpot-title {
  font-size: clamp(0.65rem, 2.4vw, 0.8rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #ffe8a0;
  text-shadow: 0 0 8px rgba(255, 200, 0, 0.5);
  white-space: nowrap;
}
.jackpot-meter {
  text-align: center;
  z-index: 1;
  min-width: 0;
}
.jackpot-value {
  display: block;
  font-family: "Courier New", "Lucida Console", monospace;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.15rem, 5.2vw, 1.75rem);
  color: #39ff14;
  text-shadow:
    0 0 10px rgba(57, 255, 20, 0.85),
    0 0 22px rgba(40, 200, 20, 0.45);
  letter-spacing: 0.04em;
  line-height: 1.1;
  transition: filter 0.12s;
}
.jackpot-board.ticking .jackpot-value {
  filter: brightness(1.35);
}
.jackpot-board.hit {
  animation: jpHit 0.8s ease;
}
@keyframes jpHit {
  0%, 100% { box-shadow: inset 0 0 24px rgba(255, 180, 0, 0.15), 0 0 18px rgba(255, 180, 0, 0.2); }
  30% { box-shadow: inset 0 0 40px rgba(57, 255, 20, 0.4), 0 0 40px rgba(57, 255, 20, 0.7); }
}
.jackpot-sub {
  display: block;
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #8a7040;
  margin-top: 2px;
}
.btn-rankings {
  appearance: none;
  border: 1px solid #c0a040;
  background: linear-gradient(180deg, #4a3810, #2a2008);
  color: #ffe8a0;
  font-weight: 800;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  padding: 8px 8px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 1;
  box-shadow: 0 2px 0 #0a0600, inset 0 1px 0 rgba(255,255,255,0.15);
  white-space: nowrap;
}
.btn-rankings:active { transform: translateY(1px); }

/* Rankings modal */
.rankings-card { max-width: 440px; }
.rankings-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 1.4;
}
.rankings-day {
  font-size: 0.72rem;
  color: #8a9a70;
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.rankings-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.rank-tab {
  appearance: none;
  border: 1px solid #4a5460;
  background: #12181f;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.rank-tab.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255, 215, 0, 0.1);
}
.rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.rank-table th, .rank-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #2a3340;
  text-align: left;
}
.rank-table th {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.rank-table td:last-child, .rank-table th:last-child { text-align: right; }
.rank-table tr.you {
  background: rgba(255, 215, 0, 0.1);
}
.rank-table tr.you td {
  color: var(--gold);
  font-weight: 800;
}
.rank-badge {
  display: inline-block;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}
.rank-badge.you {
  background: var(--gold);
  color: #1a1000;
  font-weight: 900;
}
.rank-badge.seed {
  background: #2a3340;
  color: #8b95a5;
  font-weight: 700;
}
.rank-pos {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  width: 1.5em;
}

@media (max-width: 400px) {
  .jackpot-board {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .jackpot-left { grid-column: 1; }
  .btn-rankings { grid-column: 2; grid-row: 1; }
  .jackpot-meter { grid-column: 1 / -1; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .jackpot-sub { display: none; }
  .jackpot-board { padding: 4px 8px; margin-top: 4px; }
  .jackpot-value { font-size: 1rem; }
}

/* ─── iPhone / narrow phones — reels + SPIN are the product ─── */
@media (max-width: 480px) {
  html, body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  }

  .disclaimer-bar {
    padding: 5px 8px;
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  .club-floor {
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .app {
    max-width: 100%;
    min-height: min-content;
  }

  .cabinet {
    filter: none; /* drop-shadow is costly + can confuse stacking on iOS */
    min-height: auto;
  }

  .cab-pillar {
    width: 7px;
  }

  .cab-body {
    overflow: visible;
  }

  .marquee {
    padding: 4px 6px 5px;
  }
  .marquee-title {
    padding: 2px 40px 0;
  }
  .logo {
    font-size: 1.05rem;
  }
  .marquee-lights span {
    height: 4px;
  }
  .icon-btn {
    width: 30px;
    height: 30px;
  }

  .jackpot-board {
    margin: 4px 4px 0;
    padding: 5px 7px;
    gap: 6px;
  }
  .jackpot-sub { display: none; }
  .jackpot-value {
    font-size: clamp(1.05rem, 6vw, 1.35rem);
  }
  .btn-rankings {
    padding: 6px 7px;
    font-size: 0.55rem;
  }

  .meter-strip {
    padding: 5px 6px;
    gap: 5px;
    grid-template-columns: 1.4fr 1fr;
  }
  .meter-credits .value {
    font-size: clamp(1.25rem, 7vw, 1.65rem);
  }
  .meter-row-side .value {
    font-size: clamp(0.75rem, 3.4vw, 0.95rem);
  }

  /* Bezel grows with reels; do not flex-crush them */
  .screen-bezel {
    flex: 0 0 auto;
    margin: 5px 4px 0;
    padding: 5px 5px 4px;
    overflow: visible;
  }

  .attract-banner {
    padding: 5px 6px;
  }
  .attract-pulse {
    font-size: 0.82rem;
    letter-spacing: 0.1em;
  }
  .attract-rate { display: none; }

  /*
   * Reels sized by WIDTH (readable symbols on iPhone).
   * aspect-ratio beats tiny vh caps that made spins unreadable.
   */
  .glass-window {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 168px;
    max-height: none;
    aspect-ratio: 5 / 3.2;
  }

  .reels-wrap,
  #reels {
    min-height: 0;
    height: 100%;
  }

  .payline-rail {
    width: 10px;
  }
  .payline-rail i {
    width: 7px;
    height: 7px;
  }

  .win-message {
    font-size: 0.78rem;
    min-height: 1.2em;
  }

  .button-deck {
    margin: 0 4px;
    padding: 7px 7px 8px;
    gap: 6px;
    position: sticky;
    bottom: 0;
    z-index: 6;
    border-radius: 0;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.25),
      0 -8px 20px rgba(0, 0, 0, 0.45),
      0 4px 0 #0a0c10;
  }

  .action-row {
    grid-template-columns: minmax(52px, 0.9fr) minmax(96px, 2fr) minmax(52px, 0.9fr) minmax(52px, 0.9fr);
    gap: 6px;
  }

  .btn-spin {
    min-height: 56px;
    font-size: 1.2rem;
    padding: 12px 6px;
  }
  .btn-max, .btn-collect, .btn-turbo {
    min-height: 56px;
    font-size: 0.58rem;
    padding: 8px 4px;
  }

  .adj button {
    width: 40px;
    height: 40px;
  }

  .secondary-row { display: none; }

  .acceptor-panel {
    margin: 5px 4px calc(8px + env(safe-area-inset-bottom));
    padding: 7px 8px 8px;
  }
  .acceptor-foot { display: none; }
  .bill-slot-wrap {
    height: 18px;
    margin-bottom: 5px;
  }
  .bill-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
  }
  .bill-btn {
    min-height: 40px;
    font-size: 0.85rem;
  }
}

/* Short phones (SE / large browser chrome) — keep reels readable, tighten chrome */
@media (max-width: 480px) and (max-height: 700px) {
  .marquee-lights { display: none; }
  .jackpot-board { margin-top: 2px; padding: 3px 6px; }
  .meter-strip { padding: 3px 5px; }
  .glass-window {
    min-height: 150px;
    aspect-ratio: 5 / 3.05;
  }
  .attract-banner { padding: 3px 5px; }
  .acceptor-panel .acceptor-rate { font-size: 0.58rem; }
}

/* Desktop / tablet keep previous height caps so cabinet fits viewport */
@media (min-width: 481px) and (max-height: 820px) {
  .marquee { padding: 4px 8px 5px; }
  .marquee-lights span { height: 5px; }
  .jackpot-sub { display: none; }
  .glass-window { max-height: min(36vh, 260px); }
  .secondary-row { display: none; }
  .acceptor-foot { font-size: 0.58rem; }
}

