/* =============================================================
   Neon Nights — "Casino Panel" skin
   DOM/CSS cabinet chrome around a PixiJS reel canvas.
   ============================================================= */

/* ---- loading screen ---- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 40%, #1c0a36 0%, #0c0220 60%, #060010 100%);
  transition: opacity 0.5s ease;
}
.loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(420px, 80vw);
  text-align: center;
}
.loader-logo {
  font-family: "Anton", sans-serif;
  font-size: clamp(44px, 8vw, 76px);
  letter-spacing: 6px;
  text-transform: uppercase;
  line-height: 1;
  background: linear-gradient(180deg, #fff3c4, #ffce3a 45%, #ff9a1c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(255, 180, 30, 0.85))
    drop-shadow(0 0 40px rgba(255, 100, 0, 0.4));
  animation: winGlow 2.2s infinite;
}
.loader-sub {
  font-size: 13px;
  letter-spacing: 6px;
  color: #c080ff;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(200, 80, 255, 0.6);
  margin-bottom: 8px;
}
.loader-bar-wrap {
  width: 100%;
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(180, 60, 255, 0.4);
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
}
.loader-bar {
  width: 0%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #a833ff, #dd44ff 60%, #ffcc33);
  box-shadow: 0 0 14px rgba(220, 60, 255, 0.7);
  transition: width 0.25s ease;
}
.loader-pct {
  font-size: 13px;
  letter-spacing: 3px;
  color: #e8d8ff;
  font-weight: 700;
}
.loader-play {
  margin-top: 14px;
  padding: 16px 64px;
  border-radius: 14px;
  cursor: pointer;
  font-family: "Anton", sans-serif;
  font-size: 28px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #1a0438;
  background: linear-gradient(180deg, #ffffff, #ffd24d 55%, #ff9a1c);
  border: 3px solid #ffe9a0;
  box-shadow:
    0 0 30px rgba(255, 190, 30, 0.85),
    0 0 70px rgba(255, 120, 0, 0.4),
    0 6px 0 rgba(120, 60, 0, 0.6);
  animation: jpPulse 1.4s ease-in-out infinite;
}
.loader-play[hidden] {
  display: none;
}
.loader-play:active {
  transform: translateY(3px);
  box-shadow:
    0 0 20px rgba(255, 190, 30, 0.7),
    0 3px 0 rgba(120, 60, 0, 0.6);
}

/* ---- rotate-to-landscape (mobile portrait) ---- */
.rotate-notice {
  display: none;
}
/* Show only on touch devices held in portrait. */
@media (orientation: portrait) and (pointer: coarse) {
  .rotate-notice {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(ellipse at 50% 40%, #1c0a36 0%, #0c0220 60%, #060010 100%);
  }
  .rotate-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 24px;
  }
  .rotate-icon {
    color: #cc55ff;
    filter: drop-shadow(0 0 14px rgba(200, 80, 255, 0.7));
    animation: rotateHint 2.2s ease-in-out infinite;
  }
  .rotate-title {
    font-family: "Anton", sans-serif;
    font-size: 28px;
    letter-spacing: 4px;
    color: #ffce3a;
    text-shadow: 0 0 14px rgba(255, 180, 30, 0.7);
  }
  .rotate-sub {
    font-size: 13px;
    letter-spacing: 3px;
    color: #c080ff;
    font-weight: 700;
  }
}
@keyframes rotateHint {
  0%, 35% { transform: rotate(0); }
  55%, 100% { transform: rotate(-90deg); }
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0a0118;
  overflow: hidden;
  font-family: "Orbitron", sans-serif;
  color: #fff;
  -webkit-user-select: none;
  user-select: none;
}

/* ---- stage / background ---- */
.stage {
  position: fixed;
  inset: 0;
  background:
    url("uploads/casino_bg.png") center/cover no-repeat,
    #0a0118;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- cabinet (fixed size, scaled by JS) ---- */
.cabinet {
  position: relative;
  width: 1617px;
  height: 972px;
  flex: none;
  transform: scale(var(--scale, 1));
  transform-origin: center center;
}
.panel {
  position: absolute;
  inset: 0;
  border-radius: 21px;
  background: url("uploads/panel3.png") center/100% 100% no-repeat;
}

/* ---- status header ---- */
.status-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 20;
}
.status-text {
  font-family: "Anton", sans-serif;
  font-size: 52px;
  letter-spacing: 8px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff3c4, #ffce3a 45%, #ff9a1c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 180, 30, 0.8));
  animation: winGlow 2.2s infinite;
}
.status-text.win {
  animation:
    winPop 0.5s ease-out,
    winGlow 2.2s infinite;
}

