/* ================= RESET & BASE ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --felt: #0b6b3a;
  --felt-dark: #084d2a;
  --bg: #10131a;
  --bg2: #171b26;
  --panel: #1e2330;
  --gold: #f5c542;
  --gold-dark: #b8860b;
  --red: #d4243b;
  --black-num: #23262f;
  --green-num: #0f9d58;
  --text: #eef1f6;
  --muted: #9aa3b2;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --radius: 14px;
}

html, body { height: 100%; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1200px 600px at 50% -10%, #1c2942 0%, transparent 60%),
    linear-gradient(160deg, #0c0f16, #10131a 60%, #0a0d13);
  color: var(--text);
  min-height: 100%;
  padding-bottom: 40px;
}

/* ================= TOPBAR ================= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px;
  background: linear-gradient(180deg, rgba(20,24,34,.98), rgba(20,24,34,.86));
  border-bottom: 1px solid rgba(245,197,66,.25);
  backdrop-filter: blur(6px);
}
.brand {
  font-size: 1.5rem; font-weight: 800; letter-spacing: .5px;
  cursor: pointer; user-select: none;
  color: var(--gold);
  text-shadow: 0 2px 8px rgba(245,197,66,.25);
  display: flex; align-items: center; gap: 6px;
}
.brand-suit { color: #e7e9ee; font-size: 1.1rem; }
.brand-suit.red { color: var(--red); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.balance {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, #22283a, #171c29);
  border: 1px solid rgba(245,197,66,.35);
  padding: 8px 16px; border-radius: 999px;
  font-weight: 800; font-size: 1.1rem; color: var(--gold);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.chip-ico { font-size: 1.1rem; }

/* ================= BUTTONS ================= */
.btn {
  font: inherit; font-weight: 700; cursor: pointer;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, #2b3243, #212736);
  color: var(--text);
  padding: 10px 18px; border-radius: 10px;
  transition: transform .08s ease, filter .15s ease, background .15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.15); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
  color: #241a00; border-color: #ffe08a;
  box-shadow: 0 4px 14px rgba(245,197,66,.35);
}
.btn-topup {
  background: linear-gradient(180deg, #2fa96a, #1c7e4c);
  border-color: #4bd08c; color: #eafff3;
}
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.18); }
.btn-back { background: transparent; border-color: rgba(255,255,255,.15); }
.btn-icon { padding: 10px 12px; }
.btn-big { font-size: 1.25rem; padding: 16px 40px; }
.btn-small { padding: 6px 12px; font-size: .85rem; }

/* ================= SCREENS ================= */
main { max-width: 1080px; margin: 0 auto; padding: 24px 18px; }
.screen { display: none; animation: fade .35s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.game-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 18px;
}
.game-head h2 { font-size: 1.7rem; }
.game-head h2 small { color: var(--muted); font-weight: 500; font-size: .9rem; }
.game-head-spacer { flex: 1; }

/* ================= LOBBY ================= */
.lobby-hero { text-align: center; margin: 22px 0 34px; }
.lobby-hero h1 { font-size: 2.6rem; font-weight: 800; }
.lobby-hero .gold { color: var(--gold); text-shadow: 0 3px 16px rgba(245,197,66,.35); }
.lobby-hero p { color: var(--muted); margin-top: 8px; font-size: 1.1rem; }

.game-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.game-card {
  text-align: left; cursor: pointer; color: var(--text);
  background: linear-gradient(165deg, #202636, #171b26);
  border: 1px solid rgba(245,197,66,.18);
  border-radius: var(--radius); padding: 22px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
  font: inherit;
}
.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 16px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(245,197,66,.3);
}
.game-icon { font-size: 3rem; margin-bottom: 10px; }
.game-card h3 { font-size: 1.4rem; margin-bottom: 6px; color: var(--gold); }
.game-card p { color: var(--muted); font-size: .95rem; line-height: 1.4; min-height: 40px; }
.play-tag { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--gold); }
.disclaimer { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 30px; }

