/* ═══════════════════════════════════════════════════════
   SLOTY TRIP — Win Celebrations & Risk Ladder
   Coin rain, shockwaves, flash, shake, counter, ladder
   ═══════════════════════════════════════════════════════ */

/* ─── Celebration Overlay ─── */
#celebration-overlay {
  background: rgba(0, 0, 0, 0.6);
  flex-direction: column;
  z-index: 1000;
  pointer-events: none;
  overflow: hidden;
}

#celebration-overlay.active {
  pointer-events: auto;
}

/* ─── Win Text ─── */
.win-text {
  font-size: clamp(20px, 6vw, 48px);
  letter-spacing: 4px;
  animation: winTextPop 0.5s ease-out;
  z-index: 10;
  text-align: center;
}

@keyframes winTextPop {
  0% { transform: scale(0.2); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* ─── Win Counter ─── */
.win-counter {
  font-size: clamp(16px, 4vw, 32px);
  margin-top: 10px;
  z-index: 10;
  animation: counterPulse 0.3s ease-in-out infinite alternate;
}

@keyframes counterPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

/* ─── Coin Rain Particles ─── */
.coin-particle {
  position: fixed;
  font-size: 24px;
  z-index: 999;
  pointer-events: none;
  animation: coinFall var(--fall-duration, 2s) linear forwards;
  animation-delay: var(--fall-delay, 0s);
  left: var(--fall-x, 50%);
  top: -30px;
}

@keyframes coinFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

/* ─── Shockwave Rings ─── */
.shockwave-ring {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--ring-color, var(--neon-cyan));
  transform: translate(-50%, -50%) scale(0.1);
  animation: ringExpand 0.8s ease-out forwards;
  pointer-events: none;
  z-index: 998;
}

@keyframes ringExpand {
  0% {
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 0.9;
  }
  100% {
    transform: translate(-50%, -50%) scale(4);
    opacity: 0;
  }
}

/* ─── Screen Flash ─── */
.screen-flash {
  position: fixed;
  inset: 0;
  z-index: 997;
  pointer-events: none;
  animation: flashAnim 0.3s ease-out forwards;
}

@keyframes flashAnim {
  0% { opacity: 0; }
  20% { opacity: 0.3; }
  100% { opacity: 0; }
}

/* ─── Screen Shake ─── */
@keyframes cabinetShake {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-5px) translateY(2px); }
  20% { transform: translateX(5px) translateY(-1px); }
  30% { transform: translateX(-4px) translateY(1px); }
  40% { transform: translateX(4px); }
  50% { transform: translateX(-3px) translateY(-1px); }
  60% { transform: translateX(3px); }
  70% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
  90% { transform: translateX(-1px); }
}

.cabinet-wrapper.shaking {
  animation: cabinetShake 0.4s ease-in-out;
}

