/* Animation styles */
@keyframes sparkle {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0.5;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    50% {
        transform: translateX(0);
    }
    75% {
        transform: translateX(10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(52, 168, 83, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(52, 168, 83, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(52, 168, 83, 0);
    }
}

@keyframes hop {
    0%, 100% {
        transform: translateY(0) rotate(0);
    }
    25% {
        transform: translateY(-30px) rotate(-5deg);
    }
    50% {
        transform: translateY(-15px) rotate(0);
    }
    75% {
        transform: translateY(-30px) rotate(5deg);
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes shine {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animation Classes */
.sparkle {
    animation: sparkle 2s infinite;
}

.bounce {
    animation: bounce 1s ease;
}

.shake {
    animation: shake 0.5s ease;
}

.fade-in {
    animation: fadeIn 1s ease forwards;
}

.slide-in {
    animation: slideIn 0.8s ease forwards;
}

.pulse {
    animation: pulse 1.5s infinite;
}

.hop {
    animation: hop 1.5s infinite;
}

.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shine 2s infinite;
}

/* Specific Animations for Creation Elements */
.sun-shine {
    animation: rotate 20s linear infinite, sparkle 4s infinite;
}

.water-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    animation: ripple 3s infinite;
}

/* Success Animation Classes */
.celebration .stars {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.celebration .star {
    position: absolute;
    background-color: white;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: sparkle 2s infinite;
}

.celebration-text {
    animation: pulse 2s infinite;
}

.rabbit-hop {
    animation: hop 2s infinite;
}

/* Fade-out for reset */
.fade-out {
    animation: fadeIn 1s ease forwards reverse;
}

/* Zone highlight when dragging */
.zone-highlight {
    box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.7);
    border: 3px dashed rgba(255, 255, 255, 0.9);
}

/* Correct placement highlight */
.correct-placement {
    animation: pulse 1s;
}

/* Incorrect placement shake */
.incorrect-placement {
    animation: shake 0.5s;
}
