/* ============================================
   COGNITIVE GAMES LAB - MODERN WARM THEME
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* Core Palette */
  --bg-primary: #f7f3ed;
  --bg-secondary: #efe9e2;
  --bg-tertiary: #fffdf8;
  --bg-card: #ffffff;

  /* Surface Effects */
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(15, 23, 42, 0.12);
  --glass-hover: rgba(255, 255, 255, 0.95);

  /* Text Colors */
  --text-primary: #1a1d20;
  --text-secondary: #4a4f55;
  --text-muted: #687078;
  --text-dim: #8b9198;

  /* Accent System */
  --accent: #0f766e;
  --accent-strong: #0b5e57;
  --accent-2: #f97316;
  --accent-3: #0ea5e9;
  --accent-gradient: linear-gradient(135deg, #0f766e 0%, #14b8a6 55%, #0ea5e9 100%);
  --accent-gradient-warm: linear-gradient(135deg, #f97316 0%, #f59e0b 55%, #fbbf24 100%);
  --accent-gradient-cool: linear-gradient(135deg, #0ea5e9 0%, #14b8a6 50%, #22c55e 100%);

  /* Category Colors */
  --cat-memory: #0f766e;
  --cat-focus: #0ea5e9;
  --cat-speed: #f97316;
  --cat-language: #22c55e;
  --cat-problem: #f43f5e;

  /* Shadows */
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 16px 32px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 50px rgba(15, 23, 42, 0.16);

  /* Sizing */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Motion */
  --transition-fast: 150ms ease;
  --transition-base: 240ms ease;
  --transition-slow: 420ms ease;
}

/* ============================================
   BASE RESET & FOUNDATIONS
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", "Space Grotesk", system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, .eyebrow, .stat-value {
  font-family: "Space Grotesk", "DM Sans", system-ui, sans-serif;
}

/* ============================================
   AMBIENT BACKGROUND
   ============================================ */

.background-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(600px circle at 12% 8%, rgba(15, 118, 110, 0.18), transparent 55%),
    radial-gradient(520px circle at 92% 18%, rgba(249, 115, 22, 0.16), transparent 55%),
    radial-gradient(460px circle at 70% 82%, rgba(14, 165, 233, 0.18), transparent 55%);
  animation: drift 22s ease-in-out infinite alternate;
}

.background-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.45;
}

@keyframes drift {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-20px, 10px, 0); }
  100% { transform: translate3d(20px, -10px, 0); }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  position: relative;
  z-index: 1;
  padding: 90px 7vw 60px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 52px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-text {
  max-width: 640px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.eyebrow.small {
  font-size: 0.7rem;
  padding: 6px 14px;
}

.hero-text h1 {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.hero-text h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subhead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */

.primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #ffffff;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.25);
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(15, 118, 110, 0.3);
}

.primary:active {
  transform: translateY(0);
}

.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
}

.secondary:hover {
  background: var(--glass-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   HERO CARD
   ============================================ */

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: grid;
  gap: 22px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15, 118, 110, 0.08), transparent 45%);
  opacity: 0.7;
  pointer-events: none;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.pill {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: rgba(15, 118, 110, 0.12);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-card-body {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 72%, rgba(15, 118, 110, 0.15) 0);
  display: grid;
  place-items: center;
}

.ring span {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px var(--glass-border);
  font-weight: 700;
  color: var(--accent-strong);
}

.hero-card-copy h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-card-copy p {
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

/* ============================================
   STATS STRIP
   ============================================ */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 16px;
  padding: 28px 0 0;
  margin-top: 32px;
  border-top: 1px solid var(--glass-border);
}

.stat-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: grid;
  gap: 6px;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.stat-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features {
  position: relative;
  z-index: 1;
  padding: 60px 7vw;
  max-width: 1280px;
  margin: 0 auto;
}

.section-heading {
  max-width: 540px;
  margin-bottom: 32px;
  display: grid;
  gap: 12px;
}

.section-heading h2 {
  font-size: 2rem;
  letter-spacing: -0.01em;
}

.section-heading p {
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  background: rgba(15, 118, 110, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  padding: 0 7vw 80px;
  max-width: 1280px;
  margin: 0 auto;
}

/* ============================================
   PANEL (Game List)
   ============================================ */

.panel {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 22px;
  height: fit-content;
  max-height: 75vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 24px;
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-header h3::before {
  content: "🎮";
}

#search {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
}

#search::placeholder {
  color: var(--text-dim);
}

#search:focus {
  border-color: rgba(15, 118, 110, 0.5);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.game-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 6px;
}

.game-list::-webkit-scrollbar {
  width: 6px;
}

.game-list::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.15);
  border-radius: 3px;
}

.game-list::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.25);
}

/* ============================================
   GAME CARDS
   ============================================ */

.game-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition-base);
  animation: fadeUp 0.5s ease both;
}

.game-card:hover {
  background: var(--glass-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.game-card.active {
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
}

.game-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.game-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.5;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-secondary);
}

.tag[data-category="memory"] {
  background: rgba(15, 118, 110, 0.12);
  color: var(--cat-memory);
}

.tag[data-category="focus"] {
  background: rgba(14, 165, 233, 0.12);
  color: var(--cat-focus);
}