/* ─── Tier Colors ─── */
.tier-win    { --celebration-color: #76ff03; }
.tier-big    { --celebration-color: #00e5ff; }
.tier-super  { --celebration-color: #e040fb; }
.tier-mega   { --celebration-color: #ff1744; }
.tier-jackpot { --celebration-color: #ffd600; }

/* ─── Risk Ladder Overlay ─── */
#ladder-overlay {
  background: rgba(0, 0, 0, 0.92);
  flex-direction: column;
  z-index: 1100;
}

.ladder-container {
  text-align: center;
  width: 90%;
  max-width: 320px;
}

.ladder-title {
  font-size: clamp(14px, 4vw, 22px);
  letter-spacing: 3px;
  margin-bottom: 16px;
}

.ladder-win-info {
  font-size: 10px;
  color: var(--neon-gold);
  margin-bottom: 16px;
}

/* ─── Ladder Steps ─── */
.ladder-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.ladder-step {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  font-size: 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.5);
  transition: all 0.08s;
  position: relative;
}

.ladder-step.active {
  border-color: currentColor;
  box-shadow:
    0 0 10px currentColor,
    inset 0 0 10px rgba(255, 255, 255, 0.1);
  transform: scaleX(1.05);
  font-weight: bold;
}

.ladder-step__value {
  position: absolute;
  right: 10px;
  font-size: 8px;
  opacity: 0.6;
}

/* ─── Ladder Controls ─── */
.ladder-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.ladder-result {
  font-size: 14px;
  margin-top: 16px;
  min-height: 30px;
}

/* ─── VERLOREN Effect ─── */
.verloren-text {
  font-size: clamp(20px, 6vw, 40px);
  color: var(--neon-red);
  text-shadow: 0 0 10px var(--neon-red), 0 0 20px var(--neon-red), 0 0 40px var(--neon-red);
  animation: winTextPop 0.5s ease-out;
}

.ladder-step.flash-red {
  border-color: var(--neon-red) !important;
  box-shadow: 0 0 10px var(--neon-red) !important;
}

/* ─── Ladder Trail ─── */
.ladder-step.trail {
  border-color: currentColor;
  opacity: 0.4;
  box-shadow: 0 0 5px currentColor;
}

/* ═══════════════════════════════════════════════════════
   PUSH-UP CLIMBER MODE
   ═══════════════════════════════════════════════════════ */

/* Crash risk indicator */
.pushup-danger {
  font-family: var(--font-main);
  font-size: 9px;
  color: var(--neon-green);
  margin-bottom: 10px;
  padding: 4px 12px;
  border: 1px solid rgba(118, 255, 3, 0.3);
  border-radius: 4px;
  display: inline-block;
  transition: all 0.3s;
}

.pushup-danger--mid {
  color: var(--neon-orange);
  border-color: rgba(255, 145, 0, 0.4);
  box-shadow: 0 0 8px rgba(255, 145, 0, 0.2);
}

.pushup-danger--high {
  color: var(--neon-red);
  border-color: rgba(255, 23, 68, 0.5);
  box-shadow: 0 0 12px rgba(255, 23, 68, 0.3);
  animation: dangerPulse 0.6s ease-in-out infinite;
}

@keyframes dangerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

#pushup-risk-val {
  font-weight: bold;
}

/* Reached steps (filled in) */
.ladder-step.pushup-reached {
  border-color: currentColor;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.05);
  opacity: 0.8;
}

.ladder-step.pushup-reached.active {
  opacity: 1;
  box-shadow:
    0 0 10px currentColor,
    inset 0 0 10px rgba(255, 255, 255, 0.1);
  transform: scaleX(1.05);
  font-weight: bold;
}

/* Next step preview (pulsing border) */
.ladder-step.pushup-next {
  border-color: currentColor;
  opacity: 0.35;
  animation: pushupNextPulse 1s ease-in-out infinite;
}

@keyframes pushupNextPulse {
  0%, 100% { opacity: 0.2; border-style: dashed; }
  50% { opacity: 0.5; border-style: solid; }
}

/* Crash zone (bottom step) */
.pushup-crash-zone {
  background: rgba(255, 23, 68, 0.1) !important;
  border-color: rgba(255, 23, 68, 0.3) !important;
}

/* Falling animation (crash cascade) */
.ladder-step.pushup-falling {
  animation: pushupFall 0.15s ease-out;
  border-color: var(--neon-red) !important;
  box-shadow: 0 0 12px var(--neon-red) !important;
}

@keyframes pushupFall {
  0% { background: rgba(255, 23, 68, 0.4); transform: scaleX(1.08); }
  100% { background: rgba(255, 23, 68, 0.05); transform: scaleX(1); }
}

/* Push-up button styling */
.btn--push-up {
  padding: 12px 24px !important;
  font-size: 12px !important;
  min-width: 120px;
  animation: pushBtnGlow 1.5s ease-in-out infinite;
}

@keyframes pushBtnGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(118, 255, 3, 0.3); }
  50% { box-shadow: 0 0 25px rgba(118, 255, 3, 0.6); }
}

.btn--push-up:disabled {
  animation: none;
}

.btn--cash-out {
  padding: 12px 20px !important;
  font-size: 10px !important;
}

/* Push-up controls layout */
.pushup-controls {
  gap: 16px !important;
  flex-direction: column;
  align-items: center;
}

