/* ============================================
   FORTUNE PALACE — Las Vegas Neon Casino
   5×5 Grid Slot Machine
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #060012;
  --bg-secondary: #0e0628;
  --bg-card: #120824;
  --gold: #FFD700;
  --gold-light: #ffe566;
  --gold-dark: #FFA500;
  --gold-deep: #b38600;
  --neon-pink: #ff2d78;
  --neon-purple: #b44dff;
  --neon-green: #00ff88;
  --slot-bg: #0a0424;
  --cell-bg: #0c0530;
  --cell-border: #1a0e48;
  --text-primary: #ffffff;
  --text-gold: #e0c880;
  --text-muted: #8a7a9a;
  --radius: 12px;
  --radius-sm: 8px;
}

/* --- @property for animated gradient angle --- */
@property --gradient-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 40%, rgba(180, 77, 255, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 45, 120, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(0, 255, 136, 0.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* --- Navigation --- */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: rgba(6, 0, 18, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 215, 0, 0.12);
}

.nav-logo {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--gold);
  text-shadow:
    0 0 10px rgba(255, 215, 0, 0.6),
    0 0 30px rgba(255, 215, 0, 0.3);
  text-transform: uppercase;
  animation: neon-flicker 3s ease-in-out infinite;
}

.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-links a {
  color: var(--text-gold);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s, text-shadow 0.2s;
}

.nav-links .cta-btn.outline {
  font-size: 14px;
  padding: 6px 16px;
  border-width: 2px;
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(255, 45, 120, 0.6);
  box-shadow:
    0 0 10px rgba(255, 45, 120, 0.25),
    0 0 20px rgba(255, 45, 120, 0.1);
}

.nav-links .cta-btn.outline::before {
  display: none;
}

