/* =============================================
   GAMEVAULT – style.css
   Premium Dark/Light SPA Styles
   ============================================= */

/* ---------- CSS VARIABLES ---------- */
:root {
  --bg: #0d0d14;
  --surface: #13131e;
  --surface2: #1a1a28;
  --surface3: #21213a;
  --border: rgba(255,255,255,0.07);
  --text: #f0f0fa;
  --text-muted: #8888aa;
  --accent: #7c6fff;
  --accent2: #ff6fa8;
  --accent3: #6fffd4;
  --warn: #ffd56f;
  --danger: #ff6f6f;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-sm: 0 4px 16px rgba(0,0,0,0.3);
  --glass: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.09);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --nav-h: 64px;
}

[data-theme="light"] {
  --bg: #f0f0f8;
  --surface: #ffffff;
  --surface2: #f4f4fd;
  --surface3: #e8e8f5;
  --border: rgba(0,0,0,0.07);
  --text: #1a1a2e;
  --text-muted: #6666aa;
  --glass: rgba(255,255,255,0.6);
  --glass-border: rgba(255,255,255,0.8);
  --shadow: 0 8px 40px rgba(100,100,200,0.12);
  --shadow-sm: 0 4px 16px rgba(100,100,200,0.08);
}

/* ---------- RESET ---------- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }
canvas { display: block; }

/* ---------- BACKGROUND MESH ---------- */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(124,111,255,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 80%, rgba(255,111,168,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 60% 30%, rgba(111,255,212,0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(124,111,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 80%, rgba(255,111,168,0.05) 0%, transparent 60%);
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: rgba(13,13,20,0.85);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background 0.4s;
}
[data-theme="light"] .nav { background: rgba(240,240,248,0.85); }

.nav-brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.nav-logo { font-size: 24px; }
.nav-title { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.5px; }
.nav-actions { display: flex; gap: 8px; }
.nav-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}
.nav-btn:hover { background: var(--surface3); color: var(--text); }
.nav-btn svg { pointer-events: none; }

/* ---------- SEARCH ---------- */
.search-container {
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.search-container.open { max-height: 80px; padding: 12px 24px; }
.search-input {
  width: 100%; height: 44px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--accent); }

/* ---------- SCREENS ---------- */
.screens { position: relative; padding-top: var(--nav-h); min-height: 100vh; }
.screen { display: none; padding: 24px; max-width: 1100px; margin: 0 auto; animation: fadeUp 0.35s ease; }
.screen.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- HERO ---------- */
.hero {
  padding: 32px 0 24px;
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; flex-wrap: wrap;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
}
.accent { color: var(--accent); }
.hero-sub { color: var(--text-muted); margin-top: 8px; font-size: 1rem; }
.hero-stat-row { display: flex; gap: 24px; flex-shrink: 0; }
.hero-stat {
  display: flex; flex-direction: column; align-items: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  backdrop-filter: blur(12px);
}
.hero-stat span:first-child {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 800; color: var(--accent);
}
.hero-stat small { color: var(--text-muted); font-size: 0.75rem; margin-top: 2px; }

/* ---------- FILTER BAR ---------- */
.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter-btn {
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.82rem; font-weight: 500;
  color: var(--text-muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.filter-btn:hover { color: var(--text); border-color: var(--accent); }
.filter-btn.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
  box-shadow: 0 0 20px rgba(124,111,255,0.35);
}

/* ---------- GAME GRID ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), border-color 0.25s, box-shadow 0.25s;
  position: relative; overflow: hidden;
}
.game-card::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--card-accent-color, var(--accent));
  opacity: 0;
  transition: opacity 0.25s;
  border-radius: inherit;
}
.game-card:hover { transform: translateY(-6px) scale(1.01); border-color: var(--card-accent-color, var(--accent)); box-shadow: 0 16px 48px rgba(0,0,0,0.3); }
.game-card:hover::after { opacity: 0.05; }

.card-icon {
  font-size: 2.4rem;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2);
  border-radius: 14px;
}
.card-tag {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px;
  color: var(--card-accent-color, var(--accent));
  font-weight: 600;
}
.card-title {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.1rem;
  line-height: 1.2;
}
.card-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.card-best { font-size: 0.75rem; color: var(--text-muted); }
.card-best strong { color: var(--card-accent-color, var(--accent)); }
.card-play-btn {
  padding: 8px 18px;
  border-radius: 50px;
  background: var(--card-accent-color, var(--accent));
  color: #fff;
  font-size: 0.82rem; font-weight: 600;
  transition: opacity 0.2s, transform 0.15s;
}
.card-play-btn:hover { opacity: 0.85; transform: scale(1.05); }

/* ---------- GAME SCREEN ---------- */
.game-header {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.back-btn {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem; font-weight: 500;
  padding: 8px 14px;
  background: var(--surface2);
  border-radius: 50px;
  border: 1px solid var(--border);
  transition: all 0.2s;
  white-space: nowrap;
}
.back-btn:hover { color: var(--text); border-color: var(--accent); }
.game-header-info { flex: 1; }
.game-header-info h2 {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.3rem;
}
.score-display { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.score-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.score-val { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--accent); }
.game-header-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }

.game-canvas-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  min-height: 400px;
  position: relative;
}

/* ---- Game Inner Containers ---- */
.game-inner {
  width: 100%; padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}

/* Snake */
#snakeCanvas {
  border-radius: 12px;
  background: #0a0a14;
  touch-action: none;
}

