/* Amiga Workbench 1.x – Farbwelt */
:root {
  --wb-blue:   #0055AA;
  --wb-white:  #FFFFFF;
  --wb-orange: #FF5E00;
  --wb-black:  #000000;
  --wb-cyan:   #8CF3FF;
}

/* Topaz-Webfont. Datei nach static/fonts/ legen (siehe static/fonts/README.md).
   Fehlt sie, greift automatisch die Monospace-Ersatzschrift. */
@font-face {
  font-family: "Topaz";
  src: url("../fonts/Topaz-a500.woff2") format("woff2");
  font-display: swap;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--wb-blue);
  color: var(--wb-white);
  font-family: "Topaz", "Courier New", monospace;
  font-size: clamp(14px, 2.6vw, 18px);
  line-height: 1.4;
  padding: env(safe-area-inset-top, 0) 1rem env(safe-area-inset-bottom, 0);
}

/* CLI-Fenster mit Titelleiste und Tiefengadgets (rein dekorativ) */
.window {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: calc(70ch + 2rem);
  margin: 1rem auto 0;
  border: 2px solid var(--wb-white);
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.15rem 0.4rem;
  background: var(--wb-white);
  color: var(--wb-blue);
}
.title { flex: 1; }

.gadgets { display: flex; gap: 0.3rem; }
.window i {
  position: relative;
  display: block;
  width: 1.1em;
  height: 0.9em;
  border: 2px solid var(--wb-blue);
}
.window i::after {
  content: "";
  position: absolute;
  width: 55%;
  height: 55%;
  border: 2px solid var(--wb-blue);
}
.g-close::after { top: 25%; left: 25%; width: 50%; height: 50%; }
.g-back::after  { top: -2px; left: -2px; }
.g-front::after { right: -2px; bottom: -2px; background: var(--wb-blue); }
.g-size::after  { right: -2px; bottom: -2px; }

.sizebar {
  display: flex;
  justify-content: flex-end;
  padding: 0.15rem 0.4rem;
  background: var(--wb-white);
}

.screen {
  flex: 1 0 auto;
  width: 100%;
  padding: 1.5rem 1rem;
}

.ascii {
  margin: 0 0 1.5rem;
  color: var(--wb-orange);
  font-family: inherit;
  font-size: 0.8em;
  line-height: 1.1;
  white-space: pre;
  overflow-x: auto;
  position: relative;
}

/* Seltener Glitch (siehe js/glitch.js): Anaglyphen-Versatz ±3 px,
   dazu zwei verrutschte Streifen. Nur Schatten/Overlay, kein Text ändert sich. */
.ascii.glitch { text-shadow: -3px 0 var(--wb-cyan), 3px 0 var(--wb-orange); }
.ascii.glitch::before,
.ascii.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}
.ascii.glitch::before {
  color: var(--wb-cyan);
  clip-path: inset(var(--a-top) 0 var(--a-bottom) 0);
  transform: translateX(var(--a-x));
}
.ascii.glitch::after {
  color: var(--wb-orange);
  clip-path: inset(var(--b-top) 0 var(--b-bottom) 0);
  transform: translateX(var(--b-x));
}
.window.glitch { box-shadow: -3px 0 0 var(--wb-cyan), 3px 0 0 var(--wb-orange); }

.cli p { margin: 0.15rem 0; }

.prompt { color: var(--wb-orange); }

/* Blinkender Block-Cursor am Ende der Session */
.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  background: var(--wb-white);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

a { color: var(--wb-orange); }
a:focus-visible { outline: 2px solid var(--wb-white); outline-offset: 2px; }

.footer {
  position: sticky;
  bottom: 0;
  flex-shrink: 0;
  width: 100%;
  max-width: calc(70ch + 2rem);
  margin: 0 auto;
  padding: 0.4rem 0 calc(0.4rem + env(safe-area-inset-bottom, 0));
  background: var(--wb-blue);
  text-align: center;
  font-size: 0.85em;
}
.footer a { display: inline-block; padding: 0.5rem 0.8rem; }

/* Rechtstexte im Terminal (von cli.js eingefügt) */
.legal { margin-top: 0.15rem; }
.nfo-head { margin: 0.5rem 0; color: var(--wb-orange); font-family: inherit; line-height: 1.1; overflow-x: auto; }
.nfo-body p { margin: 0.5rem 0; }
.nfo-body ul, .doc ul { margin: 0.5rem 0; padding-left: 1.5rem; }
.nfo-body strong { color: var(--wb-orange); font-weight: normal; }
.cd { display: inline-block; padding: 0.4rem 0.2rem; }

.doc { max-width: 70ch; }
.doc h1 {
  margin: 0.5rem 0 1rem;
  color: var(--wb-orange);
  font-size: 1.2em;
  font-weight: normal;
}
.doc p { margin: 0.5rem 0; }

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  .ascii.glitch { text-shadow: none; }
  .ascii.glitch::before, .ascii.glitch::after { content: none; }
  .window.glitch { box-shadow: none; }
}
