body,
html {
  background-color: var(--theme-page-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-family-mono);
  overflow: hidden;
}

#terminal {
  width: var(--size-full-vw);
  height: var(--size-full-vh);
  background-color: transparent;
  color: var(--theme-terminal-fg);
  font-size: var(--size-terminal-font);
  line-height: var(--size-terminal-line-height);
  text-transform: uppercase;
  padding: var(--space-4);
  overflow: auto;
  text-shadow: var(--theme-terminal-shadow);
  display: block;
  position: relative;
  z-index: 10;
}

#terminal:focus {
  outline: none;
}

#crt-overlay {
  position: absolute;
  top: var(--space-0);
  left: var(--space-0);
  width: var(--size-full-vw);
  height: var(--size-full-vh);
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, var(--theme-scanline-dark) 50%),
    linear-gradient(
      90deg,
      var(--theme-scanline-red),
      var(--theme-scanline-green),
      var(--theme-scanline-blue)
    );
  background-size:
    100% var(--scanline-grid-rhythm),
    var(--scanline-subpixel-rhythm) 100%;
  z-index: 100;
  pointer-events: none;
  box-shadow: var(--theme-vignette-shadow);
}

#output {
  white-space: pre;
  width: max-content;
  min-width: 100%;
  overflow: visible;
}

.output-line {
  margin: var(--space-0);
}

.welcome-text,
.system-text,
.error-text,
#prompt,
#cursor {
  color: var(--theme-terminal-fg);
}

.welcome-text {
  font-weight: bold;
}

#input-line {
  display: none;
  align-items: center;
  position: relative;
  width: max-content;
  min-width: 100%;
  margin-top: var(--space-0);
  margin-bottom: var(--space-2);
}

#prompt {
  margin-right: var(--space-0);
}

#typed-text {
  white-space: pre;
}

#cmd-input {
  position: absolute;
  opacity: var(--opacity-hidden);
  pointer-events: none;
  left: -1000px;
}

#cursor {
  display: inline-block;
  animation: blink var(--anim-blink);
  margin-left: var(--space-0);
}

@keyframes blink {
  0%,
  100% {
    opacity: var(--opacity-visible);
  }
  50% {
    opacity: var(--opacity-hidden);
  }
}
