:root {
  --bg: #07080d;
  --bg-2: #0c0e16;
  --surface: #11141f;
  --surface-2: #171b29;
  --surface-3: #1f2436;
  --border: rgba(255, 255, 255, 0.06);
  --border-2: rgba(255, 255, 255, 0.11);
  --text: #eef0f7;
  --muted: #8a90a8;
  --muted-2: #5d6380;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 45%, #22d3ee 100%);
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.12);
  --red: #f43f5e;
  --red-soft: rgba(244, 63, 94, 0.12);
  --gold: #fbbf24;
  --radius: 16px;
  --radius-sm: 11px;
  --header-h: 68px;
  --chat-w: 300px;
  --font: 'Inter', system-ui, sans-serif;
  --display: 'Sora', 'Inter', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(800px 500px at 85% -10%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(700px 500px at 20% 110%, rgba(34, 211, 238, 0.07), transparent 60%);
}

/* ---------- Topbar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); z-index: 40;
  display: flex; align-items: center; gap: 20px; padding: 0 20px;
  background: rgba(7, 8, 13, 0.75); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -0.03em; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 24px -6px rgba(139, 92, 246, 0.7); }
.logo-mark svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 3.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.nav { display: flex; gap: 4px; }
.nav a, .nav button { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; color: var(--muted); font-weight: 500; transition: .15s; }
.nav a:hover, .nav button:hover { color: var(--text); background: var(--surface); }
.nav a.active { color: var(--text); background: var(--surface-2); }
.wallet { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.balance-pill { display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.balance-pill.bump { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.06); border-color: var(--violet); } }
.coin { width: 18px; height: 18px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #fde68a, #f59e0b 55%, #b45309); box-shadow: inset 0 -2px 0 rgba(0,0,0,.2), 0 0 12px rgba(251, 191, 36, 0.35); }
.coin.sm { width: 14px; height: 14px; }
.account { display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; }
.avatar { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-3) center/cover; flex: none; image-rendering: pixelated; }
.avatar.sm { width: 22px; height: 22px; border-radius: 6px; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; padding: 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: 0 20px 50px -10px rgba(0,0,0,.6); display: none; }
.dropdown.open .dropdown-menu { display: block; animation: pop .15s; }
.dropdown-menu button { width: 100%; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 9px; color: var(--muted); text-align: left; }
.dropdown-menu button:hover { background: var(--surface-3); color: var(--text); }

/* ---------- Buttons / inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px; font-weight: 600; transition: transform .1s, filter .15s, background .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { height: 42px; padding: 0 14px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 28px -10px rgba(139, 92, 246, 0.8); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn-green { background: var(--green); color: #052e14; box-shadow: 0 8px 28px -10px rgba(34, 197, 94, 0.7); }
.btn-green:hover:not(:disabled) { filter: brightness(1.08); }
.btn-ghost { background: var(--surface-2); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); }
.btn-block { width: 100%; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input { display: flex; align-items: center; height: 46px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border-2); overflow: hidden; transition: border-color .15s; }
.input:focus-within { border-color: rgba(139, 92, 246, .6); box-shadow: 0 0 0 3px rgba(139, 92, 246, .15); }
.input input, .input select { flex: 1; min-width: 0; height: 100%; padding: 0 14px; background: none; border: 0; outline: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.input select { appearance: none; cursor: pointer; }
.input select option { background: var(--surface-2); }
.input .addon { display: flex; align-items: center; gap: 6px; padding: 0 12px; color: var(--muted); }
.input .chip-btn { height: 100%; padding: 0 14px; border-left: 1px solid var(--border-2); font-weight: 700; color: var(--muted); }
.input .chip-btn:hover { color: var(--text); background: var(--surface-2); }
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 13px; background: var(--bg-2); border: 1px solid var(--border); }
.seg button { flex: 1; height: 38px; border-radius: 9px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; color: var(--muted); font-size: 13px; }
.check input { appearance: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-2); background: var(--bg-2); flex: none; margin: 0; display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--grad); border-color: transparent; }
.check input:checked::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check a { color: var(--cyan); }

/* ---------- Chat ---------- */
.chat {
  position: fixed; top: var(--header-h); bottom: 0; left: 0; width: var(--chat-w); z-index: 30;
  display: flex; flex-direction: column; background: var(--bg-2); border-right: 1px solid var(--border);
}
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); }
.chat-head .label { display: flex; align-items: center; gap: 8px; }
.online { display: flex; align-items: center; gap: 6px; }
.online b { color: var(--text); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.chat-list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.msg { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid transparent; animation: slide .2s; }
.msg-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.msg-name { font-weight: 600; font-size: 13px; }
.msg-time { margin-left: auto; font-size: 11px; color: var(--muted-2); }
.msg-text { color: #c9cde0; font-size: 13.5px; word-wrap: break-word; }
.msg.win { background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(34,197,94,.03)); border-color: rgba(34,197,94,.3); }
.msg.win .tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 3px 9px; border-radius: 8px; background: var(--bg-2); font-weight: 700; color: var(--green); font-size: 13px; }
.chat-new { position: absolute; bottom: 116px; left: 50%; transform: translateX(-50%); padding: 7px 14px; border-radius: 99px; background: var(--grad); color: #fff; font-weight: 600; font-size: 12px; box-shadow: 0 8px 24px -6px rgba(0,0,0,.6); }
.chat-form { display: flex; gap: 6px; margin: 10px 10px 0; padding: 4px 4px 4px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.chat-form input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; }
.chat-foot { padding: 8px 14px 14px; text-align: center; }

/* ---------- Main ---------- */
.main { position: relative; z-index: 1; margin-left: var(--chat-w); padding: calc(var(--header-h) + 24px) 28px 48px; max-width: calc(1320px + var(--chat-w)); }
.section-title { display: flex; align-items: center; gap: 10px; margin: 34px 0 16px; font-size: 19px; }
.section-title .ic { color: var(--violet); }

.hero { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 14px; }
.hero-main {
  position: relative; overflow: hidden; border-radius: 22px; padding: 34px; min-height: 230px;
  background: radial-gradient(500px 300px at 90% 20%, rgba(34,211,238,.25), transparent 60%), radial-gradient(500px 300px at 60% 120%, rgba(139,92,246,.45), transparent 60%), var(--surface);
  border: 1px solid var(--border-2);
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
}
.hero-main h1 { font-size: 34px; line-height: 1.1; max-width: 420px; }
.hero-main p { margin: 0; color: var(--muted); max-width: 400px; }
.hero-main .row { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.hero-art { position: absolute; right: -10px; top: 50%; transform: translateY(-50%); width: 300px; height: 300px; opacity: .95; pointer-events: none; }
.promo { position: relative; overflow: hidden; border-radius: 22px; padding: 22px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 230px; transition: transform .2s, border-color .2s; cursor: pointer; }
.promo:hover { transform: translateY(-3px); border-color: var(--border-2); }
.promo .badge { position: absolute; top: 18px; left: 18px; }
.promo h3 { font-size: 20px; }
.promo p { margin: 0; color: var(--muted); font-size: 13px; }
.promo .art { position: absolute; top: 18px; right: 10px; width: 120px; height: 120px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: rgba(139,92,246,.15); color: #c4b5fd; }
.badge.green { background: var(--green-soft); color: #86efac; }
.badge.cyan { background: rgba(34,211,238,.12); color: #67e8f9; }

.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.game-card { display: flex; flex-direction: column; gap: 8px; }
.game-tile {
  position: relative; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 16px 10px 18px;
  border: 1px solid rgba(255,255,255,.08); transition: transform .2s, box-shadow .2s;
}
.game-tile::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.45)); }
.game-tile:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -14px var(--glow, rgba(139,92,246,.6)); }
.game-tile svg.art { position: absolute; top: 12%; left: 50%; transform: translateX(-50%); width: 72%; transition: transform .3s; }
.game-tile:hover svg.art { transform: translateX(-50%) scale(1.07) rotate(-3deg); }
.game-tile .t { position: relative; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.game-tile .s { position: relative; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; opacity: .65; font-weight: 600; }
.game-tile.soon { filter: grayscale(.6) brightness(.7); cursor: default; }
.game-tile.soon:hover { transform: none; box-shadow: none; }
.game-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding-left: 2px; }
.game-meta b { color: var(--text); }

.table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted-2); padding: 0 16px; }
.table td { padding: 12px 16px; background: var(--surface); font-variant-numeric: tabular-nums; }
.table td:first-child { border-radius: 12px 0 0 12px; }
.table td:last-child { border-radius: 0 12px 12px 0; text-align: right; }
.table th:last-child { text-align: right; }
.table tr.new td { animation: flash 1s; }
@keyframes flash { from { background: var(--surface-3); } }
.amount { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.pos { color: var(--green); }
.neg { color: var(--muted); }
.player { display: flex; align-items: center; gap: 8px; font-weight: 600; }

/* ---------- Game layout ---------- */
.game-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.game-head h1 { font-size: 26px; display: flex; align-items: center; gap: 12px; }
.game-head .tools { display: flex; gap: 8px; }
.game-wrap { display: grid; grid-template-columns: 340px 1fr; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); min-height: 600px; }
.panel { padding: 20px; display: flex; flex-direction: column; gap: 16px; background: var(--bg-2); border-right: 1px solid var(--border); }
.stage { position: relative; padding: 28px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.stage-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; color: var(--muted); font-size: 12px; }

