:root {
  --bg: #000;
  --fg: #00ff9c;
  --accent: #00bfff;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: monospace;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

#terminal {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  white-space: pre-wrap;
}

#input-line {
  display: flex;
  padding: 0.5rem;
}

#prompt {
  color: var(--accent);
  margin-right: 0.5rem;
}

#input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: monospace;
}

.error { color: #ff4d4d; }
.command { color: #fff; }

.rainbow span:nth-child(6n+1){color:red}
.rainbow span:nth-child(6n+2){color:orange}
.rainbow span:nth-child(6n+3){color:yellow}
.rainbow span:nth-child(6n+4){color:lime}
.rainbow span:nth-child(6n+5){color:cyan}
.rainbow span:nth-child(6n+6){color:magenta}

/* THEMES */
.theme-amber {
  --fg: #ffbf00;
  --accent: #ff8000;
}

.theme-hacker {
  --fg: #00ff00;
  --accent: #00aa00;
}
#typed {
  white-space: pre;
}

#input {
  position: absolute;
  left: -9999px;
}

#cursor {
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}
#cursor {
  animation: blink 1s steps(1) infinite;
}
