/* ══════════════════════════════════════════════════════════════
   FIRST OCEAN LINERS · Casino · Ocean Luxury Edition
   Deep Blue · Gold · Glassmorphism · 60fps
   ══════════════════════════════════════════════════════════════ */

:root {
  /* ── Ocean Depth ── */
  --deep:        #020b17;
  --abyss:       #04101f;
  --midnight:    #061828;
  --navy:        #0a2444;
  --ocean:       #0d3a6e;

  /* ── Surfaces ── */
  --surface:     rgba(4, 14, 30, 0.93);
  --surface-2:   rgba(6, 22, 44, 0.90);
  --glass:       rgba(10, 36, 68, 0.35);
  --glass-b:     rgba(0, 119, 182, 0.18);
  --line:        rgba(0, 140, 200, 0.13);
  --line-gold:   rgba(201, 162, 39, 0.16);

  /* ── Gold · Luxury Champagne ── */
  --gold:        #c9a227;
  --gold-b:      #f0c842;
  --gold-pale:   rgba(201, 162, 39, 0.14);
  --gold-glow:   0 0 40px rgba(201, 162, 39, 0.30), 0 0 80px rgba(201, 162, 39, 0.12);

  /* ── Ocean Accents ── */
  --wave-deep:   #003d6b;
  --wave:        #0077b6;
  --teal:        #00b4d8;
  --teal-dim:    rgba(0, 180, 216, 0.22);
  --cyan:        #48cae4;
  --glow-teal:   0 0 36px rgba(0, 180, 216, 0.35);

  /* ── Text ── */
  --pearl:       #e8f4f8;
  --pearl-2:     rgba(232, 244, 248, 0.88);
  --muted:       rgba(140, 195, 220, 0.65);
  --muted-2:     rgba(140, 195, 220, 0.42);

  /* ── States ── */
  --win:         #4ade80;
  --win-glow:    0 0 24px rgba(74, 222, 128, 0.40);
  --bad:         #f87171;

  /* ── Layout ── */
  --r:           16px;
  --r2:          22px;
  --r3:          32px;
  --shadow:      0 28px 70px rgba(0, 0, 0, 0.65);
  --shadow-sm:   0 10px 28px rgba(0, 0, 0, 0.42);

  /* ── Typography ── */
  --f-display:   "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --f-serif:     "Cormorant Garamond", Georgia, serif;
  --f-mono:      "JetBrains Mono", ui-monospace, SF Mono, Menlo, monospace;

  /* ── Motion ── */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --fast:        0.14s;
  --normal:      0.28s;
  --slow:        0.50s;
}

/* ══════════════════════════════════
   RESET
   ══════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body {
  width: 100%; min-height: 100%; height: auto;
  font-family: var(--f-mono);
  color: var(--pearl);
  background: var(--deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(201, 162, 39, 0.28); color: var(--pearl); }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ══════════════════════════════════
   BACKGROUND — Deep Ocean
   ══════════════════════════════════ */
.bg-fixed, #bg-fixed {
  position: fixed; inset: 0; z-index: -999; pointer-events: none;
  background:
    radial-gradient(ellipse 130% 55% at 50% -5%,  rgba(0, 119, 182, 0.22), transparent 58%),
    radial-gradient(ellipse 65%  55% at 12% 55%,  rgba(0,  64, 128, 0.16), transparent 55%),
    radial-gradient(ellipse 80%  65% at 88% 80%,  rgba(0,  42,  92, 0.18), transparent 55%),
    radial-gradient(ellipse 100% 35% at 50% 42%,  rgba(201, 162, 39, 0.04), transparent 60%),
    linear-gradient(175deg, var(--abyss) 0%, var(--deep) 55%, #010810 100%);
}

