.alert-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    min-width: 320px;
    max-width: 420px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.alert-toast__container {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 14px 16px;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-left-width: 3px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-toast__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-toast__icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.alert-toast__content {
    flex: 1;
    min-width: 0;
    padding-right: 28px;
}

.alert-toast__title {
    font-weight: 500;
    font-size: 14px;
    color: #f0f0f0;
    margin-bottom: 2px;
    line-height: 1.4;
}

.alert-toast__message {
    font-size: 13px;
    color: #888888;
    line-height: 1.5;
}

.alert-toast__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #666666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    padding: 0;
}

.alert-toast__close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f0f0f0;
}

.alert-toast__close svg {
    width: 14px;
    height: 14px;
    display: block;
}

.alert-toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    transform-origin: left;
    animation: progressBar 5s linear forwards;
    opacity: 0.6;
}

/* Variants — slightly muted accent colors look better on dark */
.alert-toast--success .alert-toast__container { border-left-color: #34d399; }
.alert-toast--success .alert-toast__icon { color: #34d399; }
.alert-toast--success .alert-toast__progress { background: #34d399; }

.alert-toast--error .alert-toast__container { border-left-color: #f87171; }
.alert-toast--error .alert-toast__icon { color: #f87171; }
.alert-toast--error .alert-toast__progress { background: #f87171; }

.alert-toast--warning .alert-toast__container { border-left-color: #fbbf24; }
.alert-toast--warning .alert-toast__icon { color: #fbbf24; }
.alert-toast--warning .alert-toast__progress { background: #fbbf24; }

.alert-toast--info .alert-toast__container { border-left-color: #60a5fa; }
.alert-toast--info .alert-toast__icon { color: #60a5fa; }
.alert-toast--info .alert-toast__progress { background: #60a5fa; }

/* Animations */
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(40px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: none; }
    to   { opacity: 0; transform: translateX(40px) scale(0.96); }
}

@keyframes progressBar {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

.alert-toast--closing {
    animation: toastSlideOut 0.25s ease forwards;
}

@media (max-width: 640px) {
    .alert-toast {
        left: 10px;
        right: 10px;
        top: 10px;
        min-width: 0;
        max-width: none;
    }
}