:root {
  --bg: #07080c;
  --bg-2: #0c0e14;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --surface-3: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #eef0f6;
  --muted: #8189a0;
  --faint: #545b70;
  --violet: #8b5cf6;
  --fuchsia: #d946ef;
  --cyan: #22d3ee;
  --green: #19e68c;
  --green-deep: #0c9f5f;
  --red: #ff4d6a;
  --gold: #fbbf24;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  --grad-green: linear-gradient(135deg, #19e68c 0%, #0ea5a4 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .7);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Outfit", "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14.5px/1.55 var(--font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(139, 92, 246, .16), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgba(217, 70, 239, .09), transparent 60%),
    radial-gradient(800px 600px at 60% 110%, rgba(34, 211, 238, .06), transparent 60%);
}
a { color: #b69cff; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; margin: 0; }
h1 { font-size: 1.9rem; font-weight: 800; }
h2 { font-size: 1.05rem; font-weight: 700; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .92em; }
b { font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.gold { color: var(--gold); }
.warn { color: var(--gold); }
.hidden { display: none !important; }
.win { color: var(--green) !important; }
.lose { color: var(--red) !important; }
::selection { background: rgba(139, 92, 246, .45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #1d2130; border-radius: 10px; border: 2px solid var(--bg); }

/* ================================================================ Header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 68px; padding: 0 22px;
  background: rgba(7, 8, 12, .72); backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 12px; color: var(--text); }
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 1.05rem;
  box-shadow: 0 0 24px rgba(168, 85, 247, .55), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.logo-text { font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.top-right { display: flex; align-items: center; gap: 14px; }
.account { display: flex; align-items: center; gap: 10px; }

.status { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status.on::before { background: var(--green); box-shadow: 0 0 0 3px rgba(25, 230, 140, .15), 0 0 10px var(--green); }
.status.off::before { background: var(--red); }

.wallet-pill {
  display: flex; align-items: center; border-radius: 12px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line-2);
}
.wallet-pill .amount {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text);
}
.coin-ico {
  width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff1b8, #fbbf24 55%, #b7791f);
  color: #7a4d00; font-size: .65rem; font-weight: 900;
}
.wallet-pill .plus {
  align-self: stretch; display: grid; place-items: center; padding: 0 12px;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 1.1rem;
}
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 6px 4px 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.user-chip img { width: 30px; height: 30px; border-radius: 8px; image-rendering: pixelated; }
.user-chip .name { font-weight: 700; font-size: .9rem; }
.admin-btn { background: rgba(255, 77, 106, .12); border-color: rgba(255, 77, 106, .35); color: #ffb3c0; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--muted);
  cursor: pointer; display: grid; place-items: center; font-size: 1rem;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ================================================================ Layout */
.layout { position: relative; z-index: 1; display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 68px); }
.side {
  position: sticky; top: 68px; height: calc(100vh - 68px); overflow-y: auto;
  padding: 18px 14px; display: flex; flex-direction: column; gap: 3px;
  border-right: 1px solid var(--line); background: rgba(7, 8, 12, .4);
}
.side-label { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 14px 12px 6px; }
.side-label:first-child { padding-top: 0; }
.side a {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px;
  color: var(--muted); font-weight: 600; transition: background .15s, color .15s;
}
.side a .ni {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); font-size: 1rem; transition: all .15s;
}
.side a:hover { color: var(--text); background: var(--surface); }
.side a.active { color: var(--text); background: linear-gradient(90deg, rgba(139, 92, 246, .16), rgba(139, 92, 246, 0)); }
.side a.active .ni { background: var(--grad); border-color: transparent; box-shadow: 0 0 18px rgba(168, 85, 247, .45); }
.side-foot { margin-top: auto; padding: 16px 12px 0; font-size: .74rem; color: var(--faint); }

main { padding: 30px 34px 60px; max-width: 1240px; width: 100%; }

/* ================================================================ Panels */
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
}
.panel + .panel, .stack > * + * { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-bottom: 18px; }
.cards > .panel, .steps > .panel, .game > .panel { margin-top: 0; }

.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.page-head p { margin: 2px 0 0; }
.page-icon {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 1.6rem;
  background: var(--grad); box-shadow: 0 10px 30px -8px rgba(168, 85, 247, .7);
}

/* ================================================================ Spiel-Layout */
.game { display: grid; grid-template-columns: 330px 1fr; gap: 18px; align-items: stretch; }
.controls { display: flex; flex-direction: column; gap: 16px; }
.stage {
  position: relative; min-height: 440px; overflow: hidden;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(139, 92, 246, .12), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01));
}
.stage.center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; }
.stage.flash-win { animation: flashWin .9s ease-out; }
.stage.flash-lose { animation: flashLose .9s ease-out; }
@keyframes flashWin { 0% { box-shadow: inset 0 0 0 2px var(--green), 0 0 60px -10px var(--green); } 100% { box-shadow: var(--shadow); } }
@keyframes flashLose { 0% { box-shadow: inset 0 0 0 2px var(--red), 0 0 60px -10px var(--red); } 100% { box-shadow: var(--shadow); } }

