/* WTF $1 (Wtf1dollar.com) — JetBrains Mono, near-black + faint grid,
   neon-green accent with glow, minimalist terminal aesthetic. */
/* Self-hosted JetBrains Mono (variable) — avoids third-party requests and keeps CSP strict. */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #0a0a0a;
  --bg-soft: #0d0d0d;
  --card: #111111;
  --card-hi: #161616;
  --border: #1a1a1a;
  --border-hi: #2a2a2a;
  --accent: #00ff88;
  --accent-dim: #00ff8820;
  --accent-hover: #00cc6e;
  /* Aliases kept so existing markup/JS classes keep working */
  --gold: #00ff88;
  --gold-soft: #5affb0;
  --green: #00ff88;
  --red: #ff4444;
  --muted: #5a5a5a;
  --text: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 44px;
  position: relative;
}
/* Subtle grid background (WTF $1 signature) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
.tnum { font-variant-numeric: tabular-nums; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* layout */
.container { max-width: 1280px; margin: 0 auto; padding: 0 18px; position: relative; z-index: 1; }
.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(10,10,10,.85);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 18px; height: 62px; position: relative; z-index: 1; }
.brand { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand span { color: var(--accent); text-shadow: 0 0 30px var(--accent-dim); }
.nav-links { display: flex; gap: 16px; margin-left: 8px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .02em; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; border-radius: 8px; font-size: 17px; line-height: 1;
  background: transparent; border: 1px solid var(--border-hi); color: var(--text);
  cursor: pointer; transition: .15s; flex-shrink: 0;
}
.nav-icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-icon-btn:active { transform: scale(.92); }
.nav-toggle { display: none; font-size: 20px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border-hi); background: transparent; color: var(--text);
  padding: 9px 16px; border-radius: 8px; font-weight: 700; font-size: 13px;
  font-family: inherit; letter-spacing: .02em;
  cursor: pointer; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-gold { background: var(--accent); color: #062b18; border: 1px solid var(--accent); }
.btn-gold:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #041f11; box-shadow: 0 0 28px var(--accent-dim); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:not(:disabled):active { transform: scale(.96); }
.seg-btn:active, .dir-btn:active, .mode-tab:active, .toggle:active { transform: scale(.97); }

/* cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; animation: fadeUp .5s ease-out both; }
.grid { display: grid; gap: 18px; }
.badge { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 1px; padding: 3px 8px; border-radius: 5px; text-transform: uppercase; }
.badge-gold { background: var(--accent-dim); color: var(--accent); }
.badge-green { background: var(--accent-dim); color: var(--accent); }
.badge-red { background: rgba(255,68,68,.15); color: var(--red); }

/* pot cards */
.pots { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .pots { grid-template-columns: 1fr; } }
.pot {
  position: relative; overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; padding: 22px;
  transition: .2s; animation: fadeUp .5s ease-out both;
}
.pot:hover { border-color: var(--border-hi); }
.pot.near { border-color: var(--accent); box-shadow: 0 0 34px var(--accent-dim); }
.pot .tier-label { text-transform: uppercase; letter-spacing: 3px; font-weight: 800; font-size: 12px; color: var(--muted); }
.pot .amount { font-size: 44px; font-weight: 800; margin: 10px 0 2px; color: var(--accent); letter-spacing: -0.02em; text-shadow: 0 0 40px var(--accent-dim); }
.pot .sub { color: var(--muted); font-size: 12px; }
.progress { height: 8px; background: #050505; border-radius: 99px; overflow: hidden; margin: 16px 0 6px; border: 1px solid var(--border); }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .8s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 12px var(--accent-dim); }
.pot.near .progress > span { background: var(--red); animation: pulseglow 1.6s infinite; }
@keyframes pulseglow { 0%,100% { filter: brightness(1);} 50% { filter: brightness(1.4);} }
.flash-green { animation: flashg .8s ease; }
@keyframes flashg { 0% { box-shadow: 0 0 0 rgba(0,255,136,.5);} 30% { box-shadow: 0 0 34px var(--accent-dim);} 100% { box-shadow: none;} }

/* ticker */
.ticker { position: fixed; bottom: 0; left: 0; right: 0; height: 36px; background: #060606; border-top: 1px solid var(--border); overflow: hidden; z-index: 30; display: flex; align-items: center; }
.ticker-track { display: flex; gap: 44px; white-space: nowrap; padding-left: 100%; animation: scroll 34s linear infinite; }
.ticker-track:hover { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-100%); } }
.ticker-item { font-size: 12px; color: var(--muted); }
.ticker-item b { color: var(--accent); font-weight: 700; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.82); backdrop-filter: blur(3px); z-index: 60; display: none; align-items: center; justify-content: center; padding: 18px; }
.modal-bg.open { display: flex; }
.modal { width: 100%; max-width: 480px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; max-height: 92vh; overflow-y: auto; overflow-x: hidden; animation: fadeUp .3s ease-out; }
.modal h3 { margin: 0 0 4px; font-size: 19px; }
.close-x { float: right; cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; }
.close-x:hover { color: var(--text); }

/* forms */
label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; letter-spacing: .03em; }
input, select { width: 100%; background: #060606; border: 1px solid var(--border-hi); border-radius: 8px; color: var(--text); padding: 11px 12px; font-size: 14px; font-family: inherit; }
input:focus-visible, select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.err { color: var(--red); font-size: 13px; margin-top: 8px; }

/* misc */
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.muted { color: var(--muted); }
.gold { color: var(--accent); }
.green { color: var(--accent); }
.center { text-align: center; }
h1, h2, h3 { letter-spacing: -0.02em; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; animation: fadeUp .5s ease-out both; }
.stat .k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.stat .v { font-size: 26px; font-weight: 800; margin-top: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 5px; background: var(--card-hi); border: 1px solid var(--border-hi); }

/* toast */
.toasts { position: fixed; top: 74px; right: 18px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; padding: 12px 16px; min-width: 240px; box-shadow: 0 4px 12px rgba(0,0,0,.4); animation: slidein .3s ease; font-size: 13px; }
.toast.good { border-left-color: var(--accent); }
.toast.bad { border-left-color: var(--red); }
@keyframes slidein { from { transform: translateX(400px); opacity: 0; } }

/* event banner */
.event-banner { background: var(--accent-dim); border: 1px solid var(--accent); border-radius: 10px; padding: 12px 16px; font-weight: 700; color: var(--accent); font-size: 14px; }

/* wheel FAB */
.fab { position: fixed; right: 20px; bottom: 50px; z-index: 35; width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: #062b18; border: none; font-size: 26px; cursor: pointer; box-shadow: 0 0 28px var(--accent-dim); display: flex; align-items: center; justify-content: center; }
.fab.ready { animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-6px);} }
.fab .cd { position: absolute; bottom: -6px; font-size: 9px; background: #060606; color: var(--accent); border: 1px solid var(--border); padding: 1px 5px; border-radius: 20px; white-space: nowrap; }

/* ---- Home layout: jackpots top → left | dice center | right ---- */
.jp-hero { margin-bottom: 20px; }
.jp-hero-head { margin-bottom: 14px; }
.jp-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 860px) {
  .jp-hero-grid { grid-template-columns: 1fr; }
}

