@font-face {
  font-family: "Bungee";
  src: url("../fonts/bungee-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root {
  --bg: #121633; --panel: #1d2250; --panel-2: #0d1028; --line: #2f3577;
  --yellow: #ffd45c; --yellow-2: #ffe599; --red: #e2433f; --red-deep: #c8322e; --red-dark: #7c1513;
  --teal: #4ec9c0; --teal-2: #7fe3da; --cream: #fff4dc; --muted: #e6dcc6; --muted-2: #c9c0ab;
  --win: #6ee7a8; --lose: #ff8a80; --felt: #17653f;
  --display: "Bungee", "Arial Black", Impact, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body); color: var(--cream); min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(900px 500px at 80% -100px, #2a2f6b 0%, #171b40 45%, var(--bg) 100%) fixed, var(--bg);
}
a { color: var(--yellow); } a:hover { color: var(--yellow-2); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
.display { font-family: var(--display); font-weight: 400; }
.muted { color: var(--muted); } .muted-2 { color: var(--muted-2); } .small { font-size: 13px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header ---------- */
header.top { background: var(--panel-2); border-bottom: 4px solid var(--red); position: sticky; top: 0; z-index: 30; }
.top-in { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo span { font-family: var(--display); font-size: 24px; color: var(--yellow); text-shadow: 0 0 14px rgba(255,212,92,.45); }
nav.main { display: flex; gap: 6px; flex-wrap: wrap; }
nav.main a { padding: 10px 14px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; }
nav.main a.active { background: var(--red); color: var(--cream); }
.spacer { flex: 1; }
.balance { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 12px; background: var(--yellow); color: #2a1d00; }
.balance b { font-family: var(--display); font-weight: 400; font-size: 17px; font-variant-numeric: tabular-nums; }
.balance.bump { animation: bump .5s ease; }
@keyframes bump { 40% { transform: scale(1.12); } }
.me-btn { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 3px 10px 3px 3px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel); color: var(--cream); font-weight: 700; text-decoration: none; }
.me-btn:hover { border-color: var(--yellow); color: var(--cream); }

main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 24px 20px 48px; flex: 1; }
.card { border-radius: 22px; background: var(--panel); border: 2px solid var(--line); padding: 22px; }
.card.dark { background: var(--panel-2); }
.card h2, .h2 { margin: 0 0 14px; font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--yellow); }
.row { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.grow { flex: 999 1 560px; min-width: 0; }
.side { flex: 1 1 300px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 22px; }

/* ---------- Avatare ---------- */
.ava { display: inline-flex; flex: none; border-radius: 30%; overflow: hidden; background: var(--line); box-shadow: 0 0 0 2px rgba(255,244,220,.15); }
.ava svg, .ava img { width: 100%; height: 100%; display: block; object-fit: cover; }
.ava.ring { box-shadow: 0 0 0 3px var(--yellow), 0 0 18px rgba(255,212,92,.35); }

/* ---------- Buttons & Felder ---------- */
.btn { min-height: 50px; padding: 0 22px; border-radius: 12px; border: none; font-family: var(--display); font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn-yellow { background: var(--yellow); color: #2a1d00; } a.btn-yellow:hover { color: #2a1d00; }
.btn-navy { background: var(--bg); color: var(--yellow); }
.btn-teal { background: var(--teal); color: var(--panel-2); }
.btn-red { background: var(--red); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--cream); border: 3px solid var(--yellow); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.field { min-height: 50px; border-radius: 12px; border: 2px solid var(--line); background: var(--panel-2); color: var(--cream); padding: 0 14px; font-size: 17px; font-weight: 700; outline: none; width: 100%; }
.field:focus { border-color: var(--yellow); }
.field.light { background: var(--cream); color: #2a1d00; border: none; font-weight: 800; }
label.lbl { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.quick { min-height: 50px; min-width: 48px; padding: 0 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--panel-2); color: var(--muted); font-weight: 700; }
.quick:hover { border-color: var(--yellow); color: var(--cream); }
.msg { font-size: 14px; padding: 10px 12px; border-radius: 10px; display: none; }
.msg.err { display: block; background: rgba(226,67,63,.15); border: 1px solid rgba(226,67,63,.5); color: #ffc2bd; }
.msg.ok  { display: block; background: rgba(78,201,192,.14); border: 1px solid rgba(78,201,192,.5); color: #b8f3ec; }
.result { min-height: 26px; font-weight: 800; font-size: 17px; }
.result.win { color: var(--win); } .result.lose { color: var(--lose); }
.bet-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.bet-row label { flex: 1 1 140px; }
.seg { display: flex; gap: 10px; }
.seg button { flex: 1; min-height: 50px; border-radius: 12px; border: 3px solid var(--yellow); background: transparent; color: var(--cream); font-family: var(--display); font-size: 15px; }
.seg button.active { background: var(--yellow); color: #2a1d00; }

/* ---------- Auth ---------- */
.auth { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
.hero-title { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 5vw, 56px); line-height: 1.02; margin: 8px 0 14px; color: var(--cream); text-shadow: 3px 3px 0 var(--red-dark); }
.hero-title em { font-style: normal; color: var(--yellow); }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab { flex: 1; min-height: 46px; border-radius: 10px; border: 2px solid var(--line); background: transparent; color: var(--muted); font-family: var(--display); font-size: 14px; }
.tab.active { background: var(--yellow); color: #2a1d00; border-color: var(--yellow); }
form.f { display: grid; gap: 12px; }
.hint { font-size: 12px; min-height: 16px; font-weight: 600; }
.hint.ok { color: var(--win); } .hint.bad { color: var(--lose); }
.linkbtn { background: none; border: none; color: var(--muted); text-decoration: underline; padding: 6px 0; font-size: 13px; justify-self: start; }

/* ---------- Lobby: Profil-Banner ---------- */
.marquee { border-radius: 28px; background: var(--red-deep); border: 8px dotted var(--yellow); padding: 24px 28px; box-shadow: 0 0 40px rgba(255,212,92,.22); }
.profile-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.profile-hero .who { flex: 1 1 240px; min-width: 0; }
.profile-hero h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.05; color: var(--cream); text-shadow: 3px 3px 0 var(--red-dark); overflow-wrap: anywhere; }
.profile-hero .sub { color: #ffe9d6; font-weight: 600; margin-top: 6px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pill { background: rgba(13,16,40,.45); border: 2px solid rgba(255,212,92,.5); border-radius: 12px; padding: 8px 12px; }
.pill .k { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #ffd9c9; }
.pill .v { font-family: var(--display); font-size: 17px; color: var(--yellow); }
.bonus { border-radius: 28px; background: var(--panel); border: 3px solid var(--teal); padding: 22px; display: flex; flex-direction: column; justify-content: center; gap: 10px; text-align: center; }
.bonus .big { font-family: var(--display); font-size: 50px; line-height: 1; color: var(--yellow); text-shadow: 0 0 18px rgba(255,212,92,.5); }

/* ---------- Lobby: Kategorien & Spiele ---------- */
.catbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.catbar button { min-height: 42px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--panel-2); color: var(--muted); font-weight: 800; }
.catbar button.active { background: var(--yellow); border-color: var(--yellow); color: #2a1d00; }
.catbar .search { flex: 1 1 200px; max-width: 320px; margin-left: auto; min-height: 42px; border-radius: 999px; font-size: 15px; }
.cat-head { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 12px; }
.cat-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--yellow); }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.game { position: relative; border-radius: 18px; background: var(--panel); border: 2px solid var(--line); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--cream); }
a.game:hover { border-color: var(--yellow); transform: translateY(-3px); transition: transform .15s; color: var(--cream); }
.game .art { height: 110px; display: grid; place-items: center; background: radial-gradient(120px 90px at 50% 40%, rgba(255,255,255,.12), transparent 70%), var(--tile, #2a1f5c); }
.game .art svg { filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.game .info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.game .name { font-family: var(--display); font-size: 16px; }
.game .desc { font-size: 13px; color: var(--muted); line-height: 1.35; }
.game .tag { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 8px; background: var(--yellow); color: #2a1d00; }
.game .tag.soon { background: rgba(13,16,40,.75); color: var(--muted); }
.game .tag.multi { background: var(--teal); color: var(--panel-2); }
.game.soon { opacity: .72; }
.game.soon .art { filter: saturate(.55); }

/* ---------- Bestenliste & Tabellen ---------- */
ol.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
ol.board li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; cursor: pointer; }
ol.board li:hover { background: rgba(255,255,255,.05); }
ol.board li.me { background: #2a1f5c; }
.rk { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 12px; background: var(--panel); color: var(--muted); flex: none; }
.rk.r1 { background: var(--yellow); color: #2a1d00; } .rk.r2 { background: #d6dbe6; color: var(--panel); } .rk.r3 { background: var(--red); color: var(--cream); }
ol.board .nm { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol.board .cn { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid rgba(47,53,119,.8); font-size: 14px; }
th { color: var(--muted-2); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
td.num, th.num { text-align: right; }
.pos { color: var(--win); } .neg { color: var(--lose); }
.who-cell { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.scroll-x { overflow-x: auto; }

/* ---------- Profil-Seite ---------- */
.ava-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 10px; }
.ava-grid button { padding: 0; border: 3px solid transparent; border-radius: 30%; background: none; aspect-ratio: 1; }
.ava-grid button.sel { border-color: var(--yellow); }
.ava-grid button .ava { width: 100%; height: 100%; }

/* ---------- Modal & Toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(5,6,18,.7); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { width: min(440px, 100%); border-radius: 24px; background: var(--panel); border: 3px solid var(--yellow); padding: 24px; position: relative; }
.modal .x { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel-2); color: var(--cream); font-size: 18px; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 60; max-width: min(360px, calc(100vw - 32px)); }
.toast { background: var(--panel-2); border: 2px solid var(--yellow); border-radius: 14px; padding: 12px 14px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: tin .25s ease; }
.toast.win { border-color: var(--win); } .toast.lose { border-color: var(--lose); }
@keyframes tin { from { transform: translateY(12px); opacity: 0; } }

/* ---------- Spielseiten allgemein ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 700; margin-bottom: 14px; }
.game-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.game-head h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 44px); color: var(--cream); text-shadow: 3px 3px 0 var(--red-dark); }
.game-head .art-sm { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--tile, #2a1f5c); }

/* Coinflip */
.coin-wrap { perspective: 800px; display: grid; place-items: center; height: 190px; }
.coin { width: 150px; height: 150px; position: relative; transform-style: preserve-3d; transition: transform 1.6s cubic-bezier(.2,.7,.2,1); }
.face { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; backface-visibility: hidden;
        background: radial-gradient(circle at 35% 30%, #fff3c4, var(--yellow) 50%, #c9971f 100%);
        box-shadow: inset 0 0 0 8px rgba(184,134,11,.5), 0 12px 30px rgba(0,0,0,.45); }
.face.back { transform: rotateY(180deg); background: radial-gradient(circle at 35% 30%, #d9fffb, var(--teal-2) 50%, #2a8f86 100%); }
.face span { font-family: var(--display); font-size: 54px; color: #8a2a12; line-height: 1; text-align: center; }
.face.back span { color: #0d1028; }
.face small { display: block; font-size: 11px; letter-spacing: .2em; margin-top: 2px; }

/* Dice */
.dice-num { font-family: var(--display); font-size: clamp(56px, 10vw, 96px); line-height: 1; text-align: center; color: var(--cream); font-variant-numeric: tabular-nums; }
.dice-num.win { color: var(--win); text-shadow: 0 0 24px rgba(110,231,168,.5); } .dice-num.lose { color: var(--lose); }
.track { position: relative; height: 22px; border-radius: 11px; background: var(--red); margin: 18px 0 8px; }
.track .ok { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 11px 0 0 11px; background: var(--teal); }
.track .marker { position: absolute; top: -10px; width: 6px; height: 42px; margin-left: -3px; border-radius: 3px; background: var(--cream); box-shadow: 0 0 10px rgba(0,0,0,.5); transition: left .9s cubic-bezier(.2,.7,.2,1); }
input[type=range] { width: 100%; accent-color: var(--yellow); height: 34px; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--panel-2); border: 2px solid var(--line); border-radius: 14px; padding: 12px; }
.stat .k { font-size: 12px; color: var(--muted-2); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.stat .v { font-family: var(--display); font-size: 21px; color: var(--yellow); margin-top: 4px; }

/* Roulette */
.wheel { width: 170px; height: 170px; border-radius: 50%; flex: none; display: grid; place-items: center;
         background: repeating-conic-gradient(var(--red) 0 9.73deg, #14162e 9.73deg 19.46deg); border: 8px dotted var(--yellow); box-shadow: 0 0 30px rgba(255,212,92,.25); }
.wheel-in { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 42px; color: var(--cream); background: #0b0d22; border: 4px solid var(--yellow); }
.wheel-in.red { background: var(--red); } .wheel-in.black { background: #14162e; } .wheel-in.green { background: #1f8a5b; }
.recent { display: flex; gap: 6px; flex-wrap: wrap; }
.recent span { min-width: 34px; height: 34px; padding: 0 6px; border-radius: 17px; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { width: 52px; height: 52px; border-radius: 50%; border: 4px dashed rgba(255,255,255,.75); font-weight: 900; font-size: 14px; color: #fff; }
.chip.sel { outline: 3px solid var(--yellow); outline-offset: 3px; }
.rtable { display: grid; grid-template-columns: 52px repeat(12, minmax(38px, 1fr)) 52px; grid-template-rows: repeat(3, 50px) 46px 46px; gap: 4px; min-width: 640px; background: var(--felt); border: 6px solid #6b3f17; border-radius: 16px; padding: 10px; }
.spot { position: relative; border: 2px solid rgba(255,244,220,.55); border-radius: 6px; background: transparent; color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; padding: 0; }
.spot:hover { box-shadow: inset 0 0 0 999px rgba(255,255,255,.12); }
.spot.n-red { background: #c9302c; } .spot.n-black { background: #1b1d30; } .spot.n-green { background: #1f8a5b; }
.spot.win { box-shadow: 0 0 0 3px var(--yellow), 0 0 16px var(--yellow); }
.spot .stake { position: absolute; right: -6px; top: -8px; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 13px; background: var(--yellow); color: #2a1d00; border: 2px dashed #b8860b; font-size: 11px; font-weight: 900; display: grid; place-items: center; z-index: 2; pointer-events: none; }

/* Karten (Blackjack, später Poker & Hi-Lo) */
.felt { border-radius: 28px; background: radial-gradient(600px 300px at 50% 0%, #1f7a4d, var(--felt) 60%, #0f4a2d); border: 8px solid #6b3f17; padding: 22px; box-shadow: inset 0 0 40px rgba(0,0,0,.35); }
.hand { display: flex; gap: 10px; flex-wrap: wrap; min-height: 112px; align-items: center; }
.pcard { width: 74px; height: 104px; border-radius: 10px; background: #fffaf0; color: #121633; position: relative; box-shadow: 0 6px 14px rgba(0,0,0,.35); animation: deal .3s ease; flex: none; }
.pcard.red { color: #c9302c; }
.pcard .tl { position: absolute; left: 7px; top: 5px; font-family: var(--display); font-size: 17px; line-height: 1; text-align: center; }
.pcard .tl i { display: block; font-style: normal; font-size: 15px; }
.pcard .mid { position: absolute; inset: 0; display: grid; place-items: center; font-size: 36px; }
.pcard.back { background: repeating-linear-gradient(45deg, var(--red) 0 8px, var(--red-deep) 8px 16px); border: 4px solid #fffaf0; }
@keyframes deal { from { transform: translateY(-24px) rotate(-6deg); opacity: 0; } }
.hand-label { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; font-weight: 800; color: #e7f5ec; }
.val { min-width: 40px; height: 30px; padding: 0 10px; border-radius: 15px; background: rgba(0,0,0,.4); display: inline-grid; place-items: center; font-family: var(--display); font-size: 14px; color: var(--yellow); }
.banner { text-align: center; font-family: var(--display); font-size: clamp(20px, 3vw, 28px); padding: 10px; min-height: 52px; }
.banner.win { color: var(--win); } .banner.lose { color: var(--lose); } .banner.push { color: var(--yellow); }

/* Crash */
.crash-stage { position: relative; border-radius: 22px; background: var(--panel-2); border: 2px solid var(--line); overflow: hidden; }
.crash-stage canvas { display: block; width: 100%; height: 320px; }
.crash-mult { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; }
.crash-mult .m { font-family: var(--display); font-size: clamp(48px, 9vw, 86px); line-height: 1; color: var(--cream); text-shadow: 0 0 30px rgba(255,212,92,.35); font-variant-numeric: tabular-nums; }
.crash-mult .m.crashed { color: var(--lose); }
.crash-mult .s { margin-top: 8px; font-weight: 800; color: var(--muted); }
.hist { display: flex; gap: 6px; flex-wrap: wrap; }
.hist span { padding: 5px 10px; border-radius: 10px; font-weight: 800; font-size: 13px; background: var(--panel-2); border: 2px solid var(--line); }
.hist .lo { color: var(--lose); } .hist .mid { color: var(--win); } .hist .hi { color: var(--yellow); border-color: var(--yellow); }

/* Duell */
.duel-list { display: flex; flex-direction: column; gap: 8px; }
.duel-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--panel-2); border: 2px solid var(--line); flex-wrap: wrap; }
.duel-item.mine { border-color: var(--teal); }
.duel-item .nm { font-weight: 800; }
.duel-item .amt { font-family: var(--display); color: var(--yellow); }

footer { border-top: 4px solid var(--red); background: var(--panel-2); padding: 18px 20px; text-align: center; font-size: 13px; color: var(--muted-2); display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .top-in { gap: 10px; }
  nav.main { order: 5; width: 100%; }
  nav.main a { flex: 1; text-align: center; }
  .me-btn .nm { display: none; }
  .marquee { padding: 18px; border-width: 6px; }
  .catbar .search { max-width: none; margin-left: 0; }
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .game .art { height: 86px; }
  .game .art svg { width: 58px; height: 58px; }
  .game .info { padding: 10px 11px 12px; }
  .game .name { font-size: 14px; }
  .game .desc { font-size: 12px; }
  .pcard { width: 60px; height: 86px; }
  .pcard .mid { font-size: 28px; }
  .crash-stage canvas { height: 240px; }
}

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; height: 380px; }
.chat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; color: var(--yellow); }
.chat-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 4px 8px; }
.chat-row { display: flex; gap: 10px; align-items: flex-start; }
.chat-row.mine .chat-body { background: #2a1f5c; border-color: var(--yellow); }
.chat-meta { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--muted-2); }
.chat-meta b { color: var(--cream); font-size: 13px; cursor: pointer; }
.chat-body { margin-top: 3px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; padding: 7px 10px; font-size: 14px; overflow-wrap: anywhere; max-width: 100%; }
.chat-form { display: flex; gap: 8px; margin-top: 8px; }
.chat-form .field { min-height: 44px; font-size: 15px; font-weight: 500; }
.gchat-btn { position: fixed; left: 16px; bottom: 16px; z-index: 40; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 3px solid var(--yellow); background: var(--panel-2); color: var(--cream); font-weight: 800; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.gchat-btn .online { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 700; }
.gchat-btn .dot, .dot-on { width: 8px; height: 8px; border-radius: 50%; background: var(--win); display: inline-block; }
.gchat { position: fixed; left: 16px; bottom: 76px; z-index: 45; width: min(380px, calc(100vw - 32px)); background: var(--panel); border: 3px solid var(--yellow); border-radius: 20px; padding: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.gchat .x { position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel-2); color: var(--cream); z-index: 2; }
.gchat .chat { height: min(460px, 60vh); }
.gchat .chat-head { padding-right: 44px; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 900; margin-left: 4px; }
nav.main a.active .badge { background: var(--yellow); color: #2a1d00; }
.qr-box { display: inline-block; padding: 10px; border-radius: 16px; background: var(--cream); }
.qr-box svg { display: block; width: 200px; height: 200px; }
@media (max-width: 860px) { .gchat { left: 8px; right: 8px; width: auto; bottom: 72px; } }

/* ---------- Paket 1 ---------- */
.plinko-slots { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 3px; margin-top: 6px; }
.plinko-slots span { border-radius: 6px; text-align: center; font-size: 11px; font-weight: 900; color: #1b1407; padding: 6px 0; }
.plinko-slots span.hit { animation: hit .5s ease; }
@keyframes hit { 40% { transform: translateY(6px) scale(1.12); box-shadow: 0 0 16px #fff; } }
.wheel-wrap { position: relative; width: 300px; max-width: 100%; }
.wheel-wrap svg { width: 100%; height: auto; display: block; }
.wheel-ptr { position: absolute; left: 50%; top: -8px; transform: translateX(-50%); width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 28px solid var(--cream); z-index: 2; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.slot-machine { border-radius: 28px; background: var(--red-deep); border: 8px dotted var(--yellow); padding: 26px; box-shadow: 0 0 40px rgba(255,212,92,.22); }
.reels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.reel { background: var(--cream); border-radius: 16px; height: 130px; display: grid; place-items: center; box-shadow: inset 0 10px 20px rgba(0,0,0,.25), inset 0 -10px 20px rgba(0,0,0,.25); }
.reel.spin svg { filter: blur(1.5px); }
.scratch-card { background: linear-gradient(160deg, var(--yellow), #ffb347); border-radius: 20px; padding: 18px; width: min(380px, 100%); box-shadow: 0 14px 30px rgba(0,0,0,.4); }
.scratch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sc-tile { aspect-ratio: 1; border-radius: 12px; position: relative; background: var(--cream); display: grid; place-items: center; overflow: hidden; touch-action: none; user-select: none; cursor: pointer; }
.sc-tile span { font-family: var(--display); font-size: 22px; color: #8a2a12; }
.sc-tile::after { content: 'RUBBELN'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 900; letter-spacing: .1em; color: #6b6b6b;
  background: repeating-linear-gradient(45deg, #c9c0ab 0 6px, #b8b0a0 6px 12px); transition: opacity .35s; }
.sc-tile.open::after { opacity: 0; }
.sc-tile.open.w { background: #6ee7a8; }
.keno-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.keno-grid button { aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--line); background: var(--panel-2); color: var(--muted); font-weight: 800; font-size: 14px; }
.keno-grid button.pick { border-color: var(--yellow); color: var(--yellow); }
.keno-grid button.drawn { background: var(--line); color: var(--cream); }
.keno-grid button.hit { background: var(--yellow); color: #2a1d00; border-color: var(--yellow); box-shadow: 0 0 14px rgba(255,212,92,.6); }
.mines-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; width: min(440px, 100%); }
.mines-grid button { aspect-ratio: 1; border-radius: 12px; border: none; background: linear-gradient(180deg, #2f3577, #232861); display: grid; place-items: center; padding: 0; box-shadow: 0 4px 0 #14183d; }
.mines-grid button:not(:disabled):hover { transform: translateY(-2px); background: #3a4190; }
.mines-grid button:disabled { cursor: default; opacity: 1; }
.mines-grid button.gem { background: #123d3a; box-shadow: none; animation: pop .25s ease; }
.mines-grid button.bomb { background: #3a1420; box-shadow: none; }
.mines-grid button.boom { background: var(--red); }
@keyframes pop { from { transform: scale(.6); } }
.tower { display: flex; flex-direction: column; gap: 6px; max-width: 520px; margin: 0 auto; }
.tw-row { display: flex; gap: 6px; align-items: center; padding: 4px; border-radius: 12px; }
.tw-row.active { background: rgba(255,212,92,.12); outline: 2px solid var(--yellow); }
.tw-row .tw-m { width: 64px; font-weight: 800; font-size: 13px; color: var(--muted-2); text-align: right; padding-right: 6px; }
.tw-row.active .tw-m { color: var(--yellow); }
.tw-row button { flex: 1; height: 44px; border-radius: 10px; border: none; background: #2f3577; color: var(--cream); font-weight: 900; font-size: 18px; }
.tw-row button:disabled { cursor: default; opacity: .75; }
.tw-row.active button { background: #3a4190; opacity: 1; }
.tw-row button.ok { background: var(--teal); color: #0d1028; opacity: 1; }
.tw-row button.bomb { background: var(--red); opacity: 1; }
.tw-row button.bomb.dim { opacity: .45; }
@media (max-width: 860px) { .reel { height: 100px; } .keno-grid { gap: 4px; } .keno-grid button { font-size: 12px; } }
.seg { flex-wrap: wrap; }
.seg button { min-width: 70px; padding: 0 8px; font-size: 13px; }
main { padding-bottom: 90px; }

/* ---------- Poker ---------- */
.pk-codeform { display: flex; gap: 10px; }
.pk-codeform .field { text-transform: uppercase; letter-spacing: .18em; font-family: var(--display); }
.pk-item .pk-chip-ico { width: 40px; height: 40px; display: grid; place-items: center; }
.pk-item .pk-chip-ico svg { width: 40px; height: 40px; }
.pk-players { font-family: var(--display); color: var(--teal-2); min-width: 44px; text-align: center; }
.pk-players.full { color: var(--lose); }
.pk-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; }
.pk-top > div:first-child { flex: 1 1 200px; }
.pk-title { font-size: 22px; color: var(--yellow); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-codebtn { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--bg); border: 2px dashed var(--yellow); color: var(--cream); border-radius: 12px; padding: 6px 16px; font-weight: 700; font-size: 12px; }
.pk-codebtn b { font-family: var(--display); font-size: 20px; color: var(--yellow); letter-spacing: .12em; }
.pk-codebtn .small { color: var(--muted-2); font-size: 11px; }
.pk-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.pk-table { position: relative; height: 470px; margin: 18px 0; }
.pk-felt { position: absolute; inset: 52px 70px; border-radius: 999px; background: radial-gradient(ellipse at 50% 40%, #1f8a55 0%, var(--felt) 55%, #0f4a2d 100%);
  border: 12px solid #5a2a17; box-shadow: inset 0 0 0 3px rgba(255,212,92,.35), inset 0 10px 40px rgba(0,0,0,.45), 0 16px 40px rgba(0,0,0,.45); }
.pk-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 10%; text-align: center; }
.pk-board { display: flex; gap: 8px; justify-content: center; }
.pk-board .pcard.board { width: 54px; height: 76px; }
.pk-board .pcard.board .tl { font-size: 14px; left: 5px; } .pk-board .pcard.board .tl i { font-size: 12px; }
.pk-board .pcard.board .mid { font-size: 26px; }
.pk-slot { width: 54px; height: 76px; border-radius: 9px; border: 2px dashed rgba(255,244,220,.22); flex: none; }
.pk-slot.big { width: 74px; height: 104px; }
.pk-pot { font-weight: 800; color: var(--cream); min-height: 22px; }
.pk-pot b { font-family: var(--display); color: var(--yellow); font-size: 20px; }
.pk-msg { font-weight: 700; color: var(--cream); font-size: 15px; line-height: 1.45; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.pk-msg b { color: var(--yellow); }

.pk-seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 2; width: 144px; }
.pk-seat.empty { width: 92px; height: 54px; border-radius: 14px; border: 2px dashed rgba(255,244,220,.25); display: grid; place-items: center; color: var(--muted-2); font-size: 13px; font-weight: 700; background: rgba(13,16,40,.4); }
.pk-plate { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 3px solid var(--line); border-radius: 14px; padding: 5px 10px 5px 5px; width: 100%; box-shadow: 0 8px 18px rgba(0,0,0,.4); }
.pk-info { min-width: 0; }
.pk-info .nm { font-weight: 800; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 86px; }
.pk-info .stk { font-family: var(--display); color: var(--yellow); font-size: 14px; }
.pk-seat.me .pk-plate { border-color: var(--teal); }
.pk-seat.turn .pk-plate { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,212,92,.35), 0 0 24px rgba(255,212,92,.45); }
.pk-seat.win .pk-plate { border-color: var(--win); box-shadow: 0 0 24px rgba(110,231,168,.5); }
.pk-seat.folded .pk-plate, .pk-seat.out .pk-plate { opacity: .5; }
.pk-cards { display: flex; gap: 3px; height: 48px; }
.pcard.mini { width: 34px; height: 48px; border-radius: 6px; box-shadow: 0 3px 8px rgba(0,0,0,.4); }
.pcard.mini .tl { font-size: 12px; left: 4px; top: 3px; } .pcard.mini .tl i { font-size: 11px; }
.pcard.mini .mid { display: none; }
.pcard.mini.back { border-width: 2px; }
.pk-act { font-size: 12px; font-weight: 800; background: var(--bg); color: var(--teal-2); border-radius: 999px; padding: 2px 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-act.w { color: var(--win); font-family: var(--display); }
.pk-timer { width: 100%; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.pk-timer i { display: block; height: 100%; background: var(--yellow); transition: width .2s linear; }
.pk-timer i.low { background: var(--red); }
.pk-dealer { position: absolute; right: -14px; top: 50%; width: 26px; height: 26px; border-radius: 50%; background: var(--cream); color: var(--bg); font-family: var(--display); font-size: 13px; display: grid; place-items: center; box-shadow: 0 3px 8px rgba(0,0,0,.4); }
.pk-bet { position: absolute; transform: translate(-50%, -50%); z-index: 1; display: flex; align-items: center; gap: 5px; font-family: var(--display); font-size: 13px; color: var(--cream); background: rgba(13,16,40,.75); border-radius: 999px; padding: 3px 10px 3px 4px; }
.pk-bet i { width: 16px; height: 16px; border-radius: 50%; background: var(--red); border: 3px dashed var(--cream); }

.pk-me-in { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.pk-hole { display: flex; gap: 8px; }
.pk-hole.folded { opacity: .4; filter: grayscale(.7); }
.pk-myinfo { min-width: 110px; }
.pk-stack { font-size: 24px; color: var(--yellow); }
.pk-handname { font-weight: 800; color: var(--teal-2); margin-top: 4px; }
.pk-actions { flex: 1 1 320px; display: flex; flex-direction: column; gap: 10px; }
.pk-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.pk-acts .btn { flex: 1 1 110px; }
.pk-raise { display: grid; grid-template-columns: 1fr 120px; gap: 10px; align-items: center; }
.pk-raise input[type=range] { width: 100%; accent-color: var(--yellow); }
.pk-raise .field { min-height: 42px; font-size: 15px; }
.pk-q { grid-column: 1 / -1; display: flex; gap: 6px; }
.pk-q button { flex: 1; min-height: 36px; border-radius: 9px; border: 2px solid var(--line); background: var(--panel-2); color: var(--cream); font-weight: 800; font-size: 13px; }
.pk-q button:hover { border-color: var(--yellow); }

@media (max-width: 640px) {
  .pk-table { height: 540px; margin: 12px -6px; }
  .pk-felt { inset: 70px 34px; border-width: 8px; }
  .pk-center { padding: 0 4%; gap: 6px; }
  .pk-board { gap: 4px; }
  .pk-board .pcard.board, .pk-slot { width: 34px; height: 49px; }
  .pk-board .pcard.board .tl { font-size: 11px; left: 3px; top: 3px; } .pk-board .pcard.board .tl i { font-size: 10px; } .pk-board .pcard.board .mid { font-size: 15px; padding-top: 12px; }
  .pk-seat { width: 82px; gap: 3px; } .pk-seat.empty { width: 64px; height: 44px; font-size: 11px; }
  .pk-plate { padding: 3px 6px 3px 3px; gap: 5px; border-width: 2px; border-radius: 11px; }
  .pk-plate .ava { width: 30px !important; height: 30px !important; }
  .pk-info .nm { font-size: 11px; max-width: 44px; } .pk-info .stk { font-size: 12px; }
  .pk-cards { height: 38px; } .pcard.mini { width: 27px; height: 38px; } .pcard.mini .tl { font-size: 10px; left: 3px; }
  .pk-act { font-size: 10px; padding: 1px 7px; }
  .pk-dealer { width: 20px; height: 20px; font-size: 10px; right: -4px; }
  .pk-bet { font-size: 11px; }
  .pk-msg { font-size: 13px; }
  .pk-slot.big { width: 60px; height: 86px; }
  .pk-me-in { gap: 14px; }
  .pk-raise { grid-template-columns: 1fr 96px; }
  .pk-top .pk-btns { width: 100%; } .pk-top .pk-btns .btn { flex: 1; }
}
