/* ══════════════════════════════════════════════
   ArcadeHub  |  style.css
   ══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

/* ── Variables ───────────────────────────────── */
:root {
  --primary:   #00d4ff;
  --pink:      #ff006e;
  --purple:    #8338ec;
  --bg:        #080c1f;
  --bg2:       #0f1428;
  --bg3:       #161c38;
  --bg4:       #1e2545;
  --text:      #f0f4ff;
  --text2:     #8892b0;
  --border:    rgba(255,255,255,0.07);
  --radius:    14px;
  --font:      'Inter', system-ui, sans-serif;
  --glow:      0 0 40px rgba(0,212,255,.15);
  --trans:     all .25s cubic-bezier(.4,0,.2,1);
}

/* Light mode */
body.light {
  --bg:    #f0f4ff;
  --bg2:   #e4eaff;
  --bg3:   #d8e0f8;
  --bg4:   #c8d3f0;
  --text:  #0d1436;
  --text2: #4a5580;
  --border: rgba(0,0,0,0.08);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); color: inherit; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }

/* ── Shared ──────────────────────────────────── */
.inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Particle canvas ─────────────────────────── */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
}

/* ══════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,12,31,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
body.light .navbar { background: rgba(240,244,255,.9); }

.nav-container {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-svg { flex-shrink: 0; }

.nav-menu { display: flex; gap: 8px; }

.nav-link {
  padding: 6px 14px; border-radius: 8px;
  font-size: .88rem; font-weight: 600; color: var(--text2);
  transition: var(--trans);
}
.nav-link:hover { color: var(--text); background: var(--bg3); }
.nav-link.active { color: var(--primary); background: rgba(0,212,255,.08); }

.nav-right { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: .95rem; transition: var(--trans);
}
.theme-toggle:hover { background: var(--bg4); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px;
}
.hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--text2); border-radius: 1px;
  transition: var(--trans);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════════════
   HERO
══════════════════════════════════════════════ */
.hero {
  position: relative; z-index: 1;
  min-height: 88vh;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 40px;
  padding: 80px 24px 60px;
  max-width: 1200px; margin: 0 auto;
  overflow: hidden;
}

.hero-bg-shapes {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.hbs {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: .12;
}
.hbs-1 { width: 500px; height: 500px; background: var(--primary); top: -150px; right: -100px; animation: drift 18s ease-in-out infinite; }
.hbs-2 { width: 350px; height: 350px; background: var(--pink);   bottom: 0;    left: -80px;  animation: drift 24s ease-in-out infinite reverse; }
.hbs-3 { width: 280px; height: 280px; background: var(--purple); bottom: 100px;right: 10%;   animation: drift 20s ease-in-out infinite 4s; }
@keyframes drift {
  0%,100% { transform: translate(0,0); }
  33%      { transform: translate(30px,-40px); }
  66%      { transform: translate(-20px,20px); }
}

.hero-content { position: relative; z-index: 2; animation: fadeUp .7s ease both; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  background: rgba(0,212,255,.08); border: 1px solid rgba(0,212,255,.2);
  font-size: .78rem; font-weight: 700; color: var(--primary);
  margin-bottom: 20px; letter-spacing: .04em;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900; line-height: 1.05;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.15rem; color: var(--text2);
  max-width: 400px; margin-bottom: 36px; line-height: 1.7;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }

.cta-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 50px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #080c1f; font-weight: 800; font-size: .95rem;
  box-shadow: 0 8px 30px rgba(0,212,255,.3);
  transition: var(--trans);
}
.cta-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(0,212,255,.4); }
.cta-primary .arrow { transition: transform .2s; }
.cta-primary:hover .arrow { transform: translateX(4px); }

.cta-secondary {
  display: inline-flex; align-items: center;
  padding: 14px 28px; border-radius: 50px;
  border: 1.5px solid var(--border); color: var(--text2);
  font-weight: 700; font-size: .95rem;
  transition: var(--trans);
}
.cta-secondary:hover { border-color: var(--primary); color: var(--primary); background: rgba(0,212,255,.05); }

