/* ============================================================
   NOVASPIN — Slot Machine Styles (Per-Theme)
   ============================================================ */

/* ——— Base Slot Layout ——— */
.slot-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0d0814;
}

.game-header {
  height: 64px;
  background: rgba(13,8,20,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(139,92,246,0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.game-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.game-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #a899c8;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(139,92,246,0.18);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.game-back-btn:hover { color: #fff; border-color: rgba(139,92,246,0.4); }

.game-title-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.game-title-header span { font-weight: 400; color: #64748b; font-size: 0.85rem; }

.game-header-right { display: flex; align-items: center; gap: 12px; }
.game-time {
  font-size: 0.85rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.game-sound-btn, .game-info-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(139,92,246,0.08);
  border: 1px solid rgba(139,92,246,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #a899c8;
  font-size: 1rem;
  transition: all 0.2s ease;
}
.game-sound-btn:hover, .game-info-btn:hover { color: #fff; background: rgba(139,92,246,0.18); }

/* ——— Main game area ——— */
.game-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.game-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0d0814;
  transition: background 0.5s ease;
}

.game-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 920px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* ——— Game Banner ——— */
.game-banner {
  width: 100%;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  position: relative;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.game-banner-overlay {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
}
.game-banner-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ——— Slot Machine Frame ——— */
.slot-machine {
  width: 100%;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
  position: relative;
  border: 3px solid rgba(139,92,246,0.15);
  border-top: none;
}

.slot-machine-inner {
  background: #0e0820;
  padding: 20px;
}

/* Win lines indicator */
.slot-paylines {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}
.payline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: all 0.3s ease;
}
.payline-dot.active { background: #8b5cf6; box-shadow: 0 0 6px #8b5cf6; }

/* Reel container */
.reels-container {
  display: flex;
  gap: 8px;
  background: rgba(0,0,0,0.4);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(139,92,246,0.1);
  position: relative;
  overflow: hidden;
  height: 260px;
}

/* Center win line overlay */
.win-line-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 82px;
  pointer-events: none;
  z-index: 10;
  border-top: 2px solid rgba(249,115,22,0.3);
  border-bottom: 2px solid rgba(249,115,22,0.3);
}

.reel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(0,0,0,0.3);
  position: relative;
}
.reel-strip {
  display: flex;
  flex-direction: column;
  transition: none;
  will-change: transform;
}
.reel-strip.spinning {
  animation: reel-spin-blur 0.1s linear infinite;
}

@keyframes reel-spin-blur {
  0%   { filter: blur(0px); }
  50%  { filter: blur(3px); }
  100% { filter: blur(0px); }
}

.symbol {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  flex-shrink: 0;
  border-radius: 6px;
  transition: background 0.15s ease;
  user-select: none;
}
.symbol.highlight {
  background: rgba(249,115,22,0.12);
  box-shadow: inset 0 0 12px rgba(249,115,22,0.15);
}
.symbol.win {
  animation: symbol-win 0.4s ease;
}
@keyframes symbol-win {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.25); filter: brightness(1.5); }
  100% { transform: scale(1); }
}

/* ——— HUD Panel ——— */
.hud-panel {
  width: 100%;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(139,92,246,0.1);
  border-top: none;
  border-radius: 0 0 16px 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hud-display {
  display: flex;
  gap: 24px;
  flex: 1;
}
.hud-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hud-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #475569;
}
.hud-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.hud-value.win-amount { color: #f97316; }
.hud-value.positive { color: #8b5cf6; }

.hud-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.bet-control {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(139,92,246,0.07);
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 8px;
  padding: 6px 10px;
}
.bet-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(139,92,246,0.1);
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1;
}
.bet-btn:hover { background: rgba(249,115,22,0.2); color: #f97316; }
.bet-display {
  min-width: 60px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}
.bet-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #475569;
  display: block;
}

.max-bet-btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(139,92,246,0.07);
  border: 1px solid rgba(139,92,246,0.15);
  color: #a899c8;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.max-bet-btn:hover { border-color: #f97316; color: #f97316; }

/* ——— SPIN BUTTON ——— */
.spin-btn-wrap { position: relative; }

.spin-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(from 0deg, #f97316, #ea580c, #f97316);
  box-shadow: 0 0 0 4px rgba(249,115,22,0.2), 0 8px 24px rgba(249,115,22,0.35), inset 0 1px 2px rgba(255,255,255,0.3);
  flex-shrink: 0;
}
.spin-btn::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3b0764, #1e0a40);
}
.spin-btn .spin-icon {
  position: relative;
  z-index: 1;
  font-size: 1.8rem;
  transition: transform 0.3s ease;
  color: #f97316;
}
.spin-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 6px rgba(249,115,22,0.25), 0 12px 32px rgba(249,115,22,0.5);
}
.spin-btn:active { transform: scale(0.96); }
.spin-btn.spinning .spin-icon {
  animation: spin-rotate 0.4s linear infinite;
}
.spin-btn.spinning {
  pointer-events: none;
  opacity: 0.75;
}
@keyframes spin-rotate { to { transform: rotate(360deg); } }

.spin-hint {
  text-align: center;
  font-size: 0.65rem;
  color: #475569;
  margin-top: 4px;
}

/* ——— Win Popup ——— */
.win-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 50;
  background: linear-gradient(135deg, #3b0764, #1e0a40);
  border: 2px solid #f97316;
  border-radius: 20px;
  padding: 28px 36px;
  text-align: center;
  box-shadow: 0 0 40px rgba(249,115,22,0.4), 0 24px 60px rgba(0,0,0,0.6);
  min-width: 240px;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
}
.win-popup.show {
  transform: translate(-50%, -50%) scale(1);
}
.win-popup .win-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #a899c8;
  margin-bottom: 6px;
}
.win-popup .win-amount-big {
  font-size: 2.8rem;
  font-weight: 900;
  color: #f97316;
  text-shadow: 0 0 20px rgba(249,115,22,0.6);
}
.win-popup .win-combo-text {
  font-size: 0.9rem;
  color: #a899c8;
  margin-top: 6px;
}

