@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=Orbitron:wght@400;700&display=swap');

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    font-family: 'Courier Prime', monospace;
    will-change: transform, filter;
}

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg,
            rgba(255, 0, 0, 0.06),
            rgba(0, 255, 0, 0.02),
            rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    z-index: 5;
    pointer-events: none;
}

.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 255, 65, 0.02);
    opacity: 0;
    z-index: 6;
    pointer-events: none;
    animation: global-flicker 0.15s infinite;
}

.overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    color: #00ff41;
    text-shadow: 2px 0 #ff0000, -2px 0 #0000ff;
    pointer-events: none;
    animation: text-glitch 3s infinite;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    letter-spacing: 0.5rem;
    margin-bottom: 0.5rem;
    animation: flicker 2s infinite;
}

p {
    font-size: 1.2rem;
    opacity: 0.8;
}

@keyframes flicker {

    0%,
    19%,
    21%,
    23%,
    25%,
    54%,
    56%,
    100% {
        opacity: 1;
    }

    20%,
    24%,
    55% {
        opacity: 0.2;
    }
}

@keyframes global-flicker {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 0.1;
    }

    20% {
        opacity: 0;
    }

    30% {
        opacity: 0.2;
    }

    40% {
        opacity: 0.1;
    }

    50% {
        opacity: 0.3;
    }

    60% {
        opacity: 0.1;
    }

    70% {
        opacity: 0.2;
    }

    80% {
        opacity: 0.4;
    }

    90% {
        opacity: 0.2;
    }

    100% {
        opacity: 0;
    }
}

@keyframes text-glitch {
    0% {
        text-shadow: 2px 0 #ff0000, -2px 0 #0000ff;
    }

    2% {
        text-shadow: 5px 0 #ff0000, -5px 0 #0000ff;
        transform: translate(-50.5%, -50%);
    }

    4% {
        text-shadow: 2px 0 #ff0000, -2px 0 #0000ff;
        transform: translate(-50%, -50%);
    }

    60% {
        text-shadow: 2px 0 #ff0000, -2px 0 #0000ff;
        transform: translate(-50%, -50%);
    }

    62% {
        text-shadow: -5px 0 #00ff00, 5px 0 #ff00ff;
        transform: translate(-49.5%, -50.5%);
    }

    64% {
        text-shadow: 2px 0 #ff0000, -2px 0 #0000ff;
        transform: translate(-50%, -50%);
    }

    98% {
        text-shadow: 2px 0 #ff0000, -2px 0 #0000ff;
        transform: translate(-50%, -50%);
    }

    100% {
        text-shadow: 5px 0 #00ffff, -5px 0 #ffff00;
        transform: translate(-50%, -49.5%);
    }
}