:root { color-scheme: dark; }

html, body {
  height: 100%;
  margin: 0;
  background: radial-gradient(ellipse at center, #0b0f14 0%, #050608 55%, #000 100%);
  overflow: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* Zentrierung */
.stage {
  height: 100%;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
}

/* CRT Gesamtcontainer */
.crt {
  position: relative;
  transform: translateZ(0);
  filter: saturate(1.05) contrast(1.08);
  animation: crt-flicker 6s infinite;
}

/* Rahmen/Bezel */
.bezel {
  position: relative;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, #1b2433 0%, #0e141d 100%);
  box-shadow:
    0 18px 55px rgba(0,0,0,.55),
    inset 0 2px 0 rgba(255,255,255,.06),
    inset 0 -6px 18px rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.08);
}

/* Screen passt sich dem Terminal an und zentriert es */
.screen {
  position: relative;
  border-radius: 16px;
  background: #000;
  overflow: hidden;

  /* WICHTIG: kein festes width/height */
  display: grid;
  place-items: center;
  padding: 14px;

  /* leichte “Wölbung” */
  transform: perspective(1100px) rotateX(0.8deg);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06),
    inset 0 0 40px rgba(0, 255, 140, .06);
}

/* Terminal NICHT auf 100% zwingen, sonst klebt es oben links */
#terminal {
  display: inline-block;
}

/* xterm Hintergrund durchsichtig -> Screen bestimmt die Farbe */
.xterm, .xterm-viewport, .xterm-screen {
  background: transparent !important;
}

/* CRT-Layer: Scanlines + Glow + Vignette */
.screen::before,
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.screen::before {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0,0,0,0.00) 0px,
      rgba(0,0,0,0.00) 2px,
      rgba(0,0,0,0.10) 3px
    ),
    linear-gradient(
      to right,
      rgba(255,0,0,0.015),
      rgba(0,255,0,0.015),
      rgba(0,0,255,0.015)
    );
  mix-blend-mode: overlay;
  opacity: .75;
}

.screen::after {
  background:
    radial-gradient(ellipse at center,
      rgba(0,0,0,0.00) 0%,
      rgba(0,0,0,0.18) 55%,
      rgba(0,0,0,0.55) 100%),
    radial-gradient(ellipse at center,
      rgba(0,255,140,0.08) 0%,
      rgba(0,255,140,0.00) 65%);
  opacity: 1;
}

/* Glas-Reflex */
.bezel::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  pointer-events: none;
  background: linear-gradient(135deg,
    rgba(255,255,255,.10) 0%,
    rgba(255,255,255,0) 35%,
    rgba(255,255,255,0) 100%);
  opacity: .16;
}

/* Flicker */
@keyframes crt-flicker {
  0%, 100% { opacity: 1; }
  51% { opacity: .995; }
  52% { opacity: .985; }
  53% { opacity: .998; }
  79% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .crt { animation: none; }
}
/* Logo */
.logo-wrap {
  display: grid;
  place-items: center;
  margin-bottom: 14px; /* Abstand zum Screen */
}

/* Logo */
.logo-wrap {
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.logo {
  display: block;
  height: auto;
  max-width: 100%;
  width: auto;              /* wichtig */
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.55))
          drop-shadow(0 0 18px rgba(0,255,140,.08));
  opacity: 0.95;
}