body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Fredoka One', cursive;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: none;
    overscroll-behavior: none;
}

#game-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: transparent;
    /* Changed dynamically */
    transition: background-color 0.5s ease;
}

#monster {
    width: 80vmin;
    height: 80vmin;
    max-width: 500px;
    max-height: 500px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
    transform-origin: center center;
}

#monster path,
#monster circle,
#monster ellipse,
#monster rect {
    transition: d 0.3s ease, fill 0.3s ease, r 0.3s ease, cx 0.3s ease, cy 0.3s ease;
}

/* Animations */
.anim-bounce {
    animation: elastic-bounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.anim-wobble {
    animation: wobble 0.8s ease-in-out;
}

.anim-jello {
    animation: jello 0.8s ease;
}

.anim-tada {
    animation: tada 0.8s ease;
}

.anim-spin {
    animation: spin-bounce 0.8s ease;
}

.anim-shake {
    animation: shake 0.6s ease-in-out;
}

@keyframes elastic-bounce {
    0% {
        transform: scale(1) rotate(0deg);
    }

    30% {
        transform: scale(1.25, 0.75) rotate(0deg);
    }

    40% {
        transform: scale(0.75, 1.25) rotate(0deg);
    }

    50% {
        transform: scale(1.15, 0.85) rotate(0deg);
    }

    65% {
        transform: scale(0.95, 1.05) rotate(0deg);
    }

    75% {
        transform: scale(1.05, 0.95) rotate(0deg);
    }

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

@keyframes wobble {
    0% {
        transform: scale(1) rotate(0deg) translateX(0);
    }

    15% {
        transform: scale(0.8) rotate(-10deg) translateX(-20px);
    }

    30% {
        transform: scale(1.1) rotate(10deg) translateX(20px);
    }

    45% {
        transform: scale(0.9) rotate(-8deg) translateX(-15px);
    }

    60% {
        transform: scale(1.05) rotate(6deg) translateX(10px);
    }

    75% {
        transform: scale(0.95) rotate(-3deg) translateX(-5px);
    }

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

@keyframes jello {
    0% {
        transform: scale3d(1, 1, 1);
    }

    30% {
        transform: scale3d(1.25, 0.75, 1);
    }

    40% {
        transform: scale3d(0.75, 1.25, 1);
    }

    50% {
        transform: scale3d(1.15, 0.85, 1);
    }

    65% {
        transform: scale3d(0.95, 1.05, 1);
    }

    75% {
        transform: scale3d(1.05, 0.95, 1);
    }

    100% {
        transform: scale3d(1, 1, 1);
    }
}

@keyframes tada {
    0% {
        transform: scale(1);
    }

    10%,
    20% {
        transform: scale(0.9) rotate(-3deg);
    }

    30%,
    50%,
    70%,
    90% {
        transform: scale(1.1) rotate(3deg);
    }

    40%,
    60%,
    80% {
        transform: scale(1.1) rotate(-3deg);
    }

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

@keyframes spin-bounce {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }

    60% {
        transform: scale(1.1) rotate(380deg);
        opacity: 1;
    }

    80% {
        transform: scale(0.95) rotate(355deg);
    }

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

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-15px) rotate(-5deg);
    }

    40% {
        transform: translateX(15px) rotate(5deg);
    }

    60% {
        transform: translateX(-10px) rotate(-3deg);
    }

    80% {
        transform: translateX(10px) rotate(3deg);
    }

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

#instruction {
    position: absolute;
    bottom: 50px;
    font-size: 2rem;
    color: rgba(0, 0, 0, 0.5);
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }

    100% {
        opacity: 0.5;
        transform: scale(1);
    }
}

/* Back Button */
.back-btn {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.2s;
    font-size: 28px;
    color: #4facfe;
    border: 4px solid #4facfe;
    font-weight: bold;
    pointer-events: auto;
}

.back-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 0 rgba(0, 0, 0, 0.1);
    color: #4facfe;
}

.back-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}