/* Terminal Tribune v1.1.0 — CRT Effects */

/* ── Overlay-Container ── */
#crt-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;

    /* Rollende Scanline — helle Bande von unten nach oben */
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(255, 255, 255, 0.05) 50%,
        transparent
    );
    background-size: 100% 25%;
    animation: scanline-roll 6s linear infinite;
}

@keyframes scanline-roll {
    0%   { background-position: 0 120%; }
    100% { background-position: 0 -25%; }
}

/* ── Feines statisches Scanline-Raster (sehr subtil) ── */
#crt-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 3px,
        rgba(0, 0, 0, 0.025) 3px,
        rgba(0, 0, 0, 0.025) 4px
    );
}

/* ── Vignette ── */
#crt-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 60%,
        rgba(0, 0, 0, 0.15) 85%,
        rgba(0, 0, 0, 0.35) 100%
    );
}

/* ── Subtiler Gesamt-Flicker ── */
@keyframes crt-subtle {
    0%   { opacity: 0.97; }
    50%  { opacity: 1; }
    100% { opacity: 0.97; }
}

body {
    animation: crt-subtle 4s ease-in-out infinite;
}

/* ── Startup-Animation ── */
@keyframes crt-on {
    0% {
        filter: brightness(15);
        transform: scaleY(0.005) scaleX(0.4);
        opacity: 1;
    }
    35% {
        filter: brightness(8);
        transform: scaleY(0.005) scaleX(0.7);
    }
    50% {
        filter: brightness(2.5);
        transform: scaleY(1.05) scaleX(0.97);
    }
    70% {
        filter: brightness(1.3);
        transform: scale(1.01);
    }
    100% {
        filter: brightness(1);
        transform: scale(1);
    }
}

body.crt-boot {
    animation: crt-on 0.6s ease-out;
}