.stage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 1.35fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) {
  .stage-layout {
    grid-template-columns: 1fr;
  }
  .dice-center { order: -1; }
}

.side-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.dice-center {
  min-width: 0;
}

.live-strip {
  padding: 14px 16px;
}
.side-col .live-ticker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.live-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #0c0c0c;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  animation: liveIn .5s ease;
}
.live-chip.live-win { border-color: rgba(0,255,136,.35); background: rgba(0,255,136,.06); }
.live-chip-player { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.live-chip-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.live-chip-mult { color: var(--muted); font-size: 11px; }
.live-chip-coin { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.live-chip-amt { font-weight: 800; font-size: 12px; }

.dice-panel { padding: 22px; }
.dice-result { text-align: center; padding: 10px 0 18px; }
.dice-result-num {
  font-size: 68px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--text);
  transition: color .2s, text-shadow .2s;
}
.dice-result.win .dice-result-num { color: var(--accent); text-shadow: 0 0 44px var(--accent-dim); }
.dice-result.lose .dice-result-num { color: var(--red); text-shadow: 0 0 30px rgba(255,68,68,.25); }
.dice-result-label { margin-top: 8px; font-size: 14px; font-weight: 700; min-height: 20px; }

.dice-bar {
  position: relative; height: 30px; border-radius: 8px; overflow: visible; margin: 6px 0 26px;
  background: #060606; border: 1px solid var(--border-hi);
}
.bar-zone { position: absolute; top: 0; bottom: 0; }
.bar-zone.win { background: linear-gradient(180deg, #0f3d29, #0a2e20); box-shadow: inset 0 0 12px var(--accent-dim); border-radius: 6px; }
.bar-zone.lose { background: rgba(255,68,68,.10); }
.bar-handle { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); transform: translateX(-1px); z-index: 3; }
.bar-marker {
  position: absolute; top: -12px; width: 0; height: 0; display: none; z-index: 4;
  border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 12px solid var(--accent);
  transform: translateX(-8px); filter: drop-shadow(0 0 6px var(--accent)); transition: none;
}
.bar-ticks { position: absolute; left: 0; right: 0; bottom: -20px; display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }

.target-row { display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; }
.target-row .muted { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; background: var(--border-hi); border-radius: 99px; padding: 0; border: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent-dim); cursor: pointer; border: 3px solid #041f11; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid #041f11; cursor: pointer; }

.dice-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 16px; }
.stat { background: #0c0c0c; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.stat-k { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-v { display: block; font-size: 18px; font-weight: 800; margin-top: 3px; word-break: break-all; }

.dice-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}
.ctrl label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.bet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 6px;
  align-items: center;
}
#bet {
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 14px;
  font-weight: 700;
  min-width: 0;
  width: 100%;
  padding: 10px 10px;
}
.bet-row .btn { flex-shrink: 0; min-width: 44px; padding: 10px 10px; font-size: 12px; }
.bet-usd { font-size: 12px; margin-top: 5px; min-height: 14px; }