/* Bioluminescence dots */
.bg-fixed::before, #bg-fixed::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 20%, rgba(0,200,255,0.09), transparent),
    radial-gradient(1px 1px at 30% 55%, rgba(0,200,255,0.07), transparent),
    radial-gradient(1px 1px at 52% 18%, rgba(0,190,255,0.08), transparent),
    radial-gradient(1px 1px at 70% 42%, rgba(0,200,255,0.06), transparent),
    radial-gradient(1px 1px at 88% 68%, rgba(0,200,255,0.09), transparent),
    radial-gradient(1.5px 1.5px at 22% 77%, rgba(201,162,39,0.07), transparent),
    radial-gradient(1px 1px at 63% 82%, rgba(0,200,255,0.06), transparent),
    radial-gradient(1.5px 1.5px at 44% 38%, rgba(201,162,39,0.06), transparent);
  background-size: 280px 280px;
  animation: bioFloat 65s linear infinite;
}

/* Deep current shimmer */
.bg-fixed::after, #bg-fixed::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(108deg,
    transparent 0%, rgba(0,119,182,0.05) 28%,
    transparent 55%, rgba(0,180,216,0.04) 80%, transparent 100%);
  animation: currentFlow 14s ease-in-out infinite alternate;
}

/* Light rays */
.bg-rays {
  position: absolute; inset: 0; pointer-events: none;
  background:
    conic-gradient(from 260deg at 50% -20%,
      transparent 0deg,
      rgba(0,119,182,0.06) 8deg, transparent 16deg,
      rgba(0,180,216,0.04) 28deg, transparent 36deg,
      rgba(201,162,39,0.03) 50deg, transparent 58deg
    );
  animation: raysRotate 40s linear infinite;
  opacity: 0.6;
}

.bubbles-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

@keyframes bioFloat     { 0% { transform: translate(0,0); } 100% { transform: translate(-280px,-280px); } }
@keyframes currentFlow  { 0% { opacity: 0.4; transform: translateX(-4%); } 100% { opacity: 1; transform: translateX(4%); } }
@keyframes raysRotate   { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ══════════════════════════════════
   WAVES — fixed bottom
   ══════════════════════════════════ */
.waves-outer {
  position: fixed; bottom: 0; left: 0;
  width: 100%; overflow: hidden;
  z-index: -1; pointer-events: none;
}

.wave { position: absolute; bottom: 0; left: 0; width: 200%; display: block; }

.wave--back  { height: 90px;  animation: waveScroll 16s linear infinite;        opacity: 0.28; }
.wave--mid   { height: 70px;  animation: waveScroll 10s linear infinite -5s;    opacity: 0.34; }
.wave--front { height: 55px;  animation: waveScroll  7s linear infinite -2.5s;  opacity: 0.42; }

.wave--back  path { fill: var(--wave-deep); }
.wave--mid   path { fill: var(--wave); }
.wave--front path { fill: var(--teal); }

@keyframes waveScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ══════════════════════════════════
   BOOT SCREEN
   ══════════════════════════════════ */
.boot {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--deep);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.boot.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.boot-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 52px 44px; max-width: 340px; width: 100%; text-align: center;
}

/* Logo mark */
.boot-logo {
  position: relative; width: 72px; height: 72px; margin-bottom: 4px;
  animation: logoFloat 3.2s ease-in-out infinite;
}
.boot-logo__ring {
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(201,162,39,0.30);
  animation: ringPulse 2.4s ease-in-out infinite;
}
.boot-logo__anchor {
  width: 100%; height: 100%; color: var(--gold);
  filter: drop-shadow(0 0 14px rgba(201,162,39,0.55));
}

@keyframes logoFloat { 0%,100%{ transform: translateY(0) rotate(0deg); } 50%{ transform: translateY(-10px) rotate(-3deg); } }
@keyframes ringPulse { 0%,100%{ opacity: 0.6; transform: scale(1); } 50%{ opacity: 0.25; transform: scale(1.12); } }

.boot-title {
  font-family: var(--f-display); font-weight: 800; font-size: 30px;
  letter-spacing: 0.13em; color: var(--pearl); line-height: 1;
}
.boot-subtitle {
  font-family: var(--f-serif); font-weight: 600; font-size: 12px;
  letter-spacing: 0.34em; color: var(--gold); text-transform: uppercase;
}
.boot-tagline {
  font-family: var(--f-serif); font-style: italic; font-size: 14px;
  color: var(--muted); letter-spacing: 0.04em; margin-top: 2px;
}