.hero-stats {
  display: flex; align-items: center; gap: 24px;
}
.hs { display: flex; flex-direction: column; }
.hs-num {
  font-size: 1.8rem; font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hs-label { font-size: .72rem; color: var(--text2); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.hs-divider { width: 1px; height: 36px; background: var(--border); }

/* Hero visual */
.hero-visual {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  animation: fadeUp .7s ease .15s both;
}

.hero-card-stack {
  position: relative; width: 280px; height: 280px;
}

.hcs-card {
  position: absolute;
  width: 90px; height: 90px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem;
  background: var(--bg3); border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  backdrop-filter: blur(10px);
}
.hcs-1 { top: 0;   left: 20px;  animation: cardFloat 4s ease-in-out infinite; }
.hcs-2 { top: 20px; right: 0;   animation: cardFloat 4s ease-in-out .8s infinite; }
.hcs-3 { bottom: 20px; left: 0; animation: cardFloat 4s ease-in-out 1.6s infinite; }
@keyframes cardFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(3deg); }
}

.hcs-center {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.hcs-glyph {
  font-size: 4rem;
  filter: drop-shadow(0 0 24px rgba(0,212,255,.5));
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ══════════════════════════════════════════════
   RECENTLY PLAYED
══════════════════════════════════════════════ */
.recent-section {
  position: relative; z-index: 1;
  padding: 16px 0 32px;
  border-top: 1px solid var(--border);
  display: none;
}
.recent-section.visible { display: block; }

.recent-section .inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.recent-strip {
  display: flex; gap: 8px; flex-wrap: wrap;
}

.recent-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 20px;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: .82rem; font-weight: 600; color: var(--text2);
  transition: var(--trans);
  text-decoration: none;
}
.recent-chip:hover { border-color: var(--primary); color: var(--primary); }
.recent-chip .rc-emoji { font-size: 1rem; }
.recent-chip .rc-time { font-size: .68rem; color: var(--text2); opacity: .7; }

/* ══════════════════════════════════════════════
   GAMES SECTION
══════════════════════════════════════════════ */
.games-section {
  position: relative; z-index: 1;
  padding: 80px 0;
}

.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 40px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800;
}

.filter-bar { display: flex; gap: 6px; flex-wrap: wrap; }

.filter-btn {
  padding: 7px 16px; border-radius: 20px;
  font-size: .8rem; font-weight: 700;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); transition: var(--trans);
}
.filter-btn:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #080c1f; border-color: transparent;
}

/* ── Game Cards ──────────────────────────────── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.game-card {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: var(--trans);
  animation: fadeUp .5s ease both;
}
.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 20px 50px rgba(0,0,0,.4), var(--glow);
}
.game-card.hidden { display: none; }

/* Stagger */
.game-card:nth-child(1) { animation-delay: .05s; }
.game-card:nth-child(2) { animation-delay: .1s; }
.game-card:nth-child(3) { animation-delay: .15s; }
.game-card:nth-child(4) { animation-delay: .2s; }
.game-card:nth-child(5) { animation-delay: .25s; }
.game-card:nth-child(6) { animation-delay: .3s; }
.game-card:nth-child(7) { animation-delay: .35s; }
.game-card:nth-child(8) { animation-delay: .4s; }

/* Fav button */
.fav-btn {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; line-height: 1;
  background: rgba(0,0,0,.35); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.1);
  transition: var(--trans); color: var(--text2);
}
.fav-btn:hover { color: #ff006e; border-color: #ff006e; transform: scale(1.1); }
.fav-btn.faved { color: #ff006e; border-color: #ff006e; }

/* Card top */
.card-top {
  padding: 32px 24px 24px;
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-end; justify-content: space-between;
  position: relative; overflow: hidden;
  transition: var(--trans);
}
.card-top::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--c); opacity: .06;
  transition: transform .4s;
}
.game-card:hover .card-top::before { transform: scale(1.4); opacity: .1; }

.game-emoji {
  font-size: 3rem; line-height: 1;
  transition: transform .3s;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.3));
}
.game-card:hover .game-emoji { transform: scale(1.15) rotate(5deg); }

.cat-badge {
  font-size: .68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 4px 10px; border-radius: 20px;
  background: rgba(255,255,255,.08);
  color: var(--c); border: 1px solid rgba(255,255,255,.15);
}

/* Card body */
.card-body {
  padding: 20px 20px 16px; flex: 1; display: flex; flex-direction: column; gap: 10px;
}
.card-body h3 { font-size: 1.1rem; font-weight: 800; }
.card-body p  { font-size: .85rem; color: var(--text2); line-height: 1.5; flex: 1; }