/* Manual / Auto mode tabs — full-width segmented control */
.mode-tabs { display: flex; width: 100%; gap: 4px; padding: 4px; background: #0c0c0c; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; }
.mode-tab { flex: 1; text-align: center; background: transparent; border: 0; color: var(--muted); font: inherit; font-weight: 700; padding: 9px 20px; border-radius: 7px; cursor: pointer; transition: background .15s, color .15s; }
.mode-tab.active { background: var(--gold, #00ff88); color: #05130c; }

/* Auto-roll panel */
.auto-panel { display: none; margin: 4px 0 14px; padding: 14px; background: #0c0c0c; border: 1px solid var(--border); border-radius: 10px; }
.auto-panel.open { display: block; }
.auto-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.auto-grid .ctrl label { font-size: 12px; color: var(--muted); }
.auto-grid input, .auto-grid select { width: 100%; }
.auto-status { margin-top: 12px; font-size: 13px; min-height: 16px; }
.btn-stop { background: #ff4d4d !important; color: #fff !important; }

/* Live bets / high rollers feed */
.live-table { width: 100%; border-collapse: collapse; }
.live-table td { padding: 5px 4px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.04); }
.live-table tr.live-win { background: rgba(0,255,136,.05); }
.live-table tr:first-child { animation: liveIn .5s ease; }
@keyframes liveIn { from { background: rgba(0,255,136,.18); } to { background: transparent; } }
.dir-row { display: flex; gap: 8px; }
.dir-btn { flex: 1; }
.dir-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

.ante-hint { margin: 16px 0 6px; font-size: 13px; }
.btn-roll { width: 100%; margin-top: 10px; font-size: 16px; font-weight: 800; letter-spacing: 1px; padding: 14px; }
.bal-line { margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center; }

.roll-strip-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.roll-strip-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.roll-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  align-items: center;
}
.roll-chip {
  font-family: var(--mono, monospace);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0c0c0c;
  line-height: 1;
}
.roll-chip.win {
  color: var(--accent);
  border-color: rgba(0, 255, 136, 0.35);
  background: rgba(0, 255, 136, 0.08);
}
.roll-chip.loss {
  color: var(--red);
  border-color: rgba(255, 68, 68, 0.3);
  background: rgba(255, 68, 68, 0.06);
}

.fair-panel { margin-top: 20px; }
.fair-panel summary { cursor: pointer; font-weight: 700; font-size: 14px; list-style: none; }
.fair-panel summary::-webkit-details-marker { display: none; }
.fair-body { margin-top: 14px; }
.fair-body label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
.seed-box { background: #060606; border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-size: 11px; word-break: break-all; }
.seed-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

.jackpots-col { display: flex; flex-direction: column; gap: 16px; }
.jp-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; transition: border-color .2s, box-shadow .2s; min-width: 0; }
.jp-card.opted { border-color: var(--accent); box-shadow: 0 0 22px var(--accent-dim); }
.jp-card.near { border-color: var(--red); }
.jp-top { display: flex; justify-content: space-between; align-items: center; }
.jp-top .tier-label { text-transform: uppercase; letter-spacing: 3px; font-weight: 800; font-size: 11px; color: var(--muted); }
.jp-amount { font-size: 30px; font-weight: 800; color: var(--accent); margin: 8px 0 2px; text-shadow: 0 0 30px var(--accent-dim); }
.jp-meta { display: flex; justify-content: flex-end; font-size: 12px; margin: 8px 0 12px; }

/* toggle switch */
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; user-select: none; }
.toggle input { display: none; }
.toggle .slider { position: relative; width: 42px; height: 24px; background: var(--border-hi); border-radius: 99px; transition: background .2s; flex: none; }
.toggle .slider::before { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #777; transition: transform .2s, background .2s; }
.toggle input:checked + .slider { background: var(--accent); }
.toggle input:checked + .slider::before { transform: translateX(18px); background: #041f11; }
.toggle-label { color: var(--muted); }
.toggle input:checked ~ .toggle-label { color: var(--accent); }

/* ---- Lucky Wheel (showpiece) ---- */
.wheel-modal { max-width: 420px; }
.wheel-wrap { position: relative; width: 100%; max-width: 320px; aspect-ratio: 1 / 1; margin: 18px auto 8px; }
/* glowing outer disc behind the wheel */
.wheel-wrap::before {
  content: ''; position: absolute; inset: -14px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--accent-dim), transparent 70%);
  filter: blur(6px); z-index: 0; animation: haloPulse 2.4s ease-in-out infinite;
}
@keyframes haloPulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
.wheel-svg { position: relative; z-index: 2; display: block; width: 100%; height: 100%; transition: transform 6.2s cubic-bezier(.12,.72,.16,1); will-change: transform; filter: drop-shadow(0 0 18px var(--accent-dim)); }
.wheel-svg.spinning { animation: none; }
/* LED rim dots */
.wheel-rim { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.wheel-rim i {
  position: absolute; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent); opacity: .35;
}
.wheel-wrap.spinning .wheel-rim i { animation: rimChase .6s linear infinite; }
@keyframes rimChase { 0%,100% { opacity: .3; } 50% { opacity: 1; transform: scale(1.5); } }
/* pointer */
.wheel-ptr {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%); z-index: 5;
  width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent;
  border-top: 26px solid var(--accent); filter: drop-shadow(0 0 8px var(--accent));
}
.wheel-wrap.spinning .wheel-ptr { animation: ptrTick .09s linear infinite; }
@keyframes ptrTick { 0%,100% { transform: translateX(-50%) rotate(0); } 50% { transform: translateX(-50%) rotate(-9deg); } }
/* center hub */
.wheel-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 4;
  width: 62px; height: 62px; border-radius: 50%; background: #0a0a0a; border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px;
  color: var(--accent); box-shadow: 0 0 18px var(--accent-dim); letter-spacing: 1px;
}
/* result banner */
.wheel-result { min-height: 30px; margin-top: 14px; font-weight: 800; font-size: 17px; }
.wheel-result.win { animation: popIn .5s cubic-bezier(.2,1.4,.4,1) both; color: var(--accent); text-shadow: 0 0 24px var(--accent-dim); }
.wheel-result.lose { color: var(--muted); animation: fadeUp .4s both; }
@keyframes popIn { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
#wheel-spin-btn.pulse { animation: btnPulse 1.4s ease-in-out infinite; }
@keyframes btnPulse { 0%,100% { box-shadow: 0 0 0 var(--accent-dim); } 50% { box-shadow: 0 0 26px var(--accent-dim); } }

/* confetti canvas */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; display: none; }

