body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to right, #a8c0ff, #3f4c77);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.container {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

h1 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    text-align: left;
    font-weight: bold;
}

input[type="email"] {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 20px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="email"]:focus {
    border-color: #007bff;
    outline: none;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #45a049;
}

.error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

@media (max-width: 500px) {
    .container {
        padding: 20px;
    }

    button {
        padding: 10px 18px;
        font-size: 14px;
    }
}

/* Popup error message */
#message-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;  /* higher than most elements */
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;  /* allows clicks to pass through container */
}

/* Common popup style */
.popup-message {
    padding: 18px 25px;
    margin-bottom: 12px;
    border-radius: 12px;
    min-width: 320px;
    max-width: 90%;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    color: #fff;
    font-weight: 600;
    text-align: center;
    position: relative;
    pointer-events: auto;  /* allow interaction with close button */
    animation: popup-fade-in 0.4s ease forwards;
    transform: scale(0.8);
    opacity: 0;
}

/* Close button */
.popup-message .close-btn {
    position: absolute;
    top: 6px;
    right: 12px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    transition: color 0.2s;
}

.popup-message .close-btn:hover {
    color: #000;
}

/* Fade-in & pop animation */
@keyframes popup-fade-in {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

/* Colors by type with gradients */
.popup-message.success {
    background: linear-gradient(135deg, #28a745, #81c784);
    color: #fff;
}

.popup-message.error {
    background: linear-gradient(135deg, #e21f33, #f0625d);
    color: #fff;
}

.popup-message.info {
    background: linear-gradient(135deg, #17a2b8, #4fc3f7);
    color: #fff;
}

.popup-message.warning {
    background: linear-gradient(135deg, #ffc107, #ffd54f);
    color: #212529;
}

/* Optional: auto-hide fade-out */
.popup-message.fade-out {
    animation: fade-out 0.5s forwards;
}

@keyframes fade-out {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.8); }
}
