/* ==========================================================
   GOBLINSOFT — wspólny arkusz stylu (v0.2, placeholder)
   Każde narzędzie Goblinsoftu linkuje TEN plik zamiast
   kopiować kolory. Zmiana tutaj = zmiana wszędzie.

   Paleta: czerń, biel, toksyczna żółć-zieleń.
   Szarości tylko jako dithering (wzory z kropek),
   nigdy jako miękkie przejścia. Zero gradientów tonalnych.
   ========================================================== */

/* font VGA z IBM PC — „Px437/PxPlus IBM VGA 9x16”, VileR, int10h.org, CC BY-SA 4.0
   najostrzejszy w rozmiarach 16px i 32px (wielokrotności siatki 9×16) */
@font-face {
  font-family: "GS VGA";
  src: url("fonts/WebPlus_IBM_VGA_9x16.woff") format("woff");
  font-display: block;
}

:root {
  --gs-black: #000000;
  --gs-white: #ffffff;
  --gs-toxic: #c6ff1a;
  --gs-toxic-hi: #e8ff9e;  /* jaśniejsza toksyczna — tylko do podświetleń */

  /* jedyne dozwolone płaskie szarości — wyłącznie do tekstu i cienkich linii,
     dla powierzchni używaj klas .gs-d25/.gs-d50/.gs-d75 */
  --gs-gray:  #8a8a8a;
  --gs-dark:  #2e2e2e;

  --gs-font-term:  "GS VGA", "Courier New", monospace;                  /* UI, etykiety — font DOS-a, 16px/32px */
  --gs-font-body:  "Times New Roman", Times, serif;                     /* tekst ciągły — jak w 1996 */

  --gs-dot: 4px;  /* wielkość kafelka ditheringu (4px = kropka 2px, grubo i widocznie) */
}

/* ---------- baza ---------- */
.gs, .gs body { background: var(--gs-black); color: var(--gs-white); }
.gs body { margin: 0; font-family: var(--gs-font-body); font-size: 19px; line-height: 1.45; }
.gs ::selection { background: var(--gs-toxic); color: var(--gs-black); }

.gs a { color: var(--gs-toxic); text-decoration: underline; }
.gs a:visited { color: var(--gs-white); }
.gs a:hover { background: var(--gs-toxic); color: var(--gs-black); text-decoration: none; }
.gs :focus-visible { outline: 2px dotted var(--gs-toxic); outline-offset: 2px; }

/* kursor nad linkami: łapa z Windows 95 zakończona pazurem (claw.png, punkt na czubku pazura) */
.gs a, .gs button, .gs label, .gs .gs-btn, .gs [role="button"] {
  cursor: url("claw.png") 1 0, pointer;
  cursor: -webkit-image-set(url("claw.png") 1x, url("claw@2x.png") 2x) 1 0, pointer;
  cursor: image-set(url("claw.png") 1x, url("claw@2x.png") 2x) 1 0, pointer;
}

.gs-term  { font-family: var(--gs-font-term); }
.gs-toxic { color: var(--gs-toxic); }
.gs-gray  { color: var(--gs-gray); }

/* ---------- dithering (szarości) ----------
   kolor kropek: --gs-ink (domyślnie biel), tło przezroczyste */
.gs-d25, .gs-d50, .gs-d75 { --gs-ink: var(--gs-white); background-size: var(--gs-dot) var(--gs-dot); image-rendering: pixelated; }
.gs-d25 { background-image: conic-gradient(var(--gs-ink) 0 25%, transparent 0); }
.gs-d50 { background-image: repeating-conic-gradient(var(--gs-ink) 0 25%, transparent 0 50%); }
.gs-d75 { background-image: conic-gradient(transparent 0 25%, var(--gs-ink) 0); }
.gs-ink-toxic { --gs-ink: var(--gs-toxic); }
.gs-ink-black { --gs-ink: var(--gs-black); }

