@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700&family=Inter:wght@400;500;600;700&display=swap');

.smartum-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    font-family: 'Inter', sans-serif;
}

.popup-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.popup-content {
    position: relative;
    background: linear-gradient(135deg, #1e1b4b 0%, #581c87 50%, #1e3a8a 100%);
    padding: 40px 10px 40px 40px;
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    max-width: 800px;
    width: 90%;
    animation: popup-zoom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.popup-hero-wrapper {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    min-height: 400px;
}

/* Left side with image */
.popup-left-side {
    position: relative;
    flex: 0 0 auto;
    width: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Right side with text and button */
.popup-right-side {
    position: relative;
    flex: 1;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 48px;
    text-align: left;
    padding: 20px 0;
}

/* Floating background gradients - как в Hero Section */
.popup-floating-bg2 {
    position: absolute;
    top: 20%;
    right: 20%;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(248, 61, 180, 0.2) 0%, rgba(150, 38, 213, 0.2) 100%);
    border-radius: 16px;
    backdrop-filter: blur(4px);
    z-index: 1;
    animation: float-bg1 12s ease-in-out infinite;
}

.popup-floating-bg3 {
    position: absolute;
    bottom: 20%;
    left: 20%;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(4, 208, 196, 0.2) 0%, rgba(172, 248, 92, 0.2) 100%);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    z-index: 1;
    animation: float-bg2 10s ease-in-out infinite;
}

.popup-floating-bg4 {
    display: none;
}

/* Декоративные точки как в Hero Section */
.popup-dot1 {
    position: absolute;
    top: 10%;
    left: 5%;
    width: 12px;
    height: 12px;
    background: #acf85c;
    border-radius: 50%;
    z-index: 2;
    animation: dot-pulse 2s ease-in-out infinite;
}

.popup-dot2 {
    position: absolute;
    top: 20%;
    right: 10%;
    width: 8px;
    height: 8px;
    background: #f83db4;
    border-radius: 50%;
    z-index: 2;
    animation: dot-bounce 3s ease-in-out infinite;
}

.popup-dot3 {
    position: absolute;
    bottom: 20%;
    left: 10%;
    width: 16px;
    height: 16px;
    background: #04d0c4;
    border-radius: 50%;
    z-index: 2;
    animation: dot-ping 2.5s ease-in-out infinite;
}

.popup-dot4 {
    position: absolute;
    top: 30%;
    left: 30%;
    width: 8px;
    height: 8px;
    background: #fc7f02;
    border-radius: 50%;
    z-index: 2;
    animation: dot-pulse 2.2s ease-in-out infinite;
}

@keyframes float-bg1 {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg);
    }
    50% { 
        transform: translate(10px, -10px) rotate(5deg);
    }
}

@keyframes float-bg2 {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
    }
    50% { 
        transform: translate(-10px, 10px) scale(1.1);
    }
}

@keyframes dot-pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.5;
        transform: scale(1.2);
    }
}

@keyframes dot-bounce {
    0%, 100% { 
        transform: translateY(0);
    }
    50% { 
        transform: translateY(-10px);
    }
}

@keyframes dot-ping {
    0% { 
        transform: scale(1);
        opacity: 1;
    }
    50%, 100% { 
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Image container */
.popup-image-container {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 300px;
}

.popup-main-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.3));
    border-radius: 24px;
}

.popup-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #acf85c;
    color: #192139;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(172, 248, 92, 0.4);
    z-index: 30;
}

/* Floating icons - positioned relative to left side */
.popup-left-side .popup-floating-icon1 {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #04d0c4 0%, #06b6d4 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(4, 208, 196, 0.5);
    z-index: 25;
    font-size: 22px;
}

.popup-left-side .popup-floating-icon2 {
    position: absolute;
    top: 20px;
    right: -30px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #fbbf24 0%, #acf85c 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.5);
    z-index: 25;
    font-size: 18px;
}

.popup-left-side .popup-floating-icon3 {
    position: absolute;
    bottom: -10px;
    left: -25px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #f83db4 0%, #ec4899 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(248, 61, 180, 0.5);
    z-index: 25;
    color: white;
}

.popup-floating-icon3 svg {
    width: 24px;
    height: 24px;
}

/* Text wrapper */
.popup-text-wrapper {
    position: relative;
    z-index: 20;
}

.popup-title {
    font-family: 'Poppins', sans-serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.popup-title-gradient {
    background: linear-gradient(90deg, #f83db4 0%, #fc7f02 50%, #9626d5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
    display: inline-block;
}

.popup-title-white {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: inline-block;
}

.popup-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin: 12px 0 0 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

/* Button wrapper */
.popup-button-wrapper {
    position: relative;
    z-index: 20;
}

.popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 40px;
    background: linear-gradient(135deg, #fbbf24 0%, #fc7f02 50%, #f83db4 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.5), 0 4px 12px rgba(248, 61, 180, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.popup-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.popup-btn:hover::before {
    left: 100%;
}

.popup-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(251, 191, 36, 0.6), 0 8px 16px rgba(248, 61, 180, 0.4);
    background: linear-gradient(135deg, #f83db4 0%, #fc7f02 50%, #fbbf24 100%);
    color: #fff;
    text-decoration: none;
}

.popup-btn-icon {
    width: 24px;
    height: 24px;
}

.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Floating animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-7.46859px) rotate(1.86715deg); }
    50% { transform: translateY(-15px) rotate(0deg); }
    75% { transform: translateY(-5px) rotate(-1deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) scale(1); }
    33% { transform: translateY(9.2167px) scale(1.06144); }
    66% { transform: translateY(-5px) scale(0.98); }
}

