/* 自定义 Toast 提示 - 替代原生 alert，风格与平台统一 */
.toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 420px;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    color: #cdd6f4;
    font-size: 0.95rem;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: toast-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.toast-out {
    animation: toast-out 0.25s ease forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(-12px) scale(0.98);
    }
}

.toast-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
}

.toast-content {
    flex: 1;
}

.toast.toast-error {
    border-left: 3px solid #f38ba8;
}
.toast.toast-error .toast-icon { color: #f38ba8; }

.toast.toast-warning {
    border-left: 3px solid #f9e2af;
}
.toast.toast-warning .toast-icon { color: #f9e2af; }

.toast.toast-success {
    border-left: 3px solid #a6e3a1;
}
.toast.toast-success .toast-icon { color: #a6e3a1; }

.toast.toast-info {
    border-left: 3px solid #89b4fa;
}
.toast.toast-info .toast-icon { color: #89b4fa; }

.toast-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.toast-btn {
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.88rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.toast-btn-primary {
    background: rgba(96, 165, 250, 0.22);
    color: #e5f0ff;
    border: 1px solid #60a5fa;
}
.toast-btn-primary:hover {
    background: #60a5fa;
    color: #020617;
}

/* ================= 自定义确认框 - 替代原生 confirm ================= */
.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.confirm-overlay.active {
    opacity: 1;
}

.confirm-box {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(96, 165, 250, 0.5);
    border-radius: 16px;
    padding: 2rem;
    min-width: 360px;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.25s ease;
}

.confirm-overlay.active .confirm-box {
    transform: scale(1);
}

.confirm-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.confirm-message {
    color: #cdd6f4;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.confirm-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.confirm-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.confirm-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #cdd6f4;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.confirm-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
}

.confirm-btn-primary {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.95), rgba(56, 189, 248, 0.95));
    color: #020617;
    font-weight: 600;
}

.confirm-btn-primary:hover {
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.5);
    transform: translateY(-1px);
}
