:root {
  --bg-dark: #0a0e17;
  --bg-card: #121a2b;
  --bg-elevated: #1a2438;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --gold: #fbbf24;
  --gold-dark: #d97706;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font: 'Outfit', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(251, 191, 36, 0.08) 0%, transparent 50%);
}

a { color: inherit; text-decoration: none; }

button, input { font-family: inherit; }

.hidden { display: none !important; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.35rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
  font-size: 1.1rem;
}

.logo-text .gold { color: var(--gold); }

.nav {
  display: flex;
  gap: 1.5rem;
  flex: 1;
}

.nav a {
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover { color: var(--gold); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.free-banner {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.15), rgba(251, 191, 36, 0.12));
  border-bottom: 1px solid rgba(34, 197, 94, 0.25);
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  color: var(--text);
}

.free-banner strong { color: var(--success); }

.hero-free-note {
  margin-top: 1.25rem;
  color: var(--success);
  font-weight: 600;
  font-size: 0.95rem;
}

.user-greeting {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a1a1a;
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(251, 191, 36, 0.45);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent-hover); }

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.85rem; }

.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; }

/* Main */
#app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  min-height: calc(100vh - 180px);
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 1rem 4rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(251, 191, 36, 0.15);
  color: var(--gold);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero h1 span { color: var(--gold); }

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 3rem 0;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.feature-card .icon { font-size: 2rem; margin-bottom: 0.75rem; }

.feature-card h3 { font-size: 1rem; margin-bottom: 0.35rem; }

.feature-card p { color: var(--text-muted); font-size: 0.9rem; }

/* Section */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-header h2 { font-size: 1.75rem; font-weight: 700; }

.section-header p { color: var(--text-muted); }

/* Game grid */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(251, 191, 36, 0.3);
}

.game-card-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
}

.game-card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.game-card-body { padding: 1.15rem; }

.game-card-body h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }

.game-card-body p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.game-card .btn { width: 100%; }

/* Game page */
.game-page {
  max-width: 900px;
  margin: 0 auto;
}

.game-page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.back-link {
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s;
}

.back-link:hover { color: var(--gold); }

.game-page-header h1 { font-size: 1.75rem; flex: 1; }

.game-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.game-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.bet-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bet-control label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.bet-control input, .bet-control select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  width: 100px;
  font-weight: 600;
}

.game-message {
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin: 1rem 0;
  min-height: 2.5rem;
}

