@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700;800;900&family=Montserrat:wght@400;600;700;800;900&display=swap');

:root {
  --gold-glow: 0 0 25px rgba(255, 215, 0, 0.7);
  --gold-gradient: linear-gradient(135deg, #fff3a6 0%, #ffd700 25%, #d99b00 50%, #fff199 75%, #9e6d00 100%);
  --gold-text-gradient: linear-gradient(180deg, #ffffff 0%, #fff2a3 30%, #ffd700 65%, #c98800 100%);
  --gold-bevel: 0 0 0 1px #d49a00, 0 0 0 2.5px #ffe57f, 0 6px 20px rgba(0, 0, 0, 0.75);
  --cyan-neon: #00f0ff;
  --emerald-neon: #00ff88;
  --ruby-gradient: linear-gradient(135deg, #ff4d6d 0%, #c9184a 50%, #800f2f 100%);
  --sapphire-gradient: linear-gradient(135deg, #48cae4 0%, #0077b6 50%, #03045e 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #04010a;
  font-family: 'Montserrat', -apple-system, sans-serif;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
}

#app-container {
  width: 100%;
  max-width: 480px;
  height: 100%;
  height: 100dvh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-image: url('lobby_bg.jpg');
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.98);
}

/* ========================================================
   TOP NAVIGATION (LOBBY)
======================================================== */
.top-nav {
  padding-top: max(env(safe-area-inset-top, 0px), 8px);
  min-height: calc(56px + max(env(safe-area-inset-top, 0px), 0px));
  padding-left: 14px;
  padding-right: 14px;
  padding-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(24, 10, 52, 0.97) 0%, rgba(11, 4, 26, 0.92) 100%);
  border-bottom: 2px solid rgba(255, 215, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  z-index: 100;
  flex-shrink: 0;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gold-gradient);
  padding: 2.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.avatar-badge img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.user-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.level-text {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  background: var(--gold-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.exp-bar-container {
  width: 72px;
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.exp-bar-fill {
  height: 100%;
  width: 45%;
  background: linear-gradient(90deg, #00d2ff, #00ff88);
  box-shadow: 0 0 8px #00ff88;
  transition: width 0.4s ease;
}

.balance-pill {
  background: linear-gradient(180deg, #2b1752 0%, #150a2e 100%);
  border: 1.5px solid #ffd700;
  border-radius: 22px;
  padding: 4px 10px 4px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.35), inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.balance-pill.mini-balance {
  padding: 2px 8px;
  border-radius: 18px;
}

.coin-icon {
  font-size: 18px;
  animation: pulse-coin 2.5s infinite ease-in-out;
}

.coin-icon-mini {
  font-size: 14px;
}

@keyframes pulse-coin {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px #ffd700); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 12px #ffd700); }
}

.coin-value {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: var(--gold-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.btn-add-coins {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00ff88, #009944);
  border: 1.5px solid #ffffff;
  color: #032b0e;
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.7);
}

.btn-add-coins:active { transform: scale(0.9); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255, 215, 0, 0.45);
  color: #ffd700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s ease;
}

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

/* ========================================================
   LOBBY VIEW
======================================================== */
.view-screen {
  flex: 1;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 74px;
}

.lobby-header {
  padding: 12px 14px 6px;
}

.banner-card {
  width: 100%;
  height: 125px;
  border-radius: 18px;
  background: linear-gradient(135deg, #50107a 0%, #1f084a 50%, #12042e 100%);
  border: 2px solid #ffd700;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.75), 0 0 25px rgba(255, 215, 0, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.banner-card:active { transform: scale(0.98); }

.banner-badge-hot {
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  color: #ff3366;
  background: rgba(255, 51, 102, 0.15);
  border: 1px solid rgba(255, 51, 102, 0.4);
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 4px;
}

.banner-content h2 {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 900;
  background: var(--gold-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.banner-content p {
  font-size: 11px;
  color: #d1c8ea;
  margin-bottom: 8px;
}

.banner-btn {
  display: inline-block;
  background: var(--gold-gradient);
  color: #2b1300;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 14px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

.banner-badge-art {
  font-size: 54px;
  filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
  animation: float-art 3s ease-in-out infinite alternate;
}

@keyframes float-art {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-6px) rotate(4deg); }
}

.bonus-quick-row {
  display: flex;
  gap: 10px;
  padding: 6px 14px 12px;
}

.bonus-widget {
  flex: 1;
  background: linear-gradient(135deg, rgba(50, 18, 92, 0.85) 0%, rgba(20, 8, 44, 0.95) 100%);
  border: 1.5px solid rgba(255, 215, 0, 0.5);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease;
}

.bonus-widget:active { transform: scale(0.96); }

.bonus-widget-icon {
  font-size: 26px;
}

.bonus-widget-info h4 {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 900;
  color: #ffd700;
}

.bonus-widget-info p {
  font-size: 11px;
  color: #00ff88;
  font-weight: 700;
}

.section-title {
  padding: 8px 14px 6px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.section-title h1 {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffffff;
}

.section-title span {
  font-size: 10px;
  color: #a89ec4;
}

.slots-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 14px 20px;
}

.slot-card {
  width: 100%;
  height: 140px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1f0b3b 0%, #0d041c 100%);
  border: 2px solid rgba(255, 215, 0, 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
  display: flex;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.slot-card:hover {
  transform: translateY(-2px);
  border-color: #ffd700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.4);
}

.slot-card:active { transform: scale(0.98); }

.slot-card-banner {
  width: 44%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.slot-card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.slot-card:hover .slot-card-banner img {
  transform: scale(1.08);
}

.slot-tag-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, #ff0055, #990033);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.slot-card-info {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slot-card-info h3 {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 2px;
}

.slot-card-info .feature-text {
  font-size: 10px;
  color: #b5a9d6;
  margin-bottom: 8px;
  line-height: 1.3;
}

.jackpot-ribbon {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.02) 100%);
  border-left: 3px solid #ffd700;
  padding: 3px 8px;
  font-size: 10px;
  color: #ffd700;
}

.jackpot-ribbon b {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 900;
}

.slot-card.locked {
  filter: grayscale(0.85);
  opacity: 0.75;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 1px;
}

/* ========================================================
   SLOT MACHINE VIEW (PREMIUM VEGAS CASINO DESIGN)
======================================================== */
.slot-machine-view {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-image: url('slot_stage_bg.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
}

body.in-slot-game .bottom-bar,
body.in-slot-game .top-nav,
body.in-slot-game #lobby-view {
  display: none !important;
}

.slot-machine-view::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(15, 4, 38, 0.4) 0%, rgba(6, 2, 18, 0.94) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Slot Top Bar - Notch & Safe Area Aware */
.slot-top-bar {
  padding-top: max(env(safe-area-inset-top, 0px), 8px);
  min-height: calc(50px + max(env(safe-area-inset-top, 0px), 0px));
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(20, 8, 44, 0.98) 0%, rgba(10, 3, 24, 0.92) 100%);
  border-bottom: 2px solid rgba(255, 215, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.85);
}

.btn-back-lobby {
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.06) 100%);
  border: 1.5px solid rgba(255, 215, 0, 0.6);
  color: #ffd700;
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 11px;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.btn-back-lobby:active {
  transform: scale(0.92);
  background: rgba(255, 215, 0, 0.25);
}

.slot-title-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 6px;
}

.slot-game-header-title {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  background: var(--gold-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.9));
  white-space: nowrap;
}

.slot-game-sub-title {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--cyan-neon);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.8);
  text-transform: uppercase;
}

.slot-top-right-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-slot-sound {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.06) 100%);
  border: 1px solid rgba(255, 215, 0, 0.5);
  color: #ffd700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

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

/* ========================================================
   PROGRESSIVE JACKPOT METERS (LUXURY 3D BEVELED)
======================================================== */
.slot-jackpot-header {
  margin: 6px 10px 4px;
  padding: 5px 10px;
  background: linear-gradient(180deg, #200c3e 0%, #0d031c 100%);
  border: 2px solid #ffd700;
  border-radius: 14px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4), inset 0 0 15px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.jackpot-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jackpot-crown-deco {
  font-size: 16px;
  filter: drop-shadow(0 0 6px #ffd700);
}

.jackpot-meta {
  display: flex;
  flex-direction: column;
}

.jackpot-item .lbl {
  font-family: 'Cinzel', serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #f7d6e6;
}

.grand-jackpot-item .lbl { color: #ffb3c6; }
.major-jackpot-item .lbl { color: #a0e7e5; }

.jackpot-item .val {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 900;
  background: var(--gold-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px #ffd700);
  letter-spacing: 0.5px;
}

.major-jackpot-item .val {
  background: linear-gradient(180deg, #ffffff 0%, #bbf2f6 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px #38bdf8);
}

.jackpot-center-star {
  color: #ffd700;
  font-size: 14px;
  animation: star-spin-pulse 3s infinite ease-in-out;
  filter: drop-shadow(0 0 8px #ffd700);
}

@keyframes star-spin-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
  50% { transform: scale(1.3) rotate(180deg); opacity: 1; }
}

/* ========================================================
   3D VEGAS REELS CABINET FRAME & REEL COLUMNS
======================================================== */
.reels-stage-wrapper {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4px 8px;
  position: relative;
  z-index: 10;
}

.reels-cabinet {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, #351566 0%, #1a0836 50%, #0a0218 100%);
  border: 4px solid #ffd700;
  border-radius: 20px;
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.65), 0 12px 30px rgba(0, 0, 0, 0.95), inset 0 0 25px rgba(0, 0, 0, 0.95);
  padding: 7px;
  position: relative;
  overflow: hidden;
}

/* Cabinet golden beveled outer rim */
.cabinet-outer-rim {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  pointer-events: none;
  z-index: 20;
}

/* Cabinet brass corner studs */
.cabinet-corner-stud {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff4b8, #ffd700 60%, #875e00 100%);
  box-shadow: 0 0 6px #ffd700;
  z-index: 22;
}

.cabinet-corner-stud.top-left { top: 6px; left: 6px; }
.cabinet-corner-stud.top-right { top: 6px; right: 6px; }
.cabinet-corner-stud.bottom-left { bottom: 6px; left: 6px; }
.cabinet-corner-stud.bottom-right { bottom: 6px; right: 6px; }

/* 3D Cylindrical drum shadows for rotating cylinder illusion */
.reels-cylinder-shadow-top {
  position: absolute;
  top: 7px;
  left: 7px;
  right: 7px;
  height: 24px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  z-index: 18;
  border-radius: 14px 14px 0 0;
}

.reels-cylinder-shadow-bottom {
  position: absolute;
  bottom: 7px;
  left: 7px;
  right: 7px;
  height: 24px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  z-index: 18;
  border-radius: 0 0 14px 14px;
}

.reels-glass-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 40%);
  pointer-events: none;
  z-index: 19;
}

.reels-grid-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  background: linear-gradient(180deg, #090214 0%, #030008 100%);
  border-radius: 14px;
  padding: 3px;
  height: 204px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.98);
}

.reel-column {
  overflow: hidden;
  height: 100%;
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 100%);
  border-radius: 10px;
  border-left: 1px solid rgba(255, 215, 0, 0.2);
  border-right: 1px solid rgba(255, 215, 0, 0.2);
  transition: transform 0.15s ease-out;
}

.reel-column.column-bounce {
  transform: translateY(3px);
}

/* 60FPS Hardware-Accelerated Reel Strip (Zero Blur Filter!) */
.reel-strip {
  display: flex;
  flex-direction: column;
  position: relative;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  contain: layout style;
}

/* Individual Symbol Cell - Obsidian Crystal Glass Backdrop */
.symbol-cell {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 3px;
  box-sizing: border-box;
}

.symbol-cell-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(30, 14, 60, 0.82) 0%, rgba(13, 5, 28, 0.94) 100%);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.85);
  transition: all 0.2s ease;
  position: relative;
}

.symbol-cell img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.85));
  transition: transform 0.25s ease;
}