/* ================================================================ Formulare */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span, .label { font-size: .78rem; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; }
input, select {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 11px 13px; font: inherit; font-weight: 600; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, .2); }
input:disabled, select:disabled { opacity: .55; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }

.bet-input {
  display: flex; align-items: center; background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 4px; transition: border-color .15s, box-shadow .15s;
}
.bet-input:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, .2); }
.bet-input .cur { padding: 0 4px 0 9px; color: var(--gold); font-weight: 800; }
.bet-input input { border: 0; background: transparent; box-shadow: none !important; padding: 8px 6px; min-width: 0; flex: 1; }
.bet-input button {
  background: var(--surface-2); color: var(--text); border: 0; border-radius: 7px;
  padding: 7px 10px; margin-left: 4px; font: inherit; font-weight: 700; font-size: .82rem; cursor: pointer;
}
.bet-input button:hover { background: var(--surface-3); }
.bet-input.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 77, 106, .15); }
.bet-hint { font-size: .8rem; font-weight: 600; color: var(--red); min-height: 0; }
.bet-hint:empty { display: none; }
.bet-hint a { color: #ffb3c0; text-decoration: underline; }
.row { display: flex; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 10px 16px; font: inherit; font-weight: 700; cursor: pointer;
  transition: transform .08s, filter .15s, box-shadow .15s, background .15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 26px -8px rgba(168, 85, 247, .8), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.cash { background: var(--grad-green); border-color: transparent; color: #03281a; box-shadow: 0 8px 26px -8px rgba(25, 230, 140, .8), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 11px; font-size: .82rem; }
.btn.big { padding: 15px; font-size: 1.02rem; border-radius: 12px; font-family: var(--display); letter-spacing: .01em; }

.seg { display: flex; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 4px; gap: 4px; }
.seg button {
  flex: 1; background: none; border: 0; color: var(--muted); padding: 9px; border-radius: 7px;
  font: inherit; font-weight: 700; cursor: pointer; transition: all .15s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.stat span { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.info { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; font-size: .88rem; color: var(--muted); }
.info b { color: var(--text); }

.cmd {
  display: flex; align-items: center; gap: 10px; margin: 12px 0;
  background: var(--bg-2); border: 1px solid rgba(139, 92, 246, .45); border-radius: 12px; padding: 10px 10px 10px 14px;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .08);
}
.cmd code { flex: 1; font-size: 1.02rem; font-weight: 700; color: #cbb8ff; word-break: break-all; }

.result { font-family: var(--display); font-size: 1.5rem; font-weight: 800; min-height: 2.2rem; text-align: center; }
.result small { display: block; font-family: var(--font); font-size: .82rem; font-weight: 600; color: var(--muted); }

/* ================================================================ Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: 10px 12px; white-space: nowrap; }
th { color: var(--faint); font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--line); }
tbody tr { border-bottom: 1px solid rgba(255, 255, 255, .035); }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--surface-2); }
.badge.ok { background: rgba(25, 230, 140, .12); color: var(--green); }
.badge.wait { background: rgba(251, 191, 36, .12); color: var(--gold); }
.badge.back { background: rgba(255, 77, 106, .12); color: var(--red); }
.player { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.player img { width: 22px; height: 22px; border-radius: 6px; image-rendering: pixelated; }
.empty { text-align: center; padding: 26px; color: var(--faint); }

/* ================================================================ Live-Feed */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 8px; box-shadow: 0 0 0 0 rgba(255, 77, 106, .6); animation: pulse 1.8s infinite; vertical-align: middle; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(255, 77, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 106, 0); } }
.feed-row-new { animation: rowIn .5s ease-out; }
@keyframes rowIn { from { background: rgba(139, 92, 246, .18); } }

/* ================================================================ Hero / Lobby */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 46px 42px; margin-bottom: 26px;
  background:
    radial-gradient(500px 260px at 85% 20%, rgba(217, 70, 239, .35), transparent 70%),
    radial-gradient(600px 300px at 10% 110%, rgba(34, 211, 238, .18), transparent 70%),
    linear-gradient(135deg, #1a1130 0%, #0e0f1a 60%);
  border: 1px solid rgba(168, 85, 247, .25);
  box-shadow: var(--shadow);
}
.hero::after {
  content: "◆"; position: absolute; right: 40px; top: 50%; transform: translateY(-50%) rotate(-12deg);
  font-size: 12rem; line-height: 1; color: rgba(255, 255, 255, .04); pointer-events: none;
}
.eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #c4a8ff; margin: 0 0 10px; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.05; font-weight: 900; max-width: 640px; }
.grad-text { background: linear-gradient(90deg, #c4b5fd, #f0abfc 50%, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #b3b9cc; max-width: 520px; margin: 14px 0 24px; font-size: 1.02rem; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-stats { display: flex; gap: 30px; margin-top: 30px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-family: var(--display); font-size: 1.4rem; }
.hero-stats span { font-size: .78rem; color: var(--muted); }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.game-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-bottom: 26px; }
.game-card {
  position: relative; overflow: hidden; border-radius: 18px; padding: 18px; min-height: 200px;
  display: flex; flex-direction: column; justify-content: flex-end; color: #fff;
  border: 1px solid rgba(255, 255, 255, .1); cursor: pointer;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s;
}
.game-card:hover { transform: translateY(-5px); box-shadow: 0 24px 40px -18px var(--glow, rgba(139, 92, 246, .8)); }
.game-card .gc-icon { position: absolute; top: 14px; right: 12px; font-size: 4.6rem; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .4)); transition: transform .3s; }
.game-card:hover .gc-icon { transform: rotate(-8deg) scale(1.08); }
.game-card .gc-name { font-family: var(--display); font-size: 1.35rem; font-weight: 800; }
.game-card .gc-desc { font-size: .82rem; color: rgba(255, 255, 255, .72); }
.game-card .gc-tag { position: absolute; top: 14px; left: 14px; font-size: .7rem; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, .3); backdrop-filter: blur(6px); }
.game-card, .page-icon.colored { background: linear-gradient(150deg, var(--c1), var(--c2)); }
.game-card { --glow: var(--c1); }
.page-icon.colored { box-shadow: 0 10px 30px -8px var(--c1); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 26px; }
.step .num { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); font-family: var(--display); font-weight: 800; margin-bottom: 12px; }
.step p { margin: 6px 0 0; }