@keyframes floatIcon1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-17.7495px) rotate(218.295deg); }
    50% { transform: translateY(-10px) rotate(0deg); }
    75% { transform: translateY(-5px) rotate(-10deg); }
}

@keyframes floatIcon2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(0.162078px) rotate(-291.06deg); }
    50% { transform: translateY(5px) rotate(0deg); }
    75% { transform: translateY(-2px) rotate(10deg); }
}

@keyframes floatIcon3 {
    0%, 100% { transform: translateX(0px) rotate(0deg); }
    25% { transform: translateX(7.8762px) rotate(277.272deg); }
    50% { transform: translateX(-5px) rotate(0deg); }
    75% { transform: translateX(2px) rotate(-5deg); }
}

.floating-bg1 {
    animation: float 12s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.floating-bg2 {
    animation: float2 10s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.floating-icon1 {
    animation: floatIcon1 8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.floating-icon2 {
    animation: floatIcon2 9s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.floating-icon3 {
    animation: floatIcon3 7s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes popup-zoom {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .popup-content {
        padding: 24px 16px;
        max-width: 420px;
        width: 90%;
        border-radius: 16px;
    }
    
    .popup-hero-wrapper {
        flex-direction: column;
        gap: 24px;
        min-height: auto;
    }
    
    .popup-left-side {
        width: 100%;
        order: 1;
    }
    
    .popup-right-side {
        text-align: center;
        width: 100%;
        gap: 20px;
        order: 2;
        padding: 0;
    }
    
    .popup-image-container {
        max-width: 240px;
        margin: 0 auto;
    }
    
    .popup-main-image {
        max-width: 100%;
        width: 100%;
        border-radius: 16px;
    }
    
    .popup-badge {
        top: 12px;
        left: 12px;
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 20px;
    }
    
    .popup-title {
        font-size: 24px;
        line-height: 1.3;
    }
    
    .popup-subtitle {
        font-size: 12px;
        margin-top: 8px;
    }
    
    .popup-btn {
        padding: 12px 32px;
        font-size: 16px;
        width: 100%;
        max-width: 280px;
        border-radius: 16px;
    }
    
    .popup-btn-icon {
        width: 20px;
        height: 20px;
    }
    
    .popup-left-side .popup-floating-icon1 {
        width: 40px;
        height: 40px;
        top: -15px;
        left: -15px;
        font-size: 18px;
    }
    
    .popup-left-side .popup-floating-icon2 {
        width: 36px;
        height: 36px;
        top: 10px;
        right: -20px;
        font-size: 14px;
    }
    
    .popup-left-side .popup-floating-icon3 {
        width: 32px;
        height: 32px;
        bottom: -12px;
        left: -15px;
    }
    
    .popup-left-side .popup-floating-icon3 svg {
        width: 16px;
        height: 16px;
    }
    
    .popup-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    /* Скрываем декоративные элементы на мобильных */
    .popup-dot1,
    .popup-dot2,
    .popup-dot3,
    .popup-dot4 {
        display: none;
    }
    
    .popup-floating-bg2,
    .popup-floating-bg3 {
        opacity: 0.5;
    }
}

/* Дополнительная адаптация для очень маленьких экранов */
@media (max-width: 480px) {
    .popup-content {
        padding: 20px 12px;
        max-width: 420px;
        width: 92%;
        border-radius: 12px;
    }
    
    .popup-hero-wrapper {
        gap: 20px;
    }
    
    .popup-image-container {
        max-width: 200px;
    }
    
    .popup-title {
        font-size: 20px;
        line-height: 1.25;
    }
    
    .popup-subtitle {
        font-size: 11px;
        margin-top: 6px;
    }
    
    .popup-btn {
        padding: 10px 24px;
        font-size: 15px;
        max-width: 100%;
        border-radius: 12px;
    }
    
    .popup-badge {
        top: 8px;
        left: 8px;
        padding: 5px 10px;
        font-size: 11px;
        border-radius: 16px;
    }
    
    .popup-main-image {
        border-radius: 12px;
    }
    
    .popup-left-side .popup-floating-icon1 {
        width: 36px;
        height: 36px;
        top: -12px;
        left: -12px;
        font-size: 16px;
    }
    
    .popup-left-side .popup-floating-icon2 {
        width: 32px;
        height: 32px;
        top: 8px;
        right: -16px;
        font-size: 12px;
    }
    
    .popup-left-side .popup-floating-icon3 {
        width: 28px;
        height: 28px;
        bottom: -10px;
        left: -12px;
    }
    
    .popup-left-side .popup-floating-icon3 svg {
        width: 14px;
        height: 14px;
    }
}
