/* ============================================
   AniCineHub - Animations & Keyframes
   ============================================ */

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

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

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Glow Animations */
@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    }

    50% {
        box-shadow: 0 0 40px rgba(0, 212, 255, 0.8);
    }
}

@keyframes glowPurple {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(162, 89, 255, 0.5);
    }

    50% {
        box-shadow: 0 0 40px rgba(162, 89, 255, 0.8);
    }
}

@keyframes borderGlow {

    0%,
    100% {
        border-color: rgba(0, 212, 255, 0.5);
    }

    50% {
        border-color: rgba(0, 212, 255, 1);
    }
}

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

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

.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 0px,
            rgba(255, 255, 255, 0.1) 40px,
            rgba(255, 255, 255, 0.05) 80px);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

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

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

    to {
        transform: rotate(360deg);
    }
}

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

/* Bounce Animations */
@keyframes bounce {

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

    40% {
        transform: translateY(-30px);
    }

    60% {
        transform: translateY(-15px);
    }
}

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

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

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

/* Float Animation */
@keyframes float {

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

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

/* Wiggle Animation */
@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

/* Hero Parallax Background */
@keyframes parallaxMove {
    0% {
        background-position: 0% 0%;
    }

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

/* Typing Animation */
@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Neon Text Flicker */
@keyframes flicker {

    0%,
    19%,
    21%,
    23%,
    25%,
    54%,
    56%,
    100% {
        text-shadow:
            0 0 10px var(--neon-blue),
            0 0 20px var(--neon-blue),
            0 0 30px var(--neon-blue);
    }

    20%,
    24%,
    55% {
        text-shadow: none;
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out;
}

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

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

.animate-glow-purple {
    animation: glowPurple 2s ease-in-out infinite;
}

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

.animate-wiggle {
    animation: wiggle 1s ease-in-out;
}

/* Delayed Animations for Staggered Effect */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

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

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.4);
}

.hover-glow:hover {
    animation: glow 1s ease-in-out infinite;
}

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

/* Card Entrance Animation */
.card-entrance {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.card-entrance.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Dots */
.loading-dots {
    display: inline-flex;
    gap: 5px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-blue);
    animation: bounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

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

    to {
        width: 100%;
    }
}

.progress-bar {
    height: 4px;
    background: var(--gradient-primary);
    animation: progress 2s ease-out;
}

/* Skeleton Loading for Cards */
.card-skeleton {
    background: rgba(30, 30, 30, 0.5);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-skeleton .skeleton-image {
    width: 100%;
    aspect-ratio: 2/3;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 0px,
            rgba(255, 255, 255, 0.1) 40px,
            rgba(255, 255, 255, 0.05) 80px);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

.card-skeleton .skeleton-text {
    height: 20px;
    margin: 10px 15px;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 0px,
            rgba(255, 255, 255, 0.1) 40px,
            rgba(255, 255, 255, 0.05) 80px);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
}

/* Page Transition */
.page-transition {
    animation: fadeIn 0.3s ease-out;
}

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Text Animation */
.hero-title {
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-buttons {
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

/* Carousel Slide Animation */
@keyframes carouselSlide {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.carousel-item-enter {
    animation: carouselSlide 0.5s ease-out;
}

/* Notification Animation */
@keyframes slideInNotification {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

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

.notification {
    animation: slideInNotification 0.3s ease-out;
}

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

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

.ripple-effect::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s ease-out;
}