:root {
  --terminal-green: #0f0;
  --background-black: #111;
  --base-font-size: 1.5em;
}

body {
  background-color: var(--background-black);
  color: var(--terminal-green);
  font-family: "VT323", monospace;
  font-size: var(--base-font-size);
  padding: 20px 20px 5px 20px;
  margin: 0 auto;
  max-width: 1000px;
  min-height: 100vh;
  overflow-x: hidden;
}

#initial-prompt,
#terminal-output,
#feedback-output {
  text-shadow: 0 0 5px rgba(15, 255, 15, 0.8);
  white-space: pre-wrap;
}

/* Explicitly control margin for dynamically added paragraphs */
#terminal-output p,
#feedback-output p {
  margin: 0 0 0.5em 0;
}

/* --- ASCII Art & Responsiveness (Yellow, Centered) --- */
#ascii-logo {
  font-family: "VT323", monospace;
  color: #e6e600;
  font-size: 1.2em;
  margin: 0 auto 20px auto;
  width: fit-content;
  white-space: pre;
  overflow-x: auto;
  text-shadow: 0 0 7px rgba(230, 230, 0, 1);
  max-width: 100%;
}

/* Mirror Element for Measurement */
#text-width-mirror {
  visibility: hidden;
  position: absolute;
  white-space: pre;
  font-family: "VT323", monospace;
  font-size: 1em;
  padding: 0;
  border: none;
  margin: 0;
  margin-left: 5px;
  top: -9999px;
}

@media (max-width: 600px) {
  body {
    font-size: 1.2em;
    padding: 10px;
  }

  #ascii-logo {
    font-size: 0.8em;
  }
}

/* --- Cursor Styles --- */
.cursor {
  display: inline-block;
  width: 10px;
  height: 1.5em;
  background-color: var(--terminal-green);
  margin-left: 0;
  vertical-align: top;
  animation: blink 1s step-end infinite;
  position: absolute;
  transform-origin: left;
}

.blink-stop {
  animation: none !important;
  background-color: transparent !important;
  visibility: hidden !important;
}

@keyframes blink {
  from,
  to {
    visibility: hidden;
  }
  50% {
    visibility: visible;
  }
}

.prompt {
  font-weight: bold;
}

/* --- Input Field Styling (Cyan Input) --- */
#email-form {
  display: block;
}

#input-line {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

#email-input {
  background: none;
  border: none;
  color: #0ff;
  font-family: "VT323", monospace;
  font-size: 1em;
  flex-grow: 1;
  padding: 0;
  margin-left: 5px;
  outline: none;
  caret-color: transparent !important;
  z-index: 2;
}

#email-input:disabled {
  color: rgba(0, 255, 255, 0.8);
  -webkit-text-fill-color: #0ff;
  opacity: 1;
}

#email-input::placeholder {
  color: rgba(15, 255, 15, 0.5);
}

#input-cursor {
  margin-left: 0;
  display: none;
  z-index: 1;
}

/* ** Prompt Fade Keyframes ** */
@keyframes prompt-fade {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
  100% {
    opacity: 1;
  }
}

/* ** Magenta Prompt Style ** */
.prompt-highlight {
  color: #f0f;
  text-shadow: 0 0 5px rgba(255, 0, 255, 0.8);
  animation: prompt-fade 1.5s ease-in-out infinite;
}

/* ** Flicker Animation ** */
#viewport {
  position: relative;
  filter: blur(0.2px) contrast(1.1);
  padding: 10px;
  animation: flicker 3s steps(1) infinite;
}

@keyframes flicker {
  0% {
    filter: blur(0.2px) contrast(1.1) brightness(1);
  }
  99% {
    filter: blur(0.2px) contrast(1.1) brightness(0.9);
  }
  100% {
    filter: blur(0.2px) contrast(1.1) brightness(1);
  }
}