/* ================================================================ Coinflip */
.coin-wrap { perspective: 900px; }
.coin { width: 180px; height: 180px; position: relative; transform-style: preserve-3d; transition: transform 1.6s cubic-bezier(.15, .85, .25, 1); }
.coin .face {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-size: 3.6rem; font-weight: 900; backface-visibility: hidden;
}
.coin .heads {
  background: radial-gradient(circle at 32% 28%, #fff4c2, #fbbf24 45%, #b45309 100%); color: #7c4a03;
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .15), inset 0 0 0 12px rgba(120, 53, 15, .35), 0 20px 60px rgba(251, 191, 36, .35);
}
.coin .tails {
  transform: rotateY(180deg);
  background: radial-gradient(circle at 32% 28%, #ffffff, #cbd5e1 45%, #64748b 100%); color: #334155;
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .2), inset 0 0 0 12px rgba(51, 65, 85, .35), 0 20px 60px rgba(203, 213, 225, .25);
}
.coin-shadow { width: 140px; height: 18px; border-radius: 50%; background: radial-gradient(rgba(0, 0, 0, .6), transparent 70%); margin-top: -10px; }
.side-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side-pick button {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; cursor: pointer;
  color: var(--muted); font: inherit; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: all .15s;
}
.side-pick button .mini { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 900; }
.side-pick button[data-side=heads] .mini { background: radial-gradient(circle at 32% 28%, #fff4c2, #fbbf24 50%, #b45309); color: #7c4a03; }
.side-pick button[data-side=tails] .mini { background: radial-gradient(circle at 32% 28%, #fff, #cbd5e1 50%, #64748b); color: #334155; }
.side-pick button.on { border-color: var(--violet); color: var(--text); box-shadow: 0 0 0 3px rgba(139, 92, 246, .2); }

/* ================================================================ Dice */
.dice-roll {
  font-family: var(--display); font-size: 5.6rem; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1;
  text-shadow: 0 0 40px rgba(139, 92, 246, .4);
}
.dice-roll.win { text-shadow: 0 0 40px rgba(25, 230, 140, .5); }
.dice-roll.lose { text-shadow: 0 0 40px rgba(255, 77, 106, .5); }
.dice-bar { width: 100%; max-width: 600px; padding: 0 12px; }
.dice-track { position: relative; height: 12px; border-radius: 999px; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .4); }
.dice-marker {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  padding: 6px 9px; border-radius: 9px; background: #fff; color: #0b0d14; font-weight: 800; font-size: .8rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5); transition: left .55s cubic-bezier(.2, .8, .2, 1); white-space: nowrap;
}
.dice-marker::after { content: ""; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%) rotate(45deg); width: 8px; height: 8px; background: #fff; }
.dice-scale { display: flex; justify-content: space-between; color: var(--faint); font-size: .76rem; font-weight: 600; margin-top: 10px; }
input[type=range] {
  -webkit-appearance: none; appearance: none; height: 8px; padding: 0; border: 0; border-radius: 999px;
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-2);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 7px; background: #fff; cursor: pointer;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .45), 0 4px 10px rgba(0, 0, 0, .5);
}
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 7px; background: #fff; cursor: pointer; box-shadow: 0 0 0 4px rgba(139, 92, 246, .45); }

/* ================================================================ Roulette */
.wheel {
  width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-size: 3.8rem; font-weight: 900; background: #151823;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, .04), 0 0 0 11px rgba(255, 255, 255, .08), 0 20px 50px rgba(0, 0, 0, .5), inset 0 -8px 20px rgba(0, 0, 0, .35);
  transition: background .1s;
}
.wheel.red, .chip.red { background: radial-gradient(circle at 35% 30%, #ff6b7f, #d61f3c 60%, #8f0f25); }
.wheel.black, .chip.black { background: radial-gradient(circle at 35% 30%, #3a3f52, #171a24 60%, #0a0b10); }
.wheel.green, .chip.green { background: radial-gradient(circle at 35% 30%, #4ade80, #16a34a 60%, #0f5f2e); }
.wheel.spinning { animation: wobble .12s infinite alternate; }
@keyframes wobble { to { transform: scale(1.03); } }
.board-wrap { width: 100%; overflow-x: auto; margin-top: 18px; }
.rboard, .rout { display: grid; gap: 5px; min-width: 620px; }
.rboard { grid-template-columns: 48px repeat(12, 1fr) 48px; }
.rout { grid-template-columns: repeat(12, 1fr); margin: 5px 53px 0; }
.rc {
  border: 0; border-radius: 8px; padding: 12px 0; color: #fff; font: inherit; font-weight: 800; cursor: pointer;
  background: var(--surface-2); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .3); transition: transform .08s, filter .12s, box-shadow .12s;
}
.rc.red { background: linear-gradient(180deg, #e8334f, #b3182f); }
.rc.black { background: linear-gradient(180deg, #2a2e3d, #161923); }
.rc.green { background: linear-gradient(180deg, #22c55e, #15803d); }
.rc.zero { grid-row: span 3; }
.rc.span4 { grid-column: span 4; }
.rc.span2 { grid-column: span 2; }
.rc:hover { filter: brightness(1.25); transform: translateY(-1px); }
.rc.sel { box-shadow: 0 0 0 2px var(--gold), 0 0 18px rgba(251, 191, 36, .55); position: relative; z-index: 1; }
.history { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.chip {
  min-width: 36px; padding: 5px 9px; border-radius: 8px; text-align: center; font-weight: 800; font-size: .82rem;
  background: var(--surface-2); color: #fff; font-variant-numeric: tabular-nums;
}

/* ================================================================ Mines */
.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; width: 100%; max-width: 440px; }
.tile {
  aspect-ratio: 1; border: 0; border-radius: 12px; font-size: 2rem; cursor: pointer; color: #fff;
  background: linear-gradient(180deg, #252a3a, #1a1e2b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 -5px 0 rgba(0, 0, 0, .35);
  transition: transform .12s, background .2s, box-shadow .2s;
}
.tile:hover:not(:disabled) { transform: translateY(-3px); background: linear-gradient(180deg, #30364b, #22273a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 -5px 0 rgba(0, 0, 0, .35), 0 0 20px rgba(139, 92, 246, .35); }
.tile:disabled { cursor: default; }
.tile.gem { background: radial-gradient(circle, rgba(25, 230, 140, .28), rgba(12, 60, 40, .9)); box-shadow: inset 0 0 0 1px rgba(25, 230, 140, .45), 0 0 22px rgba(25, 230, 140, .25); animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
.tile.mine { background: radial-gradient(circle, rgba(255, 77, 106, .25), rgba(60, 12, 22, .9)); box-shadow: inset 0 0 0 1px rgba(255, 77, 106, .35); animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
.tile.hit { background: radial-gradient(circle, #ff4d6a, #7a0f22); box-shadow: 0 0 34px rgba(255, 77, 106, .6); }
.tile.dim { opacity: .35; }
@keyframes pop { from { transform: scale(.6); opacity: .3; } }

/* ================================================================ Crash */
.crash-stage { padding: 0; }
.crash-stage canvas { display: block; width: 100%; height: 460px; }
.crash-mult {
  position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); text-align: center; pointer-events: none;
  font-family: var(--display); font-size: 4.4rem; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1;
  text-shadow: 0 0 40px rgba(139, 92, 246, .5);
}
.crash-mult .small { font-family: var(--font); font-size: .95rem; font-weight: 700; margin-top: 10px; color: var(--muted); text-shadow: none; }
.crash-mult.win { text-shadow: 0 0 40px rgba(25, 230, 140, .6); }
.crash-mult.lose { text-shadow: 0 0 40px rgba(255, 77, 106, .6); font-size: 3.4rem; }
.crash-stage .history { position: absolute; top: 14px; right: 14px; justify-content: flex-end; }
.crash-stage .chip { background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); }

/* ================================================================ Limbo */
.limbo-res {
  font-family: var(--display); font-size: 6rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 50px rgba(249, 115, 22, .35);
}
.limbo-res.win { text-shadow: 0 0 50px rgba(25, 230, 140, .55); }
.limbo-res.lose { text-shadow: 0 0 50px rgba(255, 77, 106, .55); }
.chip.win { color: var(--green); }
.chip.lose { color: var(--red); }

/* ================================================================ Plinko */
.plinko-stage { padding: 0; }
.plinko-stage canvas { display: block; width: 100%; height: 520px; }

/* ================================================================ Keno */
.keno-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; width: 100%; max-width: 560px; }
.ktile {
  aspect-ratio: 1; border: 0; border-radius: 10px; cursor: pointer; color: var(--text); font: inherit; font-weight: 800; font-size: 1rem;
  background: linear-gradient(180deg, #252a3a, #1a1e2b); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 -4px 0 rgba(0, 0, 0, .35);
  transition: transform .1s, background .15s;
}
.ktile:hover { transform: translateY(-2px); }
.ktile.picked { background: var(--grad); box-shadow: 0 0 16px rgba(168, 85, 247, .5); }
.ktile.miss { background: #2a1119; color: var(--red); box-shadow: inset 0 0 0 1px rgba(255, 77, 106, .35); animation: pop .3s; }
.ktile.hit { background: radial-gradient(circle, #19e68c, #0c7a4a); color: #03281a; box-shadow: 0 0 20px rgba(25, 230, 140, .6); animation: pop .3s cubic-bezier(.2, 1.4, .4, 1); }
.paytable { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.paytable .pt { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; text-align: center; min-width: 52px; }
.paytable .pt span { display: block; font-size: .7rem; color: var(--muted); }
.paytable .pt b { font-size: .85rem; }
.paytable .pt.hit { border-color: var(--green); box-shadow: 0 0 14px rgba(25, 230, 140, .4); }

/* ================================================================ Towers */
.tower { display: flex; flex-direction: column; gap: 7px; width: 100%; max-width: 460px; }
.trow { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: center; opacity: .55; transition: opacity .2s; }
.trow.current, .trow.done { opacity: 1; }
.tmult { font-size: .8rem; font-weight: 800; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.trow.current .tmult { color: var(--text); }
.tcells { display: grid; gap: 7px; }
.ttile {
  height: 40px; border: 0; border-radius: 9px; font-size: 1.2rem; cursor: pointer; color: #fff;
  background: linear-gradient(180deg, #252a3a, #1a1e2b); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .35);
}
.trow.current .ttile { background: linear-gradient(180deg, #3b3070, #2a2150); box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .6), 0 0 14px rgba(139, 92, 246, .3); }
.trow.current .ttile:hover { filter: brightness(1.25); transform: translateY(-1px); }
.ttile:disabled { cursor: default; }
.ttile.gem { background: radial-gradient(circle, rgba(25, 230, 140, .3), rgba(12, 60, 40, .9)) !important; box-shadow: inset 0 0 0 1px rgba(25, 230, 140, .45) !important; animation: pop .3s; }
.ttile.bomb { background: radial-gradient(circle, rgba(255, 77, 106, .25), rgba(60, 12, 22, .9)) !important; }
.ttile.hit { background: radial-gradient(circle, #ff4d6a, #7a0f22) !important; box-shadow: 0 0 20px rgba(255, 77, 106, .6) !important; }
.ttile.dim { opacity: .4; }

/* ================================================================ Karten */
.pcard {
  position: relative; width: 78px; height: 110px; border-radius: 10px; flex: none;
  background: linear-gradient(180deg, #ffffff, #e8eaf2); color: #111827;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45); font-family: var(--display); font-weight: 800;
  display: grid; place-items: center;
}
.pcard.red { color: #dc2626; }
.pcard .cr { position: absolute; top: 6px; left: 8px; font-size: 1.05rem; line-height: 1; }
.pcard .cr2 { position: absolute; bottom: 6px; right: 8px; font-size: 1.05rem; line-height: 1; transform: rotate(180deg); }
.pcard .cs { font-size: 2.2rem; }
.pcard.back {
  background: repeating-linear-gradient(45deg, #6d28d9 0 8px, #7c3aed 8px 16px);
  box-shadow: inset 0 0 0 4px #fff, 0 10px 24px rgba(0, 0, 0, .45);
}
.pcard.deal { animation: deal .35s cubic-bezier(.2, .8, .2, 1); }
.pcard.big { width: 130px; height: 184px; border-radius: 14px; }
.pcard.big .cr, .pcard.big .cr2 { font-size: 1.6rem; top: 10px; left: 12px; }
.pcard.big .cr2 { top: auto; left: auto; bottom: 10px; right: 12px; }
.pcard.big .cs { font-size: 4rem; }
.pcard.mini { width: 40px; height: 56px; border-radius: 6px; box-shadow: 0 4px 10px rgba(0, 0, 0, .4); }
.pcard.mini .cr { top: 3px; left: 4px; font-size: .7rem; }
.pcard.mini .cr2 { display: none; }
.pcard.mini .cs { font-size: 1.1rem; }
@keyframes deal { from { transform: translateY(-30px) rotate(-6deg); opacity: 0; } }

/* ================================================================ Blackjack */
.felt {
  display: flex; flex-direction: column; justify-content: space-between; padding: 26px;
  background: radial-gradient(700px 400px at 50% 50%, rgba(34, 197, 94, .16), transparent 70%), linear-gradient(180deg, #0e1a14, #0a120e);
  border-color: rgba(34, 197, 94, .2);
}
.bj-side { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.bj-label { font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.total { background: rgba(0, 0, 0, .45); color: var(--text); border-radius: 999px; padding: 2px 10px; font-size: .85rem; font-weight: 800; }
.total:empty { display: none; }
.hand { display: flex; gap: 0; min-height: 110px; }
.hand .pcard + .pcard { margin-left: -26px; }
.bj-result { text-align: center; font-family: var(--display); font-size: 1.6rem; font-weight: 800; min-height: 2.4rem; opacity: 0; transition: opacity .2s; }
.bj-result.show { opacity: 1; }
.bj-result small { display: block; font-family: var(--font); font-size: .95rem; color: var(--green); }
.bj-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* ================================================================ Hi-Lo */
.hilo-card { min-height: 184px; }
.hilo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 420px; }
.hl-btn { flex-direction: column; gap: 2px; padding: 12px; }
.hl-btn small { font-weight: 600; color: var(--muted); font-size: .78rem; }
#higher:not(:disabled) { background: linear-gradient(180deg, rgba(25, 230, 140, .18), rgba(25, 230, 140, .06)); border-color: rgba(25, 230, 140, .4); }
#lower:not(:disabled) { background: linear-gradient(180deg, rgba(255, 77, 106, .18), rgba(255, 77, 106, .06)); border-color: rgba(255, 77, 106, .4); }
.hilo-hist { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.hh { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .75rem; font-weight: 800; }
.hh.ok span { color: var(--green); }
.hh.lost span { color: var(--red); }
.hh.skip span { color: var(--muted); }

/* ================================================================ Slots */
.slot-machine {
  position: relative; padding: 18px; border-radius: 22px;
  background: linear-gradient(180deg, #2a1640, #150b22); border: 2px solid rgba(244, 63, 94, .35);
  box-shadow: 0 0 40px rgba(244, 63, 94, .15), inset 0 0 30px rgba(0, 0, 0, .5);
}
.reels { display: flex; gap: 12px; }
.reel {
  width: 110px; height: 130px; border-radius: 14px; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(180deg, #d9dce6, #ffffff 30%, #ffffff 70%, #d9dce6); box-shadow: inset 0 6px 14px rgba(0, 0, 0, .35);
}
.reel .sym { font-size: 3.6rem; line-height: 1; }
.reel.spinning .sym { filter: blur(1.5px); transform: translateY(4px); }
.reel .sym.land { animation: land .3s cubic-bezier(.2, 1.4, .4, 1); }
.reel.win { box-shadow: inset 0 6px 14px rgba(0, 0, 0, .25), 0 0 0 3px var(--gold), 0 0 26px rgba(251, 191, 36, .6); }
@keyframes land { from { transform: translateY(-24px); } }
.payline { position: absolute; left: 8px; right: 8px; top: 50%; height: 2px; background: rgba(244, 63, 94, .5); pointer-events: none; }
.paylist { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: .85rem; }
.paylist div { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid rgba(255, 255, 255, .04); }

/* ================================================================ Duelle */
.duel-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.duel {
  display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.duel-side { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: .88rem; }
.mini-coin { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: .65rem; font-weight: 900; vertical-align: middle; }
.mini-coin.heads { background: radial-gradient(circle at 32% 28%, #fff4c2, #fbbf24 50%, #b45309); color: #7c4a03; }
.mini-coin.tails { background: radial-gradient(circle at 32% 28%, #fff, #cbd5e1 50%, #64748b); color: #334155; }
.player.winner { color: var(--green); }

/* ================================================================ Modal / Toasts */
.modal { position: fixed; inset: 0; background: rgba(3, 4, 8, .72); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
.modal-box {
  width: 100%; max-width: 470px; border-radius: 20px; padding: 28px;
  background: linear-gradient(180deg, #151826, #0e1018); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  animation: rise .2s cubic-bezier(.2, .8, .2, 1);
}
.modal-box h2 { font-size: 1.35rem; margin-bottom: 6px; }
.modal-box hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.modal-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--grad); display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 16px; box-shadow: 0 10px 30px -8px rgba(168, 85, 247, .8); }
.waiting { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .86rem; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--violet); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(12px) scale(.98); opacity: 0; } }

#toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 360px;
  background: rgba(21, 24, 38, .92); backdrop-filter: blur(12px); border: 1px solid var(--line-2);
  padding: 12px 16px; border-radius: 12px; font-weight: 600; box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  animation: rise .2s cubic-bezier(.2, .8, .2, 1);
}
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--violet); flex: none; box-shadow: 0 0 10px var(--violet); }
.toast.success::before { background: var(--green); box-shadow: 0 0 10px var(--green); }
.toast.error::before { background: var(--red); box-shadow: 0 0 10px var(--red); }

.seed { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; word-break: break-all; background: var(--bg-2); padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); color: #c9cde0; }

/* ================================================================ Mobil */
.layout > * { min-width: 0; }
.logo-text { white-space: nowrap; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side {
    position: sticky; top: 68px; z-index: 15; height: auto; flex-direction: row; overflow-x: auto;
    border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; background: rgba(7, 8, 12, .85); backdrop-filter: blur(14px);
  }
  .side-label, .side-foot { display: none; }
  .side a { white-space: nowrap; padding: 6px 10px 6px 6px; }
  .side a .ni { width: 28px; height: 28px; }
  main { padding: 18px 16px 50px; }
  .game { grid-template-columns: 1fr; }
  .stage { min-height: 340px; }
  .crash-stage canvas { height: 340px; }
  .top { padding: 0 14px; }
  .user-chip .name, #bot-status { display: none; }
  .hero { padding: 30px 22px; }
  .hero::after { display: none; }
  h1 { font-size: 1.6rem; }
  .game-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .game-card { min-height: 160px; }
  .game-card .gc-icon { font-size: 3.4rem; }
}

@media (max-width: 480px) {
  .logo-text { display: none; }
  .user-chip { padding: 3px; }
  .wallet-pill .amount { padding: 7px 10px; }
  .dice-roll { font-size: 4rem; }
  .crash-mult { font-size: 3.2rem; }
  .limbo-res { font-size: 4rem; }
  .plinko-stage canvas { height: 380px; }
  .keno-grid { gap: 5px; }
  .reel { width: 84px; height: 104px; }
  .reel .sym { font-size: 2.8rem; }
  .pcard { width: 62px; height: 88px; }
  .pcard .cs { font-size: 1.7rem; }
  .duel { grid-template-columns: 1fr auto; }
}
