/* Toast 弹窗组件样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    min-width: 320px;
    max-width: 450px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: toastSlideIn 0.3s ease;
    pointer-events: auto;
    position: relative;
    background: #fff;
    border: none;
}

.toast.fade-out {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.toast-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50%;
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.toast-message {
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
    color: #666;
}

.toast-close {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.toast-close:hover {
    color: #333;
}

/* 成功提示 */
.toast.success {
    border: none;
    border-left: 4px solid #52c41a;
}

.toast.success .toast-icon {
    background: #f6ffed;
    color: #52c41a;
    font-weight: bold;
}

.toast.success .toast-title {
    color: #52c41a;
    font-weight: 600;
}

.toast.success .toast-message {
    color: #666;
}

/* 错误提示 */
.toast.error {
    border: none;
    border-left: 4px solid #ff4d4f;
}

.toast.error .toast-icon {
    background: #fff2f0;
    color: #ff4d4f;
    font-weight: bold;
}

.toast.error .toast-title {
    color: #ff4d4f;
    font-weight: 600;
}

.toast.error .toast-message {
    color: #666;
}

/* 警告提示 */
.toast.warning {
    border-left: 4px solid #faad14;
}

.toast.warning .toast-icon {
    background: #fffbe6;
    color: #faad14;
}

.toast.warning .toast-title {
    color: #faad14;
}

/* 信息提示 */
.toast.info {
    border-left: 4px solid #1890ff;
}

.toast.info .toast-icon {
    background: #e6f7ff;
    color: #1890ff;
}

.toast.info .toast-title {
    color: #1890ff;
}

/* 确认对话框 */
.toast.confirm {
    min-width: 400px;
    border-left: 4px solid #1890ff;
}

.toast.confirm .toast-content {
    width: 100%;
}

.toast.confirm .toast-title {
    color: #333;
    margin-bottom: 8px;
}

.toast.confirm .toast-message {
    color: #666;
    margin-bottom: 16px;
}

.toast-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
}

.toast-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    min-width: 80px;
}

.toast-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.toast-btn-cancel:hover {
    background: #e8e8e8;
}

.toast-btn-confirm {
    background: #1890ff;
    color: #fff;
}

.toast-btn-confirm:hover {
    background: #40a9ff;
}

/* 登录页面样式优化 */
.login-page .toast-container {
    z-index: 100001;
}

.login-page .toast {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    border: none !important;
}

/* 确保Toast在所有情况下都正确显示 */
body .toast-container {
    z-index: 999999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
    
    .toast.confirm {
        min-width: auto;
    }
}