.card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.meta-pill {
  font-size: .7rem; font-weight: 600; padding: 3px 9px; border-radius: 10px;
  background: var(--bg3); color: var(--text2);
  border: 1px solid var(--border);
}

.best-score {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
}
.bs-label { font-size: .72rem; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .05em; }
.bs-val   { font-size: .88rem; font-weight: 700; color: var(--primary); }

/* Play button */
.play-btn {
  margin: 0 16px 16px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.12);
  color: var(--c);
  font-weight: 800; font-size: .88rem; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: var(--trans);
}
.play-btn span { transition: transform .2s; }
.play-btn:hover {
  background: var(--c); color: #080c1f;
  transform: none;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.play-btn:hover span { transform: translateX(4px); }

/* ══════════════════════════════════════════════
   SCORES SECTION
══════════════════════════════════════════════ */
.scores-section {
  position: relative; z-index: 1;
  padding: 80px 0;
  background: linear-gradient(180deg, transparent, rgba(131,56,236,.04), transparent);
}

.clear-btn {
  padding: 8px 18px; border-radius: 8px;
  border: 1px solid rgba(239,68,68,.3); color: #ef4444;
  font-size: .8rem; font-weight: 700;
  transition: var(--trans);
}
.clear-btn:hover { background: rgba(239,68,68,.1); border-color: #ef4444; }

.scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 40px;
}

.score-card {
  display: flex; align-items: center; gap: 16px;
  padding: 20px; border-radius: var(--radius);
  background: var(--bg2); border: 1px solid var(--border);
  transition: var(--trans);
}
.score-card:hover { border-color: rgba(255,255,255,.14); transform: translateY(-3px); }
.sc-icon { font-size: 2rem; flex-shrink: 0; }
.sc-label { font-size: .75rem; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.sc-val {
  font-size: 1.8rem; font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* Leaderboard */
.leaderboard {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.lb-header {
  display: grid; grid-template-columns: 1fr auto;
  padding: 12px 20px;
  background: var(--bg3);
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--text2);
  border-bottom: 1px solid var(--border);
}
.lb-row {
  display: grid; grid-template-columns: 1fr auto;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  align-items: center; transition: var(--trans);
}
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: var(--bg3); }
.lb-game { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .9rem; }
.lb-game-emoji { font-size: 1.2rem; }
.lb-score { font-weight: 700; color: var(--primary); font-size: .9rem; }
.lb-score.empty { color: var(--text2); font-weight: 500; }

/* ══════════════════════════════════════════════
   ABOUT SECTION
══════════════════════════════════════════════ */
.about-section {
  position: relative; z-index: 1;
  padding: 80px 0;
}

.about-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start;
}
.about-text h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 16px; }
.about-text p  { color: var(--text2); line-height: 1.8; margin-bottom: 12px; }

.features-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.feat {
  padding: 20px; border-radius: var(--radius);
  background: var(--bg2); border: 1px solid var(--border);
  transition: var(--trans);
}
.feat:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.14); }
.feat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
}
.feat h4 { font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.feat p  { font-size: .8rem; color: var(--text2); }

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.footer {
  position: relative; z-index: 1;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 40px;
}

.footer-inner {
  display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 40px; align-items: start;
}
.footer-logo { font-size: 1.2rem; font-weight: 800; color: var(--primary); display: block; margin-bottom: 6px; }
.footer-brand p { font-size: .82rem; color: var(--text2); }

.footer-links { display: flex; flex-direction: column; gap: 6px; }
.fl-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text2); margin-bottom: 2px; }
.footer-links a { font-size: .85rem; color: var(--text2); transition: color .15s; }
.footer-links a:hover { color: var(--primary); }

.footer-copy { display: flex; align-items: flex-end; }
.footer-copy p { font-size: .78rem; color: var(--text2); }

/* ══════════════════════════════════════════════
   SCROLL TOP
══════════════════════════════════════════════ */
.scroll-top-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #080c1f; font-size: 1.1rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,212,255,.3);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: var(--trans);
}
.scroll-top-btn.show { opacity: 1; visibility: visible; pointer-events: all; }
.scroll-top-btn:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,212,255,.4); }