/* Tic Tac Toe */
.ttt-board {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
  width: min(320px, 90vw);
}
.ttt-cell {
  aspect-ratio: 1;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  user-select: none;
}
.ttt-cell:hover:not(.taken) { background: var(--surface3); border-color: var(--accent); }
.ttt-cell.X { color: var(--accent); }
.ttt-cell.O { color: var(--accent2); }
.ttt-cell.win-cell { background: var(--surface3); transform: scale(1.05); }
.ttt-status { font-weight: 600; font-size: 1rem; color: var(--text); }
.ttt-mode-select { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.mode-btn {
  padding: 8px 18px; border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted); font-size: 0.82rem; font-weight: 500;
  transition: all 0.2s;
}
.mode-btn.active, .mode-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Memory Card */
.memory-grid {
  display: grid;
  gap: 10px;
  width: min(520px, 95vw);
}
.mem-card {
  aspect-ratio: 1;
  cursor: pointer;
  perspective: 600px;
  position: relative;
}
.mem-card-inner {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(.34,1.3,.64,1);
  border-radius: 12px;
}
.mem-card.flipped .mem-card-inner { transform: rotateY(180deg); }
.mem-card.matched .mem-card-inner { transform: rotateY(180deg); }
.mem-card-front, .mem-card-back {
  position: absolute; inset: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.mem-card-front { background: var(--surface2); border: 2px solid var(--border); }
.mem-card-back { background: var(--surface3); border: 2px solid var(--accent); transform: rotateY(180deg); }
.mem-card.matched .mem-card-back { border-color: var(--accent3); background: rgba(111,255,212,0.08); }
.memory-stats { display: flex; gap: 20px; }
.mem-stat { text-align: center; }
.mem-stat .val { font-family: var(--font-display); font-weight: 700; color: var(--accent); font-size: 1.2rem; }
.mem-stat .lbl { font-size: 0.72rem; color: var(--text-muted); }
.mem-diff-select { display: flex; gap: 8px; }

/* Flappy Bird */
#flappyCanvas { border-radius: 12px; touch-action: none; }

/* Breakout */
#breakoutCanvas { border-radius: 12px; touch-action: none; }

/* 2048 */
.g2048-board {
  background: var(--surface2);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 8px;
  width: min(380px, 94vw);
  touch-action: none;
}
.g2048-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.9rem, 3.5vw, 1.4rem);
  transition: transform 0.1s;
  user-select: none;
}
.g2048-cell.new { animation: popIn 0.2s ease; }
@keyframes popIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* RPS */
.rps-arena { display: flex; flex-direction: column; align-items: center; gap: 24px; width: 100%; max-width: 400px; }
.rps-choices { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.rps-btn {
  width: 90px; height: 90px;
  border-radius: 50%;
  font-size: 2.4rem;
  background: var(--surface2);
  border: 2px solid var(--border);
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.rps-btn:hover { transform: scale(1.12); border-color: var(--accent); box-shadow: 0 0 24px rgba(124,111,255,0.3); }
.rps-result { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; min-height: 2em; text-align: center; }
.rps-scores { display: flex; gap: 24px; }
.rps-score { text-align: center; }
.rps-score .num { font-family: var(--font-display); font-size: 2rem; font-weight: 800; }
.rps-score .lbl { font-size: 0.72rem; color: var(--text-muted); }
.rps-choices-display { display: flex; gap: 32px; justify-content: center; align-items: center; font-size: 3rem; }

/* Whack-a-Mole */
.mole-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; width: min(360px, 90vw); }
.mole-hole {
  aspect-ratio: 1;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem;
  cursor: pointer;
  transition: background 0.1s, transform 0.1s;
  user-select: none;
  position: relative; overflow: hidden;
}
.mole-hole .mole { opacity: 0; transform: translateY(60px); transition: all 0.15s; }
.mole-hole.active .mole { opacity: 1; transform: translateY(0); }
.mole-hole:active { transform: scale(0.93); }
.wam-timer { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--accent); }

/* Typing */
.typing-area { width: 100%; max-width: 600px; }
.typing-words {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  font-size: 1.1rem;
  line-height: 2;
  letter-spacing: 0.5px;
  min-height: 80px;
  margin-bottom: 12px;
}
.typing-char.correct { color: var(--accent3); }
.typing-char.wrong { color: var(--danger); background: rgba(255,111,111,0.12); border-radius: 2px; }
.typing-char.cursor { border-left: 2px solid var(--accent); }
.typing-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.typing-input:focus { border-color: var(--accent); }
.typing-stats { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.typing-stat { text-align: center; }
.typing-stat .val { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--accent); }
.typing-stat .lbl { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.typing-timer { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--warn); }

