/* ===========================================
   GENERIC ANIMATION SYSTEM
   ========================================== */

/* Base class for all animated elements */
.animated-element {
    position: absolute;
    z-index: 10;
    opacity: 1;
    transition: all 0.3s ease;
}

/* ===========================================
   MOTION CLASSES (Animation Types)
   ========================================== */

/* Floating motion - up and down */
.motion-float {
    animation: float-motion 3s ease-in-out infinite alternate;
}

/* Rotating motion - continuous rotation */
.motion-rotate {
    animation: rotate-motion 6s linear infinite;
}

/* Pulse motion - scale in and out */
.motion-pulse {
    animation: pulse-motion 2s ease-in-out infinite alternate;
}

/* Bounce motion - bouncing effect */
.motion-bounce {
    animation: bounce-motion 2s ease-in-out infinite;
}

/* Swing motion - left to right swing */
.motion-swing {
    animation: swing-motion 3s ease-in-out infinite alternate;
}

/* Shake motion - horizontal shake */
.motion-shake {
    animation: shake-motion 0.5s ease-in-out infinite alternate;
}

/* Fade motion - fade in and out */
.motion-fade {
    animation: fade-motion 3s ease-in-out infinite alternate;
}

/* Slide motion - horizontal sliding */
.motion-slide {
    animation: slide-motion 4s ease-in-out infinite alternate;
}

/* Wobble motion - wobble effect */
.motion-wobble {
    animation: wobble-motion 1s ease-in-out infinite alternate;
}

/* Heart beat motion - scale with rhythm */
.motion-heartbeat {
    animation: heartbeat-motion 1.5s ease-in-out infinite;
}

/* ===========================================
   POSITION CLASSES
   ========================================== */

/* Top positions */
.pos-top-left {
    top: -20px;
    left: -20px;
}

.pos-top-center {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.pos-top-right {
    top: -20px;
    right: -20px;
}

/* Middle positions */
.pos-middle-left {
    top: 50%;
    left: -20px;
    transform: translateY(-50%);
}

.pos-middle-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pos-middle-right {
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
}

/* Bottom positions */
.pos-bottom-left {
    bottom: -20px;
    left: -20px;
}

.pos-bottom-center {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.pos-bottom-right {
    bottom: -20px;
    right: -20px;
}

/* ===========================================
   SIZE CLASSES
   ========================================== */

.size-xs {
    width: 40px;
    height: 40px;
}

.size-sm {
    width: 60px;
}

.size-md {
    width: 80px;
}

.size-lg {
    width: 100px;
}

.size-xl {
    width: 120px;
    height: 120px;
}

/* ===========================================
   ANIMATION KEYFRAMES
   ========================================== */

@keyframes float-motion {
    0% {
        transform: translateY(0px);
    }
    100% {
        transform: translateY(-15px);
    }
}

@keyframes rotate-motion {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse-motion {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

@keyframes bounce-motion {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-8px);
    }
}

@keyframes swing-motion {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(15deg);
    }
}

@keyframes shake-motion {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(5px);
    }
}

@keyframes fade-motion {
    0% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

@keyframes slide-motion {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(20px);
    }
}

@keyframes wobble-motion {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes heartbeat-motion {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.2);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.2);
    }
    70% {
        transform: scale(1);
    }
}

/* ===========================================
   ANIMATION SPEED MODIFIERS
   ========================================== */

.speed-slow {
    animation-duration: 6s !important;
}

.speed-normal {
    animation-duration: 3s !important;
}

.speed-fast {
    animation-duration: 1.5s !important;
}

.speed-very-fast {
    animation-duration: 0.8s !important;
}

/* ===========================================
   ANIMATION DELAY MODIFIERS
   ========================================== */

.delay-1 {
    animation-delay: 0.5s;
}

.delay-2 {
    animation-delay: 1s;
}

.delay-3 {
    animation-delay: 1.5s;
}

.delay-4 {
    animation-delay: 2s;
}

/* ===========================================
   RESPONSIVE ANIMATIONS
   ========================================== */

/* Disable animations on mobile for better performance */
@media (max-width: 768px) {
    .mobile-no-animation {
        animation: none !important;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .animated-element {
        animation: none !important;
    }
}

/* ===========================================
   HOVER EFFECTS
   ========================================== */

.hover-scale:hover {
    transform: scale(1.1);
}

.hover-rotate:hover {
    transform: rotate(15deg);
}

.hover-fade:hover {
    opacity: 0.7;
}

.hover-bounce:hover {
    animation: bounce-motion 0.5s ease-in-out;
}
