/* =========================================================================
   GDS Ungodly Mod Suite — Installation Guide
   Theme: "pixel dev office" — Kairosoft sunrise palette on the mods' own
   dark GUI navy. Zero border-radius + hard offset shadows = pixel chunk.
   by StixsworldHD (StixsmasterHD4k)
   ========================================================================= */

:root {
  --ink:    #0c111f;   /* page background — office at night           */
  --panel:  #141b2e;   /* card navy                                    */
  --panel2: #1a2340;   /* raised navy (mod-window bodies)              */
  --line:   #29365a;
  --line2:  #3a4a7c;
  --text:   #e9edf7;
  --muted:  #9aa6c5;
  --dim:    #6a769a;

  --sun:    #ff9d2b;   /* GAME */
  --gold:   #ffd23f;   /* DEV  */
  --sky:    #4db4ff;   /* STO  */
  --leaf:   #56c437;   /* RY   */
  --red:    #ff5d5d;

  --shadow: 4px 4px 0 #05070d;
  --font-display: 'Silkscreen', 'Courier New', monospace;
  --font-body:    'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Consolas', monospace;
}

/* ---------------------------------------------------------------- reset */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(77,180,255,.030) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(77,180,255,.030) 31px 32px),
    var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--sky); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }

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

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: #201400; padding: 10px 16px;
  font-family: var(--font-display); font-size: .75rem; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ----------------------------------------------------------- typography */

h1, h2, h3 { line-height: 1.25; }

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4.2vw, 2.4rem);
  letter-spacing: .02em;
  margin: .2em 0 .35em;
  text-shadow: 3px 3px 0 #05070d;
}

h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  color: var(--gold);
  margin: 2.2em 0 .6em;
  padding-bottom: .35em;
  border-bottom: 2px solid var(--line);
}

h3 { font-size: 1.1rem; font-weight: 700; margin: 1.6em 0 .5em; }

p { margin: 0 0 1em; }

.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }

.eyebrow {
  font-family: var(--font-display);
  font-size: .72rem;
  letter-spacing: .14em;
  color: var(--sun);
  margin: 0 0 .4em;
}

code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: #0a0e1a;
  border: 1px solid var(--line);
  padding: .1em .4em;
  color: var(--gold);
  word-break: break-word;
}

kbd {
  font-family: var(--font-display);
  font-size: .72em;
  background: var(--panel2);
  border: 2px solid var(--line2);
  border-bottom-width: 4px;
  padding: .15em .55em;
  color: var(--gold);
  white-space: nowrap;
}

hr { border: 0; border-top: 2px solid var(--line); margin: 2.5rem 0; }

/* -------------------------------------------------------------- header */

.site-head {
  background: linear-gradient(180deg, #101830 0%, #0c111f 100%);
  border-bottom: 2px solid var(--line);
  padding: 14px 0 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 12px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }

.brand-mark {
  width: 34px; height: 34px; flex: 0 0 auto;
  background:
    linear-gradient(var(--sun),  var(--sun))  0 0    / 50% 50% no-repeat,
    linear-gradient(var(--gold), var(--gold)) 100% 0  / 50% 50% no-repeat,
    linear-gradient(var(--sky),  var(--sky))  0 100%  / 50% 50% no-repeat,
    linear-gradient(var(--leaf), var(--leaf)) 100% 100%/ 50% 50% no-repeat;
  border: 2px solid #05070d;
  box-shadow: var(--shadow);
  image-rendering: pixelated;
}

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .82rem;
  color: var(--text);
  letter-spacing: .04em;
}

.brand-tag { display: block; font-size: .72rem; color: var(--dim); }

.site-nav ul {
  display: flex; flex-wrap: wrap; gap: 6px;
  list-style: none; margin: 0; padding: 0;
}

.site-nav a {
  display: block;
  font-family: var(--font-display);
  font-size: .68rem;
  letter-spacing: .03em;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border: 2px solid transparent;
}

