/**
 * CoinRush Jackpot – ULTRA-DARK Premium Edition  V15
 * Zero-white · Deep-space blacks · CoinRush green neon accent
 * V15: page-wide performance overhaul — killed blur, particles, shooters,
 *      grid overlay, Houdini borders; simplified shadows; idle-friendly
 */

/* ======== FONTS ========
 * Moved to <link rel="preload"> in HTML for non-blocking load.
 * If fonts haven't loaded yet, the fallback stack handles it.
 */

/* ======== DESIGN TOKENS ======== */
:root {
  /* Typography */
  --jp-font:     'Sora', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --jp-font-body:'Inter', -apple-system, sans-serif;
  --jp-mono:     'JetBrains Mono', 'SF Mono', monospace;

  /* ULTRA-DARK palette — zero white backgrounds */
  --jp-bg:       #080a0e;
  --jp-bg-card:  #0d1017;
  --jp-glass:    #0d1017;
  --jp-border:   rgba(255, 255, 255, 0.05);
  --jp-radius:   16px;
  --jp-radius-sm:10px;
  --jp-radius-xs:6px;

  /* Accent — the CoinRush green */
  --jp-accent:   #4fffb0;
  --jp-accent-light: #7dffcc;
  --jp-green:    #00ffa3;
  --jp-green-light: #4fffb0;
  --jp-green-glow: rgba(0, 255, 163, 0.45);
  --jp-green-bg: rgba(0, 255, 163, 0.04);

  /* Secondary */
  --jp-purple:   #a855f7;
  --jp-purple-dim: rgba(168, 85, 247, 0.12);

  /* Semantic */
  --jp-red:      #f43f5e;
  --jp-red-light:#fb7185;
  --jp-gold:     #fbbf24;
  --jp-cyan:     #22d3ee;

  /* Text */
  --jp-text:     #e2e8f0;
  --jp-text-dim: rgba(255, 255, 255, 0.5);
  --jp-text-muted:rgba(255, 255, 255, 0.25);

  /* Surfaces — ultra-subtle, no white leaks */
  --jp-surface:  rgba(255, 255, 255, 0.02);
  --jp-surface-hover: rgba(255, 255, 255, 0.04);

  /* Shadows / Motion */
  /* Single shadow — compound shadows force extra repaint work on every hover */
  --jp-shadow:   0 4px 24px rgba(0, 0, 0, 0.45);
  --jp-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* @property for animated borders REMOVED — CSS Houdini forces main-thread
   repaint every frame which tanks mouseover and scroll perf. Replaced
   with static gradient borders that still look premium. */

/* ======== RESET & BASE ======== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { background: #080a0e !important; }

.jp-app {
  position: relative;
  min-height: 100vh;
  background: var(--jp-bg);
  color: var(--jp-text);
  font-family: var(--jp-font);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* NOTE: Do NOT add `contain: layout` here — .jp-app contains the navbar
     (position:fixed sidebar + topbar). CSS containment creates a new containing
     block that breaks position:fixed children (they'd be positioned relative to
     .jp-app instead of the viewport). Containment is applied to .jp-main instead. */
}

/* Grid overlay REMOVED — full-page pseudo-element with dual linear-gradient
   creates a massive compositor layer covering the entire viewport.
   The visual impact was nearly invisible (0.008 opacity) but the perf cost is real. */

/* ======== AMBIENT BACKGROUND ORBS — radial-gradient instead of blur ======== */
/* filter:blur(60px) on 250-350px elements creates massive GPU texture uploads.
   radial-gradient gives the identical soft-glow look with zero GPU cost. */
.jp-app__orbs {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.jp-orb {
  position: absolute; border-radius: 50%;
}
.jp-orb-1 {
  width: 350px; height: 350px; top: -10%; right: -5%;
  background: radial-gradient(circle, rgba(79, 255, 176, 0.06) 0%, transparent 70%);
}
.jp-orb-2 {
  width: 300px; height: 300px; bottom: -5%; left: -8%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.07) 0%, transparent 70%);
}
.jp-orb-3 {
  width: 250px; height: 250px; top: 40%; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(79, 255, 176, 0.04) 0%, transparent 70%);
}
/* Orbs are static — no drift animation needed for performance */

/* ======== ORBITAL RINGS — REMOVED ========
   0.025 opacity borders are invisible to users but each is a separate
   position:fixed compositor layer eating GPU memory. */
.jp-app__orbitals { display: none; }

/* ======== SHOOTING STARS — REMOVED ========
   2 always-running infinite animations with transform+opacity. Each
   is a separate compositor layer running 24/7. Barely visible. */
.jp-app__shooters { display: none; }

/* ======== PARTICLES — REMOVED ========
   10 separate always-running infinite animations, each a compositor layer.
   Tiny 2-4px dots traversing the entire viewport height — invisible to most
   users but a constant GPU drain. */
.jp-app__particles { display: none; }

/* ======== MAIN LAYOUT ======== */
.jp-main {
  position: relative; z-index: 1;
  max-width: 1520px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  contain: layout style;
}
.jp-grid {
  display: grid;
  grid-template-columns: 320px 1fr 320px;
  gap: 20px;
  align-items: start;
}

/* Sidebars */
.jp-sidebar { display: flex; flex-direction: column; gap: 16px; contain: layout style; }
.jp-sidebar--right {
  position: sticky;
  top: 140px;
  align-self: start;
  height: calc(100vh - 150px);
  height: calc(100dvh - 150px);
  overflow: hidden;
}
.jp-sidebar--right .cr-chat-container {
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-radius: var(--jp-radius);
  border: 1px solid rgba(79, 255, 176, 0.06);
  background: #0a0c10 !important;
  box-shadow: var(--jp-shadow);
}
.jp-sidebar--right .cr-chat-messages {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}
.jp-sidebar--right .cr-chat-input-area {
  flex-shrink: 0 !important;
}

/* Center column */
.jp-center {
  display: flex; flex-direction: column; gap: 16px; min-width: 0;
  min-height: calc(100vh - 150px);
  min-height: calc(100dvh - 150px);
}

