@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap');

body {
  background-color: #0d0d0d;
  color: #00ff99;
  font-family: 'JetBrains Mono', monospace;
  margin: 0;
  padding: 0;
}

.terminal {
  max-width: 900px;
  margin: 50px auto;
  padding: 1.5rem;
  background: linear-gradient(145deg, #000000e6, #0f0f0faa);
  border-radius: 10px;
  box-shadow:
    0 0 10px #00ff99aa,
    0 0 20px #00ff99aa,
    0 0 40px #00ff9966 inset;
  min-height: 500px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  color: #00ff99;
  position: relative;
  z-index: 1;
}

@media (max-width: 600px) {
  .terminal {
    max-width: 100vw;
    min-height: 80vh;
    margin: 0;
    padding: 0.5rem;
    font-size: 0.95em;
    border-radius: 0;
  }
  .boot-sequence {
    min-width: 0;
    padding: 1.2rem 0.5rem 1rem 0.5rem;
    font-size: 1em;
  }
  .input-line {
    font-size: 1em;
  }
}

#hidden-input {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1em;
  opacity: 0.01;
  z-index: 10000;
  pointer-events: auto;
  border: none;
  background: transparent;
}

.terminal::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,255,100,0.07) 0px,
    rgba(0,255,100,0.07) 2px,
    transparent 2px,
    transparent 6px
  );
  z-index: 2;
  mix-blend-mode: screen;
}

.terminal::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,255,100,0.12) 0%, transparent 80%);
  z-index: 3;
  filter: blur(2px);
}

body {
  background: linear-gradient(120deg, #0a1a0a 0%, #0d0d0d 100%);
  color: #00ff99;
  font-family: 'JetBrains Mono', monospace;
  text-shadow: 0 0 2px #00ff99, 0 0 8px #00ff9944;
}

.input-line {
  display: inline-block;
  min-width: 2ch;
  outline: none !important;
  border: none !important;
  background: transparent !important;
  color: #00ff99 !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 1.1em;
  caret-color: #00ff99;
  text-shadow: 0 0 2px #00ff99, 0 0 8px #00ff9944;
}

.input-line:not(.processed) {
  caret-color: transparent !important;
  pointer-events: none;
  user-select: none;
}

.fade-in-char {
  opacity: 0;
  animation: fadeInChar 0.25s forwards;
}

@keyframes fadeInChar {
  from { opacity: 0; transform: translateY(0.2em) scale(0.95); }
  to { opacity: 1; transform: none; }
}

.input-line:not(.processed)::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: #00ff99;
  margin-left: 5px;
  animation: pulse 1s infinite ease-in-out;
  vertical-align: text-bottom;
  box-shadow: 0 0 5px #00ff99, 0 0 10px #00ff99aa;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scaleY(1);
  }
  50% {
    opacity: 0.2;
    transform: scaleY(0.6);
  }
}

#startup {
  margin-bottom: 1rem;
  color: #00ffaa;
  font-style: italic;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.output {
  margin: 0.5rem 0 1rem;
  white-space: pre-wrap;
  line-height: 1.6;
  color: #aaffcc;
  animation: fadeIn 0.4s ease-out;
}

span {
  user-select: none;
}

.input-line {
  min-height: 1.1em;
}

#boot-overlay {
  position: fixed;
  inset: 0;
  background: #050d05;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: 'JetBrains Mono', monospace;
  color: #00ff99;
  text-shadow: 0 0 4px #00ff99, 0 0 16px #00ff9944;
  transition: opacity 0.7s cubic-bezier(.4,2,.6,1), visibility 0.7s;
}

.boot-sequence {
  background: rgba(0,0,0,0.85);
  border: 2px solid #00ff99;
  border-radius: 10px;
  padding: 2.5rem 3.5rem 2rem 3.5rem;
  box-shadow: 0 0 32px #00ff99cc, 0 0 80px #00ff9944 inset;
  font-size: 1.15rem;
  min-width: 350px;
  text-align: left;
  position: relative;
}

.boot-line {
  display: block;
  margin-bottom: 0.2em;
  letter-spacing: 0.01em;
  font-family: inherit;
}

.boot-progress {
  width: 100%;
  height: 8px;
  background: #003311;
  border-radius: 4px;
  margin-top: 1.5em;
  overflow: hidden;
  box-shadow: 0 0 8px #00ff99aa inset;
}

.boot-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00ff99 0%, #00ffaa 100%);
  box-shadow: 0 0 8px #00ff99cc;
  border-radius: 4px;
  transition: width 0.2s cubic-bezier(.4,2,.6,1);
}

.fade-in-char {
  opacity: 0;
  animation: fadeInChar 0.25s forwards;
}

@keyframes fadeInChar {
  from { opacity: 0; transform: translateY(0.2em) scale(0.95); }
  to { opacity: 1; transform: none; }
}
