/* ============================================
   全局模态框、通知与菜单样式 (Modals, Toasts & Menus)
   ============================================ */

/* 1. 自定义右键菜单 */
.context-menu { position: fixed; background: var(--bg-panel); border: 1px solid var(--border-light); box-shadow: var(--shadow-hover); border-radius: var(--radius-sm); padding: 4px; z-index: 9999; min-width: 140px; }
.ctx-item { padding: 8px 12px; font-size: 13px; cursor: pointer; border-radius: 4px; transition: background 0.2s; }
.ctx-item:hover { background: var(--bg-hover); color: var(--primary); }
.ctx-item.danger:hover { background: #fef2f2; color: var(--danger); }

/* 2. 模态框基础 */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: center; z-index: 10000; transition: var(--transition); }
.modal-content { background: var(--bg-panel); padding: 24px; border-radius: var(--radius-box); box-shadow: var(--shadow-hover); display: flex; flex-direction: column; gap: 16px; }

/* 3. 消息通知中心 (Toast Center) */
.toast-center {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast-item {
    background: rgba(15, 23, 42, 0.9);
    color: white;
    backdrop-filter: blur(8px);
    padding: 10px 18px;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
    animation: toast-slide-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.toast-item.error {
    border-left: 4px solid var(--danger);
}
.toast-item.info {
    border-left: 4px solid var(--primary);
}
.toast-fade-enter-from { opacity: 0; transform: translateY(-20px) scale(0.9); }
.toast-fade-enter-to { opacity: 1; transform: translateY(0) scale(1); }
.toast-fade-leave-from { opacity: 1; transform: translateY(0) scale(1); }
.toast-fade-leave-to { opacity: 0; transform: translateY(-20px) scale(0.9); }
.toast-fade-enter-active, .toast-fade-leave-active { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes toast-slide-in {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 4. 统一确认模态弹窗样式 */
.modal-content.confirm-modal { max-width: 400px; }
.confirm-modal {
    width: 400px;
    max-width: 90vw;
    border: 1px solid var(--border-light);
    border-radius: 16px !important;
    animation: modal-zoom-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.confirm-header { display: flex; align-items: center; gap: 12px; }
.confirm-header h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--text-main); }
.confirm-icon { font-size: 20px; }
.confirm-icon.danger { color: var(--danger); }
.confirm-icon.info { color: var(--primary); }
.confirm-message { margin: 0; font-size: 14px; color: var(--text-sub); line-height: 1.6; white-space: pre-wrap; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.btn-danger { background: var(--danger) !important; border-color: var(--danger) !important; color: white !important; }
.btn-danger:hover { background: #dc2626 !important; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2) !important; }
@keyframes modal-zoom-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
