/* ============================================
   ANIMATIONS - NOW.TUDEXNETWORKS.COM
   ============================================ */

/* ============================================
   FADE IN ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

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

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

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

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

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

/* ============================================
   WIDGET ANIMATIONS
   ============================================ */

.widget {
    animation: fadeInScale 0.5s ease-out backwards;
}

.widget:nth-child(1) {
    animation-delay: 0.1s;
}

.widget:nth-child(2) {
    animation-delay: 0.15s;
}

.widget:nth-child(3) {
    animation-delay: 0.2s;
}

.widget:nth-child(4) {
    animation-delay: 0.25s;
}

.widget:nth-child(5) {
    animation-delay: 0.3s;
}

.widget:nth-child(6) {
    animation-delay: 0.35s;
}

/* ============================================
   HOVER ANIMATIONS
   ============================================ */

@keyframes float {

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

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

.quick-access-icon {
    animation: float 3s ease-in-out infinite;
}

.quick-access-item:nth-child(1) .quick-access-icon {
    animation-delay: 0s;
}

.quick-access-item:nth-child(2) .quick-access-icon {
    animation-delay: 0.2s;
}

.quick-access-item:nth-child(3) .quick-access-icon {
    animation-delay: 0.4s;
}

.quick-access-item:nth-child(4) .quick-access-icon {
    animation-delay: 0.6s;
}

.quick-access-item:nth-child(5) .quick-access-icon {
    animation-delay: 0.8s;
}

.quick-access-item:nth-child(6) .quick-access-icon {
    animation-delay: 1s;
}

/* ============================================
   SHIMMER EFFECT
   ============================================ */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg,
            var(--color-surface) 0%,
            var(--color-surface-elevated) 50%,
            var(--color-surface) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ============================================
   PULSE ANIMATIONS
   ============================================ */

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(124, 58, 237, 0.6);
    }
}

.btn-play {
    animation: pulse-glow 2s ease-in-out infinite;
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {

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

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

/* ============================================
   TEXT ANIMATIONS
   ============================================ */

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

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

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

.text-gradient-animated {
    background: linear-gradient(90deg,
            var(--color-primary),
            var(--color-secondary),
            var(--color-accent),
            var(--color-primary));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

/* ============================================
   MICRO-INTERACTIONS
   ============================================ */

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

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

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

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
}

.ripple-effect:active::after {
    animation: ripple 0.6s ease-out;
}

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

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

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

.scroll-animate {
    opacity: 0;
    animation: scroll-fade-in 0.6s ease-out forwards;
}

/* ============================================
   HERO ANIMATIONS
   ============================================ */

.hero-section {
    animation: fadeIn 0.8s ease-out;
}

.time-display {
    animation: fadeInScale 1s ease-out 0.2s backwards;
}

.quick-search {
    animation: fadeInScale 1s ease-out 0.4s backwards;
}

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

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}