.nav-links a:hover {
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.nav-btn {
  display: inline-block;
  padding: 10px 28px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a0a00;
  font-weight: 900;
  font-size: 16px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow:
    0 0 15px rgba(255, 215, 0, 0.4),
    0 0 30px rgba(255, 215, 0, 0.15),
    0 0 50px rgba(255, 215, 0, 0.08);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
  animation: nav-btn-pulse 1.8s ease-in-out infinite alternate;
}

@keyframes nav-btn-pulse {
  0% {
    box-shadow:
      0 0 15px rgba(255, 215, 0, 0.4),
      0 0 30px rgba(255, 215, 0, 0.15),
      0 0 50px rgba(255, 215, 0, 0.08);
  }
  100% {
    box-shadow:
      0 0 20px rgba(255, 215, 0, 0.6),
      0 0 40px rgba(255, 215, 0, 0.3),
      0 0 70px rgba(255, 215, 0, 0.12);
  }
}

.nav-btn:hover {
  transform: scale(1.08);
  box-shadow:
    0 0 25px rgba(255, 215, 0, 0.7),
    0 0 50px rgba(255, 215, 0, 0.35),
    0 0 80px rgba(255, 215, 0, 0.15);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 50px 12px 40px;
  z-index: 1;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* --- 3D Gold Text --- */
.hero-header {
  text-align: center;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 4px;
  text-shadow:
    0 0 10px rgba(255, 215, 0, 0.5),
    0 1px 0 #e6ac00,
    0 2px 0 #cc9900,
    0 3px 8px rgba(0, 0, 0, 0.6);
}

.hero-amount {
  font-size: 56px;
  font-weight: 900;
  font-style: italic;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
  text-shadow:
    0 0 15px rgba(255, 215, 0, 0.8),
    0 0 40px rgba(255, 215, 0, 0.4),
    0 0 80px rgba(255, 215, 0, 0.2),
    0 2px 0 #e6ac00,
    0 4px 0 #cc9900,
    0 6px 0 #b38600,
    0 8px 20px rgba(0, 0, 0, 0.7);
  animation: gold-pulse 2s ease-in-out infinite;
}

@keyframes gold-pulse {
  0%, 100% {
    text-shadow:
      0 0 15px rgba(255, 215, 0, 0.8),
      0 0 40px rgba(255, 215, 0, 0.4),
      0 0 80px rgba(255, 215, 0, 0.2),
      0 2px 0 #e6ac00,
      0 4px 0 #cc9900,
      0 6px 0 #b38600,
      0 8px 20px rgba(0, 0, 0, 0.7);
  }
  50% {
    text-shadow:
      0 0 25px rgba(255, 215, 0, 1),
      0 0 60px rgba(255, 215, 0, 0.6),
      0 0 120px rgba(255, 215, 0, 0.3),
      0 2px 0 #e6ac00,
      0 4px 0 #cc9900,
      0 6px 0 #b38600,
      0 8px 20px rgba(0, 0, 0, 0.7);
  }
}

.hero-subtitle {
  font-size: 14px;
  color: var(--text-gold);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.15);
  letter-spacing: 1px;
}

/* ============================================
   SLOT MACHINE — 5×5 Luxury Grid
   ============================================ */

.slot-machine-container {
  width: 100%;
  max-width: 400px;
  position: relative;
}

/* --- Gold Metallic Frame --- */
.slot-frame {
  position: relative;
  background: linear-gradient(180deg, #1a0c3a 0%, #0e0628 40%, #0a0424 100%);
  border-radius: 16px;
  padding: 3px;
  box-shadow:
    0 0 30px rgba(255, 215, 0, 0.15),
    0 0 60px rgba(180, 77, 255, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.6);
}

/* Outer gold border gradient */
.slot-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(180deg,
    var(--gold-light) 0%,
    var(--gold) 15%,
    var(--gold-deep) 30%,
    var(--gold) 50%,
    var(--gold-dark) 70%,
    var(--gold-deep) 85%,
    var(--gold) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

/* Chasing glow on frame */
.slot-frame::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 20px;
  background: conic-gradient(
    from var(--gradient-angle),
    rgba(255, 215, 0, 0.3),
    rgba(180, 77, 255, 0.2),
    rgba(0, 255, 136, 0.2),
    rgba(255, 45, 120, 0.2),
    rgba(255, 215, 0, 0.3)
  );
  z-index: -1;
  animation: rotate-lights 4s linear infinite;
  filter: blur(8px);
  opacity: 0.5;
}

@keyframes rotate-lights {
  to { --gradient-angle: 360deg; }
}

.slot-inner {
  background: linear-gradient(180deg, #12082e 0%, #0a0424 40%, #0e0628 100%);
  border-radius: 14px;
  padding: 12px;
}

/* --- Machine Header (JACKPOT) --- */
.machine-header {
  text-align: center;
  padding: 6px 0 10px;
  position: relative;
}

.machine-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 8px;
  color: var(--neon-green);
  text-shadow:
    0 0 8px rgba(0, 255, 136, 0.8),
    0 0 25px rgba(0, 255, 136, 0.4);
  animation: neon-flicker 2.5s ease-in-out infinite;
}

@keyframes neon-flicker {
  0%, 100% { opacity: 1; }
  5% { opacity: 0.85; }
  10% { opacity: 1; }
  50% { opacity: 1; }
  52% { opacity: 0.9; }
  54% { opacity: 1; }
}

/* Torch decorations */
.torch {
  position: absolute;
  top: 0;
  font-size: 20px;
  animation: torch-flicker 1.5s ease-in-out infinite alternate;
}
.torch-left { left: 8px; }
.torch-right { right: 8px; animation-delay: 0.3s; }

@keyframes torch-flicker {
  from { opacity: 0.7; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1.05); }
}

/* --- Multiplier Selector --- */
.multiplier-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.mult-btn {
  width: 52px;
  height: 32px;
  background: linear-gradient(180deg, #1a0e48 0%, #120a38 100%);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.mult-btn.active {
  background: linear-gradient(180deg, #1a3a8a 0%, #0e2668 100%);
  border-color: rgba(100, 160, 255, 0.6);
  color: #88ccff;
  box-shadow: 0 0 10px rgba(80, 140, 255, 0.3);
}

.mult-btn:hover {
  border-color: rgba(255, 215, 0, 0.4);
}

/* --- 5×5 Reel Grid --- */
.reels-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  background: #060318;
  border-radius: 10px;
  padding: 6px;
  border: 1px solid rgba(255, 215, 0, 0.1);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
  position: relative;
}

.reel-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cell-bg);
  border: 1px solid var(--cell-border);
  border-radius: 6px;
  font-size: 28px;
  user-select: none;
  transition: transform 0.12s, background 0.12s, border-color 0.12s, box-shadow 0.12s;
  position: relative;
  overflow: hidden;
}

.reel-cell img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
}

.reel-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 50%);
  pointer-events: none;
}

/* High-value symbol styling */
.reel-cell.high-value {
  background: linear-gradient(180deg, #1a0e48 0%, #0e0838 100%);
  border-color: rgba(255, 215, 0, 0.25);
}

.reel-cell.high-value::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 4px;
  pointer-events: none;
}

