/* ═══════════════════════════════════════════════════════════════
  Triple 7 Casino — style.css
   Dark casino theme matching the original PySide6 application.
   ═══════════════════════════════════════════════════════════════ */

/* ── Custom properties (palette) ─────────────────────────────── */
:root {
  --bg-base:    #0d1117;
  --bg-surface: #161b22;
  --bg-overlay: #1c2128;
  --bg-raised:  #21262d;
  --border:     #30363d;
  --primary:    #58a6ff;
  --success:    #3fb950;
  --warning:    #d29922;
  --danger:     #f85149;
  --text:       #e6edf3;
  --muted:      #8b949e;
  --gold:       #f0b429;
  --white:      #ffffff;

  --hud-h:  54px;
  --nav-h:  46px;
  --foot-h: 34px;
  --radius: 10px;
  --font:   "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea {
  font-family: var(--font);
  background: var(--bg-overlay);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(88,166,255,.25);
}

/* ── Base ─────────────────────────────────────────────────────── */
html, body {
  height: 100%;
  background: var(--bg-base);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

/* ── HUD ──────────────────────────────────────────────────────── */
.hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--hud-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 0;
  z-index: 100;
}
.hud-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
}
.hud-balances {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.hud-purse  { color: var(--success); font-weight: 600; font-size: 15px; }
.hud-bank   { color: var(--primary); font-weight: 600; font-size: 15px; }
.hud-bb     { color: var(--gold);    font-weight: 600; font-size: 15px; }

/* ── Navigation ───────────────────────────────────────────────── */
.nav-bar {
  position: fixed;
  top: var(--hud-h);
  left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  z-index: 90;
  scrollbar-width: none;
}
.nav-bar::-webkit-scrollbar { display: none; }
.nav-tab {
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border-right: 1px solid var(--border);
  transition: color .15s, background .15s;
}
.nav-tab:hover  { background: var(--bg-overlay); color: var(--text); }
.nav-tab.active {
  background: var(--bg-base);
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}
.nav-tab-home {
  color: var(--gold);
  border-right: 1px solid var(--border);
}
.nav-tab-home:hover { background: var(--bg-overlay); }

/* ── Page ─────────────────────────────────────────────────────── */
.page {
  margin-top: calc(var(--hud-h) + var(--nav-h));
  margin-bottom: var(--foot-h);
  padding: 20px;
  min-height: calc(100vh - var(--hud-h) - var(--nav-h) - var(--foot-h));
}

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--foot-h);
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  z-index: 100;
}

/* ── Two-column game layout ───────────────────────────────────── */
.game-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  max-width: 1200px;
}
@media (max-width: 768px) {
  .game-layout { grid-template-columns: 1fr; }
}

/* ── Panel / Card ─────────────────────────────────────────────── */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.card + .card { margin-top: 10px; }

