/* ═══════════════════════════════════════════
   Flick — CINEMATIC Animations
   Premium Micro-Interactions
   ═══════════════════════════════════════════ */

/* ── Shimmer for Skeleton Loading ── */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ── Pulse Glow ── */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(245, 166, 35, 0.2), 0 0 40px rgba(245, 166, 35, 0.1); }
    50% { box-shadow: 0 0 30px rgba(245, 166, 35, 0.5), 0 0 60px rgba(245, 166, 35, 0.25); }
}

/* ── Float Up ── */
@keyframes float-up {
    0% { transform: translateY(8px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ── Slide In Right ── */
@keyframes slide-in-right {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

/* ── Slide In Left ── */
@keyframes slide-in-left {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

/* ── Scale In (Spring Easing) ── */
@keyframes scale-in {
    0% { transform: scale(0.9); opacity: 0; }
    60% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Number Count Animation ── */
@keyframes number-count {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Film Grain Overlay ── */
@keyframes film-grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

/* ── Spotlight Effect ── */
@keyframes spotlight {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ── Hero Parallax ── */
@keyframes hero-parallax {
    0% { transform: scale(1) translateY(0); }
    100% { transform: scale(1.05) translateY(-20px); }
}

/* ── Cinematic Fade In ── */
@keyframes cinematicFadeIn {
    0% { opacity: 0; transform: scale(1.05); filter: blur(10px); }
    100% { opacity: 1; transform: scale(1); filter: blur(0px); }
}

/* ── Ring Pulse ── */
@keyframes ringPulse {
    0%, 100% { border-color: rgba(var(--theme-primary-rgb), 0.5); box-shadow: 0 0 15px rgba(var(--theme-primary-rgb), 0.2); }
    50% { border-color: var(--color-cinema-gold); box-shadow: 0 0 25px rgba(245, 158, 11, 0.3); }
}

/* ── Breathing Glow ── */
@keyframes breathingGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(var(--theme-primary-rgb), 0.1); }
    50% { box-shadow: 0 0 40px rgba(var(--theme-primary-rgb), 0.25); }
}

/* ── Float (for particles and cards) ── */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(0.5deg); }
    50% { transform: translateY(-4px) rotate(0deg); }
    75% { transform: translateY(-12px) rotate(-0.5deg); }
}

/* ── Pulse ── */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

/* ── Loading Dots ── */
@keyframes loadingDot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.2); opacity: 1; }
}

/* ── Aurora Background Shift ── */
@keyframes auroraShift {
    0% {
        background:
            radial-gradient(ellipse 80% 60% at 20% 10%, rgba(124, 58, 237, 0.08) 0%, transparent 60%),
            radial-gradient(ellipse 60% 80% at 80% 30%, rgba(229, 9, 20, 0.06) 0%, transparent 60%),
            radial-gradient(ellipse 70% 50% at 50% 80%, rgba(245, 166, 35, 0.05) 0%, transparent 60%);
    }
    33% {
        background:
            radial-gradient(ellipse 70% 70% at 70% 20%, rgba(229, 9, 20, 0.08) 0%, transparent 60%),
            radial-gradient(ellipse 80% 60% at 20% 60%, rgba(8, 145, 178, 0.07) 0%, transparent 60%),
            radial-gradient(ellipse 60% 50% at 80% 80%, rgba(124, 58, 237, 0.05) 0%, transparent 60%);
    }
    66% {
        background:
            radial-gradient(ellipse 60% 80% at 50% 20%, rgba(8, 145, 178, 0.08) 0%, transparent 60%),
            radial-gradient(ellipse 70% 50% at 10% 50%, rgba(124, 58, 237, 0.06) 0%, transparent 60%),
            radial-gradient(ellipse 80% 60% at 80% 70%, rgba(245, 166, 35, 0.06) 0%, transparent 60%);
    }
    100% {
        background:
            radial-gradient(ellipse 80% 60% at 30% 80%, rgba(124, 58, 237, 0.08) 0%, transparent 60%),
            radial-gradient(ellipse 60% 70% at 70% 10%, rgba(229, 9, 20, 0.07) 0%, transparent 60%),
            radial-gradient(ellipse 70% 60% at 20% 40%, rgba(8, 145, 178, 0.05) 0%, transparent 60%);
    }
}

/* ── Logo Pulse ── */
@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4)); }
    50% { filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.7)); }
}

/* ═══════════════════════════════════════════
   Utility Classes
   ═══════════════════════════════════════════ */

/* ── Shimmer ── */
.animate-shimmer {
    position: relative;
    overflow: hidden;
}

.animate-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

/* ── Float Animation ── */
.animate-float {
    animation: float 4s ease-in-out infinite;
}

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

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