.boot-progress { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 10px; width: 100%; }
.boot-progress__track {
  width: 220px; height: 2px;
  background: rgba(255,255,255,0.07); border-radius: 2px; overflow: hidden;
}
.boot-progress__fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--wave), var(--gold-b));
  border-radius: 2px; transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(201,162,39,0.55);
}
.boot-progress__pct {
  font-family: var(--f-mono); font-size: 11px; color: var(--muted-2); letter-spacing: 0.06em;
}
.boot-hint {
  font-family: var(--f-mono); font-size: 10px;
  color: rgba(140,195,220,0.32); letter-spacing: 0.06em; text-transform: uppercase;
}

/* ══════════════════════════════════
   APP LAYOUT
   ══════════════════════════════════ */
.app { display: flex; flex-direction: column; min-height: 100svh; transition: opacity 0.3s ease; }
.app.hidden { opacity: 0; pointer-events: none; }

/* ══════════════════════════════════
   TOPBAR
   ══════════════════════════════════ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px 9px;
  background: rgba(3, 9, 20, 0.88);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid rgba(0,119,182,0.16);
  box-shadow: 0 1px 0 rgba(201,162,39,0.09), 0 4px 20px rgba(0,0,0,0.32);
  position: sticky; top: 0; z-index: 100;
}

/* Brand */
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark {
  width: 30px; height: 30px; color: var(--gold); flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(201,162,39,0.45));
}
.brand__ico { width: 100%; height: 100%; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: var(--f-display); font-weight: 700; font-size: 13.5px;
  letter-spacing: 0.11em; color: var(--pearl);
}
.brand__liner {
  font-family: var(--f-serif); font-weight: 600; font-size: 8.5px;
  letter-spacing: 0.30em; color: var(--gold); text-transform: uppercase;
}

/* Userbox */
.userbox { display: flex; align-items: center; gap: 8px; }
.pills   { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }

/* Pills */
.pill {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 10px 3px 7px; border-radius: 40px;
  font-family: var(--f-mono); font-size: 11px; line-height: 1; white-space: nowrap;
}
.pill--id  { background: rgba(0,64,128,0.22); border: 1px solid rgba(0,119,182,0.24); }
.pill--bal { background: rgba(201,162,39,0.10); border: 1px solid rgba(201,162,39,0.26); }
.pill__l { color: var(--muted-2); font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.pill__v { color: var(--pearl); font-weight: 600; }
.pill--bal .pill__v { color: var(--gold-b); }

.balance-value { transition: color 0.3s ease; }

/* Sound button */
.sound-btn {
  background: none; border: 1px solid rgba(0,119,182,0.20);
  border-radius: 50%; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 13px; color: var(--muted);
  transition: all var(--fast) ease; flex-shrink: 0;
}
.sound-btn:hover { border-color: var(--teal); color: var(--teal); background: rgba(0,180,216,0.09); }
.sound-btn.is-muted .sound-btn__on  { display: none; }
.sound-btn.is-muted .sound-btn__off { display: inline; }
.sound-btn:not(.is-muted) .sound-btn__off { display: none; }
.sound-btn:not(.is-muted) .sound-btn__on  { display: inline; }
.badge { display: none; }

/* ══════════════════════════════════
   LAYOUT
   ══════════════════════════════════ */
.main {
  display: flex; gap: 14px; padding: 14px;
  max-width: 680px; margin: 0 auto; width: 100%;
  flex: 1; align-items: flex-start;
  padding-bottom: 110px; /* space above waves */
}
.slot-wrap { flex: 1; min-width: 0; }
.side { width: 214px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 590px) {
  .main { flex-direction: column; padding: 10px; gap: 10px; }
  .side { width: 100%; }
}

/* ══════════════════════════════════
   SLOT CARD
   ══════════════════════════════════ */
.slot-card {
  background: var(--surface);
  border: 1px solid rgba(0,119,182,0.16);
  border-top: 1px solid rgba(201,162,39,0.22);
  border-radius: var(--r2);
  overflow: hidden;
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(201,162,39,0.09),
    inset 0 0 0 1px rgba(0,180,216,0.05);
}

/* Slot header */
.slot-head {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 20px 11px;
  border-bottom: 1px solid var(--line);
  background: rgba(0,30,60,0.25);
  position: relative;
}
.slot-head__title {
  font-family: var(--f-display); font-weight: 600; font-size: 15px;
  letter-spacing: 0.14em; color: var(--pearl); text-transform: uppercase;
}
.slot-head__wave {
  width: 44px; height: 13px; color: var(--gold); opacity: 0.65; flex-shrink: 0;
}
.slot-head__wave--r { transform: scaleX(-1); }
#btnInfo { display: none !important; }

/* ══════════════════════════════════
   MACHINE
   ══════════════════════════════════ */
.machine {
  position: relative; padding: 18px 14px 14px;
  display: flex; flex-direction: column; gap: 15px;
}
.machine__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 100% 55% at 50% 50%, transparent 45%, rgba(2,11,23,0.40) 100%);
  z-index: 0;
}
.machine__grid {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(0,119,182,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,119,182,0.04) 1px, transparent 1px);
  background-size: 30px 30px; opacity: 0.6;
}

