/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;500;700;900&display=swap');

:root {
  /* Palette */
  --bg-deep: #0f172a;
  --bg-dark: #020617;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Accents */
  --magenta-primary: #d946ef;
  --magenta-glow: rgba(217, 70, 239, 0.6);
  --cyan-primary: #06b6d4;
  --gold-primary: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.6);
  --red-error: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* { box-sizing: border-box; }

.slots-view {
  width: 100%;
  height: 100%;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(217, 70, 239, 0.1) 0%, transparent 60%),
    linear-gradient(180deg, #0f172a 0%, #2e1065 100%);
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* Ambient Effects */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  z-index: 0;
  animation: float 10s infinite ease-in-out;
}
.glow-magenta { width: 400px; height: 400px; background: var(--magenta-primary); top: -100px; left: 20%; }
.glow-cyan { width: 300px; height: 300px; background: var(--cyan-primary); bottom: -50px; right: 20%; animation-delay: -5s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, 30px); }
}

/* Header */
.slots-header { text-align: center; z-index: 2; margin-bottom: 2rem; flex-shrink: 0; }

.header-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 3px;
  font-weight: 700;
  color: var(--magenta-primary);
  background: rgba(217, 70, 239, 0.1);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(217, 70, 239, 0.3);
  margin-bottom: 0.5rem;
  box-shadow: 0 0 15px rgba(217, 70, 239, 0.2);
}

.slots-header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(to right, #fff, #f0abfc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

/* Stage */
.slots-stage {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  position: relative;
}

/* Machine Console */
.slot-machine-console {
  width: 100%;
  max-width: 600px;
  background: var(--bg-dark);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 2rem;
  box-shadow:
    0 30px 60px -15px rgba(0, 0, 0, 0.8),
    inset 0 0 0 1px rgba(255,255,255,0.05),
    0 0 40px rgba(217, 70, 239, 0.1); /* Magenta Glow */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

/* Glass Screen */
.machine-glass {
  background: rgba(0,0,0,0.4);
  border-radius: 16px;
  border: 2px solid #334155;
  box-shadow: inset 0 0 30px #000;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.reels-container {
  display: flex;
  justify-content: space-around;
  height: 180px;
  position: relative;
}

/* Payline Line */
.payline {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 0, 0, 0.4);
  z-index: 10;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
  pointer-events: none;
}

/* Individual Reel */
.reel {
  width: 30%;
  background: linear-gradient(180deg, #020617 0%, #1e293b 50%, #020617 100%);
  border: 1px solid #334155;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px #000;
}

.symbol {
  filter: drop-shadow(0 4px 4px rgba(0,0,0,0.5));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Animation States */
.reel.spinning .symbol {
  animation: spinBlur 0.1s infinite linear;
  opacity: 0.5;
  filter: blur(4px);
}

.reel.stopped .symbol {
  animation: bounceStop 0.4s ease;
}

.reel.dimmed {
  opacity: 0.3;
  filter: grayscale(1);
}

.glow-diamond {
  animation: diamondPulse 1s infinite alternate;
  filter: drop-shadow(0 0 15px var(--cyan-primary));
}

/* Status Bar inside Glass */
.machine-status {
  text-align: center;
  margin-top: 1rem;
  font-family: monospace;
  font-size: 1rem;
  letter-spacing: 3px;
  font-weight: 700;
  color: var(--cyan-primary);
  text-shadow: 0 0 10px var(--cyan-primary);
  background: rgba(6, 182, 212, 0.1);
  padding: 4px;
  border-radius: 4px;
}

/* Machine Base (Stats) */
.machine-base {
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
}

.bet-display, .payout-display {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.machine-base .label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.machine-base .value {
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-primary);
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* Footer */
.hud-footer {
  margin-top: 1rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.player-pill {
  display: flex; gap: 10px; background: rgba(0,0,0,0.4); padding: 8px 16px; border-radius: 50px; border: 1px solid var(--glass-border); font-size: 0.8rem;
}
.player-pill .label { color: var(--text-muted); font-weight: 700; font-size: 0.6rem; letter-spacing: 1px; }
.player-pill .value { font-weight: 700; color: #fff; }
.player-pill .coins { color: var(--gold-primary); font-weight: 700; margin-left: 8px; }
.coins.pulse { animation: coin-pulse 0.3s ease; color: #fff; }

.message-glass {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 3rem;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  text-align: center;
  min-width: 400px;
  font-weight: 500;
  font-family: monospace;
}
.message-glass.active { border-color: var(--cyan-primary); color: var(--cyan-primary); }
.message-glass.jackpot {
  border-color: var(--magenta-primary);
  background: rgba(217, 70, 239, 0.2);
  color: #fff; font-weight: 900; font-size: 1.2rem;
  box-shadow: 0 0 30px var(--magenta-glow);
}
.message-glass.success { border-color: var(--gold-primary); color: var(--gold-primary); }
.message-glass.error { border-color: var(--red-error); color: var(--red-error); }
.message-glass.neutral { color: var(--text-muted); }

/* Animation Keyframes */
@keyframes spinBlur {
  0% { transform: translateY(-10px); filter: blur(4px); }
  100% { transform: translateY(10px); filter: blur(4px); }
}

@keyframes bounceStop {
  0% { transform: translateY(-20px); }
  60% { transform: translateY(10px); }
  80% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

@keyframes diamondPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 10px var(--cyan-primary)); }
  100% { transform: scale(1.1); filter: drop-shadow(0 0 25px var(--cyan-primary)); }
}

@keyframes coin-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes blink { 50% { opacity: 0; } }

/* View Flashes */
.flash-jackpot { animation: bgFlashGold 1s infinite alternate; }
@keyframes bgFlashGold { 0% { filter: brightness(1); } 100% { filter: brightness(1.5) sepia(1) hue-rotate(300deg); } }

.flash-success { animation: bgFlashWhite 0.5s; }
@keyframes bgFlashWhite { 0% { background-color: rgba(255,255,255,0.2); } 100% { background-color: var(--bg-deep); } }

.shake-mild { animation: shake 0.5s ease; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }