* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f3f4f6; /* светлый нейтральный фон без градиента */
    padding: 20px;
}


/* Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

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

/* Popup Container */
.popup {
    background: #ffffff;
    border: 2px solid #4A90E2;
    border-radius: 16px;
    width: 90%;
    max-width: 360px; /* уменьшили ширину */
    position: relative;
    padding: 30px 25px 25px; /* уменьшили паддинги */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s ease;
    overflow: hidden;
}




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

/* Background graphic */
.popup::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='400' height='400' viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cg stroke='%234A90E2' stroke-opacity='0.1' fill='none' stroke-width='2'%3E%3Cpath d='M0 350 L50 300 L100 320 L150 270 L200 290 L250 230 L300 250 L350 200 L400 220'/%3E%3Cpath d='M0 300 L50 250 L100 270 L150 220 L200 240 L250 180 L300 200 L350 150 L400 170'/%3E%3Cpath d='M0 250 L50 200 L100 220 L150 170 L200 190 L250 130 L300 150 L350 100 L400 120'/%3E%3C/g%3E%3C/svg%3E") no-repeat bottom left;
    background-size: cover;
    pointer-events: none;
}



/* Close button (X) */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-btn:hover {
    background: #f0f0f0;
    transform: rotate(90deg);
}

.close-btn::before,
.close-btn::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: #999;
    transition: background 0.3s ease;
}

.close-btn::before { transform: rotate(45deg); }
.close-btn::after { transform: rotate(-45deg); }

.close-btn:hover::before,
.close-btn:hover::after {
    background: #333;
}

/* Success Icon */
.icon-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
    animation: scaleIn 0.5s ease 0.2s both;
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Animated Checkmark */
.checkmark {
    width: 45px;
    height: 45px;
    position: relative;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke: #ffffff;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: #ffffff;
    stroke-width: 4;
    fill: none;
    animation: stroke 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

/* Text Section */
.popup-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.popup-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    animation: fadeInUp 0.5s ease 0.3s both;
}

.popup-text {
   font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
    animation: fadeInUp 0.5s ease 0.4s both;
}

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

/* Messenger Icons */
.messenger-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 0.5s ease 0.5s both;
}

.messenger-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.messenger-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.messenger-btn.telegram {
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
}

.messenger-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.messenger-btn svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* Close Button (Green) */
.action-btn {
    width: 65%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    animation: fadeInUp 0.5s ease 0.6s both;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

.action-btn:active { transform: translateY(0); }

/* Responsive */
@media (max-width: 480px) {
    .popup { padding: 40px 25px 30px; }
    .popup-title { font-size: 24px; }
    .popup-text { font-size: 14px; }
    .success-icon { width: 70px; height: 70px; }
    .messenger-btn { width: 55px; height: 55px; }
}
