/* BETIFIED — Dark Casino Aesthetic */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --amber: #F59E0B;
  --amber-light: #FCD34D;
  --amber-dark: #D97706;
  --bg: #111827;
  --surface: #1F2937;
  --surface-2: #374151;
  --surface-3: #4B5563;
  --green: #10B981;
  --green-dark: #059669;
  --red: #EF4444;
  --red-dark: #DC2626;
  --text: #F9FAFB;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;
  --border: rgba(245,158,11,0.15);
  --border-hover: rgba(245,158,11,0.4);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-amber: 0 0 40px rgba(245,158,11,0.15);
  --glow-amber: 0 0 20px rgba(245,158,11,0.3);
  --glow-green: 0 0 20px rgba(16,185,129,0.4);
  --glow-red: 0 0 20px rgba(239,68,68,0.4);
  --font: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

/* ── Typography ── */
h1, h2, h3, h4, h5 { font-weight: 800; letter-spacing: -0.02em; }
.mono { font-family: var(--mono); }

/* ── Nav ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(17,24,39,0.95);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--text);
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--bg);
  box-shadow: var(--glow-amber);
  position: relative;
  overflow: hidden;
}

.logo-mark::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
  transform: rotate(0deg);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.logo-text span { color: var(--amber); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--amber); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 100%);
  color: var(--bg);
  box-shadow: 0 4px 16px rgba(245,158,11,0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(245,158,11,0.45);
}

.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--amber);
  border: 1px solid var(--border-hover);
}

.btn-outline:hover {
  background: rgba(245,158,11,0.08);
  border-color: var(--amber);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--surface-2);
}

.btn-ghost:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--surface-3);
}

.btn-danger {
  background: var(--red);
  color: white;
}

.btn-danger:hover {
  background: var(--red-dark);
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  border-radius: 14px;
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  border-radius: 8px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.3s;
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-amber);
  transform: translateY(-2px);
}

.glass {
  background: rgba(31,41,55,0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.05);
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-amber {
  background: rgba(245,158,11,0.15);
  color: var(--amber);
  border: 1px solid rgba(245,158,11,0.3);
}

.badge-green {
  background: rgba(16,185,129,0.15);
  color: var(--green);
  border: 1px solid rgba(16,185,129,0.3);
}

.badge-red {
  background: rgba(239,68,68,0.15);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
}

/* ── Inputs ── */
.input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  transition: all 0.2s;
  outline: none;
}

.input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.1);
}

.input::placeholder { color: var(--text-dim); }

/* ══════════════════════════════════════
   LANDING PAGE
══════════════════════════════════════ */

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(245,158,11,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(16,185,129,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 800px;
  margin-bottom: 1.25rem;
}

.hero-title .gradient {
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-light) 50%, var(--amber) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--amber);
  font-family: var(--mono);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* Games Section */
.section {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.game-card {
  position: relative;
  overflow: hidden;
}

.game-card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.game-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.game-card-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.game-card-odds {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(245,158,11,0.08);
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
}

.odds-label { color: var(--text-dim); }
.odds-value { color: var(--amber); font-family: var(--mono); font-weight: 600; }

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.08) 0%, transparent 70%);
  transform: translate(30%, -30%);
}

/* Fair Section */
.fair-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  margin: 2rem 0;
}

.fair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.fair-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.fair-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.step-num {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: linear-gradient(135deg, var(--amber), var(--amber-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--bg);
}

.step-content h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.step-content p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.fair-code {
  background: var(--bg);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius);
  padding: 1.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow-x: auto;
}

