/* ============================================================
   PLUTO-8 Website — style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* ── Variables ── */
:root {
  --bg:       #0d0d1a;
  --bg2:      #13132a;
  --bg3:      #1a1a35;
  --accent:   #7B2FBE;
  --accent2:  #00e5ff;
  --text:     #e8e8ff;
  --text-dim: #888aaa;
  --border:   #2a2a4a;
  --success:  #39ff8a;
  --error:    #ff4466;
  --card-bg:  #16163a;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── Typography ── */
h1, h2, h3, .pixel {
  font-family: 'Press Start 2P', monospace;
  line-height: 1.4;
}

a {
  color: var(--accent2);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: #fff; }

code, pre, .code-block {
  font-family: 'Courier New', Courier, monospace;
}

/* ── Container ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(13, 13, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

#site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--accent2);
  text-shadow: 0 0 12px var(--accent2);
  letter-spacing: 2px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo:hover { color: #fff; text-shadow: 0 0 20px var(--accent2); }

.logo span {
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent);
}

/* Main nav */
#main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

#main-nav a {
  color: var(--text-dim);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  position: relative;
  text-decoration: none;
}
#main-nav a::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 12px; right: 12px;
  height: 2px;
  background: var(--accent2);
  transform: scaleX(0);
  transition: transform 0.2s;
  border-radius: 2px;
}
#main-nav a:hover { color: var(--text); background: rgba(123,47,190,0.12); }
#main-nav a:hover::after { transform: scaleX(1); }
#main-nav a.active { color: var(--accent2); }
#main-nav a.active::after { transform: scaleX(1); }

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Lang toggle */
#lang-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent2);
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  letter-spacing: 1px;
}
#lang-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(123,47,190,0.6);
}

/* Hamburger */
#hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
#hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Main content offset ── */
main { padding-top: var(--header-h); }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(123,47,190,0.22) 0%, transparent 70%),
              radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0,229,255,0.08) 0%, transparent 60%),
              var(--bg);
}

/* Animated grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(42,42,74,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,42,74,0.3) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 800px; }

.hero-eyebrow {
  font-size: 11px;
  color: var(--accent2);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 24px;
  font-family: 'Press Start 2P', monospace;
}

.hero h1 {
  font-size: clamp(36px, 8vw, 72px);
  color: #fff;
  text-shadow:
    0 0 20px var(--accent),
    0 0 40px rgba(123,47,190,0.5),
    0 0 80px rgba(123,47,190,0.2);
  margin-bottom: 16px;
  letter-spacing: 4px;
}

.hero-subtitle {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(10px, 2vw, 16px);
  color: var(--accent2);
  margin-bottom: 24px;
  text-shadow: 0 0 10px var(--accent2);
}

.hero-desc {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Fake pixel screen */
.pixel-screen {
  margin: 60px auto 0;
  width: 256px;
  height: 256px;
  background: #000;
  border: 3px solid var(--accent);
  border-radius: 4px;
  box-shadow:
    0 0 0 6px var(--bg2),
    0 0 0 8px var(--border),
    0 0 40px rgba(123,47,190,0.4),
    inset 0 0 20px rgba(0,0,0,0.8);
  position: relative;
  overflow: hidden;
  image-rendering: pixelated;
}

.pixel-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.15) 3px,
    rgba(0,0,0,0.15) 4px
  );
  pointer-events: none;
  z-index: 2;
}

.screen-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  gap: 12px;
}

.screen-logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  color: var(--accent2);
  text-shadow: 0 0 8px var(--accent2);
  animation: blink-glow 3s ease-in-out infinite;
}

.screen-line {
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  color: var(--success);
}

.screen-cursor {
  width: 8px;
  height: 12px;
  background: var(--accent2);
  animation: blink 1s step-end infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes blink-glow {
  0%, 100% { text-shadow: 0 0 8px var(--accent2); }
  50% { text-shadow: 0 0 20px var(--accent2), 0 0 40px var(--accent2); }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  letter-spacing: 1px;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(123,47,190,0.5);
}
.btn-primary:hover {
  background: #9b3fd8;
  box-shadow: 0 6px 28px rgba(123,47,190,0.7);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--accent2);
  border: 1px solid var(--accent2);
  box-shadow: 0 0 0 rgba(0,229,255,0);
}
.btn-secondary:hover {
  background: rgba(0,229,255,0.08);
  box-shadow: 0 0 20px rgba(0,229,255,0.3);
  color: var(--accent2);
}