/* Winning Symbol - Electric Golden Neon Aura */
.symbol-cell.win-highlight .symbol-cell-inner {
  background: linear-gradient(180deg, rgba(80, 50, 10, 0.9) 0%, rgba(40, 20, 0, 0.95) 100%);
  border: 2px solid #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.95), inset 0 0 12px rgba(255, 215, 0, 0.7);
  animation: winCellPulse 0.5s infinite alternate ease-in-out;
}

.symbol-cell.win-highlight img {
  transform: scale(1.18);
  filter: drop-shadow(0 0 14px #ffd700) brightness(1.2);
}

@keyframes winCellPulse {
  0% { transform: scale(0.96); box-shadow: 0 0 14px rgba(255, 215, 0, 0.7); }
  100% { transform: scale(1.04); box-shadow: 0 0 28px rgba(255, 230, 80, 1); }
}

#payline-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
}

.freespins-active-banner {
  position: relative;
  margin: 2px 14px 4px;
  padding: 5px 16px;
  background: linear-gradient(135deg, #ff0055 0%, #a855f7 50%, #4f46e5 100%);
  border: 1.5px solid #ffe57f;
  border-radius: 20px;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-align: center;
  box-shadow: 0 0 18px rgba(255, 0, 85, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.6);
  z-index: 10;
  animation: pulse-freespins 1.2s infinite alternate ease-in-out;
  flex-shrink: 0;
}

@keyframes pulse-freespins {
  0% { transform: scale(0.98); filter: brightness(1); }
  100% { transform: scale(1.02); filter: brightness(1.2); }
}

/* ========================================================
   SLOT CONTROL PANEL & ULTRA-TACTILE 3D SPIN BUTTON
======================================================== */
.slot-control-panel {
  background: linear-gradient(180deg, rgba(22, 9, 48, 0.99) 0%, rgba(9, 3, 20, 1) 100%);
  border-top: 2.5px solid rgba(255, 215, 0, 0.55);
  padding-top: 8px;
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 12px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  margin-top: auto;
  box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.85);
}

