.popup-overlay,
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-overlay.show,
.success-overlay.show {
    display: flex;
}

.popup-box,
.success-box {
    background: #fff;
    width: 90%;
    max-width: 380px;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    animation: scaleUp 0.4s ease;
}

.checkmark {
    width: 60px;
    height: 60px;
    margin: auto;
    background: #28a745;
    color: #fff;
    font-size: 34px;
    border-radius: 50%;
    line-height: 60px;
}

@keyframes scaleUp {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}


.popup-box {
    background: #fff;
    width: 90%;
    max-width: 420px;
    padding: 20px;
    border-radius: 6px;
    position: relative;
}

.popup-box h2 {
    text-align: center;
    margin-bottom: 15px;
}

.popup-box input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
}

.popup-box button {
    width: 100%;
    padding: 10px;
    background: #0a7cff;
    color: #fff;
    border: none;
    cursor: pointer;
}

.close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    cursor: pointer;
    font-size: 22px;
}

.success { color: green; }
.error { color: red; }

.success-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    padding: 32px 40px;
    border-radius: 14px;
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.25);

    /* ✅ CENTER FIX */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-width: 320px;
    max-width: 90%;

    animation: popIn 0.4s ease;
    z-index: 9999;
}

.success-box h2,
.success-box p {
    text-align: center;
    margin: 0;
}

.success-box h2 {
    margin-bottom: 10px;
}

.success-box p {
    font-size: 15px;
    color: #444;
}

.popup-box {
    position: relative;
}

.popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: #e53935;   /* Red background */
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
}

.popup-close:hover {
    background: #c62828;  /* Darker red on hover */
}
