/* Анимации для сайта */

/* Глобальное свечение сверху страницы */
body::before {
    content: '';
    position: fixed;
    top: -15vh;
    left: 50%;
    transform: translateX(-50%);
    width: 120vw;
    height: 80vh;
    background: radial-gradient(
        ellipse at 50% 0%,
        color-mix(in srgb, var(--glow-color), transparent 70%) 0%,
        color-mix(in srgb, var(--glow-color), transparent 80%) 15%,
        color-mix(in srgb, var(--glow-color), transparent 85%) 30%,
        color-mix(in srgb, var(--glow-color), transparent 92%) 45%,
        color-mix(in srgb, var(--glow-color), transparent 97%) 60%,
        color-mix(in srgb, var(--glow-color), transparent 99%) 75%,
        transparent 100%
    );
    z-index: -1;
    pointer-events: none;
    filter: blur(120px);
    opacity: 0.8;
    transform-origin: center top;
}

/* Базовые анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    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 bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(var(--main-color-rgb), 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(var(--main-color-rgb), 0.6);
    }
}

@keyframes glow-red {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 71, 87, 0.5),
                    0 0 20px rgba(255, 71, 87, 0.3),
                    0 0 30px rgba(255, 71, 87, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 71, 87, 0.8),
                    0 0 40px rgba(255, 71, 87, 0.6),
                    0 0 60px rgba(255, 71, 87, 0.4),
                    0 0 80px rgba(255, 71, 87, 0.2);
    }
}

@keyframes glow-red-strong {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 71, 87, 0.9),
                    0 0 40px rgba(255, 71, 87, 0.7),
                    0 0 60px rgba(255, 71, 87, 0.5),
                    0 0 80px rgba(255, 71, 87, 0.4),
                    0 0 100px rgba(255, 71, 87, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 71, 87, 1),
                    0 0 60px rgba(255, 71, 87, 0.9),
                    0 0 90px rgba(255, 71, 87, 0.7),
                    0 0 120px rgba(255, 71, 87, 0.5),
                    0 0 150px rgba(255, 71, 87, 0.3);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Классы анимаций */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-slide-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-right {
    animation: slideInRight 0.8s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out;
}

.animate-bounce-in {
    animation: bounceIn 0.8s ease-out;
}