/* ─── Level-Up Mega Celebration ─── */
@keyframes levelUpBounce {
  0% { transform: scale(0.1); opacity: 0; }
  50% { transform: scale(1.3); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes levelNumGlow {
  0%, 100% { text-shadow: 0 0 10px var(--neon-gold), 0 0 20px var(--neon-gold); }
  50% { text-shadow: 0 0 20px var(--neon-gold), 0 0 40px var(--neon-gold), 0 0 60px var(--neon-gold); }
}

.levelup-mega .levelup-text {
  animation: levelUpBounce 0.6s ease-out;
  font-size: clamp(20px, 6vw, 36px);
}

.levelup-mega .levelup-number {
  font-size: clamp(28px, 8vw, 48px);
  color: var(--neon-gold);
  animation: levelNumGlow 1s ease-in-out infinite;
  margin-top: 10px;
}

/* ═══════════════════════════════════════════════════════
   HORROR THEME — 80er Slasher Vibes
   ═══════════════════════════════════════════════════════ */

/* ─── Horror Mode Game Screen ─── */
.horror-mode .game-wall {
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0px, transparent 28px,
      rgba(139, 0, 0, 0.03) 28px, rgba(139, 0, 0, 0.03) 30px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0px, transparent 58px,
      rgba(139, 0, 0, 0.02) 58px, rgba(139, 0, 0, 0.02) 60px
    ),
    #0a0404;
}

.horror-mode .wall-neon-sign {
  color: var(--neon-red) !important;
  text-shadow: 0 0 7px #ff1744, 0 0 10px #ff1744, 0 0 21px #ff1744 !important;
}

.horror-mode .cabinet-marquee {
  background: linear-gradient(180deg, #1a0808, #2a0a0a);
  border-bottom-color: rgba(183, 28, 28, 0.6);
  box-shadow: 0 2px 15px rgba(183, 28, 28, 0.3);
}

.horror-mode .marquee-text {
  color: #ff1744 !important;
  text-shadow: 0 0 7px #ff1744, 0 0 15px #ff1744 !important;
}

.horror-mode .chase-bulb {
  animation-name: chaseBulbHorror;
}

@keyframes chaseBulbHorror {
  0%, 100% { background: rgba(183, 28, 28, 0.1); box-shadow: none; }
  8%, 12% {
    background: #ff1744;
    box-shadow: 0 0 4px #ff1744, 0 0 8px rgba(255, 23, 68, 0.5);
  }
}

.horror-mode .cabinet-screen {
  box-shadow: inset 0 0 30px rgba(139, 0, 0, 0.4);
}

.horror-mode .cabinet-body {
  background: linear-gradient(180deg, #1a0808 0%, #120505 50%, #0e0404 100%);
}

.horror-mode .cabinet-side--left {
  background: linear-gradient(90deg, #050101 0%, #0d0404 100%);
}

.horror-mode .cabinet-side--right {
  background: linear-gradient(90deg, #0d0404 0%, #050101 100%);
}

.horror-mode .reel-window {
  background: rgba(20, 0, 0, 0.4);
}

.horror-mode .symbol-cell {
  box-shadow: inset 0 0 4px rgba(139, 0, 0, 0.3);
}

.horror-mode .win-display {
  border-color: rgba(255, 23, 68, 0.15);
  background: rgba(20, 0, 0, 0.4);
}

.horror-mode .btn--spin {
  border-color: var(--neon-red);
  color: var(--neon-red);
  background: rgba(255, 23, 68, 0.1);
  box-shadow: 0 0 15px rgba(255, 23, 68, 0.3), inset 0 0 15px rgba(255, 23, 68, 0.1);
}

.horror-mode .btn--spin:hover:not(:disabled) {
  box-shadow: 0 0 30px rgba(255, 23, 68, 0.6);
  background: rgba(255, 23, 68, 0.2);
}

/* ─── Horror Flicker / Glitch ─── */
@keyframes horrorFlicker {
  0% { opacity: 1; }
  5% { opacity: 0.3; }
  10% { opacity: 1; }
  15% { opacity: 0.6; transform: translateX(-2px); }
  20% { opacity: 1; transform: translateX(0); }
  50% { opacity: 0.1; }
  52% { opacity: 1; }
  100% { opacity: 1; }
}

.horror-flicker {
  animation: horrorFlicker 0.6s ease-in-out;
}

@keyframes horrorGlitch {
  0% { transform: translateX(0); filter: none; }
  25% { transform: translateX(-3px) skewX(-1deg); filter: hue-rotate(90deg); }
  50% { transform: translateX(2px) skewX(0.5deg); filter: saturate(3); }
  75% { transform: translateX(-1px); filter: hue-rotate(-30deg); }
  100% { transform: translateX(0); filter: none; }
}

.horror-glitch {
  animation: horrorGlitch 0.2s ease-in-out;
}

/* ─── Jumpscare Overlay ─── */
.jumpscare-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
  pointer-events: none;
}

.jumpscare-overlay.active {
  display: flex;
}

/* ─── VHS Noise ─── */
.jumpscare-noise {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px, transparent 1px,
    rgba(255, 255, 255, 0.015) 1px, rgba(255, 255, 255, 0.015) 2px
  );
  animation: vhsNoise 0.1s steps(3) infinite;
  pointer-events: none;
}

@keyframes vhsNoise {
  0% { background-position: 0 0; }
  33% { background-position: 0 -2px; }
  66% { background-position: 0 1px; }
  100% { background-position: 0 -1px; }
}

/* ─── Jumpscare Text ─── */
@keyframes scareTextGlitch {
  0% { transform: translate(0, 0) scale(0.3); opacity: 0; clip-path: inset(0 0 100% 0); }
  10% { transform: translate(-5px, 3px) scale(1.5); opacity: 1; clip-path: inset(0 0 0 0); }
  20% { transform: translate(3px, -2px) scale(1.4) skewX(10deg); }
  30% { transform: translate(-2px, 1px) scale(1.6) skewX(-5deg); }
  50% { transform: translate(0, 0) scale(1.3); }
  70% { transform: translate(2px, -3px) scale(1.5) skewX(3deg); }
  90% { transform: translate(0, 0) scale(1.2); opacity: 0.8; }
  100% { transform: translate(0, 0) scale(1); opacity: 0; }
}

.jumpscare-text {
  font-size: clamp(40px, 15vw, 120px);
  color: #ff1744;
  font-family: var(--font-main);
  text-shadow:
    0 0 20px #ff1744,
    0 0 40px #ff1744,
    0 0 80px rgba(255, 23, 68, 0.5),
    3px 3px 0 #000,
    -3px -3px 0 #b71c1c;
  animation: scareTextGlitch 1s ease-out forwards;
  z-index: 2;
  position: relative;
  letter-spacing: 8px;
}

/* Glitch pseudo-elements for RGB split */
.jumpscare-text::before,
.jumpscare-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
}

.jumpscare-text::before {
  color: #00e5ff;
  animation: rgbShift1 0.15s steps(2) infinite;
}

.jumpscare-text::after {
  color: #76ff03;
  animation: rgbShift2 0.15s steps(2) infinite;
}

@keyframes rgbShift1 {
  0% { transform: translate(-3px, 1px); opacity: 0.7; }
  100% { transform: translate(3px, -1px); opacity: 0.5; }
}

@keyframes rgbShift2 {
  0% { transform: translate(2px, -2px); opacity: 0.5; }
  100% { transform: translate(-2px, 2px); opacity: 0.3; }
}

/* ─── Skull Face (4+ skulls) ─── */
@keyframes faceZoomIn {
  0% { transform: scale(5); opacity: 0; }
  15% { transform: scale(1.2); opacity: 0.9; }
  30% { transform: scale(1); opacity: 1; }
  80% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(2); opacity: 0; }
}

.jumpscare-face {
  position: absolute;
  font-size: clamp(80px, 25vw, 200px);
  z-index: 1;
  animation: faceZoomIn 1.2s ease-out forwards;
  filter: drop-shadow(0 0 30px #ff1744) brightness(2);
}

/* ─── Red Flash ─── */
.jumpscare-flash {
  position: absolute;
  inset: 0;
  background: #ff1744;
  animation: jumpscareFlash 0.3s ease-out forwards;
  z-index: 0;
}

@keyframes jumpscareFlash {
  0% { opacity: 0.8; }
  100% { opacity: 0; }
}

/* ─── Intensity Levels ─── */
.intensity-1 .jumpscare-text { font-size: clamp(30px, 12vw, 80px); }
.intensity-2 .jumpscare-text { font-size: clamp(40px, 15vw, 120px); }
.intensity-3 .jumpscare-text { font-size: clamp(60px, 20vw, 160px); }
.intensity-3 .jumpscare-noise { opacity: 0.5; }

/* ─── Spooky Win Display Text ─── */
@keyframes spookyFade {
  0% { opacity: 0; letter-spacing: 8px; }
  50% { opacity: 0.8; }
  100% { opacity: 0; letter-spacing: 2px; }
}

.spooky-text {
  animation: spookyFade 1s ease-in-out;
  font-style: italic;
}

/* ─── Ambient Corner Face ─── */
.horror-corner-face {
  position: fixed;
  font-size: 40px;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  animation: cornerPeek 0.4s ease-out forwards;
}

@keyframes cornerPeek {
  0% { opacity: 0; transform: scale(0.5); }
  30% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.2); }
}

