#alertContainer {
    position: fixed;
    top: 68px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999; /* Higher than modals */
    width: 350px;
    max-width: 90%;
    text-align: center;
}

.alert {
    transition: opacity 0.5s ease-in-out, transform 0.3s ease-in-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    backdrop-filter: blur(5px); /* Background blur */
}

/* Shake animation for error alerts */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}
.alert-danger {
    background-color: #ff4d4d;
    color: white;
    animation: shake 0.5s ease-in-out;
}

.alert-success {
    background-color: #28a745;
    color: white;
}

.alert-warning {
    background-color: #ffc107;
    color: black;
}

.alert .btn-close {
    padding: 5px;
    font-size: 14px;
    color: white;
    cursor: pointer;
}

/* Overlay effect for focus */
#alertOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 9998; /* Below alerts, above everything else */
}
