/**
 * Enliko Platform - Premium Animations Library
 * Version 4.0.0
 * 
 * Modern animations, micro-interactions, and visual effects
 * Import after components.css for full functionality
 */

/* ===== KEYFRAME ANIMATIONS ===== */

/* 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);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide Animations */
@keyframes slideInUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes slideInDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

@keyframes slideOutUp {
    from { transform: translateY(0); }
    to { transform: translateY(-100%); }
}

@keyframes slideOutDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

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

@keyframes scaleOut {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0); opacity: 0; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulseSoft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
}

/* Rotation Animations */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

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

/* Bounce Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes bounceOut {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); }
    100% { transform: scale(0); opacity: 0; }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Float Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

/* Glow Animations */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(124, 58, 237, 0.6);
    }
}

@keyframes glowRing {
    0% {
        box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.6);
    }
    100% {
        box-shadow: 0 0 0 20px rgba(124, 58, 237, 0);
    }
}

/* Gradient Animations */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Text Animations */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}

/* Background Animations */
@keyframes bgFloat {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

@keyframes particles {
    0% { transform: translate(0, 100vh); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { transform: translate(50px, -100vh); opacity: 0; }
}

/* Counter Animation (for numbers) */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== ANIMATION UTILITY CLASSES ===== */

/* Apply Animations */
.animate-fade-in { animation: fadeIn 0.5s ease forwards; }
.animate-fade-in-up { animation: fadeInUp 0.5s ease forwards; }
.animate-fade-in-down { animation: fadeInDown 0.5s ease forwards; }
.animate-fade-in-left { animation: fadeInLeft 0.5s ease forwards; }
.animate-fade-in-right { animation: fadeInRight 0.5s ease forwards; }
.animate-fade-in-scale { animation: fadeInScale 0.4s ease forwards; }
.animate-slide-in-up { animation: slideInUp 0.4s ease forwards; }
.animate-scale-in { animation: scaleIn 0.3s ease forwards; }
.animate-bounce-in { animation: bounceIn 0.5s ease forwards; }
.animate-pulse { animation: pulse 2s ease infinite; }
.animate-pulse-soft { animation: pulseSoft 2s ease infinite; }
.animate-float { animation: float 3s ease infinite; }
.animate-glow { animation: glowPulse 2s ease infinite; }
.animate-spin { animation: rotate 1s linear infinite; }
.animate-bounce { animation: bounce 1s ease infinite; }

/* Animation Delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }

/* Animation Durations */
.duration-fast { animation-duration: 0.2s; }
.duration-normal { animation-duration: 0.4s; }
.duration-slow { animation-duration: 0.8s; }
.duration-slower { animation-duration: 1.2s; }

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

.hover-lift {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

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

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

.hover-border {
    transition: border-color var(--transition-fast);
}
.hover-border:hover {
    border-color: var(--accent);
}

.hover-shine {
    position: relative;
    overflow: hidden;
}
.hover-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s;
}
.hover-shine:hover::after {
    transform: rotate(45deg) translateX(100%);
}

/* ===== SCROLL REVEAL ===== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* ===== STAGGER ANIMATIONS ===== */

.stagger > * {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.stagger > *:nth-child(1) { animation-delay: 0.1s; }
.stagger > *:nth-child(2) { animation-delay: 0.2s; }
.stagger > *:nth-child(3) { animation-delay: 0.3s; }
.stagger > *:nth-child(4) { animation-delay: 0.4s; }
.stagger > *:nth-child(5) { animation-delay: 0.5s; }
.stagger > *:nth-child(6) { animation-delay: 0.6s; }
.stagger > *:nth-child(7) { animation-delay: 0.7s; }
.stagger > *:nth-child(8) { animation-delay: 0.8s; }
.stagger > *:nth-child(9) { animation-delay: 0.9s; }
.stagger > *:nth-child(10) { animation-delay: 1.0s; }

/* ===== PARTICLE BACKGROUNDS ===== */

.particles-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.3;
    animation: particles 15s linear infinite;
}

.particle:nth-child(odd) {
    animation-duration: 20s;
    width: 3px;
    height: 3px;
}

.particle:nth-child(even) {
    animation-duration: 25s;
    background: var(--green);
}

/* ===== GLASSMORPHISM EFFECTS ===== */

.glass {
    background: rgba(20, 20, 25, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-dark {
    background: rgba(5, 5, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-accent {
    background: rgba(124, 58, 237, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

/* ===== GRADIENT TEXT ===== */

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-gold {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-animated {
    background: linear-gradient(135deg, var(--accent), var(--accent-light), var(--accent));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

/* ===== NEON EFFECTS ===== */

.neon-violet {
    text-shadow: 
        0 0 5px var(--accent),
        0 0 10px var(--accent),
        0 0 20px var(--accent),
        0 0 40px var(--accent);
}

.neon-green {
    text-shadow: 
        0 0 5px var(--green),
        0 0 10px var(--green),
        0 0 20px var(--green),
        0 0 40px var(--green);
}

.neon-box-violet {
    box-shadow: 
        0 0 5px var(--accent),
        0 0 10px var(--accent),
        0 0 20px var(--accent),
        inset 0 0 5px rgba(124, 58, 237, 0.2);
}

.neon-box-green {
    box-shadow: 
        0 0 5px var(--green),
        0 0 10px var(--green),
        0 0 20px var(--green),
        inset 0 0 5px rgba(34, 197, 94, 0.2);
}

/* ===== MORPHING SHAPES ===== */

.morph-blob {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morphBlob 8s ease-in-out infinite;
}

@keyframes morphBlob {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%; }
    75% { border-radius: 60% 30% 60% 30% / 40% 70% 40% 70%; }
}

/* ===== RIPPLE EFFECT ===== */

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.ripple:active::after {
    width: 200%;
    padding-bottom: 200%;
    opacity: 1;
    transition: width 0.4s ease-out, padding-bottom 0.4s ease-out, opacity 0.4s ease-out;
}

/* ===== CURSOR EFFECTS ===== */

.cursor-glow {
    cursor: pointer;
    position: relative;
}

.cursor-glow::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    transform: translate(-50%, -50%);
}

.cursor-glow:hover::before {
    opacity: 1;
}

/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }
}
