* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    background: #000;
    overflow: hidden;

    font-family:
        "Courier New",
        Courier,
        monospace;

    color: #00ff41;

    cursor: none;
}

/* =========================================
   MAIN SCREEN
========================================= */

.screen {
    position: relative;

    width: 100vw;
    height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: #000;
}


/* =========================================
   CRT EFFECT
========================================= */

.crt {
    position: fixed;

    inset: 0;

    pointer-events: none;

    z-index: 50;

    background:
        repeating-linear-gradient(
            to bottom,
            rgba(0, 255, 65, 0.035) 0px,
            rgba(0, 255, 65, 0.035) 1px,
            transparent 1px,
            transparent 4px
        );

    animation: crtFlicker 0.08s infinite;
}

.crt::before {
    content: "";

    position: absolute;

    inset: 0;

    background:
        radial-gradient(
            ellipse at center,
            transparent 45%,
            rgba(0, 0, 0, 0.5) 100%
        );
}

.crt::after {
    content: "";

    position: absolute;

    inset: 0;

    box-shadow:
        inset 0 0 120px rgba(0, 255, 65, 0.08),
        inset 0 0 40px rgba(0, 255, 65, 0.05);
}

@keyframes crtFlicker {

    0% {
        opacity: 0.96;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.97;
    }
}


/* =========================================
   CURSOR
========================================= */

.cursor-glow {
    position: fixed;

    width: 180px;
    height: 180px;

    border-radius: 50%;

    pointer-events: none;

    z-index: 40;

    transform: translate(-50%, -50%);

    background:
        radial-gradient(
            circle,
            rgba(0, 255, 65, 0.12) 0%,
            rgba(0, 255, 65, 0.05) 30%,
            transparent 70%
        );

    mix-blend-mode: screen;

    transition:
        width 0.15s ease,
        height 0.15s ease;
}


/* =========================================
   FLOPPY
========================================= */

.floppy-wrapper {
    position: relative;

    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;
}

.floppy {
    position: relative;

    font-size: clamp(
        55px,
        12vw,
        150px
    );

    font-weight: 700;

    letter-spacing: 18px;

    text-align: center;

    color: #00ff41;

    user-select: none;

    text-shadow:
        0 0 5px #00ff41,
        0 0 15px #00ff41,
        0 0 35px rgba(0, 255, 65, 0.7);

    animation:
        textFlicker 2.5s infinite,
        textGlitch 5s infinite;

    transition:
        transform 0.15s ease,
        letter-spacing 0.15s ease,
        text-shadow 0.15s ease;
}


/* =========================================
   GLITCH LAYERS
========================================= */

.floppy::before,
.floppy::after {
    content: attr(data-text);

    position: absolute;

    left: 0;
    top: 0;

    width: 100%;

    pointer-events: none;

    opacity: 0;
}

.floppy::before {
    color: #00ffff;

    transform: translate(-3px, 0);
}

.floppy::after {
    color: #ff004c;

    transform: translate(3px, 0);
}

.floppy.glitch::before {
    opacity: 0.7;

    clip-path:
        polygon(
            0 10%,
            100% 10%,
            100% 25%,
            0 25%
        );
}

.floppy.glitch::after {
    opacity: 0.7;

    clip-path:
        polygon(
            0 65%,
            100% 65%,
            100% 78%,
            0 78%
        );
}


/* =========================================
   SCAN LINE
========================================= */

.scan-line {
    position: absolute;

    left: -20%;

    width: 140%;
    height: 1px;

    background: rgba(0, 255, 65, 0.25);

    box-shadow:
        0 0 10px rgba(0, 255, 65, 0.4);

    animation:
        scan 4s linear infinite;

    pointer-events: none;
}

@keyframes scan {

    0% {
        top: -80px;
    }

    100% {
        top: 180px;
    }
}


/* =========================================
   CORRUPTED FILES
========================================= */

.corrupted {
    position: absolute;

    inset: 0;

    pointer-events: none;

    overflow: hidden;

    z-index: 2;
}

.file {
    position: absolute;

    color: #00ff41;

    font-size: 12px;

    white-space: nowrap;

    opacity: 0.45;

    text-shadow:
        0 0 5px #00ff41;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}


/* Individual positions */

.file:nth-child(1) {
    top: 8%;
    left: 6%;
}

.file:nth-child(2) {
    top: 18%;
    left: 78%;
}

.file:nth-child(3) {
    top: 31%;
    left: 12%;
}

.file:nth-child(4) {
    top: 42%;
    left: 83%;
}

.file:nth-child(5) {
    top: 55%;
    left: 4%;
}

.file:nth-child(6) {
    top: 67%;
    left: 74%;
}

.file:nth-child(7) {
    top: 79%;
    left: 15%;
}

.file:nth-child(8) {
    top: 91%;
    left: 67%;
}


/* =========================================
   FILE GLITCH
========================================= */

.file {
    animation:
        fileGlitch 3s infinite;
}

.file:nth-child(2) {
    animation-delay: 0.4s;
}

.file:nth-child(3) {
    animation-delay: 1s;
}

.file:nth-child(4) {
    animation-delay: 1.5s;
}

.file:nth-child(5) {
    animation-delay: 0.8s;
}

.file:nth-child(6) {
    animation-delay: 1.8s;
}

.file:nth-child(7) {
    animation-delay: 0.2s;
}

.file:nth-child(8) {
    animation-delay: 2s;
}

@keyframes fileGlitch {

    0% {
        opacity: 0.15;
        transform: translateX(0);
    }

    20% {
        opacity: 0.55;
    }

    21% {
        opacity: 0.08;
    }

    40% {
        opacity: 0.5;
        transform: translateX(3px);
    }

    60% {
        opacity: 0.2;
    }

    80% {
        opacity: 0.65;
        transform: translateX(-3px);
    }

    100% {
        opacity: 0.15;
        transform: translateX(0);
    }
}


/* =========================================
   TEXT ANIMATIONS
========================================= */

@keyframes textFlicker {

    0%,
    100% {
        opacity: 1;
    }

    92% {
        opacity: 1;
    }

    93% {
        opacity: 0.35;
    }

    94% {
        opacity: 1;
    }

    97% {
        opacity: 0.65;
    }

    98% {
        opacity: 1;
    }
}

@keyframes textGlitch {

    0%,
    90%,
    100% {
        transform: translate(0, 0);
    }

    91% {
        transform: translate(-2px, 1px);
    }

    92% {
        transform: translate(2px, -1px);
    }

    93% {
        transform: translate(0, 0);
    }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .floppy {
        font-size: 15vw;

        letter-spacing: 7px;
    }

    .file {
        font-size: 9px;
    }

    .cursor-glow {
        width: 120px;
        height: 120px;
    }
}