.flash-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: min(90vw, 460px);
    pointer-events: none;
}

.flash {
    position: relative;
    pointer-events: auto;
    padding: 20px 24px 26px;
    border-radius: 8px;
    font-family: Verdana, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.4;
    background: #1a1a1a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.flash.is-leaving {
    opacity: 0;
    transform: scale(0.95);
}

.flash-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 5px;
    width: 100%;
    background: currentColor;
    opacity: 0.7;
    animation: flash-countdown var(--flash-duration, 10s) linear forwards;
}

@keyframes flash-countdown {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.flash-success {
    color: #8ee29b;
    border: 1px solid #2f6b3a;
}

.flash-error {
    color: #e28e8e;
    border: 1px solid #6b2f2f;
}