.animate-slide-up {
    animation: slideInUp 0.8s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-glow {
    animation: glow 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-rotate {
    animation: rotate 2s linear infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200px 100%;
    animation: shimmer 2s infinite;
}



/* Задержки анимаций */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }

/* Анимации для конкретных элементов */

/* Header анимации */
header {
    /* Убираем анимацию slideInUp */
}

header .logo {
    /* Убираем анимацию slideInLeft */
}

header ul li {
    /* Убираем анимацию fadeIn */
}

header ul li:nth-child(1) { /* Убираем задержку */ }
header ul li:nth-child(2) { /* Убираем задержку */ }
header ul li:nth-child(3) { /* Убираем задержку */ }
header ul li:nth-child(4) { /* Убираем задержку */ }

header .header-actions {
    /* Убираем анимацию slideInRight */
}

/* Главная секция */
.main-sect .text h1 {
    /* Убираем анимацию bounceIn */
}

.main-sect .text h2 {
    /* Убираем анимацию fadeIn */
}

.main-sect .text p {
    /* Убираем анимацию fadeIn */
}

.main-sect .image {
    /* Убираем анимацию slideInRight */
}

.main-sect .image img {
    /* Убираем плавающую анимацию */
}

/* Социальные кнопки */
.social button {
    /* Убираем анимацию scaleIn */
    transition: all 0.3s ease;
}

.social button:hover {
    animation: pulse 0.6s ease-out;
    transform: scale(1.1);
}

/* Секция преимуществ */
.pluses .text h1 {
    /* Убираем анимацию fadeIn */
}

.pluses .boxes .box {
    /* Убираем анимацию slideInUp */
}

.pluses .boxes .box:nth-child(1) { /* Убираем задержку */ }
.pluses .boxes .box:nth-child(2) { /* Убираем задержку */ }
.pluses .boxes .box:nth-child(3) { /* Убираем задержку */ }
.pluses .boxes .box:nth-child(4) { /* Убираем задержку */ }

.pluses .boxes .box:hover {
    animation: pulse 0.6s ease-out;
}

/* Секция отзывов */
.reviews .text h1 {
    /* Убираем анимацию fadeIn */
}

.reviews .boxes .box {
    /* Убираем анимацию scaleIn */
}

.reviews .boxes .box:nth-child(1) { /* Убираем задержку */ }
.reviews .boxes .box:nth-child(2) { /* Убираем задержку */ }
.reviews .boxes .box:nth-child(3) { /* Убираем задержку */ }

/* Секция цен */
.pricing .boxes .box {
    /* Убираем анимацию slideInUp */
}

.pricing .boxes .box:nth-child(1) { /* Убираем задержку */ }
.pricing .boxes .box:nth-child(2) { /* Убираем задержку */ }
.pricing .boxes .box:nth-child(3) { /* Убираем задержку */ }

.pricing .purchase-btn {
    transition: all 0.3s ease;
}

.pricing .purchase-btn:hover {
    animation: glow 1s infinite;
}

/* Формы */
.signup-section {
    /* Убираем анимацию fadeIn */
}

.form-header h1 {
    /* Убираем анимацию slideInUp */
}

.input-group {
    /* Убираем анимацию slideInUp */
}

.input-group:nth-child(1) { /* Убираем задержку */ }
.input-group:nth-child(2) { /* Убираем задержку */ }
.input-group:nth-child(3) { /* Убираем задержку */ }
.input-group:nth-child(4) { /* Убираем задержку */ }

.submit-btn {
    /* Убираем анимацию scaleIn */
    transition: all 0.3s ease;
}

.submit-btn:hover {
    animation: pulse 0.6s ease-out;
    transform: scale(1.05);
}

/* Профиль */
.profile-card {
    /* Убираем анимацию bounceIn */
}

.profile-avatar img {
    /* Убираем летающую анимацию */
}

.private-card {
    /* Убираем анимацию slideInUp */
}

/* Продукты */
.shop-card {
    /* Убираем анимацию scaleIn */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shop-card:hover {
}

.shop-button {
    transition: all 0.3s ease;
}

.shop-button:hover {
    animation: glow 1s infinite;
}

/* Кнопки */
.button {
    transition: all 0.3s ease;
}

.button:hover {
    animation: glow 1s infinite;
}

.button.lang {
    transition: all 0.3s ease;
}

.button.lang:hover {
    animation: pulse 0.6s ease-out;
}

/* Footer */
.footer {
    /* Убираем анимацию slideInUp */
}

.footer-section {
    /* Убираем анимацию fadeIn */
}

.footer-section:nth-child(1) { /* Убираем задержку */ }
.footer-section:nth-child(2) { /* Убираем задержку */ }
.footer-section:nth-child(3) { /* Убираем задержку */ }
.footer-section:nth-child(4) { /* Убираем задержку */ }
.footer-section:nth-child(5) { /* Убираем задержку */ }

/* Анимации при скролле */
.scroll-animate {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s ease-out;
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Анимации для мобильных устройств */
@media (max-width: 768px) {
    .animate-float {
        animation: none;
    }
    
    .animate-rotate {
        animation: none;
    }
}

/* Анимации загрузки */
.loading {
    animation: rotate 1s linear infinite;
}

/* Анимации для модальных окон */
.modal {
    animation: scaleIn 0.3s ease-out;
}

/* Анимации для уведомлений */
.notification {
    animation: slideInRight 0.5s ease-out;
}

/* Анимации для карточек */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Анимации для изображений */
img {
    transition: all 0.3s ease;
}

img:hover {
    transform: scale(1.05);
}

/* Анимации для ссылок */
a {
    transition: all 0.3s ease;
}

a:hover {
}

/* Анимации для иконок */
.icon {
    transition: all 0.3s ease;
}

.icon:hover {
    animation: pulse 0.6s ease-out;
}

/* Анимации для полей ввода */
input, textarea, select {
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    animation: glow 1s infinite;
    transform: scale(1.02);
}

/* Анимации для чекбоксов */
input[type="checkbox"] {
    transition: all 0.3s ease;
}

input[type="checkbox"]:checked {
    animation: scaleIn 0.3s ease-out;
}

/* Анимации для кнопок загрузки */
.btn-loading {
    font-family: 'medium', sans-serif;
}

.btn-loading .loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: rotate 1s linear infinite;
    margin-right: 8px;
}

/* Анимации для прогресс-баров */
.progress-bar {
    animation: slideInLeft 1s ease-out;
}

/* Анимации для алертов */
.alert {
    animation: slideInUp 0.5s ease-out;
}

/* Анимации для табов */
.tab {
    transition: all 0.3s ease;
}

.tab.active {
    animation: glow 1s infinite;
}

/* Анимации для дропдаунов */
.dropdown {
    animation: slideInUp 0.3s ease-out;
}

/* Анимации для тултипов */
.tooltip {
    animation: fadeIn 0.3s ease-out;
}

/* Анимации для карусели */
.carousel-item {
    animation: slideInRight 0.5s ease-out;
}

/* Анимации для кнопок SweetAlert2 */
.swal2-confirm {
    transition: all 0.3s ease !important;
    border-radius: 12px !important;
}

.swal2-confirm:hover {
}

/* Красная кнопка выхода в SweetAlert2 */
.swal2-confirm[style*="var(--main-color)"],
.swal2-confirm[style*="#d33"],
.swal2-confirm[style*="rgb(255, 71, 87)"],
.swal2-confirm[style*="rgb(221, 51, 51)"] {
    animation: glow-red 1.5s ease-in-out infinite !important;
}

.swal2-confirm[style*="var(--main-color)"]:hover,
.swal2-confirm[style*="#d33"]:hover,
.swal2-confirm[style*="rgb(255, 71, 87)"]:hover,
.swal2-confirm[style*="rgb(221, 51, 51)"]:hover {
    animation: glow-red 1.5s ease-in-out infinite !important;
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.4) !important;
}

.swal2-cancel {
    transition: all 0.3s ease !important;
    border-radius: 12px !important;
}

.swal2-cancel:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Анимации для галереи */
.gallery-item {
    animation: scaleIn 0.6s ease-out;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.1);
    z-index: 10;
}

