@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --s-bg: #0a0c10;
  --s-primary: #00e5ff;
  --s-accent: #ff00ff;
  --s-gold: #ffc107;
  --s-green: #00e676;
  --s-red: #ff3d00;
  --s-dim: rgba(255,255,255,0.35);
  --s-mono: 'JetBrains Mono', monospace;
  --s-border: rgba(0,229,255,0.1);
  --cell-h: 100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%; overflow: hidden;
  font-family: var(--s-mono); background: var(--s-bg); color: #fff;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
body { display: flex; flex-direction: column; min-height: 100vh; max-height: 100vh; }
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(0,229,255,0.03) 0%, transparent 70%),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,229,255,0.012) 2px, rgba(0,229,255,0.012) 3px);
}

/* ═══════════════════════════════════════════
   HEADER — matches craps .hdr sizing
   ═══════════════════════════════════════════ */
.slots-hdr {
  display: flex; align-items: center; padding: 6px 16px;
  background: rgba(0,0,0,0.8); border-bottom: 1px solid var(--s-border);
  height: 42px; min-height: 42px; max-height: 42px;
  flex-shrink: 0; gap: 12px; z-index: 10; overflow: hidden;
}
.slots-logo {
  font-size: 1.5rem; font-weight: 700; color: var(--s-primary);
  text-decoration: none; letter-spacing: -0.5px;
  text-shadow: 0 0 12px rgba(0,229,255,0.3);
}
.slots-menu { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.slots-hdr-link {
  color: rgba(255,255,255,0.2); text-decoration: none; font-size: 0.85rem;
  transition: color 0.2s; display: flex; align-items: center; padding: 2px;
}
.slots-hdr-link:hover { color: rgba(255,255,255,0.6); }
.slots-hdr-link svg { width: 16px; height: 16px; fill: currentColor; }
.slots-hdr-stats { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.slots-hstat { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.slots-hstat-lbl { font-size: 0.7rem; color: rgba(255,255,255,0.35); letter-spacing: 1px; text-transform: uppercase; }
.slots-hstat-val { font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; }
.slots-hstat-val.bal { color: var(--s-gold); }
.slots-hstat-val.bet { color: #b39ddb; }
.slots-hstat-val.pnl.pos { color: var(--s-green); }
.slots-hstat-val.pnl.neg { color: var(--s-red); }

/* ═══════════════════════════════════════════
   DATA TICKER — matches craps .hist-strip
   ═══════════════════════════════════════════ */
.data-ticker {
  display: flex; align-items: center; padding: 4px 16px;
  background: rgba(0,0,0,0.6); border-bottom: 1px solid rgba(255,255,255,0.04);
  height: 38px; min-height: 38px; max-height: 38px;
  flex-shrink: 0; gap: 8px; overflow: hidden;
}
.ticker-label { font-size: 0.8rem; color: var(--s-primary); opacity: 0.6; white-space: nowrap; flex-shrink: 0; }
.ticker-scroll { display: flex; font-size: 0.75rem; color: rgba(255,255,255,0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; gap: 0; }
.ticker-item { flex-shrink: 0; }
.ticker-domain { font-weight: 700; }
.ticker-arrow { color: rgba(0,229,255,0.5); margin: 0 3px; }
.ticker-symbol { font-weight: 700; }
.ticker-sep { margin: 0 10px; color: rgba(255,255,255,0.12); }
.offline-tag { color: var(--s-red); font-weight: 700; font-size: 0.65rem; }

/* ═══════════════════════════════════════════
   WIN BANNER
   ═══════════════════════════════════════════ */
.win-banner {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  text-align: center; z-index: 100; pointer-events: none;
  opacity: 0; transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding: 16px 32px; border-radius: 12px;
  background: rgba(0,0,0,0.75);
  border: 1px solid rgba(0,230,118,0.25);
  backdrop-filter: blur(12px);
}
.win-banner.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.win-banner.big-win {
  border-color: rgba(255,193,7,0.35);
  background: rgba(0,0,0,0.8);
  box-shadow: 0 0 40px rgba(255,193,7,0.15);
}
.win-banner-text {
  display: block; font-size: 2.5rem; font-weight: 900; color: var(--s-green);
  text-shadow: 0 0 40px rgba(0,230,118,0.5), 0 0 80px rgba(0,230,118,0.2);
  letter-spacing: 6px;
}
.win-banner.big-win .win-banner-text {
  font-size: 3.5rem; color: var(--s-gold);
  text-shadow: 0 0 40px rgba(255,193,7,0.5), 0 0 80px rgba(255,193,7,0.2);
}
.win-banner-amount {
  display: block; font-size: 1.8rem; font-weight: 700; color: var(--s-green);
  margin-top: 4px; text-shadow: 0 0 20px rgba(0,230,118,0.4);
}
.win-banner.big-win .win-banner-amount { font-size: 2.5rem; color: #fff; }

/* ═══════════════════════════════════════════
   GAME AREA — 3-column layout
   ═══════════════════════════════════════════ */
.slots-game-area { flex: 1; display: flex; overflow: hidden; min-height: 0; z-index: 5; }

/* ═══════════════════════════════════════════
   SIDE PANELS — matches craps .panel 280px
   ═══════════════════════════════════════════ */
.slots-panel {
  width: 280px; flex-shrink: 0; display: flex; flex-direction: column;
  gap: 4px; padding: 10px; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none; z-index: 5;
  mask-image: linear-gradient(to bottom, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 92%, transparent 100%);
}
.slots-panel::-webkit-scrollbar { display: none; }
.slots-panel-right { border-left: 1px solid rgba(255,255,255,0.04); }

.sp-section {
  background: rgba(0,0,0,0.35); border: 1px solid rgba(0,229,255,0.06);
  border-radius: 4px; padding: 10px; flex-shrink: 0; position: relative; overflow: hidden;
}
.sp-section::after {
  content: ''; position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,229,255,0.1), transparent);
  top: 0; pointer-events: none; opacity: 0.4;
}
.sp-section-grow { flex: 1; min-height: 80px; overflow-y: auto; }

.sp-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sp-title { font-size: 0.7rem; color: var(--s-primary); opacity: 0.5; letter-spacing: 2px; text-transform: uppercase; }
.sp-val { font-size: 1rem; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.sp-val.pos { color: var(--s-green); }
.sp-val.neg { color: var(--s-red); }
.sp-val-sm { font-size: 0.7rem; font-weight: 400; opacity: 0.5; }

.sp-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.sp-metric { display: flex; flex-direction: column; gap: 2px; }
.sp-metric-k { font-size: 0.6rem; color: var(--s-primary); opacity: 0.4; letter-spacing: 1px; text-transform: uppercase; }
.sp-metric-v { font-size: 1rem; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }

.sparkline {
  width: 100%; height: 60px; display: block; border-radius: 2px;
  background: linear-gradient(rgba(0,229,255,0.02) 1px, transparent 1px),
              linear-gradient(90deg, rgba(0,229,255,0.02) 1px, transparent 1px);
  background-size: 20% 25%;
}

/* Symbol freq */
.symbol-freq-chart { display: flex; flex-direction: column; gap: 3px; }
.freq-row { display: flex; align-items: center; gap: 5px; font-size: 0.7rem; }
.freq-sym { font-size: 0.9rem; width: 22px; text-align: center; }
.freq-bar-wrap { flex: 1; height: 8px; background: rgba(255,255,255,0.04); border-radius: 3px; overflow: hidden; }
.freq-bar { height: 100%; border-radius: 3px; transition: width 0.3s; }
.freq-count { font-size: 0.65rem; color: var(--s-dim); width: 24px; text-align: right; font-variant-numeric: tabular-nums; }

/* Conspiracy */
.conspiracy-board { display: flex; flex-direction: column; gap: 4px; }
.conspiracy-item {
  font-size: 0.65rem; color: var(--s-accent); padding: 4px 6px;
  background: rgba(255,0,255,0.04); border-left: 2px solid rgba(255,0,255,0.25);
  border-radius: 0 3px 3px 0; line-height: 1.4;
}
.conspiracy-item.dim { color: var(--s-dim); background: none; border-color: rgba(255,255,255,0.08); }

/* Win log */
.win-log { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.win-log-entry { display: flex; gap: 8px; font-size: 0.65rem; padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.wl-spin { color: var(--s-dim); }
.wl-amount { font-weight: 700; }
.wl-lines { color: var(--s-dim); }
.pos { color: var(--s-green); }
.neg { color: var(--s-red); }
.scatter-tag { color: var(--s-primary); font-weight: 700; }

/* Data → Symbols mapping */
.data-mapping { display: flex; flex-direction: column; gap: 6px; }
.dm-explainer { font-size: 0.75rem; color: rgba(255,255,255,0.4); line-height: 1.5; }
.dm-entry {
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.dm-entry:last-child { border-bottom: none; }
.dm-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.9rem; margin-bottom: 2px;
}
.dm-icon { font-size: 1rem; flex-shrink: 0; }
.dm-domain { font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; flex-shrink: 0; }
.dm-arrow { color: var(--s-primary); font-size: 0.8rem; opacity: 0.5; }
.dm-syms { font-size: 1.1rem; }
.dm-detail { font-size: 0.7rem; color: rgba(255,255,255,0.4); padding-left: 28px; line-height: 1.4; }
.dm-offline { color: var(--s-red); font-weight: 700; font-size: 0.65rem; margin-right: 4px; }

.dim { color: var(--s-dim); font-size: 0.7rem; }

/* ═══════════════════════════════════════════
   SLOT MACHINE — the star of the show
   ═══════════════════════════════════════════ */
.slots-center {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding: 8px 12px;
  min-width: 0; z-index: 5; gap: 6px;
  overflow-y: auto;
}

.slot-machine {
  background: linear-gradient(180deg, rgba(20,20,40,0.9) 0%, rgba(10,10,25,0.95) 100%);
  border: 1px solid rgba(0,229,255,0.15);
  border-radius: 12px; padding: 10px 12px 4px; min-width: 0;
  box-shadow: 0 0 40px rgba(0,229,255,0.06), inset 0 1px 0 rgba(255,255,255,0.04);
  max-width: 700px; width: 100%;
}

/* Domain icons above reels */
.reel-labels {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 4px; margin-bottom: 6px; padding: 0 2px;
}
.reel-domain-label { text-align: center; font-size: 1rem; line-height: 1; position: relative; padding-bottom: 6px; }
.rdl-icon { opacity: 0.4; transition: opacity 0.3s; }
.rdl-icon.active { opacity: 1; }
.rdl-status {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,0.08); transition: background 0.3s;
}
.rdl-status.live { background: var(--s-green); box-shadow: 0 0 8px rgba(0,230,118,0.5); }
.rdl-status.offline { background: var(--s-red); }

/* Reels frame */
.reels-frame {
  position: relative; background: rgba(0,0,0,0.6);
  border-radius: 0 8px 8px 0; border: 1px solid rgba(255,255,255,0.05);
  border-left: none; overflow: hidden; flex: 1; min-width: 0;
}
.reels-container {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 2px; padding: 2px; position: relative;
}
.reel { position: relative; }
.reel-viewport { height: calc(var(--cell-h) * 3); overflow: hidden; position: relative; }
.reel-strip { display: flex; flex-direction: column; will-change: transform; }

/* Cells */
.reel-cell {
  height: var(--cell-h); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  background: rgba(255,255,255,0.015);
  border-radius: 4px; transition: box-shadow 0.3s; position: relative;
}
.reel-cell[data-row="1"] { background: rgba(255,255,255,0.04); }
.cell-emoji { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 0 6px rgba(255,255,255,0.1)); }
.cell-name { font-size: 0.55rem; font-weight: 700; letter-spacing: 0.5px; opacity: 0.5; }
.cell-data { display: none; }

.reel-cell.win-glow { animation: cellGlow 0.4s ease-in-out 3; }
@keyframes cellGlow {
  0%, 100% { background: rgba(255,255,255,0.015); }
  50% { background: rgba(0,230,118,0.15); }
}

/* Top/bottom edge fade */
.reels-frame::before, .reels-frame::after {
  content: ''; position: absolute; left: 0; right: 0; height: 30px;
  z-index: 2; pointer-events: none;
}
.reels-frame::before { top: 0; background: linear-gradient(180deg, rgba(10,12,16,0.7) 0%, transparent 100%); }
.reels-frame::after { bottom: 0; background: linear-gradient(0deg, rgba(10,12,16,0.7) 0%, transparent 100%); }

/* Machine status */
.machine-status {
  text-align: center; font-size: 0.85rem; font-weight: 700;
  color: rgba(255,255,255,0.4); letter-spacing: 2px; padding: 6px 0 2px;
  transition: color 0.3s;
}
.machine-status.scanning { color: var(--s-primary); }
.machine-status.win { color: var(--s-green); text-shadow: 0 0 10px rgba(0,230,118,0.4); }
.machine-status.lose { color: rgba(255,255,255,0.2); }

/* ═══════════════════════════════════════════
   CONTROLS — matches craps btn sizing
   ═══════════════════════════════════════════ */
.slots-controls { max-width: 700px; width: 100%; padding: 8px 0; flex-shrink: 0; }
.controls-row {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}

.bet-chip {
  display: flex; flex-direction: column; align-items: center;
  padding: 4px 12px; min-width: 52px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
}
.bet-chip-total { border-color: rgba(0,229,255,0.2); background: rgba(0,229,255,0.04); }
.bet-chip-val { font-size: 1rem; font-weight: 700; color: var(--s-gold); font-variant-numeric: tabular-nums; }
.bet-chip-total .bet-chip-val { color: var(--s-primary); }
.bet-chip-lbl { font-size: 0.55rem; color: var(--s-dim); letter-spacing: 0.5px; }

.slots-btn {
  font-family: var(--s-mono); font-weight: 700;
  border: none; border-radius: 6px; cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, filter 0.1s;
  text-transform: uppercase; white-space: nowrap;
}
.slots-btn:hover { filter: brightness(1.1); }
.slots-btn:active { transform: scale(0.95); }
.slots-btn-sm {
  padding: 6px 12px; font-size: 0.7rem;
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.1);
}
.slots-btn-sm:hover { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8); }

.slots-btn-spin {
  padding: 10px 36px; font-size: 1.2rem; font-weight: 900;
  background: linear-gradient(180deg, #4dd0e1, #00838f);
  color: #fff; border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,229,255,0.3);
  letter-spacing: 1px; text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.slots-btn-spin:hover { box-shadow: 0 4px 20px rgba(0,229,255,0.5); }
.slots-btn-spin .key-hint {
  font-size: 0.55rem; font-weight: 400; opacity: 0.5;
  margin-left: 6px; border: 1px solid rgba(255,255,255,0.2);
  padding: 1px 4px; border-radius: 3px;
}

.slots-btn-auto {
  padding: 10px 20px; font-size: 0.85rem; font-weight: 900;
  background: linear-gradient(180deg, #ab47bc, #6a1b9a);
  color: #fff; border-radius: 8px;
  box-shadow: 0 2px 10px rgba(171,71,188,0.25);
  letter-spacing: 1px; text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.slots-btn-auto:hover { box-shadow: 0 4px 20px rgba(171,71,188,0.4); }
.slots-btn-auto.active {
  background: linear-gradient(180deg, #ef5350, #c62828);
  box-shadow: 0 2px 10px rgba(244,67,54,0.4);
  animation: autoPulse 1.2s ease infinite;
}
@keyframes autoPulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(244,67,54,0.3); }
  50% { box-shadow: 0 0 24px rgba(244,67,54,0.6); }
}

.free-spin-indicator {
  text-align: center; padding: 6px; margin-top: 6px;
  background: rgba(0,229,255,0.06); border: 1px solid rgba(0,229,255,0.2);
  border-radius: 6px; animation: freeSpinPulse 1.5s infinite;
}
.free-spin-text { font-size: 0.85rem; font-weight: 700; color: var(--s-primary); letter-spacing: 1px; }
@keyframes freeSpinPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(0,229,255,0.08); }
  50% { box-shadow: 0 0 20px rgba(0,229,255,0.25); }
}

/* ═══════════════════════════════════════════
   NARRATIVE — compact log below controls
   ═══════════════════════════════════════════ */
.spin-narrative {
  max-width: 700px; width: 100%;
  max-height: 36px; overflow-y: auto;
  font-size: 0.65rem; line-height: 1.5;
  color: rgba(255,255,255,0.3); padding: 4px 0;
}
.narrative-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: narrativeFadeIn 0.15s ease-out; }
.narrative-prefix { font-weight: 700; margin-right: 3px; }
@keyframes narrativeFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ═══════════════════════════════════════════
   STATS FOOTER — matches craps .stats-bar
   ═══════════════════════════════════════════ */
.slots-stats-bar {
  display: flex; flex-direction: row; gap: 0;
  background: rgba(0,0,0,0.85); border-top: 1px solid rgba(0,229,255,0.15);
  z-index: 10; height: 48px; min-height: 48px; max-height: 48px;
  flex-shrink: 0; overflow: hidden;
}
.slots-stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4px 12px; border-right: 1px solid rgba(255,255,255,0.06); flex: 1;
}
.slots-stat:last-child { border-right: none; }
.slots-stat-k { font-size: 0.65rem; text-transform: uppercase; color: var(--s-primary); opacity: 0.5; letter-spacing: 1px; line-height: 1; }
.slots-stat-v { font-size: 1.1rem; font-weight: 700; color: #fff; line-height: 1.2; font-variant-numeric: tabular-nums; }
.slots-stat-v.best { color: var(--s-green); }
.slots-stat-v.worst { color: var(--s-red); }

/* ═══════════════════════════════════════════
   CANVAS / EFFECTS
   ═══════════════════════════════════════════ */
#confettiCanvas { position: fixed; inset: 0; pointer-events: none; z-index: 150; }
.float-text { animation: floatUp 1s ease-out forwards; }
@keyframes floatUp { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-60px); } }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1100px) { .slots-panel { width: 220px; } }
@media (max-width: 900px) { .slots-panel-left { display: none; } .slots-panel-right { width: 200px; } }
@media (max-width: 700px) {
  .slots-panel { display: none; }
  .slots-hdr { padding: 4px 10px; height: 36px; min-height: 36px; max-height: 36px; }
  .slots-logo { font-size: 1.2rem; }
  .slots-menu { gap: 4px; }
  .slots-hdr-link svg { width: 14px; height: 14px; }
  .slots-hstat-lbl { font-size: 0.6rem; }
  .slots-hstat-val { font-size: 0.85rem; }
  .data-ticker { height: 32px; min-height: 32px; max-height: 32px; }
  .ticker-label { font-size: 0.65rem; }
  .ticker-scroll { font-size: 0.6rem; }
  :root { --cell-h: 72px; }
  .cell-emoji { font-size: 1.8rem; }
  .cell-name { font-size: 0.45rem; }
  .reel-domain-label { font-size: 0.8rem; }
  .bet-chip-val { font-size: 0.85rem; }
  .bet-chip-lbl { font-size: 0.45rem; }
  .slots-btn-spin { font-size: 1rem; padding: 8px 28px; }
  .slots-btn-auto { font-size: 0.75rem; padding: 8px 16px; }
  .slots-btn-sm { font-size: 0.6rem; padding: 5px 10px; }
  .machine-status { font-size: 0.7rem; }
  .slots-stats-bar { height: 40px; min-height: 40px; max-height: 40px; }
  .slots-stat-k { font-size: 0.55rem; }
  .slots-stat-v { font-size: 0.9rem; }
  .win-banner-text { font-size: 1.8rem; }
  .win-banner.big-win .win-banner-text { font-size: 2.5rem; }
  .win-banner { padding: 12px 20px; }
  .data-event-banner { top: 40px; right: 8px; max-width: 280px; padding: 6px 10px; }
  .deb-text { font-size: 0.6rem; }
  .achievement-toast { top: 78px; right: 8px; max-width: 260px; padding: 8px 12px; }
  .at-icon { font-size: 1.5rem; }
  .at-name { font-size: 0.8rem; }
  .at-desc { font-size: 0.55rem; }
  .streak-banner { padding: 10px 20px; }
  .streak-banner-text { font-size: 1.5rem; }
}

