/* animation.css - Анимации для Vaultly */

/* Splash Screen Анимации */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

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

@keyframes loading {
    0% { width: 0%; }
    20% { width: 20%; }
    50% { width: 60%; }
    80% { width: 80%; }
    100% { width: 100%; }
}

@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 slideInLeft {
    from { 
        opacity: 0; 
        transform: translateX(-50px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

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

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

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

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

/* Классы анимаций */
.animate-fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.5s ease forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease forwards;
}

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

.animate-rotate-in {
    animation: rotateIn 0.6s ease forwards;
}

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

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

/* Задержки */
.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 анимации для карточек */
.note-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.note-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 10px 30px rgba(255, 179, 71, 0.15);
}

.note-card:active {
    transform: scale(0.98);
}

/* Анимация для кнопок */
.menu-toggle, .submit-btn, .attach-btn, .edit-note, .delete-note {
    transition: transform 0.2s ease, background 0.2s ease;
}

.menu-toggle:active, .submit-btn:active, .attach-btn:active {
    transform: scale(0.92);
}

.edit-note:hover, .delete-note:hover {
    transform: scale(1.05);
}

/* Анимация появления заметок при загрузке */
.note-card {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.note-card:nth-child(1) { animation-delay: 0.05s; }
.note-card:nth-child(2) { animation-delay: 0.1s; }
.note-card:nth-child(3) { animation-delay: 0.15s; }
.note-card:nth-child(4) { animation-delay: 0.2s; }
.note-card:nth-child(5) { animation-delay: 0.25s; }
.note-card:nth-child(6) { animation-delay: 0.3s; }
.note-card:nth-child(7) { animation-delay: 0.35s; }
.note-card:nth-child(8) { animation-delay: 0.4s; }
.note-card:nth-child(9) { animation-delay: 0.45s; }
.note-card:nth-child(10) { animation-delay: 0.5s; }

/* Анимация для модального окна */
.modal.active .modal-content {
    animation: scaleIn 0.3s ease forwards;
}

/* Анимация для меню */
.side-menu.open {
    animation: slideInRight 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}

/* Анимация для превью вложений */
.attach-preview-item {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

.attach-preview-item:nth-child(1) { animation-delay: 0.05s; }
.attach-preview-item:nth-child(2) { animation-delay: 0.1s; }
.attach-preview-item:nth-child(3) { animation-delay: 0.15s; }

/* Shimmer эффект для загрузки */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Анимация для иконок */
.logo-icon {
    animation: float 3s ease-in-out infinite;
}

/* Анимация для логотипа при загрузке */
.splash-icon {
    animation: float 3s ease-in-out infinite, pulse 2s ease-in-out infinite;
}