/* ══════════════════════════════════
   REELS
   ══════════════════════════════════ */
.reels {
  display: flex; gap: 8px; z-index: 1; position: relative;
  justify-content: center;
}
.reel {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 5px; max-width: 108px;
}
.reel__window {
  width: 100%; aspect-ratio: 1; overflow: hidden;
  border-radius: 14px;
  background: rgba(2, 11, 23, 0.82);
  border: 1px solid rgba(0,119,182,0.28);
  box-shadow:
    inset 0 3px 10px rgba(0,0,0,0.55),
    inset 0 0 0 1px rgba(201,162,39,0.05),
    0 0 18px rgba(0,119,182,0.10);
  position: relative;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
/* Fade top/bottom edges */
.reel__window::before,
.reel__window::after {
  content: ""; position: absolute; left: 0; right: 0; height: 28%; z-index: 2; pointer-events: none;
}
.reel__window::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(2,11,23,0.92), transparent);
  border-radius: 14px 14px 0 0;
}
.reel__window::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(2,11,23,0.92), transparent);
  border-radius: 0 0 14px 14px;
}
.reel.reel--spinning .reel__window {
  border-color: rgba(0,180,216,0.48);
  box-shadow:
    inset 0 3px 10px rgba(0,0,0,0.50),
    0 0 28px rgba(0,180,216,0.24);
}
.reel__stage  { width: 100%; height: 100%; position: relative; overflow: hidden; }
.reel__strip  { display: flex; flex-direction: column; align-items: center; will-change: transform; }
.cell {
  width: 100%; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(34px, 8.5vw, 54px); line-height: 1;
  user-select: none; flex-shrink: 0;
}
.reel__num {
  font-family: var(--f-serif); font-size: 9.5px;
  color: var(--muted-2); letter-spacing: 0.14em;
}
/* Win highlight */
.machine.is-win .reel__window {
  border-color: rgba(74,222,128,0.50);
  box-shadow: inset 0 3px 10px rgba(0,0,0,0.42), 0 0 28px rgba(74,222,128,0.28);
}

/* Golden payline */
.payline {
  position: absolute; left: 0; right: 0;
  top: calc(18px + 50%);   /* midline of reels area */
  height: 1.5px; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(201,162,39,0.55) 15%,
    rgba(240,200,66,0.90) 50%,
    rgba(201,162,39,0.55) 85%,
    transparent 100%);
  box-shadow: 0 0 10px rgba(201,162,39,0.45);
}
.machine.is-win .payline { animation: paylineFlash 0.5s ease-out; }
@keyframes paylineFlash {
  0%   { box-shadow: 0 0 10px rgba(201,162,39,0.45); }
  50%  { box-shadow: 0 0 35px rgba(240,200,66,0.90); height: 2.5px; }
  100% { box-shadow: 0 0 10px rgba(201,162,39,0.45); }
}

