/* ===== NATUMEX 2.0 - Animations Library ===== */

/* ===== Keyframe Animations ===== */

/* Aurora Background Animation */
@keyframes aurora {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes auroraShift {

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

    33% {
        opacity: 0.8;
        transform: translateX(-10px) rotate(1deg);
    }

    66% {
        opacity: 0.9;
        transform: translateX(10px) rotate(-1deg);
    }
}

/* Floating Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    25% {
        transform: translateY(-15px) rotate(2deg);
    }

    50% {
        transform: translateY(-8px) rotate(0deg);
    }

    75% {
        transform: translateY(-20px) rotate(-2deg);
    }
}

@keyframes floatSlow {

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

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

/* Pulse Glow Animation */
@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(0, 168, 107, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(0, 168, 107, 0.6), 0 0 60px rgba(0, 168, 107, 0.3);
    }
}

@keyframes pulseGlowRed {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(206, 17, 38, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(206, 17, 38, 0.6), 0 0 60px rgba(206, 17, 38, 0.3);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Bounce Animation */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

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

    60% {
        transform: translateY(-10px);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

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

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

    25% {
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

/* Shake Animation */
@keyframes shake {

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

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

@keyframes shakeHard {

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

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-8px) rotate(-1deg);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(8px) rotate(1deg);
    }
}

/* Pop Animation */
@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

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

/* Spin Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Fade Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.05);
    }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Progress Bar Animation */
@keyframes progressFill {
    from {
        width: 0%;
    }
}

@keyframes progressPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Confetti Animation */
@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes confettiShake {

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

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

/* Star Burst */
@keyframes starBurst {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 1;
    }

    100% {
        transform: scale(2) rotate(360deg);
        opacity: 0;
    }
}

/* Trophy Animation */
@keyframes trophyBounce {

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

    25% {
        transform: translateY(-30px) scale(1.1);
    }

    50% {
        transform: translateY(0) scale(1);
    }

    75% {
        transform: translateY(-15px) scale(1.05);
    }
}

/* XP Counter Animation */
@keyframes xpCount {
    0% {
        transform: scale(1);
        color: inherit;
    }

    50% {
        transform: scale(1.3);
        color: var(--green-primary);
    }

    100% {
        transform: scale(1);
        color: inherit;
    }
}

/* Streak Fire Animation */
@keyframes firePulse {

    0%,
    100% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.2);
        filter: brightness(1.3);
    }
}

/* Badge Unlock Animation */
@keyframes badgeUnlock {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.3) rotate(10deg);
    }

    75% {
        transform: scale(0.9) rotate(-5deg);
    }

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

/* Typing Effect */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Gradient Text Animation */
@keyframes gradientText {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Card Flip */
@keyframes flipIn {
    0% {
        transform: perspective(1000px) rotateY(-90deg);
        opacity: 0;
    }

    100% {
        transform: perspective(1000px) rotateY(0deg);
        opacity: 1;
    }
}

/* Particle Float */
@keyframes particleFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx, 100px), var(--ty, -100px)) rotate(var(--tr, 360deg));
        opacity: 0;
    }
}

/* ===== Animation Utility Classes ===== */

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
    animation: floatSlow 8s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 1s ease;
}

.animate-bounce-in {
    animation: bounceIn 0.6s ease;
}

.animate-shake {
    animation: shake 0.5s ease;
}

.animate-pop {
    animation: pop 0.3s ease;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease;
}

.animate-fade-in-down {
    animation: fadeInDown 0.5s ease;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ===== Ripple Effect Component ===== */
.ripple-container {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* ===== Confetti Container ===== */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    animation: confettiFall 3s ease-out forwards, confettiShake 0.5s ease-in-out infinite;
}

.confetti:nth-child(odd) {
    background: var(--green-primary);
}

.confetti:nth-child(even) {
    background: var(--red-primary);
}

.confetti:nth-child(3n) {
    background: #fff;
    width: 8px;
    height: 8px;
}

/* ===== Loading Spinner ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--green-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== Skeleton Loading ===== */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, var(--gray-700) 25%, var(--gray-600) 50%, var(--gray-700) 75%);
    background-size: 200% 100%;
}

/* ===== Transition Classes ===== */
.transition-all {
    transition: all var(--transition-base);
}

.transition-transform {
    transition: transform var(--transition-base);
}

.transition-opacity {
    transition: opacity var(--transition-base);
}

.transition-colors {
    transition: color var(--transition-base), background-color var(--transition-base), border-color var(--transition-base);
}

/* ===== Hover Effects ===== */
.hover-lift {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.hover-scale {
    transition: transform var(--transition-fast);
}

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

.hover-glow {
    transition: box-shadow var(--transition-fast);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(0, 168, 107, 0.4);
}

/* ===== Delay Utilities ===== */
.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-400 {
    animation-delay: 400ms;
}

.delay-500 {
    animation-delay: 500ms;
}

.delay-700 {
    animation-delay: 700ms;
}

.delay-1000 {
    animation-delay: 1000ms;
}

/* ===== Duration Utilities ===== */
.duration-150 {
    animation-duration: 150ms;
}

.duration-300 {
    animation-duration: 300ms;
}

.duration-500 {
    animation-duration: 500ms;
}

.duration-700 {
    animation-duration: 700ms;
}

.duration-1000 {
    animation-duration: 1000ms;
}

/* ===== SVG Hologram Hero Animations ===== */
.hero-hologram {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    min-height: 400px;
    position: relative;
    z-index: 10;
}

.svg-hologram {
    width: 100%;
    max-width: 480px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(16, 185, 129, 0.1));
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.6s ease;
}

.svg-hologram:hover {
    transform: scale(1.08) rotate(3deg);
    filter: drop-shadow(0 0 60px rgba(16, 185, 129, 0.4));
}

.holo-core {
    transform-origin: 250px 250px;
    animation: pop 3s ease-in-out infinite alternate, pulseGlow 4s infinite alternate;
}

.holo-ring-1 {
    transform-origin: 250px 250px;
    animation: spin 15s linear infinite;
}

.holo-ring-2 {
    transform-origin: 250px 250px;
    animation: spin 25s linear infinite reverse;
}

.holo-ring-3 {
    transform-origin: 250px 250px;
    animation: spin 45s linear infinite;
}

.holo-poly-1 {
    transform-origin: 250px 250px;
    animation: spin 50s ease-in-out infinite alternate;
}

.holo-poly-2 {
    transform-origin: 250px 250px;
    animation: spin 35s linear infinite reverse;
}

.holo-particle-1 {
    transform-origin: 250px 250px;
    animation: spin 8s linear infinite;
}

.holo-particle-2 {
    transform-origin: 250px 250px;
    animation: spin 18s linear infinite reverse;
}