body,
html {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  /* background color for the true full-screen terminal */
  background-color: #051505; /* Black with slight green tint */
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Courier New", Courier, monospace;
  overflow: hidden;
}

/* The true full-screen terminal */
#terminal {
  /* User wants ONLY the monitor, so we let it fill the screen but limit content width/height */
  width: 100vw;
  height: 100vh;
  background-color: transparent;
  color: #66ff66; /* Pale green phosphor */
  font-size: 16px; /* Adjust via media queries if needed later */
  line-height: 1.2;
  text-transform: uppercase; /* Classic 8-bit feel */
  padding: 20px;
  box-sizing: border-box;
  overflow-y: hidden; /* Hide scrollbars */
  text-shadow: 0 0 5px rgba(102, 255, 102, 0.8);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
}

#terminal:focus {
  outline: none;
}

/* CRT Scanline effect overlaid on entire screen */
#crt-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.4) 50%),
    linear-gradient(
      90deg,
      rgba(255, 0, 0, 0.03),
      rgba(0, 255, 0, 0.01),
      rgba(0, 0, 255, 0.03)
    );
  background-size:
    100% 4px,
    6px 100%;
  z-index: 100;
  pointer-events: none;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.9); /* Vignette / shadows inside tube */
}

#output {
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-bottom: auto; /* Push new lines up as they run out of space */
  max-width: 80ch; /* Optional constraint to keep lines readable */
}

.output-line {
  margin: 0;
}

.welcome-text {
  color: #66ff66;
  font-weight: bold;
}

.system-text {
  color: #66ff66;
}

.error-text {
  color: #66ff66; /* Error text is still green on a monochrome monitor */
}

#input-line {
  display: none; /* Shown after boot sequence */
  align-items: center;
  position: relative;
  margin-top: auto; /* Push down to current line */
}

#prompt {
  margin-right: 8px;
  color: #66ff66;
}

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

#cmd-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  left: -1000px;
}

#cursor {
  display: inline-block;
  color: #66ff66;
  animation: blink 1s step-end infinite;
  margin-left: 0px;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