/* Special symbol (wild / bonus) */
.reel-cell.special {
  background: linear-gradient(180deg, #2a0e48 0%, #180838 100%);
  border-color: rgba(255, 45, 120, 0.35);
  box-shadow: 0 0 8px rgba(255, 45, 120, 0.15);
}

/* Win highlight — blue glow matching video reference */
.reel-cell.winning {
  animation: cell-win-highlight 0.6s ease-out forwards;
  border-color: rgba(80, 160, 255, 0.8) !important;
  box-shadow: 0 0 12px rgba(80, 160, 255, 0.6), 0 0 24px rgba(80, 160, 255, 0.3), inset 0 0 8px rgba(80, 160, 255, 0.15);
  background: rgba(40, 100, 200, 0.15);
  z-index: 2;
}

@keyframes cell-win-highlight {
  0% { transform: scale(1); }
  30% { transform: scale(1.15); }
  60% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

/* Symbol disappearing (cascade step 1) */
.reel-cell.cascade-disappear {
  animation: symbol-vanish 0.4s ease-in forwards;
  pointer-events: none;
}

@keyframes symbol-vanish {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.6; }
  100% { transform: scale(0); opacity: 0; }
}

/* Symbol falling down (cascade step 2) */
.reel-cell.cascade-fall {
  animation: symbol-fall-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes symbol-fall-in {
  0% { transform: translateY(-80px); opacity: 0; }
  60% { opacity: 1; }
  80% { transform: translateY(4px); }
  100% { transform: translateY(0); opacity: 1; }
}

/* New symbol from top (cascade step 3) */
.reel-cell.cascade-new {
  animation: symbol-drop-new 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes symbol-drop-new {
  0% { transform: translateY(-100%); opacity: 0; }
  50% { opacity: 1; }
  75% { transform: translateY(5px); }
  100% { transform: translateY(0); opacity: 1; }
}

/* Cascade multiplier flash */
@keyframes mult-flash {
  0%, 100% { box-shadow: 0 0 10px rgba(80, 140, 255, 0.3); }
  50% { box-shadow: 0 0 20px rgba(80, 140, 255, 0.7), 0 0 40px rgba(80, 140, 255, 0.3); }
}

/* Reel column spinning blur */
.reel-col.spinning .reel-cell {
  filter: blur(1px);
  opacity: 0.7;
}

.reel-col.landed .reel-cell {
  filter: none;
  opacity: 1;
}

/* Payline indicator arrows */
.payline-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 10px;
  z-index: 5;
  text-shadow: 0 0 6px var(--gold);
}
.payline-arrow.left { left: -14px; }
.payline-arrow.right { right: -14px; transform: translateY(-50%) scaleX(-1); }

/* Payline line */
.payline-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
  transform: translateY(-50%);
  z-index: 4;
  pointer-events: none;
  opacity: 0.5;
}

/* --- Info Bar (提示栏) --- */
.info-bar {
  margin-top: 10px;
  padding: 12px 18px;
  background: linear-gradient(90deg, rgba(26, 14, 72, 0.5), rgba(180, 77, 255, 0.15), rgba(26, 14, 72, 0.5));
  border-radius: 8px;
  border: 1.5px solid rgba(255, 215, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  animation: info-bar-pulse 2.5s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(255, 45, 120, 0.2), 0 0 24px rgba(180, 77, 255, 0.15), inset 0 0 8px rgba(255, 215, 0, 0.08);
}

@keyframes info-bar-pulse {
  0%, 100% { border-color: rgba(255, 215, 0, 0.35); box-shadow: 0 0 12px rgba(255, 45, 120, 0.2), 0 0 24px rgba(180, 77, 255, 0.15), inset 0 0 8px rgba(255, 215, 0, 0.08); }
  50% { border-color: rgba(255, 215, 0, 0.7); box-shadow: 0 0 20px rgba(255, 45, 120, 0.4), 0 0 40px rgba(180, 77, 255, 0.3), inset 0 0 12px rgba(255, 215, 0, 0.15); }
}

.info-bar-text {
  font-size: 16px;
  color: #FFD700;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5), 0 0 16px rgba(255, 45, 120, 0.3);
  letter-spacing: 1px;
}

.info-bar .arrow-deco {
  color: var(--gold);
  font-size: 14px;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
  animation: arrow-blink 1.5s ease-in-out infinite alternate;
}

@keyframes arrow-blink {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* --- Stats Display --- */
.stats-bar {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  gap: 8px;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 10px 6px;
  background: rgba(10, 4, 36, 0.9);
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.1), inset 0 0 8px rgba(255, 215, 0, 0.05);
}

.stat-label {
  font-size: 13px;
  color: #c4a64a;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
  font-weight: 600;
}

.stat-value {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5), 0 1px 3px rgba(0,0,0,0.8);
}

.stat-value.win-value {
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5), 0 1px 3px rgba(0,0,0,0.8);
}