/* ═══════════════════════════════════════════════════════
   BONUS GAMES — Cherry Catcher, Diamond Rain, Star Blitz
   ═══════════════════════════════════════════════════════ */

/* ─── Bonus Overlay ─── */
.bonus-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.bonus-overlay.active {
  display: flex;
}

.bonus-overlay--horror {
  background: rgba(20, 0, 0, 0.97);
}

/* ─── Bonus Intro ─── */
.bonus-intro {
  text-align: center;
  animation: bonusIntroZoom 1.5s ease-out;
}

.bonus-intro__icon {
  font-size: clamp(48px, 15vw, 100px);
  margin-bottom: 16px;
  animation: bonusIconPulse 0.6s ease-in-out infinite alternate;
}

.bonus-intro__title {
  font-size: clamp(16px, 5vw, 32px);
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.bonus-intro__sub {
  font-size: clamp(10px, 3vw, 16px);
  color: var(--neon-cyan);
  animation: blink 0.8s infinite;
}

@keyframes bonusIntroZoom {
  0% { transform: scale(0.1) rotate(-10deg); opacity: 0; }
  40% { transform: scale(1.2) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

@keyframes bonusIconPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); }
}

/* ─── Bonus Game Container ─── */
.bonus-game {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ─── Bonus HUD ─── */
.bonus-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.8);
  border-bottom: 2px solid rgba(255, 214, 0, 0.3);
  z-index: 10;
  font-size: clamp(8px, 2.5vw, 12px);
}

