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

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

.game-header {
  height: 64px;
  background: rgba(5,11,24,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  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: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.game-back-btn:hover { color: #fff; border-color: rgba(255,255,255,0.2); }

.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(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #94a3b8;
  font-size: 1rem;
  transition: all 0.2s ease;
}
.game-sound-btn:hover, .game-info-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* ——— 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: #050b18;
  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(255,255,255,0.08);
  border-top: none;
}

.slot-machine-inner {
  background: #0a0e1a;
  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: #10b981; box-shadow: 0 0 6px #10b981; }

/* Reel container */
.reels-container {
  display: flex;
  gap: 8px;
  background: rgba(0,0,0,0.4);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  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(252,211,77,0.3);
  border-bottom: 2px solid rgba(252,211,77,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(252,211,77,0.12);
  box-shadow: inset 0 0 12px rgba(252,211,77,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(255,255,255,0.07);
  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: #fcd34d; }
.hud-value.positive { color: #10b981; }

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

.bet-control {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 6px 10px;
}
.bet-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  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(252,211,77,0.2); color: #fcd34d; }
.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(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.max-bet-btn:hover { border-color: #fcd34d; color: #fcd34d; }

/* ——— 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, #fcd34d, #f59e0b, #fcd34d);
  box-shadow: 0 0 0 4px rgba(252,211,77,0.2), 0 8px 24px rgba(252,211,77,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, #1e3a8a, #0f1f4a);
}
.spin-btn .spin-icon {
  position: relative;
  z-index: 1;
  font-size: 1.8rem;
  transition: transform 0.3s ease;
  color: #fcd34d;
}
.spin-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 6px rgba(252,211,77,0.25), 0 12px 32px rgba(252,211,77,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, #1e3a8a, #0f1f4a);
  border: 2px solid #fcd34d;
  border-radius: 20px;
  padding: 28px 36px;
  text-align: center;
  box-shadow: 0 0 40px rgba(252,211,77,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: #94a3b8;
  margin-bottom: 6px;
}
.win-popup .win-amount-big {
  font-size: 2.8rem;
  font-weight: 900;
  color: #fcd34d;
  text-shadow: 0 0 20px rgba(252,211,77,0.6);
}
.win-popup .win-combo-text {
  font-size: 0.9rem;
  color: #94a3b8;
  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(5,11,24,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: #0f172a;
  border: 1px solid rgba(255,255,255,0.08);
  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: #94a3b8;
  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(252,211,77,0.3);
  color: #fcd34d;
  background: rgba(252,211,77,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(5,11,24,0.95);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.paytable-panel.hidden { display: none; }
.paytable-inner {
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.1);
  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(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #94a3b8;
  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(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
}
.paytable-symbols { display: flex; gap: 4px; font-size: 1.6rem; }
.paytable-mult {
  font-weight: 800;
  color: #fcd34d;
  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(255,255,255,0.06);
  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: #94a3b8;
  flex-shrink: 0;
}
.wins-ticker-item .tick-amount { color: #10b981; font-weight: 700; }
.wins-ticker-item .tick-emoji { font-size: 1rem; }

/* ——— THEME: Phantom Pulse (sci-fi purple/blue) ——— */
.theme-phantom .game-bg-layer {
  background: radial-gradient(ellipse at 50% 0%, #1a0a3a 0%, #050b18 60%);
}
.theme-phantom .slot-machine { border-color: rgba(139,92,246,0.35); }
.theme-phantom .reels-container {
  background: rgba(10,5,30,0.8);
  border-color: rgba(139,92,246,0.15);
}
.theme-phantom .symbol { filter: drop-shadow(0 0 4px rgba(139,92,246,0.3)); }
.theme-phantom .hud-panel { background: rgba(10,5,30,0.8); }
.theme-phantom .spin-btn {
  background: conic-gradient(from 0deg, #8b5cf6, #6d28d9, #8b5cf6);
  box-shadow: 0 0 0 4px rgba(139,92,246,0.2), 0 8px 24px rgba(139,92,246,0.4);
}
.theme-phantom .spin-btn::before { background: linear-gradient(145deg, #1a0a3a, #0a0518); }
.theme-phantom .spin-btn .spin-icon { color: #c4b5fd; }
.theme-phantom .win-line-overlay {
  border-color: rgba(139,92,246,0.4);
  background: rgba(139,92,246,0.05);
}

/* ——— THEME: Mac & Cheese (warm orange/cartoon) ——— */
.theme-mac .game-bg-layer {
  background: radial-gradient(ellipse at 50% 0%, #2a1505 0%, #050b18 60%);
}
.theme-mac .slot-machine { border-color: rgba(251,146,60,0.35); }
.theme-mac .reels-container {
  background: rgba(30,12,2,0.8);
  border-color: rgba(251,146,60,0.15);
}
.theme-mac .hud-panel { background: rgba(30,12,2,0.8); }
.theme-mac .spin-btn {
  background: conic-gradient(from 0deg, #fb923c, #ea580c, #fb923c);
  box-shadow: 0 0 0 4px rgba(251,146,60,0.2), 0 8px 24px rgba(251,146,60,0.4);
}
.theme-mac .spin-btn::before { background: linear-gradient(145deg, #2a1505, #1a0a02); }
.theme-mac .spin-btn .spin-icon { color: #fed7aa; }
.theme-mac .win-line-overlay {
  border-color: rgba(251,146,60,0.4);
  background: rgba(251,146,60,0.04);
}

/* ——— THEME: Tiki Elements (teal/tropical) ——— */
.theme-tiki .game-bg-layer {
  background: radial-gradient(ellipse at 50% 0%, #012a22 0%, #050b18 60%);
}
.theme-tiki .slot-machine { border-color: rgba(20,184,166,0.35); }
.theme-tiki .reels-container {
  background: rgba(1,20,16,0.8);
  border-color: rgba(20,184,166,0.15);
}
.theme-tiki .hud-panel { background: rgba(1,20,16,0.8); }
.theme-tiki .spin-btn {
  background: conic-gradient(from 0deg, #14b8a6, #0d9488, #14b8a6);
  box-shadow: 0 0 0 4px rgba(20,184,166,0.2), 0 8px 24px rgba(20,184,166,0.4);
}
.theme-tiki .spin-btn::before { background: linear-gradient(145deg, #012a22, #010f0c); }
.theme-tiki .spin-btn .spin-icon { color: #99f6e4; }
.theme-tiki .win-line-overlay {
  border-color: rgba(20,184,166,0.4);
  background: rgba(20,184,166,0.04);
}

/* ——— THEME: Swamp Things (dark green swamp) ——— */
.theme-swamp .game-bg-layer {
  background: radial-gradient(ellipse at 50% 0%, #071a08 0%, #050b18 60%);
}
.theme-swamp .slot-machine { border-color: rgba(34,197,94,0.3); }
.theme-swamp .reels-container {
  background: rgba(2,10,3,0.85);
  border-color: rgba(34,197,94,0.12);
}
.theme-swamp .hud-panel { background: rgba(2,10,3,0.85); }
.theme-swamp .spin-btn {
  background: conic-gradient(from 0deg, #22c55e, #15803d, #22c55e);
  box-shadow: 0 0 0 4px rgba(34,197,94,0.2), 0 8px 24px rgba(34,197,94,0.35);
}
.theme-swamp .spin-btn::before { background: linear-gradient(145deg, #071a08, #020a02); }
.theme-swamp .spin-btn .spin-icon { color: #bbf7d0; }
.theme-swamp .win-line-overlay {
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.04);
}

/* ——— THEME: Drac's Stacks (gothic dark red) ——— */
.theme-drac .game-bg-layer {
  background: radial-gradient(ellipse at 50% 0%, #1a0305 0%, #050b18 60%);
}
.theme-drac .slot-machine { border-color: rgba(220,38,38,0.35); }
.theme-drac .reels-container {
  background: rgba(15,2,4,0.85);
  border-color: rgba(220,38,38,0.12);
}
.theme-drac .hud-panel { background: rgba(15,2,4,0.85); }
.theme-drac .spin-btn {
  background: conic-gradient(from 0deg, #dc2626, #991b1b, #dc2626);
  box-shadow: 0 0 0 4px rgba(220,38,38,0.2), 0 8px 24px rgba(220,38,38,0.4);
}
.theme-drac .spin-btn::before { background: linear-gradient(145deg, #1a0305, #0a0102); }
.theme-drac .spin-btn .spin-icon { color: #fca5a5; }
.theme-drac .win-line-overlay {
  border-color: rgba(220,38,38,0.4);
  background: rgba(220,38,38,0.04);
}

/* ——— THEME: Chameleon Bonaparte (military jungle) ——— */
.theme-cham .game-bg-layer {
  background: radial-gradient(ellipse at 50% 0%, #1a1205 0%, #050b18 60%);
}
.theme-cham .slot-machine { border-color: rgba(202,138,4,0.35); }
.theme-cham .reels-container {
  background: rgba(15,10,2,0.85);
  border-color: rgba(202,138,4,0.12);
}
.theme-cham .hud-panel { background: rgba(15,10,2,0.85); }
.theme-cham .spin-btn {
  background: conic-gradient(from 0deg, #ca8a04, #854d0e, #ca8a04);
  box-shadow: 0 0 0 4px rgba(202,138,4,0.2), 0 8px 24px rgba(202,138,4,0.35);
}
.theme-cham .spin-btn::before { background: linear-gradient(145deg, #1a1205, #0a0902); }
.theme-cham .spin-btn .spin-icon { color: #fde68a; }
.theme-cham .win-line-overlay {
  border-color: rgba(202,138,4,0.4);
  background: rgba(202,138,4,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; }
}
