:root {
  --bg: #0b0f1e;
  --bg2: #111731;
  --panel: #161d3a;
  --panel2: #1d2650;
  --line: #2a3566;
  --text: #e8ecff;
  --muted: #8f9bc7;
  --gold: #fbbf24;
  --gold2: #f59e0b;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --felt: #0f5a3a;
  --felt2: #0a3f29;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --top: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Outfit', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #2a1f5c 0%, transparent 60%),
              radial-gradient(900px 500px at -10% 10%, #13315c 0%, transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select { font: inherit; color: var(--text); }
h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; font-weight: 700; letter-spacing: .2px;
  background: var(--panel2); border: 1px solid var(--line); transition: transform .08s, filter .15s, background .15s;
  user-select: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.btn-gold { background: linear-gradient(180deg, #fcd34d, #f59e0b); color: #2b1600; border: 0; box-shadow: 0 6px 18px rgba(245,158,11,.35); }
.btn-green { background: linear-gradient(180deg, #34d399, #16a34a); color: #03220f; border: 0; box-shadow: 0 6px 18px rgba(34,197,94,.3); }
.btn-red { background: linear-gradient(180deg, #f87171, #dc2626); color: #fff; border: 0; }
.btn-blue { background: linear-gradient(180deg, #60a5fa, #2563eb); color: #fff; border: 0; }
.btn-purple { background: linear-gradient(180deg, #a78bfa, #7c3aed); color: #fff; border: 0; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 12px; font-size: 14px; border-radius: 8px; }
.btn-lg { padding: 14px 22px; font-size: 17px; }
.btn-block { width: 100%; }
.input, select.input {
  width: 100%; padding: 11px 13px; border-radius: 10px; background: var(--bg2);
  border: 1px solid var(--line); outline: none; transition: border-color .15s;
}
.input:focus { border-color: var(--gold2); }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.seg { display: flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; padding: 8px 6px; border-radius: 8px; font-weight: 600; color: var(--muted); font-size: 14px; }
.seg button.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-size: 18px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--top);
  display: flex; align-items: center; gap: 18px; padding: 0 20px;
  background: rgba(11,15,30,.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; }
.logo-icon {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; font-size: 22px;
  background: linear-gradient(135deg, #fcd34d, #f59e0b); color: #2b1600;
}
.logo b { color: var(--gold); font-weight: 800; margin-left: 2px; }
.topnav { display: flex; gap: 4px; margin-left: 10px; }
.topnav a { padding: 8px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; }
.topnav a.on, .topnav a:hover { color: var(--text); background: var(--panel); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 11px;
  background: var(--bg2); border: 1px solid var(--line); font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums;
}
.balance.up { animation: flashUp .7s; }
.balance.down { animation: flashDown .5s; }
@keyframes flashUp { 30% { box-shadow: 0 0 0 3px rgba(34,197,94,.6); color: #86efac; } }
@keyframes flashDown { 30% { color: #fca5a5; } }
.coin {
  width: 18px; height: 18px; border-radius: 50%; display: inline-block; flex: none;
  background: radial-gradient(circle at 35% 35%, #fde68a, #f59e0b 60%, #b45309);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}
.bonus-btn {
  padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: 14px;
  background: linear-gradient(180deg, rgba(139,92,246,.35), rgba(139,92,246,.15)); border: 1px solid rgba(139,92,246,.6);
}
.bonus-btn.ready { animation: pulse 1.6s infinite; background: linear-gradient(180deg, #a78bfa, #7c3aed); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(139,92,246,.25); } }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-weight: 800; font-size: 14px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.bottomnav { display: none; }

/* ---------- Layout ---------- */
#view { max-width: 1400px; margin: 0 auto; padding: 22px 20px 40px; }
.panel { background: rgba(22,29,58,.85); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.panel-body { padding: 14px 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; }
.pos { color: #4ade80; }
.neg { color: #f87171; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 40px); display: grid; place-items: center; padding: 20px 0; }
.auth-card { width: min(440px, 100%); padding: 28px; }
.auth-hero { text-align: center; margin-bottom: 22px; }
.auth-hero .logo { justify-content: center; font-size: 30px; }
.auth-hero .logo-icon { width: 50px; height: 50px; font-size: 30px; }
.auth-hero p { color: var(--muted); margin: 10px 0 0; }
.fake-badge { display: inline-block; margin-top: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(34,197,94,.15); color: #86efac; font-size: 13px; font-weight: 700; border: 1px solid rgba(34,197,94,.35); }
.auth-card .seg { margin-bottom: 18px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.form-error { color: #fca5a5; font-size: 14px; min-height: 20px; margin-bottom: 8px; }
.auth-games { display: flex; justify-content: center; gap: 10px; margin-top: 18px; font-size: 24px; opacity: .8; }

/* ---------- Lobby ---------- */
.lobby { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 30px; margin-bottom: 20px;
  background: linear-gradient(120deg, #4c1d95 0%, #1e3a8a 55%, #0f766e 100%); box-shadow: var(--shadow);
}
.hero h1 { font-size: clamp(26px, 4vw, 40px); line-height: 1.1; }
.hero h1 span { color: var(--gold); }
.hero p { max-width: 520px; color: #dbe2ff; margin: 10px 0 18px; }
.hero-deco { position: absolute; right: -10px; top: -10px; font-size: 150px; opacity: .2; transform: rotate(15deg); pointer-events: none; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 14px; }
.section-title h2 { font-size: 20px; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 26px; }
.game-card {
  position: relative; border-radius: 18px; overflow: hidden; min-height: 210px; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 16px; padding-top: 150px; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; cursor: pointer;
  border: 1px solid rgba(255,255,255,.08);
}
.game-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.game-card .art { position: absolute; inset: 0 0 96px; display: grid; place-items: center; padding-top: 10px; }
.game-card .art svg { width: 62%; max-height: 120px; filter: drop-shadow(0 8px 16px rgba(0,0,0,.4)); transition: transform .3s; }
.game-card:hover .art svg { transform: scale(1.08) rotate(-3deg); }
.game-card h3 { position: relative; font-size: 20px; }
.game-card p { position: relative; margin: 2px 0 10px; font-size: 13px; color: rgba(255,255,255,.75); }
.game-card .gc-foot { position: relative; display: flex; align-items: center; justify-content: space-between; }
.live-dot { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; background: rgba(0,0,0,.35); padding: 4px 9px; border-radius: 999px; }
.live-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.g-blackjack { background: linear-gradient(160deg, #166534, #052e16); }
.g-roulette { background: linear-gradient(160deg, #991b1b, #2a0a0a); }
.g-baccarat { background: linear-gradient(160deg, #1e40af, #0c1640); }
.g-plinko { background: linear-gradient(160deg, #a21caf, #3b0764); }
.g-mines { background: linear-gradient(160deg, #0e7490, #082f49); }

.room-list { display: grid; gap: 10px; }
.room-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.room-item .ri-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; flex: none; }
.room-item .ri-name { font-weight: 700; }
.room-item .ri-meta { font-size: 13px; color: var(--muted); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-filter { padding: 7px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--muted); }
.chip-filter.on { color: #2b1600; background: var(--gold); border-color: var(--gold); }

.side { display: grid; gap: 16px; position: sticky; top: calc(var(--top) + 16px); }
.feed { max-height: 290px; overflow: auto; }
.feed-item { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 16px; font-size: 14px; border-bottom: 1px solid rgba(42,53,102,.5); animation: slideIn .35s; }
.feed-item .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.feed-item .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item .avatar { width: 22px; height: 22px; font-size: 11px; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--panel2); color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } }

.chat { display: flex; flex-direction: column; height: 360px; }
.chat-log { flex: 1; overflow: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.chat-msg { font-size: 14px; line-height: 1.35; word-wrap: break-word; }
.chat-msg b { margin-right: 6px; }
.chat-msg.system { color: var(--muted); font-size: 13px; font-style: italic; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form .input { padding: 9px 12px; }

.lb-mini li { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 14px; }
.lb-mini { list-style: none; margin: 0; padding: 6px 0; }
.rank { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--panel2); flex: none; }
.rank.r1 { background: linear-gradient(180deg, #fde68a, #f59e0b); color: #2b1600; }
.rank.r2 { background: linear-gradient(180deg, #e5e7eb, #9ca3af); color: #111; }
.rank.r3 { background: linear-gradient(180deg, #fdba74, #c2410c); color: #2b1100; }

/* ---------- Leaderboard page ---------- */
.lb-page { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; margin-bottom: 18px; }
.podium-spot { text-align: center; border-radius: 16px; padding: 16px 10px; background: var(--panel); border: 1px solid var(--line); }
.podium-spot .avatar { width: 56px; height: 56px; font-size: 22px; margin-bottom: 8px; }
.podium-spot.p1 { padding-top: 28px; background: linear-gradient(180deg, rgba(251,191,36,.25), var(--panel)); border-color: rgba(251,191,36,.6); }
.podium-spot.p2 { background: linear-gradient(180deg, rgba(229,231,235,.15), var(--panel)); }
.podium-spot.p3 { background: linear-gradient(180deg, rgba(234,88,12,.18), var(--panel)); }
.podium-spot .crown { font-size: 26px; display: block; margin-bottom: 2px; }
.podium-spot b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-spot .val { color: var(--gold); font-weight: 800; margin-top: 4px; }
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table td { padding: 11px 14px; border-top: 1px solid var(--line); }
.lb-table tr.me td { background: rgba(251,191,36,.08); }
.lb-table td.num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-table .who { display: flex; align-items: center; gap: 10px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.stat b { font-size: 19px; font-variant-numeric: tabular-nums; }

/* ---------- Room shell ---------- */
.room { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.room-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.room-head h1 { font-size: 22px; }
.room-head .players-pill { display: flex; align-items: center; }
.room-head .players-pill .avatar { width: 28px; height: 28px; margin-left: -8px; border: 2px solid var(--bg); font-size: 12px; }
.stage { border-radius: 20px; overflow: hidden; position: relative; }
.room-side { display: grid; gap: 14px; position: sticky; top: calc(var(--top) + 16px); }
.player-list { list-style: none; margin: 0; padding: 8px 0; max-height: 200px; overflow: auto; }
.player-list li { display: flex; align-items: center; gap: 10px; padding: 6px 16px; font-size: 14px; }
.player-list .avatar { width: 26px; height: 26px; font-size: 12px; }

.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; padding: 14px; background: rgba(11,15,30,.6); border-top: 1px solid rgba(255,255,255,.06); }
.timer-bar { height: 5px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; }
.timer-bar > div { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold2)); border-radius: 999px; transition: width .25s linear; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(0,0,0,.45); font-weight: 700; font-size: 14px; border: 1px solid rgba(255,255,255,.1); }

/* ---------- Chips ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.chip {
  --c: #64748b; width: 50px; height: 50px; border-radius: 50%; position: relative; display: grid; place-items: center;
  font-weight: 800; font-size: 12px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6);
  background: repeating-conic-gradient(from 0deg, #fff 0 10deg, var(--c) 10deg 45deg);
  box-shadow: 0 4px 10px rgba(0,0,0,.4), inset 0 0 0 2px rgba(0,0,0,.15); transition: transform .12s;
}
.chip::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--c); border: 2px dashed rgba(255,255,255,.55); }
.chip span { position: relative; }
.chip:hover { transform: translateY(-3px); }
.chip.on { transform: translateY(-5px); box-shadow: 0 0 0 3px var(--gold), 0 8px 18px rgba(0,0,0,.5); }
.chip.mini { width: 30px; height: 30px; font-size: 9px; pointer-events: none; }
.chip.mini::before { inset: 4px; border-width: 1px; }
.c1 { --c: #94a3b8; } .c5 { --c: #ef4444; } .c10 { --c: #3b82f6; } .c25 { --c: #16a34a; }
.c100 { --c: #111827; } .c500 { --c: #7c3aed; } .c1k { --c: #ea580c; } .c5k { --c: #db2777; } .c25k { --c: #ca8a04; }

/* ---------- Cards ---------- */
.cards { display: flex; justify-content: center; min-height: 92px; }
.card {
  width: 64px; height: 90px; border-radius: 8px; background: #fff; color: #111; position: relative; flex: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.4); font-weight: 800; margin-left: -26px;
  transform-style: preserve-3d;
}
.card:first-child { margin-left: 0; }
.card.red { color: #dc2626; }
.card .cr { position: absolute; top: 4px; left: 6px; font-size: 16px; line-height: 1; text-align: center; }
.card .cr i { display: block; font-style: normal; font-size: 13px; }
.card .cs { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; }
.card .cb { position: absolute; bottom: 4px; right: 6px; font-size: 16px; transform: rotate(180deg); line-height: 1; }
.card.back {
  background: repeating-linear-gradient(45deg, #7c3aed 0 6px, #6d28d9 6px 12px);
  border: 4px solid #fff;
}
.card.deal { animation: deal .42s cubic-bezier(.2,.8,.3,1) both; }
@keyframes deal { from { transform: translate(140px, -160px) rotate(25deg); opacity: 0; } }
.card.flip { animation: flip .5s both; }
@keyframes flip { 0% { transform: rotateY(90deg); } 100% { transform: rotateY(0); } }

/* ---------- Felt tables ---------- */
.felt {
  background: radial-gradient(ellipse at 50% 0%, #17845a 0%, var(--felt) 45%, var(--felt2) 100%);
  border: 10px solid #4a2b12; border-radius: 20px;
  box-shadow: inset 0 0 60px rgba(0,0,0,.5), var(--shadow);
}

/* Blackjack */
.bj-table { padding: 18px 14px 6px; min-height: 520px; display: flex; flex-direction: column; }
.bj-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bj-dealer { text-align: center; margin: 8px 0 16px; }
.bj-label { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 13px; color: rgba(255,255,255,.8); text-transform: uppercase; letter-spacing: 1px; }
.val { display: inline-block; min-width: 30px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.55); font-weight: 800; font-size: 14px; color: #fff; }
.bj-banner { text-align: center; font-size: 13px; color: rgba(255,255,255,.55); letter-spacing: 2px; text-transform: uppercase; margin: 6px 0 14px; }
.bj-banner b { display: block; color: rgba(251,191,36,.75); font-size: 15px; }
.bj-seats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: auto; align-items: end; }
.seat {
  border-radius: 14px; padding: 8px 4px 10px; text-align: center; min-height: 190px; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center; gap: 6px; border: 2px dashed rgba(255,255,255,.12); transition: border-color .2s, background .2s;
}
.seat.taken { border-style: solid; border-color: rgba(255,255,255,.1); background: rgba(0,0,0,.12); }
.seat.me { border-color: rgba(251,191,36,.55); }
.seat.turn { border-color: var(--gold); background: rgba(251,191,36,.12); box-shadow: 0 0 24px rgba(251,191,36,.25); }
.seat .who { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; max-width: 100%; }
.seat .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .avatar { width: 22px; height: 22px; font-size: 11px; }
.seat .bet-spot { width: 56px; height: 56px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); display: grid; place-items: center; position: relative; }
.seat .bet-amt { font-size: 12px; font-weight: 800; color: var(--gold); }
.seat .hands { display: flex; gap: 6px; justify-content: center; }
.seat .hand { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 3px; border-radius: 10px; }
.seat .hand.active { background: rgba(251,191,36,.18); }
.seat .card { width: 46px; height: 65px; margin-left: -30px; border-radius: 6px; }
.seat .card:first-child { margin-left: 0; }
.seat .card .cr { font-size: 12px; top: 3px; left: 4px; }
.seat .card .cr i { font-size: 10px; }
.seat .card .cs { font-size: 20px; }
.seat .card .cb { display: none; }
.result { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; }
.result.win, .result.blackjack { background: var(--green); color: #052e16; }
.result.lose, .result.bust { background: var(--red); color: #fff; }
.result.push { background: #94a3b8; color: #111; }
.seat .sit-btn { margin: auto 0; }
.ready-tag { font-size: 11px; color: #86efac; font-weight: 700; }

/* Roulette */
.rl-wrap { padding: 16px; }
.rl-top { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 18px; align-items: center; }
.wheel-box { position: relative; aspect-ratio: 1; width: 100%; max-width: 340px; margin: 0 auto; }
.wheel-box canvas { width: 100%; height: 100%; display: block; }
.wheel-pointer { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent; border-top: 20px solid var(--gold); filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); z-index: 2; }
.rl-info { display: grid; gap: 12px; }
.rl-result { display: flex; align-items: center; gap: 14px; }
.big-num { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; font-weight: 800; border: 4px solid rgba(255,255,255,.85); box-shadow: var(--shadow); }
.n-red { background: #c81e1e; } .n-black { background: #111827; } .n-green { background: #15803d; }
.history { display: flex; gap: 5px; flex-wrap: wrap; }
.history span { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.history span:first-child { box-shadow: 0 0 0 2px var(--gold); }
.board { display: grid; grid-template-columns: 1.1fr repeat(12, 1fr) 1.1fr; grid-template-rows: repeat(3, minmax(38px, auto)) auto auto; gap: 3px; margin-top: 16px; user-select: none; }
.bcell {
  position: relative; display: grid; place-items: center; font-weight: 800; border-radius: 6px; cursor: pointer;
  font-size: clamp(11px, 1.5vw, 16px); border: 1px solid rgba(255,255,255,.25); transition: filter .12s, box-shadow .12s; min-height: 38px;
}
.bcell:hover { filter: brightness(1.3); }
.bcell.win { box-shadow: 0 0 0 3px var(--gold), 0 0 20px var(--gold); z-index: 1; animation: winGlow 1s infinite alternate; }
@keyframes winGlow { to { box-shadow: 0 0 0 3px #fff, 0 0 30px var(--gold); } }
.bcell.zero { grid-row: 1 / span 3; grid-column: 1; }
.bcell.out { background: rgba(0,0,0,.2); font-size: clamp(10px, 1.3vw, 14px); padding: 8px 2px; }
.bcell.out.n-red { background: #c81e1e; }
.bcell.out.n-black { background: #111827; }
.bcell .stack { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; pointer-events: none; z-index: 2; }
.bcell .stack .chip.mini { box-shadow: 0 2px 6px rgba(0,0,0,.6); }
.bcell .others { position: absolute; top: 2px; right: 2px; display: flex; gap: 1px; pointer-events: none; }
.bcell .others .ochip { width: 15px; height: 15px; font-size: 8px; border-width: 1px; }
.rl-bets-sum { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }
.winners { display: flex; gap: 6px; flex-wrap: wrap; }
.winner-chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px 4px 4px; border-radius: 999px; background: rgba(34,197,94,.18); border: 1px solid rgba(34,197,94,.4); font-size: 13px; font-weight: 700; }
.winner-chip .avatar { width: 20px; height: 20px; font-size: 10px; }

/* Baccarat */
.bc-table { padding: 18px 14px; }
.bc-hands { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.bc-hand { text-align: center; padding: 12px; border-radius: 16px; background: rgba(0,0,0,.15); border: 2px solid transparent; transition: all .3s; }
.bc-hand.win { border-color: var(--gold); box-shadow: 0 0 30px rgba(251,191,36,.35); }
.bc-hand h3 { font-size: 15px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; display: flex; justify-content: center; gap: 10px; align-items: center; }
.bc-hand.p h3 { color: #93c5fd; } .bc-hand.b h3 { color: #fca5a5; }
.bc-hand .cards { min-height: 92px; }
.bc-hand .card.third { transform: rotate(90deg); margin-left: 0; margin-top: 10px; }
.bc-spots { display: grid; grid-template-columns: 1fr 1.4fr 1fr 1.4fr 1fr; gap: 8px; }
.bc-spot {
  position: relative; border-radius: 14px; padding: 16px 6px; text-align: center; cursor: pointer; transition: filter .12s, transform .1s;
  border: 2px solid rgba(255,255,255,.3); min-height: 104px; display: flex; flex-direction: column; justify-content: center; gap: 4px;
}
.bc-spot:hover { filter: brightness(1.2); }
.bc-spot:active { transform: scale(.98); }
.bc-spot b { font-size: 16px; text-transform: uppercase; letter-spacing: 1px; }
.bc-spot small { color: rgba(255,255,255,.7); font-weight: 600; }
.bc-spot .amt { font-size: 13px; font-weight: 800; color: var(--gold); min-height: 18px; }
.bc-spot .tot { font-size: 11px; color: rgba(255,255,255,.6); }
.bc-spot.sp-player { background: rgba(37,99,235,.35); border-color: #60a5fa; }
.bc-spot.sp-banker { background: rgba(220,38,38,.35); border-color: #f87171; }
.bc-spot.sp-tie { background: rgba(22,163,74,.35); border-color: #4ade80; }
.bc-spot.sp-pair { background: rgba(0,0,0,.2); }
.bc-spot.win { box-shadow: 0 0 0 3px var(--gold), 0 0 24px rgba(251,191,36,.5); }
.bead { display: grid; grid-auto-flow: column; grid-template-rows: repeat(6, 22px); grid-auto-columns: 22px; gap: 3px; overflow-x: auto; padding: 10px; background: #f8fafc; border-radius: 10px; margin-top: 16px; }
.bead span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; position: relative; }
.bead .o-player { background: #2563eb; } .bead .o-banker { background: #dc2626; } .bead .o-tie { background: #16a34a; }
.bead span.pp::after, .bead span.bp::before { content: ''; position: absolute; width: 6px; height: 6px; border-radius: 50%; border: 1px solid #fff; }
.bead span.pp::after { background: #2563eb; bottom: -1px; right: -1px; }
.bead span.bp::before { background: #dc2626; top: -1px; left: -1px; }
.bc-stats { display: flex; gap: 14px; justify-content: center; margin-top: 10px; font-size: 13px; font-weight: 700; flex-wrap: wrap; }

/* Plinko & Mines layout */
.solo { display: grid; grid-template-columns: 290px 1fr; background: linear-gradient(160deg, #1b1446, #0d1230); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.solo-controls { padding: 18px; background: rgba(0,0,0,.25); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.solo-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; min-height: 480px; }
.amount-row { display: flex; gap: 6px; }
.amount-row .input { flex: 1; min-width: 0; font-weight: 700; }
.amount-row .btn { padding: 8px 10px; }
.quick-amts { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.quick-amts button { flex: 1; padding: 5px 0; border-radius: 7px; background: var(--panel2); font-size: 12px; font-weight: 700; color: var(--muted); }
.plinko-canvas { width: 100%; max-width: 720px; aspect-ratio: 1 / .92; display: block; }
.recent-strip { display: flex; gap: 6px; overflow: hidden; margin-top: 10px; width: 100%; justify-content: center; flex-wrap: wrap; }
.mult-tag { padding: 4px 9px; border-radius: 7px; font-weight: 800; font-size: 12px; animation: slideIn .3s; }
.room-feed { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow: auto; }
.room-feed li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 16px; font-size: 13px; border-top: 1px solid rgba(42,53,102,.5); animation: slideIn .3s; }
.room-feed li .avatar { width: 20px; height: 20px; font-size: 10px; margin-right: 6px; vertical-align: middle; }

.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; width: min(100%, 480px); }
.tile {
  aspect-ratio: 1; border-radius: 12px; background: linear-gradient(180deg, #2c3a75, #222c5c);
  box-shadow: 0 5px 0 #151b3d, inset 0 1px 0 rgba(255,255,255,.12); transition: transform .1s, background .2s; display: grid; place-items: center;
}
.tile:not(:disabled):hover { transform: translateY(-3px); background: linear-gradient(180deg, #3a4a92, #2b376f); }
.tile:disabled { cursor: default; }
.tile.gem, .tile.mine, .tile.ghost-gem, .tile.ghost-mine { box-shadow: inset 0 0 0 2px rgba(255,255,255,.08); transform: translateY(4px); }
.tile.gem { background: radial-gradient(circle, #134e4a, #0b2a32); animation: pop .3s; }
.tile.mine { background: radial-gradient(circle, #7f1d1d, #3b0a0a); animation: shake .4s; }
.tile.ghost-gem, .tile.ghost-mine { opacity: .45; background: #141a38; }
.tile svg { width: 64%; height: 64%; }
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.1) translateY(4px); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px) translateY(4px); } 40%, 80% { transform: translateX(5px) translateY(4px); } }
.mines-info { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; justify-content: center; }
.mines-info .stat { min-width: 120px; text-align: center; }
.payout-box { margin-top: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.payout-box b { color: var(--gold); }

.big-win {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 10;
}
.big-win div {
  background: rgba(11,15,30,.88); border: 2px solid var(--gold); border-radius: 18px; padding: 18px 30px; text-align: center;
  animation: bigwin 2.2s both; box-shadow: 0 0 60px rgba(251,191,36,.4);
}
.big-win small { display: block; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; }
.big-win b { font-size: 34px; color: var(--gold); }
@keyframes bigwin { 0% { transform: scale(.4); opacity: 0; } 15% { transform: scale(1.08); opacity: 1; } 25% { transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px); } }

/* ---------- Toasts & modal ---------- */
#toasts { position: fixed; top: calc(var(--top) + 10px); right: 16px; z-index: 200; display: grid; gap: 8px; }
.toast { padding: 11px 16px; border-radius: 11px; background: var(--panel2); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 600; font-size: 14px; animation: toastIn .25s; max-width: 320px; }
.toast.error { border-color: rgba(239,68,68,.6); background: #3a1620; }
.toast.success { border-color: rgba(34,197,94,.6); background: #12301f; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }
.modal { position: fixed; inset: 0; z-index: 150; background: rgba(3,6,18,.7); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal-card { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }
.modal-card h2 { margin-bottom: 16px; }
@keyframes fade { from { opacity: 0; } }
.menu-list { display: grid; gap: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .lobby, .lb-page { grid-template-columns: 1fr; }
  .side { position: static; grid-template-columns: 1fr 1fr; }
  .side .chat-panel { grid-column: 1 / -1; }
  .room { grid-template-columns: 1fr; }
  .room-side { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  :root { --top: 56px; }
  .topnav, #userName, .bonus-btn #bonusText { display: none; }
  .topbar { padding: 0 12px; gap: 8px; }
  .logo-text { display: none; }
  #view { padding: 14px 12px calc(84px + env(safe-area-inset-bottom)); }
  .bottomnav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: rgba(11,15,30,.95); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
  .bottomnav a span { font-size: 20px; }
  .bottomnav a.on { color: var(--gold); }
  .side, .room-side { grid-template-columns: 1fr; }
  .solo { grid-template-columns: 1fr; }
  .solo-controls { border-right: 0; border-top: 1px solid var(--line); order: 2; }
  .solo-stage { min-height: 0; }
  .rl-top { grid-template-columns: 1fr; }
  .wheel-box { max-width: 260px; }
  .bj-seats { grid-template-columns: repeat(3, 1fr); }
  .seat { min-height: 160px; }
  .bc-spots { grid-template-columns: 1fr 1fr; }
  .bc-spot.sp-tie { grid-column: 1 / -1; order: -1; }
  .bc-spot.sp-player, .bc-spot.sp-banker { order: -2; }
  .podium .avatar { width: 42px; height: 42px; }
  .hero { padding: 22px; }
  .chat { height: 300px; }
}
@media (max-width: 560px) {
  .board { grid-template-columns: 1fr repeat(12, 1fr) 1fr; gap: 2px; }
  .bcell { min-height: 32px; border-radius: 4px; }
  .board .bcell .chip.mini { width: 22px; height: 22px; font-size: 7px; }
  .card { width: 52px; height: 74px; margin-left: -22px; }
  .card .cs { font-size: 24px; }
  .chip { width: 42px; height: 42px; font-size: 10px; }
  .chip::before { inset: 6px; }
  .bj-seats { grid-template-columns: repeat(2, 1fr); }
  .games { grid-template-columns: 1fr 1fr; }
  .game-card { min-height: 0; padding-top: 120px; }
  .game-card .art { inset: 0 0 70px; }
  .game-card p { display: none; }
  .balance { font-size: 15px; padding: 7px 10px; }
  .big-num { width: 60px; height: 60px; font-size: 26px; }
  .stage .controls { gap: 8px; }
}

/* ---------- New game cards ---------- */
.g-crazytime { background: linear-gradient(160deg, #e11d48, #4c0519); }
.g-crash { background: linear-gradient(160deg, #059669, #022c22); }
.g-dice { background: linear-gradient(160deg, #475569, #0f172a); }
.g-slots { background: linear-gradient(160deg, #f59e0b, #451a03); }

/* ---------- Slots ---------- */
.slot-hall { background: linear-gradient(160deg, #1b1446, #0d1230); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.slot-hall-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.slot-card {
  border-radius: 16px; padding: 14px; text-align: left; display: flex; flex-direction: column; gap: 4px; min-height: 150px;
  border: 2px solid var(--accent); box-shadow: 0 8px 22px rgba(0,0,0,.4), inset 0 0 30px rgba(0,0,0,.25); transition: transform .15s;
}
.slot-card:hover { transform: translateY(-4px) scale(1.02); }
.slot-card b { font-size: 17px; margin-top: auto; }
.slot-card small { color: rgba(255,255,255,.75); font-size: 12px; }
.slot-card-syms { display: flex; gap: 6px; font-size: 32px; justify-content: center; padding: 8px 0; filter: drop-shadow(0 4px 6px rgba(0,0,0,.4)); }
.cabinet {
  --cell: 90px; position: relative; border-radius: 24px; padding: 16px;
  background: linear-gradient(170deg, var(--t1), var(--t2)); border: 3px solid var(--accent);
  box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 35%, transparent), var(--shadow);
}
.cabinet-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cabinet-top h2 { flex: 1; text-align: center; font-size: clamp(18px, 3vw, 26px); color: var(--accent); text-shadow: 0 2px 10px rgba(0,0,0,.5); letter-spacing: .5px; }
.reels-wrap { position: relative; background: rgba(0,0,0,.45); border-radius: 14px; padding: 8px; box-shadow: inset 0 4px 20px rgba(0,0,0,.6); }
.reels { display: grid; gap: 6px; justify-content: center; }
.reel { height: calc(var(--cell) * 3); overflow: hidden; border-radius: 10px; background: linear-gradient(180deg, #e5e7eb, #fff 20%, #fff 80%, #d1d5db); position: relative; }
.reel::before, .reel::after { content: ''; position: absolute; left: 0; right: 0; height: 18px; z-index: 1; pointer-events: none; }
.reel::before { top: 0; background: linear-gradient(rgba(0,0,0,.25), transparent); }
.reel::after { bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.25)); }
.strip { will-change: transform; }
.sym { height: var(--cell); display: grid; place-items: center; font-size: calc(var(--cell) * .55); line-height: 1; user-select: none; }
.sym.special.wild { background: radial-gradient(circle, rgba(250,204,21,.45), transparent 70%); }
.sym.special.scatter { background: radial-gradient(circle, rgba(236,72,153,.35), transparent 70%); }
.sym.win { animation: symWin .7s ease-in-out infinite alternate; }
@keyframes symWin { from { transform: scale(1); } to { transform: scale(1.18); filter: drop-shadow(0 0 10px gold); } }
.line-overlay { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); pointer-events: none; overflow: visible; }
.line-overlay polyline { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: .9; filter: drop-shadow(0 0 4px rgba(0,0,0,.8)); }
.slot-win { text-align: center; font-size: 20px; font-weight: 800; min-height: 34px; margin: 12px 0 6px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.slot-win b { color: var(--accent); font-size: 26px; }
.cabinet-controls { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; background: rgba(0,0,0,.35); border-radius: 14px; padding: 12px; }
.spin-btn {
  width: 76px; height: 76px; border-radius: 50%; font-size: 38px; font-weight: 800; color: #1a1205;
  background: radial-gradient(circle at 35% 30%, #fff7d6, var(--accent) 45%, color-mix(in srgb, var(--accent) 60%, #000));
  box-shadow: 0 6px 0 rgba(0,0,0,.4), 0 0 24px color-mix(in srgb, var(--accent) 60%, transparent); transition: transform .1s;
}
.spin-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0,0,0,.4); }
.spin-btn:disabled { animation: spinIcon .8s linear infinite; opacity: .85; }
@keyframes spinIcon { to { transform: rotate(360deg); } }
.paytable td { padding: 7px 8px; }
.pt-sym { font-size: 26px; width: 40px; }

/* ---------- Dice ---------- */
.dice-stage { gap: 18px; padding: 30px 24px; }
.dice-result { font-size: clamp(48px, 9vw, 84px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.dice-result.win { color: #4ade80; text-shadow: 0 0 30px rgba(74,222,128,.5); }
.dice-result.lose { color: #f87171; }
.dice-bar { position: relative; width: 100%; max-width: 640px; height: 54px; display: flex; align-items: center; }
.dice-track { position: absolute; left: 0; right: 0; height: 14px; border-radius: 999px; box-shadow: 0 0 0 6px rgba(255,255,255,.06); }
.dice-range { position: relative; width: 100%; appearance: none; -webkit-appearance: none; background: transparent; margin: 0; z-index: 2; }
.dice-range::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; border-radius: 9px; background: #e2e8f0; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.5); cursor: grab; }
.dice-range::-moz-range-thumb { width: 30px; height: 30px; border-radius: 9px; background: #e2e8f0; border: 3px solid #fff; cursor: grab; }
.dice-marker { position: absolute; top: -40px; transform: translateX(-50%); transition: left .35s cubic-bezier(.2,.8,.3,1.1); opacity: 0; z-index: 3; pointer-events: none; }
.dice-marker.show { opacity: 1; }
.dice-marker span { display: block; padding: 5px 9px; border-radius: 8px; font-weight: 800; font-size: 14px; background: #fff; color: #111; }
.dice-marker.win span { background: #22c55e; color: #052e16; } .dice-marker.lose span { background: #ef4444; color: #fff; }
.dice-scale { width: 100%; max-width: 640px; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 700; }

/* ---------- Crash ---------- */
.crash-graph { position: relative; width: 100%; height: clamp(260px, 42vw, 420px); background: radial-gradient(ellipse at 30% 100%, rgba(74,222,128,.08), transparent 60%), #0b1024; border-radius: 16px; border: 1px solid var(--line); overflow: hidden; }
.crash-graph.crashed { background: radial-gradient(ellipse at 50% 50%, rgba(239,68,68,.15), transparent 60%), #0b1024; }
.crash-canvas { width: 100%; height: 100%; display: block; }
.crash-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.crash-mult { font-size: clamp(44px, 8vw, 78px); font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 4px 20px rgba(0,0,0,.6); }
.crash-graph.crashed .crash-mult { color: #f87171; }
.crash-sub { font-weight: 700; color: var(--muted); font-size: 16px; }

/* ---------- Crazy Time ---------- */
.ct-studio { padding: 16px; border-radius: 20px; background: radial-gradient(ellipse at 50% 0%, #6d28d9 0%, #2e1065 45%, #0f0726 100%); border: 1px solid rgba(250,204,21,.35); box-shadow: var(--shadow); }
.ct-topslot { display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 12px; background: rgba(0,0,0,.45); border: 2px solid #facc15; font-size: 14px; }
.ct-topslot .muted { font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.ct-topmult { display: inline-block; padding: 2px 9px; border-radius: 7px; background: linear-gradient(180deg, #fde047, #f59e0b); color: #1a1205; font-weight: 800; }
.ct-main { display: grid; grid-template-columns: minmax(240px, 400px) 1fr; gap: 18px; align-items: center; }
.ct-wheel-box { width: 100%; max-width: 400px; margin: 0 auto; aspect-ratio: 1; position: relative; }
.ct-wheel-box.big { max-width: 440px; }
.ct-wheel { width: 100%; height: 100%; display: block; }
.ct-side { display: grid; gap: 14px; }
.ct-result { font-size: 18px; }
.ct-landed { display: inline-block; padding: 10px 18px; border-radius: 12px; font-size: 22px; font-weight: 800; box-shadow: 0 6px 20px rgba(0,0,0,.4); animation: pop .4s; }
.ct-history { display: flex; gap: 5px; flex-wrap: wrap; }
.ct-history span { min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.ct-spots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.ct-spot {
  position: relative; border-radius: 14px; padding: 12px 6px; text-align: center; cursor: pointer; min-height: 86px;
  display: flex; flex-direction: column; justify-content: center; gap: 2px; transition: transform .1s, filter .15s;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 80%, #fff 10%), color-mix(in srgb, var(--c) 70%, #000)); border: 2px solid rgba(255,255,255,.35);
}
.ct-spot:hover { filter: brightness(1.15); } .ct-spot:active { transform: scale(.97); }
.ct-spot b { font-size: 16px; } .ct-spot small { opacity: .8; font-weight: 700; }
.ct-spot .amt { font-size: 13px; font-weight: 800; color: #fde047; min-height: 17px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.ct-spot .tot { font-size: 11px; opacity: .75; }
.ct-spot.win { box-shadow: 0 0 0 3px #fde047, 0 0 26px rgba(253,224,71,.6); }
.ct-spot.top::after { content: 'TOP'; position: absolute; top: -8px; right: -6px; background: #fde047; color: #111; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; }
.ct-bonus { margin-top: 16px; padding: 16px; border-radius: 16px; background: rgba(0,0,0,.35); border: 2px solid rgba(250,204,21,.5); animation: pop .4s; }
.ct-bonus h3 { text-align: center; font-size: 22px; margin-bottom: 12px; color: #fde047; }
.cf-row { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 4vw, 40px); perspective: 800px; }
.cf-side { width: 110px; padding: 16px 8px; border-radius: 14px; text-align: center; border: 3px solid transparent; transition: all .3s; }
.cf-side small { display: block; font-weight: 800; letter-spacing: 1px; opacity: .85; }
.cf-side b { font-size: 30px; }
.cf-side.red { background: #b91c1c; } .cf-side.blue { background: #1d4ed8; }
.cf-side.win { border-color: #fde047; transform: scale(1.12); box-shadow: 0 0 30px rgba(253,224,71,.6); }
.coin3d { width: 110px; height: 110px; position: relative; transform-style: preserve-3d; }
.coin3d .face { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 800; backface-visibility: hidden; border: 6px solid #fde047; box-shadow: inset 0 0 20px rgba(0,0,0,.4); }
.coin3d .red { background: #dc2626; } .coin3d .blue { background: #2563eb; transform: rotateY(180deg); }
@keyframes coinflip-red { 0% { transform: rotateY(0) translateY(0); } 50% { transform: rotateY(1800deg) translateY(-50px); } 100% { transform: rotateY(3600deg) translateY(0); } }
@keyframes coinflip-blue { 0% { transform: rotateY(0) translateY(0); } 50% { transform: rotateY(1800deg) translateY(-50px); } 100% { transform: rotateY(3780deg) translateY(0); } }
.pach-canvas { width: 100%; display: block; }
.hunt-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; max-width: 640px; margin: 0 auto; }
.hunt-tile { aspect-ratio: 1.2; border-radius: 8px; background: linear-gradient(180deg, #15803d, #14532d); font-size: clamp(12px, 2.4vw, 20px); font-weight: 800; border: 2px solid rgba(255,255,255,.15); position: relative; }
.hunt-tile:not(:disabled):hover { filter: brightness(1.25); }
.hunt-tile.mine { border-color: #fde047; box-shadow: 0 0 0 2px #fde047, 0 0 16px rgba(253,224,71,.6); }
.hunt-tile[data-others]:not([data-others=""])::after { content: attr(data-others); position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; border-radius: 8px; background: #fff; color: #111; font-size: 10px; display: grid; place-items: center; }
.hunt-tile.flip { animation: flip .4s; background: linear-gradient(180deg, #334155, #1e293b); }
.hunt-tile.hot { background: linear-gradient(180deg, #ca8a04, #713f12); }
.flap-btn { border: 2px solid var(--c); }
.flap-btn.on { background: var(--c); color: #111; }
.ct-crazy-out { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.ct-flap-res { padding: 6px 12px; border-radius: 10px; border: 2px solid var(--c); font-weight: 800; }
.ct-flap-res.mine { background: var(--c); color: #111; transform: scale(1.1); }

@media (max-width: 820px) {
  .ct-main { grid-template-columns: 1fr; }
  .ct-wheel-box { max-width: 320px; }
  .ct-spots { grid-template-columns: repeat(2, 1fr); }
  .cabinet { padding: 10px; }
  .spin-btn { width: 64px; height: 64px; font-size: 30px; }
  .hunt-grid { grid-template-columns: repeat(6, 1fr); }
  .cf-side { width: 84px; } .cf-side b { font-size: 22px; } .coin3d { width: 80px; height: 80px; }
}
.fs-badge { text-align: center; margin: -4px 0 10px; padding: 8px 12px; border-radius: 12px; font-weight: 700; background: linear-gradient(90deg, #db2777, #7c3aed); box-shadow: 0 0 24px rgba(219,39,119,.5); animation: pulse 1.6s infinite; }
.fs-badge b { color: #fde047; font-size: 18px; }
.cabinet.free { box-shadow: 0 0 60px rgba(219,39,119,.6), var(--shadow); }

/* ---------- Slot bonus games ---------- */
.slot-feature { align-self: flex-start; margin-top: 6px; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.4); border: 1px solid var(--accent); }
.bonus-overlay { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 10px; background: rgba(3,6,18,.78); backdrop-filter: blur(3px); border-radius: 22px; animation: fade .3s; }
.bonus-card { width: min(640px, 100%); max-height: 100%; overflow: auto; text-align: center; padding: 18px; border-radius: 18px; background: linear-gradient(170deg, #1e1b4b, #0b1024); border: 3px solid var(--accent); box-shadow: 0 0 50px color-mix(in srgb, var(--accent) 45%, transparent); }
.bonus-card h2 { color: var(--accent); font-size: 26px; margin-bottom: 4px; }
.bonus-total { font-size: 18px; margin-bottom: 12px; }
.bonus-total b { color: #fde047; font-size: 26px; }
.bonus-foot { margin-top: 14px; min-height: 48px; }
.pick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pick-tile { aspect-ratio: 1.3; border-radius: 12px; font-size: clamp(22px, 5vw, 34px); font-weight: 800; background: linear-gradient(180deg, #92400e, #451a03); border: 2px solid rgba(253,224,71,.5); transition: transform .12s; }
.pick-tile.jp { background: linear-gradient(180deg, #991b1b, #450a0a); }
.pick-tile:not(:disabled):hover { transform: translateY(-3px) scale(1.04); }
.pick-tile.open { animation: flip .4s; font-size: clamp(16px, 3.6vw, 24px); color: #fff; }
.pick-tile.ok { background: linear-gradient(180deg, #15803d, #14532d); }
.pick-tile.hot { background: linear-gradient(180deg, #eab308, #a16207); color: #111; }
.pick-tile.end { background: linear-gradient(180deg, #475569, #1e293b); font-size: clamp(12px, 2.6vw, 16px); }
.pick-tile.dim { opacity: .35; }
.bonus-wheel-box { width: min(340px, 80vw); aspect-ratio: 1; margin: 0 auto; }
.bonus-wheel { width: 100%; height: 100%; display: block; }
.hw-info { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; font-size: 16px; }
.hw-info b { color: #fde047; font-size: 22px; }
.hw-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.hw-cell { aspect-ratio: 1; border-radius: 10px; background: #111827; border: 2px solid #334155; display: grid; place-items: center; font-weight: 800; font-size: clamp(14px, 3vw, 20px); }
.hw-cell.spin { animation: hwspin .5s; }
@keyframes hwspin { 50% { background: #1e293b; transform: scaleY(.85); } }
.hw-cell.coin { background: radial-gradient(circle, #fde047, #ca8a04); color: #422006; border-color: #fef08a; animation: pop .35s; }
.hw-cell.big { background: radial-gradient(circle, #f472b6, #9d174d); color: #fff; }
.tr-board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 10px; }
.tr-sq { position: relative; padding: 10px 2px 6px; border-radius: 9px; background: #1e293b; border: 2px solid #334155; font-weight: 800; font-size: 14px; transition: all .25s; }
.tr-sq small { position: absolute; top: 1px; left: 4px; font-size: 9px; opacity: .5; }
.tr-sq.x2 { background: #7c2d12; border-color: #fb923c; }
.tr-sq.end { grid-column: span 1; background: #14532d; border-color: #4ade80; }
.tr-sq.visited { background: #334155; }
.tr-sq.here { border-color: #fde047; box-shadow: 0 0 16px rgba(253,224,71,.7); transform: scale(1.08); background: #854d0e; }
.die { font-size: 34px; line-height: 1; }
.jp-meter { display: grid; gap: 4px; margin-bottom: 10px; }
.jp-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 6px 12px; border-radius: 9px; background: color-mix(in srgb, var(--c) 25%, #0b1024); border: 1px solid var(--c); }
.jp-row b { text-align: left; color: var(--c); } .jp-row i { font-style: normal; color: var(--c); letter-spacing: 2px; }

/* ---------- Player rail (who is at the table) ---------- */
.rail { display: flex; gap: 8px; overflow-x: auto; padding: 10px 4px 6px; margin-top: 12px; border-top: 1px dashed rgba(255,255,255,.15); scrollbar-width: thin; }
.rail-seat { position: relative; flex: none; width: 92px; text-align: center; padding: 8px 4px; border-radius: 12px; background: rgba(0,0,0,.3); border: 2px solid transparent; outline: none; }
.rail-seat.me { border-color: rgba(251,191,36,.6); }
.rail-seat.betting { background: rgba(0,0,0,.45); }
.rail-seat.pulse { animation: railPulse .6s; }
@keyframes railPulse { 40% { transform: translateY(-4px); box-shadow: 0 0 0 3px rgba(251,191,36,.5); } }
.rail-av .avatar { width: 38px; height: 38px; font-size: 17px; box-shadow: 0 0 0 3px var(--c); }
.rail-name { font-size: 12px; font-weight: 700; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-bet { font-size: 13px; font-weight: 800; color: #fde047; }
.rail-keys { display: flex; flex-direction: column; gap: 1px; margin-top: 3px; font-size: 10px; color: rgba(255,255,255,.7); }
.rail-keys span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-res { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; white-space: nowrap; animation: pop .4s; }
.rail-res.win { background: #22c55e; color: #052e16; } .rail-res.lose { background: #7f1d1d; color: #fecaca; }
.ochip { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 9px; font-weight: 800; color: #fff; background: var(--c); border: 2px dashed rgba(255,255,255,.7); box-shadow: 0 2px 4px rgba(0,0,0,.5); margin-left: -4px; }
.mychip { display: inline-block; margin-left: 3px; padding: 1px 6px; border-radius: 999px; font-size: 10px; font-weight: 800; background: #fde047; color: #111; box-shadow: 0 2px 5px rgba(0,0,0,.5); }
.spot-chips { position: absolute; bottom: 3px; left: 0; right: 0; display: flex; justify-content: center; align-items: center; pointer-events: none; z-index: 2; }
.c25k { --c: #ca8a04; } .c100k { --c: #0d9488; } .c500k { --c: #4f46e5; } .c1m { --c: #be123c; }
.c5m { --c: #a21caf; } .c25m { --c: #15803d; } .c100m { --c: #0f172a; box-shadow: 0 0 0 2px #fde047, 0 4px 10px rgba(0,0,0,.4); }

/* ---------- New game cards ---------- */
.g-sicbo { background: linear-gradient(160deg, #b91c1c, #3f0d0d); }
.g-dragontiger { background: linear-gradient(160deg, #c2410c, #1c0a00); }
.g-horses { background: linear-gradient(160deg, #65a30d, #1a2e05); }
.g-coinflip { background: linear-gradient(160deg, #ca8a04, #3b2a00); }
.g-hilo { background: linear-gradient(160deg, #0369a1, #082f49); }
.g-keno { background: linear-gradient(160deg, #7c3aed, #2e1065); }
.g-limbo { background: linear-gradient(160deg, #0891b2, #083344); }
.g-tower { background: linear-gradient(160deg, #9f1239, #2a0410); }
.g-videopoker { background: linear-gradient(160deg, #1d4ed8, #0b1640); }
.game-card .art text { font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }

/* ---------- Sic Bo ---------- */
.sb-table { padding: 16px; }
.sb-top { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.sb-shaker { display: flex; align-items: center; gap: 14px; }
.sb-dice { display: flex; gap: 8px; }
.sb-die { font-size: clamp(46px, 8vw, 64px); line-height: 1; background: #fff; color: #b91c1c; border-radius: 12px; width: 1.1em; height: 1.1em; display: grid; place-items: center; box-shadow: 0 6px 14px rgba(0,0,0,.45); }
.sb-dice.shaking .sb-die { animation: shake .25s infinite; }
.sb-sum { font-size: 20px; font-weight: 800; }
.sb-board { display: grid; gap: 4px; }
.sb-row { display: grid; gap: 4px; }
.sb-row.r5 { grid-template-columns: 1.4fr 1fr 1.2fr 1fr 1.4fr; }
.sb-row.r12 { grid-template-columns: repeat(12, 1fr); }
.sb-row.r14 { grid-template-columns: repeat(14, 1fr); }
.sb-row.r6 { grid-template-columns: repeat(6, 1fr); }
.sb-cell { position: relative; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; padding: 8px 2px 20px; text-align: center; cursor: pointer; background: rgba(0,0,0,.18); transition: filter .12s; min-width: 0; }
.sb-cell:hover { filter: brightness(1.3); }
.sb-cell b { display: block; font-size: clamp(11px, 1.6vw, 17px); white-space: nowrap; overflow: hidden; }
.sb-cell small { font-size: 10px; opacity: .7; white-space: nowrap; }
.sb-cell.big { background: rgba(185,28,28,.35); }
.sb-cell.single b { font-size: clamp(22px, 3.4vw, 34px); }
.sb-cell.win { box-shadow: 0 0 0 3px var(--gold), 0 0 18px var(--gold); z-index: 1; }

/* ---------- Generic spot ---------- */
.spot { position: relative; }

/* ---------- Dragon Tiger ---------- */
.dt-table { padding: 16px; }
.dt-hands { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin: 10px 0 16px; }
.dt-side { text-align: center; padding: 14px; border-radius: 16px; border: 2px solid transparent; transition: all .3s; }
.dt-side.dragon { background: rgba(220,38,38,.2); } .dt-side.tiger { background: rgba(234,179,8,.18); }
.dt-side h3 { margin-bottom: 10px; letter-spacing: 1px; }
.dt-side.win { border-color: var(--gold); box-shadow: 0 0 30px rgba(251,191,36,.4); }
.dt-side .card { width: 84px; height: 118px; } .dt-side .card .cs { font-size: 40px; } .dt-side .card .cr { font-size: 20px; }
.dt-vs { font-size: 26px; font-weight: 800; color: var(--gold); }
.dt-spots { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 8px; }
.dt-spot { position: relative; padding: 16px 6px 26px; border-radius: 14px; text-align: center; cursor: pointer; border: 2px solid rgba(255,255,255,.3); display: flex; flex-direction: column; gap: 3px; }
.dt-spot b { font-size: 18px; text-transform: uppercase; } .dt-spot small { opacity: .75; font-size: 11px; }
.dt-spot .amt { color: #fde047; font-weight: 800; font-size: 13px; min-height: 16px; }
.dt-spot.dragon { background: rgba(220,38,38,.35); border-color: #f87171; }
.dt-spot.tiger { background: rgba(202,138,4,.35); border-color: #facc15; }
.dt-spot.tie { background: rgba(22,163,74,.3); border-color: #4ade80; }
.dt-spot.win { box-shadow: 0 0 0 3px var(--gold), 0 0 24px rgba(251,191,36,.5); }
.dt-road { margin-top: 12px; }

/* ---------- Horses ---------- */
.hr-wrap { padding: 16px; border-radius: 20px; background: linear-gradient(180deg, #14532d, #052e16); border: 1px solid #166534; box-shadow: var(--shadow); }
.hr-track { display: grid; gap: 4px; padding: 10px; border-radius: 14px; background: repeating-linear-gradient(90deg, #a16207 0 40px, #92400e 40px 80px); border: 4px solid #fff; }
.hr-lane { position: relative; height: 46px; border-bottom: 2px dashed rgba(255,255,255,.35); }
.hr-lane:last-child { border-bottom: 0; }
.hr-finish { position: absolute; right: 0; top: 0; bottom: 0; width: 10px; background: repeating-linear-gradient(0deg, #fff 0 8px, #111 8px 16px); }
.hr-horse { position: absolute; left: 0; top: 2px; display: flex; align-items: center; gap: 2px; will-change: left; }
.hr-emoji { font-size: 38px; transform: scaleX(-1); display: inline-block; filter: drop-shadow(0 3px 3px rgba(0,0,0,.5)); }
.hr-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--c, #334155); color: #fff; font-weight: 800; font-size: 13px; border: 2px solid #fff; }
.hr-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 14px; }
.hr-card { position: relative; padding: 10px 4px 24px; border-radius: 12px; text-align: center; cursor: pointer; background: rgba(0,0,0,.3); border: 2px solid var(--c); display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .1s; }
.hr-card:hover { transform: translateY(-2px); }
.hr-card b { font-size: 14px; } .hr-card small { color: #fde047; font-weight: 800; font-size: 15px; }
.hr-card .amt { font-size: 12px; font-weight: 800; color: #fde047; min-height: 15px; }
.hr-card.win { box-shadow: 0 0 0 3px var(--gold), 0 0 24px rgba(251,191,36,.5); }
.hr-place { position: absolute; top: -10px; right: -4px; font-size: 22px; }
.hr-wrap .history span { color: #fff; }

/* ---------- Coinflip ---------- */
.cf-pick { flex: 1; padding: 12px 6px; border-radius: 12px; background: var(--panel2); border: 2px solid var(--line); font-weight: 800; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cf-pick span { font-size: 28px; }
.cf-pick.on { border-color: var(--gold); background: rgba(251,191,36,.15); }
.cf-list { display: grid; gap: 10px; width: 100%; }
.cf-card { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.3); border: 1px solid var(--line); animation: slideIn .3s; }
.cf-player { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 12px; border: 2px solid transparent; transition: all .3s; text-align: center; min-width: 0; }
.cf-player .avatar { width: 42px; height: 42px; font-size: 18px; }
.cf-player b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cf-player.empty { opacity: .5; }
.cf-player.win { border-color: #4ade80; background: rgba(34,197,94,.15); }
.cf-player.lose { opacity: .45; }
.cf-side-tag { font-size: 12px; font-weight: 700; color: var(--muted); }
.cf-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cf-coin { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; background: radial-gradient(circle at 35% 30%, #fef08a, #ca8a04); border: 4px solid #fde047; box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.cf-coin.flipping { animation: cfspin .35s linear infinite; }
@keyframes cfspin { 0% { transform: rotateY(0) translateY(0); } 50% { transform: rotateY(180deg) translateY(-12px); } 100% { transform: rotateY(360deg) translateY(0); } }

/* ---------- Hi-Lo ---------- */
.hilo-mult { font-size: 18px; margin-bottom: 14px; } .hilo-mult b { color: #fde047; font-size: 26px; }
.hilo-card .card { width: 120px; height: 168px; margin: 0; border-radius: 12px; }
.hilo-card .card .cr { font-size: 26px; top: 8px; left: 10px; } .hilo-card .card .cr i { font-size: 20px; }
.hilo-card .card .cs { font-size: 64px; } .hilo-card .card .cb { font-size: 26px; bottom: 8px; right: 10px; }
.hilo-hist { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
.hilo-h { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.card.mini { width: 36px; height: 50px; margin: 0; border-radius: 5px; } .card.mini .cr { font-size: 11px; top: 2px; left: 3px; } .card.mini .cr i { font-size: 9px; } .card.mini .cs { font-size: 16px; } .card.mini .cb { display: none; }
.hilo-tag { font-size: 12px; font-weight: 800; } .hilo-tag.ok { color: #4ade80; } .hilo-tag.bad { color: #f87171; } .hilo-tag.skip { color: var(--muted); }

/* ---------- Keno ---------- */
.keno-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; width: 100%; max-width: 620px; }
.keno-tile { aspect-ratio: 1; border-radius: 10px; font-weight: 800; font-size: clamp(13px, 2.4vw, 18px); background: #1e293b; border: 2px solid #334155; transition: transform .1s, background .15s; }
.keno-tile:hover { transform: translateY(-2px); }
.keno-tile.picked { background: #6d28d9; border-color: #a78bfa; }
.keno-tile.drawn { background: #334155; border-color: #94a3b8; animation: pop .3s; }
.keno-tile.drawn.hit { background: radial-gradient(circle, #22c55e, #15803d); border-color: #bbf7d0; color: #052e16; }
.keno-pays { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.keno-pay { min-width: 52px; padding: 5px 6px; border-radius: 8px; background: #1e293b; text-align: center; }
.keno-pay small { display: block; color: var(--muted); font-size: 10px; } .keno-pay b { font-size: 13px; }
.keno-pay.on { background: #22c55e; color: #052e16; } .keno-pay.on small { color: #052e16; }

/* ---------- Limbo ---------- */
.limbo-num { font-size: clamp(56px, 11vw, 110px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -2px; }
.limbo-num.win { color: #4ade80; text-shadow: 0 0 30px rgba(74,222,128,.5); } .limbo-num.lose { color: #f87171; }
.limbo-rocket { font-size: 54px; animation: float 2.4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-6deg); } }

/* ---------- Tower ---------- */
.tower { display: grid; gap: 6px; width: 100%; max-width: 520px; }
.tw-row { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center; opacity: .55; transition: opacity .2s; }
.tw-row.current, .tw-row.passed { opacity: 1; }
.tw-mult { font-weight: 800; font-size: 13px; text-align: right; color: var(--muted); }
.tw-row.current .tw-mult { color: #fde047; }
.tw-tiles { display: grid; gap: 6px; }
.tw-tile { height: 44px; border-radius: 10px; background: linear-gradient(180deg, #3f3f46, #27272a); border: 2px solid #52525b; font-size: 24px; }
.tw-row.current .tw-tile:not(:disabled) { background: linear-gradient(180deg, #be123c, #881337); border-color: #fda4af; box-shadow: 0 0 14px rgba(244,63,94,.4); }
.tw-row.current .tw-tile:not(:disabled):hover { transform: translateY(-2px); }
.tw-tile.egg { background: radial-gradient(circle, #15803d, #052e16); border-color: #4ade80; animation: pop .3s; }
.tw-tile.dragon { background: radial-gradient(circle, #b91c1c, #450a0a); border-color: #f87171; animation: shake .4s; }
.tw-tile.ghost { opacity: .4; }

/* ---------- Video Poker ---------- */
.vp-stage { gap: 14px; }
.vp-pays { width: 100%; max-width: 520px; border-collapse: collapse; font-size: 14px; background: rgba(0,0,0,.3); border-radius: 12px; overflow: hidden; }
.vp-pays td { padding: 5px 12px; border-top: 1px solid rgba(255,255,255,.06); }
.vp-pays td.num { text-align: right; font-weight: 700; }
.vp-pays tr.on { background: #ca8a04; color: #111; } .vp-pays tr.on .muted { color: #111; }
.vp-pays tr.maybe { background: rgba(202,138,4,.2); }
.vp-cards { display: flex; gap: 10px; justify-content: center; }
.vp-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; transition: transform .15s; }
.vp-slot .card { width: clamp(54px, 13vw, 96px); height: clamp(76px, 18vw, 134px); margin: 0; }
.vp-slot .card .cs { font-size: clamp(24px, 5vw, 44px); }
.vp-slot.held { transform: translateY(-10px); } .vp-slot.held .card { box-shadow: 0 0 0 3px #fde047, 0 8px 18px rgba(0,0,0,.5); }
.vp-hold { font-size: 12px; font-weight: 800; color: #fde047; min-height: 16px; letter-spacing: 1px; }
.vp-msg { font-size: 18px; font-weight: 700; min-height: 26px; }

@media (max-width: 820px) {
  .sb-row.r12 { grid-template-columns: repeat(6, 1fr); }
  .sb-row.r14 { grid-template-columns: repeat(7, 1fr); }
  .sb-row.r5 { grid-template-columns: 1fr 1fr; } .sb-row.r5 > :nth-child(3) { grid-column: 1 / -1; order: -1; }
  .hr-cards { grid-template-columns: repeat(3, 1fr); }
  .dt-side .card { width: 64px; height: 90px; }
  .keno-grid { gap: 4px; }
  .cf-card { grid-template-columns: 1fr auto 1fr; padding: 8px; gap: 4px; }
  .hr-emoji { font-size: 30px; } .hr-lane { height: 38px; }
}

/* ---------- Levels, XP ---------- */
.lvl { display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 5px; border-radius: 6px; font-size: 10px; font-weight: 800; margin-right: 5px; vertical-align: middle; color: #111; }
.lvl.bronze { background: linear-gradient(180deg, #fdba74, #c2410c); }
.lvl.silver { background: linear-gradient(180deg, #f1f5f9, #94a3b8); }
.lvl.gold { background: linear-gradient(180deg, #fde68a, #d97706); }
.lvl.plat { background: linear-gradient(180deg, #a5f3fc, #0891b2); }
.lvl.diamond { background: linear-gradient(135deg, #f0abfc, #818cf8, #67e8f9); box-shadow: 0 0 8px rgba(167,139,250,.8); }
.user-btn { position: relative; overflow: hidden; }
.xpbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.1); }
.xpbar > i { display: block; height: 100%; background: linear-gradient(90deg, #a78bfa, #22d3ee); transition: width .4s; }
.xp-big { height: 10px; border-radius: 999px; background: var(--bg2); overflow: hidden; border: 1px solid var(--line); }
.xp-big > i { display: block; height: 100%; background: linear-gradient(90deg, #a78bfa, #22d3ee); }

/* ---------- Win banners & announcements ---------- */
#banners { position: fixed; top: calc(var(--top) + 10px); left: 50%; transform: translateX(-50%); z-index: 210; display: grid; gap: 8px; width: min(520px, calc(100% - 24px)); pointer-events: none; }
.wbanner { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; box-shadow: 0 12px 34px rgba(0,0,0,.5); animation: bannerIn .45s cubic-bezier(.2,.9,.3,1.3); color: #111; }
.wbanner.big { background: linear-gradient(90deg, #fde047, #f59e0b); }
.wbanner.mega { color: #fff; background: linear-gradient(90deg, #db2777, #7c3aed, #2563eb, #db2777); background-size: 300% 100%; animation: bannerIn .45s cubic-bezier(.2,.9,.3,1.3), megaFlow 2s linear infinite; border: 2px solid #fde047; }
.wbanner.announce { color: #fff; background: linear-gradient(90deg, #0f766e, #1d4ed8); border: 2px solid #67e8f9; }
.wbanner.level { color: #111; background: linear-gradient(90deg, #a78bfa, #22d3ee); }
.wbanner .wb-kind { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; opacity: .85; }
.wbanner .wb-main { font-weight: 800; font-size: 15px; line-height: 1.25; }
.wbanner .wb-amt { font-size: 20px; font-weight: 800; }
.wbanner .avatar { width: 36px; height: 36px; font-size: 16px; flex: none; box-shadow: 0 0 0 2px #fff; }
.wbanner .btn { margin-left: auto; flex: none; }
.wbanner.out { animation: bannerOut .35s forwards; }
@keyframes bannerIn { from { opacity: 0; transform: translateY(-30px) scale(.9); } }
@keyframes bannerOut { to { opacity: 0; transform: translateY(-20px); } }
@keyframes megaFlow { to { background-position: 300% 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 220; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: confettiFall linear forwards; }
@keyframes confettiFall { to { top: 105%; transform: rotate(720deg) translateX(40px); } }

/* ---------- Friends / tournaments / admin pages ---------- */
.page-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.friend { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); }
.friend:first-child { border-top: 0; }
.friend .avatar { width: 36px; height: 36px; font-size: 16px; }
.friend .dot { width: 10px; height: 10px; border-radius: 50%; background: #475569; flex: none; }
.friend .dot.on { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.friend .where { font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { padding: 8px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; color: var(--muted); }
.tabs button.on { background: var(--gold); color: #2b1600; border-color: var(--gold); }
.countdown { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--gold); }
.prize-row { display: flex; gap: 8px; flex-wrap: wrap; }
.prize-row span { padding: 6px 10px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-size: 12px; color: var(--muted); padding: 8px 10px; text-transform: uppercase; letter-spacing: .5px; }
.admin-table td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.admin-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.pill.on { background: #166534; color: #bbf7d0; } .pill.off { background: #334155; color: #cbd5e1; } .pill.bad { background: #7f1d1d; color: #fecaca; }
.notif-dot { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 800; margin-left: 4px; }
@media (max-width: 1100px) { .page-grid { grid-template-columns: 1fr; } }
.stat b { overflow-wrap: anywhere; font-size: clamp(14px, 1.6vw, 19px); }

/* ---------- Game cards (batch 3) ---------- */
.g-holdem { background: linear-gradient(160deg, #047857, #022c22); }
.g-wheel { background: linear-gradient(160deg, #0d9488, #042f2e); }
.g-scratch { background: linear-gradient(160deg, #db2777, #500724); }
.g-bingo { background: linear-gradient(160deg, #2563eb, #172554); }
.g-andarbahar { background: linear-gradient(160deg, #b45309, #2a1503); }

/* ---------- Auto-bet panel ---------- */
.ab-body { margin-top: 10px; padding: 12px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.ab-body .field { margin-bottom: 8px; }
.ab-body .input { padding: 8px 10px; font-size: 14px; }
.ab-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; }
.ab-grid:nth-of-type(3), .ab-grid:nth-of-type(4) { grid-template-columns: 1fr 1fr; }
.ab-status { margin-top: 8px; color: var(--muted); line-height: 1.5; }
.cabinet-auto { margin-top: 10px; }
.cabinet-auto .ab-body { background: rgba(0,0,0,.4); }

/* ---------- Hold'em ---------- */
.pk-wrap { padding: 10px; border-radius: 22px; background: radial-gradient(ellipse at 50% 40%, #1e293b, #0b1024); border: 1px solid var(--line); }
.pk-table { position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 420px; }
.pk-felt { position: absolute; inset: 14% 9%; border-radius: 999px; background: radial-gradient(ellipse at 50% 35%, #15803d, #0f5a3a 55%, #073922); border: 12px solid #5b3413; box-shadow: inset 0 0 50px rgba(0,0,0,.55), 0 14px 40px rgba(0,0,0,.5); display: grid; place-items: center; }
.pk-center { text-align: center; display: grid; gap: 8px; justify-items: center; }
.pk-phase { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.65); }
.pk-board { min-height: 76px; gap: 4px; }
.pk-board .card { margin-left: 0; width: 52px; height: 74px; }
.pk-board .card .cs { font-size: 24px; }
.pk-pot { font-size: 15px; } .pk-pot b { color: #fde047; }
.pk-result { font-size: 14px; font-weight: 700; color: #fde047; min-height: 18px; }
.pk-seat { position: absolute; transform: translate(-50%, -50%); width: 150px; display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 2; transition: opacity .3s; }
.pk-seat.empty { width: auto; }
.pk-seat.folded { opacity: .45; }
.pk-plate { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(11,15,30,.92); border: 2px solid var(--line); min-width: 130px; }
.pk-seat.me .pk-plate { border-color: rgba(251,191,36,.7); }
.pk-seat.turn .pk-plate { border-color: #fde047; box-shadow: 0 0 20px rgba(253,224,71,.55); }
.pk-seat.winner .pk-plate { border-color: #4ade80; box-shadow: 0 0 24px rgba(74,222,128,.6); }
.pk-plate .avatar { width: 34px; height: 34px; font-size: 15px; }
.pk-info { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.pk-info b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 92px; }
.pk-info span { font-size: 13px; color: #fde047; font-weight: 800; }
.pk-dealer { position: absolute; right: -8px; top: -8px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #111; font-weight: 800; font-size: 12px; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.pk-hole { min-height: 0; }
.pk-hole .card { width: 40px; height: 56px; margin-left: -14px; border-radius: 5px; }
.pk-hole .card:first-child { margin-left: 0; }
.pk-hole .card .cr { font-size: 11px; top: 2px; left: 3px; } .pk-hole .card .cr i { font-size: 9px; } .pk-hole .card .cs { font-size: 18px; } .pk-hole .card .cb { display: none; }
.pk-seat.me .pk-hole .card { width: 52px; height: 74px; } .pk-seat.me .pk-hole .card .cs { font-size: 24px; }
.pk-last { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #334155; text-transform: uppercase; }
.pk-last.fold { background: #7f1d1d; } .pk-last.raise, .pk-last.bet { background: #b45309; } .pk-last.call, .pk-last.check { background: #1d4ed8; } .pk-last.allin { background: #7c3aed; }
.pk-bet { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: #fde047; }
.pk-bet .chip.mini { width: 18px; height: 18px; }
.pk-hand { font-size: 11px; font-weight: 800; color: #bbf7d0; }
.pk-won { font-size: 13px; font-weight: 800; color: #4ade80; animation: pop .4s; }
.pk-timer { width: 110px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.15); overflow: hidden; }
.pk-timer i { display: block; height: 100%; background: #fde047; animation: pkTimer linear forwards; transform-origin: left; }
@keyframes pkTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.pk-actions { width: 100%; display: grid; gap: 10px; }
.pk-raise { display: grid; gap: 6px; max-width: 520px; margin: 0 auto; width: 100%; }
.pk-range { flex: 1; accent-color: #fbbf24; }
.pk-raise-val { width: 130px; flex: none; }

/* ---------- Wheel ---------- */
.wh-box { position: relative; width: min(460px, 100%); aspect-ratio: 1; }
.wh-canvas { width: 100%; height: 100%; display: block; }
.wh-result { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(30px, 6vw, 52px); font-weight: 800; pointer-events: none; }
.wh-legend { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.wh-legend span { padding: 4px 10px; border-radius: 8px; font-weight: 800; font-size: 13px; background: color-mix(in srgb, var(--c) 30%, #0b1024); border: 1px solid var(--c); }
.wh-legend small { color: var(--muted); font-weight: 600; }

/* ---------- Scratch cards ---------- */
.sc-types { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sc-type { padding: 8px 4px; border-radius: 10px; font-size: 22px; display: flex; flex-direction: column; align-items: center; border: 2px solid transparent; }
.sc-type small { font-size: 11px; font-weight: 700; }
.sc-type.on { border-color: #fde047; }
.sc-ticket { width: min(380px, 100%); padding: 16px; border-radius: 18px; box-shadow: 0 14px 40px rgba(0,0,0,.5); border: 3px dashed rgba(255,255,255,.4); }
.sc-title { text-align: center; font-size: 22px; font-weight: 800; margin-bottom: 10px; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.sc-scratch { position: relative; border-radius: 12px; overflow: hidden; touch-action: none; }
.sc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #fff; padding: 8px; border-radius: 12px; }
.sc-cell { aspect-ratio: 1; display: grid; place-items: center; font-size: clamp(30px, 8vw, 44px); background: #f8fafc; border-radius: 10px; color: #94a3b8; font-weight: 800; }
.sc-cell.win { background: #fef08a; box-shadow: inset 0 0 0 3px #f59e0b; }
.sc-cover { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.sc-msg { margin-top: 14px; font-size: 18px; font-weight: 700; text-align: center; min-height: 26px; }
.sc-pays { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.sc-pays span { padding: 4px 9px; border-radius: 8px; background: var(--bg2); font-size: 14px; }
.sc-pays b { color: #fde047; }

/* ---------- Andar Bahar ---------- */
.ab-table { padding: 16px; }
.ab-joker { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 10px; }
.ab-joker .card { box-shadow: 0 0 0 3px #fde047, 0 6px 18px rgba(0,0,0,.5); }
.ab-side { padding: 10px; border-radius: 14px; margin-bottom: 8px; border: 2px solid transparent; transition: all .3s; }
.ab-side.andar { background: rgba(37,99,235,.22); } .ab-side.bahar { background: rgba(220,38,38,.22); }
.ab-side.win { border-color: #fde047; box-shadow: 0 0 24px rgba(253,224,71,.4); }
.ab-side h3 { font-size: 13px; letter-spacing: 2px; margin-bottom: 6px; }
.ab-row { display: flex; flex-wrap: wrap; min-height: 64px; }
.ab-row .card { width: 42px; height: 60px; margin-left: -18px; } .ab-row .card:first-child { margin-left: 0; }
.ab-row .card .cs { font-size: 18px; } .ab-row .card .cb { display: none; } .ab-row .card .cr { font-size: 11px; }
.ab-spots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.ab-ranges { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 8px; }
.ab-spot { position: relative; padding: 12px 4px 22px; border-radius: 12px; text-align: center; cursor: pointer; border: 2px solid rgba(255,255,255,.3); display: flex; flex-direction: column; gap: 2px; background: rgba(0,0,0,.2); }
.ab-spot.andar { background: rgba(37,99,235,.4); border-color: #60a5fa; } .ab-spot.bahar { background: rgba(220,38,38,.4); border-color: #f87171; }
.ab-spot b { font-size: 15px; } .ab-spot.range b { font-size: 12px; } .ab-spot small { color: #fde047; font-weight: 800; }
.ab-spot .amt { font-size: 12px; font-weight: 800; color: #fde047; min-height: 15px; }
.ab-spot.win { box-shadow: 0 0 0 3px var(--gold), 0 0 20px rgba(251,191,36,.5); }

/* ---------- Bingo ---------- */
.bg-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.bg-ball { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; font-weight: 800; color: #111; background: radial-gradient(circle at 35% 30%, #fff, #fde047 55%, #ca8a04); box-shadow: 0 8px 20px rgba(0,0,0,.5); line-height: 1; flex: none; }
.bg-ball small { display: block; font-size: 14px; margin-bottom: -10px; }
.bg-ball.pop { animation: pop .4s; }
.bg-recent { display: flex; gap: 6px; flex-wrap: wrap; }
.bg-recent span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #1e293b; border: 2px solid #475569; }
.bg-board { display: grid; gap: 3px; margin-bottom: 14px; }
.bg-brow { display: grid; grid-template-columns: 26px repeat(15, 1fr); gap: 3px; }
.bg-brow b { display: grid; place-items: center; color: #fde047; }
.bg-brow span { text-align: center; font-size: 11px; font-weight: 700; padding: 3px 0; border-radius: 5px; background: #111827; color: #64748b; }
.bg-brow span.on { background: #2563eb; color: #fff; }
.bg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.bg-card { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 8px; border-radius: 12px; background: #f8fafc; color: #111; }
.bg-card b { text-align: center; color: #2563eb; font-size: 15px; }
.bg-card span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 6px; background: #e2e8f0; font-weight: 800; font-size: 14px; transition: all .2s; }
.bg-card span.hit { background: radial-gradient(circle, #f43f5e, #be123c); color: #fff; }
.bg-card span.free { background: #fde047; color: #111; }

@media (max-width: 820px) {
  .pk-table { aspect-ratio: auto; height: 520px; min-height: 0; }
  .pk-felt { inset: 16% 4%; border-width: 8px; border-radius: 120px; }
  .pk-seat { width: 108px; }
  .pk-plate { min-width: 0; padding: 4px 8px 4px 4px; gap: 5px; }
  .pk-plate .avatar { width: 26px; height: 26px; font-size: 12px; }
  .pk-info b { max-width: 64px; font-size: 11px; } .pk-info span { font-size: 11px; }
  .pk-board .card { width: 38px; height: 54px; } .pk-board .card .cs { font-size: 17px; } .pk-board .card .cr { font-size: 11px; }
  .pk-board .card .cb { display: none; }
  .ab-ranges { grid-template-columns: repeat(3, 1fr); }
  .bg-brow { grid-template-columns: 18px repeat(15, 1fr); gap: 2px; } .bg-brow span { font-size: 8px; }
}

/* ---------- PWA / standalone ---------- */
.topbar { padding-top: env(safe-area-inset-top); height: calc(var(--top) + env(safe-area-inset-top)); }
.standalone body { overscroll-behavior-y: none; }
.standalone #toasts, .standalone #banners { top: calc(var(--top) + env(safe-area-inset-top) + 10px); }
.install-btn { background: linear-gradient(180deg, #fde68a, #f59e0b); border: 0; }
@media (max-width: 820px) {
  .topbar { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .room-head h1 { font-size: 18px; }
  .room-head { gap: 8px; }
  .section-title h2 { font-size: 18px; }
  .controls { padding: 10px; }
  .solo-controls { padding: 14px; }
  .modal-card { max-height: calc(100vh - env(safe-area-inset-top) - 32px); }
}
@media (max-width: 820px) {
  .pk-seat:not(.me) .pk-hole .card { width: 30px; height: 42px; margin-left: -12px; }
  .pk-seat:not(.me) .pk-hole .card .cs { font-size: 13px; }
  .pk-seat:not(.me) .pk-hole .card .cr { font-size: 9px; }
  .pk-seat.me .pk-hole .card { width: 44px; height: 62px; }
  .pk-last { font-size: 9px; padding: 1px 6px; }
  .pk-bet { font-size: 11px; }
}
