/* css/terminal.css */

:root {
  --green:   #39ff14;
  --amber:   #ffb000;
  --red:     #ff4444;
  --dim:     #1a3d00;
  --bg:      #0d0d0d;
  --font:    'VT323', monospace;
  --gutter:  1.5rem;
}

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

html, body {
  background: var(--bg);
  color: var(--green);
  font-family: var(--font);
  font-size: 20px;
  min-height: 100vh;
  overflow-x: hidden;
}

/* CRT scanline overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

#terminal {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--gutter);
  min-height: 100vh;
}

/* Typewriter cursor */
.cursor::after {
  content: '█';
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}
@keyframes pulse-critical {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* CSS tooltip */
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0; top: 1.5em;
  background: var(--bg);
  border: 1px solid var(--dim);
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  line-height: 1.5;
  min-width: 18rem;
  max-width: 28rem;
  white-space: normal;
  z-index: 100;
  color: var(--green);
  pointer-events: none;
}

/* Typography */
h1, h2, h3 { color: var(--green); letter-spacing: 0.05em; }
pre { white-space: pre-wrap; line-height: 1.6; }

/* Colour utilities */
.amber   { color: var(--amber); }
.red     { color: var(--red); }
.dim     { color: var(--dim); }
.muted   { opacity: 0.6; }

/* Alert types */
.alert-WARNING  { color: var(--amber); }
.alert-ALERT    { color: var(--red); }
.alert-CRITICAL { color: var(--red); font-weight: bold; animation: pulse-critical 1.5s ease-in-out infinite; }
.alert-NOTE     { color: var(--green); opacity: 0.8; }

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--dim);
  margin: 1rem 0;
}

/* Buttons */
button {
  background: transparent;
  border: 1px solid var(--green);
  color: var(--green);
  font-family: var(--font);
  font-size: 1rem;
  padding: 0.4rem 1rem;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.1s, color 0.1s;
}
button:hover:not(:disabled) {
  background: var(--green);
  color: var(--bg);
}
button:disabled {
  border-color: var(--dim);
  color: var(--dim);
  cursor: not-allowed;
}
button.locked {
  border-color: var(--red);
  color: var(--red);
  opacity: 0.6;
}

/* Text input */
input[type="text"] {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--green);
  color: var(--green);
  font-family: var(--font);
  font-size: 1.2rem;
  outline: none;
  width: 280px;
  padding: 0.2rem 0;
  margin: 0.5rem 0 1rem;
}