.bonus-hud__score {
  color: var(--neon-gold);
  text-shadow: 0 0 8px var(--neon-gold);
}

.bonus-hud__time {
  color: var(--neon-red);
  text-shadow: 0 0 8px var(--neon-red);
}

.bonus-hud__caught {
  color: var(--neon-cyan);
}

/* ─── Bonus Arena (Catcher games) ─── */
.bonus-arena {
  flex: 1;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0, 229, 255, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.8) 100%);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.bonus-arena--blitz {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 214, 0, 0.03) 0%, transparent 60%),
    rgba(0, 0, 0, 0.5);
}

.bonus-arena--flash-red {
  box-shadow: inset 0 0 60px rgba(255, 23, 68, 0.5);
}

/* ─── Basket ─── */
.bonus-basket {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  width: 16%;
  min-width: 60px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--neon-cyan);
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: rgba(0, 229, 255, 0.08);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
  transition: left 0.05s linear;
  z-index: 5;
}

.bonus-basket__icon {
  font-size: 24px;
}

/* ─── Falling Items ─── */
.bonus-item {
  position: absolute;
  font-size: clamp(20px, 6vw, 32px);
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  transition: top 0.016s linear;
}

.bonus-item--bomb {
  filter: drop-shadow(0 2px 8px rgba(255, 23, 68, 0.5));
}

.bonus-item--caught {
  animation: itemCaught 0.3s ease-out forwards;
}

@keyframes itemCaught {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.8; }
  100% { transform: scale(0) translateY(-20px); opacity: 0; }
}

.bonus-item--missed {
  animation: itemMissed 0.3s ease-out forwards;
}

@keyframes itemMissed {
  0% { opacity: 0.5; }
  100% { opacity: 0; transform: translateY(10px); }
}

.bonus-item--explode {
  animation: itemExplode 0.4s ease-out forwards;
}

@keyframes itemExplode {
  0% { transform: scale(1); opacity: 1; }
  30% { transform: scale(2); opacity: 1; }
  100% { transform: scale(3); opacity: 0; }
}

/* ─── Star Blitz / Ghost Hunt Targets ─── */
.bonus-target {
  position: absolute;
  font-size: clamp(28px, 8vw, 48px);
  cursor: pointer;
  z-index: 5;
  animation: targetAppear var(--target-life, 1.5s) ease-in-out forwards;
  filter: drop-shadow(0 0 10px currentColor);
  transition: transform 0.1s;
}

.bonus-target:active {
  transform: scale(0.8);
}

@keyframes targetAppear {
  0% { transform: scale(0); opacity: 0; }
  15% { transform: scale(1.2); opacity: 1; }
  75% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.5); opacity: 0; }
}

.bonus-target--bomb {
  filter: drop-shadow(0 0 8px rgba(255, 23, 68, 0.6));
}

.bonus-target--hit {
  animation: targetHit 0.2s ease-out forwards !important;
}

