* {
    overflow: hidden;
}

.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

.flipped {
    transform: scaleX(-1);
}

.top-left {
    position: absolute;
    top: 0;
    left: 0;
}

.top-right {
    position: absolute;
    top: 0;
    right: 0;
}

.bottom-left {
    position: absolute;
    bottom: 0;
    left: 0;
}

.bottom-right {
    position: absolute;
    bottom: 0;
    right: 0;
}

.shuffle {
    animation-name: shuffle;
    animation-timing-function: ease-in-out;
    animation-duration: 4s;
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
}

.shuffle.flipped {
    animation-name: shuffle-flipped;
}

.fade-in {
    opacity: 0;
    animation-name: fade-in;
    animation-duration: 20s;
    animation-fill-mode: forwards;
}

.falling {
    transition: all .1s ease-in-out;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }
    10% {
        opacity: 0;
    }
    40% {
        opacity: .5;
    }
    90% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

@keyframes shuffle {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1, 1);
    }
    5% {
        transform: translate(0, 0) rotate(0deg) scale(-1, 1);
    }
    10% {
        transform: translate(0, 0) rotate(-45deg) scale(-1, 1);
    }
    20% {
        transform: translate(0, 0) rotate(0deg) scale(-1, 1);
    }
    25% {
        transform: translate(0, 0) rotate(0deg) scale(1, 1);
    }
    30% {
        transform: translate(0, 0) rotate(0deg) scale(1, 1);
    }
    
    35% {
        transform: translate(30px, -20px) rotate(0deg) scale(1, 1);
    }
    40% {
        transform: translate(60px, 0) rotate(0deg) scale(1, 1);
    }

    45% {
        transform: translate(60px, 0) rotate(45deg) scale(1, 1);
    }
    50% {
        transform: translate(60px, 0) rotate(0) scale(1, 1);
    }
    55% {
        transform: translate(60px, 0) rotate(0) scale(-1, 1);
    }

    60% {
        transform: translate(60px, 0) rotate(0) scale(-1, .8);
    }
    62.5% {
        transform: translate(60px, 0) rotate(0) scale(-.8, 1);
    }
    65% {
        transform: translate(60px, 0) rotate(0) scale(-1, .8);
    }
    67.5% {
        transform: translate(60px, 0) rotate(0) scale(-.8, 1);
    }
    70% {
        transform: translate(60px, 0) rotate(0) scale(-1, .8);
    }
    72.5% {
        transform: translate(60px, 0) rotate(0) scale(-.8, 1);
    }
    75% {
        transform: translate(60px, 0) rotate(0) scale(-1, .8);
    }
    77.5% {
        transform: translate(60px, 0) rotate(0) scale(-.8, 1);
    }

    80% {
        transform: translate(60px, 0) rotate(0) scale(-1, 1);
    }

    
    85% {
        transform: translate(30px, -20px) rotate(0deg) scale(-1, 1);
    }
    90% {
        transform: translate(0, 0) rotate(0deg) scale(-1, 1);
    }

    95% {
        transform: translate(0, 0) rotate(0deg) scale(1, 1);
    }

    100% {
        transform: translate(0, 0) rotate(0deg) scale(1, 1);
    }
}

@keyframes shuffle-flipped {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(-1, 1);
    }
    5% {
        transform: translate(0, 0) rotate(0deg) scale(1, 1);
    }
    10% {
        transform: translate(0, 0) rotate(45deg) scale(1, 1);
    }
    20% {
        transform: translate(0, 0) rotate(0deg) scale(1, 1);
    }
    25% {
        transform: translate(0, 0) rotate(0deg) scale(-1, 1);
    }
    30% {
        transform: translate(0, 0) rotate(0deg) scale(-1, 1);
    }
    
    35% {
        transform: translate(-30px, -20px) rotate(0deg) scale(-1, 1);
    }
    40% {
        transform: translate(-60px, 0) rotate(0deg) scale(-1, 1);
    }

    45% {
        transform: translate(-60px, 0) rotate(-45deg) scale(-1, 1);
    }
    50% {
        transform: translate(-60px, 0) rotate(0) scale(-1, 1);
    }
    55% {
        transform: translate(-60px, 0) rotate(0) scale(1, 1);
    }

    60% {
        transform: translate(-60px, 0) rotate(0) scale(1, .8);
    }
    62.5% {
        transform: translate(-60px, 0) rotate(0) scale(.8, 1);
    }
    65% {
        transform: translate(-60px, 0) rotate(0) scale(1, .8);
    }
    67.5% {
        transform: translate(-60px, 0) rotate(0) scale(.8, 1);
    }
    70% {
        transform: translate(-60px, 0) rotate(0) scale(1, .8);
    }
    72.5% {
        transform: translate(-60px, 0) rotate(0) scale(.8, 1);
    }
    75% {
        transform: translate(-60px, 0) rotate(0) scale(1, .8);
    }
    77.5% {
        transform: translate(-60px, 0) rotate(0) scale(.8, 1);
    }

    80% {
        transform: translate(-60px, 0) rotate(0) scale(1, 1);
    }

    
    85% {
        transform: translate(-30px, -20px) rotate(0deg) scale(1, 1);
    }
    90% {
        transform: translate(0, 0) rotate(0deg) scale(1, 1);
    }

    95% {
        transform: translate(0, 0) rotate(0deg) scale(-1, 1);
    }

    100% {
        transform: translate(0, 0) rotate(0deg) scale(-1, 1);
    }
}
