/* Toast 弹窗样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    animation: toastSlideIn 0.3s ease-out;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast.toast-success::before {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.toast.toast-error::before {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.toast.toast-warning::before {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.toast.toast-info::before {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.toast-success .toast-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.toast-error .toast-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.toast-warning .toast-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.toast-info .toast-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.toast-content {
    flex: 1;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.toast-close {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 12px;
    color: #6b7280;
}

.toast-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    animation: toastProgress 3s linear;
    border-radius: 0 0 0 12px;
}

.toast-success .toast-progress {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.toast-error .toast-progress {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.toast-warning .toast-progress {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.toast-info .toast-progress {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.toast.toast-hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}
