/* ============================================================
   MT GRAND CASINO — Design System
   Sapphire blue #0A2472 → metallic gold #FFC94A → #F2A900
   Midnight blue #0D1B3E base, electric cyan #3DA9FC / #00C2FF glow
   emerald wins, vivid red losses
   ============================================================ */

:root {
  /* Core palette */
  --midnight: #0D1B3E;
  --midnight-2: #0A122B;
  --deep: #060D22;
  --sapphire: #0A2472;
  --sapphire-2: #142C6B;
  --gold: #FFC94A;
  --gold-2: #F2A900;
  --gold-deep: #B8860B;
  --cyan: #3DA9FC;
  --cyan-2: #00C2FF;
  --emerald: #10D8A4;
  --emerald-2: #0FA36B;
  --red: #FF4D5E;
  --red-2: #E01E37;

  /* Surfaces */
  --surface: rgba(10, 18, 43, 0.72);
  --surface-2: rgba(20, 44, 107, 0.35);
  --surface-3: rgba(0, 194, 255, 0.06);
  --border: rgba(61, 169, 252, 0.22);
  --border-gold: rgba(255, 201, 74, 0.35);

  /* Text */
  --text: #E8EEFB;
  --text-dim: #9FB2D9;
  --text-faint: #5E7295;

  /* Type */
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'Sora', 'Segoe UI', system-ui, sans-serif;

  /* Layout */
  --radius: 14px;
  --radius-sm: 9px;
  --nav-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 85% -10%, rgba(10, 36, 114, 0.55), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(20, 44, 107, 0.5), transparent 55%),
    radial-gradient(700px 500px at 50% 120%, rgba(242, 169, 0, 0.05), transparent 60%),
    var(--midnight-2);
  min-height: 100vh;
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: all 0.18s ease; line-height: 1.2; user-select: none;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-gold {
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-2) 100%);
  color: #241A00; border-color: rgba(255, 201, 74, 0.6);
  box-shadow: 0 2px 14px rgba(242, 169, 0, 0.35);
}
.btn-gold:hover:not(:disabled) { box-shadow: 0 4px 22px rgba(242, 169, 0, 0.55); transform: translateY(-1px); }
.btn-blue {
  background: linear-gradient(180deg, #1E4FD8 0%, #142C6B 100%);
  color: #fff; border-color: rgba(61, 169, 252, 0.5);
  box-shadow: 0 2px 14px rgba(30, 79, 216, 0.3);
}
.btn-blue:hover:not(:disabled) { box-shadow: 0 4px 20px rgba(30, 79, 216, 0.5); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(61, 169,  252, 0.08); color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) { background: rgba(61, 169, 252, 0.16); }
.btn-danger {
  background: linear-gradient(180deg, #FF4D5E 0%, #E01E37 100%);
  color: #fff; border-color: rgba(255, 77, 94, 0.6);
}
.btn-danger:hover:not(:disabled) { box-shadow: 0 4px 18px rgba(224, 30, 55, 0.4); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 7px; }
.btn-lg { padding: 16px 34px; font-size: 17px; }
.btn-block { width: 100%; }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.4px;
  padding: 4px 10px; border-radius: 999px;
}
.chip-gold { background: rgba(255, 201, 74, 0.14); color: var(--gold); border: 1px solid rgba(255, 201, 74, 0.4); }
.chip-cyan { background: rgba(0, 194, 255, 0.12); color: var(--cyan-2); border: 1px solid rgba(0, 194, 255, 0.4); }
.chip-emerald { background: rgba(16, 216, 164, 0.14); color: var(--emerald); border: 1px solid rgba(16, 216, 164, 0.4); }
.chip-red { background: rgba(255, 77, 94, 0.14); color: var(--red); border: 1px solid rgba(255, 77,  94, 0.45); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(8px);
}
.card-title { font-family: var(--font-display); color: var(--gold); font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 14px; }
.card-pad { padding: 24px; }

/* ---------- Layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.page { padding: 26px 0 90px; }

/* ---------- Top nav ---------- */
.topnav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(6, 13, 34, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.topnav-in {
  height: var(--nav-h);
  display: flex; align-items: center; gap: 14px;
}
.brand {
  font-family: var(--font-display); font-size: 21px; font-weight: 700;
  color: var(--gold); letter-spacing: 1px; text-decoration: none;
  display: flex; align-items: center; gap: 9px; white-space: nowrap;
}
.brand .spark { font-size: 24px; }
.brand-sub {
  font-size: 10px; letter-spacing: 3px; color: var(--text-faint);
  text-transform: uppercase; display: block; margin-top: -2px;
}
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 13px; border-radius: 8px; transition: all 0.15s;
}
.nav-links a:hover { color: var(--text); background: rgba(61, 169, 252,  0.1); }
.nav-links a.active { color: var(--gold); background: rgba(255, 201, 74, 0.1); }
.nav-balance {
  font-weight: 700; font-size: 15px; color: var(--gold);
  background: rgba(255, 201, 74, 0.08);
  border: 1px solid var(--border-gold);
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
}
.nav-user {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--sapphire), var(--sapphire-2));
  border: 1px solid var(--border-gold);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--gold);
  cursor: pointer; overflow: hidden;
}
.nav-user img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Hero ---------- */
.hero {
  margin: 26px 0;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-gold);
  background: linear-gradient(120deg, var(--deep) 0%, var(--sapphire) 55%, #1A3A8F 100%);
  padding: 56px 40px;
}
.hero-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 15% 20%, rgba(0, 194, 255, 0.13), transparent 70%),
    radial-gradient(500px 280px at 85% 80%, rgba(255, 201, 74, 0.12), transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08; color: #fff; margin-bottom: 12px; letter-spacing: 1px;
}
.hero h1 .gold-text { color: var(--gold); }
.hero p.sub {
  font-size: clamp(15px, 2vw, 18px); color: var(--text-dim);
  max-width: 620px; line-height: 1.55;
}
.hero .cta-row { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; }
.sim-banner {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px; font-size: 12.5px; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px;
  background: rgba(6, 13, 34, 0.6);
}
.sim-banner b { color: var(--cyan-2); }

