/* General styling */
body {
  margin: 0;
  height: 100vh;
  background: url("background.png") center/cover no-repeat;
  font-family: "Courier New", monospace;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}

#terminal {
  width: 90%;
  height: 90%;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  padding: 2vh 2vw;
  box-sizing: border-box;
  overflow-y: auto;
  box-shadow: 0 0 20px rgba(0, 255, 100, 0.2);
  font-size: clamp(10px, 1.2vw, 14px); /* scales text based on viewport */
  scroll-behavior: smooth;
}

/* Text display */
#output {
  white-space: pre-wrap;
  color: #90ee90;
  word-break: break-word; /* ensures long lines wrap */
  font-size: inherit; /* inherits from #terminal */
  flex-grow: 1;
  overflow-y: auto;
  white-space: pre;
  font-size: clamp(8px, 1.2vw, 14px); /* Auto scales with screen size */
  line-height: 1.2;
  transform-origin: top left;
  word-break: break-word;
}

#input-line {
  display: flex;
  align-items: center;
}

#prompt {
  color: #90ee90;
  margin-right: 5px;
}

/* Editable input */
#user-input {
  outline: none;
  flex-grow: 1;
  color: white;
}

/* Blinking cursor */
#cursor {
  color: #90ee90;
  margin-left: 3px;
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Disable mouse */
body, #terminal, #user-input {
  cursor: none;
}


