/* =========================================
   LudoKing — Rummy77-inspired Casino Green
   ========================================= */

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

:root {
  --bg-0: #0a1f14;
  --bg-1: #0f2a1c;
  --bg-2: #133625;
  --green-500: #10b981;
  --green-600: #059669;
  --green-400: #34d399;
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --gold-600: #d97706;
  --red: #ef4444;
  --blue: #3b82f6;
  --yellow: #eab308;
  --text: #ecfdf5;
  --text-dim: #a7f3d0;
  --text-muted: #6ee7b7;
  --border: rgba(52, 211, 153, 0.2);
  --card: rgba(15, 42, 28, 0.7);
  --card-hover: rgba(19, 54, 37, 0.9);
  --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.3);
  --shadow-gold: 0 0 30px rgba(251, 191, 36, 0.4);
}

html, body {
  font-family: 'Poppins', -apple-system, system-ui, sans-serif;
  background: radial-gradient(ellipse at top, var(--bg-1) 0%, var(--bg-0) 60%, #050f0a 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(251, 191, 36, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

#app-root {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============ TOP BAR ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 31, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
}
.brand-icon {
  color: var(--gold-400);
  font-size: 26px;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6));
}
.brand-text { color: var(--text); }
.brand-accent {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.top-nav { display: flex; gap: 4px; }
.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}
.nav-btn:hover { background: rgba(52, 211, 153, 0.1); color: var(--text); }
.nav-btn.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-400);
}

.top-actions { display: flex; align-items: center; gap: 10px; }
.coin-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(217, 119, 6, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 999px;
  font-weight: 700;
  color: var(--gold-400);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.15);
  transition: all 0.2s;
}
.coin-chip i { font-size: 16px; }
.coin-chip.pulse { animation: coinPulse 0.6s ease; }
@keyframes coinPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); box-shadow: 0 0 30px rgba(251, 191, 36, 0.5); }
  100% { transform: scale(1); }
}
.lang-btn, .sound-btn {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.lang-btn:hover, .sound-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  color: var(--text);
}

/* ============ MAIN WRAP ============ */
.main-wrap {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}

/* ============ SCREENS ============ */
.screen { display: none; animation: fadeIn 0.35s ease; }
.screen.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 40px 0 60px;
  overflow: hidden;
  border-radius: 24px;
  margin-bottom: 48px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(16, 185, 129, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(251, 191, 36, 0.1) 0%, transparent 50%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 0 24px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green-400);
  margin-bottom: 20px;
}
.hero-badge i { font-size: 12px; }
.hero-title {
  font-size: 56px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.hero-title span { display: block; }
.hero-gradient {
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.3));
}
.hero-sub {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 540px;
  margin-bottom: 28px;
  line-height: 1.6;
}
.hero-cta { display: flex; gap: 12px; margin-bottom: 36px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.stat-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--gold-400);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}

/* Hero Art */
.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}
.hero-board-preview {
  position: relative;
  width: 280px;
  height: 280px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-glow), 0 30px 60px rgba(0, 0, 0, 0.5);
  transform: rotate(-6deg);
  transition: transform 0.5s;
  animation: floatBoard 4s ease-in-out infinite;
}
.hero-board-preview:hover { transform: rotate(0deg) scale(1.05); }
@keyframes floatBoard {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(-6deg) translateY(-10px); }
}
.mini-quadrant { position: relative; }
.mini-red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.mini-green { background: linear-gradient(135deg, #10b981, #059669); }
.mini-yellow { background: linear-gradient(135deg, #eab308, #ca8a04); }
.mini-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.mini-quadrant::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40%; height: 40%;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.4);
}
.mini-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  color: var(--gold-400);
  font-size: 32px;
}
.coin-float {
  position: absolute;
  color: var(--gold-400);
  font-size: 28px;
  filter: drop-shadow(0 4px 12px rgba(251, 191, 36, 0.6));
  animation: coinFloat 3s ease-in-out infinite;
}
.coin-float-1 { top: 20%; right: 10%; animation-delay: 0s; }
.coin-float-2 { bottom: 20%; left: 5%; animation-delay: 1s; }
.coin-float-3 { top: 50%; right: -5%; animation-delay: 2s; font-size: 36px; }
@keyframes coinFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-20px) rotate(15deg); }
}