.game-message.win {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.game-message.lose {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.game-message.info {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-hover);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

/* Slots */
.slots-machine {
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
  border-radius: var(--radius);
  padding: 2rem;
  border: 3px solid var(--gold-dark);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.slots-reels {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.reel {
  width: 100px;
  height: 120px;
  background: #000;
  border: 2px solid var(--gold);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.reel-strip {
  display: flex;
  flex-direction: column;
  transition: transform 0.1s linear;
}

.reel-symbol {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.reel.spinning .reel-strip {
  animation: reelSpin 0.08s linear infinite;
}

@keyframes reelSpin {
  from { transform: translateY(0); }
  to { transform: translateY(-120px); }
}

.payline-indicator {
  text-align: center;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.slots-paytable {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.paytable-item {
  background: var(--bg-elevated);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
}

/* Blackjack */
.blackjack-table {
  text-align: center;
}

.dealer-area, .player-area {
  margin: 1.5rem 0;
}

.area-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.card-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-height: 130px;
  align-items: center;
}

.playing-card {
  width: 72px;
  height: 100px;
  background: white;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
  position: relative;
}

.playing-card.red { color: #dc2626; }
.playing-card.black { color: #1a1a1a; }

.playing-card.hidden-card {
  background: linear-gradient(135deg, #4338ca, #6366f1);
  color: transparent;
}

.playing-card.hidden-card::after {
  content: '♠';
  color: rgba(255, 255, 255, 0.3);
  font-size: 2rem;
}

.playing-card .card-suit { font-size: 1.5rem; line-height: 1; }

.hand-total {
  margin-top: 0.5rem;
  font-weight: 700;
  color: var(--gold);
}

.blackjack-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Roulette */
.roulette-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .roulette-layout { grid-template-columns: 1fr; }
}

.roulette-wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.roulette-wheel {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 6px solid var(--gold-dark);
  position: relative;
  background: conic-gradient(
    #dc2626 0deg 9.73deg, #1a1a1a 9.73deg 19.46deg,
    #dc2626 19.46deg 29.19deg, #1a1a1a 29.19deg 38.92deg,
    #dc2626 38.92deg 48.65deg, #1a1a1a 48.65deg 58.38deg,
    #dc2626 58.38deg 68.11deg, #1a1a1a 68.11deg 77.84deg,
    #dc2626 77.84deg 87.57deg, #1a1a1a 87.57deg 97.3deg,
    #dc2626 97.3deg 107.03deg, #1a1a1a 107.03deg 116.76deg,
    #dc2626 116.76deg 126.49deg, #1a1a1a 126.49deg 136.22deg,
    #dc2626 136.22deg 145.95deg, #1a1a1a 145.95deg 155.68deg,
    #dc2626 155.68deg 165.41deg, #1a1a1a 165.41deg 175.14deg,
    #dc2626 175.14deg 184.87deg, #1a1a1a 184.87deg 194.6deg,
    #dc2626 194.6deg 204.33deg, #1a1a1a 204.33deg 214.06deg,
    #dc2626 214.06deg 223.79deg, #1a1a1a 223.79deg 233.52deg,
    #dc2626 233.52deg 243.25deg, #1a1a1a 243.25deg 252.98deg,
    #dc2626 252.98deg 262.71deg, #1a1a1a 262.71deg 272.44deg,
    #dc2626 272.44deg 282.17deg, #1a1a1a 282.17deg 291.9deg,
    #dc2626 291.9deg 301.63deg, #1a1a1a 301.63deg 311.36deg,
    #dc2626 311.36deg 321.09deg, #1a1a1a 321.09deg 330.82deg,
    #dc2626 330.82deg 340.55deg, #1a1a1a 340.55deg 350.28deg,
    #dc2626 350.28deg 360deg
  );
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.2);
}

.roulette-wheel::before {
  content: '';
  position: absolute;
  inset: 30%;
  background: var(--bg-dark);
  border-radius: 50%;
  border: 3px solid var(--gold);
}

.roulette-wheel::after {
  content: attr(data-result);
  position: absolute;
  inset: 38%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
}

.wheel-pointer {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 20px solid var(--gold);
  margin-bottom: -10px;
  z-index: 2;
}

.bet-board {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bet-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--bg-elevated);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-weight: 600;
}

.bet-option:hover { border-color: var(--border); }

.bet-option.selected {
  border-color: var(--gold);
  background: rgba(251, 191, 36, 0.1);
}

.bet-option .chip-preview {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.3);
}

.bet-option.selected .chip-preview {
  background: var(--gold);
  border-color: var(--gold-dark);
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-top: 0.5rem;
}

.num-btn {
  padding: 0.4rem;
  border: none;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.num-btn.red { background: #dc2626; color: white; }
.num-btn.black { background: #1a1a1a; color: white; border: 1px solid #333; }
.num-btn.green { background: #16a34a; color: white; grid-column: span 6; }

.num-btn.selected {
  box-shadow: 0 0 0 3px var(--gold);
  transform: scale(1.05);
}

/* Poker */
.poker-hand {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.poker-card {
  width: 80px;
  height: 112px;
  background: white;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  user-select: none;
  font-weight: 800;
}

.poker-card.red { color: #dc2626; }
.poker-card.black { color: #1a1a1a; }

.poker-card.held {
  transform: translateY(-12px);
  box-shadow: 0 0 0 3px var(--gold), 0 8px 20px rgba(251, 191, 36, 0.3);
}

.poker-card .card-suit { font-size: 1.75rem; }

.poker-paytable {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  max-width: 320px;
  margin: 1rem auto;
  font-size: 0.85rem;
}

.poker-paytable .hand-name { color: var(--text-muted); }
.poker-paytable .payout { color: var(--gold); font-weight: 700; text-align: right; }

/* Scratch */
.scratch-card-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.scratch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 360px;
  width: 100%;
}

.scratch-cell {
  aspect-ratio: 1;
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--gold-dark);
}

.scratch-cell canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.scratch-symbol {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, #312e81, #1e1b4b);
}

.scratch-instructions {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Fortune Wheel (bonus) */
.fortune-wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.fortune-wheel-wrap {
  position: relative;
  width: 320px;
  height: 320px;
}

.fortune-wheel-svg {
  width: 100%;
  height: 100%;
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.fortune-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid var(--gold);
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.wheel-segments-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: 400px;
}

.wheel-segment-tag {
  background: var(--bg-elevated);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Bonuses page */
.bonus-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.bonus-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.bonus-card .icon { font-size: 3rem; margin-bottom: 1rem; }

.bonus-card h3 { margin-bottom: 0.5rem; }

.bonus-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.bonus-card.claimed {
  opacity: 0.6;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover { color: var(--text); }

.modal-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.modal-tab {
  flex: 1;
  padding: 0.6rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
}

.modal-tab.active {
  background: rgba(251, 191, 36, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}

.auth-form h2 { margin-bottom: 0.25rem; }

.form-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.auth-form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.auth-form input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-error {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  text-align: center;
}

/* Footer */
.support-strip {
  border-top: 1px solid var(--border);
  background: rgba(99, 102, 241, 0.08);
  padding: 1.25rem 1.5rem;
}

.support-strip-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.support-strip-title {
  font-weight: 600;
  margin-bottom: 0.65rem;
  color: var(--text);
}

.support-strip-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
}

.support-strip-links a {
  color: var(--accent-hover);
  font-size: 0.9rem;
  font-weight: 500;
}

.support-strip-links a:hover { color: var(--gold); }

.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem 2rem;
  margin-top: 0;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-heading {
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--gold); }

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-disclaimer {
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 700px;
  margin: 0 auto 0.75rem;
  line-height: 1.6;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
  opacity: 0.7;
}

.footer-operator {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem 1.5rem;
  text-align: center;
}

.footer-operator p {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.65;
  opacity: 0.85;
}

.footer-operator a {
  color: var(--text-muted);
  text-decoration: underline;
  transition: color 0.2s;
}

.footer-operator a:hover { color: var(--gold); }

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 300;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow);
}

.toast.show { transform: translateX(-50%) translateY(0); }

.toast.success { border-color: var(--success); color: var(--success); }

.home-play-area {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.home-play-area.hidden {
  display: none;
}

.home-play-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.home-play-header h2 {
  font-size: 1.5rem;
}

.game-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.25), var(--shadow);
}

.game-card.active .play-btn {
  background: linear-gradient(135deg, #fcd34d, var(--gold-dark));
}

.nav a.active { color: var(--gold); }

.nav-toggle {
  display: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  cursor: pointer;
}

/* Subpages */
.page-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  min-height: calc(100vh - 280px);
}

.page-hero {
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.page-hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}

.page-hero-sub strong { color: var(--success); }

.back-link-inline {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-weight: 500;
}

.back-link-inline:hover { color: var(--gold); }

.memory-stats {
  text-align: center;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1rem;
}

.memory-card .inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.memory-card:not(.flipped):not(.matched) .inner { color: transparent; }

.memory-card.flipped .inner,
.memory-card.matched .inner { color: inherit; }

.page-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.page-content.wide { max-width: 920px; }

.page-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  margin: 2rem 0 0.75rem;
}

.page-content h2:first-child { margin-top: 0; }

.page-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}

.page-content p,
.page-content li {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.page-content ul,
.page-content ol {
  padding-left: 1.35rem;
  margin: 0.75rem 0 1rem;
}

.page-content a { color: var(--accent-hover); }
.page-content a:hover { color: var(--gold); }

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.page-content th,
.page-content td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.page-content th {
  background: var(--bg-elevated);
  color: var(--text);
  font-weight: 600;
}

.page-content td { color: var(--text-muted); }

.info-box {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
}

.info-box strong { color: var(--accent-hover); }

.faq-list { max-width: 920px; margin: 0 auto; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-q {
  padding: 1rem 1.15rem;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text);
}

.faq-a {
  padding: 1rem 1.15rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  line-height: 1.65;
}

.faq-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  margin: 2rem 0 1rem;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.faq-section-title:first-child { margin-top: 0; }

.game-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.game-link-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: block;
  color: inherit;
}

.game-link-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: var(--shadow);
}

.game-link-card .icon { font-size: 3rem; margin-bottom: 0.75rem; }

.game-link-card h3 { margin-bottom: 0.5rem; }

.game-link-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.bonus-game-panel {
  max-width: 560px;
  margin: 0 auto 2rem;
  background: var(--bg-card);
  border: 2px solid var(--gold-dark);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.bonus-slots-display {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.bonus-reel {
  width: 90px;
  height: 100px;
  background: #000;
  border: 2px solid var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
}

.bonus-reel.spinning {
  animation: reelSpin 0.08s linear infinite;
}

.bonus-game-info {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-weight: 600;
}

.bonus-game-legal {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.bonus-wheel-wrap {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto 1.5rem;
}

.bonus-wheel-svg {
  width: 100%;
  height: 100%;
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.bonus-wheel-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 24px solid var(--gold);
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  max-width: 360px;
  margin: 0 auto 1rem;
}

.memory-card {
  aspect-ratio: 1;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s, border-color 0.15s;
}

.memory-card.flipped,
.memory-card.matched {
  background: var(--bg-card);
  border-color: var(--gold);
}

.memory-card.hidden-face { color: transparent; }

@media (max-width: 640px) {
  .header-inner { gap: 1rem; }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 14, 23, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }
  .nav.is-open { display: flex; }
  .header-inner { position: relative; flex-wrap: wrap; }
  .header-actions { margin-left: auto; }
  .user-greeting { display: none; }
  .game-panel { padding: 1.25rem; }
  .reel { width: 80px; height: 96px; }
  .reel-symbol { height: 96px; font-size: 2.75rem; }
  .page-content { padding: 1.25rem; }
  .memory-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
}
