// ==UserScript== // @name LibTV Canvas Boost // @version 1.9.5 // @icon https://raw.githubusercontent.com/lonely814/Messy/refs/heads/main/libtv-boost/libtv-boost-icon.png // @license MIT // @author oocc00 // @description 性能优化 · G网格 T性能 H隐藏 L连线 C全链 F搜索 P提示词 X专注 R直角 ?帮助 · AI增强 · 标签 · 提示词模板 · 模板变量 · 主题(画布配色DIY) // @match *://*.iblib.tv/canvas* // @match *://*.liblib.tv/canvas* // @match https://www.liblib.tv/* // @run-at document-idle // @grant GM_registerMenuCommand // @grant unsafeWindow // ==/UserScript== (function(){ 'use strict'; /* ========================================================= * 1. CSS 注入 * ========================================================= */ var style = document.createElement('style'); style.id = 'libtv-boost-css'; style.textContent = [ /* 主题变量 */ ':root {', ' --accent: #6366f1;', ' --accent-light: #818cf8;', ' --accent-dark: #4f46e5;', ' --accent-rgb: 99,102,241;', ' --accent-light-rgb: 129,140,248;', ' --canvas-bg: #0f0f0f;', ' --grid-color: rgba(255,255,255,0.12);', ' --node-bg: #1a1a2e;', ' --border-color: rgba(255,255,255,0.12);', ' --edge-color: rgba(255,255,255,0.08);', '}', /* 节点卡片 — 玻璃质感 */ '.react-flow__node {', ' transition: all 0.25s ease !important;', ' border-radius: 14px !important;', ' background: rgba(255,255,255,0.02) !important;', ' backdrop-filter: blur(8px) !important;', ' -webkit-backdrop-filter: blur(8px) !important;', ' border: 1px solid rgba(255,255,255,0.06) !important;', ' box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.06) !important;', '}', '.react-flow__node:hover {', ' border-color: rgba(129,140,248,0.2) !important;', ' box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 0 0 1px rgba(129,140,248,0.08) !important;', '}', /* 选中节点 — 全息投影 + 浮起 */ '.react-flow__node.selected {', ' outline: none !important;', ' border-color: var(--accent, #6366f1) !important;', ' border-width: 1.5px !important;', ' box-shadow:', ' 0 0 0 2px rgba(255,255,255,0.3),', ' 0 0 0 4.5px var(--accent, #6366f1),', ' 0 0 20px var(--accent, #6366f1),', ' 0 0 60px rgba(var(--accent-rgb),0.3) !important;', '}', '.react-flow__node.selected::after {', ' content: ""; position: absolute;', ' inset: -1px; border-radius: 15px;', ' background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent, rgba(var(--accent-light-rgb),0.05)) !important;', ' pointer-events: none; z-index: 0;', '}', /* 网格背景隐藏 */ '.react-flow__background.perf-no-grid { display: none !important; }', /* 隐藏连线 */ '.react-flow__edges.perf-hide-edges { display: none !important; }', /* 连线 — 渐变发光 */ '.react-flow__edge-path {', ' stroke: var(--edge-color, rgba(255,255,255,0.12)) !important;', ' stroke-width: 2 !important;', ' transition: stroke 0.2s, stroke-width 0.2s !important;', '}', '.react-flow__edge:hover .react-flow__edge-path {', ' stroke: var(--accent-light, #818cf8) !important;', ' stroke-width: 2.5 !important;', ' filter: drop-shadow(0 0 4px rgba(var(--accent-light-rgb),0.3)) !important;', '}', /* 链高亮 — 增强发光 */ 'body.libtv-chain .react-flow__edge.libtv-chain-edge .react-flow__edge-path {', ' stroke: var(--accent, #818cf8) !important;', ' stroke-width: 2.8 !important;', ' filter: drop-shadow(0 0 8px rgba(var(--accent-light-rgb),0.5)) !important;', '}', '.react-flow__edge.libtv-edge-active .react-flow__edge-path {', ' stroke: var(--strong, #818cf8) !important;', ' stroke-width: 2.5 !important;', '}', 'body.libtv-chain .react-flow__edge.libtv-chain-edge .react-flow__edge-path {', ' stroke: var(--accent, #818cf8) !important;', ' stroke-width: 2.5 !important;', ' filter: drop-shadow(0 0 6px rgba(var(--accent-light-rgb),0.6));', '}', 'body.perf-mode .react-flow__edge-path {', ' stroke-width: 0.8 !important;', ' transition: none !important;', ' filter: none !important;', '}', 'body.libtv-step-edges .react-flow__edge-path {', ' transition: none !important;', '}', /* 隐藏图片 */ 'body.perf-hide-imgs .react-flow__node img {', ' display: none !important;', '}', /* 性能模式 */ 'body.perf-mode .react-flow__node {', ' box-shadow: none !important; border-radius: 0 !important;', ' background: none !important;', ' backdrop-filter: none !important; -webkit-backdrop-filter: none !important;', ' border-color: rgba(255,255,255,0.06) !important;', ' opacity: 0.85;', ' transition: none !important;', ' animation: none !important;', '}', 'body.perf-mode .react-flow__node [class*="rounded"] { border-radius: 0 !important; }', 'body.perf-mode .react-flow__node:hover {', ' opacity: 1;', '}', 'body.perf-mode .react-flow {', ' backdrop-filter: none !important;', '}', 'body.perf-mode * {', ' animation-duration: 0s !important;', ' animation-delay: 0s !important;', ' transition-duration: 0s !important;', ' backdrop-filter: none !important;', '}', 'body.perf-mode #libtv-glow { display: none !important; }', /* FPS 面板 — 紧凑小药丸 */ '#libtv-fps {', ' position: fixed; right: 14px; bottom: 14px; z-index: 99999;', ' padding: 5px 12px; border-radius: 10px;', ' background: rgba(10,10,15,0.55); color: rgba(255,255,255,0.5);', ' font: 11px/1.5 -apple-system, "SF Mono", monospace;', ' user-select: none;', ' backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);', ' border: 1px solid rgba(255,255,255,0.06);', ' white-space: nowrap;', ' display: inline-flex; align-items: center; gap: 5px;', ' cursor: grab;', ' transition: all 0.2s ease;', ' box-shadow: 0 2px 12px rgba(0,0,0,0.2);', '}', '#libtv-fps:hover {', ' background: rgba(10,10,15,0.75);', ' border-color: rgba(129,140,248,0.15);', ' padding: 5px 14px;', ' box-shadow: 0 4px 16px rgba(0,0,0,0.3);', '}', '#libtv-fps:active { cursor: grabbing; }', '#libtv-fps .fps-val { color: #4ade80; font-weight: 600; }', '#libtv-fps .fps-flag { color: #fbbf24; }', '#libtv-fps .fps-sep { color: rgba(255,255,255,0.08); }', '#libtv-fps .fps-zoom { color: #818cf8; }', '#libtv-fps .fps-cnt { color: rgba(255,255,255,0.35); }', /* 快捷键提示 — 右下角卡片,悬停 FPS 面板出现 */ '#libtv-help {', ' position:fixed; right:14px; bottom:118px; z-index:99997;', ' max-width:260px; padding:10px 12px;', ' background:rgba(18,18,28,0.92);', ' border:1px solid rgba(129,140,248,0.25); border-radius:10px;', ' color:rgba(255,255,255,0.6);', ' font:11px/1.8 -apple-system,"SF Mono",monospace;', ' pointer-events:none; user-select:none;', ' white-space:pre-line; text-align:left;', ' box-shadow:0 8px 24px rgba(0,0,0,0.4);', ' transition: opacity 0.3s ease, transform 0.3s ease;', '}', '#libtv-help.libtv-hide {', ' opacity:0;', ' transform:translateY(8px);', ' pointer-events:none;', '}', /* 链高亮模式 */ 'body.libtv-chain .react-flow__node { opacity: 0.08 !important; }', 'body.libtv-chain .react-flow__node.selected,', 'body.libtv-chain .react-flow__node.libtv-chain-node', ' { opacity: 1 !important; }', 'body.libtv-chain .react-flow__edge { opacity: 0.03 !important; }', 'body.libtv-chain .react-flow__edge.libtv-chain-edge', ' { opacity: 0.6 !important; }', /* 专注模式 — 隐藏工具栏/侧栏/顶栏/头像等 */ 'body.libtv-focus [data-toolbar-collapsed],' + 'body.libtv-focus [data-sidebar-container],' + 'body.libtv-focus header,' + 'body.libtv-focus nav,' + 'body.libtv-focus aside {', ' display: none !important;', '}', /* 专注模式时放大画布区域 */ 'body.libtv-focus .react-flow {', ' width: 100vw !important;', ' height: 100vh !important;', ' max-width: none !important;', '}', /* 搜索框玻璃效果 */ '#libtv-search {', ' backdrop-filter: blur(20px) !important;', ' -webkit-backdrop-filter: blur(20px) !important;', ' border: 1px solid rgba(255,255,255,0.08) !important;', '}', /* 提示词面板 — 霓虹玻璃风格 */ '#libtv-prompt {', ' position:fixed; z-index:99999;', ' width:440px; max-width:88vw; max-height:68vh;', ' background:rgba(12,12,20,0.88);', ' backdrop-filter:blur(32px) saturate(1.4); -webkit-backdrop-filter:blur(32px) saturate(1.4);', ' border:1px solid rgba(129,140,248,0.25);', ' border-radius:16px; padding:0; overflow:hidden;', ' display:flex; flex-direction:column;', ' font:13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; color:#d4d4d8;', ' animation:ltFadeIn .15s ease;', ' box-shadow:', ' 0 0 1px rgba(129,140,248,0.6),', ' 0 0 8px rgba(129,140,248,0.15),', ' 0 0 24px rgba(129,140,248,0.08),', ' 0 16px 48px rgba(0,0,0,0.5);', ' animation: libtv-panel-glow 4s ease-in-out infinite alternate;', '}', '@keyframes libtv-panel-glow {', ' 0% { border-color:rgba(129,140,248,0.2); box-shadow:0 0 1px rgba(129,140,248,0.5),0 0 8px rgba(129,140,248,0.1),0 0 20px rgba(129,140,248,0.05),0 16px 48px rgba(0,0,0,0.5); }', ' 100% { border-color:rgba(129,140,248,0.4); box-shadow:0 0 1px rgba(129,140,248,0.8),0 0 12px rgba(129,140,248,0.25),0 0 32px rgba(129,140,248,0.12),0 16px 48px rgba(0,0,0,0.5); }', '}', '#libtv-prompt::before {', ' content:""; position:absolute; top:-1px; left:20%; right:20%; height:1px;', ' background:linear-gradient(90deg,transparent,rgba(129,140,248,0.6),transparent);', ' pointer-events:none;', '}', '#libtv-prompt .ltp-head {', ' display:flex; align-items:center; justify-content:space-between;', ' padding:14px 18px 10px; border-bottom:1px solid rgba(129,140,248,0.12);', ' flex-shrink:0;', '}', '#libtv-prompt .ltp-head h3 { margin:0; font-size:13px; color:#e0e7ff; font-weight:600; letter-spacing:0.02em; text-shadow:0 0 12px rgba(129,140,248,0.4); }', '#libtv-prompt .ltp-close { cursor:pointer; font-size:16px; color:rgba(255,255,255,0.25); transition:all .15s; line-height:1; }', '#libtv-prompt .ltp-close:hover { color:#818cf8; text-shadow:0 0 8px rgba(129,140,248,0.5); }', '#libtv-prompt .ltp-tabs { display:flex; gap:0; padding:0 18px; border-bottom:1px solid rgba(129,140,248,0.12); flex-shrink:0; }', '#libtv-prompt .ltp-tab { padding:10px 16px; cursor:pointer; color:rgba(255,255,255,0.3); font-size:12px; border-bottom:1.5px solid transparent; transition:all .15s; letter-spacing:0.02em; user-select:none; }', '#libtv-prompt .ltp-tab:hover { color:rgba(224,231,255,0.7); }', '#libtv-prompt .ltp-tab.active { color:#818cf8; border-bottom-color:#818cf8; text-shadow:0 0 8px rgba(129,140,248,0.5); }', '#libtv-prompt .ltp-body { padding:14px 18px; overflow-y:auto; flex:1; max-height:42vh; position:relative; }', '#libtv-prompt .ltp-body textarea { width:100%; box-sizing:border-box; min-height:80px; padding:10px 12px; border-radius:10px; border:1px solid rgba(129,140,248,0.2); background:rgba(129,140,248,0.04); color:#e0e7ff; font:12px/1.5 ui-monospace,SFMono-Regular,monospace; outline:none; resize:vertical; transition:border-color .15s, box-shadow .15s; }', '#libtv-prompt .ltp-body textarea:focus { border-color:#818cf8; box-shadow:0 0 12px rgba(129,140,248,0.2); }', '#libtv-prompt .ltp-body input[type="text"],#libtv-prompt .ltp-body input[type="password"] { width:100%; box-sizing:border-box; padding:8px 12px; border-radius:8px; border:1px solid rgba(129,140,248,0.2); background:rgba(129,140,248,0.04); color:#e0e7ff; font:12px/1.5 ui-monospace,SFMono-Regular,monospace; outline:none; transition:border-color .15s, box-shadow .15s; }', '#libtv-prompt .ltp-body input:focus { border-color:#818cf8; box-shadow:0 0 12px rgba(129,140,248,0.2); }', '#libtv-prompt .ltp-btn { display:inline-flex; align-items:center; gap:5px; padding:6px 14px; border-radius:8px; border:none; cursor:pointer; font:12px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; transition:all .15s; }', '#libtv-prompt .ltp-btn-primary { background:linear-gradient(135deg,#6366f1,#818cf8); color:#fff; box-shadow:0 0 12px rgba(129,140,248,0.3); }', '#libtv-prompt .ltp-btn-primary:hover { background:linear-gradient(135deg,#818cf8,#a5b4fc); box-shadow:0 0 16px rgba(129,140,248,0.4); }', '#libtv-prompt .ltp-btn-sm { padding:4px 12px; font-size:11px; border-radius:6px; }', '#libtv-prompt .ltp-btn-danger { background:rgba(239,68,68,0.12); color:#f87171; }', '#libtv-prompt .ltp-btn-danger:hover { background:rgba(239,68,68,0.22); }', '#libtv-prompt .ltp-btn-ghost { background:rgba(255,255,255,0.04); color:#aaa; }', '#libtv-prompt .ltp-btn-ghost:hover { background:rgba(255,255,255,0.08); color:#fff; }', '#libtv-prompt .ltp-cat { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:12px; }', '#libtv-prompt .ltp-cat-btn { padding:3px 12px; border-radius:14px; border:1px solid rgba(129,140,248,0.2); cursor:pointer; font:11px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; color:rgba(255,255,255,0.4); background:transparent; transition:all .15s; }', '#libtv-prompt .ltp-cat-btn:hover { border-color:rgba(129,140,248,0.4); color:#818cf8; }', '#libtv-prompt .ltp-cat-btn.active { background:rgba(129,140,248,0.2); border-color:#818cf8; color:#a5b4fc; box-shadow:0 0 8px rgba(129,140,248,0.2); }', '#libtv-prompt .ltp-item { display:flex; align-items:center; justify-content:space-between; padding:7px 10px; border-radius:8px; cursor:pointer; transition:background .12s; position:relative; overflow:hidden; }', '#libtv-prompt .ltp-item::before { content:""; position:absolute; inset:0; border-radius:8px; opacity:0; transition:opacity .25s; background:radial-gradient(300px circle at var(--mx,50%) var(--my,50%),rgba(129,140,248,0.18),transparent 55%); pointer-events:none; }', '#libtv-prompt .ltp-item:hover::before { opacity:1; }', '#libtv-prompt .ltp-item:hover { background:rgba(255,255,255,0.04); }', '#libtv-prompt .ltp-item .ltp-name { font-size:12px; color:#c7d2fe; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }', '#libtv-prompt .ltp-item .ltp-actions { display:flex; gap:4px; opacity:0; transition:opacity .15s; }', '#libtv-prompt .ltp-item:hover .ltp-actions { opacity:1; }', '#libtv-prompt .ltp-item .ltp-preview { font-size:11px; color:rgba(255,255,255,0.25); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }', '#libtv-prompt .ltp-status { font-size:11px; color:rgba(255,255,255,0.3); margin-top:6px; }', '#libtv-prompt .ltp-empty { text-align:center; padding:30px 0; color:rgba(255,255,255,0.2); font-size:13px; }', /* 模板变量填充弹窗 */ '#libtv-prompt .ltp-var-overlay { position:absolute; inset:0; z-index:10; background:rgba(8,8,16,0.94); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); display:flex; flex-direction:column; padding:16px 18px; border-radius:12px; border:1px solid rgba(129,140,248,0.15); }', '#libtv-prompt .ltp-var-title { font-size:13px; color:#fff; font-weight:600; margin-bottom:10px; }', '#libtv-prompt .ltp-var-sub { font-size:11px; color:rgba(255,255,255,0.25); margin-bottom:12px; padding-bottom:10px; border-bottom:1px solid rgba(255,255,255,0.06); }', '#libtv-prompt .ltp-var-row { margin-bottom:8px; display:flex; align-items:center; gap:8px; }', '#libtv-prompt .ltp-var-row label { font-size:11px; color:rgba(255,255,255,0.4); min-width:64px; flex-shrink:0; text-align:right; }', '#libtv-prompt .ltp-var-row input { flex:1; padding:6px 10px; border-radius:6px; border:1px solid rgba(129,140,248,0.2); background:rgba(129,140,248,0.04); color:#e0e7ff; font:12px/1.4 ui-monospace,SFMono-Regular,monospace; outline:none; transition:border-color .15s, box-shadow .15s; }', '#libtv-prompt .ltp-var-row input:focus { border-color:#818cf8; box-shadow:0 0 8px rgba(129,140,248,0.2); }', '#libtv-prompt .ltp-var-preview { margin-top:8px; padding:8px 10px; border-radius:6px; background:rgba(255,255,255,0.03); font-size:11px; color:rgba(255,255,255,0.3); white-space:pre-wrap; word-break:break-all; max-height:80px; overflow-y:auto; flex-shrink:0; }', '#libtv-prompt .ltp-var-actions { display:flex; gap:6px; margin-top:auto; padding-top:10px; justify-content:flex-end; border-top:1px solid rgba(255,255,255,0.06); }', /* 调色板 */ '.ltp-pal-section { margin-bottom:14px; }', '.ltp-pal-section-title { font-size:11px; color:rgba(255,255,255,0.35); letter-spacing:0.05em; margin-bottom:8px; cursor:pointer; display:flex; align-items:center; gap:6px; user-select:none; }', '.ltp-pal-section-title::before { content:"▸"; font-size:9px; transition:transform .15s; }', '.ltp-pal-section-title.open::before { transform:rotate(90deg); }', '.ltp-pal-section-body { display:grid; grid-template-columns:repeat(auto-fill,minmax(32px,1fr)); gap:6px; }', '.ltp-pal-section-body.collapsed { display:none; }', '.ltp-pal-swatch { width:32px; height:32px; border-radius:6px; cursor:pointer; border:2px solid transparent; transition:all .15s; position:relative; }', '.ltp-pal-swatch:hover { transform:scale(1.15); border-color:rgba(255,255,255,0.4); z-index:1; }', '.ltp-pal-swatch.copied { border-color:#22c55e !important; }', '.ltp-pal-swatch .ltp-pal-tip { position:absolute; bottom:calc(100% + 4px); left:50%; transform:translateX(-50%); background:rgba(0,0,0,0.85); color:#fff; font-size:10px; padding:2px 6px; border-radius:4px; white-space:nowrap; opacity:0; pointer-events:none; transition:opacity .15s; }', '.ltp-pal-swatch:hover .ltp-pal-tip { opacity:1; }', '.ltp-pal-picker { display:flex; align-items:center; gap:12px; margin-bottom:16px; padding:12px; border-radius:10px; background:rgba(255,255,255,0.03); border:1px solid rgba(129,140,248,0.12); }', '.ltp-pal-picker input[type="color"] { width:48px; height:48px; border:none; border-radius:8px; cursor:pointer; background:none; padding:0; }', '.ltp-pal-picker input[type="color"]::-webkit-color-swatch-wrapper { padding:0; }', '.ltp-pal-picker input[type="color"]::-webkit-color-swatch { border-radius:8px; border:2px solid rgba(255,255,255,0.1); }', '.ltp-pal-info { flex:1; }', '.ltp-pal-hex { font-size:16px; font-weight:600; color:#e0e7ff; cursor:pointer; letter-spacing:0.03em; }', '.ltp-pal-hex:hover { color:#a5b4fc; }', '.ltp-pal-rgb, .ltp-pal-hsl { font-size:11px; color:rgba(255,255,255,0.35); margin-top:2px; cursor:pointer; }', '.ltp-pal-rgb:hover, .ltp-pal-hsl:hover { color:rgba(255,255,255,0.6); }', '.ltp-pal-ai { display:flex; gap:6px; align-items:center; margin-top:10px; padding:8px 10px; border-radius:8px; background:rgba(129,140,248,0.08); border:1px solid rgba(129,140,248,0.15); }', '.ltp-pal-ai-desc { flex:1; font-size:11px; color:rgba(255,255,255,0.5); line-height:1.5; }', '.ltp-pal-recent { display:flex; gap:4px; flex-wrap:wrap; margin-top:12px; }', '.ltp-pal-recent-title { width:100%; font-size:11px; color:rgba(255,255,255,0.3); margin-bottom:4px; }', '.ltp-pal-toast { position:fixed; bottom:30px; left:50%; transform:translateX(-50%); background:rgba(129,140,248,0.9); color:#fff; font-size:12px; padding:6px 16px; border-radius:8px; z-index:999999; pointer-events:none; opacity:0; transition:opacity .2s; }', '.ltp-pal-toast.show { opacity:1; }', /* 提示词悬浮按钮 */ '#libtv-pbtn {', ' transition: transform 0.2s ease !important;', ' background: #000 !important;', ' border: none !important;', ' box-shadow:', ' inset 0 0 8px #fff,', ' inset 3px 0 10px #f0f,', ' inset -3px 0 10px #0ff,', ' inset 3px 0 30px #f0f,', ' inset -3px 0 30px #0ff,', ' 0 0 8px #fff,', ' -2px 0 10px #f0f,', ' 2px 0 10px #0ff !important;', ' animation: libtv-pbtn-glow 3s ease-in-out infinite alternate !important;', '}', '@keyframes libtv-pbtn-glow {', ' 0% { box-shadow: inset 0 0 6px #fff, inset 2px 0 8px #f0f, inset -2px 0 8px #0ff, inset 2px 0 20px #f0f, inset -2px 0 20px #0ff, 0 0 6px #fff, -1px 0 8px #f0f, 1px 0 8px #0ff !important; }', ' 100% { box-shadow: inset 0 0 12px #fff, inset 4px 0 14px #f0f, inset -4px 0 14px #0ff, inset 4px 0 40px #f0f, inset -4px 0 40px #0ff, 0 0 12px #fff, -3px 0 14px #f0f, 3px 0 14px #0ff !important; }', '}', '.lt-tag-icon {', ' background:rgba(18,18,28,0.6) !important;', ' border:1px solid rgba(129,140,248,0.4);', ' color:#c7d2fe;', ' opacity:0.8;', ' box-shadow:0 1px 6px rgba(129,140,248,0.25);', ' transition:opacity 0.15s,box-shadow 0.15s,transform 0.15s,background 0.15s;', '}', '.lt-tag-icon:hover {', ' opacity:1 !important;', ' color:#fff;', ' background:rgba(129,140,248,0.18) !important;', ' border-color:rgba(129,140,248,0.7);', ' box-shadow:0 2px 10px rgba(129,140,248,0.45);', ' transform:scale(1.06);', '}', '#libtv-pbtn:hover {', ' transform: scale(1.08) !important;', '}', '#libtv-pbtn:active {', ' cursor: grabbing !important;', ' transform: scale(0.94) !important;', '}', /* 画布主题覆盖 — 仅覆盖节点/连线的颜色,不动画布背景(保留站点原生网格) */ '.react-flow__node { background: var(--node-bg) !important; border-color: var(--border-color) !important; }', '.react-flow__edge-path { stroke: var(--edge-color) !important; }', /* 标签系统 · 四层结构 */ '.lt-tag-menu { position:fixed; z-index:100000; width:520px; animation:ltFadeIn .15s ease; max-height:250px; min-width:240px; min-height:160px; background:rgba(15,15,20,0.94); backdrop-filter:blur(24px) saturate(1.3); -webkit-backdrop-filter:blur(24px) saturate(1.3); border:1px solid rgba(129,140,248,0.25); border-radius:12px; overflow:hidden; display:flex; flex-direction:column; box-shadow:0 8px 32px rgba(0,0,0,0.6),0 0 0 1px rgba(129,140,248,0.1),0 0 20px rgba(129,140,248,0.12); resize:none; }', '.lt-tag-resize { position:absolute; right:0; bottom:0; width:18px; height:18px; cursor:nwse-resize; display:flex; align-items:flex-end; justify-content:flex-end; z-index:5; touch-action:none; }', '.lt-tag-resize::after { content:""; width:9px; height:9px; margin:0 3px 3px 0; border-right:2px solid rgba(199,210,254,0.45); border-bottom:2px solid rgba(199,210,254,0.45); border-bottom-right-radius:3px; }', '.lt-tag-resize:hover::after { border-color:#818cf8; }', '.lt-tag-header { display:flex; align-items:center; gap:6px; padding:9px 10px; border-bottom:1px solid rgba(129,140,248,0.12); flex-shrink:0; }', '.lt-tag-lib { flex:0 0 auto; max-width:112px; background:rgba(129,140,248,0.1); border:1px solid rgba(129,140,248,0.2); color:#c7d2fe; border-radius:6px; padding:4px 6px; font-size:11px; outline:none; cursor:pointer; }', '.lt-tag-search { flex:1; min-width:0; background:rgba(255,255,255,0.05); border:1px solid rgba(129,140,248,0.15); color:#e0e7ff; border-radius:6px; padding:5px 8px; font-size:11px; outline:none; transition:border-color .12s; }', '.lt-tag-search:focus { border-color:#818cf8; }', '.lt-tag-refresh,.lt-tag-close { flex:0 0 auto; width:24px; height:24px; border:none; border-radius:6px; background:rgba(129,140,248,0.1); color:rgba(255,255,255,0.5); cursor:pointer; font-size:13px; line-height:1; display:flex; align-items:center; justify-content:center; transition:all .12s; }', '.lt-tag-refresh:hover,.lt-tag-close:hover { background:rgba(129,140,248,0.25); color:#fff; }', '.lt-tag-tabs { display:flex; align-items:center; gap:2px; padding:6px 8px 0; border-bottom:1px solid rgba(129,140,248,0.1); flex-shrink:0; overflow-x:auto; }', '.lt-tag-tab { padding:6px 10px 8px; cursor:pointer; font-size:11px; color:rgba(255,255,255,0.4); border-bottom:2px solid transparent; transition:all .15s; user-select:none; white-space:nowrap; }', '.lt-tag-tab:hover { color:rgba(224,231,255,0.75); }', '.lt-tag-tab.active { color:#818cf8; border-bottom-color:#818cf8; text-shadow:0 0 8px rgba(129,140,248,0.5); }', '.lt-tag-add { margin-left:auto; flex:0 0 auto; width:22px; height:22px; border-radius:6px; background:rgba(129,140,248,0.1); color:rgba(255,255,255,0.5); cursor:pointer; font-size:14px; line-height:22px; text-align:center; transition:all .12s; }', '.lt-tag-add:hover { background:rgba(129,140,248,0.25); color:#fff; }', '.lt-tag-content { flex:1; overflow-y:auto; padding:8px 10px 12px; }', '.lt-tag-recent { margin-bottom:8px; }', '.lt-tag-recent-head,.lt-tag-ins-head { font-size:11px; color:rgba(255,255,255,0.45); margin:2px 2px 6px; display:flex; align-items:center; justify-content:space-between; }', '.lt-rec-clear,.lt-ins-clear { color:rgba(255,255,255,0.3); cursor:pointer; font-size:10px; padding:1px 6px; border-radius:4px; }', '.lt-rec-clear:hover,.lt-ins-clear:hover { color:#f87171; background:rgba(239,68,68,0.12); }', '.lt-tag-group { margin-bottom:8px; border:1px solid rgba(129,140,248,0.1); border-radius:8px; overflow:hidden; background:rgba(129,140,248,0.03); }', '.lt-tag-group-head { display:flex; align-items:center; justify-content:space-between; padding:7px 10px; cursor:pointer; user-select:none; background:rgba(129,140,248,0.06); }', '.lt-tag-group-head:hover { background:rgba(129,140,248,0.12); }', '.lt-tag-group-name { font-size:11px; color:#c7d2fe; font-weight:600; letter-spacing:0.02em; }', '.lt-tag-group-actions { display:flex; align-items:center; gap:8px; }', '.lt-tag-add-item { width:18px; height:18px; border-radius:4px; background:rgba(129,140,248,0.15); color:#c7d2fe; cursor:pointer; font-size:13px; line-height:18px; text-align:center; transition:all .12s; }', '.lt-tag-add-item:hover { background:#818cf8; color:#fff; }', '.lt-tag-arrow { font-size:10px; color:rgba(255,255,255,0.4); transition:transform .15s; }', '.lt-tag-arrow.open { transform:rotate(0deg); }', '.lt-tag-arrow:not(.open) { transform:rotate(-90deg); }', '.lt-tag-group-head-static { padding:6px 10px; font-size:11px; color:#c7d2fe; font-weight:600; border-bottom:1px solid rgba(129,140,248,0.08); }', '.lt-tag-grid { display:flex; flex-wrap:wrap; align-content:flex-start; gap:6px; padding:8px; }', '.lt-tag-item { padding:5px 11px; border-radius:16px; font-size:11px; color:rgba(255,255,255,0.78); background:rgba(129,140,248,0.1); border:1px solid rgba(129,140,248,0.14); cursor:pointer; transition:all .12s; user-select:none; line-height:1.4; }', '.lt-tag-item:hover { background:rgba(129,140,248,0.28); color:#fff; border-color:rgba(129,140,248,0.4); box-shadow:0 0 10px rgba(129,140,248,0.25); transform:translateY(-1px); }', '.lt-tag-add-group-wrap { text-align:center; margin-top:6px; }', '.lt-tag-add-group { display:inline-block; padding:5px 14px; border-radius:8px; background:rgba(129,140,248,0.08); border:1px dashed rgba(129,140,248,0.3); color:rgba(199,210,254,0.7); font-size:11px; cursor:pointer; transition:all .12s; }', '.lt-tag-add-group:hover { background:rgba(129,140,248,0.2); color:#fff; }', '.lt-tag-empty,.lt-tag-search-hint { font-size:11px; color:rgba(255,255,255,0.4); padding:10px 4px; text-align:center; }', /* 管理面板 */ '.lt-mgr-overlay { position:fixed; inset:0; z-index:100001; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,0.5); backdrop-filter:blur(4px); }', '.lt-mgr-panel { width:400px; max-width:88vw; max-height:70vh; background:rgba(15,15,20,0.95); backdrop-filter:blur(32px) saturate(1.3); -webkit-backdrop-filter:blur(32px) saturate(1.3); border:1px solid rgba(129,140,248,0.2); border-radius:14px; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 16px 48px rgba(0,0,0,0.6); }', '.lt-mgr-head { display:flex; align-items:center; justify-content:space-between; padding:14px 16px 10px; border-bottom:1px solid rgba(129,140,248,0.1); font-size:13px; color:#e0e7ff; font-weight:600; flex-shrink:0; }', '.lt-mgr-body { flex:1; overflow-y:auto; padding:12px 16px; }', '.lt-mgr-foot { padding:10px 16px 14px; border-top:1px solid rgba(129,140,248,0.08); flex-shrink:0; }', '.lt-mgr-group { margin-bottom:14px; border:1px solid rgba(129,140,248,0.1); border-radius:8px; padding:10px 12px; background:rgba(129,140,248,0.03); }', '.lt-mgr-ghead { display:flex; align-items:center; gap:8px; margin-bottom:8px; }', '.lt-mgr-gname { flex:1; background:rgba(255,255,255,0.04); border:1px solid rgba(129,140,248,0.12); border-radius:5px; padding:4px 8px; font:12px/1.5 -apple-system,sans-serif; color:#d4d4d8; outline:none; transition:border-color .12s; }', '.lt-mgr-gname:focus { border-color:#818cf8; }', '.lt-tag-delg { background:none; border:none; color:rgba(239,68,68,0.5); cursor:pointer; font-size:10px; padding:2px 6px; border-radius:4px; transition:all .12s; }', '.lt-tag-delg:hover { background:rgba(239,68,68,0.15); color:#f87171; }', '.lt-mgr-item { display:flex; align-items:center; gap:6px; margin:4px 0; }', '.lt-mgr-itext { flex:1; background:rgba(255,255,255,0.04); border:1px solid rgba(129,140,248,0.1); border-radius:4px; padding:3px 8px; font:11px/1.5 -apple-system,sans-serif; color:#d4d4d8; outline:none; }', '.lt-mgr-itext:focus { border-color:#818cf8; }', '.lt-tag-deli { background:none; border:none; color:rgba(239,68,68,0.4); cursor:pointer; font-size:9px; padding:2px 4px; border-radius:3px; }', '.lt-tag-deli:hover { background:rgba(239,68,68,0.12); color:#f87171; }', '.lt-mgr-add-item { margin-top:4px; }', '/* 毛玻璃 - 节点浮动面板 */', '.react-flow__nodes .node-floating-ui > div.bg-panel-background {', ' background-color: rgba(38, 38, 38, 0.55) !important;', ' backdrop-filter: blur(20px) !important;', ' -webkit-backdrop-filter: blur(20px) !important;', ' border: 1px solid rgba(255, 255, 255, 0.08) !important;', '}', '/* 毛玻璃 - 底部导航栏 */', 'div[class*="b768:bottom-3"] {', ' background-color: rgba(38, 38, 38, 0.55) !important;', ' backdrop-filter: blur(20px) !important;', ' -webkit-backdrop-filter: blur(20px) !important;', ' border: 1px solid rgba(255, 255, 255, 0.08) !important;', '}', '/* 隐藏青色"会员超市"按钮 */', 'body.libtv-clean-home button[aria-label="会员超市"],', 'body.libtv-clean-home button[class*="text-[#05A3C5]"] {', ' display: none !important;', '}', '/* 隐藏Mantine图标按钮 */', 'body.libtv-clean-home #mantine-y9su9myak-target {', ' display: none !important;', '}', '/* 隐藏额外的Mantine图标按钮 */', 'body.libtv-clean-home #mantine-44x1mzccr-target {', ' display: none !important;', '}', '/* 隐藏"限时40折"徽章 */', 'body.libtv-clean-home [class*="bg-[#FAD6A4]"] {', ' display: none !important;', '}', '/* 隐藏导航栏右侧文字div */', 'body.libtv-clean-home div[class*="border-"][class*="topnav-btn-border"] > div.relative:first-child > div.relative:last-child {', ' display: none !important;', '}', '/* 画布背景:网格参考线 + 中心暖色辉光 */', '.react-flow__pane {', ' background-image: ', ' radial-gradient(ellipse at 50% 50%, rgba(255, 180, 80, 0.06) 0%, rgba(var(--accent-light-rgb, 129, 140, 248), 0.04) 15%, rgba(255, 140, 50, 0.02) 30%, transparent 60%),', ' repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0px, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 40px),', ' repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0px, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 40px) !important;', ' background-color: transparent !important;', '}', /* ===== 隐藏干扰元素 ===== */ 'body.libtv-clean-home header.m_3b16f56b > div.relative:first-child {', ' display: none !important;', '}', 'body.libtv-clean-home button[aria-label="会员超市"], button[class*="text-[#05A3C5]"] {', ' display: none !important;', '}', 'body.libtv-clean-home [class*="bg-[#FAD6A4]"] {', ' display: none !important;', '}', 'body.libtv-clean-home #mantine-ycmieh2cx-target,', 'body.libtv-clean-home #mantine-cdb8qursd-target,', 'body.libtv-clean-home button[aria-label="帮助信息"] {', ' display: none !important;', '}', /* 主 Banner / 横向轮播 / AI输入区 / TV Show 区域 / 底部滚动按钮 */ 'body.libtv-clean-home div.b1280\\:max-w-\\[1440px\\] > div.block,', 'body.libtv-clean-home div.b1280\\:max-w-\\[1440px\\] > div.hidden,', 'body.libtv-clean-home div.b1280\\:max-w-\\[1440px\\] > div.mx-auto,', 'body.libtv-clean-home div.b1280\\:max-w-\\[1440px\\] > div.mt-10,', 'body.libtv-clean-home div.b1280\\:max-w-\\[1440px\\] > button.border-border-default {', ' display: none !important;', '}', /* ===== 首页-个人最近项目 ===== */ 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) {', ' width: 100% !important;', ' max-width: 1200px !important;', ' height: auto !important;', ' margin: 48px auto !important;', ' padding: 0 24px !important;', '}', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) > div.b768\\:mb-4 {', ' margin-bottom: 28px !important;', ' padding: 0 4px !important;', ' display: flex !important;', ' visibility: visible !important;', ' opacity: 1 !important;', '}', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) > div.b768\\:mb-4 div.b768\\:text-\\[18px\\] {', ' font-size: 22px !important;', ' font-weight: 600 !important;', ' letter-spacing: 0.3px !important;', '}', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.scrollbar-hide {', ' display: grid !important;', ' grid-template-columns: repeat(3, 1fr) !important;', ' gap: 24px !important;', ' width: 100% !important;', ' height: auto !important;', ' min-width: 0 !important;', '}', '/* 开始创作卡片 */', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.aspect-video,', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.aspect-video > div.cursor-pointer {', ' width: 100% !important;', ' height: 320px !important;', ' max-width: 100% !important;', ' min-width: 0 !important;', '}', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.create-new-project-card {', ' width: 100% !important;', ' height: 100% !important;', ' background-color: rgba(38, 38, 38, 0.4) !important;', ' border: 2px dashed rgba(255, 255, 255, 0.12) !important;', ' border-radius: 16px !important;', ' gap: 16px !important;', ' transition: all 0.3s ease !important;', '}', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.create-new-project-card:hover {', ' background-color: rgba(38, 38, 38, 0.65) !important;', ' border-color: rgba(255, 255, 255, 0.25) !important;', '}', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.create-new-project-card div.text-fg-default {', ' font-size: 16px !important;', ' color: rgba(255, 255, 255, 0.7) !important;', ' text-align: center !important;', ' width: auto !important;', '}', '/* 项目卡片 */', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.md\\:w-auto {', ' width: 100% !important;', ' height: 320px !important;', ' max-width: 100% !important;', ' min-width: 0 !important;', '}', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.md\\:w-auto div.group {', ' width: 100% !important;', ' height: 100% !important;', ' border-radius: 16px !important;', ' overflow: hidden !important;', ' background-color: #1e1e1e !important;', ' border: 1px solid rgba(255, 255, 255, 0.06) !important;', ' transition: transform 0.3s ease, box-shadow 0.3s ease !important;', '}', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.md\\:w-auto div.group:hover {', ' transform: translateY(-4px) !important;', ' box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5) !important;', '}', '/* 封面 */', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.md\\:w-auto div.group > div:nth-of-type(1),', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.md\\:w-auto div.group div.rounded-xl,', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.md\\:w-auto div.group div.rounded-xl div.relative {', ' width: 100% !important;', ' height: 210px !important;', ' border-radius: 0 !important;', '}', '/* 底部信息 */', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.md\\:w-auto div.group div.items-top {', ' width: 100% !important;', ' height: 110px !important;', ' padding: 16px !important;', ' flex-direction: column !important;', ' align-items: flex-start !important;', ' gap: 8px !important;', '}', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.md\\:w-auto div.group div.items-top div.max-w-\\[calc\\(100\\%-34px\\)\\] {', ' width: 100% !important;', ' max-width: 100% !important;', '}', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.md\\:w-auto div.group div.items-top p.text-fg-default {', ' font-size: 15px !important;', ' font-weight: 500 !important;', ' line-height: 1.4 !important;', ' color: #f0f0f0 !important;', ' display: -webkit-box !important;', ' -webkit-line-clamp: 2 !important;', ' -webkit-box-orient: vertical !important;', ' overflow: hidden !important;', '}', 'body.libtv-clean-home div.b768\\:mb-8:nth-of-type(4) div.md\\:w-auto div.group div.items-top p.text-xs {', ' font-size: 13px !important;', ' color: #888 !important;', '}', /* ===== 全部项目 - 容器 ===== */ 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto {', ' max-width: 1800px !important;', ' padding: 0 24px !important;', ' margin: 0 auto !important;', '}', '/* 面包屑导航 */', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto > div.mb-6 {', ' margin: 28px 0 24px 0 !important;', ' justify-content: space-between !important;', ' align-items: center !important;', '}', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto > div.mb-6 div.text-base {', ' font-size: 24px !important;', ' font-weight: 600 !important;', '}', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto > div.mb-6 button.bg-btn-secondary {', ' background-color: rgba(255, 255, 255, 0.08) !important;', ' border: 1px solid rgba(255, 255, 255, 0.12) !important;', ' padding: 4px 16px !important;', ' border-radius: 8px !important;', '}', '/* 网格 */', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.b768\\:grid-cols-3 {', ' display: grid !important;', ' grid-template-columns: repeat(6, 1fr) !important;', ' gap: 16px !important;', ' width: 100% !important;', ' height: auto !important;', '}', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto input.hidden {', ' display: none !important;', '}', '/* "最近项目" 分区标题 */', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.b768\\:grid-cols-3::before {', ' content: \'最近项目\' !important;', ' grid-column: 1 / -1 !important;', ' display: block !important;', ' font-size: 18px !important;', ' font-weight: 600 !important;', ' color: rgba(255, 255, 255, 0.9) !important;', ' padding: 4px 0 !important;', ' margin-bottom: 4px !important;', '}', '/* 开始创作卡片 - 280px */', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.aspect-video {', ' width: 100% !important;', ' min-width: 0 !important;', ' height: 280px !important;', '}', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.create-new-project-card {', ' width: 100% !important;', ' height: 280px !important;', ' background-color: rgba(38, 38, 38, 0.4) !important;', ' border: 2px dashed rgba(255, 255, 255, 0.12) !important;', ' border-radius: 16px !important;', ' gap: 8px !important;', ' transition: all 0.3s ease !important;', '}', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.create-new-project-card:hover {', ' background-color: rgba(38, 38, 38, 0.65) !important;', ' border-color: rgba(255, 255, 255, 0.25) !important;', '}', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.create-new-project-card div.text-fg-default {', ' font-size: 16px !important;', ' text-align: center !important;', '}', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.create-new-project-card svg,', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.create-new-project-card div.py-2\\.5 p {', ' display: block !important;', '}', '/* 项目卡片 - 280px */', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.b768\\:grid-cols-3 > div.group {', ' border-radius: 16px !important;', ' overflow: hidden !important;', ' background-color: #1a1a1a !important;', ' border: 1px solid rgba(255, 255, 255, 0.06) !important;', ' transition: transform 0.25s ease, box-shadow 0.25s ease !important;', ' width: 100% !important;', ' min-width: 0 !important;', ' height: 280px !important;', '}', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.b768\\:grid-cols-3 > div.group:hover {', ' transform: translateY(-3px) !important;', ' box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;', '}', '/* 封面 - 170px */', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.b768\\:grid-cols-3 > div.group > div:nth-of-type(1) {', ' width: 100% !important;', ' height: 170px !important;', ' overflow: hidden !important;', '}', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.b768\\:grid-cols-3 > div.group div.aspect-video {', ' width: 100% !important;', ' height: 170px !important;', '}', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.b768\\:grid-cols-3 > div.group img {', ' width: 100% !important;', ' height: 100% !important;', ' object-fit: cover !important;', '}', '/* 底部信息 - 110px */', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.b768\\:grid-cols-3 > div.group div.items-top {', ' width: 100% !important;', ' padding: 14px 16px !important;', ' height: 110px !important;', '}', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.b768\\:grid-cols-3 > div.group div.items-top p.text-fg-default {', ' font-size: 13px !important;', ' font-weight: 500 !important;', ' color: #eee !important;', ' line-height: 1.3 !important;', ' white-space: nowrap !important;', ' overflow: hidden !important;', ' text-overflow: ellipsis !important;', ' display: -webkit-box !important;', ' -webkit-line-clamp: 2 !important;', ' -webkit-box-orient: vertical !important;', '}', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.b768\\:grid-cols-3 > div.group div.items-top p.text-xs {', ' font-size: 11px !important;', ' color: #888 !important;', '}', '/* 分割线 + "所有项目" 标题 */', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.b768\\:grid-cols-3 > div.group:nth-of-type(12) {', ' position: relative !important;', '}', 'body.libtv-clean-home div.b768\\:px-\\[10px\\] > div.mx-auto div.b768\\:grid-cols-3 > div.group:nth-of-type(12)::after {', ' content: \'所有项目\' !important;', ' position: absolute !important;', ' bottom: -52px !important;', ' left: -1200% !important;', ' width: 5000px !important;', ' padding-top: 28px !important;', ' font-size: 18px !important;', ' font-weight: 600 !important;', ' color: rgba(255, 255, 255, 0.9) !important;', ' border-top: 1px solid rgba(255, 255, 255, 0.10) !important;', ' pointer-events: none !important;', '}', '/* ⚙ 设置面板 */', '.lt-settings { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); animation:ltFadeIn .15s ease; z-index:100002; width:440px; max-width:90vw; max-height:80vh; background:rgba(15,15,20,0.96); backdrop-filter:blur(32px) saturate(1.3); -webkit-backdrop-filter:blur(32px) saturate(1.3); border:1px solid rgba(129,140,248,0.2); border-radius:14px; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 16px 48px rgba(0,0,0,0.6); }', '.lt-settings-head { display:flex; align-items:center; justify-content:space-between; padding:16px 18px 10px; border-bottom:1px solid rgba(129,140,248,0.1); font-size:14px; color:#e0e7ff; font-weight:600; flex-shrink:0; letter-spacing:0.02em; }', '.lt-settings-close { cursor:pointer; font-size:16px; color:rgba(255,255,255,0.2); transition:color .15s; line-height:1; }', '.lt-settings-close:hover { color:#818cf8; }', '.lt-settings-body { flex:1; overflow-y:auto; padding:4px 18px 18px; }', '.lt-settings-sec { margin-top:16px; }', '.lt-settings-stitle { font-size:11px; color:rgba(129,140,248,0.5); margin-bottom:8px; letter-spacing:0.04em; text-transform:uppercase; }', '.lt-settings-toggle { display:flex; align-items:center; justify-content:space-between; padding:8px 0; cursor:pointer; border-bottom:1px solid rgba(255,255,255,0.03); }', '.lt-settings-toggle span:first-child { font-size:13px; color:rgba(255,255,255,0.55); }', '.lt-settings-switch { width:36px; height:20px; border-radius:10px; background:rgba(255,255,255,0.1); position:relative; transition:background .2s; flex-shrink:0; }', '.lt-settings-switch::after { content:\'\'; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#fff; transition:transform .2s; }', '.lt-settings-switch.on { background:#818cf8; }', '.lt-settings-switch.on::after { transform:translateX(16px); }', '.lt-settings-row { display:flex; align-items:center; gap:8px; margin-bottom:6px; }', '.lt-settings-row label { font-size:11px; color:rgba(255,255,255,0.3); min-width:60px; flex-shrink:0; }', '.lt-settings-inp { flex:1; background:rgba(255,255,255,0.04); border:1px solid rgba(129,140,248,0.12); border-radius:6px; padding:7px 10px; font:12px/1.4 -apple-system,sans-serif; color:#d4d4d8; outline:none; transition:border-color .12s; }', '.lt-settings-inp:focus { border-color:#818cf8; }', '.lt-settings-status { font-size:11px; color:rgba(74,222,128,0.7); margin-left:8px; }', '.lt-settings-dlist { margin-bottom:8px; }', '.lt-settings-ditem { display:flex; align-items:center; gap:6px; padding:5px 0; border-bottom:1px solid rgba(255,255,255,0.02); font-size:11px; }', '.lt-settings-ditem span:first-child { flex:1; color:rgba(255,255,255,0.35); }', '.lt-settings-ditem span:nth-child(2) { color:rgba(255,255,255,0.15); min-width:40px; text-align:right; }', '.lt-settings-dclear { background:none; border:none; color:rgba(239,68,68,0.4); cursor:pointer; font-size:10px; padding:1px 6px; border-radius:3px; transition:all .12s; }', '.lt-settings-dclear:hover { background:rgba(239,68,68,0.12); color:#f87171; }', '.lt-settings-about { font-size:11px; color:rgba(255,255,255,0.2); line-height:1.6; margin-top:4px; }', '.lt-settings-cpbtns { display:flex; gap:6px; margin-top:8px; }', /* 面板打开时画布压暗 */ 'body:has(#libtv-prompt) .react-flow__renderer, body:has(#lt-settings) .react-flow__renderer {', ' transition: filter 0.3s ease;', ' filter: brightness(0.7) saturate(0.5);', '}', 'body:has(#libtv-prompt) .react-flow__background, body:has(#lt-settings) .react-flow__background {', ' opacity: 0.3; transition: opacity 0.3s ease;', '}', '.lt-settings-btn { display:inline-flex; align-items:center; gap:4px; padding:6px 12px; border-radius:7px; border:none; cursor:pointer; font:12px/1.4 -apple-system,sans-serif; transition:all .15s; }', '.lt-settings-btn-primary { background:#6366f1; color:#fff; }', '.lt-settings-btn-primary:hover { background:#818cf8; }', '.lt-settings-btn-ghost { background:rgba(255,255,255,0.05); color:rgba(255,255,255,0.55); border:1px solid rgba(255,255,255,0.06); }', '.lt-settings-btn-ghost:hover { background:rgba(255,255,255,0.1); color:#fff; }', '.lt-settings-btn-sm { padding:4px 10px; font-size:11px; }', /* Toast 通知 */ '.lt-toast { position:fixed; bottom:24px; right:24px; z-index:999999; padding:10px 18px; border-radius:10px; font:13px/1.4 -apple-system,sans-serif; color:#fff; backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); box-shadow:0 4px 20px rgba(0,0,0,0.3); transform:translateY(20px); opacity:0; transition:all .25s ease; pointer-events:none; }', '.lt-toast.show { transform:translateY(0); opacity:1; }', '.lt-toast-success { background:rgba(16,185,129,0.9); }', '.lt-toast-error { background:rgba(239,68,68,0.9); }', '.lt-toast-info { background:rgba(99,102,241,0.9); }', '', ].join('\n'); document.head.appendChild(style); /* ========================================================= * 2. FPS 面板 * ========================================================= */ var fpsEl = document.createElement('div'); fpsEl.id = 'libtv-fps'; fpsEl.textContent = 'FPS: --'; document.body.appendChild(fpsEl); var helpEl = document.createElement('div'); helpEl.id = 'libtv-help'; helpEl.classList.add('libtv-hide'); helpEl.textContent = '画布\n G 网格 T 性能 H 隐藏 L 连线\n C 全链 R 直角 X 专注\n工具\n F 搜索 P 提示词 N 清爽 ? 帮助'; document.body.appendChild(helpEl); function _showHelp(){ if(helpEl) helpEl.classList.remove('libtv-hide'); } function _hideHelp(){ if(helpEl && !helpEl.classList.contains('libtv-pin')) helpEl.classList.add('libtv-hide'); } if(fpsEl){ fpsEl.addEventListener('mouseenter', _showHelp); fpsEl.addEventListener('mouseleave', _hideHelp); } var _fc = 0, _lastT = performance.now(), _fps = 0; // FPS 拖拽 (function(){ var dx = 0, dy = 0, dragging = false; fpsEl.addEventListener('mousedown', function(e){ dragging = true; dx = e.clientX - fpsEl.offsetLeft; dy = e.clientY - fpsEl.offsetTop; e.preventDefault(); }); document.addEventListener('mousemove', function(e){ if(!dragging) return; var l = e.clientX - dx, t = e.clientY - dy; var pw = fpsEl.offsetWidth, ph = fpsEl.offsetHeight; l = Math.max(4, Math.min(l, window.innerWidth - pw - 4)); t = Math.max(4, Math.min(t, window.innerHeight - ph - 4)); fpsEl.style.left = l + 'px'; fpsEl.style.top = t + 'px'; fpsEl.style.bottom = 'auto'; fpsEl.style.right = 'auto'; }); document.addEventListener('mouseup', function(){ dragging = false; }); })(); function fpsLoop(now){ _fc++; if (now - _lastT >= 1000){ _fps = Math.round(_fc * 1000 / (now - _lastT)); var flags = '', zoom = ''; var bg = document.querySelector('.react-flow__background'); if (bg && bg.classList.contains('perf-no-grid')) flags += '■'; if (document.body.classList.contains('perf-mode')) flags += '◆'; if (document.body.classList.contains('perf-hide-imgs')) flags += '⊙'; var edges = document.querySelector('.react-flow__edges'); if (edges && edges.classList.contains('perf-hide-edges')) flags += '╳'; if (document.body.classList.contains('libtv-chain')) flags += '◉'; if (document.body.classList.contains('libtv-autochain')) flags += '⟷'; if (document.body.classList.contains('libtv-focus')) flags += '◎'; if (document.body.classList.contains('libtv-step-edges')) flags += '└'; if (document.body.classList.contains('libtv-clean-home')) flags += '♡'; var nTotal = document.querySelectorAll('.react-flow__node').length; // 缩放级别 var vp = document.querySelector('.react-flow__viewport'); if(vp){ var m = (vp.style.transform || '').match(/scale\(([^)]+)\)/); if(m) zoom = Math.round(parseFloat(m[1]) * 100) + '%'; } fpsEl.innerHTML = '' + _fps + 'fps' + (zoom ? '|' + zoom + '' : '') + '|' + nTotal + '节点' + (flags ? '|' + flags : ''); _fc = 0; _lastT = now; } requestAnimationFrame(fpsLoop); } requestAnimationFrame(fpsLoop); /* ========================================================= * 流动光效 — 全屏 SVG overlay,不碰节点 DOM * ========================================================= */ (function(){ var svgNS='http://www.w3.org/2000/svg'; var overlay=document.createElementNS(svgNS,'svg'); overlay.id='libtv-glow'; overlay.style.cssText='position:fixed;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:50;'; document.body.appendChild(overlay); var glowDefs=document.createElementNS(svgNS,'defs'); var filter=document.createElementNS(svgNS,'filter'); filter.setAttribute('id','glowBlur'); filter.setAttribute('x','-50%');filter.setAttribute('y','-50%'); filter.setAttribute('width','200%');filter.setAttribute('height','200%'); var blur=document.createElementNS(svgNS,'feGaussianBlur'); blur.setAttribute('stdDeviation','6'); filter.appendChild(blur); glowDefs.appendChild(filter); overlay.appendChild(glowDefs); var animGroup=document.createElementNS(svgNS,'g'); overlay.appendChild(animGroup); var prevNodes=new Set(); var animRaf=null; function readAccent(){ var n=document.querySelector('.react-flow__node'); if(!n)return{accent:'#6366f1',accentLight:'#818cf8'}; var s=getComputedStyle(n); return{ accent:s.getPropertyValue('--accent').trim()||'#6366f1', accentLight:s.getPropertyValue('--accent-light').trim()||'#818cf8' }; } function buildFrame(){ while(animGroup.firstChild)animGroup.removeChild(animGroup.firstChild); var nodes=document.querySelectorAll('.react-flow__node.selected'); if(!nodes.length){prevNodes.clear();return;} var c=readAccent(); var now=performance.now(); nodes.forEach(function(node){ var r=node.getBoundingClientRect(); var w=r.width,h=r.height; var cssW=node.offsetWidth||w,cssH=node.offsetHeight||h; var zoomX=cssW?w/cssW:1,zoomY=cssH?h/cssH:1; var zoom=Math.min(zoomX,zoomY); var cssBr=parseFloat(getComputedStyle(node).borderRadius)||12; var br=cssBr*zoom; var perim=2*(w+h); var dash=Math.round(perim*0.12),gap=perim-dash; function mkRect(stroke,sw){ var el=document.createElementNS(svgNS,'rect'); el.setAttribute('x',0);el.setAttribute('y',0); el.setAttribute('width',w);el.setAttribute('height',h); el.setAttribute('rx',br);el.setAttribute('fill','none'); el.setAttribute('stroke',stroke);el.setAttribute('stroke-width',sw); el.setAttribute('stroke-dasharray',dash+' '+gap); return el; } var g1=mkRect(c.accentLight,8); g1.setAttribute('filter','url(#glowBlur)'); var g2=mkRect('#fff',2); var p=((now%7000)/7000); var off=Math.round(p*perim); g1.setAttribute('stroke-dashoffset',off); g2.setAttribute('stroke-dashoffset',off); var wrap=document.createElementNS(svgNS,'g'); wrap.setAttribute('transform','translate('+r.left+','+r.top+')'); wrap.appendChild(g1); wrap.appendChild(g2); animGroup.appendChild(wrap); }); } function loop(){buildFrame();animRaf=requestAnimationFrame(loop);} loop(); })(); /* ========================================================= * AI Agent Drawer 适配 — 动态读宽度右推 * ========================================================= */ (function(){ var drawerSel = '.canvas-agent-drawer-chat'; function drawerEl(){ return document.querySelector(drawerSel) || document.querySelector('.mantine-Drawer-content.canvas-agent-drawer-chat'); } function adjust(){ var el = drawerEl(), dw = el ? el.offsetWidth : 0; var fps = document.getElementById('libtv-fps'); var pbtn = document.getElementById('libtv-pbtn'); if(dw > 0 && el.getBoundingClientRect().right > window.innerWidth / 2){ /* Drawer on right — shift our elements if they're still in default right position (not dragged) */ var gap = 16; [fps, pbtn].forEach(function(x){ if(x && !x.style.left){ if(!x._dd){ x._dd = true; x._dr = x.style.right; x._db = x.style.bottom; } x.style.right = (dw + gap + (x === pbtn ? 46 : 0)) + 'px'; } }); } else if(dw === 0){ [fps, pbtn].forEach(function(x){ if(x && x._dd){ x.style.right = x._dr; x.style.bottom = x._db; delete x._dd; delete x._dr; delete x._db; } }); } } var obs = new MutationObserver(function(){ if(obs._t) clearTimeout(obs._t); obs._t = setTimeout(adjust, 50); }); obs.observe(document.body, { childList: true, subtree: true }); window.addEventListener('resize', function(){ if(drawerEl()) setTimeout(adjust, 50); }); setTimeout(adjust, 500); })(); /* ========================================================= * 3. 快捷键 + 状态持久化 * ========================================================= */ var hook = document.createElement('script'); hook.textContent = [ '(function(){', /* ———— 链高亮引擎 ———— */ ' function _ltClearChain(){', ' document.body.classList.remove("libtv-chain");', ' document.querySelectorAll(".libtv-chain-node,.libtv-chain-edge").forEach(function(e){', ' e.classList.remove("libtv-chain-node","libtv-chain-edge");', ' });', ' };', ' var _ltAutoChain=localStorage.getItem("_lt_autochain")==="1";', ' if(_ltAutoChain) document.body.classList.add("libtv-autochain");', ' var _ltGraphCache=null;', ' function _ltGetGraph(){', ' if(!_ltGraphCache){', ' var up={},down={};', ' document.querySelectorAll(".react-flow__edge").forEach(function(e){', ' var lb=e.getAttribute("aria-label")||"",m=lb.match(/^Edge from (\\S+) to (\\S+)$/);', ' if(!m)return;', ' var s=m[1],t=m[2];', ' if(!down[s])down[s]=[]; down[s].push(t);', ' if(!up[t])up[t]=[]; up[t].push(s);', ' });', ' _ltGraphCache={up:up,down:down};', ' }', ' return _ltGraphCache;', ' }', ' function _ltInvalidateGraph(){_ltGraphCache=null;}', ' document.addEventListener("click",function(e){', ' _ltInvalidateGraph();', ' if(!_ltAutoChain) return;', ' if(!e.target.closest(".react-flow__node")){', ' _ltClearChain(); return;', ' }', ' setTimeout(function(){', ' if(document.querySelector(".react-flow__node.selected")){', ' var g=_ltGetGraph(),sid=document.querySelector(".react-flow__node.selected").getAttribute("data-id")||"";', ' if(!sid||!g)return;', ' var v={},q=[sid]; v[sid]=1;', ' while(q.length){', ' var c=q.shift();', ' (g.up[c]||[]).forEach(function(n){if(!v[n]){v[n]=1;q.push(n);}});', ' (g.down[c]||[]).forEach(function(n){if(!v[n]){v[n]=1;q.push(n);}});', ' }', ' document.querySelectorAll(".react-flow__node").forEach(function(n){', ' n.classList[(v[n.getAttribute("data-id")||n.id||""])?"add":"remove"]("libtv-chain-node");', ' });', ' document.querySelectorAll(".react-flow__edge").forEach(function(e){', ' var lb=e.getAttribute("aria-label")||"",m=lb.match(/^Edge from (\\S+) to (\\S+)$/);', ' e.classList[(m&&v[m[1]]&&v[m[2]])?"add":"remove"]("libtv-chain-edge");', ' });', ' document.body.classList.add("libtv-chain");', ' }', ' }, 50);', ' }, true);', /* ———— 连线 hover 高亮 ———— */ ' document.addEventListener("mouseover",function(e){', ' var n=e.target.closest(".react-flow__node");', ' if(!n)return;', ' var id=n.getAttribute("data-id")||n.id||""; if(!id)return;', ' document.querySelectorAll(".react-flow__edge").forEach(function(ed){', ' var lb=ed.getAttribute("aria-label")||"",m=lb.match(/^Edge from (\\S+) to (\\S+)$/);', ' if(m&&(m[1]===id||m[2]===id)) ed.classList.add("libtv-edge-active");', ' });', ' },true);', ' document.addEventListener("mouseout",function(e){', ' if(!e.target.closest(".react-flow__node"))return;', ' document.querySelectorAll(".react-flow__edge.libtv-edge-active").forEach(function(ed){', ' ed.classList.remove("libtv-edge-active");', ' });', ' },true);', /* ———— 节点搜索 ———— */ ' function _ltSearch(){', ' var overlay=document.getElementById("libtv-search");', ' if(overlay){ overlay.remove(); return; }', ' var items=[];', ' document.querySelectorAll(".react-flow__node").forEach(function(n){', ' var id=n.getAttribute("data-id")||n.id||"";', ' if(!id)return;', ' var txt=(n.textContent||"").trim().split("\\n")[0].trim().slice(0,50);', ' items.push({id:id,name:txt||id,el:n});', ' });', ' var div=document.createElement("div");', ' div.id="libtv-search";', ' div.style.cssText="position:fixed;top:60px;right:20px;z-index:99999;background:rgba(0,0,0,0.9);border-radius:10px;padding:10px;width:280px;max-height:60vh;overflow:auto;font:12px/1.5 sans-serif;";', ' div.innerHTML="
";', ' document.body.appendChild(div);', ' function render(q){', ' var q=(q||"").toLowerCase(),html="";', ' items.forEach(function(it){', ' if(!q||it.name.toLowerCase().indexOf(q)>=0||it.id.toLowerCase().indexOf(q)>=0){', ' html+="