/* ── Scale In ── */
.animate-scale-in {
    animation: scale-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* ── Slide Right ── */
.animate-slide-right {
    animation: slide-in-right 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ── Slide Left ── */
.animate-slide-left {
    animation: slide-in-left 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ── Pulse ── */
.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ── Spin ── */
.animate-spin {
    animation: spin 1s linear infinite;
}

/* ═══════════════════════════════════════════
   Skeleton Loader
   ═══════════════════════════════════════════ */
.skeleton-loader {
    background: var(--theme-surface-2);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.skeleton-loader::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

.skeleton-card {
    width: 200px;
    height: 300px;
    flex-shrink: 0;
    border-radius: var(--radius-lg);
}

.skeleton-text {
    height: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.skeleton-text.lg {
    height: 24px;
    width: 60%;
}

.skeleton-text.sm {
    height: 12px;
    width: 40%;
}

/* ═══════════════════════════════════════════
   Card Hover Lift
   ═══════════════════════════════════════════ */
.card-hover-lift {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.35s ease, 
                border-color 0.35s ease;
}

.card-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover), var(--glow-violet);
    border-color: var(--color-cinema-violet);
}

/* ═══════════════════════════════════════════
   Button Ripple Effect
   ═══════════════════════════════════════════ */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.btn-ripple:active::after {
    transform: scale(2);
    opacity: 1;
    transition: transform 0s, opacity 0s;
}

/* ═══════════════════════════════════════════
   Fade Animations
   ═══════════════════════════════════════════ */
.fade-in {
    animation: fadeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.fade-in-scale {
    animation: fadeInScale 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

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

/* ── Slide In ── */
.slide-in-left {
    animation: slideInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.slide-in-right {
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.slide-in-up {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* ═══════════════════════════════════════════
   Stagger Children
   ═══════════════════════════════════════════ */
.stagger-children > * {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.04s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.08s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.12s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.16s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.20s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.24s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.28s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.32s; }
.stagger-children > *:nth-child(9) { animation-delay: 0.36s; }
.stagger-children > *:nth-child(10) { animation-delay: 0.40s; }
.stagger-children > *:nth-child(11) { animation-delay: 0.44s; }
.stagger-children > *:nth-child(12) { animation-delay: 0.48s; }

/* ═══════════════════════════════════════════
   Hover Effects
   ═══════════════════════════════════════════ */
.hover-lift {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

/* ═══════════════════════════════════════════
   Intersection Observer — Reveal
   ═══════════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════
   Glow Effect
   ═══════════════════════════════════════════ */
.glow {
    position: relative;
}

.glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: var(--gradient-primary);
    opacity: 0;
    z-index: -1;
    filter: blur(15px);
    transition: opacity 0.4s ease;
}

.glow:hover::before { opacity: 0.4; }

/* ═══════════════════════════════════════════
   Cinematic Enter/Exit
   ═══════════════════════════════════════════ */
.cinematic-enter {
    animation: cinematicFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cinematicFadeOut {
    0% { opacity: 1; transform: scale(1); filter: blur(0px); }
    100% { opacity: 0; transform: scale(0.98); filter: blur(5px); }
}

.cinematic-exit {
    animation: cinematicFadeOut 0.6s ease-out forwards;
}

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

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

/* ═══════════════════════════════════════════
   Spotlight Follow (mouse light)
   ═══════════════════════════════════════════ */
.spotlight-container {
    position: relative;
    overflow: hidden;
}

.spotlight-container::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: left 0.3s ease, top 0.3s ease;
    left: var(--mouse-x, 50%);
    top: var(--mouse-y, 50%);
}

/* ═══════════════════════════════════════════
   Parallax Helper
   ═══════════════════════════════════════════ */
.parallax-layer {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* ═══════════════════════════════════════════
   Card 3D Tilt
   ═══════════════════════════════════════════ */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform;
}

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

/* ═══════════════════════════════════════════
   Quick Peek Slide
   ═══════════════════════════════════════════ */
@keyframes quickPeekSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   Neon Trace — Border light effect
   ═══════════════════════════════════════════ */
.neon-trace {
    position: relative;
}

.neon-trace::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(
        270deg,
        var(--neon-primary),
        var(--neon-cyan),
        var(--neon-pink),
        var(--neon-primary)
    );
    background-size: 400% 400%;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.neon-trace:hover::before {
    opacity: 0.6;
    animation: neonTrace 4s ease infinite;
}

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

/* ═══════════════════════════════════════════
   Hover Glow Variations
   ═══════════════════════════════════════════ */
.hover-gold:hover {
    box-shadow: var(--glow-gold);
}

.hover-crimson:hover {
    box-shadow: var(--glow-crimson);
}

.hover-violet:hover {
    box-shadow: var(--glow-violet);
}

/* ═══════════════════════════════════════════
   Loading Dots
   ═══════════════════════════════════════════ */
.loading-dots {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg) 0;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--theme-primary);
    animation: loadingDot 1.2s ease-in-out infinite;
}

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

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