/* ══════════════════════════════════
   CONTROLS
   ══════════════════════════════════ */
.controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; z-index: 1; position: relative;
}

/* Betbox */
.betbox { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.betbox__lbl {
  font-family: var(--f-mono); font-size: 9.5px; color: var(--muted);
  letter-spacing: 0.13em; text-transform: uppercase;
}
.betbox__row {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,64,128,0.16);
  border: 1px solid rgba(0,119,182,0.22);
  border-radius: 11px; padding: 6px 8px;
}
.betbox__val { flex: 1; text-align: center; display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.bet-val  { font-family: var(--f-mono); font-weight: 600; font-size: 18px; color: var(--pearl); transition: transform 0.14s var(--ease-spring); }
.bet-cur  { font-size: 10px; color: var(--muted-2); font-family: var(--f-mono); }

/* +/- buttons */
.mini-btn {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  border: 1px solid rgba(0,119,182,0.28);
  background: rgba(0,64,128,0.22);
  color: var(--teal); font-size: 18px; font-weight: 300;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--fast) ease; line-height: 1;
}
.mini-btn:hover  { background: rgba(0,119,182,0.28); border-color: var(--teal); color: var(--pearl); }
.mini-btn:active { transform: scale(0.88); }

/* Chips */
.chips { display: flex; gap: 5px; }
.chip {
  flex: 1; padding: 5px 0; border-radius: 8px; text-align: center;
  border: 1px solid rgba(201,162,39,0.22);
  background: rgba(201,162,39,0.08); color: var(--gold);
  font-family: var(--f-mono); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: all var(--fast) ease;
}
.chip:hover  { background: rgba(201,162,39,0.18); border-color: var(--gold); color: var(--gold-b); }
.chip:active { transform: scale(0.90); }

/* ══════════════════════════════════
   SPIN BUTTON
   ══════════════════════════════════ */
.spinbox { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }

.spin-btn {
  position: relative; width: 90px; height: 90px;
  border-radius: 50%; border: none; cursor: pointer; overflow: hidden;

  background: conic-gradient(
    from 140deg,
    #7a5c12 0deg,
    #c9a227 60deg,
    #f0c842 115deg,
    #e8b830 165deg,
    #c9a227 210deg,
    #8b6814 260deg,
    #c9a227 310deg,
    #f0c842 360deg
  );

  box-shadow:
    0 0 0 2px rgba(201,162,39,0.32),
    0 0 0 5px rgba(201,162,39,0.10),
    0 8px 36px rgba(201,162,39,0.42),
    0 2px 8px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -2px 0 rgba(0,0,0,0.22);

  transition: transform 0.16s var(--ease-spring), box-shadow 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}
.spin-btn:hover:not(:disabled) {
  transform: scale(1.05) translateY(-2px);
  box-shadow:
    0 0 0 2px rgba(240,200,66,0.55),
    0 0 0 6px rgba(201,162,39,0.16),
    0 14px 44px rgba(201,162,39,0.58),
    0 4px 14px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.28);
}
.spin-btn:active:not(:disabled) {
  transform: scale(0.93) translateY(2px);
  box-shadow:
    0 0 0 2px rgba(201,162,39,0.20),
    0 4px 18px rgba(201,162,39,0.32),
    0 1px 4px rgba(0,0,0,0.45),
    inset 0 2px 5px rgba(0,0,0,0.22);
}
.spin-btn:disabled { opacity: 0.52; cursor: not-allowed; transform: none; }

