/* ============================================================
   style.css — Neon Vault
   Theme: Deep midnight casino — navy, gold, cyan
   ============================================================ */

:root {
  --bg:          #04070f;
  --surface:     #080e1e;
  --surface2:    #0d1630;
  --surface3:    #121e3e;
  --border:      #1a2d5a;
  --border-hi:   #2a4a8f;
  --gold:        #f5c518;
  --gold-dim:    #c9960f;
  --gold-glow:   rgba(245,197,24,0.2);
  --cyan:        #00d4ff;
  --cyan-dim:    #0099cc;
  --green:       #00e676;
  --red:         #ff3d3d;
  --text:        #dde4f5;
  --text-muted:  #6e82b8;
  --text-dim:    #364872;

  --sym-size:    82px;   /* width & height of one symbol cell */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', system-ui, sans-serif;
  font-size: 15px;
  min-height: 100%;
  overflow-x: hidden;
}

/* Subtle grid overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(0,80,200,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,80,200,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none; z-index: 0;
}

/* ── Layout ── */
.layout {
  display: flex; flex-direction: row;
  min-height: 100vh; position: relative; z-index: 1;
}

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #060c1a, #0d1b40);
}

.game-title {
  font-family: 'Cinzel', serif;
  font-size: 1rem; font-weight: 900;
  color: var(--gold); letter-spacing: 0.14em;
  text-shadow: 0 0 24px var(--gold-glow);
  display: block;
}
.game-subtitle {
  font-size: 0.62rem; color: var(--text-dim);
  font-family: 'Cinzel', serif; letter-spacing: 0.1em;
}
.shard-badge {
  font-family: 'Cinzel', serif; font-size: 0.78rem; color: var(--cyan);
  background: rgba(0,212,255,0.08); border: 1px solid var(--cyan-dim);
  border-radius: 20px; padding: 3px 9px; white-space: nowrap;
}

.tab-bar { display: none; }

.sidebar-tab-content { display: block; padding: 12px; }

.section-label {
  font-family: 'Cinzel', serif; font-size: 0.63rem; font-weight: 700;
  letter-spacing: 0.14em; color: var(--text-muted);
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
  margin-bottom: 8px; text-transform: uppercase;
}

/* Deck rows */
.deck-row {
  display: grid; grid-template-columns: 26px 1fr auto auto;
  align-items: center; gap: 5px;
  padding: 5px 8px; margin-bottom: 4px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.8rem;
}
.deck-sym  { font-size: 1.05rem; }
.deck-name { color: var(--text-muted); }
.deck-count{ color: var(--text-dim); font-size: 0.72rem; }
.chip-pos  { color: var(--gold); font-weight: 700; font-size: 0.75rem; }
.chip-neg  { color: var(--red);  font-weight: 700; font-size: 0.75rem; }

