/* МАКСИМАЛЬНАЯ ПЛАВНОСТЬ ДЛЯ ВСЕХ ЭЛЕМЕНТОВ */

* {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* Плавное появление страницы */
body {
    animation: fadeIn 0.6s ease-out;
}

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

/* Плавное появление контента */
.content > * {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Плавные карточки */
.card, .feature-card, .pricing-card, .subscription-card, .contact-card, 
.auth-card, .platform, .faq-item, .stat-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Плавные кнопки */
button, .button, .btn, .cta-button, .buy-button, .nav-link, a {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

button:hover, .button:hover, .btn:hover {
    transform: translateY(-3px) scale(1.02);
}

/* Плавные формы */
input, textarea, select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

input:focus, textarea:focus, select:focus {
    transform: translateY(-2px);
}

/* Плавная навигация */
.top-nav {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Плавные таблицы */
tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

tr:hover {
    transform: scale(1.01);
}

/* Плавные модальные окна */
.modal {
    transition: opacity 0.3s ease, backdrop-filter 0.3s ease !important;
}

.modal-content {
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Плавные звезды */
.star {
    animation: twinkle 3s ease-in-out infinite !important;
}

/* Плавные планеты */
.planet {
    animation: float 20s ease-in-out infinite !important;
}

/* Плавное появление элементов списка */
.features > *, .pricing-cards > *, .stats-grid > * {
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.features > *:nth-child(1) { animation-delay: 0.1s; }
.features > *:nth-child(2) { animation-delay: 0.2s; }
.features > *:nth-child(3) { animation-delay: 0.3s; }
.features > *:nth-child(4) { animation-delay: 0.4s; }
.features > *:nth-child(5) { animation-delay: 0.5s; }
.features > *:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Плавные иконки */
.icon, .feature-icon {
    animation: float 3s ease-in-out infinite !important;
}

/* Плавное изменение цвета */
a, button, .nav-link {
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Плавные тени */
.card:hover, .feature-card:hover, .pricing-card:hover {
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
}

/* Убираем резкие переходы при загрузке */
.preload * {
    transition: none !important;
}

/* Плавная загрузка изображений */
img {
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

img:hover {
    transform: scale(1.05);
}

/* Плавные бейджи */
.status-badge, .popular-badge {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Плавный футер */
footer {
    animation: fadeIn 1s ease-out 0.5s both;
}

/* Плавные уведомления */
.message, .error-message, .success-message {
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Плавное появление при скролле */
@media (prefers-reduced-motion: no-preference) {
    .fade-in-on-scroll {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .fade-in-on-scroll.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Отключаем анимации для пользователей с prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* Улучшенная анимация модального окна */
.modal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                backdrop-filter 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    transform: scale(0.7) translateY(50px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Плавное закрытие */
.modal.closing {
    opacity: 0;
}

.modal.closing .modal-content {
    transform: scale(0.7) translateY(50px);
    opacity: 0;
}