/* ── Sections ── */
section { padding: 80px 0; }
section:nth-child(even) { background: var(--bg2); }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header h2 {
  font-size: clamp(16px, 3vw, 26px);
  color: #fff;
  margin-bottom: 16px;
}
.section-header p {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto;
}

.section-tag {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--accent2);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ── Feature Cards ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(123,47,190,0.2);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 20px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(0,229,255,0.4));
}

.feature-card h3 {
  font-size: 11px;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.6;
}

.feature-card p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
}

/* ── Steps (How it works) ── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  counter-reset: step;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-num {
  counter-increment: step;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 0 20px rgba(123,47,190,0.5);
}

.step-body h3 {
  font-size: 11px;
  color: #fff;
  margin-bottom: 8px;
}
.step-body p {
  color: var(--text-dim);
  font-size: 14px;
}

/* ── Code blocks ── */
.code-block {
  background: #0a0a18;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  color: #c8c8f0;
  position: relative;
}

.code-block .code-label {
  position: absolute;
  top: 8px; right: 12px;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

/* Syntax colors */
.kw  { color: var(--accent); }        /* keywords */
.fn  { color: var(--accent2); }       /* functions */
.st  { color: #a8ff78; }              /* strings */
.cm  { color: #555577; font-style: italic; } /* comments */
.nm  { color: #ff9944; }              /* numbers */
.op  { color: var(--text-dim); }      /* operators */
.id  { color: var(--text); }          /* identifiers */

/* ── Docs layout ── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: calc(100vh - var(--header-h));
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 32px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-section {
  margin-bottom: 8px;
}

.sidebar-section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--text-dim);
  padding: 10px 20px 6px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.sidebar-link {
  display: block;
  padding: 8px 20px;
  color: var(--text-dim);
  font-size: 13px;
  transition: color 0.15s, background 0.15s, padding-left 0.15s;
  border-left: 2px solid transparent;
}
.sidebar-link:hover {
  color: var(--text);
  background: rgba(123,47,190,0.1);
  padding-left: 24px;
  border-left-color: var(--accent);
}
.sidebar-link.active {
  color: var(--accent2);
  border-left-color: var(--accent2);
  background: rgba(0,229,255,0.05);
}

.docs-content {
  padding: 48px 40px 80px;
  max-width: 820px;
}

.docs-content h1 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 16px;
}

.docs-content h2 {
  font-size: 14px;
  color: var(--accent2);
  margin: 56px 0 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.docs-content h3 {
  font-size: 11px;
  color: #fff;
  margin: 32px 0 12px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.docs-content p {
  color: var(--text-dim);
  margin-bottom: 16px;
  font-size: 15px;
}

.docs-content ul, .docs-content ol {
  color: var(--text-dim);
  padding-left: 24px;
  margin-bottom: 16px;
  font-size: 15px;
}
.docs-content li { margin-bottom: 6px; }

/* API function entry */
.api-entry {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}

.api-sig {
  background: rgba(0,0,0,0.3);
  padding: 14px 20px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--accent2);
  border-bottom: 1px solid var(--border);
}

.api-sig .api-name { color: #fff; font-weight: bold; }
.api-sig .api-param { color: var(--text-dim); }
.api-sig .api-opt { color: #ff9944; }

.api-body {
  padding: 16px 20px;
}

.api-body p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-dim);
}

.api-body .code-block {
  margin-top: 10px;
  font-size: 12px;
  padding: 14px 16px;
}

/* Memory map table */
.mem-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 16px 0;
}
.mem-table th {
  background: var(--bg3);
  color: var(--accent2);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--border);
  letter-spacing: 1px;
}
.mem-table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: top;
}
.mem-table td:first-child {
  font-family: 'Courier New', monospace;
  color: var(--accent2);
  white-space: nowrap;
}
.mem-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Manual ── */
.manual-toc {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 40px;
}
.manual-toc h3 {
  font-size: 10px;
  color: var(--accent2);
  margin-bottom: 14px;
}
.manual-toc ol {
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 14px;
}
.manual-toc li { margin-bottom: 6px; }
.manual-toc a { color: var(--text-dim); }
.manual-toc a:hover { color: var(--accent2); }