/* Modifier cards */
.mod-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 10px; margin-bottom: 7px;
  position: relative; overflow: hidden;
}
.mod-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
}
.rarity-common::before   { background: #3a8a5c; }
.rarity-uncommon::before { background: #3a6cbf; }
.rarity-rare::before     { background: linear-gradient(90deg, #8b44cc, var(--gold)); }

.mod-header { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.mod-emoji  { font-size: 1rem; }
.mod-name   { font-weight: 700; font-size: 0.8rem; }
.mod-desc   { font-size: 0.7rem; color: var(--text-muted); line-height: 1.3; }
.empty-mods { color: var(--text-dim); font-size: 0.75rem; text-align: center; padding: 16px 0; font-style: italic; }

/* Paytable */
.pay-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0; border-bottom: 1px solid var(--border);
  font-size: 0.76rem; color: var(--text-muted);
}
.pay-row:last-child { border-bottom: none; }
.pay-pos { color: var(--gold); font-weight: 700; }
.pay-neg { color: var(--red);  font-weight: 700; }

.sidebar-footer { margin-top: auto; padding: 12px; border-top: 1px solid var(--border); }
.btn-forfeit {
  width: 100%; background: none; border: 1px solid var(--border);
  color: var(--text-dim); padding: 8px; border-radius: 8px; cursor: pointer;
  font-family: 'Cinzel', serif; font-size: 0.7rem; letter-spacing: 0.1em;
  transition: all 0.2s;
}
.btn-forfeit:hover { border-color: var(--red); color: var(--red); }

/* ══════════════════════════════════════════
   MAIN GAME AREA
══════════════════════════════════════════ */
.game-area {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 18px 14px 28px;
  max-width: 620px; margin: 0 auto; width: 100%;
}

/* HUD */
.hud {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; width: 100%;
  padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; margin-bottom: 10px;
}
.hud-left  { }
.hud-right { text-align: right; }
.hud-center{ text-align: center; }
.hud-stat-label {
  font-size: 0.6rem; font-family: 'Cinzel', serif;
  letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: 2px;
}
.hud-stage {
  font-family: 'Cinzel', serif; font-size: 0.68rem;
  letter-spacing: 0.12em; color: var(--text-muted);
}
.hud-round-name {
  font-family: 'Cinzel', serif; font-size: 0.92rem; font-weight: 700; color: var(--text);
}
.hud-round-name.boss { color: var(--red); text-shadow: 0 0 12px rgba(255,61,61,0.4); }
.hud-spins {
  font-family: 'Cinzel', serif; font-size: 1.7rem; font-weight: 700;
  color: var(--cyan); line-height: 1;
}
.hud-gold {
  font-family: 'Cinzel', serif; font-size: 1.7rem; font-weight: 700;
  color: var(--gold); line-height: 1;
}

/* Progress */
.progress-wrap { width: 100%; margin-bottom: 12px; }
.progress-bar {
  height: 9px; background: var(--surface2); border-radius: 999px;
  overflow: hidden; border: 1px solid var(--border);
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #14327a, var(--cyan));
  border-radius: 999px;
  transition: width 0.55s cubic-bezier(0.25,1,0.5,1);
}
.progress-fill.complete {
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  box-shadow: 0 0 10px var(--gold-glow);
}
.progress-label {
  text-align: center; font-size: 0.73rem; font-family: 'Cinzel', serif;
  color: var(--text-muted); margin-top: 4px; letter-spacing: 0.05em;
}

/* ══════════════════════════════════════════
   SLOT MACHINE — 5 reels × 3 rows
══════════════════════════════════════════ */
.slot-machine { width: 100%; margin-bottom: 14px; }

.reel-frame {
  background: #020510;
  border: 2px solid var(--border-hi);
  border-radius: 18px;
  padding: 12px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(0,50,150,0.3),
    0 8px 40px rgba(0,0,0,0.65),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Payline indicator dots */
.payline-indicators {
  display: flex; flex-direction: column;
  gap: 0; width: 10px; flex-shrink: 0; align-items: center;
  height: calc(var(--sym-size) * 3); justify-content: space-between;
  padding: 4px 0;
}
.pl-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border-hi); opacity: 0.4;
  transition: all 0.3s;
}
/* color-coded paylines */
.pl-1 { background: #f5c518; }
.pl-2 { background: #00d4ff; }
.pl-3 { background: #00e676; }
.pl-4 { background: #ff6b6b; }
.pl-5 { background: #c77dff; }

.reels-wrap {
  display: flex; gap: 6px; flex: 1; justify-content: center;
}

.reel {
  width: var(--sym-size);
  height: calc(var(--sym-size) * 3);
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface3);
  border: 1px solid var(--border-hi);
  position: relative;
  flex-shrink: 0;
}

.symbols-container {
  display: flex; flex-direction: column;
  transition: transform 1.1s cubic-bezier(0.15,0,0.08,1);
  will-change: transform;
}

.symbol {
  width: var(--sym-size);
  height: var(--sym-size);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; flex-shrink: 0; user-select: none;
  transition: background 0.25s, box-shadow 0.25s;
  border-radius: 8px;
}

/* Winning cell — box-shadow is injected inline per-payline color by ui.js */
.symbol.sym-win {
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  animation: symPulse 0.65s ease-in-out infinite alternate;
}

/* Non-winning cells on a lit payline — slightly dim */
.symbol.sym-dim {
  opacity: 0.45;
  filter: brightness(0.7) saturate(0.5);
  transition: opacity 0.2s, filter 0.2s;
}

/* Row fade overlays */
.reel-fade {
  position: absolute; left: 0; right: 0; height: 32px;
  pointer-events: none; z-index: 2;
}
.reel-fade.top {
  top: 12px;
  background: linear-gradient(to bottom, #020510 0%, transparent 100%);
  border-radius: 16px 16px 0 0;
}
.reel-fade.bottom {
  bottom: 12px;
  background: linear-gradient(to top, #020510 0%, transparent 100%);
  border-radius: 0 0 16px 16px;
}

/* ── Result card ── */
.result-card {
  width: 100%;
  background: var(--surface); border: 1px solid var(--border-hi);
  border-radius: 14px; padding: 12px 16px; margin-bottom: 12px;
  text-align: center; min-height: 68px;
}
.result-card.hidden { display: none; }
.result-card.fade-in { animation: fadeUp 0.28s ease-out; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-hand {
  font-family: 'Cinzel', serif; font-size: 1.05rem; font-weight: 700;
  letter-spacing: 0.1em; color: var(--gold); margin-bottom: 4px;
  text-shadow: 0 0 18px var(--gold-glow);
}
.lines-hit {
  font-size: 0.7rem; color: var(--text-muted); margin-bottom: 5px;
  font-family: 'Cinzel', serif; letter-spacing: 0.08em;
}
.result-breakdown {
  display: flex; align-items: center; justify-content: center;
  gap: 7px; flex-wrap: wrap; margin-bottom: 5px;
}
.chips-tag {
  background: rgba(0,230,118,0.12); border: 1px solid var(--green);
  color: var(--green); padding: 3px 8px; border-radius: 6px;
  font-weight: 700; font-size: 0.88rem;
}
.chips-tag.sm { font-size: 0.7rem; padding: 1px 5px; }
.mult-tag {
  background: rgba(255,61,61,0.12); border: 1px solid #ff6b6b;
  color: #ff8a8a; padding: 3px 8px; border-radius: 6px;
  font-weight: 700; font-size: 0.88rem;
}
.mult-tag.sm { font-size: 0.7rem; padding: 1px 5px; }
.score-tag {
  background: rgba(245,197,24,0.15); border: 1px solid var(--gold);
  color: var(--gold); padding: 3px 10px; border-radius: 6px;
  font-weight: 700; font-size: 0.92rem;
}
.result-x, .result-eq { color: var(--text-dim); font-weight: 700; font-size: 0.82rem; }
.effect-line { font-size: 0.71rem; color: var(--text-muted); padding: 1px 0; }

/* ── Spin button ── */
.spin-btn {
  width: 100%; padding: 18px;
  font-family: 'Cinzel', serif; font-size: 1.35rem; font-weight: 700;
  letter-spacing: 0.16em; color: #0a0e1a;
  background: linear-gradient(135deg, #f5c518, #e8a800);
  border: none; border-radius: 16px; cursor: pointer;
  box-shadow: 0 5px 0 #7a5000, 0 8px 20px rgba(245,197,24,0.3);
  transition: transform 0.08s, box-shadow 0.08s;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.spin-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #7a5000, 0 4px 8px rgba(245,197,24,0.15);
}
.spin-btn:disabled {
  background: linear-gradient(135deg, #242a44, #1a2038);
  color: var(--text-dim); box-shadow: 0 4px 0 #0d1020; cursor: not-allowed;
}

/* ══════════════════════════════════════════
   OVERLAYS
══════════════════════════════════════════ */
.overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(2,5,15,0.95); backdrop-filter: blur(5px);
  z-index: 100; align-items: center; justify-content: center; padding: 16px;
}
.overlay.active { display: flex; }

.overlay-card {
  background: var(--surface); border: 1px solid var(--border-hi);
  border-radius: 20px; padding: 26px 22px;
  width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,30,0.85), 0 0 0 1px rgba(255,255,255,0.04);
}
.overlay-eyebrow {
  font-family: 'Cinzel', serif; font-size: 0.62rem; letter-spacing: 0.2em;
  color: var(--text-dim); margin-bottom: 5px; text-transform: uppercase;
}
.overlay-title {
  font-family: 'Cinzel', serif; font-size: 1.55rem; font-weight: 900;
  letter-spacing: 0.08em; margin-bottom: 20px; line-height: 1.1;
}
.overlay-title.gold { color: var(--gold); text-shadow: 0 0 28px var(--gold-glow); }
.overlay-title.red  { color: var(--red); }

/* Pre-round */
.boss-badge {
  display: inline-block; background: linear-gradient(135deg, #700000, #e03030);
  color: white; font-family: 'Cinzel', serif; font-size: 0.62rem;
  font-weight: 700; letter-spacing: 0.15em; padding: 3px 10px;
  border-radius: 20px; margin-bottom: 8px;
}
.blind-stats { display: flex; gap: 10px; margin-bottom: 22px; }
.blind-stat {
  flex: 1; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 8px; text-align: center;
}
.blind-stat-label {
  font-family: 'Cinzel', serif; font-size: 0.58rem; letter-spacing: 0.12em;
  color: var(--text-dim); display: block; margin-bottom: 4px;
}
.blind-stat-value {
  font-family: 'Cinzel', serif; font-size: 1.15rem; font-weight: 700;
}
.blind-stat-value.gold  { color: var(--gold); }
.blind-stat-value.green { color: var(--green); }

/* ── Shop overlay ── */
.shop-card-wrap { max-width: 520px; }
.shop-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.shop-gold-badge {
  display: flex; flex-direction: column; align-items: flex-end;
  background: var(--surface2); border: 1px solid var(--gold-dim);
  border-radius: 10px; padding: 6px 12px;
}
.shop-gold-val {
  font-family: 'Cinzel', serif; font-size: 1.3rem; font-weight: 700;
  color: var(--gold); line-height: 1;
}

.shop-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 14px;
}
.shop-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 10px; display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: 5px; position: relative;
  transition: border-color 0.15s;
}
.shop-card:hover:not(.shop-disabled) { border-color: var(--border-hi); }
.shop-card.shop-disabled { opacity: 0.42; }
.sold-badge {
  position: absolute; top: 0; right: 0;
  background: var(--surface3); color: var(--text-dim);
  font-size: 0.5rem; font-weight: 700; letter-spacing: 0.1em;
  padding: 2px 6px; border-radius: 0 10px 0 6px;
}
.badge-rare::before {
  content: 'RARE'; position: absolute; top: 0; left: 0;
  background: linear-gradient(135deg, #8b44cc, var(--gold));
  color: white; font-size: 0.48rem; font-weight: 700; padding: 2px 6px;
  border-radius: 10px 0 6px 0; letter-spacing: 0.08em;
}
.badge-uncommon::before {
  content: 'RARE'; position: absolute; top: 0; left: 0;
  background: linear-gradient(135deg, #1e5799, #4a7fd4);
  color: white; font-size: 0.48rem; font-weight: 700; padding: 2px 6px;
  border-radius: 10px 0 6px 0; letter-spacing: 0.08em;
}
.badge-uncommon::before { content: 'UNCOMMON'; }

.shop-icon      { font-size: 1.9rem; line-height: 1; }
.shop-item-name { font-weight: 700; font-size: 0.82rem; }
.shop-item-desc { font-size: 0.7rem; color: var(--text-muted); line-height: 1.3; }
.shop-buy-btn {
  background: var(--gold); color: #0a0e1a; border: none; border-radius: 6px;
  padding: 5px 11px; font-weight: 700; cursor: pointer; font-size: 0.8rem;
  font-family: 'Rajdhani', sans-serif; margin-top: 4px; transition: background 0.12s;
}
.shop-buy-btn:hover:not(:disabled) { background: #ffe066; }
.shop-buy-btn:disabled { background: var(--surface3); color: var(--text-dim); cursor: not-allowed; }

.shop-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Game over ── */
.go-stats {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.go-stat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px; border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
}
.go-stat:last-child { border-bottom: none; }
.go-stat .gold { color: var(--gold); font-weight: 700; }
.go-stat .cyan { color: var(--cyan); font-weight: 700; }
.shards-row { background: rgba(0,212,255,0.05); }

.meta-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 13px; margin-bottom: 6px;
}
.meta-label { font-weight: 700; font-size: 0.85rem; }
.meta-desc  { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.meta-buy-btn {
  background: rgba(0,212,255,0.1); border: 1px solid var(--cyan-dim);
  color: var(--cyan); padding: 5px 11px; border-radius: 8px; font-weight: 700;
  cursor: pointer; font-size: 0.78rem; white-space: nowrap; transition: background 0.14s;
}
.meta-buy-btn:hover:not(:disabled) { background: rgba(0,212,255,0.2); }
.meta-buy-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Shared buttons ── */
.btn-primary {
  width: 100%; background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #0a0e1a; border: none; border-radius: 12px; padding: 13px;
  font-family: 'Cinzel', serif; font-size: 0.96rem; font-weight: 700;
  letter-spacing: 0.1em; cursor: pointer; transition: filter 0.14s;
}
.btn-primary:hover { filter: brightness(1.1); }

.btn-secondary {
  background: var(--surface2); border: 1px solid var(--border-hi);
  color: var(--text-muted); padding: 9px 12px; border-radius: 10px;
  font-family: 'Cinzel', serif; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.07em; cursor: pointer; transition: all 0.14s; flex: 1;
}
.btn-secondary:hover:not(:disabled) { border-color: var(--cyan-dim); color: var(--cyan); }
.btn-secondary:disabled { opacity: 0.3; cursor: not-allowed; }

.btn-skip {
  background: none; border: 1px solid var(--border);
  color: var(--green); padding: 9px 12px; border-radius: 10px;
  font-family: 'Cinzel', serif; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.07em; cursor: pointer; transition: border-color 0.14s; flex: 1;
}
.btn-skip:hover { border-color: var(--green); }

.btn-continue {
  background: linear-gradient(135deg, var(--gold), #d4960a);
  color: #0a0e1a; border: none; padding: 9px 16px; border-radius: 10px;
  font-family: 'Cinzel', serif; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.07em; cursor: pointer; transition: filter 0.14s; flex: 1;
}
.btn-continue:hover { filter: brightness(1.1); }

/* ── Modal ── */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(2,5,15,0.92); z-index: 200;
  align-items: center; justify-content: center; padding: 16px;
}
.modal-backdrop.active { display: flex; }
.modal-box {
  background: var(--surface); border: 1px solid var(--border-hi);
  border-radius: 16px; padding: 22px; width: 100%; max-width: 340px;
}
.modal-box h3 {
  font-family: 'Cinzel', serif; font-size: 0.95rem; color: var(--text); margin-bottom: 4px;
}
.remove-list { display: flex; flex-direction: column; gap: 6px; }
.remove-sym-btn {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 9px 12px; border-radius: 8px;
  cursor: pointer; font-size: 0.86rem; transition: border-color 0.14s; text-align: left;
}
.remove-sym-btn:hover { border-color: var(--red); }

/* ── Toast ── */
.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--gold);
  color: var(--gold); padding: 9px 20px; border-radius: 30px;
  font-family: 'Cinzel', serif; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.08em; z-index: 500; white-space: nowrap;
  pointer-events: none; transition: opacity 0.28s, transform 0.28s;
}
.toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-hide { opacity: 0; transform: translateX(-50%) translateY(-10px); }

/* ── Utilities ── */
.gold  { color: var(--gold); }
.green { color: var(--green); }
.red   { color: var(--red); }
.cyan  { color: var(--cyan); }
small  { color: var(--text-muted); }

/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════════════════════ */
@media (max-width: 760px) {
  :root { --sym-size: 62px; }

  .layout { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static;
    border-right: none; border-bottom: 1px solid var(--border);
  }

  .tab-bar {
    display: flex; border-bottom: 1px solid var(--border);
  }
  .tab-btn {
    flex: 1; background: none; border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-dim); padding: 9px;
    font-family: 'Cinzel', serif; font-size: 0.68rem;
    font-weight: 700; letter-spacing: 0.1em; cursor: pointer;
    transition: color 0.14s, border-color 0.14s;
  }
  .tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
  .sidebar-tab-content { display: none; }
  .sidebar-tab-content.active { display: block; max-height: 200px; overflow-y: auto; }
  .sidebar-footer { display: none; }

  .game-area { padding: 12px 8px 20px; }
  .hud { padding: 8px 12px; border-radius: 10px; }
  .hud-gold, .hud-spins { font-size: 1.35rem; }

  .reel-frame { gap: 4px; padding: 9px 6px; border-radius: 14px; }
  .reels-wrap { gap: 5px; }
  .symbol { font-size: 1.9rem; }
  .payline-indicators { gap: 0; }
  .pl-dot { width: 6px; height: 6px; }

  .spin-btn { font-size: 1.15rem; padding: 15px; border-radius: 12px; }

  .shop-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .overlay-card { padding: 18px 14px; }
  .overlay-title { font-size: 1.25rem; }
  .shop-actions { flex-direction: row; flex-wrap: wrap; }
  .btn-continue { flex: 100%; } /* full width on mobile */
}

@media (max-width: 400px) {
  :root { --sym-size: 54px; }
  .symbol { font-size: 1.6rem; }
  .hud-gold, .hud-spins { font-size: 1.15rem; }
  .reel-frame { padding: 7px 4px; }
  .payline-indicators { display: none; } /* hide on very small */
}

/* ══════════════════════════════════════════
   PAYLINE SVG LINES
══════════════════════════════════════════ */

/* Animated stroke-draw */
.payline-line {
  filter: drop-shadow(0 0 5px currentColor);
  opacity: 0.92;
}
.payline-line-draw {
  animation: strokeDraw 0.38s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes strokeDraw {
  to { stroke-dashoffset: 0; }
}

/* Symbol win glow — box-shadow is set inline per payline color */
.sym-win {
  border-radius: 8px;
  animation: symPulse 0.7s ease-in-out infinite alternate;
}
@keyframes symPulse {
  from { filter: brightness(1); }
  to   { filter: brightness(1.35) saturate(1.3); }
}

/* Payline sidebar dots: lit state */
.pl-dot.pl-lit {
  opacity: 1 !important;
  animation: dotPing 0.55s ease-out;
  box-shadow: 0 0 8px 3px currentColor;
}
@keyframes dotPing {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.7); }
  100% { transform: scale(1.1); }
}

/* ══════════════════════════════════════════
   SCREEN FLASH
══════════════════════════════════════════ */
#screen-flash {
  position: fixed; inset: 0; z-index: 900;
  background: white; opacity: 0;
  pointer-events: none;
}
#screen-flash.flashing {
  animation: screenFlash 0.65s ease-out forwards;
}
@keyframes screenFlash {
  0%   { opacity: 0.7; }
  30%  { opacity: 0.3; }
  100% { opacity: 0; }
}

/* ══════════════════════════════════════════
   JACKPOT OVERLAY
══════════════════════════════════════════ */
#jackpot-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 800;
  background: radial-gradient(ellipse at center, rgba(10,8,2,0.85) 0%, rgba(2,5,15,0.97) 100%);
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-direction: column;
}
#jackpot-overlay.active {
  display: flex;
  animation: jpFadeIn 0.25s ease-out;
}
@keyframes jpFadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

#jackpot-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.jackpot-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  animation: jpBounceIn 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes jpBounceIn {
  0%   { transform: scale(0.4) translateY(30px); opacity: 0; }
  100% { transform: scale(1) translateY(0);       opacity: 1; }
}

/* Pulsing glow ring behind the emoji */
.jackpot-glow-ring {
  position: absolute;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,197,24,0.35) 0%, transparent 70%);
  animation: jpRingPulse 1s ease-in-out infinite alternate;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
}
@keyframes jpRingPulse {
  from { transform: translate(-50%,-50%) scale(0.8); opacity: 0.6; }
  to   { transform: translate(-50%,-50%) scale(1.3); opacity: 1;   }
}

.jackpot-emoji {
  font-size: 5rem; line-height: 1;
  filter: drop-shadow(0 0 20px rgba(245,197,24,0.9));
  animation: jpSpin 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.1s both;
}
@keyframes jpSpin {
  from { transform: rotate(-20deg) scale(0.5); }
  to   { transform: rotate(0deg)   scale(1); }
}

.jackpot-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.8rem, 10vw, 5rem);
  font-weight: 900; letter-spacing: 0.12em;
  color: var(--gold);
  text-shadow:
    0 0 20px rgba(245,197,24,0.9),
    0 0 60px rgba(245,197,24,0.5),
    0 4px 0 #7a4e00;
  animation: jpTitlePulse 0.8s ease-in-out 0.3s infinite alternate both;
}
@keyframes jpTitlePulse {
  from { text-shadow: 0 0 20px rgba(245,197,24,0.9), 0 0 60px rgba(245,197,24,0.5), 0 4px 0 #7a4e00; }
  to   { text-shadow: 0 0 40px rgba(245,197,24,1),   0 0 100px rgba(245,197,24,0.8), 0 4px 0 #7a4e00; }
}

.jackpot-score {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 700; letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 0 20px rgba(0,212,255,0.8), 0 0 40px rgba(0,212,255,0.4);
  animation: jpScorePop 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.5s both;
}
@keyframes jpScorePop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.jackpot-sub {
  font-family: 'Cinzel', serif; font-size: 0.72rem;
  letter-spacing: 0.2em; color: rgba(255,255,255,0.35);
  margin-top: 12px;
  animation: jpSubFade 1s ease-in-out 1.2s both;
}
@keyframes jpSubFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 4px; }

/* ── Payline diagram rows in paytable ── */
.payline-diagram-row {
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}
.payline-diagram-row .pl-label {
  flex: 1;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