.tag[data-category="speed"] {
  background: rgba(249, 115, 22, 0.16);
  color: var(--cat-speed);
}

.tag[data-category="language"] {
  background: rgba(34, 197, 94, 0.15);
  color: var(--cat-language);
}

.tag[data-category="problem"] {
  background: rgba(244, 63, 94, 0.12);
  color: var(--cat-problem);
}

/* ============================================
   GAME STAGE AREA
   ============================================ */

.stage {
  min-height: 60vh;
}

.game-area {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  min-height: 60vh;
  box-shadow: var(--shadow-md);
}

.game-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 40vh;
  gap: 16px;
}

.game-intro h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.game-intro p {
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.7;
}

/* ============================================
   GAME SHELL (Active Game)
   ============================================ */

.game-shell {
  display: grid;
  gap: 24px;
}

.game-shell h2 {
  font-size: 1.6rem;
  font-weight: 700;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-meta .tag {
  background: rgba(15, 118, 110, 0.12);
  color: var(--cat-memory);
}

.game-description {
  color: var(--text-secondary);
  line-height: 1.7;
}

.game-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stat {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cat-focus);
}

.status {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(15, 118, 110, 0.2);
  color: var(--accent-strong);
  font-size: 0.95rem;
  font-weight: 500;
}

.game-stage {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 280px;
  display: grid;
  gap: 16px;
}

/* ============================================
   GRID SYSTEM (Games)
   ============================================ */

.grid {
  display: grid;
  gap: 10px;
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

.cell {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

button.cell {
  font-family: inherit;
  font-size: 0.95rem;
}

.cell:hover {
  background: var(--glass-hover);
  border-color: rgba(15, 23, 42, 0.18);
  transform: translateY(-2px);
}

.cell.active {
  background: var(--cat-memory);
  border-color: var(--cat-memory);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(15, 118, 110, 0.35);
}

.cell.gold {
  background: linear-gradient(135deg, #f97316, #fbbf24);
  border-color: #f59e0b;
  color: #3b2412;
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.35);
}

.option {
  text-transform: capitalize;
}

/* ============================================
   PLAYFIELD & GAME ELEMENTS
   ============================================ */

.playfield {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  min-height: 220px;
  overflow: hidden;
}

.shape-row {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
}

.shape-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.shape-button {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.shape-button:hover {
  background: var(--glass-hover);
  border-color: rgba(15, 23, 42, 0.18);
}

.shape-grid {
  display: grid;
  grid-template-columns: repeat(3, 24px);
  grid-template-rows: repeat(3, 24px);
  gap: 4px;
}

.shape-cell {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(15, 118, 110, 0.18);
}

.shape-cell.filled {
  background: var(--cat-memory);
  box-shadow: 0 0 10px rgba(15, 118, 110, 0.45);
}

/* ============================================
   PEG GAME ELEMENTS
   ============================================ */

.peg-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.peg {
  background: var(--bg-tertiary);
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-lg);
  min-height: 180px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.peg.active {
  border-color: var(--cat-memory);
  box-shadow: 0 0 18px rgba(15, 118, 110, 0.2);
}

.disc {
  height: 24px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.disc.red { background: linear-gradient(135deg, #fb7185, #f43f5e); }
.disc.blue { background: linear-gradient(135deg, #60a5fa, #0ea5e9); }
.disc.green { background: linear-gradient(135deg, #4ade80, #22c55e); }

/* ============================================
   CARD GAME ELEMENTS
   ============================================ */

.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.card-active {
  margin-top: 16px;
}

.card {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.card:hover {
  background: var(--glass-hover);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.card-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card-shapes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.shape {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: inline-block;
}

.shape.circle { border-radius: 50%; }
.shape.square { border-radius: 4px; }
.shape.triangle {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 20px solid currentColor;
  background: transparent;
}
.shape.diamond { transform: rotate(45deg); }

/* ============================================
   PROMPT & INPUT ELEMENTS
   ============================================ */

.prompt {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

input[type="text"],
input[type="number"],
textarea,
select {
  padding: 12px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  border-color: rgba(15, 118, 110, 0.5);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.progress {
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.08);
}

.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent-gradient);
  transition: width 0.15s ease;
  box-shadow: 0 0 10px rgba(15, 118, 110, 0.35);
}

/* ============================================
   CANVAS (Games)
   ============================================ */

canvas {
  width: 100%;
  height: 320px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: var(--bg-tertiary);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  position: relative;
  z-index: 1;
  padding: 40px 7vw 60px;
  text-align: center;
  border-top: 1px solid var(--glass-border);
}

.footer p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 70px 6vw 40px;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .panel {
    max-height: none;
    position: static;
  }

  .stats-strip {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 720px) {
  .stats-strip {
    grid-template-columns: 1fr;
  }

  .hero-card-body {
    grid-template-columns: 1fr;
  }

  .ring {
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 48px 6vw 32px;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .subhead {
    font-size: 1rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .primary, .secondary {
    width: 100%;
  }

  .layout {
    padding: 0 6vw 60px;
  }

  .game-area {
    padding: 20px;
  }

  .game-stage {
    padding: 16px;
  }

  .grid-4, .grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