.site-nav a:hover { color: var(--text); border-color: var(--line); }

.site-nav a.active {
  color: #201400;
  background: var(--gold);
  border-color: #05070d;
  box-shadow: 3px 3px 0 #05070d;
}

.nav-short { display: none; }

@media (max-width: 860px) {
  .nav-full  { display: none; }
  .nav-short { display: inline; }
}

/* ------------------------------------------- signature: dev progress bar */

.devbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 0 0 12px;
}

.devseg {
  position: relative;
  border: 2px solid #05070d;
  background: var(--panel);
  padding: 6px 8px 10px;
  box-shadow: 3px 3px 0 #05070d;
  overflow: hidden;
}

.devseg-num {
  font-family: var(--font-display);
  font-size: .65rem;
  color: var(--dim);
  margin-right: 6px;
}

.devseg-label {
  font-family: var(--font-display);
  font-size: .65rem;
  letter-spacing: .05em;
  color: var(--muted);
  text-transform: uppercase;
}

.devseg-fill {
  position: absolute; left: 0; bottom: 0;
  height: 5px; width: 0;
  background: repeating-linear-gradient(90deg,
    var(--sun) 0 8px, var(--gold) 8px 16px, var(--leaf) 16px 24px);
}

.devseg.done { background: var(--panel2); }
.devseg.done .devseg-fill { width: 100%; }
.devseg.done .devseg-label, .devseg.done .devseg-num { color: var(--leaf); }

.devseg.now { background: var(--panel2); border-color: var(--gold); }
.devseg.now .devseg-label, .devseg.now .devseg-num { color: var(--gold); }
.devseg.now .devseg-fill { width: 62%; animation: devwork 1.2s steps(6) infinite alternate; }

@keyframes devwork {
  from { width: 38%; }
  to   { width: 86%; }
}

@media (max-width: 640px) {
  .devseg-label { display: block; }
}

/* ----------------------------------------------------------------- hero */

.hero { padding: 44px 0 8px; }

.hero-title-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }

.gds-spectrum {
  background: linear-gradient(90deg, var(--sun) 0%, var(--gold) 36%, var(--leaf) 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.hero-meta li {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 4px 10px;
}

/* --------------------------------------------------------------- panels */

.panel {
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin: 1.4rem 0;
}

.panel > :first-child { margin-top: 0; }
.panel > :last-child  { margin-bottom: 0; }

/* Mod-window panel — echoes the in-game F6/F7 windows, title bar + [X]. */

.modwin {
  border: 2px solid #05070d;
  box-shadow: var(--shadow);
  margin: 1.6rem 0;
  background: var(--panel2);
}

.modwin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  font-family: var(--font-display);
  font-size: .7rem;
  letter-spacing: .04em;
  color: #10131f;
  background: linear-gradient(180deg, var(--sky) 0%, #2e8fd8 100%);
  border-bottom: 2px solid #05070d;
}

.modwin-bar.bar-gold { background: linear-gradient(180deg, var(--gold) 0%, #d9a41f 100%); }
.modwin-bar.bar-leaf { background: linear-gradient(180deg, #79dd55 0%, #3f9e26 100%); }

.modwin-x {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  display: grid; place-items: center;
  font-size: .6rem;
  background: rgba(255,255,255,.35);
  border: 1px solid #10131f;
}

.modwin-body { padding: 18px 20px; }
.modwin-body > :first-child { margin-top: 0; }
.modwin-body > :last-child  { margin-bottom: 0; }

/* -------------------------------------------------------------- callouts */

.note, .warn, .ok {
  border: 2px solid var(--line);
  border-left-width: 8px;
  background: var(--panel);
  padding: 14px 18px;
  margin: 1.2rem 0;
}

.note { border-left-color: var(--sky); }
.warn { border-left-color: var(--red); }
.ok   { border-left-color: var(--leaf); }

.note > :last-child, .warn > :last-child, .ok > :last-child { margin-bottom: 0; }

.callout-label {
  display: block;
  font-family: var(--font-display);
  font-size: .68rem;
  letter-spacing: .1em;
  margin-bottom: .35em;
}

.note .callout-label { color: var(--sky); }
.warn .callout-label { color: var(--red); }
.ok   .callout-label { color: var(--leaf); }

/* ---------------------------------------------------------------- steps */

.steps { list-style: none; margin: 1.5rem 0; padding: 0; counter-reset: step; }

.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.8rem 66px;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #201400;
  background: linear-gradient(180deg, var(--gold) 0%, var(--sun) 100%);
  border: 2px solid #05070d;
  box-shadow: 3px 3px 0 #05070d;
}

.steps > li::after {
  content: "";
  position: absolute;
  left: 21px; top: 48px; bottom: 6px;
  width: 2px;
  background: var(--line);
}

.steps > li:last-child::after { display: none; }

.step-title { font-weight: 700; font-size: 1.12rem; margin: 0 0 .4em; }

/* -------------------------------------------------------- code & trees */

pre {
  background: #0a0e1a;
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .86rem;
  line-height: 1.55;
  margin: 1.2rem 0;
}

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

.tree { color: var(--muted); }
.tree .d   { color: var(--gold); font-weight: 600; }   /* directory        */
.tree .f   { color: var(--text); }                     /* file             */
.tree .add { color: var(--sun); }                      /* you place this   */
.tree .gen { color: var(--leaf); }                     /* game/loader made */
.tree .cm  { color: var(--dim); }                      /* comment          */

.tree-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-family: var(--font-mono); font-size: .78rem;
  color: var(--muted);
  margin: -0.4rem 0 1.2rem;
}

.tree-legend .add, .tree-legend .gen, .tree-legend .d { font-weight: 600; }
.tree-legend .add { color: var(--sun); }
.tree-legend .gen { color: var(--leaf); }
.tree-legend .d   { color: var(--gold); }

/* --------------------------------------------------------------- tables */

.filetable { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .95rem; }

.filetable th, .filetable td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

.filetable th {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: .66rem;
  letter-spacing: .08em;
  color: var(--sun);
  background: var(--panel2);
}

.filetable td code { white-space: nowrap; }
.filetable tr:nth-child(even) td { background: rgba(41,54,90,.25); }

@media (max-width: 720px) {
  .filetable { display: block; overflow-x: auto; }
  .filetable td code { white-space: normal; }
}

/* ----------------------------------------------------- figures & lightbox */

.shot { margin: 1.6rem 0; }

.shot a.lb { display: block; position: relative; text-decoration: none; }

.shot img {
  border: 2px solid var(--line2);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: border-color .15s;
}

.shot a.lb:hover img, .shot a.lb:focus-visible img { border-color: var(--gold); }

.shot-zoom {
  position: absolute;
  right: 8px; bottom: 8px;
  font-family: var(--font-display);
  font-size: .6rem;
  letter-spacing: .06em;
  color: #201400;
  background: var(--gold);
  border: 2px solid #05070d;
  padding: 3px 8px;
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
}

.shot a.lb:hover .shot-zoom, .shot a.lb:focus-visible .shot-zoom { opacity: 1; }

.shot figcaption {
  font-size: .88rem;
  color: var(--muted);
  padding: 8px 2px 0;
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.shot-grid .shot { margin: 0; }

/* Lightbox overlay (built by assets/js/lightbox.js) */

.lb-overlay {
  position: fixed; inset: 0;
  z-index: 200;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: rgba(4, 6, 12, .93);
}

.lb-overlay.open { display: flex; }

.lb-overlay img {
  max-width: 100%;
  max-height: 78vh;
  width: auto; height: auto;
  border: 2px solid var(--line2);
  box-shadow: var(--shadow);
  background: #000;
}

.lb-caption {
  margin-top: 14px;
  max-width: 900px;
  text-align: center;
  font-size: .92rem;
  color: var(--muted);
}

.lb-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.lb-count { font-family: var(--font-mono); font-size: .8rem; color: var(--dim); }

.lb-btn {
  font-family: var(--font-display);
  font-size: .66rem;
  letter-spacing: .05em;
  color: var(--text);
  background: var(--panel2);
  border: 2px solid var(--line2);
  box-shadow: 3px 3px 0 #05070d;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
}

.lb-btn:hover { border-color: var(--gold); color: var(--gold); }

.lb-close {
  position: absolute;
  top: 14px; right: 16px;
}

body.lb-noscroll { overflow: hidden; }

/* -------------------------------------------------------- download cards */

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin: 1.4rem 0;
}

.dlcard {
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
}

.dlcard h3 { margin: 0 0 .5em; font-size: 1.02rem; }
.dlcard p  { font-size: .92rem; color: var(--muted); }
.dlcard .dlfile { margin-top: auto; font-size: .8rem; word-break: break-all; }
.dlcard .dlfile code { white-space: normal; }

.btn {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: .7rem;
  letter-spacing: .05em;
  text-decoration: none;
  color: #201400;
  background: linear-gradient(180deg, var(--gold) 0%, var(--sun) 100%);
  border: 2px solid #05070d;
  box-shadow: 3px 3px 0 #05070d;
  padding: 10px 16px;
  margin-top: 10px;
}

.btn:hover  { color: #000; filter: brightness(1.08); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #05070d; }

.btn-size { opacity: .75; font-size: .85em; margin-left: .4em; }

.btn-missing {
  background: var(--panel2);
  color: var(--red);
  cursor: not-allowed;
}

/* ----------------------------------------------------------- misc chips */

.tagchip {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .58rem;
  letter-spacing: .1em;
  color: #10131f;
  background: var(--sky);
  border: 1px solid #05070d;
  padding: 2px 7px;
  margin-right: 6px;
  vertical-align: 1px;
}

.checklist { list-style: none; margin: 1rem 0; padding: 0; }

.checklist li {
  position: relative;
  padding: 4px 0 4px 34px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 16px; height: 16px;
  background: var(--panel2);
  border: 2px solid var(--leaf);
}

.checklist li::after {
  content: "";
  position: absolute;
  left: 5px; top: 12px;
  width: 8px; height: 6px;
  border-left: 3px solid var(--leaf);
  border-bottom: 3px solid var(--leaf);
  transform: rotate(-45deg);
}

/* ---------------------------------------------------------------- pager */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 3.5rem 0 3rem;
}

.pager a {
  flex: 0 1 46%;
  text-decoration: none;
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  padding: 14px 18px;
}

.pager a:hover { border-color: var(--gold); }

.pager-next { text-align: right; margin-left: auto; }

.pager-dir {
  display: block;
  font-family: var(--font-display);
  font-size: .62rem;
  letter-spacing: .08em;
  color: var(--sun);
  margin-bottom: 4px;
}

.pager-title { display: block; color: var(--text); font-weight: 600; font-size: .95rem; }

/* --------------------------------------------------------------- footer */

.site-foot {
  border-top: 2px solid var(--line);
  background: #0a0f1c;
  margin-top: 2rem;
  padding: 34px 0 44px;
  font-size: .9rem;
  color: var(--muted);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}

.foot-credit {
  font-family: var(--font-display);
  font-size: .72rem;
  color: var(--text);
  letter-spacing: .04em;
}

.foot-versions p { margin: 0 0 .6em; }

@media (max-width: 760px) {
  .foot-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------- utilities */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

@media (max-width: 820px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.small { font-size: .88rem; color: var(--muted); }

.pathchip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .85rem;
  background: #0a0e1a;
  border: 1px solid var(--line2);
  border-left: 4px solid var(--sun);
  color: var(--text);
  padding: 6px 12px;
  margin: .2rem 0;
  word-break: break-all;
}
