/* ===================================
   ADVANCED ANIMATIONS & EFFECTS
   =================================== */

/* 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 scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

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

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

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

@keyframes swing {
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(5deg); }
    80% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

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

/* Bounce Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-30px); }
    60% { transform: translateY(-15px); }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* Slide Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes floatBubble {
    0% {
        transform: translateY(100vh) scale(0);
    }
    10% {
        transform: translateY(80vh) scale(0.5);
    }
    20% {
        transform: translateY(60vh) scale(0.8);
    }
    100% {
        transform: translateY(-100vh) scale(1);
    }
}

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

@keyframes gradientFlow {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* Wave Animation */
@keyframes wave {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

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

/* Glitch Effect */
@keyframes glitch {
    0%, 100% {
        text-shadow: 
            2px 0 #ff00ff,
            -2px 0 #00ffff;
    }
    25% {
        text-shadow: 
            -2px 0 #ff00ff,
            2px 0 #00ffff;
    }
    50% {
        text-shadow: 
            2px 0 #00ffff,
            -2px 0 #ff00ff;
    }
}

/* Typewriter Effect */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Morph Animation */
@keyframes morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

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

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(16, 185, 129, 0.8);
    }
}

/* 3D Flip */
@keyframes flip {
    from {
        transform: perspective(400px) rotateY(0);
    }
    to {
        transform: perspective(400px) rotateY(360deg);
    }
}

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

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

/* Fade Classes */
.fade-in { animation: fadeIn 0.6s ease-out; }
.fade-in-up { animation: fadeInUp 0.6s ease-out; }
.fade-in-down { animation: fadeInDown 0.6s ease-out; }
.fade-in-left { animation: fadeInLeft 0.6s ease-out; }
.fade-in-right { animation: fadeInRight 0.6s ease-out; }

/* Scale Classes */
.scale-in { animation: scaleIn 0.5s ease-out; }
.scale-out { animation: scaleOut 0.5s ease-out; }
.pulse { animation: pulse 2s infinite; }
.heartbeat { animation: heartbeat 1.5s ease-in-out infinite; }

/* Rotation Classes */
.rotate { animation: rotate 2s linear infinite; }
.swing { animation: swing 1s ease-in-out; }
.wiggle { animation: wiggle 0.5s ease-in-out infinite; }

/* Bounce Classes */
.bounce { animation: bounce 2s infinite; }
.bounce-in { animation: bounceIn 0.75s; }

/* Float Classes */
.float { animation: float 3s ease-in-out infinite; }
.float-bubble { animation: floatBubble 10s infinite; }

/* Gradient Classes */
.gradient-shift {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

.gradient-flow {
    background-size: 200% 200%;
    animation: gradientFlow 15s ease infinite;
}

/* Wave Class */
.wave { animation: wave 2.5s infinite; }

/* Shimmer Class */
.shimmer {
    background: linear-gradient(to right, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

/* Glitch Class */
.glitch { animation: glitch 0.3s infinite; }

/* Typewriter Class */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typewriter 3s steps(40, end);
}

.typewriter::after {
    content: "|";
    animation: blink 1s infinite;
}

/* Morph Class */
.morph {
    animation: morph 8s ease-in-out infinite;
}

/* Ripple Class */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
}

/* Glow Class */
.glow-pulse { animation: glowPulse 2s ease-in-out infinite; }

/* 3D Flip Class */
.flip { animation: flip 1s ease-in-out; }

/* Shake Class */
.shake { animation: shake 0.5s; }

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

/* Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Grow Effect */
.hover-grow {
    transition: transform 0.3s ease;
}

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

/* Shrink Effect */
.hover-shrink {
    transition: transform 0.3s ease;
}

.hover-shrink:hover {
    transform: scale(0.95);
}

/* Rotate Effect */
.hover-rotate {
    transition: transform 0.3s ease;
}

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

/* Shadow Effect */
.hover-shadow {
    transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Border Effect */
.hover-border {
    position: relative;
    transition: all 0.3s ease;
}

.hover-border::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: inherit;
    transition: all 0.3s ease;
}

.hover-border:hover::before {
    border-color: #10b981;
    transform: scale(1.05);
}

/* Underline Effect */
.hover-underline {
    position: relative;
    display: inline-block;
}

.hover-underline::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981, #0891b2);
    transition: width 0.3s ease;
}

.hover-underline:hover::after {
    width: 100%;
}

/* Fill Effect */
.hover-fill {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.hover-fill::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #10b981, #0891b2);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.hover-fill:hover::before {
    transform: scaleX(1);
}

.hover-fill:hover {
    color: white;
}

/* ===================================
   PARALLAX EFFECTS
   =================================== */

.parallax-container {
    position: relative;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    will-change: transform;
}

.parallax-slow {
    transform: translateZ(-1px) scale(2);
}

.parallax-medium {
    transform: translateZ(-2px) scale(3);
}

.parallax-fast {
    transform: translateZ(-3px) scale(4);
}

/* ===================================
   SCROLL ANIMATIONS
   =================================== */

.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.scroll-animate-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.scroll-animate-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.stagger-container > * {
    opacity: 0;
    transform: translateY(30px);
}

.stagger-container.active > * {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-container.active > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-container.active > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-container.active > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-container.active > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-container.active > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-container.active > *:nth-child(6) { transition-delay: 0.6s; }

/* ===================================
   MAGNETIC BUTTON EFFECT
   =================================== */

.magnetic-btn {
    position: relative;
    transition: transform 0.2s ease;
}

/* ===================================
   3D TILT EFFECT
   =================================== */

.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateY(10deg) rotateX(10deg);
}

/* ===================================
   BLOB ANIMATION
   =================================== */

@keyframes blob {
    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: 40% 60% 60% 40% / 60% 40% 60% 40%;
    }
    75% {
        border-radius: 70% 30% 50% 50% / 30% 70% 50% 50%;
    }
}

.blob {
    animation: blob 10s ease-in-out infinite;
}

/* ===================================
   LOADING ANIMATIONS
   =================================== */

.skeleton-loading {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.skeleton-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

/* Spinner */
.spinner {
    border: 3px solid rgba(16, 185, 129, 0.1);
    border-top-color: #10b981;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: rotate 1s linear infinite;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #0891b2);
    z-index: 9999;
    transition: width 0.3s ease;
}

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

.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #10b981;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.1s ease;
    transform: translate(-50%, -50%);
}

.custom-cursor.hover {
    width: 40px;
    height: 40px;
    background: rgba(16, 185, 129, 0.1);
}

.cursor-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    background: rgba(16, 185, 129, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    animation: fadeOut 1s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(2);
    }
}

/* ===================================
   TEXT EFFECTS
   =================================== */

.text-gradient-animate {
    background: linear-gradient(
        90deg,
        #10b981,
        #0891b2,
        #10b981
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

.text-shadow-pop {
    text-shadow: 0 0 0 transparent;
    transition: text-shadow 0.3s ease;
}

.text-shadow-pop:hover {
    text-shadow: 
        0 0 10px rgba(16, 185, 129, 0.5),
        0 0 20px rgba(16, 185, 129, 0.3),
        0 0 30px rgba(16, 185, 129, 0.1);
}

/* ===================================
   PARTICLE SYSTEM
   =================================== */

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(16, 185, 129, 0.5);
    border-radius: 50%;
    animation: floatBubble 20s infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .hover-lift:hover,
    .hover-grow:hover,
    .hover-shrink:hover,
    .hover-rotate:hover {
        transform: none;
    }
    
    .tilt-card:hover {
        transform: none;
    }
}