/* =====================================================
   FREEWORKDZ v2.0 - ANIMATIONS
   ===================================================== */

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

/* Fade In Up */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Fade In Down */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* Slide In Left */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

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

/* Shake (for errors) */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

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

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

/* Skeleton shimmer */
@keyframes shimmer {
    from { background-position: -200% 0; }
    to   { background-position: 200% 0; }
}

/* --- UTILITY CLASSES --- */
.animate-fade-in    { animation: fadeIn 0.4s ease forwards; }
.animate-fade-in-up { animation: fadeInUp 0.5s ease forwards; }
.animate-scale-in   { animation: scaleIn 0.3s ease forwards; }
.animate-shake      { animation: shake 0.4s ease; }
.animate-float      { animation: float 3s ease-in-out infinite; }
.animate-pulse      { animation: pulse 2s ease-in-out infinite; }

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }

/* --- SKELETON LOADING --- */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}
.skeleton-text   { height: 1rem; margin-bottom: 0.5rem; }
.skeleton-title  { height: 1.5rem; width: 60%; margin-bottom: 1rem; }
.skeleton-avatar { width: 60px; height: 60px; border-radius: 50%; }
.skeleton-img    { width: 100%; height: 200px; }

/* --- TRANSITIONS --- */
.transition-all    { transition: all 0.3s ease; }
.transition-colors { transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.transition-shadow { transition: box-shadow 0.3s ease; }
.transition-transform { transition: transform 0.3s ease; }

/* --- HOVER EFFECTS --- */
.hover-lift:hover    { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.hover-scale:hover   { transform: scale(1.02); }
.hover-bright:hover  { filter: brightness(1.05); }

/* --- PAGE TRANSITIONS --- */
.page-enter {
    animation: fadeInUp 0.4s ease forwards;
}

/* --- NOTIFICATION TOAST --- */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.toast {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-4) var(--spacing-5);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    min-width: 300px;
    animation: slideInLeft 0.3s ease;
    font-size: 0.95rem;
}
.toast-success { border-left-color: var(--success); }
.toast-danger  { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }

/* Reduce animations for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