.bet-display-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.info-pill {
  background: linear-gradient(180deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.03) 100%);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 12px;
  padding: 3px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 82px;
}

.info-pill .label {
  font-family: 'Cinzel', serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #c4b8dd;
}

.info-pill .val {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
}

.info-pill.win-pill {
  border-color: rgba(0, 255, 136, 0.5);
  background: linear-gradient(180deg, rgba(0, 255, 136, 0.12) 0%, rgba(0, 0, 0, 0.3) 100%);
  min-width: 100px;
}

.info-pill.win-pill .val {
  color: #00ff88;
  font-size: 15px;
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.9);
}

.bet-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 2px 4px;
  border: 1px solid rgba(255, 215, 0, 0.35);
}

.step-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.06) 100%);
  border: 1px solid rgba(255, 215, 0, 0.5);
  color: #ffd700;
  font-weight: 900;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transition: all 0.1s ease;
}

.step-btn:active {
  transform: scale(0.9);
  background: #ffd700;
  color: #000;
}

.spin-action-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-secondary-action {
  flex: 1;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.04) 100%);
  border: 1.5px solid rgba(255, 215, 0, 0.5);
  color: #ffffff;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: all 0.2s;
}

.btn-secondary-action:active {
  transform: scale(0.95);
}

.btn-secondary-action.active-auto {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border-color: #ff9999;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.95);
  animation: autoPulse 1s infinite alternate;
}

