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

:root {
  --bg:        #20254E;
  --bg-card:   #272c5a;
  --bg-deep:   #161a38;
  --accent:    #7b8cde;
  --text:      #e0e4ff;
  --muted:     #8890bb;
  --link:      #a0b0ff;
  --default:   #f0c040;
  --border:    #4a5080;
  --green:     #5ecf8a;
  --amber:     #f0c040;
  --red:       #e07070;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--link); }
a:hover { color: var(--accent); }

/* ── Header ─────────────────────────────────────────── */
header {
  background: var(--bg-deep);
  border-bottom: 2px solid var(--border);
  padding: 28px 40px 24px;
  text-align: center;
}
header h1 {
  font-size: 2rem;
  font-weight: 200;
  letter-spacing: 4px;
  color: #fff;
}
header .sub {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 2px;
  margin-top: 6px;
}

/* ── Sticky nav ─────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
  padding: 10px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  align-items: center;
  justify-content: center;
}
nav span { color: var(--muted); font-size: 0.8rem; margin-right: 4px; }
nav a {
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--link);
  white-space: nowrap;
  transition: background 0.15s;
}
nav a:hover { background: var(--bg-card); color: var(--accent); }

/* ── Main layout ────────────────────────────────────── */
main { max-width: 1200px; margin: 0 auto; padding: 40px 40px 80px; }

section {
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
section:last-child { border-bottom: none; }

/* Two-column grid: instructions | screenshot */
.cols {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
  margin-top: 20px;
}
.cols.wide { grid-template-columns: 1fr 380px; }

/* Stack screenshots under text on narrow screens */
@media (max-width: 860px) {
  .cols, .cols.wide { grid-template-columns: 1fr; }
  nav { padding: 8px 16px; }
  main { padding: 24px 16px 60px; }
  header { padding: 20px 16px; }
  header h1 { font-size: 1.4rem; letter-spacing: 2px; }
}

/* ── Headings ───────────────────────────────────────── */
h2 {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 4px;
  padding-top: 8px;
}
h2 .num {
  display: inline-block;
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 50%;
  width: 26px; height: 26px;
  line-height: 26px;
  text-align: center;
  margin-right: 10px;
  vertical-align: middle;
}
h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #c0caff;
  margin: 20px 0 8px;
}
/* When a cols row starts with a heading, align it with the screenshot top */
.cols .content > h3:first-child,
.cols .content > h4:first-child {
  margin-top: 0;
}
h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 16px 0 6px;
}

/* ── Screenshot placeholder ─────────────────────────── */
.screenshots { display: flex; flex-direction: column; gap: 16px; }
.screenshot {
  background: var(--bg-deep);
  border: 2px dashed var(--border);
  border-radius: 10px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
}
.screenshot .icon { font-size: 2rem; opacity: 0.25; }
.screenshot .label {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: monospace;
}
/* Real screenshot images — constrained thumbnail, click to zoom */
img.screenshot {
  max-width: 100%;
  max-height: 280px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  cursor: zoom-in;
  display: block;
  border: 1px solid var(--border);
  min-height: unset;
  padding: 0;
  background: none;
}

/* Lightbox overlay */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 10px;
  box-shadow: 0 8px 60px rgba(0,0,0,0.8);
  object-fit: contain;
}

/* ── Column separator ───────────────────────────────── */
.col-sep {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 20px 0;
  opacity: 0.6;
}

/* ── Prose ──────────────────────────────────────────── */
p { margin-bottom: 10px; }
ul, ol { margin: 8px 0 12px 20px; }
li { margin-bottom: 4px; }

code.default {
  background: rgba(240,192,64,0.15);
  color: var(--default);
  border: 1px solid rgba(240,192,64,0.3);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.82em;
  font-family: monospace;
  white-space: nowrap;
}
code {
  background: rgba(123,140,222,0.15);
  color: #c0caff;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.85em;
}

/* ── Cards / info boxes ─────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 12px 0;
}
.note {
  background: rgba(123,140,222,0.1);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 0.9rem;
  color: #c0caff;
}
.tip {
  background: rgba(94,207,138,0.08);
  border-left: 3px solid var(--green);
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 0.9rem;
  color: #c0d8c8;
}

/* ── Tables ─────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 12px 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
th {
  background: var(--bg-deep);
  color: var(--accent);
  font-weight: 600;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--border);
}
td {
  padding: 7px 12px;
  border-bottom: 1px solid rgba(74,80,128,0.5);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Game cards ─────────────────────────────────────── */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.game-card .game-title {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.game-card .game-stat {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 3px;
}
.game-card .game-stat span { color: var(--text); }

/* ── Footer ─────────────────────────────────────────── */
footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 20px;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 1px;
}