/* ---- screen ---- */
.screen {
  position: absolute;
  left: 188px;
  top: 143px;
  width: 1261px;
  height: 627px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
}
.game-area {
  position: relative;
  flex: 1;
  height: 627px;
  min-width: 0;
}

/* ---- reels frame ---- */
.reels-frame {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 512px;
  border-radius: 34px 34px 0px 0px;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(190, 145, 45, 0.04) 0,
      rgba(190, 145, 45, 0.04) 1px,
      transparent 1px,
      transparent 22px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(190, 145, 45, 0.04) 0,
      rgba(190, 145, 45, 0.04) 1px,
      transparent 1px,
      transparent 22px
    ),
    radial-gradient(
      ellipse at 50% 40%,
      rgba(32, 12, 62, 0.96) 0%,
      rgba(18, 6, 38, 0.97) 55%,
      rgba(8, 2, 18, 1) 100%
    );
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.85),
    inset 2px 0 0 rgba(190, 145, 45, 0.15),
    inset -2px 0 0 rgba(190, 145, 45, 0.15);
  border-left: 1px solid rgba(190, 145, 45, 0.4);
  border-right: 1px solid rgba(190, 145, 45, 0.4);
}
.reels {
  position: absolute;
  inset: 8px 52px;
  overflow: hidden;
}
/* faint reel separators over the Pixi canvas */
.reels::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background-image: linear-gradient(
    90deg,
    transparent calc(20% - 1px),
    rgba(190, 145, 45, 0.2) 20%,
    transparent calc(20% + 1px),
    transparent calc(40% - 1px),
    rgba(190, 145, 45, 0.2) 40%,
    transparent calc(40% + 1px),
    transparent calc(60% - 1px),
    rgba(190, 145, 45, 0.2) 60%,
    transparent calc(60% + 1px),
    transparent calc(80% - 1px),
    rgba(190, 145, 45, 0.2) 80%,
    transparent calc(80% + 1px)
  );
}
.win-flash {
  position: absolute;
  inset: 0;
  z-index: 10;
  border-radius: 10px;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(255, 210, 50, 0.75),
    rgba(255, 130, 0, 0.3) 55%,
    transparent 80%
  );
  animation: winFlash 1.4s ease-out forwards;
}
.win-flash[hidden] {
  display: none;
}

/* payline svg overlay (anchored to .reels) */
.payline-svg {
  position: absolute;
  inset: 0;
  z-index: 14;
  pointer-events: none;
  overflow: visible;
}
.payline-path {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px currentColor) drop-shadow(0 0 14px currentColor);
}
.payline-node {
  filter: drop-shadow(0 0 6px currentColor);
}