/* ---- Site footer (legal) ---- */
.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 22px 0 64px; background: #060606; }
.site-footer-inner { text-align: center; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; align-items: center; margin-bottom: 10px; }
.site-footer-links a { color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.site-footer-links a:hover { color: var(--accent); }
.site-footer-links .dot { color: var(--border-hi); }
.site-footer-note { color: var(--muted); font-size: 12px; line-height: 1.6; max-width: 720px; margin: 0 auto; }
.site-footer-note a { color: var(--muted); }
.site-footer-note a:hover { color: var(--accent); }

/* ---- Game lobby ---- */
.lobby-section { margin-bottom: 26px; }
.lobby-head { margin-bottom: 14px; }

/* Hero band: biggest live jackpot + primary CTA */
.lobby-hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: 16px;
  background:
    radial-gradient(120% 140% at 15% 0%, rgba(0,255,136,.10), transparent 55%),
    linear-gradient(160deg, #0d1210, #070707 70%);
  padding: 34px 30px; margin-bottom: 26px;
  animation: fadeUp .5s ease-out both;
}
.hero-glow {
  position: absolute; top: -40%; right: -10%; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim), transparent 70%); filter: blur(20px);
  pointer-events: none; animation: haloPulse 3.6s ease-in-out infinite;
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: 12px; font-weight: 800; color: var(--muted); }
.hero-pot {
  font-size: 68px; line-height: 1.02; font-weight: 800; letter-spacing: -0.03em; margin: 6px 0 8px;
  color: var(--accent); text-shadow: 0 0 50px var(--accent-dim);
}
.hero-sub { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.hero-note { flex-basis: 100%; font-size: 13px; }
.hero-note b { color: var(--accent); }
.hero-balance {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted);
  background: #0c0c0c; border: 1px solid var(--border-hi); border-radius: 8px; padding: 8px 12px; margin-right: 2px;
}
.hero-balance b { color: var(--accent); }

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 860px) { .game-grid { grid-template-columns: 1fr; } }
.game-card {
  display: flex; align-items: center; gap: 16px;
  padding: 22px; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; transition: border-color .2s, transform .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.game-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 34px rgba(0,0,0,.5); }
