.nm-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 12, 38, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 20px;
    box-sizing: border-box;
}

.nm-popup-overlay.nm-active {
    opacity: 1;
}

.nm-popup-modal {
    background-color: #ffffff;
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(109, 40, 217, 0.15);
    width: 100%;
    max-width: 460px;
    padding: 36px;
    position: relative;
    box-sizing: border-box;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.nm-popup-overlay.nm-active .nm-popup-modal {
    transform: scale(1) translateY(0);
}

/* Close Button */
.nm-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #f1f0f7;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6d28d9;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    box-shadow: 0 2px 8px rgba(109, 40, 217, 0.05);
}

.nm-popup-close:hover {
    background-color: #f5f3ff;
    border-color: #ddd6fe;
    transform: rotate(90deg);
}

/* Illustration */
.nm-popup-illustration {
    position: relative;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 280px;
    height: auto;
}

.nm-popup-uploaded-img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
}

.nm-popup-circle-bg {
    width: 120px;
    height: 120px;
    background-color: #f5f3ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.nm-popup-emblem {
    width: 70px;
    height: 70px;
}

.nm-popup-sparkles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.nm-popup-sparkle {
    position: absolute;
    animation: nm-sparkle-float 3s ease-in-out infinite alternate;
}

/* Content */
.nm-popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nm-popup-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f0c26;
    margin: 0 0 14px 0;
    line-height: 1.3;
}

.nm-popup-highlight {
    color: #6d28d9;
}

.nm-popup-divider {
    width: 32px;
    height: 3px;
    background-color: #6d28d9;
    border-radius: 2px;
    margin-bottom: 16px;
}

.nm-popup-text {
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    margin: 0 0 28px 0;
}

/* Action Button */
.nm-popup-btn {
    width: 100%;
    background-color: #f5f3ff;
    color: #6d28d9;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 28px;
    border: 1px solid rgba(109, 40, 217, 0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.nm-popup-btn:hover {
    background-color: #ede9fe;
    border-color: rgba(109, 40, 217, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.05);
}

.nm-popup-btn:active {
    transform: translateY(0);
}

/* Animations */
@keyframes nm-sparkle-float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-5px) scale(1.1); }
}

/* WP Admin Bar Handling */
body.admin-bar .nm-popup-overlay {
    top: var(--wp-admin--admin-bar--height, 32px);
}
@media screen and (max-width: 782px) {
    body.admin-bar .nm-popup-overlay {
        top: 46px;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .nm-popup-modal {
        padding: 24px;
        border-radius: 24px;
    }
    .nm-popup-title {
        font-size: 22px;
    }
    .nm-popup-text {
        font-size: 14px;
        margin-bottom: 22px;
    }
}