/* ═══════════════════════════════════════════
   BONUS WHEEL (always visible, inline)
   ═══════════════════════════════════════════ */
.wheel-section {
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0; max-width: 700px; width: 100%;
}
.wheel-label {
  font-size: 0.7rem; font-weight: 900; color: var(--s-dim);
  letter-spacing: 3px; text-transform: uppercase; margin-bottom: 8px;
  transition: color 0.3s, text-shadow 0.3s;
}
.wheel-label.active {
  color: var(--s-gold); text-shadow: 0 0 15px rgba(255,193,7,0.5);
  animation: wheelLabelPulse 0.6s infinite;
}
@keyframes wheelLabelPulse { 0%,100% { opacity:1; } 50% { opacity:0.6; } }

.wheel-inline {
  position: relative; width: 220px; height: 220px;
}
.wheel-inline canvas { display: block; }
.wheel-progress-ring {
  position: absolute; inset: -10px; width: 240px; height: 240px;
  transform: rotate(-90deg);
  pointer-events: none;
}
.wpr-bg { fill: none; stroke: rgba(255,255,255,0.04); stroke-width: 4; }
.wpr-fill {
  fill: none; stroke: transparent; stroke-width: 4;
  stroke-linecap: round; transition: stroke-dashoffset 0.4s, stroke 0.4s;
}