/* --- Controls Bar --- */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.ctrl-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  background: rgba(26, 14, 72, 0.8);
  color: #FFD700;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.15);
}

.ctrl-btn:hover {
  border-color: rgba(255, 215, 0, 0.7);
  color: #fff;
  background: rgba(26, 14, 72, 1);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

.ctrl-btn:active {
  transform: scale(0.92);
}

.ctrl-btn.secondary-btn {
  width: 36px;
  height: 36px;
  font-size: 13px;
  border-color: rgba(255, 215, 0, 0.25);
  color: rgba(255, 215, 0, 0.7);
}

/* --- Main Spin Button --- */
.spin-btn-main {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: linear-gradient(135deg, #ff3344, #cc0022, #aa0018);
  color: var(--gold);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 20px rgba(255, 50, 50, 0.4),
    0 0 40px rgba(255, 215, 0, 0.15),
    inset 0 2px 0 rgba(255, 255, 255, 0.15),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}

.spin-btn-main::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 0, 0.3);
  pointer-events: none;
}

.spin-btn-main:hover {
  transform: scale(1.08);
  box-shadow:
    0 0 30px rgba(255, 50, 50, 0.6),
    0 0 50px rgba(255, 215, 0, 0.25);
}

.spin-btn-main:active {
  transform: scale(0.95);
}

.spin-btn-main:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.spin-btn-main .spin-icon {
  animation: spin-idle 4s linear infinite;
  display: block;
}

.spin-btn-main:disabled .spin-icon {
  animation: spin-active 0.5s linear infinite;
}

@keyframes spin-idle {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin-active {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- V-Shape Bottom Decoration --- */
.v-deco {
  text-align: center;
  margin-top: 6px;
  color: var(--gold-deep);
  font-size: 28px;
  opacity: 0.3;
  letter-spacing: 4px;
}

/* --- Background Particles --- */
.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.25);
  pointer-events: none;
  animation: particle-float var(--p-duration, 6s) var(--p-delay, 0s) ease-in-out infinite;
}

@keyframes particle-float {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.2;
  }
  25% {
    transform: translateY(-20px) translateX(8px);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-35px) translateX(-5px);
    opacity: 0.7;
  }
  75% {
    transform: translateY(-15px) translateX(12px);
    opacity: 0.4;
  }
}

/* --- Coin Rain --- */
.coin-rain-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.coin {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff7a0, #FFD700, #e6ac00);
  border: 2px solid #b38600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  color: #8B6914;
  will-change: transform;
  animation: coin-fall var(--c-duration, 3s) var(--c-delay, 0s) ease-in forwards;
  pointer-events: none;
}