/* ======== SHARED PANEL ======== */
.jp-panel {
  background: linear-gradient(165deg, #0f1218, #0a0d12);
  border: 1px solid var(--jp-border);
  border-radius: var(--jp-radius);
  overflow: hidden;
  transition: border-color var(--jp-transition);
  box-shadow: var(--jp-shadow);
  position: relative;
  contain: layout style;
}
.jp-panel::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: var(--jp-radius);
  padding: 1px;
  /* Static gradient — no @property rotation. Looks premium, zero main-thread cost */
  background: conic-gradient(
    from 45deg,
    transparent 0deg,
    rgba(79, 255, 176, 0.08) 90deg,
    transparent 180deg,
    rgba(168, 85, 247, 0.05) 270deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.jp-panel:hover::before { opacity: 1; }
.jp-panel:hover { border-color: rgba(79, 255, 176, 0.1); box-shadow: var(--jp-shadow), 0 0 30px rgba(79, 255, 176, 0.03); }
/* Panel/bet borders are now static — no freeze needed during spin */
.jp-spinning .jp-panel::before,
.jp-spinning .jp-bet::before { opacity: 0 !important; }
.jp-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--jp-border);
  background: rgba(255, 255, 255, 0.015);
}
.jp-panel__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--jp-text);
  text-transform: uppercase; letter-spacing: 0.5px;
  font-family: var(--jp-font);
}
.jp-panel__title svg { width: 16px; height: 16px; color: var(--jp-accent-light); }
.jp-panel__badge {
  background: rgba(79, 255, 176, 0.1);
  border: 1px solid rgba(79, 255, 176, 0.15);
  color: var(--jp-accent);
  font-size: 11px; font-weight: 700; padding: 2px 10px;
  border-radius: 20px; min-width: 24px; text-align: center;
}
.jp-panel__badge--gold {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.15);
  color: var(--jp-gold);
}
.jp-panel__body { padding: 14px; }
.jp-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 32px 16px; color: var(--jp-text-dim);
  font-size: 13px; font-weight: 500;
}
.jp-empty svg { width: 28px; height: 28px; opacity: 0.25; }

/* ======== HERO / JACKPOT DISPLAY ======== */
.jp-hero {
  position: relative;
  background: linear-gradient(165deg, #0f1218, #090b10, #0b0e14);
  border: 1px solid rgba(79, 255, 176, 0.06);
  border-radius: var(--jp-radius);
  overflow: hidden;
  transition: border-color var(--jp-transition);
  box-shadow: var(--jp-shadow);
  contain: layout style;
}
/* Animated border ring on hero — static gradient (no Houdini rotation) */
.jp-hero::after {
  content: '';
  position: absolute; inset: -1px;
  border-radius: var(--jp-radius);
  padding: 1px;
  background: conic-gradient(
    from 30deg,
    transparent 0deg,
    rgba(79, 255, 176, 0.15) 60deg,
    rgba(168, 85, 247, 0.08) 180deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.jp-hero.spinning {
  border-color: rgba(79, 255, 176, 0.15);
  box-shadow: 0 0 40px rgba(79, 255, 176, 0.05), var(--jp-shadow);
}
.jp-hero.spinning::after { opacity: 0.6; }
.jp-hero.reveal, .jp-hero.intermission {
  border-color: rgba(79, 255, 176, 0.2);
  box-shadow: 0 0 40px rgba(79, 255, 176, 0.06), var(--jp-shadow);
}
.jp-hero.reveal::after, .jp-hero.intermission::after { opacity: 1; }
.jp-hero__bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.jp-hero__glow {
  position: absolute; top: -60%; left: 50%; transform: translateX(-50%);
  width: 500px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 255, 176, 0.08) 0%, transparent 70%);
}
.jp-hero__pulse {
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(79, 255, 176, 0.04) 0%, transparent 70%);
  opacity: 0.5;
}
.jp-hero__urgent {
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(244, 63, 94, 0.05) 0%, transparent 60%);
  opacity: 0.6;
}

.jp-hero__content { position: relative; z-index: 2; padding: 32px 24px 28px; }

/* ---- Main Jackpot Display (no trophy, centered) ---- */
.jp-hero__main {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.jp-hero__main.spinning { animation: none; }

.jp-hero__pot-label {
  font-size: 11px; font-weight: 800; letter-spacing: 5px; color: var(--jp-accent);
  text-transform: uppercase; font-family: var(--jp-font);
  opacity: 0.85;
}
.jp-hero__amount-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 2px;
}
.jp-hero__pot-amount {
  font-size: 48px; font-weight: 900; font-family: var(--jp-mono);
  background: linear-gradient(135deg, #fff 30%, var(--jp-accent-light), var(--jp-green));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Shimmer REMOVED — background-position animation on gradient-clipped text
     forces a full repaint every single frame, even when idle. Static gradient
     still looks great. */
  line-height: 1;
}

/* Hero status */
.jp-hero__status {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  margin-top: 20px;
}
.jp-status-spin {
  display: flex; align-items: center; gap: 10px;
  color: var(--jp-accent-light); font-size: 13px; font-weight: 600;
}
.jp-spin-dots { display: flex; gap: 4px; }
.jp-spin-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--jp-accent);
  animation: jp-dot-bounce 1s ease-in-out infinite;
}
.jp-spin-dots span:nth-child(2) { animation-delay: 0.15s; }
.jp-spin-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes jp-dot-bounce {
  0%,80%,100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1.2); opacity: 1; }
}
/* jp-dot-bounce is tiny (3 × 6px dots) and barely moves — keep it,
   it's the only spinning-state visual indicator for the user. */

.jp-status-cd { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.jp-status-cd.urgent .jp-cd-num { color: var(--jp-red); }
.jp-cd-ring { position: relative; width: 64px; height: 64px; }
.jp-cd-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.jp-ring-bg { fill: none; stroke: rgba(255,255,255,0.04); stroke-width: 3.5; }
.jp-ring-fg {
  fill: none; stroke: var(--jp-accent); stroke-width: 3.5; stroke-linecap: round;
  transition: stroke-dasharray 0.3s;
}
.jp-status-cd.urgent .jp-ring-fg { stroke: var(--jp-red); }
.jp-cd-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 900; font-family: var(--jp-mono); color: #fff;
}
.jp-cd-label {
  font-size: 8px; font-weight: 700; letter-spacing: 2.5px; color: var(--jp-text-dim);
  text-transform: uppercase;
}

.jp-status-wait {
  display: flex; align-items: center; gap: 8px;
  color: var(--jp-text-dim); font-size: 13px; font-weight: 500;
}
.jp-wait-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--jp-green);
  box-shadow: 0 0 8px var(--jp-green-glow);
  animation: jp-wait-pulse 2s ease-in-out infinite;
}
@keyframes jp-wait-pulse { 0%,100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }

.jp-player-count {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--jp-text-dim); font-weight: 500;
}
.jp-player-count svg { width: 14px; height: 14px; }

