#flash-container {
    position: fixed;
    top: 20px;
    left: 50%;
    margin-left: -250px;
    z-index: 1080; /* Flash messages - above all navigation */
    width: 500px;
}

@media (max-width: 768px) {
    #flash-container {
        width: 90%;
        left: 5%;
        margin-left: 0;
    }
}

.flash-message {
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
    font-weight: 400;
    display: block;
    text-align: center;
    width: 100%;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 1;
    transition: opacity 0.3s ease;
    position: relative;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    backdrop-filter: blur(10px);
}

.flash-message.alert-success {
    background: rgba(255, 255, 255, 0.25);
    color: #1b5e20;
    border: 1px solid rgba(76, 175, 80, 0.4);
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.2);
}

.flash-message.alert-danger {
    background: rgba(255, 255, 255, 0.25);
    color: #c62828;
    border: 1px solid rgba(244, 67, 54, 0.4);
    box-shadow: 0 8px 32px rgba(244, 67, 54, 0.2);
}

.flash-message.alert-warning {
    background: rgba(255, 255, 255, 0.25);
    color: #ef6c00;
    border: 1px solid rgba(255, 152, 0, 0.4);
    box-shadow: 0 8px 32px rgba(255, 152, 0, 0.2);
}

.flash-message.alert-info {
    background: rgba(255, 255, 255, 0.25);
    color: #1976d2;
    border: 1px solid rgba(33, 150, 243, 0.4);
    box-shadow: 0 8px 32px rgba(33, 150, 243, 0.2);
}

.flash-close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 18px;
    cursor: pointer;
    user-select: none;
    line-height: 1;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    color: #ffffff;
    opacity: 0.8;
}

.flash-close:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}

/* Animation entrance */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flash-message {
    animation: fadeInDown 0.3s ease-out;
}