@font-face {
  font-family: 'HelpMe';
  src: url('../fonts/HelpMe.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0a0f0a;
  color: #33ff66;
  font-family: 'HelpMe', 'Courier New', monospace;
}

#terminal {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 1.2em;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: clamp(9px, 1.55vw, 16px);
  line-height: 1.25;
  text-shadow: 0 0 6px rgba(51, 255, 102, 0.55);
  outline: none;
  cursor: text;
  scrollbar-width: thin;
  scrollbar-color: #33ff66 #0a0f0a;
}

#terminal::after {
  content: '█';
  animation: blink 1s steps(1) infinite;
}

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

body.glitch #terminal {
  animation: glitch-shake 0.35s steps(2) 1;
  color: #ff3355;
  text-shadow: 2px 0 #33ff66, -2px 0 #00ccff, 0 0 12px rgba(255, 51, 85, 0.8);
}

@keyframes glitch-shake {
  0% { transform: translate(0, 0) skewX(0deg); }
  20% { transform: translate(-6px, 3px) skewX(-4deg); }
  40% { transform: translate(5px, -4px) skewX(3deg); }
  60% { transform: translate(-4px, -2px) skewX(-2deg); }
  80% { transform: translate(6px, 2px) skewX(5deg); }
  100% { transform: translate(0, 0) skewX(0deg); }
}

body.fatal {
  background: #1a0505;
}

body.fatal #terminal {
  color: #ff2233;
  text-shadow: 0 0 10px rgba(255, 34, 51, 0.9);
  animation: fatal-flicker 0.8s steps(2) infinite;
}

@keyframes fatal-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

body.void,
body.void #terminal {
  background: #000;
  color: #000;
  text-shadow: none;
}

body.void #terminal::after {
  content: none;
  animation: none;
}
