/* NGOMA STREAM - Animations and Transitions */

/* Global Animation Variables */
:root {
    --animation-fast: 0.15s;
    --animation-normal: 0.3s;
    --animation-slow: 0.5s;
    --animation-slower: 0.8s;
    --easing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --easing-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

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

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

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

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

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

/* Rotation Animations */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

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

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

@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);
    }
}

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

/* Loading Animations */
@keyframes loading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Utility Classes for Animations */
.animate-fade-in {
    animation: fadeIn var(--animation-normal) var(--easing-smooth);
}

.animate-fade-out {
    animation: fadeOut var(--animation-normal) var(--easing-smooth);
}

.animate-fade-in-up {
    animation: fadeInUp var(--animation-normal) var(--easing-smooth);
}

.animate-fade-in-down {
    animation: fadeInDown var(--animation-normal) var(--easing-smooth);
}

.animate-fade-in-left {
    animation: fadeInLeft var(--animation-normal) var(--easing-smooth);
}

.animate-fade-in-right {
    animation: fadeInRight var(--animation-normal) var(--easing-smooth);
}

.animate-scale-in {
    animation: scaleIn var(--animation-normal) var(--easing-bounce);
}

.animate-scale-out {
    animation: scaleOut var(--animation-normal) var(--easing-smooth);
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-slide-in-left {
    animation: slideInLeft var(--animation-normal) var(--easing-smooth);
}

.animate-slide-in-right {
    animation: slideInRight var(--animation-normal) var(--easing-smooth);
}

.animate-slide-in-up {
    animation: slideInUp var(--animation-normal) var(--easing-smooth);
}

.animate-slide-in-down {
    animation: slideInDown var(--animation-normal) var(--easing-smooth);
}

.animate-rotate-in {
    animation: rotateIn var(--animation-slow) var(--easing-elastic);
}

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

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

.animate-bounce-in {
    animation: bounceIn var(--animation-slow) var(--easing-bounce);
}

.animate-shake {
    animation: shake 0.5s var(--easing-bounce);
}

/* Transition Classes */
.transition-all {
    transition: all var(--animation-normal) var(--easing-smooth);
}

.transition-fast {
    transition: all var(--animation-fast) var(--easing-smooth);
}

.transition-slow {
    transition: all var(--animation-slow) var(--easing-smooth);
}

.transition-colors {
    transition: color var(--animation-normal) var(--easing-smooth),
                background-color var(--animation-normal) var(--easing-smooth),
                border-color var(--animation-normal) var(--easing-smooth);
}

.transition-transform {
    transition: transform var(--animation-normal) var(--easing-smooth);
}

.transition-opacity {
    transition: opacity var(--animation-normal) var(--easing-smooth);
}

/* Hover Effects */
.hover-lift {
    transition: transform var(--animation-normal) var(--easing-smooth),
                box-shadow var(--animation-normal) var(--easing-smooth);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.hover-scale {
    transition: transform var(--animation-normal) var(--easing-smooth);
}

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

.hover-grow {
    transition: transform var(--animation-normal) var(--easing-bounce);
}

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

.hover-shrink {
    transition: transform var(--animation-normal) var(--easing-smooth);
}

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

/* Button Animations */
.btn-animate {
    position: relative;
    overflow: hidden;
    transition: all var(--animation-normal) var(--easing-smooth);
}

.btn-animate::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%);
    transition: width var(--animation-slow) var(--easing-smooth),
                height var(--animation-slow) var(--easing-smooth);
}

.btn-animate:active::after {
    width: 200px;
    height: 200px;
}

/* Card Animations */
.card-animate {
    transition: transform var(--animation-normal) var(--easing-smooth),
                box-shadow var(--animation-normal) var(--easing-smooth);
}

.card-animate:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

/* Staggered Animation Delays */
.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;
}

/* Page Transitions */
.page-transition-enter {
    animation: fadeInUp var(--animation-slow) var(--easing-smooth);
}

.page-transition-exit {
    animation: fadeOut var(--animation-normal) var(--easing-smooth);
}

/* Modal Animations */
.modal-enter {
    animation: fadeIn var(--animation-normal) var(--easing-smooth);
}

.modal-enter-content {
    animation: scaleIn var(--animation-normal) var(--easing-bounce);
}

.modal-exit {
    animation: fadeOut var(--animation-normal) var(--easing-smooth);
}

/* Dropdown Animations */
.dropdown-enter {
    animation: fadeInDown var(--animation-normal) var(--easing-smooth);
}

.dropdown-exit {
    animation: fadeOut var(--animation-fast) var(--easing-smooth);
}

/* Notification Animations */
.notification-enter {
    animation: slideInRight var(--animation-normal) var(--easing-bounce);
}

.notification-exit {
    animation: slideOutRight var(--animation-normal) var(--easing-smooth);
}

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

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #e50914;
    animation: spin 0.8s linear infinite;
}

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

.progress-animate {
    animation: progress var(--animation-slow) var(--easing-smooth);
}

/* Shimmer Effect for Skeleton Loading */
.skeleton-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* 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.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.6s, height 0.6s, opacity 0.6s;
}

.ripple:active::after {
    width: 200px;
    height: 200px;
    opacity: 1;
    transition: 0s;
}

/* Glow Effect */
.glow-effect {
    box-shadow: 0 0 5px rgba(229, 9, 20, 0.5);
    transition: box-shadow var(--animation-normal) var(--easing-smooth);
}

.glow-effect:hover {
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.8),
                0 0 40px rgba(229, 9, 20, 0.4);
}

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

.text-animate {
    overflow: hidden;
    white-space: nowrap;
    animation: typewriter var(--animation-slower) steps(40, end);
}

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

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

/* Pulse Glow Animation */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(229, 9, 20, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(229, 9, 20, 0.8),
                    0 0 30px rgba(229, 9, 20, 0.4);
    }
}

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

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

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
}