/* ═══════════════════════════════════════════════════════
   TRUNKED GAMES — Stylesheet v2.0
   Improved design: richer cards, better game UIs, polished payment flow
   ═══════════════════════════════════════════════════════ */

/* ── Games Hero ── */
.games-hero {
  position: relative;
  min-height: 560px;
  padding-top: 140px;
  padding-bottom: 90px;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: #131b3d;
}
.games-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(111, 204, 222, .18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(106, 90, 205, .15) 0%, transparent 70%),
    linear-gradient(135deg, #0c1020 0%, #1a2870 40%, #2a3a86 70%, #1a2870 100%);
  opacity: .95;
}
.games-hero-content { position: relative; z-index: 2; }
.games-hero h1 { max-width: 800px; font-size: clamp(48px, 7vw, 100px); }
.games-hero h1 em { color: #6fccde; }
.games-hero-intro { max-width: 540px; margin: 28px 0 0; color: rgba(255,255,255,.8); font-size: 17px; line-height: 1.65; }
.games-hero-actions { display: flex; align-items: center; gap: 34px; margin-top: 38px; }
.games-hero-actions .light-link { gap: 10px; padding: 10px 24px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(255,255,255,.06); backdrop-filter: blur(6px); color: rgba(255,255,255,.88); font-size: 11px; transition: background .35s var(--ease), border-color .35s var(--ease), color .35s ease; }
.games-hero-actions .light-link:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.5); color: #fff; }
.games-hero-actions .light-link span { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 11px; }

/* ── How It Works ── */
.hiw-heading { display: grid; grid-template-columns: 1fr 2fr; gap: 8%; margin-bottom: 80px; }
.hiw-heading h2 em { color: var(--olive); }
.hiw-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.hiw-step {
  position: relative;
  padding: 42px 32px 36px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--cream);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  overflow: hidden;
}
.hiw-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clay), #6fccde);
  opacity: 0;
  transition: opacity .35s ease;
}
.hiw-step:hover::before { opacity: 1; }
.hiw-step:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,.1); }
.hiw-step-num { position: absolute; top: 16px; right: 18px; color: var(--olive); font-size: 11px; letter-spacing: .14em; opacity: .4; }
.hiw-step-icon { font-size: 42px; margin-bottom: 20px; }
.hiw-step h3 { margin: 0 0 12px; font-family: var(--serif); font-size: 28px; font-weight: 400; }
.hiw-step p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }

