:root {
  --bg: #0b0d18;
  --panel: #141626;
  --panel-2: #1c2036;
  --line: #2a2e48;
  --text: #eef0ff;
  --muted: #8b91b8;
  --accent: #00b06a;
  --accent-2: #ffcf33;
  --blue: #5b6bff;
  --danger: #ff4d6d;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(1200px 700px at 50% -15%, #191d38, var(--bg));
  color: var(--text);
  min-height: 100vh;
}
button { font-family: inherit; }
h1, h2, h3 { margin: 0; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: rgba(15,17,30,0.9); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.brand { font-size: 22px; font-weight: 800; cursor: pointer; }
.brand span { color: var(--accent-2); }
.wallet { display: flex; align-items: center; gap: 12px; }
.wallet-pill { background: var(--panel-2); border: 1px solid var(--line); padding: 8px 14px; border-radius: 10px; font-size: 16px; font-weight: 700; }
.rbx { color: var(--accent-2); }
.topup { background: var(--accent); color: #04170e; border: 0; font-weight: 700; padding: 9px 13px; border-radius: 10px; cursor: pointer; }
.topup:hover { filter: brightness(1.08); }
.ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); padding: 9px 13px; border-radius: 10px; cursor: pointer; }
.ghost:hover { border-color: var(--accent-2); }