/* Mines */
.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; width: min(100%, 540px); }
.tile {
  aspect-ratio: 1; border-radius: 14px; background: var(--surface-3); position: relative;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.25); transition: transform .12s, background .15s; display: grid; place-items: center;
}
.tile:not(:disabled):hover { transform: translateY(-3px); background: #283048; }
.tile:disabled { cursor: default; }
.tile svg { width: 58%; height: 58%; }
.tile.gem { background: linear-gradient(160deg, rgba(34,197,94,.22), rgba(34,197,94,.06)); box-shadow: inset 0 0 0 1.5px rgba(34,197,94,.55); animation: reveal .3s; }
.tile.mine { background: linear-gradient(160deg, rgba(244,63,94,.3), rgba(244,63,94,.08)); box-shadow: inset 0 0 0 1.5px rgba(244,63,94,.6); animation: shake .4s; }
.tile.dim { opacity: .4; box-shadow: none; animation: reveal .3s; }
@keyframes reveal { from { transform: scale(.7); opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* Dice */
.dice-stage { width: min(100%, 720px); display: flex; flex-direction: column; gap: 40px; }
.dice-result { font-family: var(--display); font-size: 84px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; transition: color .2s; }
.dice-result.win { color: var(--green); } .dice-result.lose { color: var(--red); }
.dice-track { position: relative; height: 14px; border-radius: 99px; background: var(--red); }
.dice-track .win-zone { position: absolute; top: 0; bottom: 0; background: var(--green); border-radius: 99px; }
.dice-track input[type=range] { position: absolute; inset: -10px 0; width: 100%; appearance: none; background: none; margin: 0; cursor: grab; }
.dice-track input[type=range]::-webkit-slider-thumb { appearance: none; width: 34px; height: 34px; border-radius: 10px; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.5); border: 4px solid var(--violet); }
.dice-track input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 10px; background: #fff; border: 4px solid var(--violet); }
.dice-marker { position: absolute; top: -48px; transform: translateX(-50%); padding: 6px 10px; border-radius: 9px; background: var(--surface-3); font-weight: 700; font-variant-numeric: tabular-nums; transition: left .5s cubic-bezier(.2,.8,.2,1); white-space: nowrap; }
.dice-marker::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: inherit; transform: translateX(-50%) rotate(45deg); }
.dice-marker.win { background: var(--green); color: #052e14; } .dice-marker.lose { background: var(--red); }
.dice-scale { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 12px; margin-top: 10px; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* Coinflip */
.coin-stage { perspective: 900px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.flip-coin { width: 220px; height: 220px; position: relative; transform-style: preserve-3d; }
.flip-coin .face { position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 44px; color: rgba(255,255,255,.95); }
.flip-coin .heads { background: radial-gradient(circle at 35% 30%, #c4b5fd, #8b5cf6 50%, #4c1d95); box-shadow: inset 0 0 0 10px rgba(255,255,255,.12), 0 20px 60px -10px rgba(139,92,246,.7); }
.flip-coin .tails { background: radial-gradient(circle at 35% 30%, #a5f3fc, #22d3ee 50%, #155e75); box-shadow: inset 0 0 0 10px rgba(255,255,255,.12), 0 20px 60px -10px rgba(34,211,238,.6); transform: rotateY(180deg); }
.side-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side-pick button { height: 54px; border-radius: 12px; background: var(--surface-2); border: 1.5px solid var(--border); font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; }
.side-pick button .c { width: 20px; height: 20px; border-radius: 50%; }
.side-pick button.on[data-side=heads] { border-color: var(--violet); background: rgba(139,92,246,.12); }
.side-pick button.on[data-side=tails] { border-color: var(--cyan); background: rgba(34,211,238,.1); }


/* Cases */
.cases-layout { display: grid; grid-template-columns: 320px 1fr; gap: 14px; }
.card { border-radius: 20px; background: var(--surface); border: 1px solid var(--border); padding: 18px; }
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.case-card { border-radius: 16px; padding: 16px 12px; background: var(--surface-2); border: 1.5px solid transparent; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: .15s; }
.case-card:hover { background: var(--surface-3); transform: translateY(-2px); }
.case-card.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--surface-2)); }
.case-card svg { width: 72px; height: 72px; }
.case-card .n { font-weight: 700; }
.case-card .p { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.case-card .x { font-size: 11px; color: var(--gold); font-weight: 600; }
.reel-wrap { position: relative; height: 170px; border-radius: 16px; background: var(--bg-2); overflow: hidden; margin-bottom: 10px; }
.reel-wrap::before, .reel-wrap::after { content: ''; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2; pointer-events: none; }
.reel-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg-2), transparent); }
.reel-wrap::after { right: 0; background: linear-gradient(-90deg, var(--bg-2), transparent); }
.reel-needle { position: absolute; left: 50%; top: 8px; bottom: 8px; width: 3px; background: var(--grad); z-index: 3; transform: translateX(-50%); border-radius: 3px; box-shadow: 0 0 16px rgba(139,92,246,.9); }
.reel { position: absolute; top: 15px; left: 0; display: flex; gap: 10px; will-change: transform; }
.reel-item { width: 130px; height: 140px; flex: none; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-bottom: 3px solid var(--c); }
.reel-item svg { width: 60px; height: 60px; }
.reel-item .v { display: flex; gap: 5px; align-items: center; font-weight: 700; font-size: 13px; }
.reel-item.win { background: color-mix(in srgb, var(--c) 18%, var(--surface-2)); box-shadow: 0 0 0 2px var(--c); }
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.item { border-radius: 12px; padding: 12px 10px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; gap: 4px; border-bottom: 3px solid var(--c); }
.item svg { width: 40px; height: 40px; }
.item .v { font-weight: 700; display: flex; gap: 5px; align-items: center; font-size: 13px; }
.item .ch { font-size: 11px; color: var(--muted); }

.stat { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.stat .k { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* ---------- Modal ---------- */
.modal-root { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 16px; background: rgba(3, 4, 8, .72); backdrop-filter: blur(6px); }
.modal-root.open { display: grid; animation: fade .15s; }
.modal { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 22px; background: var(--surface); border: 1px solid var(--border-2); box-shadow: 0 40px 100px -20px rgba(0,0,0,.8); animation: pop .2s; }
.modal.wide { width: min(880px, 100%); display: grid; grid-template-columns: 1fr 320px; }
.modal-body { padding: 30px; display: flex; flex-direction: column; gap: 18px; }
.modal-body h2 { font-size: 24px; }
.modal-body .sub { margin: -10px 0 0; color: var(--muted); }
.modal-side { background: radial-gradient(400px 300px at 70% 0%, rgba(34,211,238,.35), transparent 60%), radial-gradient(400px 400px at 20% 100%, rgba(139,92,246,.55), transparent 60%), var(--bg-2); position: relative; overflow: hidden; }
.modal-side svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 5; width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.modal-close:hover { color: var(--text); background: var(--surface-3); }
.divider { height: 1px; background: var(--border); }
.cmd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 18px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border-2); font-family: var(--mono); font-size: 17px; color: #a5f3fc; }
.waiting { display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; border-radius: 13px; background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.35); color: #c4b5fd; font-weight: 600; }
.waiting.ok { background: var(--green-soft); border-color: rgba(34,197,94,.4); color: #86efac; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amount-opt { padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); text-align: left; transition: .15s; }
.amount-opt:hover { border-color: rgba(139,92,246,.5); background: var(--surface-3); }
.amount-opt .a { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; font-family: var(--display); }
.amount-opt .h { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; margin-top: 4px; }
.notice { padding: 12px 14px; border-radius: 12px; background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.25); color: #fde68a; font-size: 13px; }
.dev { padding: 12px; border-radius: 12px; border: 1px dashed rgba(34,211,238,.4); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: #67e8f9; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 13px; }
.kv div:nth-child(odd) { color: var(--muted); }
.kv div:nth-child(even) { font-family: var(--mono); word-break: break-all; }
details summary { cursor: pointer; color: var(--cyan); font-size: 13px; }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: 0 20px 40px -10px rgba(0,0,0,.6); animation: slide .2s; max-width: 360px; font-weight: 500; }
.toast.error { border-color: rgba(244,63,94,.4); } .toast.error .ic { color: var(--red); }
.toast.success { border-color: rgba(34,197,94,.4); } .toast.success .ic { color: var(--green); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } }
@keyframes slide { from { opacity: 0; transform: translateY(6px); } }
@keyframes spin { to { transform: rotate(360deg); } }

.only-mobile { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .hero-main { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .chat { transform: translateX(-100%); transition: transform .25s; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  body.chat-open .chat { transform: none; }
  .main { margin-left: 0; padding: calc(var(--header-h) + 16px) 16px 40px; }
  .only-mobile { display: grid; }
  .nav { display: none; }
  .game-wrap, .cases-layout { grid-template-columns: 1fr; }
  .panel { border-right: 0; border-bottom: 1px solid var(--border); order: 2; }
  .modal.wide { grid-template-columns: 1fr; }
  .modal-side { display: none; }
}
@media (max-width: 600px) {
  .topbar { gap: 8px; padding: 0 10px; }
  .logo-text, .hide-sm, .balance-pill .muted { display: none; }
  .balance-pill { padding: 0 12px; }
  .hero { grid-template-columns: 1fr; }
  .hero-main h1 { font-size: 27px; }
  .hero-art { opacity: .25; }
  .games { grid-template-columns: repeat(2, 1fr); }
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
  .stage { padding: 16px; }
  .mines-grid { gap: 7px; }
  .dice-result { font-size: 60px; }
  .modal-body { padding: 22px; }
  .table .hide-sm { display: none; }
}

/* ---------- Fixes ---------- */
.hero-main > *:not(.hero-art) { position: relative; z-index: 1; }
.hero-main .badge { align-self: flex-start; }
.hero-main h1, .hero-main p { max-width: 62%; }
.hero-main h1 { font-size: 31px; }
.hero-art { right: -30px; width: 250px; height: 250px; }
.game-wrap { grid-template-columns: 340px minmax(0, 1fr); }
.game-wrap > *, .cases-layout > * { min-width: 0; }
#wt { margin-right: 46px; }
#sc .amount { display: flex; }
@media (max-width: 1000px) {
  .game-wrap { grid-template-columns: minmax(0, 1fr); }
  .cases-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) { .hero-main h1, .hero-main p { max-width: 100%; } }
@media (max-width: 600px) { .promo { min-height: 170px; } }

.logo-mark { color: #fff; font-family: var(--display); font-weight: 800; font-size: 19px; }

/* ---------- Minecraft-Items ---------- */
.mc { image-rendering: pixelated; image-rendering: crisp-edges; display: block; filter: drop-shadow(0 4px 14px color-mix(in srgb, var(--c, #8b5cf6) 55%, transparent)); user-select: none; }
.reel-item .mc { width: 64px; height: 64px; }
.item .mc { width: 44px; height: 44px; }
.case-art { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 20px; background: radial-gradient(circle, color-mix(in srgb, var(--c) 35%, transparent), transparent 70%); }
.case-art .mc { width: 60px; height: 60px; transition: transform .2s; }
.case-card:hover .case-art .mc { transform: scale(1.1) rotate(-6deg); }
.case-art.sm { width: 52px; height: 52px; border-radius: 12px; }
.case-art.sm .mc { width: 36px; height: 36px; }

/* ---------- Slots ---------- */
.slot-wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.slot-machine { --sym: 112px; display: flex; gap: 10px; padding: 14px; border-radius: 24px; background: linear-gradient(160deg, #2a2210, #120e05); border: 1px solid rgba(251,191,36,.25); box-shadow: 0 30px 80px -30px rgba(251,191,36,.35), inset 0 0 0 4px rgba(0,0,0,.25); }
.slot-col { width: var(--sym); height: calc(var(--sym) * 3); overflow: hidden; border-radius: 16px; background: var(--bg-2); position: relative; }
.slot-col::before, .slot-col::after { content: ''; position: absolute; left: 0; right: 0; height: 28px; z-index: 2; pointer-events: none; }
.slot-col::before { top: 0; background: linear-gradient(var(--bg-2), transparent); }
.slot-col::after { bottom: 0; background: linear-gradient(transparent, var(--bg-2)); }
.slot-strip { will-change: transform; }
.slot-cell { height: var(--sym); display: grid; place-items: center; border-radius: 14px; }
.slot-cell .mc, .slot-cell svg { width: 60%; height: 60%; }
.slot-cell.win { background: color-mix(in srgb, var(--green) 16%, transparent); box-shadow: inset 0 0 0 2px var(--green); animation: reveal .3s; }
.slot-result { font-weight: 700; font-size: 17px; min-height: 26px; }
.paytable { display: flex; flex-direction: column; gap: 4px; }
.pay-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); }
.pay-row b { margin-left: auto; font-variant-numeric: tabular-nums; }
.pay-icons { display: flex; gap: 2px; }
.pay-icons .mc, .pay-icons svg { width: 22px; height: 22px; filter: none; }
@media (max-width: 600px) { .slot-machine { --sym: 84px; padding: 10px; gap: 6px; } }

.mc-glint { position: relative; display: block; }
.mc-glint > img.mc { width: 100% !important; height: 100% !important; }
.mc-glint::after { content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 20%, rgba(192,132,252,.85) 40%, transparent 55%, rgba(167,139,250,.6) 75%, transparent 90%) 0 0 / 300% 300%;
  -webkit-mask: var(--src) center / 100% 100% no-repeat; mask: var(--src) center / 100% 100% no-repeat; animation: glint 2.4s linear infinite; }
@keyframes glint { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.case-card.featured { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 18%, var(--surface-2)), var(--surface-2)); }
.case-card .feat { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--c); text-transform: uppercase; }
.bonus-banner { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 12px; border-radius: 12px; background: linear-gradient(135deg, rgba(251,191,36,.12), rgba(139,92,246,.12)); border: 1px solid rgba(251,191,36,.3); }
.bonus-banner b { color: #fde68a; }
.chat-empty { padding: 0 16px 16px; text-align: center; }
.chat-list:not(:empty) + .chat-empty { display: none; }

/* Logo (Bild) */
.logo-img { width: 36px; height: 36px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 14px rgba(59, 130, 246, 0.45)); }

/* Daily Case & Promo-Items */
.promo .mc-art { display: grid; place-items: center; }
.promo .mc-art .mc { width: 96px; height: 96px; filter: drop-shadow(0 10px 26px color-mix(in srgb, var(--c, #8b5cf6) 60%, transparent)); }
.case-card.daily .p { color: #86efac; font-weight: 700; }

/* Wartungsmodus: Baustellen-Banner (oben im Seiteninhalt) */
.maint { margin-bottom: 20px; padding: 8px; border-radius: 18px;
  background: repeating-linear-gradient(-45deg, #facc15 0 22px, #111 22px 44px); box-shadow: 0 12px 30px -14px rgba(250,204,21,.45); }
.maint-in { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 12px; background: #0b0b0d; color: #fef9c3; }
.maint-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: #facc15; color: #111; font-size: 22px; font-weight: 900; }
.maint-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.maint-txt b { font-family: var(--display); font-size: 17px; color: #facc15; letter-spacing: .03em; text-transform: uppercase; }
.maint-txt span { font-size: 14px; color: #fef3c7; }
.maint-until { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: none; }
.maint-until span { font-size: 12px; color: #fde68a; opacity: .8; }
.maint-until b { font-family: var(--display); font-size: 17px; color: #fff; }
.maint-until small { font-size: 12px; color: #facc15; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .maint-in { flex-wrap: wrap; gap: 10px; }
  .maint-until { align-items: flex-start; text-align: left; width: 100%; }
}

/* Rechtstexte & Footer */
.legal { max-width: 860px; line-height: 1.65; font-size: 15px; color: var(--text); }
.legal h3 { font-size: 17px; margin: 22px 0 8px; }
.legal h3:first-child { margin-top: 0; }
.legal p { margin: 0 0 10px; color: #cbd5e1; }
.legal ul { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: #cbd5e1; }
.legal-modal { max-height: 60vh; overflow: auto; padding-right: 6px; font-size: 14px; }
.site-foot { margin-top: 40px; padding: 22px 0 6px; border-top: 1px solid var(--border); color: var(--muted-2); font-size: 12.5px; line-height: 1.6; }
.site-foot .sf-links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.site-foot .sf-links a { color: var(--muted); font-weight: 600; font-size: 13.5px; }
.site-foot .sf-links a:hover { color: var(--text); }
.site-foot p { margin: 0; }

/* Startseite: Elytra */
.hero-elytra { image-rendering: pixelated; filter: drop-shadow(0 12px 30px rgba(139, 92, 246, .55)); }

/* Blackjack */
.bj-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.bj-actions .btn { padding-left: 8px; padding-right: 8px; }
.bj-rules { line-height: 1.6; }
.bj-stage { background: radial-gradient(ellipse at 50% 30%, #14532d 0%, #0b2e1a 55%, var(--surface) 100%); }
.bj-table { width: 100%; max-width: 640px; min-height: 480px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 22px; }
.bj-hands { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.bj-side { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; border: 2px solid transparent; transition: border-color .2s, background .2s; }
.bj-side.on { border-color: rgba(139, 92, 246, .7); background: rgba(139, 92, 246, .08); }
.bj-side.r-win { border-color: rgba(34, 197, 94, .7); }
.bj-side.r-lose { opacity: .75; }
.bj-label { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #d1fae5; font-size: 14px; }
.bj-total { min-width: 34px; text-align: center; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .45); color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; }
.bj-total.bust { background: var(--red); }
.bj-res { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.bj-res.win { background: var(--green); color: #052e16; } .bj-res.lose { background: var(--red); color: #fff; } .bj-res.push { background: #64748b; color: #fff; }
.bj-msg { color: #d1fae5; font-weight: 600; text-align: center; min-height: 22px; }
.bj-msg .pos { color: #4ade80; }
.bj-cards { display: flex; min-height: 112px; }
.bj-cards .pcard + .pcard { margin-left: -34px; }
.pcard { position: relative; width: 78px; height: 110px; border-radius: 10px; background: #fff; color: #0f172a; box-shadow: 0 8px 22px rgba(0, 0, 0, .45); font-family: var(--display); flex: none; }
.pcard.red { color: #dc2626; }
.pcard .pc-tl, .pcard .pc-br { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; font-weight: 800; font-size: 17px; }
.pcard .pc-tl { top: 7px; left: 7px; } .pcard .pc-br { bottom: 7px; right: 7px; transform: rotate(180deg); }
.pcard i { font-style: normal; font-size: 14px; margin-top: 2px; }
.pcard .pc-mid { position: absolute; inset: 0; display: grid; place-items: center; font-size: 38px; }
.pcard.back { background: repeating-linear-gradient(45deg, #6d28d9 0 8px, #7c3aed 8px 16px); border: 4px solid #fff; }
.pcard.deal { animation: bjDeal .35s ease-out both; }
@keyframes bjDeal { from { transform: translate(40px, -60px) rotate(8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 560px) {
  .pcard { width: 62px; height: 88px; } .pcard .pc-mid { font-size: 30px; } .bj-cards { min-height: 90px; } .bj-cards .pcard + .pcard { margin-left: -28px; }
  .bj-table { min-height: 380px; }
}