/* ── Rewards Banner ── */
.rewards-banner {
  position: relative;
  padding-block: 110px;
  overflow: hidden;
  color: #fff;
  background: #0e1428;
}
.rewards-banner-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 70% 50%, rgba(111, 204, 222, .12) 0%, transparent 70%),
    linear-gradient(135deg, #1a2870 0%, #2a3a86 50%, #0c1020 100%);
}
.rewards-banner-overlay { position: absolute; inset: 0; background: rgba(12,16,32,.35); }
.rewards-banner-content { position: relative; z-index: 2; text-align: center; }
.rewards-banner h2 { margin-bottom: 50px; font-size: clamp(38px, 5.5vw, 72px); }
.rewards-banner h2 em { color: #6fccde; }
.rewards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 800px; margin: 0 auto; }
.reward-card {
  padding: 32px 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(12px);
  transition: transform .35s var(--ease), border-color .35s ease, box-shadow .35s ease;
}
.reward-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,.3);
  box-shadow: 0 12px 40px rgba(111, 204, 222, .12);
}
.reward-icon { font-size: 38px; display: block; margin-bottom: 14px; }
.reward-name { margin: 0 0 6px; font-weight: 600; font-size: 15px; }
.reward-pts { margin: 0; color: #6fccde; font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.rewards-note { margin: 36px 0 0; color: rgba(255,255,255,.5); font-size: 13px; }

/* ── Access Modal ── */
.access-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12,16,32,.8);
  backdrop-filter: blur(10px);
}
.access-modal-overlay.open { display: flex; }
.access-modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 44px 38px 38px;
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 32px 80px rgba(0,0,0,.3);
  animation: modalIn .4s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.access-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.access-modal-close:hover { background: var(--clay); color: #fff; border-color: var(--clay); }
.access-modal-body h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 28px; }
.access-modal-price { margin: 0 0 32px; font-size: 22px; font-weight: 600; color: var(--clay); }
.access-modal-price span { font-size: 14px; font-weight: 400; color: var(--ink-soft); }
.access-modal-steps { display: flex; flex-direction: column; gap: 28px; }
.access-step { display: flex; gap: 16px; }
.access-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--clay);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.access-step-title { margin: 0 0 6px; font-weight: 600; font-size: 16px; }
.access-step-detail { margin: 0 0 10px; color: var(--ink-soft); font-size: 14px; }
.till-number-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  margin: 8px 0 12px;
  border: 2px dashed var(--clay);
  border-radius: 12px;
  background: rgba(42, 58, 134, .06);
}
html[data-theme="dark"] .till-number-box { background: rgba(111, 204, 222, .08); }
.till-label { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.till-value { font-size: 22px; font-weight: 700; color: var(--clay); letter-spacing: .08em; font-family: var(--sans); }
.till-copy { border: none; background: transparent; cursor: pointer; font-size: 18px; padding: 2px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  font-family: var(--sans);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-group input:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 3px rgba(42, 58, 134, .1); }
html[data-theme="dark"] .form-group input:focus { box-shadow: 0 0 0 3px rgba(111, 204, 222, .15); }
.access-submit-btn {
  width: 100%;
  margin-top: 8px;
  color: #fff !important;
  background: var(--clay) !important;
  border-color: var(--clay) !important;
  font-size: 13px;
  transition: all .25s ease;
}
.access-submit-btn:hover { background: var(--olive) !important; border-color: var(--olive) !important; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(42, 58, 134, .2); }

/* ── M-Pesa Validation Error ── */
.mpesa-error {
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 10px;
  background: rgba(231, 76, 60, .1);
  border: 1px solid rgba(231, 76, 60, .25);
  color: #c0392b;
  font-size: 13px;
  line-height: 1.5;
}
html[data-theme="dark"] .mpesa-error { color: #e74c3c; background: rgba(231, 76, 60, .12); }

/* ── Payment Tabs ── */
.payment-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--cream);
  border-radius: 14px;
  padding: 4px;
}
.payment-tab {
  flex: 1;
  padding: 11px 14px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
  white-space: nowrap;
}
.payment-tab:hover { color: var(--ink); }
.payment-tab.active {
  background: var(--clay);
  color: #fff;
  box-shadow: 0 2px 12px rgba(42, 58, 134, .25);
}
.payment-method-panel { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.form-hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--ink-soft);
}