.error-banner { margin: 16px 20px 0; padding: 12px 22px; text-align: center; background: var(--danger); color: #fff; font-weight: 600; border-radius: 10px; }
.error-banner[hidden] { display: none; }

/* Top nav links */
.topnav { display: flex; gap: 22px; margin-right: auto; margin-left: 34px; }
.topnav-link { color: var(--muted); font-weight: 600; font-size: 15px; cursor: pointer; padding: 6px 4px; border-bottom: 2px solid transparent; }
.topnav-link:hover { color: var(--text); }
.topnav-link.active { color: var(--text); border-bottom-color: var(--blue); }
.btn-primary { background: var(--blue); color: #fff; border: 0; font-weight: 800; padding: 10px 20px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary.big { width: 100%; padding: 14px; font-size: 16px; }
.wallet .authed[hidden], .btn-primary[hidden] { display: none; }

/* ── Shell: sidebar + content ─────────────────────────────────────── */
.shell { display: flex; align-items: flex-start; }
.sidebar { width: 96px; flex: 0 0 96px; padding: 14px 8px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 62px; }
.side-item { background: transparent; border: 0; color: var(--muted); border-radius: 12px; padding: 12px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.side-item .si-ic { font-size: 22px; }
.side-item:hover { background: var(--panel); color: var(--text); }
.side-item.active { background: var(--panel-2); color: var(--text); }
.content { flex: 1; min-width: 0; padding-bottom: 40px; }

/* ── Landing / hero ───────────────────────────────────────────────── */
.landing { max-width: 1500px; margin: 0 auto; padding: 10px 32px; }
.landing[hidden], .lobby[hidden], .game-view[hidden] { display: none; }
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 30px; align-items: center; min-height: 560px; }
.hero-copy .brand.big { font-size: 26px; margin-bottom: 18px; }
.hero-copy h1 { font-size: 56px; line-height: 1.02; margin: 0 0 18px; letter-spacing: -1px; }
.hero-copy h1 em { color: var(--accent-2); font-style: italic; }
.hero-copy > p { color: var(--muted); font-size: 16px; max-width: 460px; margin: 0 0 22px; }

.auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; max-width: 420px; display: flex; flex-direction: column; gap: 12px; }
.auth-tabs { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 4px; }
.auth-tab { flex: 1; background: transparent; border: 0; color: var(--muted); padding: 9px; border-radius: 8px; cursor: pointer; font-weight: 700; }
.auth-tab.active { background: var(--blue); color: #fff; }
.auth-input { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 13px 14px; font-size: 15px; }
.auth-input:focus { outline: none; border-color: var(--blue); }
.auth-alt { text-align: center; color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.auth-alt a { color: var(--text); font-weight: 700; cursor: pointer; text-decoration: underline; }

/* Hero art — stacked game cards */
.hero-art { position: relative; height: 420px; display: flex; align-items: center; justify-content: center; }
.art-card { position: absolute; width: 200px; height: 270px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; font-size: 84px; color: #fff; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.art-card span { font-size: 24px; font-weight: 900; letter-spacing: 1px; }
.art-card.c1 { transform: rotate(-14deg) translateX(-120px); background: linear-gradient(160deg,#2f6d94,#12203a); }
.art-card.c2 { transform: scale(1.12); z-index: 3; background: linear-gradient(160deg,#ff6a3d,#a01818); }
.art-card.c3 { transform: rotate(14deg) translateX(120px); background: linear-gradient(160deg,#d24b9b,#5a1e5a); }

.disclaimer { display: flex; gap: 14px; align-items: center; border-top: 1px solid var(--line); margin-top: 30px; padding: 20px 0; color: var(--muted); font-size: 12px; }
.disclaimer .age { flex: 0 0 auto; border: 2px solid var(--danger); color: var(--danger); font-weight: 900; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.disclaimer p { margin: 0; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { display: none; }
  .hero-copy h1 { font-size: 40px; }
  .sidebar { display: none; }
}

/* ── Lobby grid of tiles ─────────────────────────────────────────── */
.lobby { max-width: 1500px; margin: 30px auto; padding: 0 28px; }
.lobby[hidden] { display: none; }
.lobby-title { text-align: center; font-size: 30px; letter-spacing: 0.5px; margin-bottom: 26px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }

.tile {
  position: relative; border: 0; padding: 0; cursor: pointer; text-align: left;
  border-radius: 16px; overflow: hidden; aspect-ratio: 3 / 4;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff; transition: transform 0.14s ease, box-shadow 0.14s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.tile:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 14px 34px rgba(0,0,0,0.5); }
.tile .icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 74px; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.4)); }
.tile .rtp { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.45); color: #7bffbe; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 7px; }
.tile .label { position: relative; padding: 14px; background: linear-gradient(transparent, rgba(0,0,0,0.65)); }
.tile .label .name { font-size: 20px; font-weight: 800; }
.tile .label .sub { font-size: 12px; opacity: 0.8; }

/* ── Game view ───────────────────────────────────────────────────── */
.game-view { max-width: 1280px; margin: 24px auto; padding: 0 28px; }
.game-view[hidden] { display: none; }
.game-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.back { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); padding: 9px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.back:hover { border-color: var(--accent-2); }
.game-head h1 { font-size: 24px; }

.game-panel {
  display: grid; grid-template-columns: 320px 1fr; gap: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.bet-col { background: var(--panel-2); padding: 18px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--line); }
.play-col { padding: 28px; display: flex; flex-direction: column; gap: 18px; min-height: 540px; min-width: 0; }

.tabs { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 4px; }
.tabs button { flex: 1; background: transparent; border: 0; color: var(--muted); padding: 9px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.tabs button.active { background: var(--panel); color: var(--text); }

.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.bet-input { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.bet-input input { flex: 1; background: transparent; border: 0; color: var(--text); padding: 11px 12px; font-size: 15px; width: 100%; }
.bet-input input:focus { outline: none; }
.bet-input .mini { background: var(--panel); border: 0; border-left: 1px solid var(--line); color: var(--muted); padding: 0 12px; cursor: pointer; font-size: 12px; font-weight: 700; }
.bet-input .mini:hover { color: var(--text); }

input[type="number"], select {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 11px; font-size: 14px; width: 100%;
}
.info-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.info-line b { color: var(--accent-2); }

.action { margin-top: auto; }
.play-btn { width: 100%; background: linear-gradient(180deg, #6b7bff, var(--blue)); color: #fff; border: 0; font-weight: 800; font-size: 16px; padding: 14px; border-radius: 12px; cursor: pointer; }
.play-btn:hover { filter: brightness(1.06); }
.play-btn:disabled { opacity: 0.5; cursor: default; }
.cash-btn { width: 100%; background: linear-gradient(180deg, #17c979, var(--accent)); color: #04170e; border: 0; font-weight: 800; font-size: 16px; padding: 14px; border-radius: 12px; cursor: pointer; }
.cash-btn:disabled { opacity: 0.5; cursor: default; }
.btn-row { display: grid; gap: 10px; }

/* Play-area choices + result */
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 9px 14px; font-size: 14px; cursor: pointer; }
.choice.selected { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 700; }
.opt-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }

.result { min-height: 60px; border-radius: 12px; padding: 14px; text-align: center; font-size: 17px; background: var(--panel-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 10px; }
.result.win { border-color: var(--accent); color: #7bffbe; }
.result.lose { border-color: var(--danger); color: #ffb3c1; }
.result .big { font-size: 30px; }
.stage { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; width: 100%; }

/* Session boards */
.mult-line { display: flex; justify-content: center; gap: 18px; font-size: 15px; color: var(--muted); }
.mult-line b { color: var(--accent-2); }
.grid { display: grid; gap: 8px; }
.grid.mines { grid-template-columns: repeat(5, 1fr); max-width: 380px; margin: 0 auto; width: 100%; }
.tile-cell { aspect-ratio: 1; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; font-size: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; }
.tile-cell:hover:not(:disabled) { border-color: var(--accent-2); }
.tile-cell:disabled { cursor: default; }
.tile-cell.gem { background: #0c3b28; border-color: var(--accent); }
.tile-cell.mine { background: #4a0f1c; border-color: var(--danger); }

.tower { display: flex; flex-direction: column-reverse; gap: 5px; max-width: 260px; margin: 0 auto; width: 100%; }
.tower-row { display: grid; gap: 5px; }
/* Tower tiles are short bars (not squares) so 8 rows fit on screen */
.tower .tile-cell { aspect-ratio: auto; height: 38px; font-size: 16px; border-radius: 8px; }
.tower-row.active .tile-cell { border-color: var(--accent-2); }
.tower-row.locked .tile-cell { opacity: 0.45; }

.road-viewport { width: 100%; max-width: 100%; overflow: hidden; padding: 6px 0; }
.road-track { display: flex; gap: 6px; padding: 10px 0; transition: transform 0.35s ease; will-change: transform; }
.lane { min-width: 58px; height: 70px; flex: 0 0 auto; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
.lane.done { background: #0c3b28; border-color: var(--accent); color: #7bffbe; }
.lane.current { border-color: var(--accent-2); color: var(--accent-2); }
.lane.dead { background: #4a0f1c; border-color: var(--danger); color: #ffb3c1; }
.lane b { font-size: 14px; color: inherit; }
.chicken { font-size: 22px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.65); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal[hidden] { display: none; }  /* fixes X-to-close: hidden must win over display:flex */
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; width: 100%; max-width: 580px; position: relative; max-height: 90vh; overflow-y: auto; }
.modal-card h2 { margin: 0 0 16px; }
.modal-close { position: absolute; top: 14px; right: 14px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 15px; }
.modal-close:hover { border-color: var(--danger); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.stat .v { font-size: 21px; font-weight: 800; margin-top: 4px; }
.stat .v.pos { color: #7bffbe; }
.stat .v.neg { color: #ffb3c1; }
.pergame table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pergame th, .pergame td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.pergame td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pergame td.pos { color: #7bffbe; } .pergame td.neg { color: #ffb3c1; }
.empty { color: var(--muted); font-size: 14px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--danger); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.4); z-index: 60; }
.toast[hidden] { display: none; }

/* ── Stat minis (dice etc.) ──────────────────────────────────────── */
.stat-mini { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; flex: 1; }
.stat-mini .k { font-size: 11px; color: var(--muted); }
.stat-mini .v { font-size: 18px; font-weight: 800; margin-top: 2px; }

/* ── Dice slider ─────────────────────────────────────────────────── */
.dice-stage { display: flex; flex-direction: column; gap: 18px; }
.slider { position: relative; height: 16px; border-radius: 20px; background: var(--danger); margin: 46px 6px 0; touch-action: none; }
.slider-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; background: var(--accent); border-radius: 20px 0 0 20px; }
.slider-thumb { position: absolute; top: 50%; left: 50%; width: 26px; height: 40px; background: #fff; border-radius: 8px; transform: translate(-50%, -50%); cursor: grab; box-shadow: 0 3px 10px rgba(0,0,0,0.4); border: 2px solid var(--blue); }
.slider-thumb:active { cursor: grabbing; }
.roll-marker { position: absolute; top: -42px; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line); padding: 4px 8px; border-radius: 8px; font-weight: 800; font-size: 13px; transition: left 0.5s cubic-bezier(.2,.8,.2,1); }
.roll-marker::after { content: ""; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%) rotate(45deg); width: 8px; height: 8px; background: var(--panel); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.roll-marker.win { color: #7bffbe; border-color: var(--accent); }
.roll-marker.lose { color: #ffb3c1; border-color: var(--danger); }
.slider-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; padding: 0 4px; }
.dice-stats { display: flex; gap: 10px; }

/* ── Coin ────────────────────────────────────────────────────────── */
.coin-stage { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.coin { width: 120px; height: 120px; position: relative; transform-style: preserve-3d; }
.coin-face { position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 46px; font-weight: 900; color: #3a2a00; backface-visibility: hidden; box-shadow: inset 0 0 0 6px rgba(0,0,0,0.18); }
.coin-face.heads { background: radial-gradient(circle at 35% 30%, #ffe27a, #d4a12a); }
.coin-face.tails { background: radial-gradient(circle at 35% 30%, #ffd36b, #c98a1f); transform: rotateY(180deg); }

/* ── Dice invert button ──────────────────────────────────────────── */
.invert-btn { align-self: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); padding: 8px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 13px; }
.invert-btn:hover { border-color: var(--blue); color: #cdd4ff; }

/* ── Plinko ──────────────────────────────────────────────────────── */
.plinko-stage { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.plinko-ctrl { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.seg { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.seg-btn { flex: 1; background: transparent; border: 0; color: var(--muted); padding: 9px 8px; border-radius: 7px; cursor: pointer; font-weight: 700; font-size: 13px; }
.seg-btn.active { background: var(--panel); color: var(--text); }
.rows-wrap { width: 100%; }
.rows-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.rows-label b { color: var(--text); font-size: 14px; }
.rows-wrap input[type="range"] { width: 100%; accent-color: var(--blue); }
.plinko-board { position: relative; width: 100%; max-width: 520px; height: min(56vw, 400px); margin: 0 auto; }
.plinko-pegs { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 10px 4px; }
.peg-row { display: flex; justify-content: space-between; margin: 0 auto; }
.peg { width: 7px; height: 7px; border-radius: 50%; background: #5b6284; flex: 0 0 auto; }
.plinko-ball { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); transform: translate(-50%, -50%); z-index: 2; }
.plinko-buckets { display: flex; gap: 3px; width: 100%; max-width: 520px; margin: 0 auto; }
.bucket { flex: 1; min-width: 0; text-align: center; font-size: 10px; font-weight: 800; padding: 6px 1px; border-radius: 6px; color: #2a1400; }
.bucket.cold { background: #f5c518; }              /* center (< 1x) — yellow */
.bucket.even { background: #f0a81e; }              /* ~1x */
.bucket.mid  { background: #ec8a1e; }              /* 1.1–3x — orange */
.bucket.warm { background: #e8551f; color: #fff; } /* 3–10x — deep orange */
.bucket.hot  { background: #e0344f; color: #fff; } /* 10x+ — red */
.bucket.hit { outline: 2px solid #fff; transform: translateY(3px); transition: transform .1s; }

/* ── Provably-fair modal ─────────────────────────────────────────── */
.fair-note { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0 0 16px; }
.fair-note b { color: var(--text); }
#fairBody label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
.fair-input { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 10px 11px; font-size: 13px; font-family: ui-monospace, monospace; }
.fair-input:focus { outline: none; border-color: var(--blue); }

/* ── Crash ───────────────────────────────────────────────────────── */
.crash-stage { position: relative; flex: 1; min-height: 320px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.crash-canvas { width: 100%; height: 100%; display: block; }
.crash-mult { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 58px; font-weight: 900; color: var(--text); text-shadow: 0 4px 20px rgba(0,0,0,0.6); pointer-events: none; }
.crash-mult.crashed { color: #ff6b83; } .crash-mult.won { color: #7bffbe; }
.crash-history { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.hchip { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line); }
.hchip.up { color: #7bffbe; } .hchip.down { color: #ff9db0; }

/* ── Board reveal + hit animations ───────────────────────────────── */
.tile-cell.pop { animation: pop 0.22s ease; }
@keyframes pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.tile-cell.hit { outline: 2px solid var(--danger); animation: shake 0.35s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ── Currency pills + bet-panel currency toggle ──────────────────── */
.wallet-pill.acoin { color: var(--accent-2); }
.wallet-pill.bcoin { color: #7bffbe; }
.bet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.bet-head label { margin: 0; }
.cur-toggle { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.cur-btn { background: transparent; border: 0; color: var(--muted); width: 30px; height: 26px; border-radius: 6px; cursor: pointer; font-size: 15px; font-weight: 800; }
.cur-btn.active { background: var(--blue); color: #fff; }
.cur-btn:disabled { opacity: 0.5; cursor: default; }

/* ── Wallet modal ────────────────────────────────────────────────── */
.modal-card.wide { max-width: 620px; }
.wallet-balances { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.wbal { flex: 1; min-width: 130px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px; padding: 10px 14px; display: flex; flex-direction: column; }
.wbal span { font-size: 12px; color: var(--muted); }
.wbal b { font-size: 20px; margin-top: 2px; }
.wbal.acoin b { color: var(--accent-2); }
.wbal.bcoin b { color: #7bffbe; }
.wrate { font-size: 12px; color: var(--muted); }
.wtabs { display: flex; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.wtab { flex: 1; min-width: 90px; background: transparent; border: 0; color: var(--muted); padding: 9px; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 13px; }
.wtab.active { background: var(--panel); color: var(--text); }
.packs { display: flex; flex-direction: column; gap: 8px; }
.pack { display: flex; align-items: center; justify-content: space-between; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.pack div { display: flex; flex-direction: column; }
.pack b { color: #7bffbe; font-size: 16px; }
.pack span { color: var(--muted); font-size: 12px; }

/* ── Wallet modal (shared) ───────────────────────────────────────── */
.wallet-note { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.wallet-balance { font-size: 16px; margin-bottom: 18px; }
.wallet-balance b { color: var(--accent-2); }
.wallet-section { margin-bottom: 16px; }
.wallet-section > label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.wallet-section.test { border-top: 1px dashed var(--line); padding-top: 16px; }
.wallet-section.test > label { color: #ffcf33; }
.wallet-row { display: flex; gap: 10px; }
.wallet-row input { flex: 1; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 11px 12px; font-size: 15px; }
.w-btn { border: 0; border-radius: 10px; padding: 0 18px; font-weight: 800; cursor: pointer; color: #fff; font-size: 14px; }
.w-btn.deposit { background: var(--accent); color: #04170e; }
.w-btn.withdraw { background: #c0392b; }
.w-btn.set { background: var(--blue); }
.w-btn:hover { filter: brightness(1.08); }

/* ── Polish: nicer play area + buttons (Duel-ish) ────────────────── */
.play-col { justify-content: center; }
.play-btn { box-shadow: 0 6px 18px rgba(91,107,255,0.35); transition: transform 0.08s ease, filter 0.1s ease; }
.play-btn:active { transform: translateY(1px); }
.cash-btn { box-shadow: 0 6px 18px rgba(0,176,106,0.3); }
.result { transition: border-color 0.2s ease, color 0.2s ease; }
.bet-col { gap: 16px; }
.tabs button.active { box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
input:focus, select:focus, .bet-input:focus-within { outline: none; border-color: var(--blue); }

@media (max-width: 720px) {
  .game-panel { grid-template-columns: 1fr; }
  .bet-col { border-right: 0; border-bottom: 1px solid var(--line); }
  .crash-mult { font-size: 42px; }
}