.fair-code .comment { color: var(--text-dim); }
.fair-code .keyword { color: var(--amber); }
.fair-code .string { color: var(--green); }
.fair-code .func { color: #60A5FA; }

/* Waitlist */
.waitlist-section {
  background: linear-gradient(135deg, rgba(245,158,11,0.08) 0%, rgba(16,185,129,0.05) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
}

.waitlist-form {
  display: flex;
  gap: 0.75rem;
  max-width: 440px;
  margin: 1.5rem auto 0;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8125rem;
}

footer a { color: var(--amber); text-decoration: none; }
footer a:hover { text-decoration: underline; }

.demo-notice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ══════════════════════════════════════
   GAME PAGE
══════════════════════════════════════ */

.game-layout {
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  grid-template-rows: 64px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* Game Header */
.game-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(17,24,39,0.98);
  backdrop-filter: blur(20px);
  z-index: 50;
}

.game-header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.balance-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.balance-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.balance-value {
  font-family: var(--mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--amber);
}

.balance-value.win-flash {
  animation: winFlash 0.6s ease;
}

.balance-value.lose-flash {
  animation: loseFlash 0.6s ease;
}

@keyframes winFlash {
  0%, 100% { color: var(--amber); }
  50% { color: var(--green); text-shadow: var(--glow-green); }
}

@keyframes loseFlash {
  0%, 100% { color: var(--amber); }
  50% { color: var(--red); text-shadow: var(--glow-red); }
}

.fair-badge {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
}

.fair-badge::before {
  content: '✓';
  font-size: 0.875rem;
}

/* Sidebar */
.game-sidebar {
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 1.25rem;
  overflow-y: auto;
}

.sidebar-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.game-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 0.25rem;
  border: 1px solid transparent;
}

.game-nav-item:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.game-nav-item.active {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.3);
  color: var(--amber);
}

.game-nav-icon { font-size: 1.25rem; }

.game-nav-text { font-size: 0.875rem; font-weight: 500; }

.game-nav-multiplier {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--amber);
}

/* Main game area */
.game-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
  position: relative;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(245,158,11,0.04) 0%, transparent 60%);
}

/* ── Coin Flip Visualizer ── */
.coin-visualizer {
  width: 160px;
  height: 160px;
  perspective: 800px;
  margin-bottom: 1.5rem;
}

.coin {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.coin.flipping {
  animation: coinFlip 1.2s ease-in-out forwards;
}

@keyframes coinFlip {
  0% { transform: rotateY(0) rotateX(0); }
  25% { transform: rotateY(360deg) rotateX(20deg) translateY(-30px); }
  50% { transform: rotateY(720deg) rotateX(0) translateY(-50px); }
  75% { transform: rotateY(1080deg) rotateX(-20deg) translateY(-20px); }
  100% { transform: rotateY(var(--final-rot)) rotateX(0) translateY(0); }
}

.coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 0 0 4px rgba(245,158,11,0.2), inset 0 2px 10px rgba(255,255,255,0.1);
}

.coin-heads {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 40%, #F59E0B 70%, #FCD34D 100%);
  color: var(--bg);
}

.coin-tails {
  background: linear-gradient(135deg, #374151 0%, #1F2937 40%, #374151 70%, #4B5563 100%);
  color: var(--amber);
  transform: rotateY(180deg);
}

/* ── Dice Visualizer ── */
.dice-visualizer {
  width: 120px;
  height: 120px;
  perspective: 600px;
  margin-bottom: 1.5rem;
}

.dice {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(15deg) rotateY(25deg);
  transition: transform 0.3s;
}

.dice.rolling {
  animation: diceRoll 1s ease-out forwards;
}

@keyframes diceRoll {
  0% { transform: rotateX(0) rotateY(0); }
  20% { transform: rotateX(180deg) rotateY(90deg); }
  40% { transform: rotateX(270deg) rotateY(180deg); }
  60% { transform: rotateX(360deg) rotateY(270deg); }
  80% { transform: rotateX(420deg) rotateY(340deg); }
  100% { transform: rotateX(var(--final-x)) rotateY(var(--final-y)); }
}

.dice-face {
  position: absolute;
  width: 120px;
  height: 120px;
  background: var(--surface-2);
  border: 2px solid var(--amber);
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--amber);
}

.dice-face-front { transform: translateZ(60px); }
.dice-face-back { transform: rotateY(180deg) translateZ(60px); }
.dice-face-right { transform: rotateY(90deg) translateZ(60px); }
.dice-face-left { transform: rotateY(-90deg) translateZ(60px); }
.dice-face-top { transform: rotateX(90deg) translateZ(60px); }
.dice-face-bottom { transform: rotateX(-90deg) translateZ(60px); }