/* ── Typography helpers ──────────────────────────────────────────*/
.title   { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.subtitle { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.label   { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.muted   { color: var(--muted); }
.gold    { color: var(--gold); }
.success { color: var(--success); }
.danger  { color: var(--danger); }
.warning { color: var(--warning); }
.primary { color: var(--primary); }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: opacity .15s, transform .08s;
  width: 100%;
  min-height: 38px;
}
.btn:hover:not(:disabled) { opacity: .85; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #000; }
.btn-success { background: var(--success); color: #000; }
.btn-warning { background: var(--warning); color: #000; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-muted   { background: var(--bg-raised); color: var(--text); border: 1px solid var(--border); }
.btn-gold    { background: var(--gold);    color: #000; }

/* ── Form rows ────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.form-group label { font-size: 12px; color: var(--muted); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: 36px;
}
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row input  { flex: 1; }

/* ── Bet amount input ─────────────────────────────────────────── */
.bet-input {
  width: 100%;
  min-height: 36px;
  font-size: 16px;
  font-weight: 600;
  text-align: right;
  padding-right: 10px;
}

.bet-slider {
  --pct: 0%;
  width: 100%;
  min-height: 30px;
  padding: 0;
  border: none;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

.bet-slider:focus {
  box-shadow: none;
}

.bet-slider::-webkit-slider-runnable-track {
  height: 10px;
  background: linear-gradient(90deg,
    #df24e8 0%,
    #7e42ee calc(var(--pct) * 0.55),
    #2d7de8 var(--pct),
    #d5d5d5 var(--pct),
    #ececec 100%);
  border: 1px solid #d0d0d0;
  border-radius: 999px;
}

.bet-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -9px;
  border-radius: 50%;
  border: 6px solid #f4f4f4;
  background: #2d7de8;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  cursor: pointer;
  transition: transform .12s ease;
}

.bet-slider::-webkit-slider-thumb:hover {
  transform: scale(1.08);
}

.bet-slider::-moz-range-track {
  height: 10px;
  background: linear-gradient(90deg,
    #df24e8 0%,
    #7e42ee calc(var(--pct) * 0.55),
    #2d7de8 var(--pct),
    #d5d5d5 var(--pct),
    #ececec 100%);
  border: 1px solid #d0d0d0;
  border-radius: 999px;
}

.bet-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 6px solid #f4f4f4;
  background: #2d7de8;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  cursor: pointer;
}

/* ── Result badge ─────────────────────────────────────────────── */
.result-box {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  min-height: 48px;
  word-break: break-word;
  transition: background .2s;
}
.result-box.win      { background: rgba(63,185,80,.15);  color: var(--success); border: 1px solid var(--success); }
.result-box.lose     { background: rgba(248,81,73,.12);  color: var(--danger);  border: 1px solid var(--danger); }
.result-box.push     { background: rgba(88,166,255,.12); color: var(--primary); border: 1px solid var(--primary); }
.result-box.blackjack{ background: rgba(240,180,41,.15); color: var(--gold);    border: 1px solid var(--gold); }
.result-box.jackpot  { background: rgba(240,180,41,.2);  color: var(--gold);    border: 2px solid var(--gold); }
.result-box.idle     { background: var(--bg-overlay);    color: var(--muted);   border: 1px solid var(--border); }

/* ── Card images (Blackjack) ─────────────────────────────────── */
.card-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 130px;
  padding: 6px 0;
}
.card-strip img {
  height: 110px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.6);
  margin-right: -16px;
  transition: margin .1s;
}
.card-strip img:last-child { margin-right: 0; }

/* ── Slots reels ─────────────────────────────────────────────── */
.reels {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 24px 0;
}
.reel {
  width: 100px; height: 100px;
  background: #0f1723;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  transition: border-color .2s, background .2s;
  user-select: none;
}
.reel.win-highlight {
  background: #1a2d1a;
  border: 2px solid var(--success);
  box-shadow: 0 0 14px rgba(63,185,80,.35);
}
.reel.spinning { animation: reelSpin .22s ease-in-out infinite alternate; }
@keyframes reelSpin {
  from { transform: scaleY(1);   }
  to   { transform: scaleY(.92); }
}

/* ── Roulette canvas ─────────────────────────────────────────── */
.wheel-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}
#roulette-canvas {
  max-width: 100%;
  border-radius: 50%;
}

/* ── Horse race track ────────────────────────────────────────── */
#horse-canvas {
  width: 100%;
  border-radius: var(--radius);
  background: #0d1a0d;
}

/* ── Stats grid (Profile) ────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.stat-card .stat-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.stat-card .stat-value { font-size: 22px; font-weight: 700; }

/* ── Shop cards ──────────────────────────────────────────────── */
.shop-card {
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.shop-card-top   { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.shop-card-title { font-size: 15px; font-weight: 700; }
.shop-card-price { color: var(--gold); font-weight: 700; white-space: nowrap; }
.shop-card-desc  { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.shop-card-bottom{ display: flex; align-items: center; gap: 10px; }
.shop-card-status{ flex: 1; font-size: 13px; }

/* ── Settings rows ───────────────────────────────────────────── */
.settings-section { margin-bottom: 20px; }
.settings-section h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.settings-row label { min-width: 160px; color: var(--muted); font-size: 13px; }
.settings-row input[type=range] {
  flex: 1;
  min-width: 180px;
}
.settings-row .range-val { min-width: 36px; text-align: right; font-weight: 600; }

/* ── Checkbox / toggle ───────────────────────────────────────── */
input[type=checkbox] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ── Features passcode ───────────────────────────────────────── */
.lock-box {
  max-width: 400px;
  margin: 40px auto 0;
  text-align: center;
}
.lock-icon { font-size: 64px; margin-bottom: 16px; }
.lock-box h2 { font-size: 20px; margin-bottom: 8px; }
.lock-box p  { color: var(--muted); margin-bottom: 20px; }
.pin-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.pin-row input {
  width: 160px;
  text-align: center;
  font-size: 22px;
  letter-spacing: 6px;
}

/* ── Toast notifications ─────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
  z-index: 200;
}
.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  box-shadow: 0 8px 16px rgba(0,0,0,.28);
  animation: toastIn .2s ease;
  width: min(360px, calc(100vw - 32px));
  pointer-events: auto;
}
.toast.daily-income {
  border-radius: 12px;
  padding: 22px 28px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0,0,0,.55);
  width: min(92vw, 700px);
}
.toast.success { border-left: 3px solid var(--success); }
.toast.danger  { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--primary); }
#toast-container.daily-income-mode {
  inset: 0;
  top: 0;
  right: 0;
  align-items: center;
  justify-content: center;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Spinner overlay ─────────────────────────────────────────── */
.spinner-overlay {
  position: absolute; inset: 0;
  background: rgba(13,17,23,.6);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  z-index: 10;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ─────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ── Quick-bet row ───────────────────────────────────────────── */
.quick-bets { display: flex; gap: 6px; margin-bottom: 12px; }
.quick-bets .btn { flex: 1; }

/* ── Horse selection grid ────────────────────────────────────── */
.horse-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.horse-btn {
  padding: 6px 8px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg-overlay);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: border-color .15s, background .15s;
}
.horse-btn:hover   { background: var(--bg-raised); }
.horse-btn.selected {
  background: rgba(88,166,255,.1);
  border-color: var(--primary);
  color: var(--primary);
}
.horse-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

.race-meta {
  text-align: center;
  font-size: 12px;
  min-height: 18px;
}

.race-meta-win {
  color: var(--success);
  font-weight: 700;
}

.race-meta-place {
  color: var(--warning);
  font-weight: 600;
}

.race-meta-lose {
  color: var(--danger);
  font-weight: 600;
}

/* ── Roulette bet buttons ────────────────────────────────────── */
.roulette-quick { display: flex; gap: 8px; margin-bottom: 8px; }
.roulette-quick .btn { flex: 1; }
.btn-red   { background: #c53c31; color: #fff; }
.btn-black { background: #222;    color: #fff; border: 1px solid var(--border); }
.btn-green { background: #1f8f55; color: #fff; }

/* ── Table header (Blackjack) ────────────────────────────────── */
.table-header {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

/* ── Scrollable area ─────────────────────────────────────────── */
.scroll-area {
  overflow-y: auto;
  max-height: 380px;
  padding-right: 4px;
}
.scroll-area::-webkit-scrollbar { width: 6px; }
.scroll-area::-webkit-scrollbar-track { background: var(--bg-surface); }
.scroll-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Notes editor ────────────────────────────────────────────── */
#notes-editor {
  width: 100%;
  min-height: 200px;
  resize: vertical;
  font-family: "Consolas", monospace;
  font-size: 13px;
}

/* ── Responsive tweaks ───────────────────────────────────────── */
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .horse-grid { grid-template-columns: 1fr 1fr; }
  .reels .reel { width: 80px; height: 80px; font-size: 38px; }
}

/* ── Yahtzee ─────────────────────────────────────────────────── */
.yahtzee-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  max-width: 1240px;
}

.yahtzee-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.yahtzee-meta .tag {
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--muted);
}

.yz-dice {
  display: grid;
  grid-template-columns: repeat(5, minmax(56px, 1fr));
  gap: 8px;
}

.yz-die {
  border: 1px solid #9ba7b7;
  border-radius: 10px;
  min-height: 78px;
  background: linear-gradient(180deg, #f6f8fb 0%, #e4e9f2 100%);
  color: #0f1723;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.yz-die .pip {
  font-size: 28px;
  line-height: 1;
}

.yz-die .idx {
  font-size: 10px;
  letter-spacing: .7px;
  font-weight: 700;
  color: #374151;
}

.yz-die:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}

.yz-die.held {
  border-color: #f0b429;
  box-shadow: inset 0 0 0 2px rgba(240,180,41,.35);
  background: linear-gradient(180deg, #fff7df 0%, #f9e6a6 100%);
}

.yz-die:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.yz-scorecard {
  width: 100%;
  border-collapse: collapse;
}

.yz-scorecard th,
.yz-scorecard td {
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  font-size: 13px;
}

.yz-scorecard th {
  color: var(--muted);
  font-weight: 600;
}

.yz-scorecard td:nth-child(2) {
  width: 90px;
  font-weight: 700;
}

.yz-scorecard td:nth-child(3) {
  width: 120px;
}

.yz-scorecard .summary td {
  background: var(--bg-overlay);
  font-weight: 700;
}

@media (max-width: 980px) {
  .yahtzee-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Whack-A-Mole ───────────────────────────────────────────── */
.whack-layout {
  grid-template-columns: 360px 1fr;
  max-width: 1240px;
}

.wm-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.wm-stat {
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wm-stat span {
  color: var(--muted);
  font-size: 12px;
}

.wm-stat strong {
  font-size: 18px;
  color: #ffe37a;
}

.wm-arena-wrap {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background:
    radial-gradient(1000px 260px at 50% -30%, rgba(240,180,41,.2), transparent 65%),
    linear-gradient(180deg, #112133 0%, #0f1b28 52%, #2c1e10 53%, #2f2011 100%);
}

.wm-lights {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  height: 22px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255,219,107,.95) 0 16px,
    rgba(255,156,51,.9) 16px 32px
  );
  box-shadow: 0 0 20px rgba(255,173,66,.35);
}

.wm-arena {
  position: relative;
  z-index: 1;
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 14px;
  padding: 22px;
}

.wm-hole {
  min-height: 108px;
  border: 1px solid #3c2c1c;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 45%, #26140a 0%, #140a04 58%, #0c0502 100%);
  box-shadow:
    inset 0 4px 18px rgba(0,0,0,.7),
    0 8px 16px rgba(0,0,0,.35);
  position: relative;
  overflow: hidden;
  transition: transform .08s ease, box-shadow .12s ease;
}

.wm-hole:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 4px 18px rgba(0,0,0,.7),
    0 10px 22px rgba(0,0,0,.45);
}

.wm-hole .mole {
  position: absolute;
  left: 50%;
  bottom: -64px;
  transform: translateX(-50%);
  font-size: 54px;
  transition: bottom .12s ease;
  filter: drop-shadow(0 5px 4px rgba(0,0,0,.45));
  user-select: none;
  pointer-events: none;
}

.wm-hole .dust {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 18px;
  opacity: 0;
  color: #ffd36c;
  text-shadow: 0 0 8px rgba(255,205,104,.65);
}

.wm-hole.active {
  border-color: #f0b429;
}

.wm-hole.active .mole {
  bottom: 12px;
}

.wm-hole.smashed {
  transform: scale(.97);
  border-color: #ff7d5f;
}

.wm-hole.smashed .dust {
  opacity: 1;
}

@media (max-width: 980px) {
  .whack-layout {
    grid-template-columns: 1fr;
  }

  .wm-arena {
    grid-template-columns: repeat(3, minmax(84px, 1fr));
    gap: 10px;
    padding: 14px;
  }

  .wm-hole {
    min-height: 86px;
  }

  .wm-hole .mole {
    font-size: 44px;
  }
}

/* ── Plinko ─────────────────────────────────────────────────── */
.plinko-layout {
  grid-template-columns: 320px 1fr;
  max-width: 1280px;
}

.plinko-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.plinko-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plinko-readout {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
}

.plinko-readout strong {
  color: #ffe37a;
  font-size: 14px;
}

.plinko-machine {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 209, 102, .22);
  background:
    radial-gradient(520px 180px at 50% 0%, rgba(255,218,109,.2), transparent 70%),
    linear-gradient(180deg, #142233 0%, #0e1824 58%, #120f1e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 22px 40px rgba(0,0,0,.28);
  padding: 20px 20px 18px;
}

.plinko-marquee {
  margin: 0 auto 10px;
  width: fit-content;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 212, 95, .45);
  background: linear-gradient(180deg, rgba(255,206,88,.2) 0%, rgba(255,206,88,.06) 100%);
  color: #ffe48c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .28em;
  text-transform: uppercase;
  box-shadow: 0 0 28px rgba(255, 196, 66, .12);
}

#plinko-canvas {
  width: 100%;
  max-width: 100%;
  display: block;
}

.plinko-bins {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
}

.plinko-chip {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff5b4 0%, #ffd36c 45%, #cf8f18 100%);
  border: 2px solid #fff0b0;
  box-shadow:
    0 8px 18px rgba(0,0,0,.28),
    0 0 12px rgba(255, 214, 102, .18);
  pointer-events: none;
  z-index: 2;
  transition: transform .06s linear;
}

.plinko-bin {
  min-height: 58px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: #f7f8fa;
  background: rgba(255,255,255,.04);
  box-shadow: inset 0 -10px 16px rgba(0,0,0,.14);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.plinko-bin strong {
  font-size: 16px;
}

.plinko-bin-index {
  opacity: .72;
  font-size: 10px;
  letter-spacing: .08em;
}

.plinko-bin.low {
  background: linear-gradient(180deg, rgba(248,81,73,.28) 0%, rgba(248,81,73,.14) 100%);
}

.plinko-bin.mid {
  background: linear-gradient(180deg, rgba(88,166,255,.25) 0%, rgba(88,166,255,.12) 100%);
}

.plinko-bin.high {
  background: linear-gradient(180deg, rgba(63,185,80,.25) 0%, rgba(63,185,80,.12) 100%);
}

.plinko-bin.jackpot {
  background: linear-gradient(180deg, rgba(240,180,41,.3) 0%, rgba(240,180,41,.14) 100%);
}

.plinko-bin.active {
  transform: translateY(-3px);
  border-color: rgba(255, 226, 128, .9);
  box-shadow: 0 0 18px rgba(255, 212, 95, .28), inset 0 -10px 16px rgba(0,0,0,.14);
}

@media (max-width: 1080px) {
  .plinko-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .plinko-header {
    flex-direction: column;
  }

  .plinko-readout {
    align-items: flex-start;
    text-align: left;
  }

  .plinko-machine {
    padding: 14px 12px 14px;
  }

  .plinko-bins {
    gap: 4px;
  }

  .plinko-bin {
    min-height: 48px;
  }

  .plinko-bin strong {
    font-size: 13px;
  }
}

/* ── Keno ──────────────────────────────────────────────────── */
.keno-layout {
  grid-template-columns: 330px 1fr;
  max-width: 1320px;
}

.keno-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keno-meta .tag {
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--muted);
}

.keno-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.keno-stat {
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.keno-stat span {
  color: var(--muted);
  font-size: 11px;
}

.keno-stat strong {
  font-size: 18px;
  color: #ffe37a;
}

.keno-paytable-card {
  margin-top: 4px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(88,166,255,.08) 0%, rgba(88,166,255,.02) 100%);
}

.keno-paytable-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}

.keno-paytable {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.keno-paycard {
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  background: rgba(255,255,255,.04);
  font-size: 12px;
}

.keno-paycard strong {
  font-size: 15px;
}

.keno-paycard.cool { background: linear-gradient(180deg, rgba(88,166,255,.18) 0%, rgba(88,166,255,.08) 100%); }
.keno-paycard.warm { background: linear-gradient(180deg, rgba(63,185,80,.2) 0%, rgba(63,185,80,.08) 100%); }
.keno-paycard.hot { background: linear-gradient(180deg, rgba(240,180,41,.22) 0%, rgba(240,180,41,.1) 100%); }
.keno-paycard.mega { background: linear-gradient(180deg, rgba(248,81,73,.24) 0%, rgba(248,81,73,.1) 100%); }

.keno-paycard.active {
  border-color: rgba(255, 227, 121, .88);
  box-shadow: 0 0 18px rgba(255, 221, 112, .18);
  transform: translateY(-1px);
}

.keno-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.keno-stage-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.keno-readout {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
}

.keno-readout strong {
  color: #ffe37a;
  font-size: 14px;
}

.keno-machine {
  border-radius: 20px;
  border: 1px solid rgba(124, 196, 255, .18);
  background:
    radial-gradient(680px 220px at 50% 0%, rgba(88,166,255,.18), transparent 65%),
    linear-gradient(180deg, #10192a 0%, #0d1420 52%, #091018 100%);
  box-shadow: 0 20px 38px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.04);
  padding: 16px;
}

.keno-draw-strip {
  min-height: 66px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px;
  overflow-x: auto;
  margin-bottom: 14px;
}

.keno-draw-strip::-webkit-scrollbar { height: 6px; }
.keno-draw-strip::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 999px; }

.keno-ball {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #0c1117;
  background: linear-gradient(180deg, #dde7f2 0%, #bccbda 100%);
  box-shadow: 0 6px 14px rgba(0,0,0,.22);
  animation: kenoBallIn .18s ease-out;
}

.keno-ball.hit {
  background: linear-gradient(180deg, #ffe58f 0%, #f0b429 100%);
  box-shadow: 0 0 18px rgba(240,180,41,.26), 0 6px 14px rgba(0,0,0,.24);
}

@keyframes kenoBallIn {
  from { transform: scale(.78); opacity: .35; }
  to { transform: scale(1); opacity: 1; }
}

.keno-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.keno-tile {
  min-height: 62px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.03) 100%);
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  transition: transform .1s ease, border-color .12s ease, box-shadow .12s ease, background .12s ease;
}

.keno-tile:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(88,166,255,.55);
}

.keno-tile.selected {
  border-color: rgba(88,166,255,.78);
  background: linear-gradient(180deg, rgba(88,166,255,.28) 0%, rgba(88,166,255,.12) 100%);
  box-shadow: 0 0 14px rgba(88,166,255,.16);
}

.keno-tile.drawn {
  border-color: rgba(240,180,41,.72);
  background: linear-gradient(180deg, rgba(240,180,41,.22) 0%, rgba(240,180,41,.08) 100%);
}

.keno-tile.hit {
  color: #07130b;
  border-color: rgba(63,185,80,.82);
  background: linear-gradient(180deg, #7ff3a5 0%, #3fb950 100%);
  box-shadow: 0 0 18px rgba(63,185,80,.22);
}

@media (max-width: 1100px) {
  .keno-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .keno-stats {
    grid-template-columns: 1fr;
  }

  .keno-stage-header {
    flex-direction: column;
  }

  .keno-readout {
    align-items: flex-start;
    text-align: left;
  }

  .keno-board {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }

  .keno-tile {
    min-height: 54px;
    font-size: 16px;
  }

  .keno-paytable {
    grid-template-columns: 1fr;
  }
}

/* ── Game Hubs ─────────────────────────────────────────────── */
.hub-wrap {
  max-width: 1200px;
  display: grid;
  gap: 14px;
}

.hub-hero {
  padding: 18px;
  background:
    radial-gradient(560px 180px at 20% -20%, rgba(88,166,255,.2), transparent 72%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hub-card {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.2);
  background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.04));
  padding: 14px 0 14px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 150px;
  align-items: stretch;
  gap: 10px;
  min-height: 132px;
  overflow: hidden;
  position: relative;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.hub-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.42);
  box-shadow: 0 14px 26px rgba(0,0,0,.18), 0 0 0 1px rgba(255,255,255,.08) inset;
}

.hub-card::after {
  content: "";
  position: absolute;
  inset: auto -16px -24px auto;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%);
  pointer-events: none;
}

