:root {
  --bg: #000000;
  --fg: #00ff41;
  --dim: #0f8a2f;
  --accent: #00ff41;
  --ok: #00ff41;
  --warn: #d29922;
  --err: #f85149;
}

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

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: "Fira Code", ui-monospace, "JetBrains Mono", "Noto Mono",
               "Courier New", monospace;
  overflow: hidden;
  text-shadow: 0 0 5px rgba(0, 255, 65, 0.35);
}

#stage { position: absolute; inset: 0; }

/* dezente CRT-Scanlines über allem */
#stage::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 40;
  background: repeating-linear-gradient(0deg,
    rgba(0, 255, 65, 0.04) 0 1px, transparent 1px 3px);
}

.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.2rem;
}

#idle .logo { display: flex; align-items: center; gap: 0.6rem; }
#idle .logo-glyph {
  font-size: 3.4rem; color: var(--accent);
  animation: blink 1.4s steps(1) infinite;
}
#idle h1 {
  font-size: 2.6rem; font-weight: 400; letter-spacing: 0.08em;
  text-shadow: 0 0 12px rgba(0, 255, 65, 0.55);
}
#idle .tagline { color: var(--dim); font-size: 1.1rem; }
#idle .hint { color: var(--dim); font-size: 0.85rem; opacity: 0.6; letter-spacing: 0.2em; text-transform: uppercase; }

@keyframes blink { 50% { opacity: 0.25; } }

#titlebar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid rgba(0, 255, 65, 0.25);
  font-size: 0.85rem; color: var(--dim);
  z-index: 10;
}
#titlebar #titletext { color: var(--fg); font-weight: 600; }
#titlebar.hidden { display: none; }

#content { position: absolute; inset: 0; }
#content.with-title { top: 2.6rem; }   /* Platz für die Titelleiste */
#content.hidden { display: none; }
#content > iframe { width: 100%; height: 100%; border: 0; background: #000; }
#content > .textwrap {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 4vmin;
}
#content > .textwrap > pre {
  font-family: inherit;
  font-size: 3vmin;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
  color: var(--fg);
}

#status {
  position: fixed; right: 10px; bottom: 10px;
  z-index: 50; opacity: 0.55;
}
#status .dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
}
.dot.ok { background: var(--ok); box-shadow: 0 0 6px rgba(0, 255, 65, 0.6); }
.dot.warn { background: var(--warn); }
.dot.err { background: var(--err); }

/* --- Sci-Fi-Denk-Orb (unteres Drittel) --- */

#orb {
  position: fixed; left: 50%; bottom: 7vh;
  transform: translateX(-50%);
  display: none; flex-direction: column; align-items: center; gap: 1.6rem;
  z-index: 45; pointer-events: none;
}
#orb.active { display: flex; }

.orb-core { position: relative; width: 28vmin; height: 28vmin; }

.orb-sphere {
  position: absolute; top: 50%; left: 50%;
  width: 13vmin; height: 13vmin; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%,
    #eafff0 0%, #7dff9b 22%, #00ff41 45%, #053f14 75%, #000 100%);
  box-shadow: 0 0 3vmin rgba(0, 255, 65, 0.6), 0 0 10vmin rgba(0, 255, 65, 0.28),
              inset 0 0 2.5vmin rgba(0, 255, 65, 0.45);
  animation: orbPulse 2.4s ease-in-out infinite;
}

.orb-ring {
  position: absolute; top: 50%; left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.orb-ring.r1 {
  width: 20vmin; height: 20vmin;
  border: 2px solid rgba(0, 255, 65, 0.2);
  border-top-color: #00ff41;
  filter: drop-shadow(0 0 1.2vmin rgba(0, 255, 65, 0.5));
  animation: orbSpin 3.2s linear infinite;
}
.orb-ring.r2 {
  width: 26vmin; height: 26vmin;
  border: 1px solid rgba(0, 255, 65, 0.15);
  border-bottom-color: #7dff9b;
  filter: drop-shadow(0 0 1vmin rgba(0, 255, 65, 0.4));
  animation: orbSpin 5.1s linear infinite reverse;
}

.orb-label {
  font-size: 1.7vmin; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg); opacity: 0.85;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
}
.orb-label::after { content: " …"; animation: blink 1.2s steps(1) infinite; }

@keyframes orbPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.09); opacity: 0.92; }
}
@keyframes orbSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
