@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&display=swap');

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #131316;
  --fg: #e4e2e6;
  --green: #b5c4ff;
  --cyan: #c1c5dd;
  --yellow: #e3badb;
  --red: #f43841;
  --magenta: #c6c6d0;
  --dim: #45464f;
  --quartz: #c1c5dd;
  --prompt-color: var(--green);
  --cursor-color: var(--green);
  --link-color: var(--cyan);
  --heading-color: var(--yellow);
  --font: 'Fira Code', monospace;
}


html,
body {
  height: 100%;
  background: transparent;
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
}

/* --- blurred & dimmed background image --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('background.jpg') center/cover no-repeat;
  filter: blur(8px) brightness(0.35);
  z-index: -1;
  transform: scale(1.05);
  /* prevent blur edge gaps */
}

/* --- scanline overlay --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.12) 0px,
      rgba(0, 0, 0, 0.12) 1px,
      transparent 1px,
      transparent 3px);
  pointer-events: none;
  z-index: 10;
}

/* --- terminal container --- */
#terminal {
  padding: 24px 32px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#terminal.loaded {
  opacity: 1;
}

/* --- loading overlay --- */
#loading {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.5s ease;
}

#loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-text {
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 1;
  }
}

#output {
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
}

/* --- input line --- */
#input-line {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

#prompt {
  color: var(--prompt-color);
  font-weight: 700;
  user-select: none;
}

#cmd {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: var(--font);
  font-size: inherit;
  line-height: inherit;
  caret-color: var(--cursor-color);
}

/* --- output styling --- */
.line {
  margin: 0;
}

.line-prompt {
  color: var(--prompt-color);
  font-weight: 700;
}

.line-cmd {
  color: var(--fg);
}

.line-error {
  color: var(--red);
}

.line-heading {
  color: var(--heading-color);
  font-weight: 700;
}

.line-accent {
  color: var(--cyan);
}

.line-dim {
  color: var(--dim);
}

.line-link {
  color: var(--link-color);
  text-decoration: none;
}

.line-link:hover {
  text-decoration: underline;
}

.line-magenta {
  color: var(--magenta);
}

/* --- ASCII art banner --- */
.ascii-art {
  color: var(--green);
  line-height: 1.2;
  font-size: 12px;
}

/* --- responsive --- */
@media (max-width: 600px) {

  html,
  body {
    font-size: 12px;
  }

  #terminal {
    padding: 12px 10px;
  }

  .ascii-art {
    font-size: 9px;
  }
}