/* ============ BUTTONS ============ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-600) 100%);
  color: #3d2400;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: all 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(251, 191, 36, 0.5); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost:hover { background: rgba(16, 185, 129, 0.2); border-color: var(--green-400); }

/* ============ SECTIONS ============ */
.section { margin-bottom: 56px; }
.section-head { margin-bottom: 28px; text-align: center; }
.section-head h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.section-head p { color: var(--text-dim); font-size: 15px; }

/* Tables Grid */
.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.table-card {
  position: relative;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s;
  overflow: hidden;
}
.table-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(16, 185, 129, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}
.table-card:hover {
  transform: translateY(-4px);
  border-color: var(--green-400);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(16, 185, 129, 0.2);
  background: var(--card-hover);
}
.table-card:hover::before { opacity: 1; }
.table-card.disabled { opacity: 0.5; cursor: not-allowed; }
.table-card.disabled:hover { transform: none; border-color: var(--border); }
.table-tier {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.table-tier.tier-beginner { background: rgba(52, 211, 153, 0.15); color: var(--green-400); }
.table-tier.tier-silver { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }
.table-tier.tier-gold { background: rgba(251, 191, 36, 0.15); color: var(--gold-400); }
.table-tier.tier-diamond { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.table-tier.tier-royal { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.table-icon { font-size: 32px; margin-bottom: 12px; color: var(--gold-400); }
.table-name { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.table-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.table-row:last-child { border-bottom: none; }
.table-row-label { color: var(--text-muted); }
.table-row-value { font-weight: 700; color: var(--gold-400); }
.table-play-btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s;
}
.table-play-btn:hover { filter: brightness(1.15); }

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.feature-card {
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.25s;
}
.feature-card:hover { transform: translateY(-4px); background: var(--card-hover); }
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}
.feature-icon-1 { background: rgba(16, 185, 129, 0.15); color: var(--green-400); }
.feature-icon-2 { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.feature-icon-3 { background: rgba(251, 191, 36, 0.15); color: var(--gold-400); }
.feature-icon-4 { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.feature-card p { color: var(--text-dim); font-size: 14px; line-height: 1.5; }

/* ============ GAME SCREEN ============ */
.game-layout {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  gap: 20px;
  align-items: start;
}
.panel-card {
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 14px;
}
.panel-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.players-list { display: flex; flex-direction: column; gap: 10px; }
.player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.25s;
}
.player-row.active {
  background: rgba(251, 191, 36, 0.1);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.2), inset 0 0 0 1px rgba(251, 191, 36, 0.3);
}
.player-dot {
  width: 14px; height: 14px; border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 10px currentColor;
}
.player-dot.red { background: #ef4444; color: #ef4444; }
.player-dot.green { background: #10b981; color: #10b981; }
.player-dot.yellow { background: #eab308; color: #eab308; }
.player-dot.blue { background: #3b82f6; color: #3b82f6; }
.player-info { flex: 1; min-width: 0; }
.player-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-meta { font-size: 11px; color: var(--text-muted); }
.player-home-count {
  font-weight: 700;
  color: var(--gold-400);
  font-size: 13px;
}

.pot-card {
  text-align: center;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(217, 119, 6, 0.05));
  border-color: rgba(251, 191, 36, 0.3);
}
.pot-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.pot-amount {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-leave { width: 100%; justify-content: center; padding: 10px; font-size: 13px; }

.board-wrap {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
#board-canvas {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1 / 1;
  height: auto;
  display: block;
  border-radius: 12px;
  background: #0a1f14;
  cursor: default;
}
#board-canvas.clickable { cursor: pointer; }
.board-status {
  padding: 10px 20px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  color: var(--green-400);
}

/* Dice */
.dice-card { text-align: center; }
.dice-container {
  display: flex;
  justify-content: center;
  padding: 14px 0;
}
.dice {
  width: 88px;
  height: 88px;
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: #0f2a1c;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 -4px 0 rgba(0, 0, 0, 0.1),
    inset 0 2px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.2s;
}
.dice.rolling { animation: diceRoll 0.6s ease; }
@keyframes diceRoll {
  0% { transform: rotate(0) scale(1); }
  25% { transform: rotate(90deg) scale(1.15); }
  50% { transform: rotate(180deg) scale(1); }
  75% { transform: rotate(270deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(1); }
}
.btn-roll { width: 100%; justify-content: center; margin-top: 8px; }
.dice-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.log-card { max-height: 280px; display: flex; flex-direction: column; }
.log-list {
  flex: 1;
  overflow-y: auto;
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.log-list::-webkit-scrollbar { width: 4px; }
.log-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.log-entry {
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  border-left: 2px solid var(--green-400);
}
.log-entry.highlight { border-left-color: var(--gold-400); color: var(--gold-400); }
.log-entry.capture { border-left-color: var(--red); }

/* ============ HISTORY ============ */
.history-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.summary-card {
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}
.summary-num { font-size: 28px; font-weight: 800; color: var(--gold-400); }
.summary-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

.history-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.history-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.history-row:last-child { border-bottom: none; }
.history-result {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.history-result.win { background: rgba(16, 185, 129, 0.2); color: var(--green-400); }
.history-result.lose { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.history-table { font-weight: 600; }
.history-date { font-size: 12px; color: var(--text-muted); }
.history-delta { font-weight: 700; }
.history-delta.win { color: var(--green-400); }
.history-delta.lose { color: #f87171; }

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }

/* ============ HOW TO PLAY ============ */
.howto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.howto-card {
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}
.howto-num {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: #3d2400;
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.howto-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.howto-card p { color: var(--text-dim); font-size: 14px; line-height: 1.6; }

/* ============ MODALS ============ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}
.modal.show { display: flex; }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 36px;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalPop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.12); color: var(--text); }
.modal-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
}
.reward-icon {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: #3d2400;
  box-shadow: var(--shadow-gold);
}
.warn-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}
.modal-card h2 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.modal-card p { color: var(--text-dim); font-size: 15px; margin-bottom: 22px; }
.reward-amount, .result-prize {
  font-size: 42px;
  font-weight: 800;
  color: var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.4));
}
.result-card .modal-icon { width: 90px; height: 90px; font-size: 44px; }
.result-card .modal-icon.win {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: #3d2400;
  box-shadow: var(--shadow-gold);
  animation: trophyBounce 0.8s ease;
}
.result-card .modal-icon.lose {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}
@keyframes trophyBounce {
  0%, 100% { transform: scale(1) rotate(0); }
  25% { transform: scale(1.2) rotate(-8deg); }
  50% { transform: scale(1.1) rotate(8deg); }
  75% { transform: scale(1.15) rotate(-4deg); }
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.modal-actions button { flex: 1; justify-content: center; }

/* ============ FOOTER ============ */
.footer {
  margin-top: 60px;
  padding: 24px;
  border-top: 1px solid var(--border);
  background: rgba(5, 15, 10, 0.6);
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--gold-400);
}
.footer-note {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { min-height: 260px; }
  .hero-board-preview { width: 220px; height: 220px; }
  .game-layout { grid-template-columns: 1fr; }
  .players-panel, .actions-panel { order: 2; }
  .board-wrap { order: 1; }
}

@media (max-width: 720px) {
  .hero-title { font-size: 38px; }
  .hero-sub { font-size: 15px; }
  .hero-stats { gap: 24px; }
  .stat-num { font-size: 24px; }
  .topbar-inner { padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  .top-nav { order: 3; width: 100%; overflow-x: auto; }
  .brand-text { font-size: 18px; }
  .main-wrap { padding: 16px; }
  .section-head h2 { font-size: 24px; }
  .tables-grid, .features-grid, .howto-grid { grid-template-columns: 1fr; }
  .modal-card { padding: 24px; }
  .modal-card h2 { font-size: 22px; }
  .reward-amount, .result-prize { font-size: 32px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