/* Endless Runner */
#runnerCanvas { border-radius: 12px; touch-action: none; }

/* ---------- GAME OVER OVERLAY ---------- */
.overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  border-radius: inherit;
  z-index: 10;
}
.overlay h3 {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 800;
  color: var(--text);
}
.overlay p { color: var(--text-muted); font-size: 0.95rem; }
.overlay .final-score { font-family: var(--font-display); font-size: 3rem; font-weight: 800; color: var(--accent); }
.overlay-btn {
  padding: 12px 28px;
  border-radius: 50px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem; font-weight: 700;
  transition: opacity 0.2s, transform 0.15s;
}
.overlay-btn:hover { opacity: 0.85; transform: scale(1.05); }

/* ---------- SCREEN HEADER ---------- */
.screen-header {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.screen-header h2 {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 800;
}

/* ---------- SCOREBOARD ---------- */
.scoreboard-grid { display: grid; gap: 12px; }
.score-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  transition: border-color 0.2s;
}
.score-row:hover { border-color: var(--accent); }
.score-row-icon { font-size: 1.8rem; width: 44px; text-align: center; }
.score-row-info { flex: 1; }
.score-row-name { font-weight: 600; font-size: 0.95rem; }
.score-row-played { font-size: 0.75rem; color: var(--text-muted); }
.score-row-val { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--accent); }
.score-zero { color: var(--text-muted); }

/* ---------- SETTINGS ---------- */
.settings-list { display: flex; flex-direction: column; gap: 0; max-width: 540px; }
.setting-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.setting-item:last-child { border-bottom: none; }
.setting-name { font-weight: 600; font-size: 0.95rem; display: block; }
.setting-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; display: block; }
.toggle { position: relative; width: 52px; height: 28px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0;
  background: var(--surface3);
  border-radius: 50px;
  transition: background 0.3s;
  cursor: pointer;
}
.slider::before {
  content: '';
  position: absolute;
  left: 4px; top: 4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.toggle input:checked + .slider { background: var(--accent); }
.toggle input:checked + .slider::before { transform: translateX(24px); }
.danger-btn {
  padding: 8px 20px;
  background: var(--danger);
  color: #fff;
  border-radius: 50px;
  font-size: 0.82rem; font-weight: 600;
  transition: opacity 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.danger-btn:hover { opacity: 0.85; transform: scale(1.03); }

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 460px; width: 100%;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(.34,1.2,.64,1);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: var(--surface3); color: var(--text); }
.modal h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; margin-bottom: 16px; }
.modal-body { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; margin-bottom: 24px; }
.modal-body ul { padding-left: 18px; }
.modal-body li { margin-bottom: 6px; }
.play-now-btn {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  font-size: 0.95rem; font-weight: 700;
  transition: opacity 0.2s;
}
.play-now-btn:hover { opacity: 0.85; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 0.88rem; font-weight: 500;
  z-index: 999;
  white-space: nowrap;
  box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(.34,1.3,.64,1), opacity 0.35s;
  opacity: 0;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { border-color: var(--accent3); color: var(--accent3); }
.toast.warning { border-color: var(--warn); color: var(--warn); }

/* ---------- UTILITY BUTTONS ---------- */
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn-primary {
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 50px;
  font-size: 0.88rem; font-weight: 600;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-primary:hover { opacity: 0.85; transform: scale(1.03); }
.btn-secondary {
  padding: 10px 24px;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.88rem; font-weight: 600;
  transition: all 0.2s;
}
.btn-secondary:hover { color: var(--text); border-color: var(--accent); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .nav { padding: 0 16px; }
  .screen { padding: 16px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 20px 0 16px; }
  .hero-stat-row { align-self: stretch; justify-content: flex-start; }
  .game-header { gap: 10px; }
  .game-header-info h2 { font-size: 1rem; }
  .score-display { flex-wrap: wrap; gap: 6px; }
  .game-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .game-card { padding: 16px; gap: 10px; }
  .card-icon { font-size: 1.8rem; width: 44px; height: 44px; }
  .card-title { font-size: 0.9rem; }
  .card-desc { display: none; }
  .g2048-board { gap: 5px; padding: 7px; }
  .mole-grid { gap: 10px; width: min(300px, 90vw); }
  .rps-btn { width: 72px; height: 72px; font-size: 2rem; }
}
@media (max-width: 380px) {
  .game-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2rem; }
}

/* ---------- NO RESULTS ---------- */
.no-results {
  grid-column: 1/-1;
  text-align: center;
  padding: 48px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.no-results span { font-size: 2.5rem; display: block; margin-bottom: 10px; }