/* win line readout */
.win-toast {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%) translateY(8px);
  padding: 6px 18px;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(8, 2, 22, 0.92),
    rgba(20, 6, 40, 0.92)
  );
  border: 2px solid rgba(200, 80, 255, 0.55);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffe9b0;
  box-shadow: 0 0 18px rgba(180, 60, 255, 0.4);
  opacity: 0;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 16;
  pointer-events: none;
  white-space: nowrap;
}
.win-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- info bar ---- */
.info-bar {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 500px;
  height: 120px;
  display: flex;
  gap: 18px;
  align-items: flex-end;
  padding-bottom: 2px;
}
.info-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.info-cell.balance {
  flex: 2;
}
.info-cell.totalwin {
  flex: 2;
}
.info-cell.totalbet {
  flex: 1.4;
}
.info-label {
  font-size: 13px;
  letter-spacing: 3px;
  color: #e8d8ff;
  font-weight: 700;
  text-align: center;
}
.info-box {
  border-radius: 10px;
  padding: 0 16px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, #220844, #0f0228);
  border: 2px solid #a833ff;
  box-shadow:
    0 0 18px rgba(168, 51, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.info-box.win {
  border-color: #dd44ff;
  box-shadow:
    0 0 22px rgba(220, 60, 255, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.info-box .chev {
  color: #cc55ff;
  font-size: 22px;
  font-weight: 900;
}
.ro-value {
  font-size: 30px;
  font-weight: 800;
  color: #cc55ff;
  letter-spacing: 1px;
  text-shadow: 0 0 14px rgba(200, 80, 255, 0.6);
}
.ro-value.win {
  font-size: 38px;
  font-weight: 900;
  color: #ffcc33;
  text-shadow:
    0 0 16px rgba(255, 190, 30, 0.85),
    0 0 32px rgba(255, 130, 0, 0.4);
}
.ro-value.win.punch {
  animation: winPop 0.45s ease-out;
}

.bet-row {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bet-mini {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  line-height: 1;
  border-radius: 10px;
  border: 2px solid #a833ff;
  background: linear-gradient(180deg, #2e0a55, #1a0438);
  color: #cc55ff;
  font-size: 28px;
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    0 0 14px rgba(168, 51, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.bet-mini:active {
  transform: scale(0.9) translateY(2px);
}
.bet-mini:disabled {
  opacity: 0.4;
  cursor: default;
}
.bet-value {
  flex: 1;
  text-align: center;
  min-width: 36px;
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

/* ---- divider + supermeter ---- */
.screen-divider {
  width: 2px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(180, 60, 255, 0.5) 25%,
    rgba(180, 60, 255, 0.5) 75%,
    transparent
  );
}
.meter {
  width: 220px;
  flex-shrink: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 14px 10px 12px;
  background: linear-gradient(180deg, #180330, #0c0120);
  border-radius: 0 10px 10px 0;
  overflow: hidden;
  border-left: 1px solid rgba(180, 60, 255, 0.3);
}
.meter-title {
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #ffd033;
  text-shadow: 0 0 10px rgba(255, 200, 30, 0.7);
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(180, 60, 255, 0.35);
  margin-bottom: 10px;
}
.ladder {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rung {
  padding: 6px 8px;
  border-radius: 8px;
  margin-bottom: 5px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(100, 40, 160, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rung span:first-child {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #5030a0;
}
.rung .rung-amt {
  font-size: 12px;
  font-weight: 900;
  color: #402860;
}
.rung.lit {
  background: linear-gradient(
    90deg,
    rgba(200, 80, 255, 0.18),
    rgba(100, 20, 200, 0.08)
  );
  border: 1px solid rgba(200, 80, 255, 0.55);
  box-shadow: 0 0 8px rgba(200, 80, 255, 0.2);
}
.rung.lit span:first-child {
  color: #e090ff;
}
.rung.lit .rung-amt {
  color: #ffd033;
}
.rung.crest span:first-child {
  letter-spacing: 2px;
}

.meter-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(180, 60, 255, 0.35);
  text-align: center;
}
.meter-coins {
  font-size: 32px;
  font-weight: 900;
  color: #ffd033;
  line-height: 1;
  text-shadow:
    0 0 16px rgba(255, 200, 30, 0.85),
    0 0 30px rgba(255, 140, 0, 0.4);
}
.meter-coins-label {
  font-size: 11px;
  letter-spacing: 3px;
  color: #c080ff;
  font-weight: 700;
  margin-top: 5px;
}
.exit-super {
  margin-top: 10px;
  width: 100%;
  height: 38px;
  border-radius: 9px;
  cursor: pointer;
  background: linear-gradient(180deg, #5bff9b, #1a9b50);
  color: #00210f;
  border: 2px solid #5bff9b;
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  box-shadow: 0 0 16px rgba(90, 255, 150, 0.5);
}
.exit-super[hidden] {
  display: none;
}
.exit-super.glow {
  animation: jpPulse 1.2s ease-in-out infinite;
}

/* ---- cabinet PNG buttons ---- */
.cab-btn {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
}
.cab-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition:
    transform 0.07s,
    filter 0.07s;
  pointer-events: none;
}
.cab-btn:active img {
  transform: translateY(9px) scaleY(0.92);
  filter: brightness(0.65) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}
.cab-btn:disabled {
  cursor: default;
}
.cab-btn:disabled img {
  filter: grayscale(0.4) brightness(0.6);
}
.cab-btn.spin.spinning img {
  animation: spinPulse 0.6s ease-in-out infinite;
}
/* "auto" lit state */
.cab-btn.auto-on img {
  filter: drop-shadow(0 0 12px rgba(255, 210, 50, 0.95)) brightness(1.12);
}
.spin-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: "Anton", sans-serif;
  font-size: 30px;
  letter-spacing: 3px;
  color: #fff;
  text-shadow:
    0 0 12px rgba(255, 200, 40, 0.9),
    0 2px 0 rgba(0, 0, 0, 0.6);
  pointer-events: none;
  display: none;
}
body.mode-super .cab-btn.spin .spin-badge {
  display: block;
}

/* press-and-hold SPIN to collect (during a win decision) */
.spin-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffe9a0;
  text-shadow: 0 0 8px rgba(255, 200, 50, 0.7), 0 1px 0 rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  display: none;
}
.cab-btn.spin.collect-mode .spin-hint {
  display: block;
  opacity: 0.95;
  animation: holdHintPulse 1.4s ease-in-out infinite;
}
.spin-hold {
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 50px;
  height: 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.5);
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}
.cab-btn.spin.holding .spin-hold {
  opacity: 1;
}
.spin-hold-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, #5bff9b, #ffcc33);
  box-shadow: 0 0 8px rgba(255, 200, 50, 0.7);
}
.cab-btn.spin.holding .spin-hold-fill {
  width: 100%;
  transition: width 0.5s linear;
}
@keyframes holdHintPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* =============================================================
   Overlays inside the game area: decision / gamble
   ============================================================= */
.overlay-panel {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(4, 0, 18, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 10px;
}
.overlay-panel[hidden] {
  display: none;
}

.decision-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.decision-label {
  color: #c8a0ff;
  font-size: 13px;
  letter-spacing: 4px;
  font-weight: 700;
}
.decision-amount {
  font-family: "Anton", sans-serif;
  font-size: 64px;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #fff, #ffd700 35%, #ff9500);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 180, 0, 0.8));
}
.decision-actions {
  display: flex;
  gap: 14px;
}
.neon-choice {
  min-width: 132px;
  height: 56px;
  border-radius: 12px;
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  border: 2px solid;
  padding: 0 18px;
}
.neon-choice.collect {
  background: linear-gradient(180deg, #5bff9b, #1a9b50);
  border-color: #5bff9b;
  color: #003015;
  box-shadow: 0 0 18px rgba(90, 255, 150, 0.5);
}
.neon-choice.gamble {
  background: linear-gradient(180deg, #ff9b3c, #c05000);
  border-color: #ff9b3c;
  box-shadow: 0 0 18px rgba(255, 130, 0, 0.5);
}
.neon-choice.transfer {
  background: linear-gradient(180deg, #a040ff, #5008b0);
  border-color: #c060ff;
  box-shadow: 0 0 18px rgba(160, 60, 255, 0.5);
}
.neon-choice.sm {
  min-width: 0;
  height: 46px;
  font-size: 13px;
}
.neon-choice:active {
  transform: translateY(2px) scale(0.98);
}
.neon-choice:disabled {
  opacity: 0.35;
  cursor: default;
  filter: grayscale(0.5);
}

/* decision auto-collect countdown */
.decision-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  width: 280px;
}
.decision-timer-track {
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.decision-timer-fill {
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #5bff9b, #ffcc33 55%, #ff5b5b);
  box-shadow: 0 0 8px rgba(255, 200, 50, 0.6);
}
.decision-timer-label {
  font-size: 11px;
  letter-spacing: 2px;
  color: #c8a0ff;
  font-weight: 700;
}

/* gamble */
.gamble-title {
  color: #c8a0ff;
  font-size: 13px;
  letter-spacing: 4px;
  font-weight: 700;
}
.gamble-stake {
  color: #e8d8ff;
  font-size: 16px;
}
.gamble-stake b {
  color: #ffd700;
}
.gamble-card {
  width: 120px;
  height: 150px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: #fff;
  background: linear-gradient(180deg, #2a0a4a, #140226);
  border: 3px solid #a833ff;
  box-shadow: 0 0 26px rgba(168, 51, 255, 0.5);
  transition: transform 0.3s;
}
.gamble-card.flip {
  transform: rotateY(90deg);
}
.gamble-card.red {
  background: linear-gradient(180deg, #ff4444, #8b0000);
  border-color: #ff6666;
  box-shadow: 0 0 26px rgba(255, 40, 40, 0.6);
}
.gamble-card.black {
  background: linear-gradient(180deg, #444, #111);
  border-color: #888;
}
.gamble-picks {
  display: flex;
  gap: 16px;
}
.pick {
  width: 130px;
  height: 54px;
  border-radius: 12px;
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #fff;
  border: 2px solid;
}
.pick.red {
  background: linear-gradient(180deg, #ff4444, #8b0000);
  border-color: #ff6666;
  box-shadow: 0 0 20px rgba(255, 40, 40, 0.6);
}
.pick.black {
  background: linear-gradient(180deg, #444, #111);
  border-color: #888;
  box-shadow: 0 0 12px rgba(120, 120, 120, 0.4);
}
.pick:active {
  transform: translateY(2px);
}
.pick:disabled {
  opacity: 0.4;
  cursor: default;
}
.gamble-result {
  font-family: "Anton", sans-serif;
  font-size: 36px;
  letter-spacing: 2px;
  min-height: 36px;
}
.gamble-result.win {
  color: #5bff9b;
  text-shadow: 0 0 18px rgba(90, 255, 150, 0.8);
}
.gamble-result.lose {
  color: #ff4444;
  text-shadow: 0 0 18px rgba(255, 50, 50, 0.8);
}
.gamble-after[hidden] {
  display: none;
}

/* =============================================================
   Big-win / jackpot celebration (full-screen)
   ============================================================= */
.celebrate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(4, 0, 20, 0.93);
  animation: jpBg 0.3s ease-out both;
  overflow: hidden;
}
.celebrate[hidden] {
  display: none;
}
.celebrate::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(190, 50, 255, 0.35) 0%,
    rgba(255, 60, 180, 0.18) 28%,
    rgba(40, 0, 80, 0.15) 55%,
    transparent 70%
  );
  animation: jpPulse 1.2s ease-in-out 0.8s infinite;
}
.celebrate-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}
.celebrate-kicker {
  font-family: "Anton", sans-serif;
  font-size: clamp(60px, 7vw, 120px);
  letter-spacing: 6px;
  text-transform: uppercase;
  line-height: 1.05;
  background: linear-gradient(
    180deg,
    #fff 0%,
    #e08bff 25%,
    #c040ff 55%,
    #ff4db8 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(190, 50, 255, 1))
    drop-shadow(0 0 80px rgba(255, 60, 180, 0.7))
    drop-shadow(0 8px 0 rgba(0, 0, 0, 1));
  animation:
    jpSlam 0.65s cubic-bezier(0.22, 1.4, 0.36, 1) both,
    jpGlow 1.4s ease-in-out 0.7s infinite;
}
.celebrate-amount {
  font-family: "Anton", sans-serif;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 4px;
  margin-top: 10px;
  text-shadow:
    0 0 24px rgba(255, 215, 0, 0.95),
    0 0 50px rgba(255, 150, 0, 0.7),
    0 4px 0 rgba(0, 0, 0, 0.9);
}

/* =============================================================
   FX layer (PixiJS canvas + DOM fallback particles)
   ============================================================= */
.fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  overflow: hidden;
}
.fx-coin,
.fx-spark {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle at 35% 30%,
    #fffde0,
    var(--c, #ffd36b) 55%,
    #b8860b
  );
  box-shadow: 0 0 8px var(--c, #ffd36b);
  animation: fxFly var(--dur, 1s) cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
  transform: translate(-50%, -50%);
}
.fx-spark {
  background: radial-gradient(circle, #fff, var(--c, #fff) 60%, transparent);
}
@keyframes fxFly {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0)), calc(-50% + var(--dy, 0)))
      rotate(var(--rot, 0)) scale(0.4);
  }
}
.fx-sweep {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  animation: sweep 0.8s ease-out forwards;
}
@keyframes sweep {
  to {
    transform: translateX(100%);
  }
}

/* =============================================================
   DOM fallback reels (no WebGL)
   ============================================================= */
.reels.reel-grid {
  display: flex;
}
.reel-window {
  position: relative;
  flex: 1;
  overflow: hidden;
}
.reel-strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.reel-tile {
  display: flex;
  align-items: center;
  justify-content: center;
}
.reel-tile img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}
.reel-window.spinning .reel-tile img {
  filter: blur(0.5px);
}
.reel-tile.win img {
  filter: drop-shadow(0 0 10px var(--win-color, #fff))
    drop-shadow(0 0 20px var(--win-color, #fff)) brightness(1.28);
  animation: symbolPulse 0.6s ease-in-out infinite;
}
.reel-tile.dim img {
  opacity: 0.4;
}

/* =============================================================
   Paytable overlay
   ============================================================= */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(4, 0, 18, 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.overlay[hidden] {
  display: none;
}
.sheet {
  position: relative;
  width: min(720px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  border-radius: 20px;
  padding: 24px 28px;
  background: linear-gradient(
    135deg,
    rgba(12, 4, 30, 0.98),
    rgba(20, 6, 38, 0.98)
  );
  border: 2px solid rgba(200, 80, 255, 0.5);
  box-shadow: 0 0 50px rgba(180, 60, 255, 0.4);
}
.sheet-close {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(200, 80, 255, 0.4);
  background: rgba(40, 10, 70, 0.6);
  color: #e8d8ff;
  font-size: 22px;
  cursor: pointer;
}
.sheet-title {
  font-family: "Anton", sans-serif;
  letter-spacing: 2px;
  color: #ffd24d;
  margin: 0 0 14px;
}
.sheet-scroll {
  overflow-y: auto;
  max-height: calc(88vh - 90px);
  padding-right: 8px;
}
.sheet section {
  margin-bottom: 22px;
}
.sheet h3 {
  color: #c98bff;
  font-size: 15px;
  letter-spacing: 1px;
  margin: 0 0 10px;
}
.sheet h3 small {
  color: #7a5aa0;
  font-weight: 400;
  letter-spacing: 0;
}
.pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pay-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(180, 70, 255, 0.06);
  border: 1px solid rgba(180, 70, 255, 0.2);
}
.pay-row img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.pay-info {
  display: flex;
  flex-direction: column;
}
.pay-info .pn {
  font-weight: 700;
  color: #efe6ff;
  font-size: 13px;
}
.pay-info .pv {
  color: #c98bff;
  font-size: 12px;
}
.lines-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.line-cell {
  text-align: center;
}
.line-mini {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 12px;
  gap: 2px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
}
.line-mini i {
  display: block;
  height: 12px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
}
.line-mini i.on {
  background: var(--line-c, #19e3ff);
  box-shadow: 0 0 6px var(--line-c, #19e3ff);
}
.line-cap {
  font-size: 11px;
  color: #b06bd8;
  margin-top: 4px;
}
.rules {
  color: #d8c8f0;
  font-size: 13px;
  line-height: 1.7;
  padding-left: 18px;
}
.rtp-note p {
  color: #9a86b8;
  font-size: 12px;
  line-height: 1.6;
}

/* buy-credits modal */
.buy-sheet {
  width: min(560px, 94vw);
  text-align: center;
}
.buy-note {
  color: #c98bff;
  font-size: 13px;
  letter-spacing: 1px;
  margin: -4px 0 18px;
}
.buy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.buy-pkg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 10px;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(180deg, #2a0a4a, #160228);
  border: 2px solid #a833ff;
  box-shadow: 0 0 16px rgba(168, 51, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.08s, box-shadow 0.15s, border-color 0.15s;
}
.buy-pkg:hover {
  border-color: #dd44ff;
  box-shadow: 0 0 26px rgba(220, 60, 255, 0.6);
}
.buy-pkg:active {
  transform: translateY(2px) scale(0.98);
}
.buy-pkg:disabled {
  opacity: 0.5;
  cursor: default;
}
.buy-pkg.featured {
  border-color: #ffcc33;
  background: linear-gradient(180deg, #3a1a0a, #241006);
  box-shadow: 0 0 26px rgba(255, 200, 50, 0.5);
}
.buy-amt {
  font-family: "Anton", sans-serif;
  font-size: 30px;
  letter-spacing: 1px;
  color: #ffcc33;
  text-shadow: 0 0 14px rgba(255, 190, 30, 0.7);
}
.buy-pkg:not(.featured) .buy-amt {
  color: #e090ff;
  text-shadow: 0 0 14px rgba(200, 80, 255, 0.6);
}
.buy-sub {
  font-size: 11px;
  letter-spacing: 3px;
  font-weight: 700;
  color: #c080ff;
  text-transform: uppercase;
}

.legal {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 6px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(200, 180, 230, 0.45);
  pointer-events: none;
  z-index: 5;
}

/* audio controls (music + sound fx) */
.audio-ctl {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 50;
}
.audio-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #220844, #0f0228);
  border: 2px solid #a833ff;
  color: #cc55ff;
  cursor: pointer;
  box-shadow:
    0 0 14px rgba(168, 51, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    transform 0.07s,
    color 0.15s,
    border-color 0.15s;
}
.audio-btn:hover {
  color: #e090ff;
}
.audio-btn:active {
  transform: scale(0.92);
}
.audio-btn .slash {
  display: none;
}
.audio-btn.muted {
  color: #7a5aa0;
  border-color: #5a2f86;
  box-shadow: 0 0 8px rgba(120, 60, 180, 0.3);
}
.audio-btn.muted .waves {
  display: none;
}
.audio-btn.muted .slash {
  display: block;
}

.audio-pop {
  position: absolute;
  top: 52px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  min-width: 210px;
  background: linear-gradient(
    160deg,
    rgba(16, 5, 36, 0.98),
    rgba(24, 8, 46, 0.98)
  );
  border: 2px solid rgba(200, 80, 255, 0.5);
  box-shadow: 0 0 30px rgba(180, 60, 255, 0.4);
}
.audio-pop[hidden] {
  display: none;
}
.audio-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ch-toggle {
  flex: none;
  width: 86px;
  height: 34px;
  border-radius: 9px;
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(180deg, #2e0a55, #1a0438);
  color: #cc55ff;
  border: 2px solid #a833ff;
  box-shadow: 0 0 10px rgba(168, 51, 255, 0.4);
  transition: all 0.12s;
}
.ch-toggle[aria-pressed="false"] {
  color: #6a4a90;
  border-color: #4a2a72;
  background: linear-gradient(180deg, #190630, #0e0220);
  box-shadow: none;
  opacity: 0.8;
}
.ch-toggle:active {
  transform: scale(0.95);
}
.ch-vol {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, #a833ff, #dd44ff);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.ch-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #cc55ff;
  box-shadow: 0 0 8px rgba(200, 80, 255, 0.8);
  cursor: pointer;
}
.ch-vol::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #cc55ff;
  box-shadow: 0 0 8px rgba(200, 80, 255, 0.8);
  cursor: pointer;
}
.ch-vol:disabled {
  opacity: 0.35;
  cursor: default;
}

/* =============================================================
   Keyframes
   ============================================================= */
@keyframes winGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(255, 180, 30, 0.8));
  }
  50% {
    filter: drop-shadow(0 0 18px rgba(255, 210, 60, 1));
  }
}
@keyframes winPop {
  0% {
    transform: scale(1);
  }
  20% {
    transform: scale(1.28);
  }
  50% {
    transform: scale(0.92);
  }
  70% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes winFlash {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 0.55;
  }
  60% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
  }
}
@keyframes symbolPulse {
  0%,
  100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.18) rotate(-3deg);
  }
  75% {
    transform: scale(1.18) rotate(3deg);
  }
}
@keyframes spinPulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.3) drop-shadow(0 0 14px rgba(220, 110, 255, 0.8));
  }
}
@keyframes jpBg {
  0% {
    background: rgba(255, 255, 255, 0.4);
  }
  5% {
    background: rgba(255, 255, 255, 0);
  }
  100% {
    background: rgba(4, 0, 20, 0.93);
  }
}
@keyframes jpSlam {
  0% {
    opacity: 0;
    transform: scale(4) rotate(-6deg);
  }
  35% {
    opacity: 1;
    transform: scale(0.82) rotate(2deg);
  }
  60% {
    transform: scale(1.12) rotate(-1deg);
  }
  80% {
    transform: scale(0.96);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}
@keyframes jpGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 30px rgba(190, 50, 255, 1))
      drop-shadow(0 0 80px rgba(255, 60, 180, 0.8))
      drop-shadow(0 8px 0 rgba(0, 0, 0, 1));
  }
  50% {
    filter: drop-shadow(0 0 60px rgba(220, 80, 255, 1))
      drop-shadow(0 0 140px rgba(255, 80, 200, 1))
      drop-shadow(0 8px 0 rgba(0, 0, 0, 1));
  }
}
@keyframes jpPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}
