* {
    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: #ffffff;
}

/* Оверлей */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    animation: fadeIn 0.3s ease;
}

.popup-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Pop-up окно */
.popup {
    background: linear-gradient(180deg, #fbfff9 0%, #f2fff4 50%, #e8fff0 100%);
    border: none; /* убираем бордер */
    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;
}


/* Кнопка закрытия (крестик) */
.close-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-icon:hover {
    background: rgba(128, 128, 128, 0.1);
    transform: rotate(90deg);
}

.close-icon::before,
.close-icon::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: #808080;
}

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

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

/* Иконка с галочкой */
.success-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    animation: bounceRotate 0.8s ease 0.2s backwards;
    position: relative;
}

.success-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    animation: pulse 2s ease-in-out infinite;
    opacity: 0.5;
}

.success-icon::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 24px;
    border: solid white;
    border-width: 0 4px 4px 0;
    transform: rotate(45deg);
    z-index: 1;
    animation: checkDraw 0.5s ease 0.6s backwards;
}

/* Заголовок */
.popup-title {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    text-align: center;
    margin-bottom: 15px;
    animation: fadeInUp 0.5s ease 0.3s backwards;
}

/* Текст */
.popup-text {
    font-size: 15px;
    color: #4a5568;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 25px;
    animation: fadeInUp 0.5s ease 0.4s backwards;
}

/* Контейнер мессенджеров */
.messengers {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
    animation: fadeInUp 0.5s ease 0.5s backwards;
}

.messenger-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.messenger-icon:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #0077b5 100%);
}

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

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

/* Кнопка закрыть */
.close-button {
    width: 60%; /* теперь половина ширины поп-ап */
    padding: 12px; /* чуть меньше для гармонии */
    background: linear-gradient(135deg, #4CAF50 0%, #43A047 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    animation: fadeInUp 0.5s ease 0.6s backwards;
    position: relative;
    overflow: hidden;
    display: block;
    margin: 0 auto; /* центрируем внутри поп-ап */
}

.close-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.close-button:hover::before {
    width: 300px;
    height: 300px;
}

.close-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.close-button:active {
    transform: translateY(0);
}


/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes bounceRotate {
    0% { opacity: 0; transform: scale(0) rotate(-180deg); }
    50% { transform: scale(1.1) rotate(10deg); }
    70% { transform: scale(0.9) rotate(-5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes checkDraw {
    0% { opacity: 0; height: 0; width: 0; }
    50% { opacity: 1; height: 24px; width: 0; }
    100% { opacity: 1; height: 24px; width: 12px; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.2; }
}