@keyframes moveBackground {
    0% {
        background-position: 0 0; /* Start position */
    }
    50% {
        background-position: 100% 100%; /* Middle of the animation */
    }
    100% {
        background-position: 0 0; /* End position, loops back seamlessly */
    }
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(180deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
        opacity: 1;
        color: rgba(255, 255, 255, 1);
    }

    25% {
        transform: translateY(-5px);
        opacity: 0.75;
        color: rgba(255, 255, 255, 0.75);
    }

    50% {
        transform: translateY(-10px);
        opacity: 0.5;
        color: rgba(255, 255, 255, 0.5);
    }

    100% {
        transform: translateY(-15px);
        opacity: 0;
        color: rgba(255, 255, 255, 0);
    }
}

@keyframes fade {
    0% {
        opacity: 1;
    }

    25% {
        opacity: 0.75;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 0;
    }
}

@keyframes reverseFade {
    0% {
        opacity: 0;
    }

    25% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.75;
    }

    100% {
        opacity: 1;
    }
}

@keyframes pulse {
    25% {
        transform: scale(1.05);
    }

    50% {
        transform: scale(1.1);
    }

    75% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1.2);
    }
}

@keyframes fall {
    0% { transform: translateY(-50px) rotate(0deg); opacity: 0.8; }
    100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

/* Ascension Animations Start */

@keyframes explodeClip {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2) rotate(20deg); opacity: 0.5; }
    100% { transform: scale(0) rotate(720deg); opacity: 0; }
}

@keyframes fadeOutUp {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-50px); }
}

@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(50px); }
    100% { opacity: 1; transform: translateY(0); }
}

.fade-in-prestige {
    animation: fadeInDown 1s ease-out forwards;
}

.exploding {
    animation: explodeClip 1s ease-out forwards;
}

.fade-slide-out {
    animation: fadeOutUp 1s ease-out forwards;
}

/* Ascension Animations End */

.float {
    animation: float 0.5s ease;
}

.fade-1 {
    animation: fade 1s ease;
}

.fade-2 {
    animation: fade 2s ease;
}

.reverse-fade-1 {
    animation: reverseFade 1s ease;
}

.reverse-fade-2 {
    animation: reverseFade 2s ease;
}

.rotate-infinite {
    animation: rotate 10s linear infinite;
}

.scrolling-bg {
    background-repeat: repeat;
    animation: moveBackground 30s linear infinite;
}

.game-movingbg {
    background-image: url('../images/Game/Paperclip-Big.png');
    background-repeat: repeat;
    animation: moveBackground 30s linear infinite;
}

.game-movingbg-birthday {
    background-image: url('../images/Game/Paperclip-Big_Birthday.png');
    background-repeat: repeat;
    animation: moveBackground 30s linear infinite;
}

.game-movingbg-old {
    background-image: url('../images/Game/Background.png');
    background-repeat: repeat;
    animation: moveBackground 30s linear infinite;
}

.pulse {
    animation: pulse 1s linear infinite alternate;
}

#paperclipRain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none; /* no click interaction */
    z-index: -1; /* behind main clip */
}

.falling-clip {
    position: absolute;
    width: 20px;
    opacity: 0.6;
    animation: fall linear;
}