@keyframes coin-fall {
  0% {
    transform: translateY(-40px) rotateY(0deg) rotateZ(0deg) scale(0.5);
    opacity: 1;
  }
  20% {
    transform: translateY(20vh) rotateY(180deg) rotateZ(90deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(105vh) rotateY(1080deg) rotateZ(540deg) scale(0.8);
    opacity: 0.4;
  }
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 90%;
  max-width: 380px;
  background: linear-gradient(180deg, #1e1040 0%, #120824 100%);
  border: 2px solid var(--gold);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  box-shadow:
    0 0 40px rgba(255, 215, 0, 0.3),
    0 0 80px rgba(255, 215, 0, 0.1),
    0 20px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
}

.modal-overlay.active .modal {
  transform: scale(1);
  opacity: 1;
}

.modal-congrats {
  font-size: 26px;
  font-weight: 900;
  color: var(--neon-green);
  text-shadow:
    0 0 10px rgba(0, 255, 136, 0.8),
    0 0 30px rgba(0, 255, 136, 0.3);
  margin-bottom: 6px;
}

.modal-prize {
  font-size: 44px;
  font-weight: 900;
  font-style: italic;
  color: var(--gold);
  text-shadow:
    0 0 15px rgba(255, 215, 0, 0.8),
    0 0 40px rgba(255, 215, 0, 0.3),
    0 2px 0 #e6ac00,
    0 4px 0 #cc9900;
  margin-bottom: 14px;
}

.modal-desc {
  color: var(--text-gold);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-input {
  width: 100%;
  padding: 13px 16px;
  background: #0a0014;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: center;
  letter-spacing: 2px;
}

.modal-input::placeholder {
  color: var(--text-muted);
  letter-spacing: 0;
  text-align: center;
}

.modal-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.2);
}

.modal-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a0800;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 2px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.modal-submit:hover {
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.modal-submit:active {
  transform: scale(0.98);
}

.modal-urgency {
  margin-top: 14px;
  font-size: 12px;
  color: var(--neon-pink);
  animation: urgency-blink 1s ease-in-out infinite;
}

@keyframes urgency-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Modal success state */
.modal-success {
  display: none;
  text-align: center;
}

.modal-success.active {
  display: block;
}

.modal-success .success-icon {
  font-size: 44px;
  margin-bottom: 10px;
}

.modal-success .success-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
  margin-bottom: 10px;
}

.modal-success .success-desc {
  color: var(--text-gold);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.download-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  border: none;
}

.download-btn:hover {
  transform: scale(1.03);
}

.download-btn.primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a0800;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.download-btn.secondary {
  background: rgba(180, 77, 255, 0.15);
  border: 1px solid var(--neon-purple);
  color: var(--neon-purple);
  box-shadow: 0 0 10px rgba(180, 77, 255, 0.2);
}

/* --- Features Section --- */
.features {
  position: relative;
  z-index: 1;
  padding: 60px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.features-title {
  text-align: center;
  font-size: 28px;
  font-weight: 900;
  color: var(--gold);
  text-shadow:
    0 0 10px rgba(255, 215, 0, 0.5),
    0 2px 0 #cc9900;
  margin-bottom: 36px;
  letter-spacing: 2px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  background: linear-gradient(180deg, rgba(26, 10, 46, 0.8) 0%, rgba(18, 8, 36, 0.9) 100%);
  border: 1px solid rgba(255, 215, 0, 0.12);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 215, 0, 0.3);
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.08);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
}

.feature-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 8px;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.2);
}

.feature-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- CTA Section --- */
.cta-section {
  position: relative;
  z-index: 1;
  padding: 60px 20px;
  text-align: center;
}

.cta-section::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(255, 215, 0, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.cta-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--gold);
  text-shadow:
    0 0 15px rgba(255, 215, 0, 0.5),
    0 0 30px rgba(255, 215, 0, 0.25),
    0 2px 0 #cc9900;
  margin-bottom: 12px;
}

.cta-subtitle {
  font-size: 18px;
  color: var(--text-gold);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
  margin-bottom: 32px;
  font-weight: 600;
}

.cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  border: none;
  letter-spacing: 1px;
}

.cta-btn:hover {
  transform: scale(1.05);
}

.cta-btn.primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a0800;
  font-size: 20px;
  padding: 18px 40px;
  box-shadow:
    0 0 25px rgba(255, 215, 0, 0.4),
    0 0 50px rgba(255, 215, 0, 0.2),
    0 0 80px rgba(255, 215, 0, 0.08);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  letter-spacing: 2px;
}

.cta-btn.outline {
  background: linear-gradient(135deg, rgba(255, 45, 120, 0.15), rgba(180, 77, 255, 0.15));
  border: 3px solid var(--neon-pink);
  color: #fff;
  font-size: 20px;
  padding: 18px 40px;
  text-shadow: 0 0 10px rgba(255, 45, 120, 0.8), 0 0 20px rgba(255, 45, 120, 0.4);
  box-shadow:
    0 0 15px rgba(255, 45, 120, 0.3),
    0 0 30px rgba(255, 45, 120, 0.15),
    0 0 60px rgba(180, 77, 255, 0.1),
    inset 0 0 15px rgba(255, 45, 120, 0.1);
  animation: cta-register-pulse 1.5s ease-in-out infinite alternate;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
}

.cta-btn.outline::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255, 45, 120, 0.15) 50%,
    transparent 60%
  );
  animation: cta-shimmer 2.5s linear infinite;
}

