.alert-container {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 340px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 9999;
    pointer-events: none;
}

.alert {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 52px 18px 18px;
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: var(--fs-base);
    line-height: var(--line-base);
    color: #fff;
    opacity: 0;
    transform: translateX(40px);
    animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: auto;
}

.alert.success { background-color: #6b7c3f; border: 2px solid #7d8f4a; }
.alert.error { background-color: #8b3a3a; border: 2px solid #a04545; }
.alert.info { background-color: #b8860b; border: 2px solid #c9973c; }

.alert p {
    margin: 0;
    white-space: normal;
}

.close-alert {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    cursor: pointer;
    font-weight: bold;
    font-size: var(--fs-h2);
    user-select: none;
    transition: transform .15s ease-out;
}

.close-alert:hover {
    transform: translateY(-50%) scale(1.25);
}

.alert.hide {
    animation: slideOut 0.4s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

.alert .progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 100%;
    background: rgba(255,255,255,.4);
    animation: progressBar 5s linear forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

@keyframes progressBar {
    0% { width: 100%; }
    100% { width: 0%; }
}