/* ── STK Push Status ── */
.stk-status-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 20px;
  margin: 12px 0 16px;
  border-radius: 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  text-align: center;
}
.stk-status-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--clay);
  border-radius: 50%;
  animation: stkSpin 1s linear infinite;
}
@keyframes stkSpin { to { transform: rotate(360deg); } }
.stk-status-text { margin: 0; font-weight: 600; font-size: 15px; }
.stk-status-hint { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
.stk-status-box.success {
  border-color: #2ecc71;
  background: rgba(46, 204, 113, .08);
}
.stk-status-box.success .stk-status-spinner { display: none; }
.stk-status-box.failed {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, .08);
}
.stk-status-box.failed .stk-status-spinner { display: none; }
.stk-status-box.stk-no-backend {
  border-color: #f39c12;
  background: rgba(243, 156, 18, .08);
}
.stk-status-box.stk-no-backend .stk-status-spinner { display: none; }
.stk-status-box.stk-no-backend .stk-status-hint code {
  background: rgba(0,0,0,.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}
.stk-status-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Submit Button Loading State ── */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: stkSpin .7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

/* ── Games Status Bar ── */
.games-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 24px;
  margin-bottom: 36px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--cream);
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.status-info { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e74c3c;
  flex-shrink: 0;
}
.status-dot.active { background: #2ecc71; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 0 0 rgba(46,204,113,.5); } 50% { box-shadow: 0 0 0 6px rgba(46,204,113,0); } }
.status-right { display: flex; align-items: center; gap: 18px; }
.points-display, .timer-display { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.points-icon, .timer-icon { font-size: 16px; }
.timer-display { color: var(--clay); }
.button-sm { min-height: 38px; padding: 0 20px; font-size: 10px; }
.btn-active-state {
  background: #2ecc71 !important;
  border-color: #2ecc71 !important;
  color: #fff !important;
}

/* ── Category Tabs ── */
.games-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.games-tab {
  padding: 10px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .25s ease;
}
.games-tab:hover { border-color: var(--clay); color: var(--ink); }
.games-tab.active { background: var(--clay); border-color: var(--clay); color: #fff; }

/* ════════════════════════════════════════════════════
   GAME CARDS — Enhanced design
   ════════════════════════════════════════════════════ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.game-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--cream);
  cursor: pointer;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .35s ease;
  overflow: hidden;
}
.game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
  border-color: transparent;
}
.game-card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  opacity: 0;
  filter: blur(80px);
  transition: opacity .5s ease;
  pointer-events: none;
  z-index: 0;
}
.game-card:hover .game-card-glow { opacity: .08; }
html[data-theme="dark"] .game-card:hover .game-card-glow { opacity: .12; }

.game-card-inner {
  position: relative;
  z-index: 1;
  padding: 28px 26px 24px;
}
.game-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.game-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.badge-family { background: rgba(46, 204, 113, .12); color: #27ae60; }
html[data-theme="dark"] .badge-family { background: rgba(46, 204, 113, .18); color: #2ecc71; }
.badge-adult { background: rgba(231, 76, 60, .12); color: #c0392b; }
html[data-theme="dark"] .badge-adult { background: rgba(231, 76, 60, .18); color: #e74c3c; }
.game-card-pts-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.game-card-icon-wrap {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent, var(--clay)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, var(--clay)) 15%, transparent);
  transition: transform .3s var(--ease);
}
.game-card:hover .game-card-icon-wrap { transform: scale(1.08) rotate(-3deg); }
.game-card-icon { font-size: 36px; display: block; line-height: 1; }

.game-card h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 24px; font-weight: 400; }
.game-card-desc { margin: 0 0 16px; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.game-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.game-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.game-card-meta svg { opacity: .6; }

.game-card-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: none;
  border-radius: 999px;
  background: var(--accent, var(--clay));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s ease;
}
.game-card-play:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,.15); }

/* ── Lock Overlay ── */
.game-card-locked { cursor: pointer; }
.game-card-locked .game-card-inner { filter: blur(1px); opacity: .5; transition: filter .3s ease, opacity .3s ease; }
.game-card-locked:hover .game-card-inner { filter: blur(0); opacity: .7; }
.game-card-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 22px;
  background: rgba(12, 16, 32, .08);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background .3s ease;
}
html[data-theme="dark"] .game-card-lock-overlay { background: rgba(0, 0, 0, .2); }
.game-card-locked:hover .game-card-lock-overlay { background: rgba(42, 58, 134, .12); }
.lock-icon { font-size: 32px; }

/* ═══════════════════════════════════════════════════════
   GAME PLAY OVERLAY
   ═══════════════════════════════════════════════════════ */
.game-play-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}
.game-play-overlay.open { display: flex; }
.game-play-container { display: flex; flex-direction: column; height: 100%; }
.game-play-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
  flex-shrink: 0;
}
.game-play-header h2 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 400; }
.game-play-header-right { display: flex; align-items: center; gap: 16px; }
.game-play-points { font-size: 14px; font-weight: 600; color: var(--clay); }
.game-play-exit { min-height: 36px; padding: 0 16px; font-size: 11px; }
.game-play-area {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

/* ═══════════════════════════════════════════════════════
   SHARED GAME STYLES — Improved
   ═══════════════════════════════════════════════════════ */
.game-board-wrap { width: 100%; max-width: 600px; text-align: center; }

.game-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid var(--clay);
  border-radius: 999px;
  background: var(--clay);
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  transition: all .25s ease;
}
.game-btn:hover:not(:disabled) { background: var(--olive); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(42, 58, 134, .2); }
.game-btn:disabled { opacity: .5; cursor: not-allowed; }
.game-btn-outline { background: transparent; color: var(--clay); }
.game-btn-outline:hover:not(:disabled) { background: var(--clay); color: #fff; }

.game-actions-row { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }

.game-prompt-card {
  padding: 36px 28px;
  margin: 20px 0;
  border-radius: 20px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(20px, 4vw, 30px);
  line-height: 1.4;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: cardSlide .35s var(--ease);
  box-shadow: 0 4px 20px rgba(0,0,0,.04);
}
@keyframes cardSlide { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

.game-top-stats {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}
.stat-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}
.stat-pill-accent { color: var(--clay); border-color: var(--clay); background: rgba(42, 58, 134, .06); }
html[data-theme="dark"] .stat-pill-accent { background: rgba(111, 204, 222, .1); }

.game-score-display {
  margin: 14px 0 20px;
  font-size: 16px;
  font-weight: 500;
}

/* ── Game Intro Screens ── */
.game-intro-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
}
.game-intro-icon { font-size: 64px; margin-bottom: 8px; }
.game-intro-screen h3 { font-family: var(--serif); font-size: 32px; margin: 0; }
.game-intro-screen p { color: var(--ink-soft); font-size: 15px; max-width: 360px; margin: 0 0 12px; }