@keyframes targetHit {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

.bonus-target--explode {
  animation: itemExplode 0.4s ease-out forwards !important;
}

.bonus-target--fade {
  animation: targetFade 0.3s ease-out forwards !important;
}

@keyframes targetFade {
  0% { opacity: 0.5; }
  100% { opacity: 0; transform: scale(0.3); }
}

/* ─── Bonus Result ─── */
.bonus-result {
  text-align: center;
  animation: bonusResultPop 0.6s ease-out;
}

.bonus-result__title {
  font-size: clamp(16px, 5vw, 28px);
  letter-spacing: 3px;
  margin-bottom: 24px;
}

.bonus-result__score {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bonus-result__amount {
  font-size: clamp(28px, 10vw, 56px);
  color: var(--neon-gold);
  text-shadow: 0 0 15px var(--neon-gold), 0 0 30px var(--neon-gold);
  animation: counterPulse 0.5s ease-in-out infinite alternate;
}

.bonus-result__label {
  font-size: clamp(10px, 3vw, 16px);
  color: var(--neon-cyan);
  letter-spacing: 6px;
}

@keyframes bonusResultPop {
  0% { transform: scale(0.2); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* ─── Diamond Rain variant ─── */
.bonus-game--diamond .bonus-basket {
  border-color: var(--neon-purple);
  background: rgba(224, 64, 251, 0.08);
  box-shadow: 0 0 12px rgba(224, 64, 251, 0.3);
}

.bonus-game--diamond .bonus-hud {
  border-bottom-color: rgba(224, 64, 251, 0.3);
}

/* ─── Horror overlay variant ─── */
.bonus-overlay--horror .bonus-arena {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(139, 0, 0, 0.1) 0%, transparent 60%),
    rgba(10, 0, 0, 0.8);
}

.bonus-overlay--horror .bonus-hud {
  border-bottom-color: rgba(255, 23, 68, 0.3);
}

.bonus-overlay--horror .bonus-target {
  filter: drop-shadow(0 0 12px rgba(176, 190, 197, 0.6));
}

/* ═══════════════════════════════════════════════════════
   SALOON SHOOTOUT — Western Theme
   ═══════════════════════════════════════════════════════ */

.bonus-overlay--western {
  background: rgba(30, 15, 5, 0.97);
}

.bonus-arena--western {
  background:
    linear-gradient(180deg,
      rgba(255, 145, 0, 0.05) 0%,
      rgba(139, 69, 19, 0.1) 60%,
      rgba(101, 67, 33, 0.3) 100%) !important;
}

.saloon-bg {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 35%;
  border: 3px solid rgba(139, 69, 19, 0.4);
  border-bottom: none;
  background: rgba(60, 30, 10, 0.4);
  pointer-events: none;
}

.saloon-bg::before {
  content: 'SALOON';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-main);
  font-size: 10px;
  color: var(--neon-gold);
  letter-spacing: 3px;
  text-shadow: 0 0 8px rgba(255, 214, 0, 0.5);
}

.saloon-door {
  position: absolute;
  bottom: 0;
  left: 30%;
  width: 20%;
  height: 50%;
  border: 2px solid rgba(139, 69, 19, 0.5);
  background: rgba(101, 67, 33, 0.3);
}

.saloon-door--right {
  left: auto;
  right: 30%;
}

.bonus-target--sack {
  font-size: clamp(24px, 7vw, 40px) !important;
  filter: drop-shadow(0 0 6px rgba(255, 145, 0, 0.4));
}

.bonus-target--bandit {
  filter: drop-shadow(0 0 8px rgba(255, 23, 68, 0.5)) !important;
}

/* ═══════════════════════════════════════════════════════
   CEMETERY — Horror Skeleton Swipe
   ═══════════════════════════════════════════════════════ */

.bonus-arena--cemetery {
  background:
    linear-gradient(180deg,
      rgba(10, 0, 20, 0.6) 0%,
      rgba(20, 0, 10, 0.8) 40%,
      rgba(30, 20, 10, 0.5) 100%) !important;
}

.cemetery-grave {
  position: absolute;
  font-size: 20px;
  pointer-events: none;
  opacity: 0.6;
  filter: grayscale(0.5);
}

.cemetery-skeleton {
  position: absolute;
  font-size: clamp(28px, 8vw, 44px);
  cursor: grab;
  z-index: 5;
  transition: top 0.05s linear;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
  animation: skeletonRise 0.5s ease-out;
}

.cemetery-ghost {
  filter: drop-shadow(0 0 12px rgba(176, 190, 197, 0.6));
  opacity: 0.7;
}

@keyframes skeletonRise {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.cemetery-skeleton--pushed {
  animation: skeletonPush 0.4s ease-in forwards !important;
}

@keyframes skeletonPush {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(60px) scale(0.5); opacity: 0; }
}

.cemetery-skeleton--explode {
  animation: itemExplode 0.4s ease-out forwards !important;
}

.cemetery-skeleton--escaped {
  animation: skeletonEscape 0.5s ease-out forwards !important;
}

@keyframes skeletonEscape {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  50% { transform: translateY(-30px) scale(1.2); opacity: 0.8; }
  100% { transform: translateY(-60px) scale(0.5); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════
   BANK ROBBERY — 80s Neon Heist
   ═══════════════════════════════════════════════════════ */

.bonus-overlay--bank {
  background: rgba(5, 5, 20, 0.97);
}

.bonus-arena--bank {
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0px, transparent 40px,
      rgba(0, 229, 255, 0.02) 40px, rgba(0, 229, 255, 0.02) 41px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0px, transparent 40px,
      rgba(0, 229, 255, 0.02) 40px, rgba(0, 229, 255, 0.02) 41px
    ),
    rgba(5, 5, 15, 0.9) !important;
}

.bank-vault {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 25%;
  border: 3px solid rgba(0, 229, 255, 0.2);
  border-radius: 8px;
  pointer-events: none;
}

.bank-vault::before {
  content: 'VAULT';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-main);
  font-size: 12px;
  color: var(--neon-cyan);
  letter-spacing: 4px;
  opacity: 0.4;
}

.bank-alarm {
  display: none;
  position: absolute;
  top: 3%;
  right: 5%;
  font-family: var(--font-main);
  font-size: 10px;
  color: var(--neon-red);
  letter-spacing: 2px;
  animation: alarmFlash 0.5s ease-in-out infinite;
}

.bank-alarm.active {
  display: block;
}

@keyframes alarmFlash {
  0%, 100% { opacity: 1; text-shadow: 0 0 10px var(--neon-red); }
  50% { opacity: 0.3; text-shadow: none; }
}

.bonus-arena--alarm {
  box-shadow: inset 0 0 40px rgba(255, 23, 68, 0.15) !important;
  animation: alarmPulse 1s ease-in-out infinite;
}

@keyframes alarmPulse {
  0%, 100% { box-shadow: inset 0 0 40px rgba(255, 23, 68, 0.1); }
  50% { box-shadow: inset 0 0 60px rgba(255, 23, 68, 0.25); }
}

.bonus-target--cash {
  font-size: clamp(24px, 7vw, 40px) !important;
  filter: drop-shadow(0 0 8px rgba(118, 255, 3, 0.4));
}

.bonus-target--cop {
  filter: drop-shadow(0 0 10px rgba(255, 23, 68, 0.6)) !important;
}

/* ═══════════════════════════════════════════════════════
   SPACE INVADERS — Retro Atari Style
   ═══════════════════════════════════════════════════════ */

.bonus-overlay--space {
  background: rgba(0, 0, 10, 0.98);
}

.bonus-arena--space {
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 60% 10%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 80% 50%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 10% 80%, rgba(255, 255, 255, 0.15), transparent),
    radial-gradient(1px 1px at 90% 20%, rgba(255, 255, 255, 0.25), transparent),
    rgba(0, 0, 10, 1) !important;
}

.space-ship {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(24px, 7vw, 36px);
  color: var(--neon-green);
  text-shadow: 0 0 10px var(--neon-green), 0 0 20px rgba(118, 255, 3, 0.3);
  z-index: 10;
  transition: left 0.03s linear;
}

.space-bullet {
  position: absolute;
  width: 3px;
  height: 12px;
  background: var(--neon-green);
  box-shadow: 0 0 6px var(--neon-green);
  transform: translateX(-50%);
  z-index: 5;
  transition: top 0.016s linear;
}

.space-bullet--hit {
  animation: bulletHit 0.15s ease-out forwards;
}

@keyframes bulletHit {
  0% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) scale(3); }
}