.hub-card-copy {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding-right: 6px;
}

.hub-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-card-top strong {
  font-size: 19px;
}

.hub-card p {
  color: rgba(230,237,243,.86);
  font-size: 13px;
  line-height: 1.45;
}

.hub-card-preview {
  align-self: stretch;
  min-height: 104px;
}

.hub-icon-scene {
  align-self: stretch;
  min-height: calc(100% + 28px);
  margin: -14px 0 -14px 0;
  border-left: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(160deg, rgba(14,20,32,.62), rgba(7,10,18,.9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
  display: grid;
  place-items: center;
  padding: 18px 14px 18px 28px;
}

.hub-icon-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120px 88px at 82% 20%, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(145deg, rgba(255,255,255,.06), transparent 45%);
  pointer-events: none;
}

.hub-icon-cluster {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  width: 100%;
}

.hub-icon-glyph {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.96);
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 18px rgba(0,0,0,.16);
}

.hub-icon-glyph i {
  font-size: 20px;
  line-height: 1;
}

.hub-icon-note {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  color: rgba(255,255,255,.94);
  background: rgba(5,8,14,.46);
  border: 1px solid rgba(255,255,255,.12);
}

.hub-icon-scene-blackjack .hub-icon-glyph:nth-child(1) { color: #f8fafc; transform: rotate(-12deg) translate(10px, 1px); }
.hub-icon-scene-blackjack .hub-icon-glyph:nth-child(2) { color: #fb7185; transform: rotate(8deg) translate(-3px, -5px); }
.hub-icon-scene-blackjack .hub-icon-glyph:nth-child(3) { color: #86efac; transform: translate(-10px, 10px); }

.hub-icon-scene-hilo .hub-icon-glyph:nth-child(1) {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #93c5fd;
}
.hub-icon-scene-hilo .hub-icon-glyph:nth-child(2) { color: #4ade80; transform: translateY(10px); }
.hub-icon-scene-hilo .hub-icon-glyph:nth-child(3) { color: #f87171; transform: translateY(10px); }

.hub-icon-scene-slots .hub-icon-cluster {
  gap: 6px;
  flex-wrap: nowrap;
}
.hub-icon-scene-slots .hub-icon-glyph {
  width: 32px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(233,236,241,.76));
  color: #7c2d12;
}

.hub-icon-scene-plinko .hub-icon-glyph:nth-child(1) {
  width: 46px;
  height: 46px;
  color: rgba(255,255,255,.72);
}
.hub-icon-scene-plinko .hub-icon-glyph:nth-child(2) {
  border-radius: 999px;
  color: #fbbf24;
  transform: translateY(-8px);
}
.hub-icon-scene-plinko .hub-icon-glyph:nth-child(3) {
  border-radius: 999px;
  color: #93c5fd;
  transform: translate(2px, 10px);
}

.hub-icon-scene-mines .hub-icon-glyph:nth-child(1) {
  width: 48px;
  height: 48px;
  color: #cbd5e1;
}
.hub-icon-scene-mines .hub-icon-glyph:nth-child(2) { color: #f87171; transform: rotate(-10deg); }
.hub-icon-scene-mines .hub-icon-glyph:nth-child(3) { color: #4ade80; transform: rotate(9deg); }

.hub-icon-scene-craps .hub-icon-cluster {
  gap: 8px;
  flex-wrap: nowrap;
}

.hub-icon-scene-craps .hub-icon-glyph:nth-child(1),
.hub-icon-scene-craps .hub-icon-glyph:nth-child(2) {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(233,236,241,.78));
  color: #7c2d12;
}

.hub-icon-scene-craps .hub-icon-glyph:nth-child(1) {
  transform: translateY(4px) rotate(-7deg);
}

.hub-icon-scene-craps .hub-icon-glyph:nth-child(2) {
  transform: translateY(-4px) rotate(7deg);
}

.hub-icon-scene-craps .hub-icon-glyph:nth-child(3) {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #fbbf24;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.04));
}

.hub-icon-scene-roulette .hub-icon-glyph {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  color: #f8fafc;
}

.hub-roulette-svg {
  width: 52px;
  height: 52px;
}

.hub-icon-scene-whack .hub-icon-glyph:nth-child(1) {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: #f59e0b;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.02));
}
.hub-icon-scene-whack .hub-icon-glyph:nth-child(2) {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #93c5fd;
}
.hub-icon-scene-whack .hub-icon-glyph:nth-child(3) {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #fcd34d;
}

.hub-icon-scene-stacker .hub-icon-cluster {
  gap: 7px;
  flex-wrap: nowrap;
}

.hub-icon-scene-stacker .hub-icon-glyph:nth-child(1) {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #93c5fd;
}

.hub-icon-scene-stacker .hub-icon-glyph:nth-child(2) {
  width: 34px;
  height: 44px;
  border-radius: 10px;
  color: #60a5fa;
}

.hub-icon-scene-stacker .hub-icon-glyph:nth-child(3) {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  color: #fbbf24;
  transform: translateY(-8px);
}

.hub-icon-scene-horse .hub-icon-glyph:nth-child(1) { color: #f8fafc; }
.hub-icon-scene-horse .hub-icon-glyph:nth-child(2) { color: #60a5fa; }
.hub-icon-scene-horse .hub-icon-glyph:nth-child(3) { color: #fbbf24; }

.hub-icon-scene-formula1 .hub-icon-glyph:nth-child(1) { color: #f87171; transform: rotate(-8deg) translate(6px, 2px); }
.hub-icon-scene-formula1 .hub-icon-glyph:nth-child(2) { color: #c0c0c0; transform: translateY(-4px); }
.hub-icon-scene-formula1 .hub-icon-glyph:nth-child(3) { color: #ffd700; transform: rotate(6deg) translate(-6px, 2px); }

.hub-icon-scene-yahtzee .hub-icon-cluster {
  gap: 8px;
  flex-wrap: nowrap;
}
.hub-icon-scene-yahtzee .hub-icon-glyph {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(223,227,255,.78));
  color: #4338ca;
}

.hub-icon-scene-keno .hub-icon-glyph:nth-child(1) {
  width: 48px;
  height: 48px;
  color: #d1fae5;
}
.hub-icon-scene-keno .hub-icon-glyph:nth-child(2) { color: #86efac; }
.hub-icon-scene-keno .hub-icon-glyph:nth-child(3) { color: #facc15; }

.hub-icon-scene-wheel .hub-icon-glyph:nth-child(1) {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fb923c;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.02));
}
.hub-icon-scene-wheel .hub-icon-glyph:nth-child(2) {
  border-radius: 50%;
  color: #fcd34d;
  transform: translateY(-6px);
}
.hub-icon-scene-wheel .hub-icon-glyph:nth-child(3) {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #f9a8d4;
  transform: translate(2px, 8px);
}

.hub-tone-emerald { background: linear-gradient(160deg, rgba(52,168,105,.58), rgba(19,52,35,.74)); }
.hub-tone-sapphire { background: linear-gradient(160deg, rgba(64,131,232,.58), rgba(20,40,78,.74)); }
.hub-tone-sunset { background: linear-gradient(160deg, rgba(221,131,60,.58), rgba(72,36,19,.76)); }
.hub-tone-amber { background: linear-gradient(160deg, rgba(214,173,62,.58), rgba(63,48,15,.76)); }
.hub-tone-ruby { background: linear-gradient(160deg, rgba(205,83,83,.58), rgba(69,22,22,.76)); }
.hub-tone-violet { background: linear-gradient(160deg, rgba(140,96,214,.58), rgba(43,27,72,.76)); }

@media (max-width: 860px) {
  .hub-grid {
    grid-template-columns: 1fr;
  }

  .hub-card {
    grid-template-columns: minmax(0, 1fr) 132px;
  }

  .hub-icon-scene {
    min-height: calc(100% + 28px);
    padding-left: 22px;
  }
}

/* ── Auth pages ─────────────────────────────────────────────────────────── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.4rem 2.8rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
}

.auth-header { text-align: center; margin-bottom: 1.6rem; }
.auth-icon { font-size: 2.6rem; }
.auth-title { font-size: 1.5rem; margin: .4rem 0 .2rem; color: var(--text-primary); }
.auth-subtitle { color: var(--text-muted); font-size: .9rem; margin: 0; }

.auth-error {
  background: rgba(248,81,73,.18);
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 6px;
  padding: .6rem .9rem;
  margin-bottom: 1rem;
  font-size: .9rem;
}

.auth-form { display: flex; flex-direction: column; gap: 1rem; }

.auth-field { display: flex; flex-direction: column; gap: .35rem; }
.auth-field label { font-size: .85rem; color: var(--text-secondary); font-weight: 500; }
.auth-field input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: .95rem;
  padding: .6rem .8rem;
  transition: border-color .15s;
}
.auth-field input:focus { outline: none; border-color: var(--primary); }

.auth-hint { color: var(--text-muted); font-weight: 400; font-size: .8rem; }

.auth-submit {
  margin-top: .4rem;
  padding: .7rem;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
}

.auth-footer {
  text-align: center;
  margin-top: 1.2rem;
  font-size: .88rem;
  color: var(--text-muted);
}
.auth-footer a { color: var(--primary); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

.auth-disclaimer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  margin-top: 1rem;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 200, 0, 0.08);
  border: 1px solid rgba(255, 200, 0, 0.25);
  font-size: .80rem;
  color: rgba(255, 210, 70, 0.85);
}

/* ── HUD user/logout additions ──────────────────────────────────────────── */
.hud-user {
  font-size: .82rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 0 .4rem;
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .78rem;
  padding: .25rem .6rem;
  transition: border-color .15s, color .15s;
}
.btn-logout:hover { border-color: var(--danger); color: var(--danger); }

/* ── Admin panel ─────────────────────────────────────────────────────────── */
.page-header { padding: 1rem 0 .6rem; }
.page-header h2 { font-size: 1.4rem; color: var(--text-primary); margin: 0; }

.admin-section { margin-bottom: 2rem; padding: 1.2rem 1.4rem; }
.section-title { font-size: 1.05rem; color: var(--text-secondary); margin: 0 0 1rem; }

.table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.admin-table th {
  background: var(--bg-base);
  color: var(--text-muted);
  padding: .5rem .7rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.admin-table td {
  padding: .45rem .7rem;
  border-bottom: 1px solid rgba(48,54,61,.6);
  color: var(--text-primary);
  vertical-align: middle;
}
.admin-table tr:hover td { background: rgba(255,255,255,.03); }

.badge {
  display: inline-block;
  border-radius: 4px;
  font-size: .75rem;
  padding: .15rem .45rem;
  font-weight: 600;
}
.badge-ok    { background: rgba(63,185,80,.2); color: var(--success); }
.badge-off   { background: rgba(48,54,61,.6);  color: var(--text-muted); }
.badge-admin { background: rgba(88,166,255,.2); color: var(--primary); }

.admin-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.btn-sm {
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: .76rem;
  padding: .2rem .55rem;
  transition: border-color .15s;
}
.btn-sm:hover { border-color: var(--primary); color: var(--primary); }

.muted { color: var(--text-muted); font-size: .8rem; }
.log-detail { max-width: 300px; word-break: break-all; font-size: .8rem; color: var(--text-muted); }

.row-win td  { background: rgba(63,185,80,.05); }
.row-lose td { background: rgba(248,81,73,.05); }

.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }

.update-output {
  margin-top: 1rem;
  padding: .75rem 1rem;
  border-radius: 6px;
  font-family: monospace;
  font-size: .82rem;
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.update-output-ok  { border-color: var(--success); color: var(--success); }
.update-output-err { border-color: var(--danger);  color: var(--danger); }

/* ── Investing / Crypto ────────────────────────────────────────────────────── */

/* Home page investing card gradient (used in home.html inline style) */
/* (class defined inline in home.html <style> block for scoping) */

/* Crypto stat badge on profile */
#stat-crypto {
  color: #00b4d8;
}

/* Crypto live dot pulse */
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .45; transform: scale(.75); }
}

/* ── Anti-autoclicker challenge popup ────────────────────────── */
#aac-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.aac-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px 24px;
  box-shadow: 0 0 48px rgba(88, 166, 255, 0.18), 0 8px 32px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 320px;
  max-width: 92vw;
}
.aac-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.01em;
}
.aac-canvas {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 10px;
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  display: block;
  cursor: crosshair;
  touch-action: none;
}
.aac-progress-wrap {
  width: 100%;
  max-width: 420px;
  height: 6px;
  background: var(--bg-raised);
  border-radius: 99px;
  overflow: hidden;
}
.aac-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 99px;
  transition: width 0.1s linear, background 0.3s;
}
body.aac-noscroll { overflow: hidden; }

/* ── Study theme colour overrides (ikstudeer7.sweeter.be) ──────────────── */
[data-theme="study"] .hud {
  background: linear-gradient(90deg, #1e3a5f 0%, #1e40af 100%);
  border-bottom-color: rgba(59,130,246,0.35);
}
[data-theme="study"] .hud-brand {
  color: #93c5fd;
  text-shadow: 0 0 12px rgba(59,130,246,0.7);
}
[data-theme="study"] .nav-bar {
  background: rgba(30,58,95,0.97);
  border-bottom-color: rgba(59,130,246,0.18);
}
[data-theme="study"] .nav-tab:hover,
[data-theme="study"] .nav-tab.active {
  color: #93c5fd;
  border-bottom-color: #3b82f6;
}
