/* ST-BME 样式 */ .st-bme-settings { --bme-accent: #e94560; --bme-accent-dim: rgba(233, 69, 96, 0.15); --bme-surface: rgba(255, 255, 255, 0.03); --bme-border: rgba(255, 255, 255, 0.08); } .st-bme-section { padding: 8px 0; } .st-bme-section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--bme-accent); margin: 0 0 8px 0; font-weight: 600; } .st-bme-section-title i { margin-right: 4px; } .st-bme-hr { border: none; border-top: 1px solid var(--bme-border); margin: 4px 0; } .st-bme-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; } .st-bme-row label { font-size: 12px; flex-shrink: 0; min-width: 100px; } .st-bme-row .text_pole { max-width: 180px; } .st-bme-row .checkbox_label { justify-content: flex-start; gap: 8px; } .st-bme-row.st-bme-indent { padding-left: 24px; } .st-bme-btn-group { display: flex; gap: 6px; margin: 4px 0; } .st-bme-btn-group .menu_button { flex: 1; font-size: 12px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--bme-border); transition: all 0.2s ease; } .st-bme-btn-group .menu_button:hover { border-color: var(--bme-accent); background: var(--bme-accent-dim); } .st-bme-btn-group .menu_button i { margin-right: 4px; } /* v2: 子分区 */ .st-bme-subsection { position: relative; padding: 6px 0 6px 4px; margin: 4px 0; border-left: 2px solid var(--bme-border); } /* v2: 优先级 badge */ .st-bme-badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; padding: 1px 6px; border-radius: 3px; margin-bottom: 4px; } .st-bme-badge-p0 { background: rgba(233, 69, 96, 0.25); color: #e94560; border: 1px solid rgba(233, 69, 96, 0.4); } .st-bme-badge-p1 { background: rgba(255, 193, 7, 0.2); color: #ffc107; border: 1px solid rgba(255, 193, 7, 0.35); } .st-bme-badge-p2 { background: rgba(76, 175, 80, 0.15); color: #66bb6a; border: 1px solid rgba(76, 175, 80, 0.3); } /* v2: 技术来源提示 */ .st-bme-hint { font-size: 10px; color: rgba(255, 255, 255, 0.35); font-style: italic; } /* ==================== 操控面板 ==================== */ /* --- Overlay --- */ #st-bme-panel-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; } #st-bme-panel-overlay.active { opacity: 1; pointer-events: auto; } /* --- Panel Container --- */ #st-bme-panel { width: 82vw; height: 72vh; max-width: 1200px; max-height: 800px; background: var(--bme-surface, #131316); border: 1px solid var(--bme-border, rgba(255,255,255,0.08)); border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5); transform: translateY(12px) scale(0.98); transition: transform 0.25s ease; } #st-bme-panel-overlay.active #st-bme-panel { transform: translateY(0) scale(1); } /* --- Header --- */ .bme-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--bme-surface-container, #1f1f22); border-bottom: 1px solid var(--bme-border, rgba(255,255,255,0.08)); flex-shrink: 0; } .bme-panel-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--bme-primary, #e94560); } .bme-panel-title i { font-size: 16px; } .bme-panel-subtitle { font-size: 11px; color: var(--bme-on-surface-dim, rgba(228,225,230,0.6)); margin-left: 8px; font-weight: 400; } .bme-panel-close { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--bme-on-surface-dim); cursor: pointer; border-radius: 4px; font-size: 14px; transition: all 0.15s; } .bme-panel-close:hover { background: var(--bme-surface-highest); color: var(--bme-on-surface); } /* --- Body (Desktop twin-panel) --- */ .bme-panel-body { display: flex; flex: 1; overflow: hidden; } /* --- Sidebar (Desktop) --- */ .bme-panel-sidebar { width: 280px; min-width: 280px; display: flex; flex-direction: column; background: var(--bme-surface-container, #1f1f22); border-right: 1px solid var(--bme-border); overflow: hidden; } /* --- Tab List (Sidebar vertical) --- */ .bme-tab-list { display: flex; gap: 2px; padding: 8px 8px 0; flex-shrink: 0; } .bme-tab-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 8px 4px; border: none; background: transparent; color: var(--bme-on-surface-dim); font-size: 11px; cursor: pointer; border-bottom: 2px solid transparent; border-radius: 4px 4px 0 0; transition: all 0.15s; white-space: nowrap; } .bme-tab-btn:hover { color: var(--bme-on-surface); background: var(--bme-surface-high); } .bme-tab-btn.active { color: var(--bme-primary); border-bottom-color: var(--bme-primary); background: var(--bme-surface-high); } .bme-tab-btn i { font-size: 12px; } /* --- Tab Content --- */ .bme-tab-content { flex: 1; overflow-y: auto; padding: 12px; } .bme-tab-pane { display: none; } .bme-tab-pane.active { display: block; } /* --- Stats Grid --- */ .bme-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; } .bme-stat-card { background: var(--bme-surface-low, #1b1b1e); border: 1px solid var(--bme-border); border-radius: 6px; padding: 10px; } .bme-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--bme-on-surface-dim); margin-bottom: 4px; } .bme-stat-value { font-size: 20px; font-weight: 700; color: var(--bme-primary); font-feature-settings: 'tnum'; } .bme-stat-value.warning { color: var(--bme-accent3, #ffc107); } /* --- Section Headers --- */ .bme-section-header { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--bme-on-surface-dim); margin: 12px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--bme-border); } /* --- Recent List --- */ .bme-recent-list { list-style: none; padding: 0; margin: 0; } .bme-recent-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; cursor: pointer; border-radius: 4px; transition: background 0.1s; } .bme-recent-item:hover { background: var(--bme-surface-high); } .bme-type-badge { display: inline-block; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; flex-shrink: 0; margin-top: 2px; } .bme-type-badge.character { background: var(--bme-node-character); color: #000; } .bme-type-badge.event { background: var(--bme-node-event); color: #000; } .bme-type-badge.location { background: var(--bme-node-location); color: #000; } .bme-type-badge.thread { background: var(--bme-node-thread); color: #000; } .bme-type-badge.rule { background: var(--bme-node-rule); color: #fff; } .bme-type-badge.synopsis { background: var(--bme-node-synopsis); color: #000; } .bme-recent-text { font-size: 12px; color: var(--bme-on-surface); line-height: 1.3; } .bme-recent-meta { font-size: 10px; color: var(--bme-on-surface-dim); margin-top: 2px; } /* --- Main (Graph) Area --- */ .bme-panel-main { flex: 1; display: flex; flex-direction: column; position: relative; background: var(--bme-surface-lowest, #0e0e11); overflow: hidden; } .bme-graph-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; background: var(--bme-surface, #131316); border-bottom: 1px solid var(--bme-border); flex-shrink: 0; } .bme-graph-toolbar-title { font-size: 11px; color: var(--bme-primary); display: flex; align-items: center; gap: 6px; } .bme-graph-controls { display: flex; gap: 4px; } .bme-graph-controls button { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--bme-border); border-radius: 4px; background: var(--bme-surface-container); color: var(--bme-on-surface-dim); cursor: pointer; font-size: 11px; transition: all 0.15s; } .bme-graph-controls button:hover { border-color: var(--bme-primary); color: var(--bme-primary); } #bme-graph-canvas { flex: 1; width: 100%; cursor: grab; } #bme-graph-canvas:active { cursor: grabbing; } /* --- Graph Legend --- */ .bme-graph-legend { display: flex; gap: 12px; padding: 6px 12px; background: var(--bme-surface, #131316); border-top: 1px solid var(--bme-border); flex-shrink: 0; flex-wrap: wrap; } .bme-legend-item { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--bme-on-surface-dim); } .bme-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } /* --- Status Bar --- */ .bme-graph-statusbar { display: flex; align-items: center; justify-content: space-between; padding: 4px 12px; background: var(--bme-surface-container); border-top: 1px solid var(--bme-border); font-size: 10px; color: var(--bme-on-surface-dim); flex-shrink: 0; } .bme-status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--bme-accent2, #4edea3); margin-right: 4px; } /* --- Memory Browser Tab --- */ .bme-search-bar { display: flex; gap: 6px; margin-bottom: 10px; } .bme-search-input { flex: 1; background: var(--bme-surface-lowest); border: 1px solid var(--bme-border); border-radius: 4px; padding: 6px 10px; font-size: 12px; color: var(--bme-on-surface); outline: none; transition: border-color 0.15s; } .bme-search-input:focus { border-color: var(--bme-primary); box-shadow: 0 0 4px var(--bme-primary-dim); } .bme-search-input::placeholder { color: var(--bme-on-surface-dim); } .bme-filter-select { background: var(--bme-surface-lowest); border: 1px solid var(--bme-border); border-radius: 4px; padding: 4px 8px; font-size: 11px; color: var(--bme-on-surface); outline: none; } .bme-memory-list { list-style: none; padding: 0; margin: 0; } .bme-memory-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px; border-radius: 4px; margin-bottom: 3px; cursor: pointer; transition: background 0.1s; border: 1px solid transparent; } .bme-memory-item:hover { background: var(--bme-surface-high); border-color: var(--bme-border); } .bme-memory-item.selected { background: var(--bme-primary-dim); border-color: var(--bme-primary); } .bme-memory-name { font-size: 12px; font-weight: 600; color: var(--bme-on-surface); } .bme-memory-content { font-size: 11px; color: var(--bme-on-surface-dim); margin-top: 2px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .bme-memory-meta { display: flex; gap: 8px; margin-top: 4px; font-size: 10px; color: var(--bme-on-surface-dim); } /* --- Injection Preview Tab --- */ .bme-injection-preview { font-family: 'Cascadia Code', 'Fira Code', monospace; font-size: 11px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; background: var(--bme-surface-lowest); border: 1px solid var(--bme-border); border-radius: 4px; padding: 12px; color: var(--bme-on-surface); max-height: 100%; overflow-y: auto; } .bme-injection-section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 6px; border-radius: 3px; display: inline-block; margin-bottom: 6px; } .bme-injection-section-label.core { background: var(--bme-primary-dim); color: var(--bme-primary); } .bme-injection-section-label.recall { background: rgba(76, 175, 80, 0.15); color: var(--bme-accent2); } .bme-injection-token-count { font-size: 11px; color: var(--bme-on-surface-dim); margin-top: 8px; text-align: right; } /* --- Actions Tab --- */ .bme-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .bme-action-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; background: var(--bme-surface-low); border: 1px solid var(--bme-border); border-radius: 6px; color: var(--bme-on-surface-dim); cursor: pointer; font-size: 11px; transition: all 0.15s; } .bme-action-btn:hover { border-color: var(--bme-primary); color: var(--bme-primary); background: var(--bme-primary-dim); } .bme-action-btn i { font-size: 18px; } .bme-action-btn.danger:hover { border-color: #ff5252; color: #ff5252; background: rgba(255, 82, 82, 0.1); } /* --- Config Tab --- */ .bme-config-card { background: var(--bme-surface-low); border: 1px solid var(--bme-border); border-radius: 8px; padding: 12px; margin-bottom: 10px; } .bme-config-help { font-size: 11px; line-height: 1.5; color: var(--bme-on-surface-dim); margin-bottom: 10px; } .bme-config-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; } .bme-config-row.inline { flex-direction: row; align-items: center; } .bme-config-row label { font-size: 11px; color: var(--bme-on-surface); } .bme-config-input, .bme-config-textarea { width: 100%; background: var(--bme-surface-lowest); border: 1px solid var(--bme-border); border-radius: 6px; padding: 8px 10px; color: var(--bme-on-surface); font-size: 12px; outline: none; transition: border-color 0.15s, box-shadow 0.15s; } .bme-config-input:focus, .bme-config-textarea:focus { border-color: var(--bme-primary); box-shadow: 0 0 0 2px var(--bme-primary-dim); } .bme-config-textarea { min-height: 140px; resize: vertical; line-height: 1.5; font-family: 'Cascadia Code', 'Fira Code', monospace; } .bme-prompt-group { margin-top: 8px; border: 1px solid var(--bme-border); border-radius: 6px; overflow: hidden; } .bme-prompt-group summary { padding: 8px 12px; cursor: pointer; font-size: 12px; font-weight: 500; color: var(--bme-on-surface); background: var(--bme-surface-lowest); user-select: none; transition: background 0.15s; } .bme-prompt-group summary:hover { background: var(--bme-surface-low); } .bme-prompt-group[open] summary { border-bottom: 1px solid var(--bme-border); } .bme-prompt-group .bme-config-textarea { border: none; border-radius: 0; min-height: 120px; } .bme-config-actions { display: flex; justify-content: flex-end; gap: 8px; } /* --- Mobile Bottom Tab Bar --- */ .bme-panel-tabbar { display: none; border-top: 1px solid var(--bme-border); background: var(--bme-surface-container); flex-shrink: 0; } .bme-panel-tabbar .bme-tab-btn { flex: 1; flex-direction: column; padding: 6px 4px; font-size: 10px; border-bottom: none; border-radius: 0; border-top: 2px solid transparent; min-height: 48px; } .bme-panel-tabbar .bme-tab-btn.active { border-top-color: var(--bme-primary); border-bottom-color: transparent; } .bme-panel-tabbar .bme-tab-btn i { font-size: 16px; margin-bottom: 2px; } /* --- Node Detail Panel (sidebar overlay) --- */ .bme-node-detail { position: absolute; top: 0; right: 0; width: 280px; height: 100%; background: var(--bme-surface-container); border-left: 1px solid var(--bme-border); padding: 12px; overflow-y: auto; transform: translateX(100%); transition: transform 0.2s ease; z-index: 10; } .bme-node-detail.open { transform: translateX(0); } .bme-node-detail-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; } .bme-node-detail h3 { font-size: 14px; color: var(--bme-on-surface); margin: 0; } .bme-node-detail-field { margin-bottom: 8px; } .bme-node-detail-field label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--bme-on-surface-dim); margin-bottom: 3px; } .bme-node-detail-field .value { font-size: 12px; color: var(--bme-on-surface); line-height: 1.4; } /* --- Scrollbar --- */ .bme-tab-content::-webkit-scrollbar, .bme-injection-preview::-webkit-scrollbar, .bme-node-detail::-webkit-scrollbar { width: 4px; } .bme-tab-content::-webkit-scrollbar-track, .bme-injection-preview::-webkit-scrollbar-track, .bme-node-detail::-webkit-scrollbar-track { background: transparent; } .bme-tab-content::-webkit-scrollbar-thumb, .bme-injection-preview::-webkit-scrollbar-thumb, .bme-node-detail::-webkit-scrollbar-thumb { background: var(--bme-surface-highest); border-radius: 2px; } /* 移动端图谱预览 - 桌面端默认隐藏 */ .bme-mobile-graph-preview, .bme-mobile-graph-status { display: none; } /* ==================== 响应式 ==================== */ @media (max-width: 768px) { #st-bme-panel { width: 100vw; height: 100vh; max-width: none; max-height: none; border-radius: 0; } .bme-panel-body { flex-direction: column; } /* 手机端:sidebar 全宽显示,成为主内容区 */ .bme-panel-sidebar { width: 100%; min-width: unset; flex: 1; border-right: none; } /* 隐藏 sidebar 顶部 tab 列表,改用底部 tab bar */ .bme-panel-sidebar > .bme-tab-list { display: none; } /* 手机端 tab content 撑满剩余空间 */ .bme-tab-content { padding: 12px 14px; } /* 手机端:隐藏桌面端图谱区(大图谱) */ .bme-panel-main { display: none; } /* 手机端底部 Tab Bar 显示 */ .bme-panel-tabbar { display: flex; } /* 总览 Tab: 统计卡横向滚动 */ .bme-stats-grid { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; } .bme-stats-grid .bme-stat-card { min-width: 105px; flex-shrink: 0; } /* 搜索栏改为纵向堆叠 */ .bme-search-bar { flex-direction: column; } .bme-filter-select { width: 100%; } /* 操作按钮放大触控区域 */ .bme-action-btn { padding: 18px 8px; font-size: 12px; } .bme-action-btn i { font-size: 22px; } /* 节点详情:手机端全宽覆盖 */ .bme-node-detail { width: 100%; } .bme-graph-legend { font-size: 9px; } /* 手机端图谱预览(嵌在总览 Tab 内) */ .bme-mobile-graph-preview { display: block; height: 200px; border-radius: 6px; overflow: hidden; margin: 8px 0 0; border: 1px solid var(--bme-border); background: var(--bme-surface-lowest); position: relative; } .bme-mobile-graph-preview canvas { width: 100%; height: 100%; } .bme-mobile-graph-label { position: absolute; top: 6px; right: 8px; font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--bme-accent2); background: var(--bme-surface); padding: 1px 6px; border-radius: 3px; } .bme-mobile-graph-status { display: flex; margin-bottom: 12px; border-radius: 0 0 6px 6px; } }