/* Animated rings */
.spin-btn__glow {
  position: absolute; inset: -5px; border-radius: 50%; pointer-events: none;
  border: 1.5px solid rgba(240,200,66,0.35);
  animation: ringPulse 2.2s ease-in-out infinite;
}
.spin-btn__ring {
  position: absolute; inset: -10px; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(201,162,39,0.18);
  animation: ringPulse 2.2s ease-in-out infinite 0.6s;
}
/* Water wave shimmer inside button */
.spin-btn__wave {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse 80% 40% at 50% 120%, rgba(0,119,182,0.35), transparent 70%);
  animation: waveRise 2s ease-in-out infinite;
}
.spin-btn__label {
  position: relative; z-index: 1;
  font-family: var(--f-display); font-weight: 800; font-size: 14.5px;
  letter-spacing: 0.16em; color: var(--deep);
  text-shadow: 0 1px 0 rgba(255,255,255,0.38);
  user-select: none;
}

@keyframes waveRise {
  0%,100% { transform: translateY(5px); opacity: 0.5; }
  50%      { transform: translateY(-5px); opacity: 1; }
}

/* Spinning state */
.machine.is-spinning .spin-btn { animation: btnPop 0.6s var(--ease-spring); }
@keyframes btnPop { 0%{ transform: scale(0.94); } 55%{ transform: scale(1.06); } 100%{ transform: scale(1); } }

/* MAX button */
.max-btn {
  background: transparent; border: 1px solid rgba(201,162,39,0.22);
  border-radius: 8px; color: var(--gold);
  font-family: var(--f-mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase;
  padding: 5px 12px; cursor: pointer; transition: all var(--fast) ease;
}
.max-btn:hover { border-color: var(--gold); color: var(--gold-b); background: rgba(201,162,39,0.10); }
.max-btn:active { transform: scale(0.92); }

/* ghost-btn (modal compat) */
.ghost-btn {
  background: transparent; border: 1px solid rgba(0,119,182,0.22);
  border-radius: 8px; color: var(--muted);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.07em;
  text-transform: uppercase; padding: 5px 14px; cursor: pointer;
  transition: all var(--fast) ease;
}
.ghost-btn:hover { border-color: var(--teal); color: var(--teal); background: rgba(0,180,216,0.08); }

/* ══════════════════════════════════
   STATUS
   ══════════════════════════════════ */
.status {
  text-align: center; padding: 8px 0 2px;
  z-index: 1; position: relative; min-height: 46px;
  transition: all 0.24s ease;
}
.status__title {
  font-family: var(--f-display); font-weight: 600; font-size: 15.5px;
  letter-spacing: 0.06em; color: var(--pearl); transition: color 0.24s ease;
}
.status__text {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--muted); margin-top: 2px; letter-spacing: 0.04em;
}
.status--win      .status__title { color: var(--win); }
.status--jackpot  .status__title { color: var(--gold-b); animation: glimmer 0.9s ease-in-out infinite alternate; }
.status--error    .status__title { color: var(--bad); }
.status--spinning .status__title { color: var(--teal); }

@keyframes glimmer {
  0%   { text-shadow: 0 0 8px  rgba(201,162,39,0.55); }
  100% { text-shadow: 0 0 22px rgba(240,200,66,0.85), 0 0 44px rgba(201,162,39,0.40); }
}

/* ══════════════════════════════════
   SIDE PANEL
   ══════════════════════════════════ */