/* Улучшенные анимации для галереи слайдера */
.gallery-slide {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(100%);
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.gallery-slide.active {
    transform: translateX(0);
    opacity: 1;
    position: relative;
}

.gallery-slide.prev {
    transform: translateX(-100%);
    opacity: 0;
}

.gallery-slide.next {
    transform: translateX(100%);
    opacity: 0;
}

/* Анимация для изображений в галерее */
.gallery-image {
    overflow: hidden;
    border-radius: 15px;
    position: relative;
}

.gallery-image img {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.1);
}

.gallery-slide.active .gallery-image img {
    transform: scale(1);
}

/* Анимация для описания слайда */
.slide-description {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(30px);
    opacity: 0;
}

.gallery-slide.active .slide-description {
    transform: translateY(0);
    opacity: 1;
}

/* Анимация для кнопок навигации */
.gallery-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.gallery-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.gallery-btn:hover::before {
    left: 100%;
}

.gallery-btn:active {
    transform: scale(0.95);
}

/* Анимация для точек навигации */
.dot {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--main-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.dot.active::before {
    width: 100%;
    height: 100%;
}

.dot:hover {
    transform: scale(1.3);
}

/* Анимация загрузки изображений */
.gallery-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.gallery-slide.active .gallery-image::after {
    transform: translateX(100%);
}

/* Анимация для контейнера галереи */
.gallery-container {
    transition: all 0.3s ease;
    position: relative;
}

.gallery-container:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Анимация для заголовка галереи */
.gallery .text h1 {
    transition: all 0.6s ease;
    position: relative;
}

.gallery .text h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--main-color);
    transform: translateX(-50%);
    transition: width 0.6s ease;
}