/* ── Card Visualizer ── */
.cards-visualizer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.playing-card {
  width: 80px;
  height: 112px;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--mono);
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.playing-card.red-card { color: #F87171; }
.playing-card.black-card { color: var(--text); }

.playing-card.revealed {
  animation: cardReveal 0.4s ease;
}

@keyframes cardReveal {
  0% { transform: rotateY(90deg) scale(0.8); opacity: 0; }
  100% { transform: rotateY(0) scale(1); opacity: 1; }
}

.playing-card.face-down {
  background: repeating-diagonal-gradient;
  background: linear-gradient(135deg, #1e3a5f 25%, #1a3350 25%, #1a3350 50%, #1e3a5f 50%, #1e3a5f 75%, #1a3350 75%, #1a3350);
  background-size: 20px 20px;
}

.playing-card.face-down::after {
  content: '🂠';
  font-size: 3rem;
  color: var(--amber);
  opacity: 0.7;
}

.card-arrow {
  font-size: 2rem;
  color: var(--surface-3);
  font-weight: 700;
}

.game-result-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10;
}

.game-result-overlay.show {
  opacity: 1;
  animation: resultPop 0.6s ease;
}

@keyframes resultPop {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  60% { transform: translate(-50%, -50%) scale(1.15); }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.result-text {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.result-text.win { color: var(--green); text-shadow: var(--glow-green); }
.result-text.lose { color: var(--red); text-shadow: var(--glow-red); }

.result-amount {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.result-amount.win { color: var(--green); }
.result-amount.lose { color: var(--red); }

/* Game flash backgrounds */
.game-main.flash-win {
  animation: bgWin 0.8s ease;
}

.game-main.flash-lose {
  animation: bgLose 0.8s ease;
}

@keyframes bgWin {
  0%, 100% { background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(245,158,11,0.04) 0%, transparent 60%); }
  50% { background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(16,185,129,0.1) 0%, transparent 60%); }
}

@keyframes bgLose {
  0%, 100% { background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(245,158,11,0.04) 0%, transparent 60%); }
  50% { background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(239,68,68,0.1) 0%, transparent 60%); }
}

/* Bet Panel */
.bet-panel {
  border-left: 1px solid var(--border);
  background: var(--surface);
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bet-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.amount-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.preset-btn {
  padding: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--mono);
}

.preset-btn:hover {
  background: var(--surface-3);
  border-color: var(--amber);
  color: var(--amber);
}

.choice-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.choice-btn {
  padding: 0.875rem 0.5rem;
  background: var(--surface-2);
  border: 1.5px solid var(--surface-3);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.choice-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(245,158,11,0.08);
}

.choice-btn.selected {
  background: rgba(245,158,11,0.15);
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: 0 0 12px rgba(245,158,11,0.15);
}

.place-bet-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 100%);
  border: none;
  border-radius: 12px;
  color: var(--bg);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.place-bet-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.4);
}

.place-bet-btn:active:not(:disabled) { transform: translateY(0); }

.place-bet-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.place-bet-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.payout-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.75rem;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.8125rem;
}

.payout-label { color: var(--text-dim); }
.payout-value { font-family: var(--mono); font-weight: 600; color: var(--green); }

/* Bet History */
.bet-history-section {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  background: var(--bg);
  max-height: 180px;
  overflow-y: auto;
}

.history-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.history-feed {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border-radius: 8px;
  font-size: 0.8125rem;
  border-left: 3px solid transparent;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(-10px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.history-item.won { border-left-color: var(--green); }
.history-item.lost { border-left-color: var(--red); }

.history-game { color: var(--text-dim); flex: 1; }
.history-choice { color: var(--text-muted); }
.history-amount { font-family: var(--mono); font-weight: 600; }
.history-amount.won { color: var(--green); }
.history-amount.lost { color: var(--red); }

/* Responsive */
@media (max-width: 900px) {
  .game-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 64px auto 1fr auto;
    height: auto;
    min-height: 100vh;
  }
  
  .game-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem;
  }
  
  .game-sidebar .sidebar-title { display: none; }
  
  .game-nav-item {
    display: inline-flex;
    width: auto;
    margin: 0 0.25rem;
  }
  
  .game-sidebar {
    display: flex;
    flex-wrap: wrap;
    padding: 0.5rem;
  }
  
  .bet-panel {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .fair-grid { grid-template-columns: 1fr; }
  .waitlist-form { flex-direction: column; }
}

@media (max-width: 600px) {
  .hero-title { font-size: 2.25rem; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .hero-stats { gap: 1.5rem; }
  .nav-links { display: none; }
}

/* ── Spinner ── */
.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid rgba(17,24,39,0.4);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ── */
.text-center { text-align: center; }
.text-amber { color: var(--amber); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* Provably fair modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 480px;
  width: 90%;
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
}

.modal-close:hover { color: var(--text); }

.seed-row {
  background: var(--bg);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.seed-key {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.seed-val {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--amber);
  word-break: break-all;
}
