/* ═══════════════════════════════════════════════════════════════════════════
   GAMEVAULT — Premium Telegram Mini App Styles
   Production-quality dark theme with glassmorphism and smooth transitions
   ═══════════════════════════════════════════════════════════════════════════ */

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

:root {
  --bg: #0a0a1a;
  --bg2: #111128;
  --bg3: #1a1a3e;
  --card: rgba(255,255,255,0.04);
  --card-hover: rgba(255,255,255,0.08);
  --glass: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.1);
  --glass-strong: rgba(255,255,255,0.1);
  --accent: #6c5ce7;
  --accent2: #a855f7;
  --accent-glow: rgba(108,92,231,0.35);
  --gold: #f5c518;
  --gold-dim: rgba(245,197,24,0.25);
  --green: #00d4aa;
  --red: #ff4757;
  --text: #f0f0ff;
  --text2: #7878a0;
  --text3: #55557a;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  height: 100%; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg); color: var(--text);
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* ── Particles Canvas ──────────────────────────────────────────────────────── */
#particles {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5;
}

/* ── Confetti Canvas ───────────────────────────────────────────────────────── */
.confetti-canvas {
  position: fixed; inset: 0; z-index: 300; pointer-events: none;
}

/* ── Page Transition ───────────────────────────────────────────────────────── */
.page-transition {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg); pointer-events: none;
  opacity: 0; transition: opacity 0.2s ease;
}
.page-transition.active { opacity: 1; pointer-events: auto; }

/* ── Screens ───────────────────────────────────────────────────────────────── */
.screen {
  position: fixed; inset: 0; z-index: 1;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0.96) translateY(10px);
  max-width: 480px; margin: 0 auto; width: 100%;
}
.screen.active {
  opacity: 1; pointer-events: auto;
  transform: scale(1) translateY(0);
}

/* ═══ PROFILE CARD ═════════════════════════════════════════════════════════ */
.profile-card {
  display: flex; justify-content: space-between; align-items: center;
  margin: 14px 16px 0; padding: 16px 18px;
  background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(168,85,247,0.08));
  border: 1px solid rgba(108,92,231,0.2);
  border-radius: 20px; backdrop-filter: blur(12px);
  position: relative; overflow: hidden;
}
/* Decorative gradient orb */
.profile-card::before {
  content: ''; position: absolute; top: -30px; right: -20px;
  width: 100px; height: 100px; border-radius: 50%;
  background: radial-gradient(circle, rgba(108,92,231,0.2), transparent 70%);
}

.profile-left { display: flex; align-items: center; gap: 12px; }

/* Avatar with animated ring */
.profile-avatar {
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  position: relative; flex-shrink: 0;
}
.profile-avatar-letter {
  font-weight: 800; font-size: 22px; color: #fff; z-index: 1;
}
.profile-avatar-ring {
  position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--gold); border-right-color: var(--accent2);
  animation: spinRing 3s linear infinite;
}
@keyframes spinRing { to { transform: rotate(360deg); } }

.profile-name { font-weight: 700; font-size: 17px; line-height: 1.2; }
.profile-level { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.level-badge {
  font-size: 11px; font-weight: 700; color: var(--gold);
  background: var(--gold-dim); padding: 2px 8px; border-radius: 20px;
}
.profile-id { font-size: 11px; color: var(--text3); }

.profile-wallet { text-align: right; position: relative; z-index: 1; }
.wallet-label { font-size: 11px; color: var(--text2); margin-bottom: 2px; text-transform: uppercase; letter-spacing: 1px; }
.wallet-amount { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.wallet-coin-icon { width: 26px; height: 26px; display: inline-block; vertical-align: middle; }
.wallet-coins { font-weight: 800; font-size: 22px; color: var(--gold); }

/* ═══ XP PROGRESS BAR ═══════════════════════════════════════════════════════ */
.xp-bar-wrap { margin: 10px 16px 0; }
.xp-bar-label {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text2); margin-bottom: 4px;
}
.xp-bar-bg {
  width: 100%; height: 6px; background: rgba(255,255,255,0.06);
  border-radius: 3px; overflow: hidden;
}
.xp-bar-fill {
  height: 100%; border-radius: 3px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ═══ HUB ACTIONS ══════════════════════════════════════════════════════════ */
.hub-actions {
  display: flex; gap: 10px; padding: 14px 16px 0;
}
.hub-btn {
  flex: 1; padding: 14px 12px; border: none; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  position: relative; overflow: hidden;
}
.hub-btn:active { transform: scale(0.96); background: var(--card-hover); }
.hub-btn-icon { width: 28px; height: 28px; flex-shrink: 0; }
.hub-btn-text { white-space: nowrap; }
.hub-btn-daily { border-color: rgba(168,85,247,0.25); }
.hub-btn-lb { border-color: rgba(245,197,24,0.2); }

/* Daily badge (notification dot) */
.hub-btn-badge {
  position: absolute; top: 6px; right: 8px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--red); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  animation: pulse 2s infinite;
}
.hub-btn-badge.hidden { display: none; }

/* ═══ SECTION HEADER ═══════════════════════════════════════════════════════ */
.section-header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 16px 16px 8px;
}
.section-title { font-size: 20px; font-weight: 800; }
.section-count { font-size: 12px; color: var(--text2); }