/* pozioma belka z ditheringu zamiast <hr> */
.gs-bar { border: 0; height: 8px; margin: 1.5rem 0; --gs-ink: var(--gs-toxic);
  background: repeating-conic-gradient(var(--gs-ink) 0 25%, transparent 0 50%) 0 0 / var(--gs-dot) var(--gs-dot); }

/* taśma „W BUDOWIE” — pixel art z ditheringiem (hazard.png, 192×24, generuje tools/hazard.py),
   wyświetlana w skali 2× bez wygładzania */
.gs-stripes { background: url("hazard.png") repeat-x 0 0 / 384px 48px; image-rendering: pixelated; }

/* ---------- komponenty ---------- */
.gs-frame { border: 2px solid var(--gs-white); padding: 0.9rem 1rem; position: relative; background: var(--gs-black); }
.gs-frame > .gs-frame-title {
  position: absolute; top: -0.8em; left: 0.8rem; padding: 0 0.4em; background: var(--gs-black);
  font-family: var(--gs-font-term); font-size: 16px; line-height: 1; color: var(--gs-toxic);
}

/* przycisk / link w nawiasach jak w pliku .NFO:  [ Gry ]
   działa na <a> i <button> */
.gs-btn {
  font-family: var(--gs-font-term); font-size: 16px; line-height: 16px; cursor: pointer;
  background: none; border: 0; padding: 0; margin: 0; border-radius: 0;
  color: var(--gs-toxic); text-decoration: none; white-space: pre; display: inline-block;
}
.gs-btn::before { content: "[ "; color: var(--gs-white); }
.gs-btn::after  { content: " ]"; color: var(--gs-white); }
.gs .gs-btn, .gs a.gs-btn:visited { text-decoration: none; color: var(--gs-toxic); }
.gs a.gs-btn:hover, .gs .gs-btn:hover, .gs .gs-btn:focus-visible { background: none; color: var(--gs-white); text-decoration: none; }
.gs-btn:hover::before { content: "[\25A0"; }   /* [■ jak zaznaczona opcja */
.gs-btn:active { color: var(--gs-black); background: var(--gs-toxic); }

.gs-input {
  font-family: var(--gs-font-term); font-size: 16px; border-radius: 0;
  background: var(--gs-black); color: var(--gs-toxic); border: 0; border-bottom: 2px solid var(--gs-gray); padding: 4px 2px;
}
.gs-input::placeholder { color: var(--gs-gray); }
.gs-input:focus { outline: none; border-color: var(--gs-toxic); }

.gs-ascii { font-family: var(--gs-font-term); white-space: pre; line-height: 1; margin: 0; color: var(--gs-toxic); }

/* plakietka 88×31 */
.gs-badge {
  display: inline-flex; flex-direction: column; justify-content: center; align-items: center;
  width: 88px; height: 31px; box-sizing: border-box; border: 1px solid var(--gs-white);
  font-family: var(--gs-font-term); font-size: 16px; line-height: 14px; text-align: center; text-transform: uppercase;
  color: var(--gs-white); background: var(--gs-black); text-decoration: none;
}
.gs-badge.is-toxic { background: var(--gs-toxic); color: var(--gs-black); border-color: var(--gs-toxic); }

/* migający kursor i <blink> */
.gs-cursor::after { content: "█"; animation: gs-blink 1s steps(1) infinite; color: var(--gs-toxic); }
.gs-blink { animation: gs-blink 1s steps(1) infinite; }
@keyframes gs-blink { 50% { visibility: hidden; } }

/* pasek stanu jak w Netscape */
.gs-status {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 0;
  font-family: var(--gs-font-term); font-size: 16px; line-height: 22px; background: var(--gs-black); border-top: 2px solid var(--gs-white);
}
.gs-status > * { padding: 0.1em 0.6em; border-right: 1px solid var(--gs-gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-status > :first-child { flex: 1; }

@media (prefers-reduced-motion: reduce) {
  .gs *, .gs *::before, .gs *::after { animation: none !important; }
}
