/* Exit Intent Popup - NeuroBack Style */
.exit-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.exit-popup-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.exit-popup-overlay.visible {
    opacity: 1;
}

.exit-popup {
    background: #0f1b2e;
    border: 1px solid #1e3a5f;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    padding: 3rem;
    position: relative;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(33, 150, 243, 0.2);
}

.exit-popup-overlay.visible .exit-popup {
    transform: scale(1) translateY(0);
}

/* Свечение вокруг попапа */
.exit-popup::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background: radial-gradient(circle at center, rgba(33, 150, 243, 0.1) 0%, transparent 70%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.exit-popup-overlay.visible .exit-popup::before {
    opacity: 1;
}

.close-popup {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-popup:hover {
    background: rgba(33, 150, 243, 0.1);
    border-color: #2196f3;
    transform: rotate(90deg);
}

.close-popup::before,
.close-popup::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background: #94a3b8;
    border-radius: 2px;
    transition: background 0.3s ease;
}

.close-popup:hover::before,
.close-popup:hover::after {
    background: #2196f3;
}

.close-popup::before {
    transform: rotate(45deg);
}

.close-popup::after {
    transform: rotate(-45deg);
}

.popup-emoji {
    font-size: 4em;
    text-align: center;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.popup-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    color: #ffffff;
    line-height: 1.2;
}

.popup-title .gradient-text {
    background: linear-gradient(135deg, #2196f3, #00bcd4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.popup-description {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.discount-code {
    background: linear-gradient(135deg, #2196f3, #00bcd4);
    color: #ffffff;
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 2rem;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.3);
}

.discount-code:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(33, 150, 243, 0.5);
}

.discount-code::after {
    content: '📋 Нажмите, чтобы скопировать';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #64b5f6;
    font-weight: 400;
    letter-spacing: normal;
    opacity: 0.8;
}

.popup-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popup-input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #1e3a5f;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.popup-input::placeholder {
    color: #94a3b8;
}

.popup-input:focus {
    outline: none;
    border-color: #2196f3;
    background: rgba(255, 255, 255, 0.08);
}

.popup-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #2196f3, #00bcd4);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.4);
}

.popup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(33, 150, 243, 0.6);
}

.popup-button-icon {
    transition: transform 0.3s ease;
}

.popup-button:hover .popup-button-icon {
    transform: translateX(4px);
}

.popup-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #94a3b8;
    opacity: 0.8;
}

/* Уведомление о копировании */
.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #0f1b2e;
    border: 1px solid #34a853;
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 10001;
}

.copy-notification.show {
    transform: translateX(0);
}

.copy-notification-icon {
    color: #34a853;
    margin-right: 0.5rem;
}

/* Анимация успеха */
.popup-success {
    text-align: center;
    padding: 2rem;
}

.popup-success .popup-emoji {
    color: #34a853;
    margin-bottom: 1rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .exit-popup {
        padding: 2rem;
        margin: 1rem;
    }

    .popup-title {
        font-size: 1.5rem;
    }

    .popup-description {
        font-size: 1rem;
    }

    .discount-code {
        font-size: 1.5rem;
        padding: 1rem;
    }

    .discount-code::after {
        font-size: 0.75rem;
    }

    .copy-notification {
        left: 20px;
        right: 20px;
        transform: translateY(-100px);
    }
    
    .copy-notification.show {
        transform: translateY(0);
    }
}