@keyframes autoPulse {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.2); }
}

/* 3D Vegas Push-Button - Masterpiece Tactile Feel */
.btn-main-spin {
  flex: 2;
  height: 60px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffe57f 0%, #ffd700 30%, #b8860b 70%, #523900 100%);
  border: none;
  padding: 3.5px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 8px 20px rgba(0, 0, 0, 0.9);
  transition: transform 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.spin-btn-sheen {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  animation: sheenCycle 3.5s infinite;
  pointer-events: none;
}

@keyframes sheenCycle {
  0%, 70% { left: -100%; }
  100% { left: 200%; }
}

.spin-btn-core {
  width: 100%;
  height: 100%;
  border-radius: 17px;
  background: radial-gradient(circle at 50% 25%, #fffadc 0%, #ffc800 35%, #e67e00 70%, #993d00 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.9), inset 0 -3px 6px rgba(0, 0, 0, 0.6);
  position: relative;
}

.spin-btn-text {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 3.5px;
  color: #2b1300;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8), 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn-main-spin:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow: 0 0 35px rgba(255, 225, 50, 1), 0 10px 25px rgba(0, 0, 0, 0.9);
}

.btn-main-spin:active:not(:disabled) {
  transform: translateY(3px) scale(0.96);
  box-shadow: 0 0 15px rgba(255, 200, 0, 0.5);
}

.btn-main-spin:disabled,
.btn-main-spin.spinning {
  opacity: 0.75;
  filter: grayscale(0.4);
  cursor: not-allowed;
  animation: none;
}

.btn-main-spin.spinning .spin-btn-core {
  background: radial-gradient(circle at 50% 25%, #ffd480 0%, #e68a00 50%, #804000 100%);
}

/* ========================================================
   BOTTOM BAR NAVIGATION (LOBBY)
======================================================== */
.bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 0px);
  background: linear-gradient(180deg, rgba(22, 9, 48, 0.98) 0%, rgba(9, 3, 22, 1) 100%);
  border-top: 2px solid rgba(255, 215, 0, 0.45);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.7);
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #a79cb8;
  cursor: pointer;
  transition: all 0.2s;
  padding: 4px 12px;
}

