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

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

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

@keyframes toastOut {
    to { opacity: 0; transform: translateX(40px); }
}

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

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

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(124, 58, 237, 0); }
}

.reveal { opacity: 0; }
.reveal.in { animation: fadeUp 0.7s var(--ease) forwards; }

.anim-fade { animation: fadeIn 0.6s var(--ease) both; }
.anim-scale { animation: scaleIn 0.5s var(--ease) both; }

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.4s; }

.loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--night);
    transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}

.loader-overlay.done { opacity: 0; visibility: hidden; }

.loader-ring {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--violet);
    border-right-color: var(--cyan-deep);
    animation: spin 0.9s linear infinite;
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--surface-2);
    border-radius: var(--radius);
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
    background-size: 840px 100%;
    animation: shimmer 1.4s infinite;
}

.skeleton-poster { aspect-ratio: 2 / 3; }
.skeleton-line { height: 12px; margin-top: 8px; border-radius: 6px; }
.skeleton-line.short { width: 60%; }

img.lazy { opacity: 0; transition: opacity 0.6s var(--ease); }
img.lazy.loaded { opacity: 1; }

.hover-lift { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.hover-lift:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
