.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: 4px;
    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;
    box-shadow: 0 4px 16px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
}

.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;
}

.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: linear-gradient(90deg, rgba(255,255,255,0.12), rgba(255,255,255,0.45));
    border-radius: 0 0 4px 4px;
    animation: progressBar 5s linear forwards;
}

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

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

@keyframes progressBar {
    0% { width: 100%; opacity: 1; }
    80% { opacity: 1; }
    100% { width: 0%; opacity: 0.4; }
}