/* ═══ GAME GRID ════════════════════════════════════════════════════════════ */
.game-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; padding: 0 16px 120px; overflow-y: auto; flex: 1;
  scroll-behavior: smooth;
}
.game-grid::-webkit-scrollbar { width: 0; }

/* Individual game card */
.game-card {
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 14px;
  cursor: pointer; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: row; align-items: center;
  gap: 12px; position: relative;
}
/* Glow on hover/active */
.game-card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  background: radial-gradient(circle at 0% 50%, var(--card-glow, rgba(108,92,231,0.15)), transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.game-card:active { transform: scale(0.96); }
.game-card:active::before { opacity: 1; }

/* SVG icon container */
.game-card-icon {
  width: 48px; height: 48px; min-width: 48px; position: relative; z-index: 1;
  border-radius: 12px;
  background: var(--glass); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s;
  flex-shrink: 0;
}
.game-card:active .game-card-icon { transform: scale(1.08) rotate(-3deg); }
.game-card-icon img { width: 32px; height: 32px; display: block; object-fit: contain; }

.game-card-info { display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 1; min-width: 0; }
.game-card-name {
  font-weight: 700; font-size: 13px; position: relative; z-index: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.game-card-reward {
  font-size: 11px; color: var(--text2); position: relative; z-index: 1;
}

/* ═══ GAME SCREEN ══════════════════════════════════════════════════════════ */
.game-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: rgba(17,17,40,0.9);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}
.back-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.back-btn:active { transform: scale(0.88); }
.game-title { font-weight: 700; font-size: 17px; }
.game-coins {
  display: flex; align-items: center; gap: 4px;
  font-weight: 700; color: var(--gold); font-size: 16px;
}
.game-coin-icon { width: 24px; height: 24px; display: inline-block; vertical-align: middle; }

.game-container {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding: 10px;
}

/* ═══ GAME START OVERLAY ═══════════════════════════════════════════════════ */
.game-start-overlay {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(10,10,26,0.92); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.game-start-overlay.active { opacity: 1; pointer-events: auto; }
.game-start-icon {
  width: 80px; height: 80px; margin-bottom: 12px;
  animation: popIn 0.4s ease;
}
.game-start-icon img { width: 80px; height: 80px; display: block; object-fit: contain; }
.game-start-name { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.game-start-count {
  font-size: 64px; font-weight: 900; color: var(--gold);
  text-shadow: 0 0 30px var(--gold-dim);
  animation: countPulse 0.8s ease infinite;
}
@keyframes countPulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

/* ═══ MODALS ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal {
  width: 100%; max-width: 480px; max-height: 85vh;
  background: linear-gradient(180deg, #161638, var(--bg2));
  border: 1px solid var(--glass-border);
  border-radius: 24px 24px 0 0; padding: 20px 20px 28px;
  transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal-sm { max-height: 65vh; }

.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.modal-head h2 { font-size: 20px; font-weight: 800; }
.modal-x {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text); font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.modal-x:active { transform: scale(0.9); }
.modal-body { overflow-y: auto; max-height: 55vh; }
.modal-body::-webkit-scrollbar { width: 3px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--glass); border-radius: 2px; }
.center { text-align: center; }
.muted { color: var(--text2); padding: 20px; }

/* ═══ PODIUM (Top 3) ══════════════════════════════════════════════════════ */
.podium {
  display: flex; justify-content: center; align-items: flex-end;
  gap: 8px; padding: 10px 0 16px; min-height: 140px;
}
.podium-col {
  display: flex; flex-direction: column; align-items: center; width: 90px;
}
.podium-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #fff; margin-bottom: 4px;
}
.podium-col:nth-child(1) .podium-avatar { background: linear-gradient(135deg,#c0c0c0,#a0a0a0); }
.podium-col:nth-child(2) .podium-avatar { background: linear-gradient(135deg,#ffd700,#e6a800); width: 52px; height: 52px; font-size: 22px; }
.podium-col:nth-child(3) .podium-avatar { background: linear-gradient(135deg,#cd7f32,#b06828); }

.podium-name { font-size: 12px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
.podium-coins { font-size: 11px; color: var(--gold); font-weight: 700; margin-bottom: 4px; }
.podium-bar {
  width: 100%; border-radius: 8px 8px 0 0;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 4px; font-size: 18px;
}
.podium-col:nth-child(1) .podium-bar { height: 50px; background: linear-gradient(180deg,#c0c0c0,#888); }
.podium-col:nth-child(2) .podium-bar { height: 70px; background: linear-gradient(180deg,#ffd700,#cc9900); }
.podium-col:nth-child(3) .podium-bar { height: 36px; background: linear-gradient(180deg,#cd7f32,#996020); }

/* ═══ LEADERBOARD ROWS ════════════════════════════════════════════════════ */
.lb-row {
  display: flex; align-items: center; padding: 12px 14px;
  background: var(--card); border-radius: var(--radius-sm);
  margin-bottom: 8px; transition: all 0.2s;
}
.lb-row:hover { background: var(--card-hover); }
.lb-rank {
  width: 30px; font-weight: 800; font-size: 14px; color: var(--text2);
  flex-shrink: 0;
}
.lb-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--glass-strong); display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 13px; margin-right: 10px;
  flex-shrink: 0;
}
.lb-name { flex: 1; font-weight: 600; font-size: 14px; }
.lb-coins { font-weight: 700; color: var(--gold); font-size: 14px; }
.lb-lvl { font-size: 11px; color: var(--text3); margin-left: 10px; min-width: 32px; text-align: right; }

/* ═══ DAILY REWARD ════════════════════════════════════════════════════════ */
.daily-anim { width: 100px; height: 100px; margin: 10px auto; display: block; object-fit: contain; }
.daily-msg { color: var(--text2); margin: 14px 0 18px; font-size: 16px; line-height: 1.4; }

/* ═══ GAME OVER ════════════════════════════════════════════════════════════ */
.go-trophy { width: 90px; height: 90px; margin: 0 auto 8px; display: block; object-fit: contain; }
.go-score-label { color: var(--text2); margin-bottom: 4px; font-size: 14px; }
.go-score {
  font-size: 38px; font-weight: 800; color: var(--gold);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 22px;
}
.go-coin-icon { width: 36px; height: 36px; }

/* ═══ BUTTONS ══════════════════════════════════════════════════════════════ */
.btn-primary {
  width: 100%; padding: 16px; border: none; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: all 0.15s; margin-bottom: 10px; letter-spacing: 0.3px;
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }

/* Glowing button */
.btn-glow {
  box-shadow: 0 4px 24px var(--accent-glow);
  animation: btnGlow 2s ease infinite;
}
@keyframes btnGlow {
  0%,100% { box-shadow: 0 4px 24px var(--accent-glow); }
  50% { box-shadow: 0 4px 36px rgba(108,92,231,0.5); }
}

.btn-secondary {
  width: 100%; padding: 14px; border: none; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all 0.15s;
}
.btn-secondary:active { transform: scale(0.97); }

/* ═══ ANIMATIONS ══════════════════════════════════════════════════════════ */
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes fadeUp {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-110px) scale(1.5); }
}
@keyframes popIn {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Staggered card entrance */
.game-card { animation: slideUp 0.4s ease both; }
.game-card:nth-child(1) { animation-delay: 0.03s; }
.game-card:nth-child(2) { animation-delay: 0.06s; }
.game-card:nth-child(3) { animation-delay: 0.09s; }
.game-card:nth-child(4) { animation-delay: 0.12s; }
.game-card:nth-child(5) { animation-delay: 0.15s; }
.game-card:nth-child(6) { animation-delay: 0.18s; }
.game-card:nth-child(7) { animation-delay: 0.21s; }
.game-card:nth-child(8) { animation-delay: 0.24s; }
.game-card:nth-child(9) { animation-delay: 0.27s; }
.game-card:nth-child(10) { animation-delay: 0.30s; }

.pop-in { animation: popIn 0.3s ease; }
.float-text {
  position: absolute; font-size: 26px; font-weight: 800;
  color: var(--gold); text-shadow: 0 0 10px var(--gold-dim);
  animation: fadeUp 0.9s ease-out forwards; pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GAME-SPECIFIC STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tap Game ──────────────────────────────────────────────────────────────── */
.tap-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; height: 100%; justify-content: center; }
.tap-score { font-size: 44px; font-weight: 800; color: var(--gold); margin-bottom: 4px; }
.tap-sub { font-size: 13px; color: var(--text2); margin-bottom: 20px; }
.tap-coin {
  width: 180px; height: 180px; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 35% 35%, #3a5fc8, var(--bg3));
  box-shadow: 0 0 50px var(--accent-glow), inset 0 -4px 12px rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 72px; transition: transform 0.06s; position: relative;
}
.tap-coin:active { transform: scale(0.92); }
.tap-coin.disabled { opacity: 0.4; pointer-events: none; }
.tap-energy-wrap { width: 100%; max-width: 300px; margin-top: 24px; }
.tap-energy-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.tap-energy-bg { width: 100%; height: 10px; background: rgba(255,255,255,0.08); border-radius: 5px; overflow: hidden; }
.tap-energy-fill {
  height: 100%; border-radius: 5px; transition: width 0.3s;
  background: linear-gradient(90deg, var(--green), #00f5c8);
}
.tap-energy-fill.low { background: linear-gradient(90deg, var(--red), #ff6b8a); }

/* ── Canvas Games ──────────────────────────────────────────────────────────── */
.game-canvas {
  border-radius: var(--radius-sm); background: var(--bg2);
  border: 1px solid var(--glass-border);
  max-width: 100%; touch-action: none;
}

/* ── Memory Game ───────────────────────────────────────────────────────────── */
.mem-grid {
  display: grid; gap: 8px; padding: 10px;
  width: 100%; max-width: 360px;
}
.mem-card {
  aspect-ratio: 1; border-radius: var(--radius-sm);
  background: var(--bg3); border: 2px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; cursor: pointer; transition: all 0.3s;
}
.mem-card.flipped { background: var(--accent); border-color: var(--accent2); animation: popIn 0.25s ease; }
.mem-card.matched { background: var(--green); border-color: var(--green); opacity: 0.65; }
.mem-card-inner { transition: transform 0.08s; }
.mem-card:active .mem-card-inner { transform: scale(0.9); }
.mem-info { display: flex; gap: 20px; margin-bottom: 12px; font-size: 14px; color: var(--text2); }

/* ── Reaction Game ─────────────────────────────────────────────────────────── */
.react-box {
  width: 100%; max-width: 360px; height: 320px;
  border-radius: var(--radius); display: flex;
  align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s;
  font-size: 20px; font-weight: 700; text-align: center; padding: 20px;
}
.react-box.waiting { background: var(--red); }
.react-box.ready { background: var(--green); animation: popIn 0.15s ease; }
.react-box.idle { background: var(--bg3); border: 2px solid var(--glass-border); }
.react-box.result { background: var(--bg3); border: 2px solid var(--glass-border); }
.react-best { color: var(--text2); font-size: 13px; margin-top: 12px; }

/* ── Spin Wheel ────────────────────────────────────────────────────────────── */
.spin-wrap { display: flex; flex-direction: column; align-items: center; }
.spin-pointer {
  font-size: 30px; margin-bottom: -10px; z-index: 2; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.spin-canvas { border-radius: 50%; box-shadow: 0 0 40px var(--accent-glow); }
.spin-btn {
  margin-top: 20px; padding: 14px 50px; border: none; border-radius: 30px;
  background: linear-gradient(135deg, var(--gold), #ffa500);
  color: var(--bg); font-size: 18px; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 20px var(--gold-dim); transition: transform 0.12s;
}
.spin-btn:active { transform: scale(0.95); }
.spin-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.spin-result { margin-top: 14px; font-size: 22px; font-weight: 700; color: var(--gold); min-height: 30px; }

/* ── Color Game ────────────────────────────────────────────────────────────── */
.color-target {
  width: 120px; height: 120px; border-radius: var(--radius);
  margin: 10px auto 20px; border: 3px solid var(--glass-border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.color-label { color: var(--text2); font-size: 14px; margin-bottom: 10px; }
.color-opts { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; max-width: 320px; }
.color-opt {
  aspect-ratio: 1; border-radius: var(--radius-sm); cursor: pointer;
  border: 3px solid transparent; transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.color-opt:active { transform: scale(0.9); }
.color-opt.correct { border-color: var(--green); box-shadow: 0 0 20px rgba(0,212,170,0.5); animation: popIn 0.2s ease; }
.color-opt.wrong { border-color: var(--red); animation: shake 0.3s; }
.color-info { display: flex; gap: 20px; margin-bottom: 12px; font-size: 14px; color: var(--text2); }

/* ── Merge (2048) ──────────────────────────────────────────────────────────── */
.merge-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 6px;
  background: rgba(255,255,255,0.03); border-radius: var(--radius); padding: 8px;
  width: 100%; max-width: 340px; touch-action: none;
  border: 1px solid var(--glass-border);
}
.merge-cell {
  aspect-ratio: 1; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px; transition: all 0.15s;
  background: rgba(255,255,255,0.04);
}
.merge-cell.pop { animation: popIn 0.2s ease; }
.merge-cell[data-val="2"] { background: #eee4da; color: #776e65; }
.merge-cell[data-val="4"] { background: #ede0c8; color: #776e65; }
.merge-cell[data-val="8"] { background: #f2b179; color: #fff; }
.merge-cell[data-val="16"] { background: #f59563; color: #fff; }
.merge-cell[data-val="32"] { background: #f67c5f; color: #fff; }
.merge-cell[data-val="64"] { background: #f65e3b; color: #fff; }
.merge-cell[data-val="128"] { background: #edcf72; color: #fff; font-size: 18px; }
.merge-cell[data-val="256"] { background: #edcc61; color: #fff; font-size: 18px; }
.merge-cell[data-val="512"] { background: #edc850; color: #fff; font-size: 18px; }
.merge-cell[data-val="1024"] { background: #edc53f; color: #fff; font-size: 15px; }
.merge-cell[data-val="2048"] { background: #edc22e; color: #fff; font-size: 15px; }
.merge-info { display: flex; gap: 20px; margin-bottom: 12px; font-size: 14px; color: var(--text2); }
.merge-swipe-hint { color: var(--text3); font-size: 12px; margin-top: 10px; }

/* ── Parking Game ──────────────────────────────────────────────────────────── */
.park-grid {
  display: grid; gap: 3px; background: rgba(255,255,255,0.02);
  border-radius: var(--radius); padding: 6px;
  max-width: 340px; width: 100%;
  border: 1px solid var(--glass-border);
}
.park-cell {
  aspect-ratio: 1; border-radius: 6px; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer;
}
.park-cell.road { background: #1a1a3e; }
.park-cell.wall { background: #333355; }
.park-cell.car { background: var(--accent); border: 2px solid var(--accent2); }
.park-cell.player { background: var(--green); border: 2px solid #00f5c8; }
.park-cell.exit { background: var(--gold-dim); border: 2px dashed var(--gold); }
.park-cell.selected { box-shadow: 0 0 14px var(--accent2); animation: pulse 0.8s infinite; }
.park-info { color: var(--text2); font-size: 13px; margin-bottom: 10px; }
.park-level-label { color: var(--gold); font-size: 14px; font-weight: 700; margin-bottom: 8px; }

/* ── Block Game ────────────────────────────────────────────────────────────── */
.block-controls { display: flex; gap: 10px; margin-top: 10px; }
.block-ctrl-btn {
  padding: 12px 20px; border: none; border-radius: var(--radius-sm);
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text); font-size: 20px; cursor: pointer; transition: all 0.1s;
}
.block-ctrl-btn:active { transform: scale(0.9); background: var(--card-hover); }

/* ── Snake Controls ────────────────────────────────────────────────────────── */
.snake-controls {
  display: grid; grid-template-areas: ". up ." "left . right" ". down .";
  gap: 6px; margin-top: 10px;
}
.snake-ctrl {
  padding: 14px 20px; border: none; border-radius: var(--radius-sm);
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text); font-size: 20px; cursor: pointer; transition: all 0.1s;
}
.snake-ctrl:active { transform: scale(0.88); }
.snake-ctrl[data-dir="up"] { grid-area: up; }
.snake-ctrl[data-dir="left"] { grid-area: left; }
.snake-ctrl[data-dir="right"] { grid-area: right; }
.snake-ctrl[data-dir="down"] { grid-area: down; }

/* ── Shooter ───────────────────────────────────────────────────────────────── */
.shooter-controls { display: flex; gap: 10px; margin-top: 10px; }
.shoot-btn {
  padding: 12px 28px; border: none; border-radius: var(--radius-sm);
  background: var(--red); color: #fff; font-weight: 700;
  font-size: 16px; cursor: pointer; transition: all 0.1s;
}
.shoot-btn:active { transform: scale(0.9); }