.space-alien {
  position: absolute;
  font-size: clamp(20px, 6vw, 32px);
  z-index: 3;
  transition: top 0.05s linear;
  filter: drop-shadow(0 0 6px rgba(224, 64, 251, 0.4));
}

.space-alien--explode {
  animation: alienExplode 0.3s ease-out forwards;
}

@keyframes alienExplode {
  0% { transform: scale(1); opacity: 1; filter: brightness(3); }
  50% { transform: scale(1.8); opacity: 0.8; }
  100% { transform: scale(0); opacity: 0; }
}

.space-alien--crash {
  animation: alienCrash 0.3s ease-out forwards;
}

@keyframes alienCrash {
  0% { opacity: 1; }
  50% { transform: scale(1.5); filter: brightness(3) hue-rotate(90deg); }
  100% { opacity: 0; transform: scale(0.5); }
}

/* ═══════════════════════════════════════════════════════
   WHACK-A-MOLE — Grid-based tap game
   ═══════════════════════════════════════════════════════ */

.bonus-arena--whack {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  padding: 16px;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 145, 0, 0.05) 0%, transparent 60%),
    rgba(20, 10, 0, 0.9) !important;
}

.whack-hole {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 50%;
  background: rgba(60, 30, 10, 0.5);
  border: 2px solid rgba(139, 69, 19, 0.3);
  overflow: hidden;
  min-height: 60px;
}

