*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #030a06;
  --green: #00ff41;
  --green-dim: #00aa2a;
  --red: #ff2a2a;
  --amber: #ffb000;
  --cyan: #00f0ff;
  --font-mono: "Share Tech Mono", "VT323", "Courier New", monospace;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--green);
  font-family: var(--font-mono);
  overflow-x: hidden;
}

#matrix {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: flicker 8s infinite;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.85) 100%);
}

@keyframes flicker {
  0%,
  100% {
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  93% {
    opacity: 0.85;
  }
  94% {
    opacity: 1;
  }
  96% {
    opacity: 0.9;
  }
}

.warning-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--red);
  color: #000;
  font-size: 0.75rem;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.08em;
  box-shadow: 0 0 24px rgba(255, 42, 42, 0.6);
}

.blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.terminal {
  position: relative;
  z-index: 5;
  max-width: 720px;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 3rem;
}

.glitch-wrap {
  margin-bottom: 2rem;
  text-align: center;
}

.glitch {
  position: relative;
  margin: 0;
  font-size: clamp(1.5rem, 6vw, 2.75rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green);
  text-shadow: 0 0 8px var(--green), 0 0 24px rgba(0, 255, 65, 0.4);
  animation: shake 0.3s infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
}

.glitch::before {
  color: var(--cyan);
  animation: glitch-top 2s infinite linear alternate-reverse;
  clip-path: inset(0 0 65% 0);
}

.glitch::after {
  color: var(--red);
  animation: glitch-bottom 1.5s infinite linear alternate-reverse;
  clip-path: inset(70% 0 0 0);
}

@keyframes glitch-top {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-3px, 2px);
  }
  40% {
    transform: translate(3px, -1px);
  }
  60% {
    transform: translate(-2px, 0);
  }
  100% {
    transform: translate(2px, 1px);
  }
}

@keyframes glitch-bottom {
  0% {
    transform: translate(0);
  }
  25% {
    transform: translate(2px, -2px);
  }
  50% {
    transform: translate(-3px, 1px);
  }
  100% {
    transform: translate(1px, 2px);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-1px);
  }
  75% {
    transform: translateX(1px);
  }
}

.subtitle {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--green-dim);
}

.boot {
  min-height: 12rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--green-dim);
  background: rgba(0, 20, 8, 0.75);
  font-size: 0.85rem;
  line-height: 1.6;
  box-shadow: inset 0 0 30px rgba(0, 255, 65, 0.08);
}

.boot .line {
  opacity: 0;
  animation: type-in 0.05s forwards;
}

.boot .line.err {
  color: var(--red);
}

.boot .line.ok {
  color: var(--green);
}

.boot .line.sys {
  color: var(--amber);
}

@keyframes type-in {
  to {
    opacity: 1;
  }
}

.panel {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-left: 3px solid var(--green);
}

.prompt {
  margin: 0.25rem 0;
  color: var(--cyan);
}

.output {
  margin: 0.5rem 0 1rem 1rem;
  color: var(--green-dim);
}

.accent {
  color: var(--green);
  text-shadow: 0 0 6px var(--green);
}

.bad {
  color: var(--red);
  font-weight: bold;
}

.warn {
  color: var(--amber);
}

.hex-dump {
  font-size: 0.65rem;
  line-height: 1.4;
  color: rgba(0, 255, 65, 0.35);
  height: 8rem;
  overflow: hidden;
  user-select: none;
}

.disclaimer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--green-dim);
  font-size: 0.75rem;
  color: var(--green-dim);
  text-align: center;
}