/* ================= FELT / TABLE ================= */
.felt {
  background:
    radial-gradient(120% 100% at 50% 0%, #0e8a4b 0%, var(--felt) 45%, var(--felt-dark) 100%);
  border: 8px solid #3a2410;
  box-shadow: var(--shadow), inset 0 0 60px rgba(0,0,0,.35);
  border-radius: 20px;
  padding: 26px 22px;
}

/* ================= CARDS ================= */
.hand { display: flex; gap: 10px; flex-wrap: wrap; min-height: 128px; align-items: center; }
.card {
  width: 84px; height: 120px; border-radius: 9px;
  background: linear-gradient(160deg, #ffffff, #eef0f4);
  color: #1a1a1a; position: relative;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
  border: 1px solid #cfd3dc;
  display: flex; align-items: center; justify-content: center;
  animation: dealIn .3s ease backwards;
  user-select: none; flex: 0 0 auto;
}
@keyframes dealIn {
  from { opacity: 0; transform: translateY(-30px) rotate(-8deg) scale(.9); }
  to { opacity: 1; transform: none; }
}
.card.red { color: var(--red); }
.card .pip { font-size: 2.6rem; }
.card .corner {
  position: absolute; font-weight: 800; line-height: 1;
  display: flex; flex-direction: column; align-items: center;
}
.card .corner b { font-size: 1rem; }
.card .corner i { font-size: .95rem; font-style: normal; }
.card .corner.tl { top: 6px; left: 7px; }
.card .corner.br { bottom: 6px; right: 7px; transform: rotate(180deg); }
.card.back {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 8px, transparent 8px 16px),
    linear-gradient(135deg, #2a4c8f, #16264d);
  background-color: #22447f;
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.4), inset 0 0 0 2px #16264d;
}
.card.back::after {
  content: "♠"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; color: rgba(255,255,255,.35);
}
.card.small { width: 60px; height: 86px; }
.card.small .pip { font-size: 1.9rem; }

/* ================= CHIP TRAY ================= */
.chip-tray { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  width: 52px; height: 52px; border-radius: 50%;
  cursor: pointer; font-weight: 800; color: #fff; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  border: 3px dashed rgba(255,255,255,.7);
  box-shadow: 0 4px 10px rgba(0,0,0,.4), inset 0 0 0 3px rgba(0,0,0,.15);
  transition: transform .1s ease, box-shadow .1s;
  position: relative; text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.chip:hover { transform: translateY(-4px) scale(1.06); }
.chip.selected { box-shadow: 0 0 0 3px var(--gold), 0 6px 14px rgba(0,0,0,.5); transform: translateY(-4px); }
.chip-5    { background: radial-gradient(circle at 35% 30%, #ff7a7a, #c0143a); }
.chip-25   { background: radial-gradient(circle at 35% 30%, #66d38a, #0c7a3f); }
.chip-100  { background: radial-gradient(circle at 35% 30%, #6ea8ff, #14459c); }
.chip-500  { background: radial-gradient(circle at 35% 30%, #c98bff, #5c1a9e); }
.chip-1000 { background: radial-gradient(circle at 35% 30%, #4a4a4a, #101010); border-color: var(--gold); color: var(--gold); }

/* ================= CONTROLS ================= */
.controls {
  margin-top: 20px; background: var(--panel);
  border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 16px;
}
.bet-area { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bet-label { font-weight: 700; color: var(--muted); }
.bet-current { margin-left: auto; font-size: 1.05rem; }
.bet-current b { color: var(--gold); }
.action-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ================= BLACKJACK ================= */
.bj-felt { display: flex; flex-direction: column; gap: 8px; min-height: 380px; }
.bj-row { display: flex; flex-direction: column; gap: 8px; }
.bj-label { font-weight: 800; font-size: 1.1rem; text-shadow: 0 2px 4px rgba(0,0,0,.4); }
.bj-score {
  background: rgba(0,0,0,.35); padding: 2px 12px; border-radius: 999px;
  margin-left: 8px; font-size: .95rem;
}
.bj-message {
  text-align: center; font-size: 1.15rem; font-weight: 700;
  padding: 12px; margin: 8px 0;
  background: rgba(0,0,0,.28); border-radius: 10px; min-height: 24px;
}
.bj-message.win { color: #7dff9e; }
.bj-message.lose { color: #ff8f8f; }
.bj-message.push { color: var(--gold); }

/* ================= ROULETTE ================= */
.roulette-layout { display: grid; grid-template-columns: 340px 1fr; gap: 24px; }
.wheel-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.wheel-pointer { font-size: 2rem; color: var(--gold); line-height: .4; z-index: 3; filter: drop-shadow(0 2px 3px #000); }
.wheel {
  width: 300px; height: 300px; border-radius: 50%;
  border: 10px solid #3a2410;
  position: relative;
  box-shadow: var(--shadow), inset 0 0 40px rgba(0,0,0,.6);
  transition: transform 5s cubic-bezier(.14,.85,.28,1);
}
.wheel-center {
  position: absolute; inset: 32%; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #3a4152, #12151d);
  border: 4px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 800; color: var(--gold);
  z-index: 2; box-shadow: inset 0 0 20px rgba(0,0,0,.7);
}
.wheel-num {
  position: absolute; top: 50%; left: 50%;
  font-size: .62rem; font-weight: 800; color: #fff;
  transform-origin: 0 0;
}
.roulette-history { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; max-width: 300px; }
.hist-num {
  width: 26px; height: 26px; border-radius: 50%; font-size: .75rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; color: #fff;
  border: 1px solid rgba(255,255,255,.3);
}

.roulette-board {
  display: grid;
  grid-template-columns: 40px repeat(12, 1fr) 40px;
  grid-auto-rows: 38px; gap: 3px; margin: 12px 0;
}
.rb-cell {
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .82rem; color: #fff; cursor: pointer;
  border: 1px solid rgba(255,255,255,.25); border-radius: 4px;
  position: relative; user-select: none;
  transition: filter .12s;
}
.rb-cell:hover { filter: brightness(1.3); }
.rb-red { background: var(--red); }
.rb-black { background: var(--black-num); }
.rb-green { background: var(--green-num); }
.rb-outside { background: #2a3040; font-size: .74rem; }
.rb-zero { grid-row: span 3; }
.rb-chip-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--gold); color: #241a00; font-size: .62rem; font-weight: 800;
  border-radius: 999px; padding: 1px 5px; border: 1px solid #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,.5);
}
.roulette-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.roulette-status b { color: var(--gold); font-size: 1.1rem; }
.roulette-right .bet-area { margin-bottom: 6px; }
.roulette-msg { min-height: 28px; margin-top: 12px; font-weight: 700; font-size: 1.1rem; text-align: center; }
.roulette-msg.win { color: #7dff9e; }
.roulette-msg.lose { color: #ff8f8f; }

/* ================= SLOTS ================= */
.slots-machine {
  max-width: 560px; margin: 0 auto; text-align: center;
  background: linear-gradient(180deg, #2a1c46, #1a1030);
  border: 6px solid var(--gold); border-radius: 22px;
  padding: 26px; box-shadow: var(--shadow), 0 0 40px rgba(245,197,66,.15);
}
.slots-window {
  display: flex; gap: 10px; justify-content: center;
  background: #05060a; padding: 14px; border-radius: 14px;
  position: relative; border: 4px solid #000;
  box-shadow: inset 0 0 30px rgba(0,0,0,.8);
}
.reel {
  width: 110px; height: 120px; overflow: hidden; border-radius: 10px;
  background: linear-gradient(180deg, #fdfdff, #dfe3ec);
  position: relative;
  box-shadow: inset 0 8px 12px rgba(0,0,0,.25), inset 0 -8px 12px rgba(0,0,0,.25);
}
.reel-strip { display: flex; flex-direction: column; }
.reel-symbol {
  height: 120px; display: flex; align-items: center; justify-content: center;
  font-size: 4rem; flex: 0 0 120px;
}
.slots-line {
  position: absolute; left: 8px; right: 8px; top: 50%; height: 3px;
  background: rgba(212,36,59,.6); transform: translateY(-50%); pointer-events: none;
  border-radius: 2px;
}
.slots-msg { margin: 18px 0; font-size: 1.2rem; font-weight: 800; min-height: 28px; color: var(--gold); }
.slots-msg.win { color: #7dff9e; }
.paytable {
  margin-top: 14px; background: rgba(0,0,0,.35); border-radius: 10px; padding: 14px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; text-align: left; font-size: .9rem;
}
.paytable .pt-row { display: flex; justify-content: space-between; gap: 10px; }
.paytable .pt-row span:last-child { color: var(--gold); font-weight: 800; }

/* ================= POKER ================= */
.poker-felt { text-align: center; }
.poker-hand { justify-content: center; min-height: 150px; }
.poker-msg { font-size: 1.2rem; font-weight: 800; margin-bottom: 16px; min-height: 26px; }
.poker-msg.win { color: #7dff9e; }
.poker-msg.lose { color: #ff8f8f; }
.poker-hint { color: rgba(255,255,255,.85); margin-top: 14px; font-size: .95rem; }
.poker-card-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.poker-card-wrap .hold-tag {
  font-size: .8rem; font-weight: 800; color: var(--gold);
  background: rgba(0,0,0,.4); padding: 3px 10px; border-radius: 999px;
  opacity: 0; transition: opacity .15s;
}
.poker-card-wrap.held .hold-tag { opacity: 1; }
.poker-card-wrap .card { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.poker-card-wrap.held .card {
  transform: translateY(-14px);
  box-shadow: 0 0 0 3px var(--gold), 0 10px 20px rgba(0,0,0,.5);
}
.poker-paytable {
  max-width: 620px; margin: 0 auto 18px; background: var(--panel);
  border: 1px solid rgba(245,197,66,.25); border-radius: 12px; overflow: hidden;
}
.poker-paytable .ppt-row {
  display: flex; justify-content: space-between; padding: 7px 16px; font-size: .9rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.poker-paytable .ppt-row:last-child { border-bottom: none; }
.poker-paytable .ppt-row.active { background: rgba(245,197,66,.18); }
.poker-paytable .ppt-row span:last-child { color: var(--gold); font-weight: 800; }

/* ================= TOASTS ================= */
#toast-root {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 10px; z-index: 100; align-items: center;
}
.toast {
  background: #222838; border: 1px solid rgba(255,255,255,.15);
  padding: 12px 22px; border-radius: 10px; font-weight: 700;
  box-shadow: var(--shadow); animation: toastIn .3s ease;
}
.toast.win { border-color: #3ec776; color: #7dff9e; }
.toast.lose { border-color: #c73e3e; color: #ff8f8f; }
.toast.info { border-color: var(--gold); color: var(--gold); }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ================= RESPONSIVE ================= */
@media (max-width: 780px) {
  .roulette-layout { grid-template-columns: 1fr; }
  .wheel { width: 240px; height: 240px; }
  .wheel-wrap { order: 2; }
  .lobby-hero h1 { font-size: 2rem; }
  .card { width: 66px; height: 96px; }
  .card .pip { font-size: 2rem; }
  .reel { width: 84px; height: 100px; }
  .reel-symbol { height: 100px; flex-basis: 100px; font-size: 3rem; }
}

/* Konto, Bank, Profil */
.auth-overlay{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at top,#173d2c,#050908 70%);transition:.3s}.auth-overlay.hidden{opacity:0;visibility:hidden;pointer-events:none}.auth-card{width:min(440px,100%);padding:32px;border:1px solid #c9a84c;border-radius:22px;background:rgba(8,18,15,.97);box-shadow:0 24px 80px #000;text-align:center}.auth-logo{font-size:28px;color:#d33}.auth-logo span{color:#f2d27a;font-family:Georgia,serif}.auth-card h1{margin:18px 0 4px}.auth-sub,.muted{color:#aab8b2}.auth-card label{display:block;text-align:left;margin:16px 0 6px;color:#e8dba9}.auth-card input,.input-row input{box-sizing:border-box;width:100%;margin-top:7px;padding:13px 14px;border:1px solid #41584f;border-radius:10px;background:#0b1512;color:#fff;font:inherit;outline:none}.auth-card input:focus,.input-row input:focus{border-color:#d6b85f}.auth-card form .btn{width:100%;margin-top:16px}.auth-switch{margin-top:16px;border:0;background:none;color:#f0cd69;cursor:pointer}.auth-warning{font-size:12px;color:#919d98;margin-top:20px}.auth-message{min-height:22px;margin-top:8px;color:#ff6d6d}.btn-profile,.btn-bank{white-space:nowrap}.feature-layout{width:min(1050px,calc(100% - 32px));margin:20px auto 60px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.feature-card{padding:24px;border:1px solid rgba(218,184,86,.3);border-radius:18px;background:linear-gradient(145deg,rgba(24,55,43,.95),rgba(8,20,16,.98));box-shadow:0 12px 35px rgba(0,0,0,.28)}.feature-card h3{color:#f0d277;margin-top:0}.feature-icon,.avatar{font-size:56px}.bank-hero,.profile-hero{grid-column:1/-1;text-align:center}.bank-numbers{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:24px 0}.bank-numbers div,.stats-grid div{padding:16px;border-radius:12px;background:#091712}.bank-numbers small,.bank-numbers b,.stats-grid small,.stats-grid b{display:block}.bank-numbers b{font-size:21px;color:#f1d371;margin-top:7px}.progress{height:10px;overflow:hidden;border-radius:20px;background:#07100d}.progress span{display:block;width:0;height:100%;background:linear-gradient(90deg,#2dd477,#f0ce66);transition:.4s}.quick-grid{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.input-row{display:flex;gap:10px}.input-row input{margin:0}.history-list>div{display:grid;grid-template-columns:1fr auto;gap:4px;padding:10px 0;border-bottom:1px solid #284237}.history-list small{grid-column:1/-1;color:#899a92}.stats-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.stats-grid span{font-size:28px}.stats-grid b{color:#f0ce66;margin-top:4px}.achievement-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.achievement{padding:13px;border-radius:12px;background:#0a1713;display:grid;grid-template-columns:auto 1fr;gap:2px 10px}.achievement span{grid-row:1/3;font-size:28px}.achievement small{color:#83bd9c}.achievement.locked{filter:grayscale(1);opacity:.45}.danger-zone{grid-column:1/-1;display:flex;gap:12px;align-items:center}.danger-zone h3{margin:0 auto 0 0}.btn-danger{border-color:#a83c3c!important;color:#ff8a8a!important}@media(max-width:850px){.btn-profile span:not(.js-username),.btn-profile .js-level{display:none}.feature-layout{grid-template-columns:1fr}.feature-card,.bank-hero,.profile-hero{grid-column:1}.bank-numbers{grid-template-columns:1fr}.topbar-right{gap:5px}.btn-profile,.btn-bank{padding:8px;font-size:12px}}@media(max-width:560px){.btn-profile{display:none}.feature-layout{width:min(100% - 18px,1050px)}.input-row{flex-direction:column}.danger-zone{align-items:stretch;flex-direction:column}.danger-zone h3{margin:0}.achievement-grid{grid-template-columns:1fr}}