.wheel-prize-inline {
  font-size: 1.2rem; font-weight: 900; min-height: 24px;
  text-shadow: 0 0 15px currentColor;
  opacity: 0; transition: opacity 0.3s;
}
.wheel-prize-inline.active { opacity: 1; animation: prizeReveal 0.5s ease-out; }
@keyframes prizeReveal { 0% { transform: scale(0.5); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* ═══════════════════════════════════════════
   DATA POWER BARS
   ═══════════════════════════════════════════ */
.data-power-bars {
  display: flex; gap: 6px; max-width: 700px; width: 100%;
  flex-shrink: 0; padding: 0 4px;
}
.dpb {
  flex: 1; display: flex; align-items: center; gap: 3px;
  padding: 3px 0; transition: transform 0.2s;
}
.dpb.surge { animation: dpbSurge 0.4s ease-in-out infinite; }
@keyframes dpbSurge { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.dpb-icon { font-size: 0.75rem; flex-shrink: 0; }
.dpb-track {
  flex: 1; height: 6px; background: rgba(255,255,255,0.04);
  border-radius: 3px; overflow: hidden; border: 1px solid rgba(255,255,255,0.04);
}
.dpb-fill {
  height: 100%; width: 0%; border-radius: 3px;
  transition: width 0.4s, background 0.3s;
}
.dpb-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.08); transition: background 0.3s;
}
.dpb-dot.live { background: var(--s-green); box-shadow: 0 0 4px rgba(0,230,118,0.4); }
.dpb-dot.offline { background: var(--s-red); }

/* ═══════════════════════════════════════════
   DATA INTEL DASHBOARD
   ═══════════════════════════════════════════ */
.data-intel {
  display: flex; gap: 6px; max-width: 700px; width: 100%;
  flex-shrink: 0; padding: 0 4px;
}
.di-section {
  flex: 1; padding: 6px 8px; border-radius: 6px;
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.04);
  min-width: 0;
}
.di-hdr { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.di-icon { font-size: 0.8rem; }
.di-label { font-size: 0.55rem; color: var(--s-primary); opacity: 0.5; letter-spacing: 1.5px; text-transform: uppercase; }
.di-chart { width: 100%; height: 32px; display: block; border-radius: 2px; }
.di-status {
  font-size: 0.6rem; color: var(--s-dim); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.di-status.bull { color: #66bb6a; font-weight: 700; text-shadow: 0 0 8px rgba(102,187,106,0.4); }
.di-status.bear { color: #ef5350; font-weight: 700; text-shadow: 0 0 8px rgba(239,83,80,0.4); }
.di-status.neutral { color: var(--s-dim); }

/* Temp spread */
.di-temp-duel { min-height: 32px; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.di-temp-placeholder { font-size: 0.6rem; color: var(--s-dim); }
.di-temp-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.65rem; gap: 4px;
}
.di-temp-city { color: rgba(255,255,255,0.6); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.di-temp-val { font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.di-temp-hot { color: #FF5722; }
.di-temp-cold { color: #64B5F6; }
.di-temp-spread {
  text-align: center; font-size: 0.7rem; font-weight: 900;
  margin-top: 2px; letter-spacing: 0.5px;
}
.di-temp-spread.shock { color: #FFD700; text-shadow: 0 0 8px rgba(255,193,7,0.4); animation: shockPulse 1s infinite; }
@keyframes shockPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

/* Seismic gauge */
.di-gauge {
  height: 8px; background: rgba(255,255,255,0.06); border-radius: 4px;
  overflow: hidden; position: relative; margin-top: 4px;
}
.di-gauge-fill {
  height: 100%; width: 0%; border-radius: 4px;
  background: #FF6E40; transition: width 0.5s, background 0.3s;
}
.di-gauge-fill.charged { background: linear-gradient(90deg, #FF6E40, #FF3D00); box-shadow: 0 0 8px rgba(255,61,0,0.4); }
.di-gauge-fill.critical { background: linear-gradient(90deg, #FF3D00, #FF00FF); box-shadow: 0 0 12px rgba(255,0,255,0.4); animation: seismicPulse 0.5s infinite; }
@keyframes seismicPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }

/* Data combo bar */
.data-combo-bar {
  max-width: 700px; width: 100%; padding: 5px 10px;
  display: flex; align-items: center; gap: 8px; justify-content: center;
  background: linear-gradient(90deg, rgba(255,0,255,0.08), rgba(0,229,255,0.08));
  border: 1px solid rgba(255,0,255,0.25); border-radius: 6px;
  animation: comboBarPulse 1.5s infinite;
}
@keyframes comboBarPulse {
  0%,100% { border-color: rgba(255,0,255,0.25); }
  50% { border-color: rgba(255,0,255,0.5); box-shadow: 0 0 12px rgba(255,0,255,0.15); }
}
.dc-icon { font-size: 1rem; }
.dc-name { font-size: 0.75rem; font-weight: 900; color: var(--s-accent); letter-spacing: 1px; }
.dc-reward { font-size: 0.65rem; color: var(--s-gold); font-weight: 700; }

/* ═══════════════════════════════════════════
   STATUS LINE (single line, replaces narrative)
   ═══════════════════════════════════════════ */
.status-line {
  font-size: 0.7rem; color: var(--s-dim); text-align: center;
  max-width: 700px; width: 100%; flex-shrink: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 2px 0; letter-spacing: 0.5px;
  transition: color 0.3s;
}

/* ═══════════════════════════════════════════
   PERSISTENT COMBO DISPLAY (in machine footer)
   ═══════════════════════════════════════════ */
.combo-display {
  font-size: 0.7rem; font-weight: 900; letter-spacing: 1px;
  transition: color 0.3s, transform 0.2s;
}
.combo-display.active { animation: comboPulse 0.3s ease-out; }
.combo-display.cold { color: #64B5F6; }
@keyframes comboPulse { 0% { transform: scale(0.8); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* ═══════════════════════════════════════════
   LUCK GAUGE (matches craps)
   ═══════════════════════════════════════════ */
.luck-gauge { margin-top: 4px; }
.luck-track {
  position: relative; height: 8px;
  background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden;
}
.luck-fill {
  position: absolute; top: 0; height: 100%; border-radius: 4px;
  transition: left 0.6s ease, width 0.6s ease, background 0.6s ease;
  width: 4px; left: 50%;
}
.luck-marker {
  position: absolute; top: -2px; width: 4px; height: 12px;
  background: #fff; border-radius: 2px; left: 50%;
  transform: translateX(-50%); transition: left 0.6s ease;
  box-shadow: 0 0 6px rgba(255,255,255,0.4); z-index: 2;
}
.luck-center {
  position: absolute; top: 0; left: 50%; width: 2px; height: 100%;
  background: rgba(255,255,255,0.15); transform: translateX(-50%);
}
.luck-labels {
  display: flex; justify-content: space-between; margin-top: 3px;
  font-size: 0.5rem; color: var(--s-dim); letter-spacing: 1px;
}

/* ═══════════════════════════════════════════
   STREAK HEATSTRIP
   ═══════════════════════════════════════════ */
.streak-heatstrip {
  display: flex; gap: 1px; margin-top: 6px; height: 10px;
  border-radius: 2px; overflow: hidden;
}
.heat-block {
  flex: 1; min-width: 3px; max-width: 8px; border-radius: 1px;
  transition: background 0.2s;
}
.heat-block.win { background: var(--s-green); opacity: 0.7; }
.heat-block.lose { background: var(--s-red); opacity: 0.7; }

/* ═══════════════════════════════════════════
   MACHINE ROW (multiplier + machine)
   ═══════════════════════════════════════════ */
/* ═══════════════════════════════════════════
   MACHINE BODY (integrated multiplier + reels)
   ═══════════════════════════════════════════ */
.machine-body { display: flex; }

/* Multiplier strip — left edge inside machine */
.mult-strip {
  width: 28px; flex-shrink: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: space-between; padding: 4px 0;
  border-right: 1px solid rgba(0,229,255,0.06);
}
.mult-strip .mult-track {
  flex: 1; width: 14px; background: rgba(0,229,255,0.04);
  border-radius: 7px; position: relative; overflow: hidden;
  border: 1px solid rgba(0,229,255,0.08);
}
.mult-strip .mult-fill {
  position: absolute; bottom: 0; left: 0; right: 0;
  border-radius: 7px; transition: height 0.4s, background 0.4s, box-shadow 0.4s;
  height: 0%;
}
.mult-strip .mult-mark {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: 1px dashed rgba(255,255,255,0.12);
}
.mult-strip .mult-mark span {
  position: absolute; right: -20px; top: -5px;
  font-size: 0.35rem; color: rgba(255,255,255,0.15); white-space: nowrap;
}
.mult-strip .mult-label {
  font-size: 0.65rem; font-weight: 900; min-height: 12px;
  text-shadow: 0 0 8px currentColor; transition: color 0.3s;
}
.mult-strip.active .mult-track { border-color: rgba(0,229,255,0.25); box-shadow: 0 0 6px rgba(0,229,255,0.08); }

/* ═══════════════════════════════════════════
   MOMENTUM STRIP (bottom edge of machine)
   ═══════════════════════════════════════════ */
.momentum-strip {
  height: 4px; background: rgba(0,229,255,0.03);
  border-radius: 0 0 8px 8px; overflow: hidden;
}
.momentum-fill {
  height: 100%; width: 0%;
  transition: width 0.4s, background 0.4s;
}
.machine-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 8px 0;
}
.momentum-label {
  font-size: 0.6rem; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}
.momentum-label.pulse { animation: momentumPulse 0.8s infinite; }
@keyframes momentumPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ═══════════════════════════════════════════
   DATA FEED (right panel — big & readable)
   ═══════════════════════════════════════════ */
.data-feed { display: flex; flex-direction: column; gap: 4px; }
.df-entry { padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.df-entry:last-child { border-bottom: none; }
.df-header { display: flex; align-items: center; gap: 5px; font-size: 0.85rem; }
.df-icon { font-size: 0.9rem; }
.df-domain { font-size: 0.7rem; font-weight: 700; letter-spacing: 1px; }
.df-arrow { color: var(--s-primary); opacity: 0.5; }
.df-syms { font-size: 1rem; }
.df-detail { font-size: 0.7rem; color: rgba(255,255,255,0.45); padding-left: 24px; line-height: 1.4; }
.surge-tag { color: #FF00FF; font-weight: 700; font-size: 0.6rem; animation: surgeBlink 0.5s infinite; }
@keyframes surgeBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Win log tags */
.mult-tag { color: var(--s-gold); font-size: 0.55rem; font-weight: 700; }
.combo-tag { color: #FF8800; font-size: 0.55rem; font-weight: 700; }
.bull-tag { color: #66bb6a; font-size: 0.55rem; font-weight: 700; }
.thermal-tag { color: #FFD700; font-size: 0.55rem; font-weight: 700; }
.wl-tags { display: flex; gap: 4px; }

/* ═══════════════════════════════════════════
   COMBO COUNTER
   ═══════════════════════════════════════════ */
/* combo counter is now persistent in machine footer — see .combo-display */

/* ═══════════════════════════════════════════
   NUMBER POP
   ═══════════════════════════════════════════ */
.number-pop {
  position: fixed; top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem; font-weight: 900;
  font-family: var(--s-mono);
  pointer-events: none; z-index: 95;
  opacity: 0;
}
.number-pop.active { animation: numPop 0.8s ease-out forwards; }
@keyframes numPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  40% { transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(0.8); }
}

/* ═══════════════════════════════════════════
   SCREEN FLASH
   ═══════════════════════════════════════════ */
.screen-flash {
  position: fixed; inset: 0; z-index: 100;
  pointer-events: none; opacity: 0;
  transition: opacity 0.15s ease-out;
}

/* ═══════════════════════════════════════════
   VIGNETTES
   ═══════════════════════════════════════════ */
.danger-vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 80;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(255,0,0,0.3) 100%);
  opacity: 0; transition: opacity 0.5s;
}
.euphoria-vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 80;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,255,136,0.15) 100%);
  opacity: 0; transition: opacity 0.5s;
}

/* ═══════════════════════════════════════════
   SHOCKWAVE
   ═══════════════════════════════════════════ */
.shockwave {
  position: fixed; top: 50%; left: 50%;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid rgba(0,229,255,0.6);
  pointer-events: none; z-index: 98;
  animation: shockExpand 0.6s ease-out forwards;
}
@keyframes shockExpand {
  0% { width: 10px; height: 10px; opacity: 1; margin-left: -5px; margin-top: -5px; }
  100% { width: 500px; height: 500px; opacity: 0; margin-left: -250px; margin-top: -250px; }
}

/* ═══════════════════════════════════════════
   DATA SURGE REEL EFFECT
   ═══════════════════════════════════════════ */
.reel.surge-active .reel-viewport {
  box-shadow: 0 0 20px rgba(255,0,255,0.4), inset 0 0 15px rgba(255,0,255,0.2);
  animation: surgeFlash 0.3s ease-in-out 3;
}
@keyframes surgeFlash {
  0%, 100% { box-shadow: 0 0 20px rgba(255,0,255,0.2); }
  50% { box-shadow: 0 0 30px rgba(255,0,255,0.6), inset 0 0 20px rgba(255,0,255,0.3); }
}

/* ═══════════════════════════════════════════
   BONUS WHEEL OVERLAY
   ═══════════════════════════════════════════ */
/* (wheel is now inline — see BONUS WHEEL section above) */

/* Scrollbars */
.slots-panel::-webkit-scrollbar, .data-feed::-webkit-scrollbar, .win-log::-webkit-scrollbar,
.spin-narrative::-webkit-scrollbar { width: 4px; }
.slots-panel::-webkit-scrollbar-track, .data-feed::-webkit-scrollbar-track,
.win-log::-webkit-scrollbar-track, .spin-narrative::-webkit-scrollbar-track { background: transparent; }
.slots-panel::-webkit-scrollbar-thumb, .data-feed::-webkit-scrollbar-thumb,
.win-log::-webkit-scrollbar-thumb, .spin-narrative::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }

/* Mobile overrides for new elements */
@media (max-width: 700px) {
  .wheel-inline { width: 140px; height: 140px; }
  .wheel-inline canvas { width: 140px; height: 140px; }
  .wheel-progress-ring { width: 160px; height: 160px; inset: -10px; }
  .wheel-label { font-size: 0.6rem; }
  .data-power-bars { gap: 3px; }
  .dpb-icon { font-size: 0.6rem; }
  .dpb-track { height: 4px; }
  .status-line { font-size: 0.6rem; }
  .df-header { font-size: 0.7rem; }
  .df-syms { font-size: 0.85rem; }
  .df-detail { font-size: 0.6rem; }
  .data-intel { gap: 3px; }
  .di-section { padding: 4px 6px; }
  .di-label { font-size: 0.45rem; }
  .di-chart { height: 24px; }
  .di-status { font-size: 0.5rem; }
  .di-temp-row { font-size: 0.55rem; }
  .number-pop { font-size: 2rem; }
  .mg-title { font-size: 1.6rem; }
  .minigame-grid { gap: 6px; }
  .mg-card-icon { font-size: 1.3rem; }
  .mg-cash { font-size: 0.85rem; }
  .mg-total { font-size: 0.9rem; }
  .mg-total span { font-size: 1.1rem; }
}

/* ═══════════════════════════════════════════
   DATA BREACH MINIGAME
   ═══════════════════════════════════════════ */
.minigame-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s;
  backdrop-filter: blur(8px);
}
.minigame-overlay.active { opacity: 1; pointer-events: all; }

.minigame-container { text-align: center; max-width: 520px; width: 92%; }

.mg-title {
  font-family: var(--s-mono); font-size: 2.5rem; font-weight: 900;
  color: #00FFFF; letter-spacing: 0.2em;
  text-shadow: 0 0 30px rgba(0,255,255,0.5), 0 0 60px rgba(0,255,255,0.25);
  margin-bottom: 4px;
}
.mg-subtitle {
  font-family: var(--s-mono); font-size: 0.65rem;
  color: rgba(255,255,255,0.35); letter-spacing: 0.15em; margin-bottom: 20px;
}

.minigame-info {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; padding: 0 8px;
}
.mg-total { font-family: var(--s-mono); font-size: 1rem; color: #00FF88; }
.mg-total span { font-weight: 900; font-size: 1.3rem; }
.mg-lives { font-family: var(--s-mono); font-size: 1rem; }

.minigame-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }

.mg-card { aspect-ratio: 1; perspective: 600px; cursor: pointer; }
.mg-card.revealed { cursor: default; }
.mg-card.dimmed { opacity: 0.25; }

.mg-card-inner {
  width: 100%; height: 100%; position: relative;
  transition: transform 0.5s; transform-style: preserve-3d;
}
.mg-card.revealed .mg-card-inner { transform: rotateY(180deg); }

.mg-card-front, .mg-card-back {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: 8px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-family: var(--s-mono);
}

.mg-card-front {
  background: linear-gradient(135deg, #1a1e2e, #0d1117);
  border: 1px solid rgba(0,255,255,0.15);
  box-shadow: 0 0 12px rgba(0,255,255,0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.mg-card:not(.revealed):hover .mg-card-front {
  border-color: rgba(0,255,255,0.5);
  box-shadow: 0 0 20px rgba(0,255,255,0.2);
  background: linear-gradient(135deg, #1e2640, #0d1117);
}

.mg-card-icon { font-size: 1.8rem; }
.mg-card-idx { font-size: 0.55rem; color: rgba(255,255,255,0.2); margin-top: 4px; letter-spacing: 1px; }

.mg-card-back {
  background: linear-gradient(135deg, #1a1e2e, #0d1117);
  border: 1px solid rgba(255,255,255,0.1);
  transform: rotateY(180deg);
}
.mg-card-back.cash { border-color: rgba(0,255,136,0.5); background: linear-gradient(135deg, #0a2e1a, #0d1117); }
.mg-card-back.multiplier { border-color: rgba(255,0,255,0.5); background: linear-gradient(135deg, #2e0a2e, #0d1117); }
.mg-card-back.firewall { border-color: rgba(255,61,0,0.5); background: linear-gradient(135deg, #2e0a0a, #0d1117); }

.mg-cash { color: #00FF88; font-weight: 900; font-size: 1.1rem; text-shadow: 0 0 10px rgba(0,255,136,0.4); }
.mg-mult { color: #FF00FF; font-weight: 900; font-size: 1rem; text-shadow: 0 0 10px rgba(255,0,255,0.4); }
.mg-firewall { font-size: 2rem; }
.mg-prize-label { display: block; font-size: 0.55rem; color: #FF3D00; margin-top: 2px; font-weight: 700; }

.minigame-msg {
  font-family: var(--s-mono); font-size: 0.8rem;
  color: rgba(0,255,255,0.5); letter-spacing: 0.1em;
  animation: mgPulse 2s infinite;
}
.minigame-msg.over {
  color: #FFD700; animation: none;
  font-size: 1.1rem; font-weight: 900;
  text-shadow: 0 0 15px rgba(255,215,0,0.4);
}
@keyframes mgPulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* ═══════════════════════════════════════════
   DATA EVENT BANNER
   ═══════════════════════════════════════════ */
.data-event-banner {
  position: fixed; top: 48px; right: 16px;
  transform: translateX(calc(100% + 20px));
  z-index: 120; pointer-events: none;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 6px;
  background: rgba(0,0,0,0.8);
  border: 1px solid rgba(255,0,255,0.4);
  backdrop-filter: blur(12px);
  font-family: var(--s-mono); font-weight: 700;
  letter-spacing: 0.5px; white-space: nowrap;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 0 20px rgba(255,0,255,0.15);
  max-width: 400px;
}
.data-event-banner.visible { transform: translateX(0); }
.deb-icon { font-size: 1.1rem; flex-shrink: 0; }
.deb-text { font-size: 0.7rem; color: #fff; text-shadow: 0 0 8px rgba(255,0,255,0.3); overflow: hidden; text-overflow: ellipsis; }

/* ═══════════════════════════════════════════
   ACHIEVEMENT TOAST
   ═══════════════════════════════════════════ */
.achievement-toast {
  position: fixed; top: 90px; right: 16px;
  z-index: 130; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 6px;
  background: rgba(0,0,0,0.8);
  border: 1px solid rgba(255,193,7,0.4);
  backdrop-filter: blur(12px);
  font-family: var(--s-mono);
  transform: translateX(calc(100% + 20px));
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 0 20px rgba(255,193,7,0.15);
  max-width: 320px;
}
.achievement-toast.visible { transform: translateX(0); }
.at-icon { font-size: 2rem; }
.at-label {
  font-size: 0.55rem; color: var(--s-gold); letter-spacing: 2px;
  text-transform: uppercase; margin-bottom: 2px;
}
.at-name { font-size: 1rem; font-weight: 900; color: #fff; letter-spacing: 1px; }
.at-desc { font-size: 0.65rem; color: rgba(255,255,255,0.5); margin-top: 2px; }

/* ═══════════════════════════════════════════
   DATA DUEL GAMBLE
   ═══════════════════════════════════════════ */
.gamble-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0, 0, 0, 0.88);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s;
  backdrop-filter: blur(8px);
}
.gamble-overlay.active { opacity: 1; pointer-events: all; }

.gamble-container {
  text-align: center; max-width: 480px; width: 92%;
  padding: 30px;
}
.gamble-title {
  font-family: var(--s-mono); font-size: 2.5rem; font-weight: 900;
  color: var(--s-accent); letter-spacing: 0.2em;
  text-shadow: 0 0 30px rgba(255,0,255,0.5), 0 0 60px rgba(255,0,255,0.25);
  margin-bottom: 4px;
}
.gamble-subtitle {
  font-family: var(--s-mono); font-size: 0.6rem;
  color: rgba(255,255,255,0.3); letter-spacing: 0.15em; margin-bottom: 24px;
}
.gamble-stake { margin-bottom: 20px; }
.gamble-stake-label {
  display: block; font-size: 0.65rem; color: rgba(255,255,255,0.4);
  letter-spacing: 2px; margin-bottom: 4px;
}
.gamble-stake-amount {
  font-size: 2.5rem; font-weight: 900; color: var(--s-gold);
  text-shadow: 0 0 20px rgba(255,193,7,0.4);
  font-variant-numeric: tabular-nums;
}
.gamble-challenge {
  font-size: 1rem; color: rgba(255,255,255,0.8);
  margin-bottom: 24px; line-height: 1.6;
  padding: 16px; border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.gamble-challenge .gamble-city {
  color: var(--s-primary); font-weight: 900;
}
.gamble-challenge .gamble-threshold {
  color: var(--s-gold); font-weight: 900; font-size: 1.2rem;
}
.gamble-reveal { margin-bottom: 20px; min-height: 60px; }
.gamble-scanning {
  font-size: 0.8rem; color: var(--s-primary); letter-spacing: 2px;
  animation: mgPulse 1s infinite;
}
.gamble-result {
  font-size: 1.4rem; font-weight: 900; letter-spacing: 1px;
  padding: 12px; border-radius: 8px;
}
.gamble-result.win {
  color: var(--s-green); background: rgba(0,230,118,0.08);
  border: 1px solid rgba(0,230,118,0.3);
  text-shadow: 0 0 15px rgba(0,230,118,0.4);
}
.gamble-result.lose {
  color: var(--s-red); background: rgba(255,61,0,0.08);
  border: 1px solid rgba(255,61,0,0.3);
  text-shadow: 0 0 15px rgba(255,61,0,0.4);
}

.gamble-buttons, .gamble-actions {
  display: flex; gap: 16px; justify-content: center;
}
.gamble-btn {
  font-family: var(--s-mono); font-weight: 900;
  border: none; border-radius: 8px; cursor: pointer;
  padding: 14px 32px; font-size: 1.1rem;
  transition: transform 0.1s, box-shadow 0.2s, filter 0.2s;
  text-transform: uppercase; letter-spacing: 1px;
}
.gamble-btn:hover { filter: brightness(1.15); transform: scale(1.02); }
.gamble-btn:active { transform: scale(0.95); }

.gamble-btn-high {
  background: linear-gradient(180deg, #66bb6a, #2e7d32);
  color: #fff; box-shadow: 0 4px 20px rgba(76,175,80,0.3);
}
.gamble-btn-low {
  background: linear-gradient(180deg, #ef5350, #c62828);
  color: #fff; box-shadow: 0 4px 20px rgba(244,67,54,0.3);
}
.gamble-btn-collect {
  background: linear-gradient(180deg, #4dd0e1, #00838f);
  color: #fff; box-shadow: 0 4px 20px rgba(0,229,255,0.3);
}
.gamble-btn-again {
  background: linear-gradient(180deg, #ab47bc, #6a1b9a);
  color: #fff; box-shadow: 0 4px 20px rgba(171,71,188,0.3);
  animation: gambleAgainPulse 1.5s infinite;
}
@keyframes gambleAgainPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(171,71,188,0.3); }
  50% { box-shadow: 0 4px 30px rgba(171,71,188,0.6); }
}

/* Gamble offer bar (in controls) */
.gamble-offer {
  display: flex; gap: 10px; justify-content: center;
  padding: 8px 0; animation: gambleOfferSlide 0.3s ease-out;
}
@keyframes gambleOfferSlide {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
.gamble-collect-btn {
  padding: 8px 24px; font-size: 0.85rem; font-weight: 900;
  background: linear-gradient(180deg, #66bb6a, #2e7d32);
  color: #fff; border-radius: 8px;
  box-shadow: 0 2px 10px rgba(76,175,80,0.3);
}
.gamble-duel-btn {
  padding: 8px 24px; font-size: 0.85rem; font-weight: 900;
  background: linear-gradient(180deg, #ab47bc, #6a1b9a);
  color: #fff; border-radius: 8px;
  box-shadow: 0 2px 10px rgba(171,71,188,0.3);
  animation: gambleAgainPulse 1.5s infinite;
}

/* ═══════════════════════════════════════════
   NEAR-MISS EFFECTS
   ═══════════════════════════════════════════ */
.reel-cell.near-miss-ghost {
  position: relative;
}
.reel-cell.near-miss-ghost::after {
  content: attr(data-needed);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem;
  background: rgba(255,0,255,0.08);
  border: 1px dashed rgba(255,0,255,0.4);
  border-radius: 4px;
  opacity: 0;
  animation: nearMissGhost 1.5s ease-out forwards;
  pointer-events: none;
}
@keyframes nearMissGhost {
  0% { opacity: 0; transform: scale(0.5); }
  20% { opacity: 0.8; transform: scale(1.1); }
  40% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.9); }
}
.near-miss-text {
  position: fixed; top: 45%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--s-mono); font-size: 2rem; font-weight: 900;
  color: var(--s-accent); letter-spacing: 4px;
  text-shadow: 0 0 30px rgba(255,0,255,0.5);
  pointer-events: none; z-index: 95;
  opacity: 0;
  padding: 10px 28px; border-radius: 10px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,0,255,0.3);
  backdrop-filter: blur(8px);
}
.near-miss-text.active {
  animation: nearMissPop 1.2s ease-out forwards;
}
@keyframes nearMissPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
  30% { transform: translate(-50%, -50%) scale(1); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -55%) scale(0.8); }
}

/* ═══════════════════════════════════════════
   STREAK BONUS BANNER
   ═══════════════════════════════════════════ */
.streak-banner {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  text-align: center; z-index: 105; pointer-events: none;
  opacity: 0; transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding: 16px 32px; border-radius: 12px;
  background: rgba(0,0,0,0.75);
  border: 1px solid rgba(255,136,0,0.3);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 30px rgba(255,136,0,0.15);
}
.streak-banner.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.streak-banner-text {
  display: block; font-size: 2rem; font-weight: 900;
  color: #FF8800; letter-spacing: 4px;
  text-shadow: 0 0 30px rgba(255,136,0,0.5), 0 0 60px rgba(255,136,0,0.2);
}
.streak-banner-sub {
  display: block; font-size: 1.2rem; font-weight: 700;
  color: var(--s-gold); margin-top: 4px;
  text-shadow: 0 0 15px rgba(255,193,7,0.4);
}
