/* ===== CRT / VHS Overlay Effects ===== */
.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  overflow: hidden;
}

.crt-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
  opacity: 0.28;
}

.crt-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 58%,
    rgba(40, 22, 10, 0.18) 82%,
    rgba(20, 10, 5, 0.38) 100%
  );
}

.crt-flicker {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.015);
  animation: crtFlicker 4s infinite;
}

@keyframes crtFlicker {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
  50.1% { opacity: 0; }
  92% { opacity: 0; }
  92.5% { opacity: 0.6; }
  93% { opacity: 0; }
}

/* CRT screen treatment for media panel */
.crt-screen {
  position: relative;
}

.crt-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.06) 3px,
    rgba(0, 0, 0, 0.06) 6px
  );
  border-radius: inherit;
}

.crt-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.35) 100%);
  border-radius: inherit;
}
