/* ============================================
   MICRO-INTERACTIONS & ADVANCED ANIMATIONS
   Premium animations for enhanced UX
   ============================================ */

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* ============================================
   BUTTON RIPPLE EFFECT
   ============================================ */

.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   CARD ENTRANCE ANIMATIONS
   ============================================ */

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scale-in {
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   FLOATING ANIMATION
   ============================================ */

.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ============================================
   GLOW PULSE ANIMATION
   ============================================ */

.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(34, 211, 238, 0.08)
    }

    50% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(34, 211, 238, 0.08)
    }
}

/* ============================================
   SHIMMER EFFECT (Loading)
   ============================================ */

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

/* ============================================
   SKELETON LOADING
   ============================================ */

.skeleton {
    background: linear-gradient(90deg,
            rgba(26, 26, 46, 0.8) 25%,
            rgba(40, 40, 60, 0.8) 50%,
            rgba(26, 26, 46, 0.8) 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   TYPEWRITER EFFECT
   ============================================ */

.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--color-primary);
    white-space: nowrap;
    animation: typing 3.5s steps(40) 1s 1 normal both,
        blink 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* ============================================
   NOTIFICATION SLIDE IN
   ============================================ */

.notification-enter {
    animation: notificationSlide 0.5s ease-out;
}

@keyframes notificationSlide {
    from {
        opacity: 0;
        transform: translateX(400px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   BOUNCE ANIMATION
   ============================================ */

.bounce {
    animation: bounce 1s ease-in-out;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-15px);
    }

    50% {
        transform: translateY(0);
    }

    75% {
        transform: translateY(-7px);
    }
}

/* ============================================
   SHAKE ANIMATION (Error States)
   ============================================ */

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-10px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(10px);
    }
}

/* ============================================
   ROTATE 360 (Loading Spinners)
   ============================================ */

.rotate {
    animation: rotate360 1s linear infinite;
}

@keyframes rotate360 {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   HEARTBEAT ANIMATION
   ============================================ */

.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.1);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.1);
    }

    56% {
        transform: scale(1);
    }
}

/* ============================================
   GRADIENT ANIMATION (Backgrounds)
   ============================================ */

.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ============================================
   STAGGER DELAYS (For Lists)
   ============================================ */

.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

.stagger-6 {
    animation-delay: 0.6s;
}

.stagger-7 {
    animation-delay: 0.7s;
}

.stagger-8 {
    animation-delay: 0.8s;
}

/* ============================================
   HOVER EFFECTS
   ============================================ */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(34, 211, 238, 0.08)
}

.hover-glow-primary {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.hover-glow-primary:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(34, 211, 238, 0.08)
    border-color: var(--color-primary);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ============================================
   TEXT EFFECTS
   ============================================ */

.text-glow {
    text-shadow: 0 0 20px var(--color-primary-glow);
}

.text-stroke {
    -webkit-text-stroke: 1px var(--color-primary);
}

/* ============================================
   ENTRANCE OBSERVER (Scroll Reveal)
   ============================================ */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    visibility: hidden;
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading-dots::after {
    content: '.';
    animation: loadingDots 1.5s steps(4, end) infinite;
}

@keyframes loadingDots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

/* ============================================
   PARTICLE EFFECTS (Background Orbs)
   ============================================ */

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: particleFloat 8s ease-in-out infinite;
    
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translate(50px, -50px) scale(1.1);
        opacity: 0.5;
    }
}

/* ============================================
   RESPONSIVE ANIMATIONS
   ============================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
