/* ========== УЛУЧШЕННЫЕ АНИМАЦИИ ДЛЯ ОКНА ОБМЕНА (ЧЕРНО-БЕЛЫЙ МИНИМАЛИЗМ) ========== */

/* --- Зоны обмена с улучшенными эффектами --- */
.exchange-zone {
    background: #ffffff;
    border: 2px solid #f0f0f0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.exchange-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, #e0e0e0 0%, #f0f0f0 50%, #e8e8e8 100%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: all 0.4s ease;
}

.exchange-zone:hover::before {
    background: linear-gradient(135deg, #333333 0%, #555555 50%, #333333 100%);
}

.exchange-zone.active::before {
    background: linear-gradient(135deg, #000000 0%, #333333 50%, #000000 100%);
}

/* --- Мягкое свечение при наведении --- */
.exchange-zone:hover {
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.exchange-zone.active {
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.12),
        0 6px 16px rgba(0, 0, 0, 0.06);
}

/* --- Анимированные декоративные элементы --- */
.exchange-zone::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(0, 0, 0, 0.02) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.exchange-zone:hover::after {
    opacity: 1;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 1; }
}

/* --- Улучшенные карточки валют --- */
.currency-card {
    background: #fafafa;
    border: 2px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.currency-card:hover {
    background: #ffffff;
    border-color: #000000;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.1),
        0 4px 10px rgba(0, 0, 0, 0.05);
}

.currency-card.selected {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --- Иконки валют с эффектами --- */
.card-icon {
    position: relative;
    transition: transform 0.3s ease;
}

.currency-card:hover .card-icon {
    transform: scale(1.15) rotate(-5deg);
}

.currency-card.selected .card-icon {
    transform: scale(1.1);
}

.card-icon .currency-icon-img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.currency-card:hover .card-icon .currency-icon-img {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* --- Кнопка реверса с эффектами --- */
.exchange-reverse {
    background: #000000;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.exchange-reverse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.exchange-reverse:hover::before {
    width: 120%;
    height: 120%;
}

.exchange-reverse:hover {
    background: #333333;
    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.25),
        0 6px 16px rgba(0, 0, 0, 0.15);
}

.exchange-reverse:active {
    transform: scale(0.95) rotate(180deg) !important;
}

/* --- Поля ввода суммы с эффектами --- */
.zone-input {
    background: #f5f5f5;
    border: 2px solid transparent;
    position: relative;
    transition: all 0.3s ease;
}

.zone-input:hover {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.zone-input:focus {
    background: #ffffff;
    border-color: #000000;
    box-shadow:
        0 0 0 4px rgba(0, 0, 0, 0.08),
        0 4px 15px rgba(0, 0, 0, 0.05);
}

/* --- Кнопка "Продолжить" с эффектами --- */
.continue-button {
    background: #000000;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.continue-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transition: left 0.5s ease;
}

.continue-button:hover:not(:disabled)::before {
    left: 100%;
}

.continue-button:hover:not(:disabled) {
    background: #1a1a1a;
    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.25),
        0 6px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.continue-button:active:not(:disabled) {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.2),
        0 3px 10px rgba(0, 0, 0, 0.1);
}

/* --- Анимация появления элементов --- */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.exchange-container {
    animation: fadeInScale 0.6s ease-out;
}

.from-zone {
    animation: slideInFromLeft 0.5s ease-out 0.1s both;
}

.to-zone {
    animation: slideInFromRight 0.5s ease-out 0.2s both;
}

.exchange-reverse {
    animation: bounceIn 0.6s ease-out 0.3s both;
}



/* --- Плавающие декоративные элементы в hero --- */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    pointer-events: none;
}

.hero::before {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.03) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: floatBubble 8s ease-in-out infinite;
}

.hero::after {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.02) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation: floatBubble 10s ease-in-out infinite reverse;
}

@keyframes floatBubble {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-10px, -50px) scale(1.1);
    }
    75% {
        transform: translate(-30px, -20px) scale(1.05);
    }
}

/* --- Улучшенный курс обмена --- */
.exchange-rate-display {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    position: relative;
    overflow: hidden;
}

.exchange-rate-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #000000;
}

.rate-line {
    background: #000000;
    height: 2px;
    border-radius: 1px;
}

/* --- Поле поиска с эффектами --- */
.zone-search {
    transition: all 0.3s ease;
}

.zone-search:hover {
    border-color: #999999;
    background: #ffffff;
}

.zone-search:focus {
    border-color: #000000;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* --- Кнопки карусели с эффектами --- */
.carousel-btn {
    background: #ffffff;
    border: 2px solid #e8e8e8;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: #000000;
    border-color: #000000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.carousel-btn:hover svg {
    color: #ffffff;
}

/* --- Чекбокс условий с эффектами --- */
.terms-checkbox-label {
    background: #f8f8f8;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.terms-checkbox-label:hover {
    background: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.terms-checkbox-input:checked + .terms-checkbox-text {
    color: #000000;
    font-weight: 500;
}

/* --- Feature карточки с улучшениями --- */
.features {
    perspective: 1000px;
}

.feature-card {
    transform-style: preserve-3d;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px) rotateX(3deg);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.1),
        0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: #cccccc;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    display: inline-block;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 50%;
    margin-bottom: 20px;
    transition: all 0.4s ease;
}

@media (min-width: 769px) {
    .feature-card:hover .feature-icon {
        transform: scale(1.2) rotate(10deg);
        background: #000000;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

    .feature-card:hover .feature-icon > * {
        filter: invert(1);
    }
}

.feature-title {
    color: #000000;
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}

/* --- Лимиты обмена --- */
.exchange-limits {
    background: #fafafa;
    border-radius: 12px;
    padding: 12px 20px;
    margin-top: 16px;
    border: 1px solid #e8e8e8;
    animation: fadeInScale 0.3s ease-out;
}

.limits-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.limits-label {
    color: #666;
    font-size: 13px;
}

.limits-values {
    font-weight: 600;
    color: #000000;
    font-size: 14px;
}

/* --- Улучшенный заголовок hero --- */
.hero-subtitle {
    position: relative;
    display: inline-block;
}

.hero-subtitle::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: #000000;
    border-radius: 1px;
    animation: subtitleLine 2s ease-in-out infinite;
}

@keyframes subtitleLine {
    0%, 100% { width: 60px; opacity: 1; }
    50% { width: 100px; opacity: 0.5; }
}

/* --- Адаптив для анимаций --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .hero::before,
    .hero::after {
        display: none;
    }

    .exchange-zone:hover {
        transform: none;
    }

    .feature-card:hover {
        transform: translateY(-5px);
    }
}
