/* CRT monitor effect over the whole screen (toggled with body.crt-on) */
#crt-overlay {
    position: fixed; inset: 0; z-index: 10070; pointer-events: none; display: none; overflow: hidden;
    background:
        repeating-linear-gradient(180deg, rgba(255,255,255,0.06) 0 1px, rgba(0,0,0,0.13) 1px 3px),
        repeating-linear-gradient(90deg, rgba(255,0,0,0.025) 0 1px, rgba(0,255,0,0.02) 1px 2px, rgba(0,0,255,0.025) 2px 3px);
}
body.crt-on #crt-overlay { display: block; }
/* Vignette and the curve of the glass, with a faint flicker */
#crt-overlay::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, transparent 58%, rgba(0,0,0,0.32) 100%);
    box-shadow: inset 0 0 60px rgba(0,0,0,0.28);
    animation: crtFlicker 0.12s steps(2) infinite;
}
/* A soft bright band rolling slowly down the screen */
#crt-overlay::after {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22%;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.035) 50%, transparent);
    animation: crtRoll 9s linear infinite;
}
@keyframes crtFlicker { 0% { opacity: 0.94; } 100% { opacity: 1; } }
@keyframes crtRoll { from { transform: translateY(-100%); } to { transform: translateY(560%); } }
@media (prefers-reduced-motion: reduce) {
    #crt-overlay::before, #crt-overlay::after { animation: none; }
    #crt-overlay::after { display: none; }
}
