.crt {
  position: relative;
  overflow: hidden;
  color: #00ff99;
  text-shadow: 0 0 2px #00ff99, 0 0 10px #00ff99;
  background-color: black;
  filter: contrast(1) brightness(0.9) saturate(1);
  animation: crtFlicker 120ms infinite;
}

.crt::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 255, 0, 0.05),
    rgba(0, 255, 0, 0.05) 2px,
    transparent 2px,
    transparent 4px
  );
  z-index: 2;
  mix-blend-mode: overlay;
  animation: scanlines 0.2s linear infinite;
}

.crt::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  background: radial-gradient(circle, transparent 60%, rgba(0, 0, 0, 0.5) 100%);
  z-index: 3;
}

/* Scanlines */
@keyframes scanlines {
  0% { background-position: 0 0; }
  100% { background-position: 0 4px; }
}

/* Flicker */
@keyframes crtFlicker {
  0%, 19%, 21%, 99% {
    opacity: 1;
    transform: translateX(0);
  }
  20% {
    opacity: 0.98;
    transform: translateX(-0.5px);
  }
  50% {
    opacity: 0.97;
    transform: translateX(0.5px);
  }
}