.panel {
  background: var(--surface-2);
  border: 1px solid rgba(0,119,182,0.14);
  border-radius: var(--r); padding: 16px; box-shadow: var(--shadow-sm);
}
.panel__title {
  font-family: var(--f-display); font-weight: 600; font-size: 12.5px;
  letter-spacing: 0.11em; color: var(--pearl); text-transform: uppercase;
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.panel__body {
  font-family: var(--f-mono); font-size: 12px; color: var(--muted); line-height: 1.65; margin-bottom: 12px;
}
.panel__body b { color: var(--pearl); }

/* HowPayout */
.howPayout { margin-top: 6px; }
.howPayout__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.howPayout__title { font-family: var(--f-mono); font-size: 9.5px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.howPayout__note  { font-family: var(--f-mono); font-size: 9px; color: var(--muted-2); }
.howPayout__grid  { display: flex; flex-direction: column; gap: 5px; }

.howRow {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px;
  background: rgba(0,64,128,0.10); border: 1px solid rgba(0,119,182,0.12);
  border-radius: 8px; gap: 8px;
}
.howRow.is-jackpot { background: rgba(201,162,39,0.08); border-color: rgba(201,162,39,0.22); }
.howRow__left { display: flex; flex-direction: column; gap: 3px; }
.howRow__sym  { font-size: 12.5px; letter-spacing: -1px; }
.howRow__chips{ display: flex; gap: 4px; }
.hchip        { display: flex; gap: 2px; align-items: center; font-family: var(--f-mono); font-size: 9px; }
.hchip__k     { color: var(--muted-2); }
.hchip__v     { color: var(--pearl); font-weight: 600; }
.howRow.is-jackpot .hchip__v { color: var(--gold); }
.howRow__tag  { font-family: var(--f-mono); font-size: 8px; font-weight: 700; letter-spacing: 0.10em; color: var(--teal); text-transform: uppercase; }
.howRow.is-jackpot .howRow__tag { color: var(--gold); }
.howPayout__foot {
  display: flex; align-items: center; gap: 6px; margin-top: 8px;
  font-family: var(--f-mono); font-size: 9px; color: var(--muted-2);
}
.howPayout__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }

.combos, #symbols, #sessionLine { display: none !important; }

/* ══════════════════════════════════
   MODAL (hidden)
   ══════════════════════════════════ */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(2,11,23,0.82); backdrop-filter: blur(8px); }
.modal__card {
  position: relative; background: var(--midnight); width: 320px; max-width: 90vw;
  border: 1px solid rgba(201,162,39,0.26); border-radius: var(--r2);
  box-shadow: var(--shadow), var(--gold-glow); overflow: hidden;
}
.modal__head  { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal__title { font-family: var(--f-display); font-size: 16px; color: var(--pearl); letter-spacing: 0.08em; }
.xbtn { background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer; padding: 4px; line-height: 1; transition: color var(--fast); }
.xbtn:hover { color: var(--pearl); }
.modal__body  { padding: 16px 20px; }
.modal__note  { font-family: var(--f-mono); font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.modal__foot  { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }

/* ══════════════════════════════════
   TOAST
   ══════════════════════════════════ */
.toast {
  position: fixed; bottom: 110px; left: 50%; transform: translateX(-50%);
  background: rgba(4,14,30,0.94); border: 1px solid rgba(201,162,39,0.28);
  backdrop-filter: blur(18px); border-radius: 40px; padding: 8px 22px;
  font-family: var(--f-mono); font-size: 13px; font-weight: 500; color: var(--pearl);
  z-index: 500; white-space: nowrap; box-shadow: 0 8px 28px rgba(0,0,0,0.44);
  animation: toastIn 0.26s var(--ease-out);
}
.toast.hidden { display: none; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0);    }
}

/* ══════════════════════════════════
   FX PARTICLE LAYER
   ══════════════════════════════════ */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.fx, .fx-piece {
  position: absolute; top: 46%;
  font-size: clamp(18px, 4vw, 26px); line-height: 1;
  will-change: transform, opacity; pointer-events: none; user-select: none;
  animation: fxFly var(--dur, 1.4s) ease-out forwards;
}
@keyframes fxFly {
  0%   { transform: translateX(0) translateY(0) scale(1.0) rotate(0deg); opacity: 1; }
  15%  { opacity: 0.9; }
  100% { transform: translateX(var(--x, 0px)) translateY(-400px) scale(0.22) rotate(var(--rot, 400deg)); opacity: 0; }
}

/* ══════════════════════════════════
   JACKPOT OVERLAY
   ══════════════════════════════════ */
.jackpot {
  position: fixed; inset: 0; z-index: 800;
  display: flex; align-items: center; justify-content: center;
  animation: jReveal 0.4s var(--ease-out);
}
.jackpot.hidden { display: none; }
.jackpot.hide   { animation: jHide 0.4s ease forwards; }