.nav-tab i {
  font-size: 20px;
  font-style: normal;
  margin-bottom: 2px;
  transition: transform 0.2s;
}

.nav-tab span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-tab.active {
  color: #ffd700;
}

.nav-tab.active i {
  transform: scale(1.18);
  filter: drop-shadow(0 0 8px #ffd700);
}

/* ========================================================
   SAFE-AREA AWARE VIP HUD TOAST NOTIFICATION
   (Completely eliminates clipping / hanging window!)
======================================================== */
.toast-notice {
  position: fixed;
  top: max(env(safe-area-inset-top, 14px), 14px);
  left: 50%;
  transform: translate(-50%, -180%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(35, 14, 68, 0.98) 0%, rgba(14, 5, 30, 0.99) 100%);
  border: 1.5px solid #ffd700;
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 215, 0, 0.45);
  z-index: 9999;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.38s;
  white-space: nowrap;
}

.toast-notice.show {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

.toast-text {
  background: var(--gold-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: 'Cinzel', serif;
  font-weight: 900;
}

/* ========================================================
   MODALS & POPUPS
======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, #241147 0%, #100624 100%);
  border: 2px solid #ffd700;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 30px rgba(255, 215, 0, 0.4);
  position: relative;
  transform: scale(0.85);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-height: 88vh;
  overflow-y: auto;
}

.modal-overlay.open .modal-card { transform: scale(1); }

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.45);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header-icon {
  font-size: 46px;
  text-align: center;
  margin-bottom: 6px;
}

.gold-shimmer-badge {
  filter: drop-shadow(0 0 15px #ffd700);
}

.modal-title {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 1px;
  background: var(--gold-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 12px;
  color: #d1c8ea;
  text-align: center;
  line-height: 1.4;
  margin-bottom: 16px;
}

.bonus-highlight-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
  margin: 14px 0;
}

.bonus-amount-val {
  font-family: 'Cinzel', serif;
  font-size: 36px;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 20px #ffd700;
}

.bonus-amount-val.green-val {
  color: #00ff88;
  text-shadow: 0 0 20px #00ff88;
}

.bonus-amount-lbl {
  font-size: 11px;
  font-weight: 800;
  color: #b5a8d4;
  letter-spacing: 1.5px;
}

.disclaimer-badge {
  font-size: 10px;
  color: #a79cb8;
  line-height: 1.4;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 12px;
  border-radius: 10px;
  margin-top: 14px;
  margin-bottom: 14px;
  border-left: 3px solid #ffd700;
}

.btn-primary-modal {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: var(--gold-gradient);
  border: none;
  color: #2b1300;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.6);
  transition: transform 0.15s ease;
}

.btn-primary-modal:active { transform: scale(0.96); }

/* Daily Wheel Container */
.wheel-container {
  width: 250px;
  height: 250px;
  margin: 10px auto 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 24px solid #ffd700;
  z-index: 10;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.8));
}

.wheel-disc-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  transition: transform 4.5s cubic-bezier(0.12, 0.8, 0.32, 1);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

/* Shop Modal Grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.shop-item-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  border-radius: 16px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.shop-badge {
  position: absolute;
  top: -8px;
  background: linear-gradient(135deg, #ff0055, #990033);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.shop-item-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin: 6px 0;
}

.shop-coin-amount {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 900;
  color: #ffd700;
}

.shop-price-btn {
  width: 100%;
  height: 32px;
  border-radius: 10px;
  background: var(--gold-gradient);
  border: none;
  color: #2b1300;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  margin-top: 8px;
}

.shop-price-btn:active { transform: scale(0.94); }

/* ========================================================
   MEGA WIN CELEBRATION OVERLAY
======================================================== */
.big-win-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.big-win-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.big-win-box {
  text-align: center;
  transform: scale(0.8);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.big-win-title {
  font-family: 'Cinzel', serif;
  font-size: 34px;
  font-weight: 900;
  background: var(--gold-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.9));
  animation: megaPulse 0.8s infinite alternate ease-in-out;
}

@keyframes megaPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); filter: drop-shadow(0 0 35px #ffd700); }
}

.big-win-amount {
  font-family: 'Cinzel', serif;
  font-size: 42px;
  font-weight: 900;
  color: #00ff88;
  text-shadow: 0 0 25px rgba(0, 255, 136, 0.9);
  margin: 12px 0;
}

.big-win-sub {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffd700;
}
