#toastContainer {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(400px, calc(100vw - 32px));
    pointer-events: none;
}

.toast {
    position: relative;
    width: 100%;
    background:
        linear-gradient(
            145deg,
            rgba(24, 24, 27, 0.98),
            rgba(9, 9, 11, 0.98)
        );
    border: 1px solid rgba(63, 63, 70, 0.85);
    border-left: 4px solid #3b82f6;
    color: #ffffff;
    border-radius: 18px;
    padding: 16px 16px 0;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.52),
        0 0 0 1px rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(18px);
    pointer-events: auto;
    overflow: hidden;
    opacity: 0;
    transform:
        translateX(28px)
        scale(0.98);
    transition:
        opacity 220ms ease,
        transform 220ms ease,
        border-color 220ms ease;
}

.toast.visible {
    opacity: 1;
    transform:
        translateX(0)
        scale(1);
}

.toast:hover {
    border-color:
        rgba(82, 82, 91, 0.95);
}

.toast.success {
    border-left-color:
        #10b981;
}

.toast.error {
    border-left-color:
        #ef4444;
}

.toast.warning {
    border-left-color:
        #f59e0b;
}

.toast.info {
    border-left-color:
        #3b82f6;
}

.toast-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 14px;
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.toast.success .toast-icon {
    background:
        rgba(16, 185, 129, 0.14);
    color:
        #34d399;
}

.toast.error .toast-icon {
    background:
        rgba(239, 68, 68, 0.14);
    color:
        #f87171;
}

.toast.warning .toast-icon {
    background:
        rgba(245, 158, 11, 0.14);
    color:
        #fbbf24;
}

.toast.info .toast-icon {
    background:
        rgba(59, 130, 246, 0.14);
    color:
        #60a5fa;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    color:
        #fafafa;
    font-size:
        14px;
    font-weight:
        700;
    line-height:
        1.35;
    margin-bottom:
        4px;
}

.toast-message {
    color:
        #a1a1aa;
    font-size:
        13px;
    line-height:
        1.5;
    overflow-wrap:
        anywhere;
}

.toast-time {
    color:
        #71717a;
    font-size:
        11px;
    margin-top:
        8px;
}

.toast-close {
    width:
        30px;
    height:
        30px;
    display:
        inline-flex;
    align-items:
        center;
    justify-content:
        center;
    flex-shrink:
        0;
    border:
        0;
    border-radius:
        10px;
    background:
        transparent;
    color:
        #71717a;
    cursor:
        pointer;
    transition:
        background-color 160ms ease,
        color 160ms ease;
}

.toast-close:hover {
    background:
        rgba(63, 63, 70, 0.72);
    color:
        #ffffff;
}

.toast-close:focus-visible {
    outline:
        2px solid #10b981;
    outline-offset:
        2px;
}

.toast-progress-track {
    height:
        4px;
    margin:
        0 -16px;
    background:
        rgba(63, 63, 70, 0.42);
    overflow:
        hidden;
}

.toast-progress {
    width:
        100%;
    height:
        100%;
    background:
        #3b82f6;
    transform-origin:
        left center;
    transform:
        scaleX(1);
    will-change:
        transform;
}

.toast.success .toast-progress {
    background:
        #10b981;
}

.toast.error .toast-progress {
    background:
        #ef4444;
}

.toast.warning .toast-progress {
    background:
        #f59e0b;
}

.toast.info .toast-progress {
    background:
        #3b82f6;
}

.toast.paused .toast-time::after {
    content:
        ' · Paused';
    color:
        #a1a1aa;
}

.toast.hide {
    opacity:
        0;
    transform:
        translateX(28px)
        scale(0.98);
}

@media (max-width: 640px) {
    #toastContainer {
        top:
            16px;
        right:
            16px;
        left:
            16px;
        width:
            auto;
    }

    .toast {
        border-radius:
            16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .toast {
        transition:
            opacity 100ms linear;
        transform:
            none;
    }

    .toast.visible {
        transform:
            none;
    }

    .toast.hide {
        transform:
            none;
    }

    .toast-progress {
        transition:
            none !important;
    }
}
