:root {
  --black: rgb(17, 17, 17); /* #111111, hsl(0, 0%, 7%) */
  --amber: rgb(255, 174, 0); /* #ffb000, hsl(41, 100%, 50%) */
  --cyan: rgb(0, 255, 255); /* #00ffff, hsl(180, 100%, 50%) */
  --green: rgb(0, 255, 0); /* #00ff00, hsl(120, 100%, 50%) */
  --magenta: rgb(255, 0, 255); /* #ff00ff, hsl(300, 100%, 50%) */
  --green-muted: rgba(
    15,
    255,
    15,
    0.5
  ); /* #0fff0f, hsla(120, 100%, 53%, 0.5) */
  --amber-shadow: rgb(230, 230, 0); /* #e6e600, hsl(60, 100%, 45%) */
  --cyan-shadow: rgba(
    0,
    255,
    255,
    0.8
  ); /* #00ffff, hsla(180, 100%, 50%, 0.8) */
  --green-shadow: rgba(
    15,
    255,
    15,
    0.8
  ); /* #0fff0f, hsla(120, 100%, 53%, 0.8) */
  --magenta-shadow: rgba(
    255,
    0,
    255,
    0.8
  ); /* #0fff0f, hsla(300, 100%, 50%, 0.8) */
  --base-font-size: 1.5em;
}

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

@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);
  }
}

@keyframes prompt-fade {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
  100% {
    opacity: 1;
  }
}

body {
  background-color: var(--black);
  color: var(--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 var(--green-shadow);
  white-space: pre-wrap;
}

#terminal-output p,
#feedback-output p {
  margin: 0 0 0.5em 0;
}

#ascii-logo {
  font-family: "VT323", monospace;
  color: var(--amber);
  font-size: 1.2em;
  margin: 0 auto 20px auto;
  width: fit-content;
  white-space: pre;
  overflow-x: auto;
  text-shadow: 0 0 7px var(--amber-shadow);
  max-width: 100%;
}

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

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

#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;
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 1.5em;
  background-color: var(--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;
}

.prompt {
  font-weight: bold;
}

#email-form {
  display: block;
}

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

#email-input {
  background: none;
  border: none;
  color: var(--cyan);
  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: var(--cyan-shadow);
  -webkit-text-fill-color: var(--cyan);
  opacity: 1;
}

#email-input::placeholder {
  color: var(--green-muted);
}

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

.prompt-highlight {
  color: var(--magenta);
  text-shadow: 0 0 5px var(--magenta-shadow);
  animation: prompt-fade 1.5s ease-in-out infinite;
}

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