/* ══════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════ */
.toast-wrap {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column-reverse; gap: 8px;
  z-index: 9999; pointer-events: none;
}
.toast {
  background: var(--bg4); color: var(--text);
  padding: 10px 20px; border-radius: 8px;
  font-size: .85rem; font-weight: 600;
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
  border: 1px solid var(--border);
  animation: toastIn .25s ease;
  white-space: nowrap;
}
.toast.out { animation: toastOut .25s ease forwards; }
@keyframes toastIn  { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
@keyframes toastOut { to   { opacity:0; transform:translateY(8px); } }

/* ══════════════════════════════════════════════
   SHARED ANIMATIONS
══════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:none; }
}
@keyframes slideDown {
  from { transform:translateY(-100%); opacity:0; }
  to   { transform:none; opacity:1; }
}

/* ══════════════════════════════════════════════
   GAME PAGE SHARED STYLES
══════════════════════════════════════════════ */
.game-header {
  padding: 16px 24px;
  background: rgba(8,12,31,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 50;
}
.game-header h1 {
  font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.back-button {
  padding: 8px 16px; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--primary); font-weight: 700; font-size: .85rem;
  transition: var(--trans);
}
.back-button:hover { background: var(--bg4); border-color: var(--primary); }

.game-container { max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem; }

.game-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px; margin: 1.5rem 0;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.stat-box { text-align: center; }
.stat-box label { display: block; font-size: .75rem; color: var(--text2); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.stat-box .value { font-size: 1.8rem; font-weight: 800; color: var(--primary); }

.button-group { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 1.5rem 0; }

.btn {
  padding: 10px 24px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: var(--bg); font-weight: 800; font-size: .9rem;
  border: none; transition: var(--trans);
  box-shadow: 0 4px 14px rgba(0,212,255,.2);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,212,255,.35); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn.secondary {
  background: var(--bg3);
  color: var(--primary);
  border: 1px solid rgba(0,212,255,.25);
  box-shadow: none;
}
.btn.secondary:hover { background: var(--bg4); }

/* Memory */
#memory-board { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; max-width: 480px; margin: 2rem auto; }
.memory-card {
  aspect-ratio: 1;
  background: var(--bg3); border: 2px solid var(--border);
  border-radius: 12px; cursor: pointer; font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--trans); user-select: none;
}
.memory-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.memory-card.flipped { background: linear-gradient(135deg, var(--primary), var(--purple)); border-color: var(--primary); }
.memory-card.matched { background: linear-gradient(135deg, rgba(16,185,129,.3), rgba(16,185,129,.1)); border-color: #10b981; cursor: default; }

/* Tic Tac Toe */
.board { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; max-width: 360px; margin: 2rem auto; background: var(--bg2); padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); }
.cell { aspect-ratio: 1; background: var(--bg3); border: 2px solid var(--border); border-radius: 10px; font-size: 2.5rem; font-weight: 800; cursor: pointer; transition: var(--trans); display: flex; align-items: center; justify-content: center; }
.cell:hover:not(:disabled) { border-color: var(--primary); transform: scale(1.05); }
.cell:disabled { cursor: not-allowed; }
.cell.x { color: var(--primary); text-shadow: 0 0 10px rgba(0,212,255,.5); }
.cell.o { color: var(--pink);    text-shadow: 0 0 10px rgba(255,0,110,.5);  }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 60px 24px 40px; }
  .hero-visual { display: none; }
  .about-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-copy  { display: none; }
}

@media (max-width: 680px) {
  .nav-menu { display: none; flex-direction: column; gap: 4px; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg2); border-bottom: 1px solid var(--border); padding: 12px; z-index: 99; }
  .nav-menu.open { display: flex; animation: fadeUp .2s ease; }
  .hamburger { display: flex; }
  .hero-title { font-size: 2.8rem; }
  .games-grid { grid-template-columns: 1fr; }
  .filter-bar { gap: 4px; }
  .scores-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  #memory-board { grid-template-columns: repeat(2,1fr); gap: 8px; max-width: 300px; }
  .board { max-width: 300px; gap: 8px; padding: 10px; }
}

@media (max-width: 400px) {
  .hero-stats { gap: 14px; }
  .hs-num { font-size: 1.4rem; }
  .scores-grid { grid-template-columns: 1fr; }
}
