/* Base Setup */
.monster-svg {
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.monster-idle {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.monster-eating .mouth-closed {
    opacity: 0;
}

.monster-eating .mouth-open {
    opacity: 1;
    transform: scale(1.1);
}

.monster-chewing {
    animation: chew 0.2s infinite;
}

.monster-anticipating .mouth-closed {
    opacity: 0;
}

.monster-anticipating .mouth-open {
    opacity: 1;
    transform: scale(0.9);
}

@keyframes chew {

    0%,
    100% {
        transform: scale(1, 1);
    }

    50% {
        transform: scale(1.1, 0.9);
    }
}

.eye circle:nth-child(2) {
    animation: blink 4s infinite;
    transform-origin: center;
}

@keyframes blink {

    0%,
    48%,
    52%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(0.1);
    }
}

/* Speech Bubble */
.speech-bubble {
    position: absolute;
    top: -40px;
    right: -20px;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    border-bottom-left-radius: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-weight: 800;
    color: #475569;
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 40;
    white-space: nowrap;
}

.speech-bubble.show {
    transform: scale(1);
    opacity: 1;
}

.food-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 0.5rem;
    width: 100%;
}

.food-item {
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    -webkit-user-select: none;
    user-select: none;
    background: #f3f4f6;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 0 #e5e7eb;
}

.food-item:hover {
    transform: scale(1.1) translateY(-4px);
    background: #fff;
    border-color: #fbbf24;
}

.food-item:active {
    transform: scale(0.95);
}

/* Responsive Grid sizing */
@media(min-width: 600px) {
    .food-item {
        width: 56px;
        height: 56px;
        font-size: 2.2rem;
    }
}

.flying {
    position: fixed;
    pointer-events: none;
    z-index: 100;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s;
}

.die-rolling {
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(10deg);
    }

    75% {
        transform: rotate(-10deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* High-quality claymation background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('clay_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
}

.picnic-cloth {
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #fca5a5 25%, transparent 25%, transparent 75%, #fca5a5 75%, #fca5a5),
        linear-gradient(45deg, #fca5a5 25%, transparent 25%, transparent 75%, #fca5a5 75%, #fca5a5);
    background-position: 0 0, 10px 10px;
    background-size: 20px 20px;
}

#eye-left-wrapper,
#eye-right-wrapper {
    transition: transform 0.1s ease-out;
    transform-origin: center;
}

.bump {
    animation: bump 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes bump {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}