/* ══════════════════════════════════════════════════
   RETRO.CSS — CRT efektleri, scanlines, noise, vignette
══════════════════════════════════════════════════ */

/* ── Scanlines ── */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.05) 2px,
    rgba(0, 0, 0, 0.05) 4px
  );
  opacity: 0.35;
}

/* ── CRT Overlay (phosphor glow tint) ── */
.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(235, 160, 78, 0.04) 0%,
    rgba(235, 160, 78, 0.02) 100%
  );
  mix-blend-mode: screen;
}

/* ── Vignette ── */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 65%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

/* ── Noise texture ── */
.noise {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* ── Occasional screen glitch ── */
@keyframes glitch {
  0%   { clip-path: polygon(0 0, 100% 0, 100% 5%, 0 5%); transform: translate(-2px, 0); }
  20%  { clip-path: polygon(0 15%, 100% 15%, 100% 20%, 0 20%); transform: translate(2px, 0); }
  40%  { clip-path: polygon(0 50%, 100% 50%, 100% 53%, 0 53%); transform: translate(-1px, 0); }
  60%  { clip-path: polygon(0 80%, 100% 80%, 100% 84%, 0 84%); transform: translate(2px, 0); }
  80%  { clip-path: polygon(0 90%, 100% 90%, 100% 95%, 0 95%); transform: translate(-2px, 0); }
  100% { clip-path: none; transform: translate(0, 0); }
}

.glitch-effect {
  animation: glitch 0.1s steps(1) forwards;
}

/* ── Retro text glow utilities ── */
.text-glow {
  text-shadow:
    0 0 6px var(--amber),
    0 0 12px rgba(235, 160, 78, 0.4);
}

.text-glow-strong {
  text-shadow:
    0 0 4px var(--amber-bright),
    0 0 10px var(--amber),
    0 0 20px rgba(235, 160, 78, 0.3);
}

/* ── Horizontal roll line (rare glitch effect) ── */
@keyframes rollLine {
  0%   { top: -5%; }
  100% { top: 110%; }
}

.roll-line {
  position: fixed;
  left: 0; right: 0;
  height: 2px;
  background: rgba(212, 129, 58, 0.15);
  z-index: 9;
  pointer-events: none;
  animation: rollLine 8s linear infinite;
  top: -5%;
}
