:root {
  --bg: #0a0e1a; --bg2: #10162a; --panel: #161d35; --panel2: #1e2848; --line: #2b3762;
  --text: #e8ecf8; --muted: #8e9ac0; --gold: #f5c542; --gold2: #d99a1e;
  --red: #d7263d; --black: #1b1b22; --green: #11a35a; --felt: #0e5e3b; --felt2: #094229;
  --win: #3ee08f; --lose: #ff6b6b;
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; color: var(--text); }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at 50% -240px, #1d2858, transparent), var(--bg);
}
button { font: inherit; color: inherit; }
a { color: inherit; }
kbd { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-size: 12px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.demo-bar { background: #3a2200; color: #ffd58a; text-align: center; font-size: 12px; padding: 6px 12px; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 10px 20px; flex-wrap: wrap;
  background: rgba(10, 14, 26, .88); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50;
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; text-decoration: none; font-weight: 600; }
.logo b { color: var(--gold); }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 900; color: #1a1200;
  background: linear-gradient(135deg, var(--gold), var(--gold2)); box-shadow: 0 0 18px rgba(245, 197, 66, .35);
}
.nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; }
.nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); white-space: nowrap; font-size: 14px; }
.nav a.active, .nav a:hover { background: var(--panel); color: var(--text); }
.wallet-box { display: flex; align-items: center; gap: 8px; }
select, input[type=number], input[type=text], input[type=email], input[type=password], input[type=date] {
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font: inherit;
}
input:focus-visible, select:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
input:disabled { opacity: .6; }
.balance {
  background: var(--panel); border: 1px solid var(--line); padding: 7px 14px; border-radius: 8px;
  font-weight: 700; font-variant-numeric: tabular-nums; min-width: 130px; text-align: right; transition: color .3s;
}
.balance.up { color: var(--win); }
.balance.down { color: #ffd0d0; }

/* ---------- Buttons ---------- */
.btn {
  border: 1px solid var(--line); background: var(--panel2); padding: 9px 16px; border-radius: 10px;
  cursor: pointer; font-weight: 600; transition: filter .15s, transform .05s;
}
.btn:hover:not(:disabled) { filter: brightness(1.18); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-gold { background: linear-gradient(180deg, #ffd85e, #e0a21f); color: #2a1a00; border-color: #b07d10; }
.btn-green { background: linear-gradient(180deg, #23c873, #10914e); border-color: #0b6b39; }
.btn-red { background: linear-gradient(180deg, #ef4b5a, #b51d30); border-color: #8a1424; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.icon-btn { background: none; border: 0; cursor: pointer; font-size: 18px; color: var(--muted); padding: 4px 8px; }

main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px 16px 40px; }
.footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px;
  padding: 14px 20px; border-top: 1px solid var(--line); background: var(--bg2);
}

/* ---------- Lobby ---------- */
.hero {
  border-radius: 20px; padding: 36px 32px; margin-bottom: 28px; border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(245,197,66,.16), transparent 50%), linear-gradient(300deg, #2b1458, #101a3a);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.hero h1 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 40px); }
.hero p { margin: 0; color: var(--muted); max-width: 560px; }
.section-title { font-size: 14px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin: 26px 0 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tile {
  border-radius: 16px; overflow: hidden; text-decoration: none; border: 1px solid var(--line);
  background: var(--panel); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column;
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.tile-art { aspect-ratio: 16/10; display: grid; place-items: center; font-size: 64px; position: relative; }
.tile-art .tag { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.45); padding: 3px 8px; border-radius: 20px; }
.tile-body { padding: 12px 14px 14px; }
.tile-body h3 { margin: 0 0 4px; font-size: 17px; }
.tile-body p { margin: 0; color: var(--muted); font-size: 13px; }
.art-outback { background: radial-gradient(circle at 50% 120%, #ffb347, #c2410c 45%, #431407); }
.art-neon { background: radial-gradient(circle at 50% 50%, #ff2bd6 0%, #5b0b8a 50%, #12002a); }
.art-cosmic { background: radial-gradient(circle at 30% 30%, #4f7cff, #1b1464 45%, #05031a); }
.art-roulette { background: radial-gradient(circle, #1a7d50, #073a24); }
.art-blackjack { background: radial-gradient(circle, #14532d, #052e16); }

/* ---------- Game common ---------- */
.game-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.game-head h1 { margin: 0; font-size: 28px; }
.game-head .sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.ctrl-group { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.ctrl-group > label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.stepper { display: flex; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.stepper button { background: none; border: 0; width: 36px; height: 38px; font-size: 20px; cursor: pointer; color: var(--gold); }
.stepper button:disabled { opacity: .3; cursor: not-allowed; }
.stepper span { min-width: 110px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.toggle { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); cursor: pointer; }
.hint { color: var(--muted); font-size: 12px; text-align: center; margin-top: 10px; }

/* ---------- Slots ---------- */
.slot { max-width: 760px; margin: 0 auto; }
.machine {
  position: relative; border-radius: 22px; padding: 16px; border: 3px solid var(--gold2);
  box-shadow: 0 0 0 6px rgba(0,0,0,.35), 0 20px 50px rgba(0,0,0,.55), inset 0 0 40px rgba(0,0,0,.5);
}
.theme-outback .machine { background: linear-gradient(180deg, #7c2d12, #431407); }
.theme-neon .machine { background: linear-gradient(180deg, #3b0764, #12002a); border-color: #ff2bd6; box-shadow: 0 0 30px rgba(255,43,214,.45), inset 0 0 40px rgba(0,0,0,.5); }
.theme-cosmic .machine { background: radial-gradient(ellipse at top, #1e3a8a, #05031a 70%); border-color: #6d8bff; }
.reels {
  --cols: 5; --rows: 3;
  display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 8px; position: relative;
  font-size: calc(min(720px, 92vw) / var(--cols) * .42);
}
.theme-cosmic .reels { font-size: calc(min(720px, 92vw) / 5 * .36); }
.theme-cosmic .cell { aspect-ratio: 1 / .72; }
.theme-neon .reels { font-size: calc(min(560px, 80vw) / 3 * .45); max-width: 560px; margin: 0 auto; }
.reel { display: grid; grid-template-rows: repeat(var(--rows), 1fr); gap: 8px; border-radius: 12px; transition: box-shadow .3s; }
.cell {
  aspect-ratio: 1 / .8; display: grid; place-items: center; border-radius: 12px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #fffdf5, #e9dcc0); color: #222;
  box-shadow: inset 0 -6px 12px rgba(0,0,0,.18);
}
.theme-neon .cell { background: radial-gradient(circle at 50% 35%, #2a0b45, #140022); box-shadow: inset 0 0 14px rgba(255,43,214,.35); }
.theme-cosmic .cell { background: radial-gradient(circle at 50% 35%, #1a2456, #0a0f2e); box-shadow: inset 0 0 12px rgba(109,139,255,.3); }
.sym { line-height: 1; display: inline-block; user-select: none; }
.sym-tag { position: absolute; bottom: 6%; left: 50%; transform: translateX(-50%); font-size: max(9px, .2em); font-weight: 900; letter-spacing: 1px; padding: 1px 6px; border-radius: 4px; }
.cell .tag-wild { background: var(--gold); color: #3a2400; }
.cell .tag-scatter { background: #2563eb; color: #fff; }
.txt { font-weight: 900; font-family: Georgia, "Times New Roman", serif; font-size: .8em; }
.t-a { color: #c2410c; } .t-k { color: #1d4ed8; } .t-q { color: #7e22ce; } .t-j { color: #15803d; } .t-10 { color: #b91c1c; font-size: .66em; }
.t-seven { color: #ff3b5c; font-size: 1.1em; text-shadow: 0 0 10px #ff3b5c, 0 0 2px #fff; font-family: Impact, "Arial Black", sans-serif; }
.t-bar { color: #fff; font-size: .5em; letter-spacing: 1px; background: linear-gradient(#22d3ee, #0e7490); padding: .15em .35em; border-radius: 6px; font-family: "Arial Black", sans-serif; box-shadow: 0 0 10px #22d3ee; }
.t-suit { font-size: .85em; }
.t-red { color: #ff5d73; text-shadow: 0 0 8px rgba(255,93,115,.6); }
.t-cyan { color: #67e8f9; text-shadow: 0 0 8px rgba(103,232,249,.6); }
.t-lime { color: #a3e635; text-shadow: 0 0 8px rgba(163,230,53,.5); }
.t-amber { color: #fbbf24; text-shadow: 0 0 8px rgba(251,191,36,.5); }

.reel.spinning .sym { animation: blurSpin .12s linear infinite; filter: blur(2px); }
@keyframes blurSpin { from { transform: translateY(-18%); } to { transform: translateY(18%); } }
.reel.landed .cell { animation: land .3s ease-out; }
@keyframes land { 0% { transform: translateY(-10%); } 60% { transform: translateY(4%); } 100% { transform: none; } }
.reel.anticipate { box-shadow: 0 0 0 3px var(--gold), 0 0 30px var(--gold); }
.reel.expanded .cell { background: radial-gradient(circle, #fde68a, #d97706); box-shadow: 0 0 18px #fbbf24; }
.cell.win { animation: winPulse 1s ease-in-out infinite; z-index: 2; }
.cell.win::after { content: ''; position: absolute; inset: 0; border: 3px solid var(--gold); border-radius: 12px; box-shadow: inset 0 0 14px var(--gold); }
.cell.dim { opacity: .35; }
@keyframes winPulse { 50% { transform: scale(1.06); } }
.linesvg { position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); pointer-events: none; z-index: 3; }
.theme-neon .linesvg { left: 50%; transform: translateX(-50%); max-width: 560px; }

.win-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 10; border-radius: 20px;
  background: rgba(0,0,0,.72); text-align: center; cursor: pointer; animation: fadeIn .25s;
}
.win-overlay h2 { font-size: clamp(32px, 7vw, 64px); margin: 0; color: var(--gold); text-shadow: 0 0 24px rgba(245,197,66,.8); letter-spacing: 2px; }
.win-overlay p { font-size: 20px; margin: 8px 0 0; }
.win-overlay .amt { font-size: clamp(28px, 6vw, 52px); font-weight: 800; font-variant-numeric: tabular-nums; }
@keyframes fadeIn { from { opacity: 0; transform: scale(.96); } }

.fs-banner {
  text-align: center; font-weight: 800; letter-spacing: 1px; padding: 8px; margin-bottom: 10px; border-radius: 10px;
  background: linear-gradient(90deg, #7c3aed, #db2777); box-shadow: 0 0 20px rgba(219,39,119,.5);
}
.win-info { text-align: center; min-height: 28px; margin: 12px 0 6px; font-size: 16px; }
.win-info .amt { color: var(--win); font-weight: 800; }
.slot-controls {
  display: flex; align-items: flex-end; justify-content: center; gap: 18px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px;
}
.last-win { font-weight: 800; min-width: 100px; text-align: center; height: 38px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.spin-btn {
  width: 96px; height: 96px; border-radius: 50%; font-size: 18px; font-weight: 900; letter-spacing: 1px;
  background: radial-gradient(circle at 50% 35%, #ffe27a, #e09b14 70%); color: #3a2400; border: 4px solid #8a5a00;
  box-shadow: 0 6px 0 #6b4500, 0 10px 24px rgba(0,0,0,.4);
}
.spin-btn.stop { background: radial-gradient(circle at 50% 35%, #ff8a8a, #c81e1e 70%); color: #fff; border-color: #7a0f0f; box-shadow: 0 6px 0 #5a0b0b; }

.paytable { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.pay-item { display: flex; gap: 10px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.pay-item .pt-sym { font-size: 36px; width: 52px; text-align: center; }
.pay-item .pt-sym .txt { font-size: 28px; }
.pay-item table { font-size: 13px; border-collapse: collapse; }
.pay-item td { padding: 1px 6px 1px 0; font-variant-numeric: tabular-nums; }
.pay-item td:first-child { color: var(--muted); }
.rules { color: var(--muted); font-size: 14px; line-height: 1.6; }
.lines-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 6px; }
.lines-preview svg { width: 100%; background: var(--bg2); border-radius: 6px; }

/* ---------- Roulette ---------- */
.roulette-wrap { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
.roulette-wrap > * { min-width: 0; }
.wheel-box { display: flex; flex-direction: column; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.wheel-box canvas { width: 100%; max-width: 330px; aspect-ratio: 1; }
.rt-result { display: flex; align-items: center; gap: 10px; min-height: 52px; font-size: 16px; }
.num-badge { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 18px; border: 2px solid rgba(255,255,255,.6); }
.num-badge.red, .hist-dot.red { background: var(--red); }
.num-badge.black, .hist-dot.black { background: var(--black); }
.num-badge.green, .hist-dot.green { background: var(--green); }
.history { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.hist-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.hist-dot:first-child { outline: 2px solid var(--gold); }
.rt-stats { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.felt-panel { background: radial-gradient(ellipse at center, var(--felt), var(--felt2)); border: 6px solid #4a2a10; border-radius: 18px; padding: 16px; box-shadow: inset 0 0 40px rgba(0,0,0,.5); }
.rt-scroll { overflow-x: auto; padding: 6px 4px 14px; }
.rt-table {
  display: grid; grid-template-columns: 1.1fr repeat(12, 1fr) 1.1fr; grid-template-rows: repeat(3, 52px) 40px 40px;
  min-width: 600px; user-select: none; font-weight: 700;
}
.rt-numbers { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(3, 1fr); position: relative; }
.rt-cell {
  border: 1px solid rgba(255,255,255,.55); display: grid; place-items: center; cursor: pointer; position: relative;
  font-size: 15px; transition: background .15s, box-shadow .15s;
}
.rt-cell.red span, .rt-cell.black span, .rt-cell.green span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.rt-cell.red span { background: var(--red); }
.rt-cell.black span { background: var(--black); }
.rt-zero { border-radius: 40px 0 0 40px; }
.rt-zero span { background: var(--green); }
.rt-out { font-size: 13px; }
.rt-cell:hover, .rt-cell.hl { background: rgba(255,255,255,.18); }
.rt-cell.winner { box-shadow: inset 0 0 0 3px var(--gold), 0 0 20px var(--gold); background: rgba(245,197,66,.25); z-index: 1; }
.diamond { width: 22px; height: 22px; transform: rotate(45deg); border-radius: 3px; }
.diamond.red { background: var(--red); } .diamond.black { background: var(--black); border: 1px solid #fff; }
.rt-hot { position: absolute; transform: translate(-50%, -50%); z-index: 4; cursor: pointer; border-radius: 4px; }
.rt-hot:hover, .rt-hot.hl-self { background: rgba(245,197,66,.45); }
.hot-v { width: 14px; height: 30px; } .hot-h { width: 34px; height: 14px; } .hot-c { width: 16px; height: 16px; border-radius: 50%; }
.chip-stack {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; pointer-events: none;
  min-width: 30px; height: 30px; padding: 0 4px; border-radius: 15px; display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #fff; border: 3px dashed rgba(255,255,255,.85);
  box-shadow: 0 2px 6px rgba(0,0,0,.6); animation: chipIn .18s ease-out;
}
.chip-stack.won { box-shadow: 0 0 0 3px var(--gold), 0 0 18px var(--gold); }
@keyframes chipIn { from { transform: translate(-50%, -90%) scale(1.3); opacity: 0; } }
.chip { width: 52px; height: 52px; border-radius: 50%; border: 4px dashed rgba(255,255,255,.85); cursor: pointer; font-weight: 800; font-size: 12px; color: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.5); transition: transform .12s; }
.chip.sel { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--gold), 0 8px 16px rgba(0,0,0,.5); }
.c1 { background: #64748b; } .c2 { background: #dc2626; } .c3 { background: #2563eb; } .c4 { background: #16a34a; } .c5 { background: #111; } .c6 { background: #9333ea; }
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.table-controls { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.table-controls .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.bet-summary { font-size: 14px; color: var(--muted); }
.bet-summary b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- Blackjack ---------- */
.bj-felt {
  background: radial-gradient(ellipse at 50% 0%, #15784c, var(--felt2) 75%); border: 10px solid #4a2a10;
  border-radius: 30px 30px 200px 200px / 30px 30px 120px 120px; padding: 22px 20px 34px; min-height: 480px;
  box-shadow: inset 0 0 60px rgba(0,0,0,.55), 0 20px 40px rgba(0,0,0,.4); display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.bj-label { font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,.75); text-align: center; }
.bj-total { display: inline-block; min-width: 34px; margin-left: 6px; padding: 2px 8px; border-radius: 12px; background: rgba(0,0,0,.45); color: #fff; font-weight: 800; letter-spacing: 0; }
.cards { display: flex; justify-content: center; min-height: 118px; padding-left: 26px; }
.card {
  width: 78px; height: 112px; border-radius: 9px; background: #fff; color: #111; margin-left: -26px; position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,.45); font-family: Georgia, serif; font-weight: 700;
}
.card.new { animation: dealIn .35s ease-out; }
@keyframes dealIn { from { transform: translate(120px, -160px) rotate(-20deg); opacity: 0; } }
.card.red { color: #c8102e; }
.card .tl, .card .br { position: absolute; font-size: 17px; line-height: 1; text-align: center; }
.card .tl { top: 6px; left: 6px; } .card .br { bottom: 6px; right: 6px; transform: rotate(180deg); }
.card .mid { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; }
.card.back { background: repeating-linear-gradient(45deg, #9b1c2c 0 6px, #7a1020 6px 12px); border: 5px solid #fff; }
.card.back::after { content: 'J'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); font-size: 30px; font-family: system-ui; font-weight: 900; }
.bj-msg { min-height: 30px; font-size: 18px; font-weight: 700; text-align: center; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.bj-hands { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; }
.bj-hand { padding: 10px 12px; border-radius: 16px; border: 2px solid transparent; transition: border-color .2s, background .2s; }
.bj-hand.active { border-color: var(--gold); background: rgba(245,197,66,.1); }
.bj-hand .hand-meta { display: flex; justify-content: center; gap: 8px; align-items: center; margin-top: 6px; font-size: 13px; }
.badge { padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 800; letter-spacing: .5px; }
.b-win, .b-blackjack { background: var(--win); color: #002914; } .b-lose, .b-bust { background: var(--lose); color: #2b0000; }
.b-push, .b-surrender { background: #cbd5e1; color: #111; }
.bet-spot {
  width: 110px; height: 110px; border-radius: 50%; border: 3px dashed rgba(255,255,255,.55); display: grid; place-items: center;
  text-align: center; font-weight: 800; font-size: 15px; color: rgba(255,255,255,.9);
}
.bet-spot small { display: block; font-size: 10px; font-weight: 600; letter-spacing: 1px; color: rgba(255,255,255,.6); }
.bj-controls { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 16px; }
.bj-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.bj-actions .btn { min-width: 100px; }
.shoe-info { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.shoe-bar { width: 90px; height: 6px; border-radius: 3px; background: var(--panel2); overflow: hidden; }
.shoe-bar i { display: block; height: 100%; background: var(--gold); }

/* ---------- Modal & toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fadeIn .2s; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; width: 100%; max-width: 520px; max-height: 88vh; display: flex; flex-direction: column; }
.modal-wide { max-width: 820px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-body { padding: 18px 20px 22px; overflow-y: auto; }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 8px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--gold); border-bottom-color: var(--gold); }
.wallet-bal { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.grid-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 14px; }
.field small { color: var(--muted); }
.hist-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hist-table td, .hist-table th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.hist-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--win); } .neg { color: var(--lose); }
.rates { font-size: 12px; color: var(--muted); margin-top: 10px; }
.note { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--muted); }

/* ---------- Auth, forms & account ---------- */
.small { font-size: 13px; }
.btn-block { width: 100%; }
.btn-lg { padding: 12px 26px; font-size: 17px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hero-side { text-align: right; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.gate { margin-top: 30px; }
.auth-form, .stack { display: flex; flex-direction: column; gap: 4px; }
.stack { max-width: 460px; align-items: flex-start; }
.stack .field, .stack .row3 { width: 100%; }
.field input, .field select { width: 100%; padding: 10px 12px; background: var(--bg2); }
label.field { color: var(--muted); font-size: 13px; }
label.field input, label.field select { color: var(--text); font-size: 15px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 4px 0 10px; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--gold); }
.form-error { color: var(--lose); font-size: 14px; min-height: 20px; margin-bottom: 6px; }
.row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.acct-btn { display: flex; align-items: center; gap: 8px; text-decoration: none; padding: 5px 12px 5px 6px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #2a1a00; background: linear-gradient(135deg, var(--gold), var(--gold2)); }
.acct-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.account { max-width: 860px; margin: 0 auto; }
.acct-tabs { overflow-x: auto; scrollbar-width: none; }
.acct-tabs button { white-space: nowrap; font: inherit; }
.card-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card-panel h2 { margin: 0 0 12px; font-size: 18px; }
.kv { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; width: 100%; }
.kv > span:first-child { color: var(--muted); }
.note { margin-bottom: 12px; }
.note.warn { border-color: #7a5a12; background: #2a2108; color: #f1d58a; }
.note a, .muted a, .hero a { color: var(--gold); }
.secret-key { font-family: ui-monospace, Consolas, monospace; font-size: 18px; letter-spacing: 1px; background: var(--bg2); border: 1px dashed var(--gold2); border-radius: 10px; padding: 12px 14px; user-select: all; word-break: break-all; }
.twofa-step { max-width: 460px; }
.table-scroll { overflow-x: auto; }
.hist-table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.hist-table th.num { text-align: right; }
.tabs button { font: inherit; }

#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; pointer-events: none; }
.toast { background: var(--panel2); border: 1px solid var(--line); padding: 10px 18px; border-radius: 10px; opacity: 0; transform: translateY(10px); transition: .25s; box-shadow: 0 8px 20px rgba(0,0,0,.4); font-size: 14px; }
.toast.show { opacity: 1; transform: none; }
.toast-error { border-color: #7f1d1d; background: #3b1010; }
.toast-win { border-color: #14532d; background: #0d2e1c; }

@media (max-width: 820px) {
  .roulette-wrap { grid-template-columns: minmax(0, 1fr); }
  .wheel-box canvas { max-width: 260px; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .nav { order: 3; flex-basis: 100%; }
  .wallet-box { margin-left: auto; }
  .balance { min-width: 0; }
  .spin-btn { width: 80px; height: 80px; }
  .card { width: 60px; height: 88px; margin-left: -28px; }
  .card .mid { font-size: 30px; } .card .tl, .card .br { font-size: 14px; }
  .cards { min-height: 92px; }
  .bj-felt { padding: 16px 10px 30px; border-width: 6px; }
}
@media (max-width: 480px) {
  .logo > span:last-child { display: none; }
  .topbar { flex-wrap: wrap; }
  .wallet-box { gap: 5px; flex: 1; justify-content: flex-end; min-width: 0; }
  .wallet-box select { padding: 6px 2px; font-size: 13px; }
  .balance { padding: 7px 8px; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #walletBtn { padding: 7px 10px; font-size: 13px; }
  .acct-name { display: none; }
  .acct-btn { padding: 5px; }
  .row3 { grid-template-columns: 1fr; }
  .hero-side { align-items: flex-start; text-align: left; }
  .stepper span { min-width: 84px; font-size: 14px; }
  .slot-controls { gap: 12px; }
  .reels, .reel { gap: 4px; }
  .machine { padding: 10px; }
  .linesvg { inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
}