.manual-section {
  margin-bottom: 64px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.manual-section h2 {
  font-size: 15px;
  color: var(--accent2);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.manual-section h3 {
  font-size: 11px;
  color: #fff;
  margin: 28px 0 12px;
}

.manual-section p {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 14px;
}

.manual-section ul, .manual-section ol {
  padding-left: 22px;
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 14px;
}
.manual-section li { margin-bottom: 6px; }

.note-box {
  background: rgba(0,229,255,0.06);
  border-left: 3px solid var(--accent2);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--text-dim);
}
.note-box strong { color: var(--accent2); }

.tip-box {
  background: rgba(57,255,138,0.06);
  border-left: 3px solid var(--success);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--text-dim);
}
.tip-box strong { color: var(--success); }

/* ── Examples ── */
.examples-grid {
  display: grid;
  gap: 40px;
}

.example-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.example-header {
  padding: 20px 24px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.example-header h3 {
  font-size: 11px;
  color: #fff;
  margin: 0;
}

.example-tag {
  font-size: 10px;
  background: rgba(123,47,190,0.3);
  color: var(--accent2);
  border: 1px solid rgba(0,229,255,0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-family: 'Press Start 2P', monospace;
}

.example-desc {
  padding: 16px 24px;
  color: var(--text-dim);
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.example-code {
  margin: 0;
  border-radius: 0;
  border: none;
  border-top: none;
}

/* ── Games grid ── */
#games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.game-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(123,47,190,0.25);
}

.game-thumb {
  height: 140px;
  background: linear-gradient(135deg, var(--bg3) 0%, #1a0a2e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  border-bottom: 1px solid var(--border);
}

.game-info { padding: 16px; }

.game-info h3 {
  font-size: 11px;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-author {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.game-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-dim);
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--border) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.game-card-skeleton .game-thumb { background: var(--bg3); }
.game-card-skeleton .sk-title { height: 14px; width: 80%; margin-bottom: 8px; }
.game-card-skeleton .sk-author { height: 10px; width: 50%; margin-bottom: 12px; }
.game-card-skeleton .sk-stats { height: 10px; width: 60%; }

/* Sort controls */
.games-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  align-items: center;
}

.sort-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.sort-btn:hover { border-color: var(--accent); color: var(--text); }
.sort-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.load-more-wrap {
  text-align: center;
  margin-top: 8px;
}

#load-more {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent2);
  padding: 12px 32px;
  border-radius: 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 1px;
}
#load-more:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px rgba(123,47,190,0.5);
}

.empty, .error {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 24px;
  font-size: 15px;
  grid-column: 1 / -1;
}
.error { color: var(--error); }

/* ── Footer ── */
#site-footer {
  background: #080812;
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  margin-bottom: 32px;
  align-items: start;
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 14px;
  max-width: 300px;
}

.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-dim);
  font-size: 13px;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--accent2); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  color: var(--text-dim);
  font-size: 13px;
}

.footer-credits {
  font-size: 12px;
  color: var(--text-dim);
}
.footer-credits a { color: var(--accent2); }

/* ── Inline code ── */
code {
  background: rgba(123,47,190,0.15);
  border: 1px solid rgba(123,47,190,0.3);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.88em;
  color: var(--accent2);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ── Utilities ── */
.text-accent  { color: var(--accent); }
.text-accent2 { color: var(--accent2); }
.text-dim     { color: var(--text-dim); }
.text-center  { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  #main-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    gap: 0;
    z-index: 999;
  }
  #main-nav.open { display: flex; }
  #main-nav a { padding: 14px 24px; border-radius: 0; font-size: 14px; }
  #main-nav a::after { display: none; }

  #hamburger { display: flex; }

  .hero h1 { font-size: clamp(28px, 10vw, 48px); }
  .pixel-screen { width: 200px; height: 200px; }

  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar {
    position: relative;
    top: 0;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .docs-content { padding: 32px 20px 60px; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  section { padding: 56px 0; }
  .hero { padding: 60px 16px 40px; }
  .hero-desc { font-size: 15px; }
  .btn { font-size: 8px; padding: 12px 20px; }
  .hero-buttons { gap: 10px; }
  .pixel-screen { width: 160px; height: 160px; }
  .screen-logo { font-size: 13px; }
  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  #games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .docs-content h2 { font-size: 11px; }
}