.whack-hole__mound {
  font-size: 10px;
  color: rgba(139, 69, 19, 0.4);
  padding-bottom: 4px;
}

.whack-mole {
  position: absolute;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(24px, 7vw, 40px);
  cursor: pointer;
  z-index: 5;
  transition: bottom 0.2s ease-out;
  filter: drop-shadow(0 0 8px currentColor);
}

.whack-mole--up {
  bottom: 15%;
}

.whack-mole--trap {
  filter: drop-shadow(0 0 8px rgba(255, 23, 68, 0.6));
}

.whack-mole--hit {
  animation: whackHit 0.2s ease-out forwards;
}

@keyframes whackHit {
  0% { transform: translateX(-50%) scale(1); opacity: 1; }
  50% { transform: translateX(-50%) scale(1.5) rotate(15deg); }
  100% { transform: translateX(-50%) scale(0) rotate(30deg); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════
   COIN AVALANCHE — Swipe coins into buckets
   ═══════════════════════════════════════════════════════ */

.bonus-arena--avalanche {
  background:
    linear-gradient(180deg,
      rgba(255, 214, 0, 0.03) 0%,
      rgba(0, 0, 0, 0.8) 100%) !important;
}

.avalanche-bucket {
  position: absolute;
  bottom: 5%;
  font-size: clamp(28px, 8vw, 44px);
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.4));
}

.avalanche-bucket--left {
  left: 5%;
}

.avalanche-bucket--right {
  right: 5%;
}

.avalanche-coin {
  position: absolute;
  font-size: clamp(24px, 7vw, 38px);
  cursor: grab;
  z-index: 5;
  transition: top 0.016s linear;
  filter: drop-shadow(0 2px 8px rgba(255, 214, 0, 0.4));
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.avalanche-coin--bomb {
  filter: drop-shadow(0 2px 8px rgba(255, 23, 68, 0.5));
}

.avalanche-coin--swiped-left {
  animation: swipeLeft 0.3s ease-out forwards;
}

.avalanche-coin--swiped-right {
  animation: swipeRight 0.3s ease-out forwards;
}

@keyframes swipeLeft {
  0% { transform: translateX(0) scale(1); opacity: 1; }
  100% { transform: translateX(-120px) scale(0.5); opacity: 0; }
}

@keyframes swipeRight {
  0% { transform: translateX(0) scale(1); opacity: 1; }
  100% { transform: translateX(120px) scale(0.5); opacity: 0; }
}

.avalanche-coin--explode {
  animation: itemExplode 0.4s ease-out forwards;
}

/* ═══════════════════════════════════════════════════════
   SAFE CRACKER — Number combination game
   ═══════════════════════════════════════════════════════ */

.bonus-arena--safe {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(0, 229, 255, 0.05) 0%, transparent 60%),
    rgba(5, 5, 20, 0.95) !important;
}

.safe-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border: 2px solid rgba(0, 229, 255, 0.3);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.5);
  min-width: 200px;
  transition: all 0.3s;
}

.safe-display--cracked {
  border-color: var(--neon-green) !important;
  box-shadow: 0 0 20px rgba(118, 255, 3, 0.4);
}

.safe-display--wrong {
  border-color: var(--neon-red) !important;
  box-shadow: 0 0 20px rgba(255, 23, 68, 0.4);
  animation: safeShake 0.3s ease-out;
}

@keyframes safeShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.safe-icon {
  font-size: clamp(32px, 10vw, 56px);
}

.safe-combo {
  font-family: var(--font-main);
  font-size: clamp(14px, 4vw, 22px);
  color: var(--neon-cyan);
  letter-spacing: 4px;
  text-shadow: 0 0 8px var(--neon-cyan);
  transition: opacity 0.5s;
}

.safe-input {
  font-family: var(--font-main);
  font-size: clamp(14px, 4vw, 22px);
  color: var(--neon-gold);
  letter-spacing: 4px;
  text-shadow: 0 0 8px var(--neon-gold);
  min-height: 24px;
}

.safe-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 240px;
  width: 100%;
}

.safe-key {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-family: var(--font-main);
  font-size: clamp(14px, 4vw, 20px);
  color: var(--neon-cyan);
  border: 2px solid rgba(0, 229, 255, 0.3);
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.05);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  -webkit-user-select: none;
}

.safe-key:hover {
  border-color: var(--neon-cyan);
  background: rgba(0, 229, 255, 0.15);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.safe-key:active {
  transform: scale(0.9);
  background: rgba(0, 229, 255, 0.25);
}