/* ---------- Game grid ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.game-card {
  position: relative; border-radius: 16px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--sapphire-2) 0%, var(--midnight-2) 100%);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-decoration: none; color: var(--text);
  display: flex; flex-direction: column;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 201, 74, 0.2);
}
.game-thumb {
  height: 130px; position: relative;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px; background: linear-gradient(160deg, rgba(10, 36, 114, 0.8), rgba(6, 13, 34, 0.9));
}
.game-thumb::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(240px 120px at 50% 110%, rgba(255, 201, 74, 0.16), transparent 70%);
}
.game-body { padding: 14px 16px 16px; }
.game-name { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.game-meta { font-size: 12px; color: var(--text-faint); display: flex; gap: 8px; align-items: center; }
.game-rtp { color: var(--cyan-2); font-weight: 600; }
.game-tag {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; letter-spacing: 1px; font-weight: 700; text-transform: uppercase;
  background: rgba(6, 13, 34, 0.85); border: 1px solid var(--border-gold);
  color: var(--gold); padding: 3px 8px; border-radius: 6px;
}

/* ---------- Tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; color: var(--text-faint); font-size: 11px;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.tbl td { padding: 10px; border-bottom: 1px solid rgba(61, 169, 252, 0.1); }
.tbl tr:last-child td { border-bottom: none; }
.tbl td.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--emerald); font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }

/* ---------- Forms ---------- */
label.fld { display: block; margin-bottom: 14px; }
label.fld span {
  display: block; font-size: 12px; color: var(--text-dim);
  letter-spacing: 0.6px; text-transform: uppercase; margin-bottom: 6px; font-weight: 600;
}
input[type="text"], input[type="number"], textarea, select {
  width: 100%; background: rgba(6, 13, 34, 0.7); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 15px; font-family: var(--font-body);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(61, 169, 252, 0.18);
}
input[type="range"] { width: 100%; accent-color: var(--gold-2); }
.hint { font-size: 12px; color: var(--text-faint); margin-top: 5px; }

/* ---------- Alerts ---------- */
.alert {
  border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13.5px;
  margin-bottom: 14px; border: 1px solid; line-height: 1.45;
}
.alert-ok { background: rgba(16, 216, 164, 0.1); border-color: rgba(16, 216, 164, 0.35); color: var(--emerald); }
.alert-err { background: rgba(255, 77, 94, 0.1); border-color: rgba(255, 77, 94, 0.35); color: var(--red); }
.alert-info { background: rgba(61, 169, 252,  0.1); border-color: rgba(61, 169, 252, 0.35); color: var(--cyan-2); }
.alert-warn { background: rgba(255, 201, 74, 0.1); border-color: rgba(255, 201, 74, 0.4); color: var(--gold); }

/* ---------- Toast ---------- */
#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: rgba(6, 13, 34, 0.97); border: 1px solid var(--border-gold);
  color: var(--text); padding: 13px 22px; border-radius: 12px; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); z-index: 200;
  opacity: 0; transition: transform 0.25s ease, opacity 0.25s ease;
  max-width: 92vw; text-align: center; pointer-events: none;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#toast.win { border-color: var(--emerald); color: var(--emerald); }
#toast.lose { border-color: var(--red); color: var(--red); }