.game-card::after {
  content: ''; position: absolute; inset: 0; opacity: .10; pointer-events: none;
  background: radial-gradient(90% 120% at 100% 0%, var(--tile-accent, var(--accent)), transparent 60%);
}
.game-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--tile-accent, var(--accent)); }
.game-card.game-dice { --tile-accent: #ffd23b; }
.game-card.game-plinko { --tile-accent: #00ff88; }
.game-card.game-mines { --tile-accent: #ff4444; }
.game-card.game-wheel { --tile-accent: #ff6b3b; }
.game-icon {
  font-size: 40px; line-height: 1; flex-shrink: 0; width: 62px; height: 62px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: #0b0b0b; border: 1px solid var(--border-hi);
  box-shadow: inset 0 0 22px color-mix(in srgb, var(--tile-accent) 22%, transparent);
}
.game-body { flex: 1; min-width: 0; }
.game-name { font-weight: 800; font-size: 19px; margin-bottom: 4px; }
.game-tag { font-size: 12.5px; line-height: 1.5; color: #9fb0c2; }
.game-stat { font-size: 11px; margin-top: 6px; min-height: 14px; }
.game-cta { flex-shrink: 0; position: relative; z-index: 1; }

@media (max-width: 760px) {
  .lobby-hero { padding: 24px 18px; }
  .hero-pot { font-size: 46px; }
  .hero-sub { font-size: 13.5px; }
  .game-card { padding: 16px; gap: 12px; }
  .game-icon { width: 52px; height: 52px; font-size: 32px; }
}


.lobby-cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) { .lobby-cols { grid-template-columns: 1fr; } }

/* ---- Plinko ---- */
.plinko-panel { padding: 20px; }
.plinko-topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 12px; margin-bottom: 10px; min-height: 16px;
}
.plinko-topbar .pt-max b { color: var(--text); }
.plinko-topbar .pt-session { margin-left: auto; text-align: right; }
.plinko-board-wrap {
  position: relative;
  display: flex; justify-content: center; align-items: flex-start;
  background: radial-gradient(120% 90% at 50% 0%, #0c1512, #060606 70%);
  border: 1px solid var(--border-hi); border-radius: 12px;
  padding: 12px; margin-bottom: 14px; overflow: hidden;
}
.plinko-board-wrap canvas { display: block; max-width: 100%; }
/* floating +/- amount that rises after each drop */
.plinko-float {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  font-weight: 800; font-size: 20px; pointer-events: none; z-index: 3;
  animation: plinkoFloat 1.1s cubic-bezier(.2,.8,.2,1) forwards;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
}
.plinko-float.win { color: var(--accent); }
.plinko-float.lose { color: var(--muted); }
@keyframes plinkoFloat {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(.8); }
  20% { opacity: 1; transform: translate(-50%, 0) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -70px) scale(1); }
}
.plinko-lastwin {
  text-align: center; font-weight: 800; min-height: 30px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.plinko-lastwin .pl-mult { font-size: 24px; letter-spacing: -0.02em; }
.plinko-lastwin .pl-amt { font-size: 18px; }
.plinko-lastwin.win .pl-mult { color: var(--accent); text-shadow: 0 0 26px var(--accent-dim); }
.plinko-lastwin.lose .pl-mult { color: var(--muted); }
.plinko-lastwin.pop { animation: plinkoPop .45s cubic-bezier(.2,1.4,.4,1); }
@keyframes plinkoPop { 0% { transform: scale(.7); opacity: .3; } 100% { transform: scale(1); opacity: 1; } }

/* --- Mines --- */
.mines-panel { padding: 20px; }
.mines-board-wrap {
  display: flex; justify-content: center;
  background: radial-gradient(120% 90% at 50% 0%, #150c0c, #060606 70%);
  border: 1px solid var(--border-hi); border-radius: 12px;
  padding: 14px; margin-bottom: 14px;
}
.mines-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  width: 100%; max-width: 420px;
}
.mines-tile {
  aspect-ratio: 1 / 1; border-radius: 10px; border: 1px solid var(--border-hi);
  background: linear-gradient(180deg, #161616, #0c0c0c);
  font-size: clamp(16px, 4.5vw, 26px); line-height: 1; cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
  padding: 0;
}
.mines-tile:not(:disabled):hover { transform: translateY(-2px); border-color: var(--gold); }
.mines-tile:disabled { cursor: default; }
.mines-tile.picking { border-color: var(--gold); animation: minesPulse .5s ease infinite alternate; }
.mines-tile.safe {
  background: linear-gradient(180deg, #0d2418, #081510);
  border-color: var(--gold); text-shadow: 0 0 14px var(--gold);
  animation: minesPop .3s cubic-bezier(.2,1.4,.4,1);
}
.mines-tile.mine {
  background: linear-gradient(180deg, #2a0e0e, #170707);
  border-color: var(--red); opacity: .85;
}
.mines-tile.mine.hit {
  opacity: 1; border-color: var(--red); box-shadow: 0 0 18px rgba(255, 68, 68, .5);
  animation: minesShake .4s ease;
}
.mines-tile.dim { opacity: .35; }
@keyframes minesPop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
@keyframes minesPulse { from { box-shadow: 0 0 0 rgba(0,255,136,0); } to { box-shadow: 0 0 14px rgba(0,255,136,.35); } }
@keyframes minesShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.mines-status {
  text-align: center; font-weight: 700; min-height: 26px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.mines-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%;
}
.ms-item {
  display: flex; flex-direction: column; gap: 3px; align-items: center;
  padding: 8px 6px; background: #0c0c0c; border: 1px solid var(--border-hi);
  border-radius: 8px; min-width: 0;
}
.ms-item .ms-k {
  font-size: 10px; font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
}
.ms-item b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 560px) {
  .mines-stats { grid-template-columns: repeat(2, 1fr); }
}
.mines-next {
  padding: 10px 12px; background: #0c0c0c; border: 1px solid var(--border-hi);
  border-radius: 8px; font-weight: 800; color: var(--gold); text-align: center;
}
#mines-count {
  width: 100%; padding: 10px 12px; background: #0c0c0c; color: var(--text);
  border: 1px solid var(--border-hi); border-radius: 8px; font-family: inherit; font-size: 14px;
}
#mines-err.err {
  min-height: 18px;
  text-align: center;
  font-weight: 700;
  margin: 8px 0 4px;
}
.risk-hint { font-size: 11px; line-height: 1.5; margin: -4px 0 12px; }
.plinko-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.seg { display: flex; gap: 6px; }
.seg-btn {
  flex: 1; padding: 9px 8px; background: #0c0c0c; border: 1px solid var(--border-hi);
  border-radius: 8px; color: var(--muted); font-family: inherit; font-weight: 700;
  font-size: 13px; cursor: pointer; transition: all .15s; text-transform: capitalize;
}
.seg-btn:hover { color: var(--text); border-color: var(--accent); }
.seg-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* Wrap wide tables inside cards so they scroll instead of forcing page scroll. */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ============================================================
   Responsive / mobile pass
   ============================================================ */
@media (max-width: 760px) {
  .container { padding: 0 14px; }
  .nav-inner { height: 56px; gap: 10px; }
  .brand { font-size: 17px; }
  /* Collapse nav links into a dropdown panel toggled by the hamburger. */
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 56px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10,10,10,.98); border-bottom: 1px solid var(--border);
    padding: 6px 14px; margin: 0; display: none; z-index: 45;
    box-shadow: 0 12px 24px rgba(0,0,0,.5);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 6px; font-size: 15px; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: none; }
  /* Keep only essential controls in the top bar on mobile. */
  .nav-right .btn { padding: 8px 10px; font-size: 12px; }

  /* Toasts: full-width bottom sheet stack so they never overflow off-screen. */
  .toasts { top: auto; bottom: 46px; left: 12px; right: 12px; }
  .toast { min-width: 0; width: 100%; }
  @keyframes slidein { from { transform: translateY(60px); opacity: 0; } }

  /* Ticker + FAB shrink and stay clear of controls. */
  .ticker { height: 32px; }
  .ticker-item { font-size: 11px; }
  .fab { width: 52px; height: 52px; font-size: 22px; right: 14px; bottom: 44px; }

  /* Hero / big numbers scale down. */
  .dice-result-num { font-size: 46px; }
  .jp-amount { font-size: 26px; }
  .pot .amount { font-size: 36px; }

  /* Full-bleed-ish cards. */
  .card, .dice-panel, .plinko-panel, .pot { padding: 16px; }

  /* Modal a touch tighter. */
  .modal { padding: 18px; }

  /* Give body room for both ticker and FAB. */
  body { padding-bottom: 40px; }

  /* Wide tables scroll within their card. */
  .card table, .table-scroll table { min-width: 520px; }
  .card:has(> table), .card:has(table) { overflow-x: auto; }
}

@media (max-width: 560px) {
  .dice-result-num { font-size: 40px; }
  .game-icon { font-size: 32px; }
  .game-name { font-size: 16px; }
  .stat-v { font-size: 16px; }
  .btn-roll { font-size: 15px; padding: 13px; }
  /* Guarantee comfortable tap targets. */
  .seg-btn, .dir-btn, .mode-tab { min-height: 44px; }
  .bet-row .btn { min-height: 44px; }
  .toggle .slider { flex: none; }
}

@media (max-width: 480px) {
  .auto-grid { grid-template-columns: 1fr; }
  .plinko-selects { grid-template-columns: 1fr; }
  .dice-stats { grid-template-columns: 1fr 1fr; }
  .bet-row { grid-template-columns: 1fr auto auto; }
  .bet-row .btn[data-bet="max"] { grid-column: 1 / -1; }
  .dice-result-num { font-size: 36px; }
  .wheel-wrap { max-width: 260px; }
  .site-footer { padding: 18px 0 60px; }
}

/* ============================================================
   Casino UX pass: balance chip, skeletons, flash, bet bar, trust
   ============================================================ */

/* Nav balance chip with one-tap deposit */
.nav-balance { display: inline-flex; align-items: center; gap: 0; padding: 0; overflow: hidden; }
.nav-balance .nb-amt { padding: 6px 10px; font-weight: 800; }
.nav-balance .nb-plus { padding: 6px 9px; border-left: 1px solid var(--border-hi); background: var(--accent-dim); color: var(--accent); font-weight: 800; line-height: 1; }
.nav-balance:hover { border-color: var(--accent); color: var(--text); }
.nav-balance:hover .nb-plus { background: var(--accent); color: #062b18; }

/* Play-for-fun mode: Real|Fun pill toggle, FUN balance badge, sticky banner */
.play-mode-toggle { display: inline-flex; border: 1px solid var(--border-hi); border-radius: 999px; overflow: hidden; background: var(--bg-1, #101010); }
.play-mode-toggle .pm-btn { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 800; padding: 5px 11px; cursor: pointer; letter-spacing: .02em; }
.play-mode-toggle .pm-btn.active { background: var(--accent); color: #062b18; }
.play-mode-toggle .pm-btn:not(.active):hover { color: var(--text); }
.nav-balance.bal-fun { border-color: #b98aff; }
.nav-balance .nb-fun-badge { padding: 6px 8px; border-left: 1px solid var(--border-hi); background: rgba(150, 90, 255, .18); color: #c9a7ff; font-size: 10px; font-weight: 800; letter-spacing: .06em; line-height: 1.4; }
.nav-balance.bal-fun:hover { border-color: #c9a7ff; }
.fun-banner { text-align: center; font-size: 13px; padding: 7px 14px; color: #d9c4ff; background: linear-gradient(90deg, rgba(120, 60, 220, .22), rgba(150, 90, 255, .12), rgba(120, 60, 220, .22)); border-bottom: 1px solid rgba(150, 90, 255, .35); }
.fun-banner b { color: #eee0ff; }

/* Skeleton shimmer loaders */
.skel { display: flex; flex-direction: column; gap: 9px; }
.skel-line { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #141414 25%, #202020 37%, #141414 63%); background-size: 400% 100%; animation: skelShimmer 1.4s ease infinite; }
@keyframes skelShimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Big-win screen flash */
#screen-flash { position: fixed; inset: 0; z-index: 65; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 42%, var(--accent-dim), transparent 70%); }
#screen-flash.go { animation: flashOnce .5s ease; }
#screen-flash.go-strong { animation: flashStrong .85s ease; }
@keyframes flashOnce { 0% { opacity: 0; } 30% { opacity: .45; } 100% { opacity: 0; } }
@keyframes flashStrong { 0% { opacity: 0; } 18% { opacity: .9; } 100% { opacity: 0; } }

/* Session net line (dice) */
.game-session { text-align: center; font-size: 12px; min-height: 16px; margin: -2px 0 12px; }
.game-session b { font-weight: 800; }

/* Trust strip: RTP + provably-fair + live counters */
.trust-strip {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: center;
  padding: 10px 14px; margin-bottom: 16px; font-size: 12px; color: var(--muted);
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
}
.trust-strip .ts-item { display: inline-flex; align-items: center; gap: 6px; }
.trust-strip b { color: var(--text); }
.trust-strip .ts-live b { color: var(--accent); }
.trust-badge { color: var(--accent); font-weight: 700; }

/* Recent-bet chips are clickable (open verify) */
.roll-chip { cursor: pointer; }
.roll-chip:hover { border-color: var(--accent); }

/* Verify modal */
.verify-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.verify-row:last-child { border-bottom: none; }
.verify-row .vk { color: var(--muted); }
.verify-row .vv { font-weight: 700; text-align: right; word-break: break-all; }

/* Sticky mobile bet bar */
.mobile-betbar { display: none; }
@media (max-width: 760px) {
  .mobile-betbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 32px; z-index: 34;
    gap: 12px; align-items: center; padding: 8px 12px;
    background: rgba(8,8,8,.97); border-top: 1px solid var(--border); backdrop-filter: blur(8px);
  }
  .mobile-betbar .mbb-info { display: flex; flex-direction: column; line-height: 1.15; flex-shrink: 0; }
  .mobile-betbar .mbb-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
  .mobile-betbar .mbb-amt { font-weight: 800; font-size: 16px; }
  .mobile-betbar .btn { flex: 1; padding: 14px; font-size: 15px; font-weight: 800; }
  body:has(.mobile-betbar) { padding-bottom: 92px; }
  body:has(.mobile-betbar) .fab { bottom: 104px; }
}

/* --- SEO content (crawlable copy + internal links for search engines) --- */
.seo-content {
  margin: 44px 0 20px; padding-top: 26px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 14px; line-height: 1.75; max-width: 900px;
}
.seo-content h1, .seo-content h2 { color: #d8d8d8; line-height: 1.3; }
.seo-content h1 { font-size: 22px; margin: 0 0 12px; font-weight: 800; }
.seo-content h2 { font-size: 16px; margin: 24px 0 8px; font-weight: 700; }
.seo-content p { margin: 0 0 12px; }
.seo-content ul { margin: 0 0 12px; padding-left: 20px; }
.seo-content li { margin: 5px 0; }
.seo-content a { color: var(--gold); text-decoration: none; }
.seo-content a:hover { text-decoration: underline; }
.seo-content .seo-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