/* ——— Intro Overlay ——— */
.game-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: pointer;
}
.game-intro-overlay.hidden { display: none; }
.game-intro-bg {
  position: absolute;
  inset: 0;
  background: rgba(13,8,20,0.92);
  backdrop-filter: blur(8px);
}
.game-intro-card {
  position: relative;
  z-index: 1;
  max-width: 520px;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7);
  animation: intro-card-in 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes intro-card-in {
  from { transform: scale(0.85) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.intro-art {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}
.intro-body {
  padding: 28px 32px;
  background: #180f2a;
  border: 1px solid rgba(139,92,246,0.15);
  border-top: none;
  border-radius: 0 0 24px 24px;
}
.intro-body h2 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 8px;
}
.intro-body p {
  font-size: 0.9rem;
  color: #a899c8;
  margin-bottom: 20px;
}
.intro-features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.intro-feat-tag {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(249,115,22,0.3);
  color: #f97316;
  background: rgba(249,115,22,0.07);
}
.intro-click-hint {
  font-size: 0.78rem;
  color: #475569;
  text-align: center;
  margin-top: 16px;
}

/* ——— Paytable Panel ——— */
.paytable-panel {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(13,8,20,0.95);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.paytable-panel.hidden { display: none; }
.paytable-inner {
  background: #180f2a;
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 20px;
  padding: 32px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}
.paytable-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.paytable-header h3 { color: #fff; }
.paytable-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(139,92,246,0.08);
  border: 1px solid rgba(139,92,246,0.15);
  color: #a899c8;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.paytable-close:hover { color: #fff; }
.paytable-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 8px;
  background: rgba(139,92,246,0.04);
  border: 1px solid rgba(139,92,246,0.08);
}
.paytable-symbols { display: flex; gap: 4px; font-size: 1.6rem; }
.paytable-mult {
  font-weight: 800;
  color: #f97316;
  font-size: 1rem;
}
.paytable-label { font-size: 0.8rem; color: #64748b; }

/* ——— Recent Wins Ticker ——— */
.wins-ticker {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(139,92,246,0.1);
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}
.wins-ticker-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #475569;
  white-space: nowrap;
  flex-shrink: 0;
}
.wins-ticker-items {
  display: flex;
  gap: 20px;
  overflow: hidden;
  flex: 1;
  position: relative;
}
.wins-ticker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  white-space: nowrap;
  color: #a899c8;
  flex-shrink: 0;
}
.wins-ticker-item .tick-amount { color: #8b5cf6; font-weight: 700; }
.wins-ticker-item .tick-emoji { font-size: 1rem; }

/* ——— THEME: Nebula Rush (cyan/electric) ——— */
.theme-phantom .game-bg-layer {
  background: radial-gradient(ellipse at 50% 0%, #002a3a 0%, #0d0814 60%);
}
.theme-phantom .slot-machine { border-color: rgba(6,182,212,0.35); }
.theme-phantom .reels-container {
  background: rgba(0,15,24,0.8);
  border-color: rgba(6,182,212,0.15);
}
.theme-phantom .symbol { filter: drop-shadow(0 0 4px rgba(6,182,212,0.3)); }
.theme-phantom .hud-panel { background: rgba(0,15,24,0.8); }
.theme-phantom .spin-btn {
  background: conic-gradient(from 0deg, #06b6d4, #0891b2, #06b6d4);
  box-shadow: 0 0 0 4px rgba(6,182,212,0.2), 0 8px 24px rgba(6,182,212,0.4);
}
.theme-phantom .spin-btn::before { background: linear-gradient(145deg, #002a3a, #000f1a); }
.theme-phantom .spin-btn .spin-icon { color: #67e8f9; }
.theme-phantom .win-line-overlay {
  border-color: rgba(6,182,212,0.4);
  background: rgba(6,182,212,0.05);
}

/* ——— THEME: Turbo Kitty (hot pink/magenta) ——— */
.theme-mac .game-bg-layer {
  background: radial-gradient(ellipse at 50% 0%, #2a0520 0%, #0d0814 60%);
}
.theme-mac .slot-machine { border-color: rgba(236,72,153,0.35); }
.theme-mac .reels-container {
  background: rgba(20,2,15,0.8);
  border-color: rgba(236,72,153,0.15);
}
.theme-mac .hud-panel { background: rgba(20,2,15,0.8); }
.theme-mac .spin-btn {
  background: conic-gradient(from 0deg, #ec4899, #be185d, #ec4899);
  box-shadow: 0 0 0 4px rgba(236,72,153,0.2), 0 8px 24px rgba(236,72,153,0.4);
}
.theme-mac .spin-btn::before { background: linear-gradient(145deg, #2a0520, #150010); }
.theme-mac .spin-btn .spin-icon { color: #fbcfe8; }
.theme-mac .win-line-overlay {
  border-color: rgba(236,72,153,0.4);
  background: rgba(236,72,153,0.04);
}

/* ——— THEME: Island Spirit (lime/tropical) ——— */
.theme-tiki .game-bg-layer {
  background: radial-gradient(ellipse at 50% 0%, #0a1a00 0%, #0d0814 60%);
}
.theme-tiki .slot-machine { border-color: rgba(132,204,22,0.35); }
.theme-tiki .reels-container {
  background: rgba(4,12,0,0.8);
  border-color: rgba(132,204,22,0.15);
}
.theme-tiki .hud-panel { background: rgba(4,12,0,0.8); }
.theme-tiki .spin-btn {
  background: conic-gradient(from 0deg, #84cc16, #65a30d, #84cc16);
  box-shadow: 0 0 0 4px rgba(132,204,22,0.2), 0 8px 24px rgba(132,204,22,0.4);
}
.theme-tiki .spin-btn::before { background: linear-gradient(145deg, #0a1a00, #040c00); }
.theme-tiki .spin-btn .spin-icon { color: #d9f99d; }
.theme-tiki .win-line-overlay {
  border-color: rgba(132,204,22,0.4);
  background: rgba(132,204,22,0.04);
}

/* ——— THEME: Swamp Legends (amber/gold) ——— */
.theme-swamp .game-bg-layer {
  background: radial-gradient(ellipse at 50% 0%, #1a1000 0%, #0d0814 60%);
}
.theme-swamp .slot-machine { border-color: rgba(245,158,11,0.3); }
.theme-swamp .reels-container {
  background: rgba(12,8,0,0.85);
  border-color: rgba(245,158,11,0.12);
}
.theme-swamp .hud-panel { background: rgba(12,8,0,0.85); }
.theme-swamp .spin-btn {
  background: conic-gradient(from 0deg, #f59e0b, #b45309, #f59e0b);
  box-shadow: 0 0 0 4px rgba(245,158,11,0.2), 0 8px 24px rgba(245,158,11,0.35);
}
.theme-swamp .spin-btn::before { background: linear-gradient(145deg, #1a1000, #0d0800); }
.theme-swamp .spin-btn .spin-icon { color: #fde68a; }
.theme-swamp .win-line-overlay {
  border-color: rgba(245,158,11,0.35);
  background: rgba(245,158,11,0.04);
}

/* ——— THEME: Blood Moon (gothic crimson) ——— */
.theme-drac .game-bg-layer {
  background: radial-gradient(ellipse at 50% 0%, #1a0310 0%, #0d0814 60%);
}
.theme-drac .slot-machine { border-color: rgba(190,18,60,0.35); }
.theme-drac .reels-container {
  background: rgba(15,0,8,0.85);
  border-color: rgba(190,18,60,0.12);
}
.theme-drac .hud-panel { background: rgba(15,0,8,0.85); }
.theme-drac .spin-btn {
  background: conic-gradient(from 0deg, #be123c, #881337, #be123c);
  box-shadow: 0 0 0 4px rgba(190,18,60,0.2), 0 8px 24px rgba(190,18,60,0.4);
}
.theme-drac .spin-btn::before { background: linear-gradient(145deg, #1a0310, #0a0108); }
.theme-drac .spin-btn .spin-icon { color: #fda4af; }
.theme-drac .win-line-overlay {
  border-color: rgba(190,18,60,0.4);
  background: rgba(190,18,60,0.04);
}

/* ——— THEME: Jungle General (rose/copper) ——— */
.theme-cham .game-bg-layer {
  background: radial-gradient(ellipse at 50% 0%, #1a0510 0%, #0d0814 60%);
}
.theme-cham .slot-machine { border-color: rgba(244,63,94,0.35); }
.theme-cham .reels-container {
  background: rgba(15,2,8,0.85);
  border-color: rgba(244,63,94,0.12);
}
.theme-cham .hud-panel { background: rgba(15,2,8,0.85); }
.theme-cham .spin-btn {
  background: conic-gradient(from 0deg, #f43f5e, #be123c, #f43f5e);
  box-shadow: 0 0 0 4px rgba(244,63,94,0.2), 0 8px 24px rgba(244,63,94,0.35);
}
.theme-cham .spin-btn::before { background: linear-gradient(145deg, #1a0510, #0a0208); }
.theme-cham .spin-btn .spin-icon { color: #fecdd3; }
.theme-cham .win-line-overlay {
  border-color: rgba(244,63,94,0.4);
  background: rgba(244,63,94,0.04);
}

/* ——— Confetti particles ——— */
.confetti-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 400;
  animation: confetti-fall 2s ease forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ——— Responsive ——— */
@media (max-width: 640px) {
  .reels-container { gap: 5px; padding: 8px; height: 220px; }
  .symbol { height: 68px; font-size: 2rem; }
  .win-line-overlay { height: 68px; }
  .hud-panel { flex-direction: column; gap: 12px; }
  .hud-display { gap: 16px; }
  .spin-btn { width: 68px; height: 68px; }
  .spin-btn .spin-icon { font-size: 1.5rem; }
  .game-banner { height: 70px; }
  .intro-art { height: 180px; }
}