/* ---------- Grid helpers ---------- */
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.col { flex: 1 1 320px; min-width: 0; }
.col-2 { flex: 2 1 480px; min-width: 0; }

/* ---------- Stat tiles ---------- */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 15px;
}
.stat .k { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-faint); margin-bottom: 5px; }
.stat .v { font-size: 19px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.stat .v.plain { color: var(--text); }
.stat .v.good { color: var(--emerald); }
.stat .v.bad { color: var(--red); }

/* ---------- Game page layout ---------- */
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
@media (max-width: 900px) { .game-layout { grid-template-columns: 1fr; } }

.play-area {
  background: linear-gradient(160deg, rgba(20, 44, 107, 0.4) 0%, rgba(6, 13, 34, 0.85) 100%);
  border: 1px solid var(--border); border-radius: 18px;
  padding: 26px; min-height: 320px; position: relative;
}
.play-area .stage-title { font-family: var(--font-display); color: var(--gold); font-size: 17px; letter-spacing: 2px; margin-bottom: 18px; }

/* ---------- Slots grid ---------- */
.slot-frame {
  display: flex; gap: 10px; justify-content: center; margin: 18px 0;
}
.slot-reel {
  width: 84px; height: 84px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(6, 13, 34, 0.9), rgba(20, 44, 107, 0.5));
  border: 1px solid var(--border); border-color: rgba(61, 169, 252, 0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
}
.slot-reel.win { border-color: var(--gold); box-shadow: 0 0 18px rgba(255, 201, 74, 0.45); }

/* ---------- Dice ---------- */
.dice-track { height: 12px; border-radius: 999px; background: rgba(6, 13, 34, 0.9); position: relative; margin: 26px 4px; border: 1px solid var(--border); }
.dice-marker {
  position: absolute; top: -7px; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  transform: translateX(-50%); transition: left 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
  box-shadow: 0 0 16px rgba(255, 201, 74, 0.6); display: flex;
  align-items: center; justify-content: center; color: #241A00; font-size: 10px; font-weight: 800;
}
.dice-zone { height: 12px; border-radius: 999px 0 0 999px; background: rgba(16, 216, 164, 0.25); position: absolute; left: 0; top: 0; }

/* ---------- Wheel ---------- */
.wheel-wrap { position: relative; width: 280px; height: 280px; margin: 18px auto; }
.wheel-svg { width: 100%; height: 100%; transform: rotate(var(--rot, 0deg)); transition: transform 3.4s cubic-bezier(0.12, 0.75, 0.2, 1); }
.wheel-ptr {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent;
  border-top: 18px solid var(--gold); z-index: 5; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* ---------- Mines ---------- */
.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; max-width: 380px; margin: 18px auto; }
.mine-tile {
  aspect-ratio: 1; border-radius: 11px; cursor: pointer;
  background: linear-gradient(180deg, rgba(20, 44, 107, 0.55), rgba(6, 13, 34, 0.85));
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-size: 24px; transition: all 0.18s; color: var(--text-faint);
}
.mine-tile:hover:not(.done):not(.boom) { border-color: var(--gold); transform: translateY(-2px); }
.mine-tile.gem { background: rgba(16, 216, 164, 0.16); border-color: var(--emerald); color: var(--emerald); }
.mine-tile.boom { background: rgba(255, 77, 94, 0.22); border-color: var(--red); color: var(--red); }
.mine-tile.done { opacity: 0.55; cursor: default; }

/* ---------- Plinko ---------- */
.plinko-stage { position: relative; width: 100%; max-width: 420px; height: 340px; margin: 16px auto; overflow: hidden; }
.plinko-bucket-row { display: flex; gap: 4px; max-width: 420px; margin: 0 auto 4px; }
.plinko-bucket {
  flex: 1; text-align: center; font-size: 10.5px; font-weight: 700; color: var(--text-dim);
  padding: 5px 2px; border-radius: 6px;
  background: rgba(6, 13, 34, 0.8); border: 1px solid var(--border);
}
.plinko-bucket.hit { color: var(--gold); border-color: var(--gold); background: rgba(255, 201, 74, 0.12); }

/* ---------- Crash ---------- */
.crash-chart { position: relative; width: 100%; height: 300px; margin: 14px 0; border-radius: 12px; background: rgba(6, 13, 34, 0.75); border: 1px solid var(--border); overflow: hidden; }
.crash-curve { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }
.crash-mult {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  font-size: 44px; font-weight: 800; color: var(--gold);
  font-variant-numeric: tabular-nums; text-shadow: 0 0 24px rgba(255, 201, 74, 0.5);
}
.crash-mult.dead { color: var(--red); text-shadow: 0 0 24px rgba(255,  77, 94,  0.5); }
.crash-cash {
  position: absolute; right: 14px; bottom: 12px; font-size: 13px; color: var(--text-dim);
}

/* ---------- Cards (playing) ---------- */
.hand-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.pcard {
  width: 64px; height: 92px; border-radius: 9px;
  background: linear-gradient(160deg, #F7F4EC, #DCD7C8);
  color: #1a1a2e; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-weight: 800; font-size: 18px;
  position: relative; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
.pcard .suit { font-size: 22px; margin-top: -3px; }
.pcard.back {
  background: repeating-linear-gradient(45deg, var(--sapphire), var(--sapphire) 6px, #0A1B4D 6px, #0A1B4D 12px);
  border: 2px solid rgba(255, 201, 74, 0.5);
}
.pcard.red { color: #C41E3A; }
.pcard.small { width: 52px; height: 76px; font-size: 15px; }
.pcard.small .suit { font-size: 18px; }

/* ---------- Keno ---------- */
.keno-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; max-width: 460px; margin: 14px auto; }
.keno-cell {
  aspect-ratio: 1; border-radius: 8px; cursor: pointer;
  background: rgba(6, 13, 34, 0.75); border: 1px solid var(--border);
  color: var(--text-dim); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.keno-cell:hover { border-color: var(--cyan); color: var(--cyan-2); }
.keno-cell.pick { background: rgba(61, 169, 252, 0.18); border-color: var(--cyan); color: var(--cyan-2); }
.keno-cell.drawn { background: rgba(255, 201, 74, 0.2); border-color: var(--gold); color: var(--gold); }
.keno-cell.hit { background: rgba(16, 216, 164, 0.25); border-color: var(--emerald); color: var(--emerald); }

/* ---------- Roulette ---------- */
.rou-board { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; }
.rou-cell {
  height: 34px; border-radius: 6px; font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.rou-cell.red { background: #B3222F; color: #fff; }
.rou-cell.black { background: #101523; color: #fff; }
.rou-cell.green { background: #0FA36B; color: #fff; }
.rou-cell.plain { background: rgba(6, 13, 34, 0.7); color: var(--text-dim); }
.rou-cell.bet { outline: 2px solid var(--gold); outline-offset: 1px; }
.rou-result {
  width: 66px; height: 66px; border-radius: 50%; margin: 14px auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #fff;
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.18);
}

/* ---------- Chat ---------- */
.chat-box {
  height: 320px; overflow-y: auto; padding: 14px;
  background: rgba(6, 13, 34, 0.6); border: 1px solid var(--border); border-radius: var(--radius-sm);
  display: flex; flex-direction: column; gap: 9px;
}
.chat-msg { font-size: 13.5px; line-height: 1.5; }
.chat-msg b { color: var(--cyan-2); }
.chat-msg .t { color: var(--text-faint); font-size: 11px; margin-right: 6px; }
.chat-msg .sys { color: var(--gold); font-style: italic; }

/* ---------- Progress bars ---------- */
.prog { height: 9px; border-radius: 999px; background: rgba(6, 13, 34, 0.9); overflow: hidden; border: 1px solid var(--border); }
.prog > div { height: 100%; background: linear-gradient(90deg, var(--sapphire), var(--cyan)); border-radius: 999px; transition: width 0.4s; }
.prog.gold > div { background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }

/* ---------- Misc ---------- */
.muted { color: var(--text-faint); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.gold-text { color: var(--gold); }
.cyan-text { color: var(--cyan-2); }
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button {
  background: none; border: none; color: var(--text-dim); font-family: var(--font-body);
  font-size: 14px; font-weight: 600; padding: 10px 16px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--gold); border-bottom-color: var(--gold); }
.spin { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border); padding: 34px 0 46px;
  color: var(--text-faint); font-size: 12.5px; margin-top: 40px;
  background: rgba(6, 13, 34, 0.5);
}
footer a { color: var(--text-dim); text-decoration: none; }
footer a:hover { color: var(--gold); }
.foot-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ---------- Modal ---------- */
.modal-veil { position: fixed; inset: 0; background: rgba(3, 6, 18, 0.8); z-index: 150; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-veil.open { display: flex; }
.modal { max-width: 480px; width: 100%; max-height: 88vh; overflow-y: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .hero { padding: 36px 22px; }
  .game-layout { grid-template-columns: 1fr; }
  .keno-grid { grid-template-columns: repeat(8, 1fr); }
  .rou-board { grid-template-columns: repeat(7, 1fr); }
  .pcard { width: 50px; height: 72px; font-size: 14px; }
  .pcard .suit { font-size: 17px; }
}

/* ---------- Print ---------- */
@media print {
  body { background: #fff; color: #111; }
  .topnav, footer, #toast { display: none; }
}
