/* CRT scanline + flicker overlay. Toggled by body.crt class. */

body.crt::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.18) 3px,
    rgba(0, 0, 0, 0.18) 3px
  );
  mix-blend-mode: multiply;
}

body.crt::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1001;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0) 60%,
    rgba(0, 0, 0, 0.4) 100%
  );
  animation: crt-flicker 6s infinite;
}

@keyframes crt-flicker {
  0%, 100% { opacity: 1; }
  3% { opacity: 0.96; }
  6% { opacity: 1; }
  43% { opacity: 0.98; }
  78% { opacity: 1; }
}