.gallery:hover .text h1::after {
    width: 100px;
}

/* Анимации для счетчиков */
.counter {
    animation: bounceIn 1s ease-out;
}

/* Анимации для временных шкал */
.timeline-item {
    animation: slideInLeft 0.8s ease-out;
}

/* Анимации для аккордеонов */
.accordion-item {
    animation: slideInUp 0.5s ease-out;
}

/* Анимации для слайдеров */
.slider {
    animation: fadeIn 0.8s ease-out;
}

/* Анимации для карт */
.map {
    animation: scaleIn 0.8s ease-out;
}

/* Анимации для чатов */
.chat-message {
    animation: slideInLeft 0.5s ease-out;
}

.chat-message.own {
    animation: slideInRight 0.5s ease-out;
}

/* Анимации для уведомлений */
.notification-badge {
    animation: pulse 2s infinite;
}

/* Анимации для загрузки страницы */
.page-loading {
    animation: fadeIn 0.5s ease-out;
}

/* Анимации для ошибок */
.error {
    animation: shake 0.5s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Дополнительные анимации для галереи */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideOutToLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}



/* Анимации для успеха */
.success {
    animation: bounceIn 0.8s ease-out;
}

/* Анимации для предупреждений */
.warning {
    animation: pulse 1s ease-out;
}

/* Анимации для информации */
.info {
    animation: slideInUp 0.5s ease-out;
}

/* Стили для кнопки выхода в SweetAlert2 - в стиле сайта */
.swal2-popup .swal2-confirm.swal2-confirm-red,
.swal2-popup .swal2-confirm[data-logout-btn="true"] {
    background: var(--button-back, rgba(16, 16, 16, 0.85)) !important;
    background-color: var(--button-back, rgba(16, 16, 16, 0.85)) !important;
    border: 1px solid rgba(255, 71, 87, 0.3) !important;
    color: rgba(255, 71, 87, 0.9) !important;
    transition: all 0.3s ease !important;
    border-radius: 12px !important;
    font-family: 'medium', sans-serif !important;
}

:root[data-theme="light"] .swal2-popup .swal2-confirm.swal2-confirm-red,
:root[data-theme="light"] .swal2-popup .swal2-confirm[data-logout-btn="true"] {
    background: rgba(255, 255, 255, 0.9) !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(255, 71, 87, 0.4) !important;
    color: rgba(255, 71, 87, 0.95) !important;
}

.swal2-popup .swal2-confirm.swal2-confirm-red:hover,
.swal2-popup .swal2-confirm[data-logout-btn="true"]:hover {
    background-color: var(--main-color) !important;
    border-color: var(--main-color) !important;
    color: #ffffff !important;
    animation: glow-red-strong 1s ease-in-out infinite !important;
    box-shadow: 0 4px 30px rgba(255, 71, 87, 0.8) !important;
} 

@keyframes logoutFadeOut {
    from { opacity: 1; transform: translateY(0); filter: blur(0); }
    to { opacity: 0; transform: translateY(-10px); filter: blur(2px); }
}

@keyframes logoutOverlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes logoutSpinner {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body.logout-animating header,
body.logout-animating main,
body.logout-animating footer {
    animation: logoutFadeOut 0.6s ease forwards;
}

body.logout-animating {
    overflow: hidden;
}

body.logout-animating > :not(.logout-overlay) {
    animation: logoutFadeOut 0.6s ease forwards;
}

.logout-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 9999;
    pointer-events: none;
}

.logout-overlay.show {
    animation: logoutOverlayFadeIn 0.25s ease forwards;
}

body.logout-animating .logout-overlay {
    pointer-events: all;
}

.logout-spinner {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.85);
    animation: logoutSpinner 0.8s linear infinite;
}