@keyframes cta-register-pulse {
  0% {
    box-shadow:
      0 0 15px rgba(255, 45, 120, 0.3),
      0 0 30px rgba(255, 45, 120, 0.15),
      0 0 60px rgba(180, 77, 255, 0.1),
      inset 0 0 15px rgba(255, 45, 120, 0.1);
    border-color: var(--neon-pink);
  }
  100% {
    box-shadow:
      0 0 25px rgba(255, 45, 120, 0.6),
      0 0 50px rgba(255, 45, 120, 0.3),
      0 0 80px rgba(180, 77, 255, 0.2),
      inset 0 0 20px rgba(255, 45, 120, 0.15);
    border-color: var(--neon-purple);
  }
}

@keyframes cta-shimmer {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  padding: 28px 20px;
  text-align: center;
  border-top: 1px solid rgba(255, 215, 0, 0.08);
}

.footer-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-text a {
  color: var(--text-gold);
  text-decoration: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-amount {
    font-size: 44px;
  }
  .hero-title {
    font-size: 18px;
    letter-spacing: 2px;
  }
  .hero-subtitle {
    font-size: 12px;
  }
  .nav-links a:not(.cta-btn) {
    display: none;
  }
  .reel-cell {
    font-size: 22px;
  }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    max-width: 360px;
    margin: 0 auto;
  }
  .features-title {
    font-size: 22px;
  }
  .cta-title {
    font-size: 26px;
  }
  .cta-btn.outline, .cta-btn.primary {
    font-size: 17px;
    padding: 15px 30px;
  }
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 380px) {
  .hero-amount {
    font-size: 36px;
  }
  .reel-cell {
    font-size: 18px;
  }
  .spin-btn-main {
    width: 56px;
    height: 56px;
  }
  .slot-inner {
    padding: 8px;
  }
  .reels-grid {
    gap: 3px;
    padding: 4px;
  }
}

/* --- Promo Badges --- */
.promo-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.promo-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: rgba(255, 215, 0, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 20px;
  color: var(--text-gold);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.promo-badge .badge-icon {
  font-size: 14px;
}

/* --- Win Celebration Modal --- */
.win-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.win-overlay.active {
  opacity: 1;
  visibility: visible;
}

.win-modal {
  background: linear-gradient(135deg, #1a0a2e 0%, #0a0014 100%);
  border: 2px solid #FFD700;
  border-radius: 16px;
  padding: 32px 28px 28px;
  text-align: center;
  width: 300px;
  max-width: 90vw;
  transform: scale(0);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 0 30px rgba(255, 215, 0, 0.4),
    0 0 60px rgba(255, 45, 120, 0.2),
    inset 0 0 30px rgba(255, 215, 0, 0.05);
}

.win-overlay.active .win-modal {
  transform: scale(1);
}

.win-stars {
  font-size: 20px;
  color: #FFD700;
  letter-spacing: 12px;
  margin-bottom: 8px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  animation: win-star-pulse 1.5s ease-in-out infinite;
}

@keyframes win-star-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.win-label {
  font-size: 18px;
  color: #e0c880;
  margin-bottom: 8px;
  font-weight: 600;
}

.win-amount {
  font-size: 48px;
  font-weight: 900;
  font-style: italic;
  color: #FFD700;
  text-shadow:
    0 0 10px rgba(255, 215, 0, 0.6),
    0 0 20px rgba(255, 215, 0, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 8px;
  animation: win-amount-glow 1.2s ease-in-out infinite alternate;
}

@keyframes win-amount-glow {
  0% { text-shadow: 0 0 10px rgba(255,215,0,0.6), 0 0 20px rgba(255,215,0,0.3), 0 2px 4px rgba(0,0,0,0.5); }
  100% { text-shadow: 0 0 20px rgba(255,215,0,0.9), 0 0 40px rgba(255,215,0,0.5), 0 0 60px rgba(255,45,120,0.3), 0 2px 4px rgba(0,0,0,0.5); }
}

.win-detail {
  font-size: 14px;
  color: #b44dff;
  margin-bottom: 24px;
  text-shadow: 0 0 8px rgba(180, 77, 255, 0.4);
}

.win-claim-btn {
  display: inline-block;
  padding: 14px 48px;
  font-size: 18px;
  font-weight: 800;
  color: #0a0014;
  background: linear-gradient(180deg, #FFD700 0%, #f0a500 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow:
    0 0 20px rgba(255, 215, 0, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
  animation: win-btn-pulse 1.5s ease-in-out infinite;
}

@keyframes win-btn-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.win-claim-btn:hover {
  transform: scale(1.1);
  box-shadow:
    0 0 30px rgba(255, 215, 0, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.5);
}

.win-claim-btn:active {
  transform: scale(0.95);
}