.jackpot__backdrop {
  position: absolute; inset: 0;
  background: rgba(2,11,23,0.92);
  backdrop-filter: blur(16px);
}

.jackpot__card {
  position: relative; z-index: 1;
  text-align: center; padding: 50px 60px;
  background: linear-gradient(158deg, rgba(10,36,68,0.97), rgba(4,14,30,0.99));
  border: 1px solid rgba(201,162,39,0.42);
  border-top: 1px solid rgba(240,200,66,0.65);
  border-radius: var(--r3);
  box-shadow: 0 0 0 1px rgba(201,162,39,0.14), 0 48px 110px rgba(0,0,0,0.75), var(--gold-glow);
  animation: jCardIn 0.55s var(--ease-spring);
}

.jackpot__crown {
  font-size: 56px; margin-bottom: 6px;
  animation: crownFloat 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 22px rgba(201,162,39,0.65));
}
@keyframes crownFloat { 0%,100%{ transform: translateY(0) scale(1); } 50%{ transform: translateY(-10px) scale(1.06); } }

.jackpot__title {
  font-family: var(--f-display); font-weight: 900; font-size: 44px;
  letter-spacing: 0.14em; line-height: 1;
  background: linear-gradient(135deg, #7a5c12, #f0c842, #c9a227, #f5d060, #7a5c12);
  background-size: 200% 100%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: goldFlow 2s linear infinite;
}
.jackpot__subtitle {
  font-family: var(--f-serif); font-style: italic; font-size: 15px;
  color: var(--muted); letter-spacing: 0.11em; margin: 6px 0 22px;
}
.jackpot__row {
  display: flex; align-items: baseline; justify-content: center; gap: 5px; margin-bottom: 14px;
}
.jackpot__plus { font-family: var(--f-mono); font-size: 26px; font-weight: 300; color: var(--gold); }
.jackpot__num  { font-family: var(--f-display); font-weight: 900; font-size: 56px; color: var(--gold-b); line-height: 1; text-shadow: 0 0 36px rgba(240,200,66,0.55); }
.jackpot__cur  { font-family: var(--f-mono); font-size: 20px; color: var(--gold); }
.jackpot__hint { font-family: var(--f-serif); font-style: italic; font-size: 13px; color: var(--muted); letter-spacing: 0.07em; }

@keyframes jReveal  { from { opacity:0; } to { opacity:1; } }
@keyframes jHide    { from { opacity:1; } to { opacity:0; } }
@keyframes jCardIn  { from { transform: scale(0.78) translateY(24px); opacity:0; } to { transform: scale(1) translateY(0); opacity:1; } }
@keyframes goldFlow { 0%{ background-position: 200% center; } 100%{ background-position: -200% center; } }

/* ══════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════ */
@media (max-width: 400px) {
  .spin-btn     { width: 78px; height: 78px; }
  .spin-btn__label { font-size: 12.5px; }
  .betbox__row  { padding: 4px 6px; }
  .bet-val      { font-size: 16px; }
  .chip         { font-size: 10px; }
  .topbar       { padding: 9px 11px 7px; }
  .brand__name  { font-size: 12px; }
  .jackpot__title { font-size: 36px; }
  .jackpot__num   { font-size: 44px; }
  .jackpot__card  { padding: 36px 32px; }
}
@media (max-width: 360px) {
  .main    { padding: 7px; }
  .machine { padding: 12px 8px 10px; gap: 12px; }
  .reels   { gap: 5px; }
}

/* ══════════════════════════════════
   UTILITY
   ══════════════════════════════════ */
.hidden { display: none !important; }
.mono   { font-family: var(--f-mono); }

/* ══════════════════════════════════
   REDUCE MOTION
   ══════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .bg-fixed::before, #bg-fixed::before,
  .bg-fixed::after,  #bg-fixed::after,
  .bg-rays, .wave, .waves-outer,
  .boot-logo, .boot-logo__ring,
  .spin-btn__glow, .spin-btn__ring, .spin-btn__wave,
  .jackpot__crown, .jackpot__title { animation: none !important; }
}