/* ---- Hero Winner (redesigned centered layout) ---- */
.jp-hero__winner {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.jp-hero__winner-top {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.jp-hero__winner-badge {
  font-size: 11px; font-weight: 800; letter-spacing: 3px;
  color: var(--jp-gold, #fbbf24); text-transform: uppercase;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
}
.jp-hero__winner-name {
  font-size: 22px; font-weight: 800; color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}
.jp-hero__winner-amount-row {
  display: flex; align-items: center; gap: 8px;
}
.jp-hero__winner-plus {
  font-size: 28px; font-weight: 900; font-family: var(--jp-mono);
  background: linear-gradient(135deg, var(--jp-green), var(--jp-cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.jp-hero__winner-amt {
  font-size: 36px; font-weight: 900; font-family: var(--jp-mono);
  background: linear-gradient(135deg, var(--jp-green), var(--jp-cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  filter: drop-shadow(0 0 12px rgba(79, 255, 176, 0.2));
}
.jp-hero__winner-next {
  display: flex; flex-direction: column; align-items: center;
  margin-top: 4px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
.jp-hero__next-val {
  font-size: 16px; font-weight: 800; color: var(--jp-accent-light); font-family: var(--jp-mono);
}
.jp-hero__next-lbl {
  font-size: 9px; font-weight: 700; letter-spacing: 1.5px; color: var(--jp-text-dim);
  text-transform: uppercase;
}

/* ======== FAIRNESS CHIP ======== */
.jp-fair { margin-top: 12px; border-top: 1px solid var(--jp-border); padding-top: 12px; }
.jp-fair__btn {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 0;
  background: none; border: none; color: var(--jp-text-dim); cursor: pointer;
  font-size: 12px; font-weight: 600; font-family: var(--jp-font);
}
.jp-fair__btn:hover { color: var(--jp-text); }
.jp-fair__btn svg { width: 14px; height: 14px; color: var(--jp-green); }
.jp-fair__ticket { margin-left: auto; font-family: var(--jp-mono); font-size: 11px; color: var(--jp-accent); }
.jp-fair__chev { margin-left: 4px; transition: transform 0.2s; }
.jp-fair__chev svg { width: 14px; height: 14px; }
.jp-fair__chev.up { transform: rotate(180deg); }
.jp-fair__body { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.jp-fair__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.jp-fair__label { font-size: 11px; color: var(--jp-text-dim); font-weight: 500; white-space: nowrap; }
.jp-fair__val { display: flex; align-items: center; gap: 6px; }
.jp-fair__val code {
  font-family: var(--jp-mono); font-size: 10px; color: var(--jp-text);
  background: rgba(0, 0, 0, 0.3); padding: 3px 6px; border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}
.jp-fair__copy {
  background: none; border: none; cursor: pointer; padding: 2px; color: var(--jp-text-dim);
  transition: color 0.2s;
}
.jp-fair__copy:hover { color: var(--jp-accent-light); }
.jp-fair__copy.done { color: var(--jp-green); }
.jp-fair__copy svg { width: 12px; height: 12px; }
.jp-fair__ticket-num { font-family: var(--jp-mono); font-size: 12px; color: var(--jp-accent); font-weight: 700; }

/* ======== JACKPOT REEL V14 — Nuclear-Smooth CSS Transition Reel ======== */

/*
 * NUCLEAR PERFORMANCE SWITCH: When body has .jp-spinning,
 * HIDE (display:none) all background decorations.
 * display:none fully removes them from the GPU compositor.
 * V14: Also freezes ticker, hero border, shimmer, panel borders,
 *      pointer pulse, and kills band glass overlays.
 */
.jp-spinning .jp-app__orbs,
.jp-spinning .jp-app__orbitals,
/* Orbitals, shooters, particles already display:none permanently.
   Grid overlay removed entirely. No spin-time hide needed. */

/* Main container */
.jp-reel {
  position: relative;
  background: #080a0f;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--jp-radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  contain: layout style paint;
  transition: border-color 0.4s ease;
}
.jp-reel.spinning {
  border-color: rgba(79, 255, 176, 0.12);
}
.jp-reel.revealed {
  border-color: rgba(251, 191, 36, 0.18);
}

/* Pointer — premium gold arrow with spin pulse */
.jp-reel__pointer {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(251,191,36,0.5));
  transition: filter 0.3s ease;
}
.jp-reel__pointer svg { display: block; }
/* Pointer pulse DISABLED during spin — filter:drop-shadow animation
   forces per-frame re-rasterization on the GPU, stealing bandwidth
   from the main strip transition. Static glow is plenty visible. */
.spinning .jp-reel__pointer {
  filter: drop-shadow(0 2px 12px rgba(251,191,36,0.7));
}
/* Pulse only plays when NOT spinning (countdown, idle) — harmless there */
@keyframes jp-pointer-pulse {
  0%   { filter: drop-shadow(0 2px 8px rgba(251,191,36,0.5)); }
  100% { filter: drop-shadow(0 2px 14px rgba(251,191,36,0.85)); }
}

/* Center line — razor-thin gold marker */
.jp-reel__center-line {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(180deg,
    rgba(251,191,36,0.65) 0%,
    rgba(251,191,36,0.06) 40%,
    rgba(251,191,36,0.06) 60%,
    rgba(251,191,36,0.65) 100%);
  z-index: 45;
  pointer-events: none;
}

/* Side masks — premium vignette that blends into the reel edges */
.jp-reel__mask {
  position: absolute;
  top: 0; bottom: 0;
  width: 90px;
  z-index: 40;
  pointer-events: none;
}
.jp-reel__mask--left  { left: 0;  background: linear-gradient(90deg,  #080a0f 0%, transparent 100%); }
.jp-reel__mask--right { right: 0; background: linear-gradient(-90deg, #080a0f 0%, transparent 100%); }

/* Viewport — clips the strip, strict containment */
.jp-reel__viewport {
  position: relative;
  width: 100%;
  height: 96px;
  overflow: hidden;
  contain: strict;
  /* Isolate this stacking context so the strip's compositor layer
     doesn't interact with layers outside the viewport */
  isolation: isolate;
}

/* The scrolling strip — GPU compositor layer
   This is the ONLY element that animates during spin.
   Everything else is frozen. */
.jp-reel__strip {
  display: flex;
  gap: 2px;
  height: 100%;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  padding: 6px 0;
  /* contain: layout — no child changes can trigger layout outside this node */
  contain: layout style;
}

/* Empty state */
.jp-reel__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(255,255,255,0.1);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px dashed rgba(255,255,255,0.04);
  border-radius: 10px;
  margin: 0 16px;
}

/* ── Color band — flat solid fill, zero per-band compositing cost ── */
.reel-band {
  position: relative;
  flex-shrink: 0;
  height: 100%;
  border-radius: 5px;
  overflow: hidden;
  /* No box-shadow during scroll — applied only in idle via .reel-band--idle */
}

/* Glass shine — only shown when NOT spinning (idle & revealed).
   During spin the strip moves thousands of pixels; removing the
   per-band pseudo-element eliminates dozens of gradient composites
   per compositor frame. */
.reel-band::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.22) 0%,
    transparent 50%);
  pointer-events: none;
}
/* KILL the glass overlay and shadows on every band during spin */
.jp-spinning .reel-band::after {
  display: none !important;
}
.jp-spinning .reel-band {
  border-radius: 3px;
}

/* "YOU" pill — minimal, premium */
.reel-band__you {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px;
  font-weight: 900;
  font-family: var(--jp-font);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 2px 8px 1px;
  border-radius: 100px;
  white-space: nowrap;
  z-index: 2;
}

/* Winner highlight — clean gold inset glow, no animation */
.reel-band--winner {
  box-shadow:
    inset 0 0 0 2px rgba(251,191,36,0.6),
    0 0 20px rgba(251,191,36,0.2);
  z-index: 2;
}

/* Dimmed losers — smooth fade-out */
.reel-band--dimmed {
  opacity: 0.15;
  transition: opacity 0.5s ease;
}

/* Winner banner — premium slide-in */
.jp-reel__banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(251,191,36,0.05), rgba(251,191,36,0.01));
  border-top: 1px solid rgba(251,191,36,0.08);
  animation: jp-reel-banner-slide 0.5s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes jp-reel-banner-slide {
  0% { opacity: 0; transform: translateY(8px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.jp-reel__banner-crown { display: flex; }
.jp-reel__banner-crown svg { width: 18px; height: 18px; stroke: #fbbf24; }
.jp-reel__banner-name { font-weight: 900; font-size: 14px; color: #fff; text-shadow: 0 0 8px rgba(251,191,36,0.3); }
.jp-reel__banner-won { font-size: 12px; color: var(--jp-text-dim); font-weight: 500; }
.jp-reel__banner-amount {
  font-family: var(--jp-mono);
  font-weight: 900; font-size: 15px;
  background: linear-gradient(135deg, var(--jp-green), #00ffd5);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ======== PLAYER LIST V2 ======== */
.jp-player__you-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  background: linear-gradient(135deg, var(--jp-green), #00b876);
  color: #032e1a;
  font-size: 8px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.4;
}
.jp-player__chance-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  margin-left: auto;
  min-width: 60px;
}
.jp-player__chance {
  font-family: var(--jp-mono);
  font-size: 13px;
  font-weight: 800;
}
.jp-player__bar {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.jp-player__bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ======== AVATAR ======== */
.jp-avatar {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
}
.jp-avatar .cr-user-avatar__inner {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; text-transform: uppercase;
  z-index: 1;
}
.jp-avatar__lvl {
  position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--jp-accent), #7c3aed);
  color: #fff; font-size: 8px; font-weight: 800;
  padding: 1px 5px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 15; white-space: nowrap; line-height: 1.2;
}
.jp-avatar__auth {
  position: absolute; top: -2px; right: -4px;
  width: 16px; height: 16px;
  background: rgba(12, 15, 20, 0.9);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 15;
}
.jp-avatar__auth svg { width: 10px; height: 10px; }

/* ======== BET PANEL ======== */
.jp-bet {
  background: linear-gradient(165deg, #0f1218, #090b10, #0b0e14);
  border: 1px solid rgba(79, 255, 176, 0.06);
  border-radius: var(--jp-radius);
  overflow: hidden;
  box-shadow: var(--jp-shadow);
  transition: border-color var(--jp-transition);
  position: relative;
}
/* Animated border on hover only */
.jp-bet::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: var(--jp-radius);
  padding: 1px;
  background: conic-gradient(
    from 45deg,
    transparent 0deg,
    rgba(79, 255, 176, 0.12) 60deg,
    rgba(168, 85, 247, 0.06) 180deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.jp-bet:hover::before { opacity: 1; }
.jp-bet:hover { border-color: rgba(79, 255, 176, 0.1); box-shadow: var(--jp-shadow), 0 0 40px rgba(79, 255, 176, 0.03); }
.jp-bet__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--jp-border);
  background: rgba(255, 255, 255, 0.015);
}
.jp-bet__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--jp-text);
  font-family: var(--jp-font);
}
.jp-bet__title svg { width: 16px; height: 16px; color: var(--jp-accent-light); }
.jp-bet__bal {
  font-size: 13px; font-weight: 700; font-family: var(--jp-mono);
  color: var(--jp-green);
}
.jp-bet__body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.jp-bet__lock {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: rgba(244, 63, 94, 0.06); border: 1px solid rgba(244, 63, 94, 0.12);
  border-radius: var(--jp-radius-xs); font-size: 12px; color: var(--jp-red); font-weight: 600;
}
.jp-bet__lock svg { width: 14px; height: 14px; flex-shrink: 0; }
.jp-bet__err {
  padding: 8px 12px; background: rgba(244, 63, 94, 0.08); border: 1px solid rgba(244, 63, 94, 0.15);
  border-radius: var(--jp-radius-xs); font-size: 12px; color: var(--jp-red); font-weight: 500;
}

.jp-bet__input {
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--jp-radius-sm);
  transition: border-color var(--jp-transition);
}
.jp-bet__input:focus-within {
  border-color: rgba(79, 255, 176, 0.35);
  box-shadow: 0 0 0 3px rgba(79, 255, 176, 0.05);
  background: rgba(0, 0, 0, 0.4);
}
.jp-bet__input.has-val { border-color: rgba(79, 255, 176, 0.2); }
.jp-bet__input input {
  width: 100%; padding: 12px 60px 12px 14px;
  background: none; border: none; outline: none;
  color: #fff; font-size: 18px; font-weight: 700; font-family: var(--jp-mono);
}
.jp-bet__input input::placeholder { color: var(--jp-text-muted); font-weight: 400; }
.jp-bet__input input:disabled { opacity: 0.4; }
.jp-bet__suffix {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 600; color: var(--jp-text-dim); text-transform: uppercase;
}

.jp-bet__presets { display: flex; gap: 6px; flex-wrap: wrap; }
.jp-preset {
  flex: 1; min-width: 44px; padding: 8px 4px;
  background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--jp-radius-xs); color: var(--jp-text);
  font-size: 13px; font-weight: 700; font-family: var(--jp-mono);
  cursor: pointer; transition: all var(--jp-transition);
}
.jp-preset:hover:not(:disabled) {
  background: rgba(79, 255, 176, 0.06);
  border-color: rgba(79, 255, 176, 0.15);
  color: var(--jp-accent-light);
}
.jp-preset.active {
  background: rgba(79, 255, 176, 0.1);
  border-color: rgba(79, 255, 176, 0.2);
  color: var(--jp-accent);
}
.jp-preset:disabled { opacity: 0.3; cursor: not-allowed; }
.jp-preset--max {
  background: rgba(79, 255, 176, 0.05);
  border-color: rgba(79, 255, 176, 0.12); color: var(--jp-green);
}
.jp-preset--max:hover:not(:disabled) { background: rgba(79, 255, 176, 0.1); border-color: var(--jp-green); }

.jp-bet__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.jp-stat {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2); border-radius: var(--jp-radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.03);
}
.jp-stat__l { font-size: 10px; font-weight: 600; color: var(--jp-text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.jp-stat__v { font-size: 16px; font-weight: 800; font-family: var(--jp-mono); color: #fff; }
.jp-stat__v--gold { color: var(--jp-gold); }

/* CTA — premium green glow button */
.jp-bet__cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #4fffb0, #00d68f, #00b876);
  color: #060d08; font-size: 14px; font-weight: 700; font-family: var(--jp-font);
  cursor: pointer; position: relative; overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(79, 255, 176, 0.2), 0 0 60px rgba(79, 255, 176, 0.05);
  letter-spacing: 0.3px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}
.jp-bet__cta::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
  transform: translateX(-100%);
}
.jp-bet__cta:hover:not(:disabled)::after {
  animation: jp-cta-shimmer 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes jp-cta-shimmer { to { transform: translateX(100%); } }
.jp-bet__cta:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 30px rgba(79, 255, 176, 0.3);
}
.jp-bet__cta:active:not(:disabled) { transform: translateY(0); }
.jp-bet__cta:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.jp-bet__cta svg { width: 16px; height: 16px; }
.jp-bet__cta.loading { pointer-events: none; }
.jp-spin-ico { animation: jp-spin 1s linear infinite; }
.jp-spin-ico svg { width: 18px; height: 18px; }
@keyframes jp-spin { to { transform: rotate(360deg); } }

/* ======== PLAYERS LIST ======== */
.jp-players { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.jp-players .jp-panel__body { flex: 1 1 0; min-height: 0; overflow: hidden; }
.jp-players__list { display: flex; flex-direction: column; gap: 4px; max-height: 100%; overflow-y: auto; }
.jp-players__list::-webkit-scrollbar { width: 4px; }
.jp-players__list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.jp-players__list::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
.jp-player {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--jp-radius-xs);
  transition: background var(--jp-transition);
}
.jp-player:hover { background: rgba(79, 255, 176, 0.03); }
.jp-player.is-you {
  background: rgba(79, 255, 176, 0.04);
  border: 1px solid rgba(79, 255, 176, 0.1);
}
.jp-player__rank {
  font-size: 11px; font-weight: 700; color: var(--jp-text-dim);
  min-width: 28px; font-family: var(--jp-mono);
}
.jp-player__color {
  width: 14px; height: 14px; min-width: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: box-shadow 0.3s ease;
}
.jp-player:hover .jp-player__color {
  box-shadow: 0 0 10px currentColor;
}
.jp-player__info { flex: 1; min-width: 0; }
.jp-player__name {
  display: block; font-size: 13px; font-weight: 700; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.jp-player__bet { display: block; font-size: 11px; color: var(--jp-text-dim); font-family: var(--jp-mono); }
.jp-player__chance { font-size: 13px; font-weight: 800; font-family: var(--jp-mono); white-space: nowrap; }

/* ======== HISTORY ======== */
.jp-history__list { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.jp-history__list::-webkit-scrollbar { width: 4px; }
.jp-history__list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.jp-history__row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--jp-radius-xs);
  transition: background var(--jp-transition);
}
.jp-history__row:hover { background: rgba(79, 255, 176, 0.03); }
.jp-history__crown svg { width: 14px; height: 14px; color: var(--jp-gold); }
.jp-history__name { flex: 1; font-size: 12px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jp-history__amt { font-size: 12px; font-weight: 700; color: var(--jp-green); font-family: var(--jp-mono); }
.jp-history__ch { font-size: 11px; color: var(--jp-text-dim); font-family: var(--jp-mono); min-width: 36px; text-align: right; }

/* ======== MODAL ======== */
.jp-modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex; align-items: center; justify-content: center;
  animation: jp-fade-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes jp-fade-in { from { opacity: 0; } to { opacity: 1; } }
.jp-modal {
  background: linear-gradient(160deg, #111520, #090c12, #0b0e14);
  border: 1px solid rgba(79, 255, 176, 0.06);
  border-radius: 24px;
  width: 90%; max-width: 520px; max-height: 85vh;
  overflow-y: auto; position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 120px rgba(79, 255, 176, 0.04), 0 0 0 1px rgba(255,255,255,0.03);
  animation: jp-modal-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
/* Subtle static border accent on modal */
.jp-modal::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: 24px;
  padding: 1px;
  background: conic-gradient(
    from 45deg,
    transparent 0deg,
    rgba(79, 255, 176, 0.12) 60deg,
    rgba(168, 85, 247, 0.06) 180deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
  z-index: -1;
}
@keyframes jp-modal-in { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.jp-modal::-webkit-scrollbar { width: 4px; }
.jp-modal::-webkit-scrollbar-thumb { background: rgba(79, 255, 176, 0.15); border-radius: 4px; }
.jp-modal::-webkit-scrollbar-thumb:hover { background: rgba(79, 255, 176, 0.3); }
.jp-modal__close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 34px; height: 34px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.4); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.25s;
}
.jp-modal__close:hover { background: rgba(244, 63, 94, 0.15); border-color: rgba(244, 63, 94, 0.25); color: #fb7185; transform: rotate(90deg); }
.jp-modal__close svg { width: 14px; height: 14px; }
.jp-modal__header {
  display: flex; align-items: center; gap: 14px;
  padding: 28px 28px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.jp-modal__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(79, 255, 176, 0.12), rgba(79, 255, 176, 0.03));
  border: 1px solid rgba(79, 255, 176, 0.12);
  border-radius: 14px;
  flex-shrink: 0;
  box-shadow: 0 0 30px rgba(79, 255, 176, 0.06), inset 0 0 15px rgba(79, 255, 176, 0.03);
}
.jp-modal__icon svg { width: 22px; height: 22px; color: var(--jp-accent); }
.jp-modal__header h2 {
  font-size: 20px; font-weight: 800; font-family: var(--jp-font); color: #fff; margin: 0;
  background: linear-gradient(135deg, #fff 40%, var(--jp-accent-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.jp-modal__body { padding: 22px 28px; }
.jp-modal__footer {
  padding: 18px 28px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.jp-modal__btn {
  width: 100%; padding: 14px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, #4fffb0, #00d68f, #00b876);
  color: #060d08; font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: var(--jp-font);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(79, 255, 176, 0.2), 0 0 60px rgba(79, 255, 176, 0.05);
  position: relative; overflow: hidden;
}
.jp-modal__btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
  transform: translateX(-100%);
}
.jp-modal__btn:hover::after {
  animation: jp-cta-shimmer 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.jp-modal__btn:hover { transform: translateY(-1px); box-shadow: 0 6px 30px rgba(79, 255, 176, 0.3); }

/* Rules */
.jp-rules-sec { margin-bottom: 20px; }
.jp-rules-sec:last-child { margin-bottom: 0; }
.jp-rules-sec h3 {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: #fff;
  margin-bottom: 10px; font-family: var(--jp-font);
}
.jp-rules-sec h3 svg { width: 16px; height: 16px; color: var(--jp-accent-light); }
.jp-rules-sec ul { list-style: none; display: flex; flex-direction: column; gap: 6px; padding-left: 0; }
.jp-rules-sec li {
  position: relative; padding-left: 18px; font-size: 13px; color: rgba(255,255,255,0.7);
  line-height: 1.6;
}
.jp-rules-sec li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(135deg, var(--jp-accent), var(--jp-purple));
  box-shadow: 0 0 6px rgba(79, 255, 176, 0.3);
}
.jp-rules-edge {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: rgba(79, 255, 176, 0.04);
  border: 1px solid rgba(79, 255, 176, 0.10); border-radius: var(--jp-radius-sm);
  font-size: 13px; color: var(--jp-text);
}
.jp-rules-edge__val {
  font-size: 28px; font-weight: 900; font-family: var(--jp-mono);
  background: linear-gradient(135deg, var(--jp-green), var(--jp-accent-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.jp-rules-states { display: flex; flex-direction: column; gap: 10px; }
.jp-state { display: flex; align-items: center; gap: 12px; font-size: 13px; color: rgba(255,255,255,0.7); }
.jp-state__b {
  padding: 5px 12px; border-radius: 20px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; min-width: 80px; text-align: center;
}
.jp-state--wait { background: rgba(79, 255, 176, 0.08); color: var(--jp-green); border: 1px solid rgba(79, 255, 176, 0.12); }
.jp-state--cd { background: rgba(251, 191, 36, 0.08); color: var(--jp-gold); border: 1px solid rgba(251, 191, 36, 0.12); }
.jp-state--spin { background: rgba(168, 85, 247, 0.08); color: var(--jp-purple); border: 1px solid rgba(168, 85, 247, 0.12); }
.jp-state--win { background: rgba(79, 255, 176, 0.12); color: var(--jp-green); border: 1px solid rgba(79, 255, 176, 0.15); }

/* ======== TOASTS ======== */
.jp-toasts {
  position: fixed; top: 80px; right: 20px; z-index: 10002;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.jp-toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: #0d1017;
  border: 1px solid var(--jp-border);
  border-radius: var(--jp-radius-sm);
  box-shadow: var(--jp-shadow);
  font-size: 13px; font-weight: 600; color: var(--jp-text);
  pointer-events: auto;
  animation: jp-toast-in 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes jp-toast-in { from { transform: translateX(100%) scale(0.8); opacity: 0; } to { transform: translateX(0) scale(1); opacity: 1; } }
.jp-toast--success { border-color: rgba(79, 255, 176, 0.25); }
.jp-toast--error { border-color: rgba(244, 63, 94, 0.25); }
.jp-toast--win {
  border-color: rgba(79, 255, 176, 0.3);
  box-shadow: 0 4px 24px rgba(79, 255, 176, 0.08), var(--jp-shadow);
}
.jp-toast__icon svg { width: 16px; height: 16px; }
.jp-toast--success .jp-toast__icon { color: var(--jp-green); }
.jp-toast--error .jp-toast__icon { color: var(--jp-red); }
.jp-toast--info .jp-toast__icon { color: var(--jp-accent-light); }
.jp-toast--win .jp-toast__icon { color: var(--jp-green); }

/* ======== SOUND TOGGLE ======== */
.jp-sound-toggle {
  position: fixed; bottom: 20px; right: 20px; z-index: 100;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s;
}
.jp-sound-toggle:hover { border-color: rgba(79, 255, 176, 0.15); color: var(--jp-accent); background: rgba(255,255,255,0.06); }
.jp-sound-toggle.muted { opacity: 0.4; }
.jp-sound-toggle svg { width: 18px; height: 18px; }

/* ======== HISTORY TICKER ======== */
.jp-ticker {
  position: relative; z-index: 2;
  padding: 8px 0; overflow: hidden;
  margin-top: 72px;
  background: linear-gradient(180deg, #080a0e, #080a0e);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  contain: layout style;
}
.jp-ticker--empty { text-align: center; padding: 10px 0; }
.jp-ticker::before, .jp-ticker::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 60px;
  z-index: 5; pointer-events: none;
}
.jp-ticker::before { left: 0; background: linear-gradient(90deg, #080a0e, transparent); }
.jp-ticker::after { right: 0; background: linear-gradient(-90deg, #080a0e, transparent); }
.jp-ticker-track {
  display: flex; gap: 8px; width: max-content;
  animation: jp-ticker-scroll 120s linear infinite;
  /* will-change removed — permanent GPU memory reservation not worth it for a
     slow 120s scroll. The browser auto-promotes to compositor anyway. */
}
.jp-ticker-track:hover { animation-play-state: paused; }
/* Freeze ticker during spin — its own compositor layer steals GPU bandwidth */
.jp-spinning .jp-ticker-track { animation-play-state: paused; }
@keyframes jp-ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.jp-ticker-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: #0d1017; border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 20px; white-space: nowrap;
  transition: border-color var(--jp-transition);
}
.jp-ticker-item:hover { border-color: rgba(79, 255, 176, 0.15); }
.jp-ticker-crown svg { width: 12px; height: 12px; color: var(--jp-gold); flex-shrink: 0; }
.jp-ticker-winner { font-size: 11px; font-weight: 700; color: var(--jp-text); }
.jp-ticker-text { font-size: 10px; color: var(--jp-text-dim); }
.jp-ticker-amount { font-size: 11px; font-weight: 700; font-family: var(--jp-mono); color: var(--jp-green); }
.jp-ticker-chance { font-size: 10px; font-weight: 600; color: var(--jp-accent-light); font-family: var(--jp-mono); }

/* New history item animation */
.jp-ticker-item--new {
  animation: jp-ticker-new-pop 1.2s ease-out;
  border-color: rgba(79, 255, 176, 0.3) !important;
  box-shadow: 0 0 16px rgba(79, 255, 176, 0.15), inset 0 0 6px rgba(79, 255, 176, 0.04);
}
@keyframes jp-ticker-new-pop {
  0%   { opacity: 0; transform: scale(0.7); box-shadow: 0 0 24px rgba(79, 255, 176, 0.3); }
  30%  { opacity: 1; transform: scale(1.05); }
  60%  { transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1); box-shadow: 0 0 16px rgba(79, 255, 176, 0.15); }
}

/* ======== HOW TO PLAY MODAL ======== */
.jp-htp-modal { max-width: 680px; }
.jp-htp-body { display: flex; flex-direction: column; gap: 20px; }

.jp-htp-section {
  padding: 22px;
  background: linear-gradient(165deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--jp-radius);
  transition: border-color var(--jp-transition);
}
.jp-htp-section:hover { border-color: rgba(79, 255, 176, 0.06); }
.jp-htp-section-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.jp-htp-section-header h3 {
  font-size: 16px; font-weight: 800; color: #fff; margin: 0;
  font-family: var(--jp-font);
}
.jp-htp-section-icon {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(79, 255, 176, 0.1), rgba(79, 255, 176, 0.03));
  border: 1px solid rgba(79, 255, 176, 0.08);
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(79, 255, 176, 0.04);
}
.jp-htp-section-icon svg { color: var(--jp-accent); }
.jp-htp-desc {
  font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.6; margin: 0 0 12px;
}
.jp-htp-desc strong { color: #fff; }

/* Steps */
.jp-htp-steps { display: flex; flex-direction: column; gap: 14px; }
.jp-htp-step { display: flex; align-items: flex-start; gap: 14px; }
.jp-htp-step-num {
  width: 30px; height: 30px; min-width: 30px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--jp-accent), #7c3aed);
  border-radius: 50%; font-size: 13px; font-weight: 800; color: #fff;
  box-shadow: 0 0 12px rgba(79, 255, 176, 0.15);
}
.jp-htp-step h4 { font-size: 13px; font-weight: 700; color: #fff; margin: 0 0 4px; }
.jp-htp-step p { font-size: 12px; color: rgba(255,255,255,0.6); margin: 0; line-height: 1.6; }
.jp-htp-step p strong { color: var(--jp-accent-light); }

/* Formula display */
.jp-htp-formula {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 16px 20px; margin-bottom: 12px;
  background: rgba(79, 255, 176, 0.03);
  border: 1px solid rgba(79, 255, 176, 0.06);
  border-radius: var(--jp-radius-sm);
}
.jp-htp-formula__text {
  font-size: 14px; font-weight: 700; color: var(--jp-accent);
  font-family: var(--jp-mono);
}
.jp-htp-formula__eq {
  font-size: 18px; font-weight: 300; color: rgba(255,255,255,0.3);
}
.jp-htp-formula__frac {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  position: relative;
}
.jp-htp-formula__frac::after {
  content: ''; position: absolute; top: 50%; left: -4px; right: -4px;
  height: 1px; background: rgba(255,255,255,0.3);
}
.jp-htp-formula__num, .jp-htp-formula__den {
  font-size: 12px; font-weight: 600; font-family: var(--jp-mono);
  color: rgba(255,255,255,0.8); padding: 2px 0;
}
.jp-htp-formula__x {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.5);
  font-family: var(--jp-mono);
}

/* Fair verification steps */
.jp-htp-fair-steps { display: flex; flex-direction: column; gap: 10px; }
.jp-htp-fair-step {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--jp-radius-xs);
  font-size: 12px; color: rgba(255,255,255,0.65); line-height: 1.5;
  border: 1px solid rgba(255, 255, 255, 0.02);
}
.jp-htp-fair-step strong { color: #fff; }
.jp-htp-fair-step__num {
  font-size: 16px; color: var(--jp-accent); flex-shrink: 0;
  line-height: 1.2;
}

/* Example callout */
.jp-htp-example {
  margin-top: 12px; padding: 16px;
  background: linear-gradient(135deg, rgba(79, 255, 176, 0.04), rgba(168, 85, 247, 0.02));
  border: 1px solid rgba(79, 255, 176, 0.1);
  border-radius: var(--jp-radius-sm);
  position: relative;
  overflow: hidden;
}
.jp-htp-example::before {
  content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--jp-accent), var(--jp-purple));
}
.jp-htp-example-label {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--jp-accent); margin-bottom: 8px;
}
.jp-htp-example p {
  font-size: 12px; color: rgba(255,255,255,0.65); margin: 0; line-height: 1.6;
}
.jp-htp-example p strong { color: var(--jp-accent-light); }

/* Tips */
.jp-htp-tips {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.jp-htp-tips li {
  position: relative; padding-left: 18px;
  font-size: 12px; color: rgba(255,255,255,0.65); line-height: 1.6;
}
.jp-htp-tips li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 5px; height: 5px; border-radius: 50%;
  background: linear-gradient(135deg, var(--jp-accent), var(--jp-purple));
  box-shadow: 0 0 6px rgba(79, 255, 176, 0.3);
}
.jp-htp-tips li strong { color: var(--jp-accent-light); }

/* ======== HOW TO PLAY FAB ======== */
.jp-htp-fab {
  position: fixed; bottom: 24px; left: 24px; z-index: 900;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px 10px 14px;
  background: rgba(79, 255, 176, 0.05);
  border: 1px solid rgba(79, 255, 176, 0.1);
  border-radius: 50px;
  color: var(--jp-accent-light);
  font-size: 13px; font-weight: 700; font-family: var(--jp-font);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.jp-htp-fab:hover {
  background: rgba(79, 255, 176, 0.1);
  border-color: rgba(79, 255, 176, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(79, 255, 176, 0.1);
}
.jp-htp-fab svg { flex-shrink: 0; }

/* ======== RESPONSIVE ======== */

@media (max-width: 1200px) {
  .jp-grid { grid-template-columns: 280px 1fr; }
  .jp-sidebar--right { display: none; }
  .jp-center { min-height: auto; }
  .jp-players { flex: 0 0 auto; }
  .jp-players__list { max-height: 380px; }
}

@media (max-width: 1024px) {
  .jp-grid { grid-template-columns: 260px 1fr; gap: 14px; }
  .jp-main { padding: 16px 12px 50px; }
  .jp-hero__pot-amount { font-size: 30px; }
}

@media (max-width: 900px) {
  .jp-grid { grid-template-columns: 1fr; gap: 14px; }
  .jp-sidebar--left { order: 2; }
  .jp-sidebar--right { display: none; }
  .jp-center { order: 1; }
  .jp-main { padding: 16px 10px 40px; }

  .jp-hero__winner { flex-direction: column; text-align: center; gap: 12px; }
  .jp-hero__winner-left { justify-content: center; }
  .jp-hero__pot-amount { font-size: 28px; }
  .jp-hero__content { padding: 22px 18px; }

  .jp-reel__viewport { width: 100% !important; }
  .jp-reel { padding: 0; }
  .jp-reel__pointer svg { width: 20px; }

  .jp-bet__input input { font-size: 16px; padding: 12px 56px 12px 12px; }
  .jp-bet__presets { gap: 6px; }
  .jp-preset { min-width: 48px; padding: 10px 6px; font-size: 14px; }

  .jp-players__list { max-height: 260px; }
  .jp-player { padding: 8px 10px; gap: 8px; }

  .jp-history__list { max-height: 220px; }

  .jp-win-card { width: 90vw; padding: 40px 28px 28px; }
  .jp-win-val { font-size: 36px; }
  .jp-win-card__title { font-size: 30px; letter-spacing: 3px; }

  .jp-sound-toggle { bottom: 14px; right: 14px; width: 36px; height: 36px; }
}

@media (max-width: 600px) {
  .jp-main { padding: 12px 8px 32px; }
  .jp-ticker { margin-top: 64px; }
  .jp-grid { gap: 12px; }

  .jp-hero__content { padding: 18px 14px; }
  .jp-hero__main { gap: 12px; }
  .jp-hero__trophy-box { width: 44px; height: 44px; border-radius: 12px; }
  .jp-hero__trophy-box svg { width: 22px; height: 22px; }
  .jp-hero__pot-label { font-size: 9px; letter-spacing: 2px; }
  .jp-hero__pot-amount { font-size: 22px; }
  .jp-hero__status { gap: 14px; margin-top: 12px; flex-wrap: wrap; justify-content: center; }
  .jp-cd-ring { width: 48px; height: 48px; }
  .jp-cd-num { font-size: 16px; }
  .jp-player-count { font-size: 11px; }

  .jp-hero__winner { gap: 10px; }
  .jp-hero__winner-left svg { width: 24px; height: 24px; }
  .jp-hero__winner-name { font-size: 16px; }
  .jp-hero__winner-amt { font-size: 22px; }
  .jp-hero__next-val { font-size: 14px; }

  .jp-reel { border-radius: var(--jp-radius-sm); }
  .jp-reel__viewport { height: 100px; }
  .jp-reel__pointer svg { width: 18px; }
  .jp-reel__mask { width: 40px; }
  .jp-seg__name { font-size: 9px; max-width: 70px; }
  .jp-seg__pct { font-size: 8px; }

  .jp-panel__head { padding: 12px 14px; }
  .jp-panel__title { font-size: 12px; }
  .jp-panel__body { padding: 12px; }

  .jp-bet__head { padding: 12px 14px; }
  .jp-bet__body { padding: 12px; gap: 10px; }
  .jp-bet__input input { font-size: 16px; padding: 11px 52px 11px 12px; }
  .jp-bet__suffix { font-size: 10px; right: 10px; }
  .jp-bet__presets { gap: 5px; }
  .jp-preset { padding: 8px 4px; font-size: 13px; min-width: 40px; }
  .jp-bet__stats { gap: 6px; }
  .jp-stat { padding: 8px 10px; }
  .jp-stat__l { font-size: 9px; }
  .jp-stat__v { font-size: 14px; }
  .jp-bet__cta { padding: 12px; font-size: 13px; }

  .jp-players__list { max-height: 220px; }
  .jp-player { padding: 8px 8px; gap: 6px; }
  .jp-player__rank { font-size: 10px; min-width: 24px; }
  .jp-player__color { width: 10px; height: 10px; min-width: 10px; }
  .jp-player__name { font-size: 12px; }
  .jp-player__bet { font-size: 10px; }
  .jp-player__chance { font-size: 12px; }

  .jp-history__list { max-height: 180px; }
  .jp-history__row { padding: 6px 8px; gap: 6px; }
  .jp-history__name { font-size: 11px; }
  .jp-history__amt { font-size: 11px; }
  .jp-history__ch { font-size: 10px; }

  .jp-fair { margin-top: 10px; padding-top: 10px; }
  .jp-fair__btn { font-size: 11px; }
  .jp-fair__body { gap: 6px; }
  .jp-fair__row { flex-wrap: wrap; gap: 4px; }
  .jp-fair__val code { font-size: 9px; }

  .jp-modal { width: 95%; max-height: 80vh; border-radius: 16px; }
  .jp-modal__header { padding: 20px 18px 14px; }
  .jp-modal__header h2 { font-size: 17px; }
  .jp-modal__body { padding: 16px 18px; }
  .jp-modal__footer { padding: 14px 18px 20px; }
  .jp-rules-sec h3 { font-size: 13px; }
  .jp-rules-sec li { font-size: 12px; }

  .jp-win-card { padding: 32px 20px 24px; border-radius: 18px; }
  .jp-win-card__trophy svg { width: 44px; height: 44px; }
  .jp-win-card__title { font-size: 26px; letter-spacing: 3px; }
  .jp-win-card__sub { font-size: 12px; margin: 4px 0 16px; }
  .jp-win-plus { font-size: 22px; }
  .jp-win-val { font-size: 30px; }
  .jp-win-lbl { font-size: 12px; }
  .jp-win-card__collect { padding: 12px; font-size: 14px; border-radius: 10px; }

  .jp-toasts { top: 76px; right: 10px; left: 10px; }
  .jp-toast { padding: 10px 14px; font-size: 12px; }

  .jp-orb-1 { width: 250px; height: 250px; }
  .jp-orb-2 { width: 200px; height: 200px; }
  .jp-orb-3 { display: none; }

  .jp-app__orbitals, .jp-app__shooters { display: none; }
  .jp-app::before { display: none; }

  .jp-ticker-item { padding: 4px 8px; }
  .jp-ticker-crown svg { width: 10px; height: 10px; }
  .jp-ticker-winner { font-size: 10px; }
  .jp-ticker-amount { font-size: 10px; }
  .jp-ticker-chance { font-size: 9px; }

  .jp-htp-fab { bottom: 16px; left: 12px; padding: 8px 14px 8px 10px; font-size: 12px; gap: 6px; }
  .jp-htp-fab svg { width: 16px; height: 16px; }

  .jp-htp-section { padding: 14px; }
  .jp-htp-section-header h3 { font-size: 14px; }
  .jp-htp-step-num { width: 24px; height: 24px; min-width: 24px; font-size: 11px; }
}

@media (max-width: 380px) {
  .jp-main { padding: 10px 6px 28px; }
  .jp-ticker { margin-top: 60px; }
  .jp-hero__pot-amount { font-size: 20px; }
  .jp-hero__content { padding: 14px 10px; }
  .jp-hero__trophy-box { width: 38px; height: 38px; }
  .jp-hero__trophy-box svg { width: 18px; height: 18px; }
  .jp-bet__presets { gap: 4px; }
  .jp-preset { min-width: 36px; font-size: 12px; padding: 7px 3px; }
  .jp-reel__viewport { height: 90px; }
  .jp-win-card__title { font-size: 22px; }
  .jp-win-val { font-size: 26px; }
  .jp-htp-fab { bottom: 12px; left: 8px; padding: 7px 12px 7px 9px; font-size: 11px; }
  .jp-htp-fab svg { width: 14px; height: 14px; }
}

/* ======== FOOTER INTEGRATION ======== */
footer {
  margin-top: 0 !important;
  background: linear-gradient(180deg, #080a0e 0%, #050608 100%) !important;
  border-top-color: rgba(255, 255, 255, 0.03) !important;
}