/* ── Game Results Screens ── */
.game-results-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
}
.game-results-icon { font-size: 56px; }
.game-results-screen h3 { font-family: var(--serif); font-size: 32px; margin: 0; }
.game-results-score { font-size: 22px; font-weight: 600; margin: 0; }
.game-results-msg { color: var(--ink-soft); font-size: 15px; margin: 0 0 16px; }

/* ═══════════════════════════════════════════════════════
   INDIVIDUAL GAME STYLES
   ═══════════════════════════════════════════════════════ */

/* ── Chess Board ── */
.chess-board-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  margin: 12px auto 16px;
}
.chess-coords {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 500;
  padding: 0 4px;
}
.chess-coords-left { height: 100%; }
.chess-coords-left span { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; }
.chess-coords-bottom {
  flex-direction: row;
  width: 100%;
  max-width: 480px;
  padding: 4px 0;
}
.chess-coords-bottom span { flex: 1; text-align: center; }
.chess-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
}
.chess-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(20px, 5vw, 36px);
  cursor: pointer;
  aspect-ratio: 1;
  transition: background .15s ease;
  user-select: none;
  position: relative;
}
.chess-cell-light { background: #f0d9b5; }
.chess-cell-dark { background: #b58863; }
html[data-theme="dark"] .chess-cell-light { background: #c4a882; }
html[data-theme="dark"] .chess-cell-dark { background: #8b6b4a; }
.chess-cell.selected { background: #7fc97f !important; box-shadow: inset 0 0 0 2px rgba(0,0,0,.2); }
.chess-cell.valid-move { background: rgba(100, 200, 100, .4) !important; }
.chess-cell.valid-move::after { content: ""; width: 28%; height: 28%; border-radius: 50%; background: rgba(0,0,0,.18); }
.chess-cell.capture-move { background: rgba(231, 76, 60, .35) !important; }
.chess-cell.capture-move::after { display: none; }
.chess-status { margin: 8px 0; font-size: 16px; font-weight: 500; min-height: 28px; }
.chess-status.game-over { color: #2ecc71; font-size: 18px; font-weight: 700; }
.chess-captured { min-height: 28px; margin: 4px 0; }
.chess-captured-row { display: flex; gap: 2px; justify-content: center; font-size: 18px; }
.empty-captures { opacity: .3; font-size: 14px; }

/* ── Ludo ── */
.ludo-header { margin-bottom: 8px; }
.ludo-dice-area { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 14px 0; }
.ludo-dice {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--cream);
  cursor: pointer;
  transition: transform .2s ease;
  user-select: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.ludo-dice:hover { transform: scale(1.08); }
.ludo-dice.rolling { animation: diceRoll .4s ease; }
@keyframes diceRoll { 0% { transform: rotate(0); } 25% { transform: rotate(15deg); } 50% { transform: rotate(-15deg); } 75% { transform: rotate(8deg); } 100% { transform: rotate(0); } }
.ludo-turn-indicator { font-size: 16px; font-weight: 500; margin: 8px 0; }
.ludo-players-area { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.ludo-player-row {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--cream);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ludo-active-player { border-color: var(--clay); box-shadow: 0 0 0 2px rgba(42, 58, 134, .12); }
html[data-theme="dark"] .ludo-active-player { box-shadow: 0 0 0 2px rgba(111, 204, 222, .15); }
.ludo-player-label { font-size: 14px; margin-bottom: 10px; text-align: left; }
.ludo-pieces-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ludo-piece-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-size: 18px;
  cursor: pointer;
  transition: all .2s ease;
  min-width: 60px;
}
.ludo-piece-btn:disabled { opacity: .45; cursor: not-allowed; }
.ludo-piece-clickable { border-color: var(--clay); background: rgba(42, 58, 134, .06); cursor: pointer; }
.ludo-piece-clickable:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(42,58,134,.12); }
.ludo-piece-finished { border-color: #2ecc71; background: rgba(46, 204, 113, .08); }
.ludo-piece-label { font-size: 10px; font-weight: 600; color: var(--ink-soft); }
.ludo-rules-mini { margin: 12px 0 0; }
.ludo-rules-mini p { font-size: 12px; color: var(--ink-soft); margin: 0; }

/* ── Memory Cards ── */
.memory-header {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 20px;
}
.memory-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--cream);
  border: 1px solid var(--line);
}
.memory-stat-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.memory-stat-value { font-size: 18px; font-weight: 700; color: var(--ink); font-family: var(--sans); }
.memory-complete {
  padding: 20px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: rgba(46, 204, 113, .08);
  border: 1px solid rgba(46, 204, 113, .2);
}
.memory-complete h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 24px; }
.memory-complete p { margin: 0; color: var(--ink-soft); font-size: 14px; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 20px;
}
.memory-card {
  aspect-ratio: 3/4;
  perspective: 800px;
  cursor: pointer;
}
.memory-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform .5s var(--ease);
  transform-style: preserve-3d;
}
.memory-card.flipped .memory-card-inner { transform: rotateY(180deg); }
.memory-card.matched .memory-card-inner { transform: rotateY(180deg); }
.memory-card-front, .memory-card-back {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  backface-visibility: hidden;
  font-size: clamp(24px, 5vw, 36px);
}
.memory-card-front {
  background: linear-gradient(135deg, var(--clay), var(--olive));
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(42, 58, 134, .2);
}
.memory-card-front span { opacity: .6; }
.memory-card-back {
  background: var(--cream);
  border: 2px solid var(--line);
  transform: rotateY(180deg);
}
.memory-card.matched .memory-card-back { border-color: #2ecc71; background: rgba(46,204,113,.08); }

/* ── Charades ── */
.charades-game-screen { width: 100%; }
.charades-category { margin: 10px 0 6px; font-size: 13px; font-weight: 600; color: var(--clay); letter-spacing: .1em; text-transform: uppercase; }
.charades-prompt { font-size: clamp(24px, 5vw, 38px) !important; }
.charades-timer-wrap { display: flex; align-items: center; gap: 12px; max-width: 400px; margin: 0 auto; }
.charades-timer-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.charades-timer-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--clay);
  transition: width 1s linear;
}
.charades-timer-text { font-size: 16px; font-weight: 700; min-width: 40px; text-align: right; }
.charades-actions { display: flex; gap: 14px; margin-top: 24px; justify-content: center; }
.charades-correct-btn { background: #2ecc71 !important; border-color: #2ecc71 !important; }
.charades-correct-btn:hover:not(:disabled) { background: #27ae60 !important; }
.time-up-msg { font-size: 18px; font-weight: 600; color: #e74c3c; margin: 12px 0; }

/* ── Trivia ── */
.trivia-game-screen { width: 100%; }
.trivia-progress-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.trivia-progress-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.trivia-progress-fill { height: 100%; border-radius: 3px; background: var(--clay); transition: width .4s var(--ease); }
.trivia-progress-text { font-size: 12px; font-weight: 600; color: var(--ink-soft); min-width: 36px; text-align: right; }
.trivia-question { min-height: 100px; font-size: clamp(18px, 3.5vw, 26px) !important; }
.trivia-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; max-width: 500px; width: 100%; }
.trivia-answer-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: all .2s ease;
}
.trivia-answer-btn:hover:not(:disabled) { border-color: var(--clay); background: rgba(42, 58, 134, .06); transform: translateY(-1px); }
.trivia-answer-btn.correct { background: rgba(46, 204, 113, .15); border-color: #2ecc71; color: #27ae60; }
.trivia-answer-btn.wrong { background: rgba(231, 76, 60, .15); border-color: #e74c3c; color: #c0392b; }
.trivia-answer-letter {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}
.trivia-answer-btn.correct .trivia-answer-letter { background: #2ecc71; color: #fff; border-color: #2ecc71; }
.trivia-answer-btn.wrong .trivia-answer-letter { background: #e74c3c; color: #fff; border-color: #e74c3c; }

.trivia-results { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.trivia-result-icon { font-size: 56px; }
.trivia-results h3 { font-family: var(--serif); font-size: 32px; margin: 0; }
.trivia-score-ring { position: relative; width: 120px; height: 120px; margin: 8px 0; }
.trivia-score-ring svg { width: 100%; height: 100%; }
.trivia-score-ring circle { transition: stroke-dashoffset 1s var(--ease); }
.trivia-score-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; }
.trivia-score-detail { font-size: 16px; margin: 0; }
.trivia-score-msg { color: var(--ink-soft); font-size: 14px; margin: 0 0 12px; }

/* ── Word Scramble ── */
.scramble-letters {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
  flex-wrap: wrap;
}
.scramble-letter {
  width: 48px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--cream);
  font-size: 22px;
  font-weight: 700;
  font-family: var(--sans);
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  animation: letterBounce .4s var(--ease) both;
}
.scramble-letter:nth-child(1) { animation-delay: .05s; }
.scramble-letter:nth-child(2) { animation-delay: .1s; }
.scramble-letter:nth-child(3) { animation-delay: .15s; }
.scramble-letter:nth-child(4) { animation-delay: .2s; }
.scramble-letter:nth-child(5) { animation-delay: .25s; }
.scramble-letter:nth-child(6) { animation-delay: .3s; }
.scramble-letter:nth-child(7) { animation-delay: .35s; }
.scramble-letter:nth-child(8) { animation-delay: .4s; }
@keyframes letterBounce { from { opacity: 0; transform: translateY(-12px) scale(.9); } to { opacity: 1; transform: translateY(0) scale(1); } }

.scramble-input {
  width: 100%;
  max-width: 300px;
  padding: 14px 18px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--cream);
  color: var(--ink);
  font-size: 18px;
  font-family: var(--sans);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.scramble-input:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 3px rgba(42, 58, 134, .1); }
.scramble-hint { margin: 12px 0 0; font-size: 14px; color: var(--clay); font-weight: 500; }

/* ── Truth or Drink ── */
.tod-prompt { font-size: clamp(18px, 3.5vw, 26px) !important; }
.tod-choice-btns { display: flex; gap: 16px; margin: 24px 0; justify-content: center; }
.tod-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 36px;
  border-radius: 18px;
  border: 2px solid var(--line);
  background: var(--cream);
  cursor: pointer;
  transition: all .25s ease;
}
.tod-choice-btn:hover { border-color: var(--clay); transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0,0,0,.1); }
.tod-btn-icon { font-size: 32px; }
.tod-btn-label { font-family: var(--serif); font-size: 20px; }
.tod-truth-btn:hover { border-color: var(--clay); background: rgba(42, 58, 134, .06); }
.tod-drink-btn:hover { border-color: #e74c3c; background: rgba(231, 76, 60, .06); }

.tod-final-stats { display: flex; gap: 28px; margin: 16px 0; }
.tod-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 24px; border-radius: 14px; background: var(--cream); border: 1px solid var(--line); }
.tod-stat-icon { font-size: 28px; }
.tod-stat-num { font-size: 28px; font-weight: 700; color: var(--clay); }
.tod-stat span:last-child { font-size: 12px; color: var(--ink-soft); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }

/* ── Would You Rather ── */
.wyr-heading { font-family: var(--serif); font-size: 16px; color: var(--ink-soft); margin: 0 0 8px; }
.wyr-choices { display: flex; gap: 16px; margin: 16px 0; justify-content: center; flex-wrap: wrap; }
.wyr-choice {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  padding: 28px 22px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--cream);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.4;
  cursor: pointer;
  text-align: center;
  transition: all .25s ease;
}
.wyr-choice:hover { border-color: var(--clay); transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0,0,0,.1); }
.wyr-choice-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--clay);
  color: #fff;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
}
.wyr-choice-a:hover { border-color: #6c5ce7; }
.wyr-choice-a:hover .wyr-choice-letter { background: #6c5ce7; }
.wyr-choice-b:hover { border-color: #e17055; }
.wyr-choice-b:hover .wyr-choice-letter { background: #e17055; }
.wyr-or {
  display: flex;
  align-items: center;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink-soft);
  font-weight: 400;
}

/* ── Spin the Bottle ── */
.spin-setup { max-width: 320px; margin: 0 auto; }
.spin-input-row { display: flex; gap: 8px; margin-bottom: 12px; }
.spin-input-row .scramble-input { font-size: 15px; text-transform: none; letter-spacing: normal; text-align: left; }
.spin-container { position: relative; width: 240px; height: 240px; margin: 16px auto; }
.spin-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--clay);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  box-shadow: 0 8px 32px rgba(42, 58, 134, .1);
}
.spin-bottle {
  font-size: 56px;
  transition: transform 2s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  display: inline-block;
}
.spin-players { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 14px 0; }
.spin-player-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  background: var(--cream);
  transition: all .2s ease;
}
.spin-player-tag.highlighted { background: var(--clay); color: #fff; border-color: var(--clay); font-weight: 600; }
.spin-remove { display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; cursor: pointer; color: var(--ink-soft); font-size: 16px; padding: 0; margin-left: 2px; }
.spin-remove:hover { color: #e74c3c; }
.spin-dare { font-size: clamp(16px, 3vw, 22px) !important; }

/* ── Dice Game ── */
.dice-game-area { text-align: center; }
.dice-pair { display: flex; gap: 20px; justify-content: center; margin: 20px 0; }
.dice-single {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--cream);
  user-select: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.dice-single.rolling { animation: diceRoll .4s ease; }
.dice-result { font-family: var(--serif); font-size: 22px; margin: 8px 0; }
.dice-instruction { color: var(--ink-soft); font-size: 15px; margin: 20px 0; }
.dice-rule { font-size: clamp(16px, 3vw, 22px) !important; }
.dice-doubles { border-color: #f39c12 !important; background: rgba(243, 156, 18, .08) !important; }
.dice-history {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
  font-size: 12px;
  color: var(--ink-soft);
}
.dice-history-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   NOTIFICATIONS — Enhanced
   ═══════════════════════════════════════════════════════ */
.points-notification {
  position: fixed;
  top: 100px;
  right: 32px;
  z-index: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  border-radius: 14px;
  background: #2ecc71;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 8px 32px rgba(46, 204, 113, .3);
  transform: translateX(120%);
  transition: transform .4s var(--ease);
}
.points-notification.show { transform: translateX(0); }
.points-notification.warning { background: #f39c12; box-shadow: 0 8px 32px rgba(243, 156, 18, .3); }
.points-notification.error { background: #e74c3c; box-shadow: 0 8px 32px rgba(231, 76, 60, .3); }
.notif-icon { font-size: 18px; }

/* ── Active nav link ── */
.active-nav { color: var(--clay) !important; }
.site-header.scrolled .active-nav { color: var(--clay) !important; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .games-hero { min-height: 450px; padding-top: 120px; padding-bottom: 60px; }
  .hiw-heading { grid-template-columns: 1fr; gap: 32px; }
  .hiw-steps { grid-template-columns: 1fr; }
  .rewards-grid { grid-template-columns: repeat(2, 1fr); }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .trivia-answers { grid-template-columns: 1fr; }
  .wyr-choices { flex-direction: column; align-items: center; }
  .wyr-or { margin: -8px 0; }
  .tod-choice-btns { flex-direction: column; align-items: center; }
}

@media (max-width: 640px) {
  .games-hero { min-height: 420px; padding-top: 110px; padding-bottom: 48px; }
  .games-hero h1 { font-size: clamp(40px, 12vw, 64px); }
  .games-hero-actions { flex-direction: column; align-items: flex-start; gap: 18px; }
  .rewards-banner { padding-block: 80px; }
  .rewards-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .games-status-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .status-right { flex-wrap: wrap; }
  .games-grid { grid-template-columns: 1fr; }
  .access-modal { padding: 32px 22px 28px; }
  .chess-cell { font-size: clamp(16px, 4vw, 28px); }
  .cards-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .points-notification { right: 16px; top: 80px; font-size: 13px; padding: 12px 18px; }
  .memory-header { gap: 8px; }
  .memory-stat { padding: 6px 12px; }
  .tod-final-stats { gap: 16px; }
  .game-play-area { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .spin-bottle { transition-duration: .01ms !important; }
  .scramble-letter { animation: none !important; }
}
