/* ═══════════════════════════════════════════════════════════════
   OVERLAYS.CSS — Visual Effect Layers
   Three.js Canvas, Scanlines/CRT, Grid Overlay, Vignette
   From knexpay.html (SERIAL.CASH) visual effects
   ═══════════════════════════════════════════════════════════════ */

/* ── Three.js Canvas Background ── */
#webgl {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Alternate ID for canvas */
#global-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ── Scanlines + CRT Flicker ── */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 255, 0, 0.02) 2px,
        rgba(0, 255, 0, 0.02) 4px
    );
}

.overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 255, 0, 0.03);
    animation: flicker 0.15s infinite;
    pointer-events: none;
}

@keyframes flicker {
    0%   { opacity: 0.97; }
    50%  { opacity: 1; }
    100% { opacity: 0.98; }
}

/* Alternative scanline class */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.1) 2px,
        rgba(0,0,0,0.1) 4px
    );
    z-index: 2;
    pointer-events: none;
    opacity: 0.3;
}

/* ── Grid Overlay ── */
.grid-overlay,
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(0,255,0,0.03) 1px, transparent 1px),
        linear-gradient(rgba(0,255,0,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
}

/* ── Vignette ── */
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 60%,
        rgba(0,0,0,0.85) 100%
    );
    pointer-events: none;
    z-index: 2;
}
