
/* Toast 提示样式 - 科技感深色主题 - 优化版 */
.tront-toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 280px;
    max-width: 90vw;
    padding: 14px 20px;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05); /* 替代边框的微妙外发光 */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    overflow: hidden;
    isolation: isolate; /* 创建新的堆叠上下文 */
}

/* 使用渐变背景替代边框，更柔和 */
.tront-toast::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(135deg, 
            rgba(255, 255, 255, 0.1) 0%, 
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0.02) 100%);
    z-index: -1;
    border-radius: 14px;
}

/* 顶部光效条 - 保留 */
.tront-toast::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.4;
}

/* 简化颜色定义，使用更柔和的色调 */
.tront-toast.toast-success {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.12) 0%, 
        rgba(16, 185, 129, 0.08) 100%);
    color: #86efac;
}

.tront-toast.toast-error {
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.12) 0%, 
        rgba(239, 68, 68, 0.08) 100%);
    color: #fca5a5;
}

.tront-toast.toast-warning {
    background: linear-gradient(135deg, 
        rgba(245, 158, 11, 0.12) 0%, 
        rgba(245, 158, 11, 0.08) 100%);
    color: #fcd34d;
}

.tront-toast.toast-info {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.12) 0%, 
        rgba(59, 130, 246, 0.08) 100%);
    color: #93c5fd;
}

/* 增强文字发光效果 */
.tront-toast .toast-content {
    text-shadow: 
        0 0 12px currentColor,
        0 0 24px currentColor;
}

/* 图标发光效果 */
.tront-toast .toast-icon {
    text-shadow: 
        0 0 10px currentColor,
        0 0 20px currentColor;
}

.toast-content {
    flex: 1;
    padding-right: 10px;
}

.toast-icon {
    font-size: 14px;
    margin-right: 12px;
    min-width: 18px;
    text-align: center;
}

.toast-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-left: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.toast-close:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
}

/* 淡出动画 */
.tront-toast.hiding {
    animation: toastSlideOut 0.2s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards;
}

/* 入场动画 */
@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 退场动画 */
@keyframes toastSlideOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* 进度条动画 */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        currentColor, 
        rgba(255, 255, 255, 0.7));
    border-radius: 0 0 14px 14px;
    animation: toastProgress linear forwards;
    filter: blur(1px); /* 柔化边缘 */
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* 响应式调整 */
@media (max-width: 480px) {
    .tront-toast {
        min-width: auto;
        width: 92%;
        padding: 12px 16px;
        font-size: 12px;
        top: 36px;
    }
}

/* 多个toast堆叠时的间距 */
.tront-toast + .tront-toast {
    margin-top: 10px;
}

/* 为移动端添加触摸反馈 */
@media (hover: none) and (pointer: coarse) {
    .toast-close {
        padding: 6px 10px;
    }
}