mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-21 17:38:10 +00:00
设备命令执行对齐服务端 cmd_type 契约: - onDeviceMsg 解析 msg.cmd_type: homeagent->能力分发 / shell->白名单执行 - 统一回执 sendCmdResult(兼容双参), 全链路回执修复 - 修复 pi-lens auto-fix 把 trayLastCmd 改 const 导致的 TypeError(命令未执行/无回执根因) homeagent 能力: - screensue: 独立窗口显示文字/HTML, 可配默认屏幕(displays:list IPC), 支持时长参数 "screensue [秒] 内容", 默认常驻 - camerasue: 抓拍单张 jpeg(base64文本); camerasue <N秒>=录像 mp4(libx264), 二进制分块经设备通道回传 - speakeruse: 接收服务端二进制音频(WS 0x2), 聚合后播放(aplay/paplay/ffplay/afplay/SoundPlayer) 二进制分块协议(设备<->网关): - 录像(设备->网关): cmd_data_start/0x2帧/cmd_data_end - 音频(网关->设备): cmd_speech_start/0x2帧/cmd_speech_end - 设备端 WS 读写侧都支持 0x2 帧; N/A 服务端 readFrame 需配套(已发群) 消息重放/交互: - sendChat 带 client_msg_id 唯一ID(服务端可去重), 超时明确提示勿重复发送 - 托盘菜单: 信息项 enabled(不再灰字)+200ms防抖+连接缓存, 首建立即弹出 - 托盘显示连接/设备桥/远控活动状态 UI: - 设备页本机卡片: 设备通道配置(网关/ws_token/screensue屏幕/cmdrun目录/沙箱) - 设备列表经 webui 反代 /api/v1/device/online 拉取 - 连接管理移除 device 类型(设备独立为 GUI 组件), toggleConnType/saveConnForm 清理 - 字体对比度提升(text-muted/secondary重调色), 内联小字 10/11px->12/13px preload: 新增 displays.list IPC
2194 lines
46 KiB
CSS
2194 lines
46 KiB
CSS
:root {
|
||
--sakura-100: #ffe4e9;
|
||
--sakura-200: #ffcdd9;
|
||
--sakura-300: #ff9eb5;
|
||
--sakura-400: #ff7fac;
|
||
--sakura-500: #f33b7c;
|
||
--sakura-600: #c92462;
|
||
--sakura-700: #991b4b;
|
||
--frost-100: #d7e8ee;
|
||
--frost-200: #a9d6e3;
|
||
--frost-300: #88c0d0;
|
||
--frost-400: #5ea8bf;
|
||
--frost-500: #3f88a3;
|
||
--success: #17a964;
|
||
--warning: #d99a2b;
|
||
--error: #db3694;
|
||
--info: #3f6ef5;
|
||
--glass-bg: rgba(13, 18, 34, 0.6);
|
||
--glass-bg-strong: rgba(13, 18, 34, 0.82);
|
||
--glass-blur: 14px;
|
||
--glass-border: rgba(255, 255, 255, 0.08);
|
||
--glass-hover: rgba(255, 255, 255, 0.05);
|
||
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
|
||
--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.28);
|
||
--shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.38);
|
||
--shadow-glow:
|
||
0 0 0 1px rgba(255, 127, 172, 0.4), 0 4px 20px rgba(255, 127, 172, 0.18);
|
||
--radius-sm: 6px;
|
||
--radius-md: 10px;
|
||
--radius-lg: 14px;
|
||
--radius-pill: 999px;
|
||
--font-sans:
|
||
"Segoe UI", "Segoe UI Variable Text", -apple-system, BlinkMacSystemFont,
|
||
Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI",
|
||
"Microsoft YaHei", sans-serif;
|
||
--font-mono:
|
||
"JetBrains Mono", ui-monospace, "SFMono-Regular", "SF Mono", "Menlo",
|
||
"Consolas", monospace;
|
||
--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
|
||
--dur-micro: 150ms;
|
||
--dur-normal: 300ms;
|
||
--bg-primary: #0b1020;
|
||
--bg-secondary: rgba(17, 24, 44, 0.72);
|
||
--bg-card: rgba(17, 24, 44, 0.6);
|
||
--bg-input: rgba(13, 18, 34, 0.75);
|
||
--bg-hover: rgba(255, 255, 255, 0.06);
|
||
--text-primary: #eef1f8;
|
||
--text-secondary: #b8c1d6;
|
||
--text-muted: #93a0b8;
|
||
--border-color: rgba(255, 255, 255, 0.09);
|
||
--accent: #ff7fac;
|
||
--accent-bg: rgba(255, 127, 172, 0.14);
|
||
--toast-bg: rgba(23, 169, 100, 0.16);
|
||
--toast-color: #6ee7a8;
|
||
--toast-error-bg: rgba(219, 54, 148, 0.18);
|
||
--toast-error-color: #ff9ec6;
|
||
--pre-color: #cdd3f5;
|
||
--pre-bg: rgba(10, 14, 28, 0.85);
|
||
--chat-bg: rgba(10, 14, 28, 0.7);
|
||
--msg-user-bg: rgba(255, 127, 172, 0.16);
|
||
--msg-user-color: #ffb9d0;
|
||
--msg-assistant-bg: rgba(136, 192, 208, 0.14);
|
||
--msg-assistant-color: #a9d6e3;
|
||
--msg-system-bg: rgba(63, 110, 245, 0.16);
|
||
--msg-system-color: #a3b8ff;
|
||
--msg-bubble-bg: #161b2e;
|
||
--msg-bubble-color: #e9edf6;
|
||
--msg-bubble-border: rgba(255, 255, 255, 0.1);
|
||
--kv-border: rgba(255, 255, 255, 0.07);
|
||
--btn-ghost-border: rgba(255, 255, 255, 0.14);
|
||
--btn-ghost-hover-bg: rgba(255, 255, 255, 0.07);
|
||
--save-btn-border: #d99a2b;
|
||
--loading-border: rgba(255, 255, 255, 0.12);
|
||
--loading-top: #ff7fac;
|
||
--grad-a: rgba(255, 127, 172, 0.14);
|
||
--grad-b: rgba(136, 192, 208, 0.12);
|
||
--grad-c: rgba(243, 59, 124, 0.1);
|
||
--c-sakura: #ff7fac;
|
||
--c-cyan: #2dd4bf;
|
||
--c-violet: #a78bfa;
|
||
--c-emerald: #34d399;
|
||
--c-amber: #fbbf24;
|
||
--c-blue: #60a5fa;
|
||
}
|
||
[data-theme="light"] {
|
||
--glass-bg: rgba(255, 255, 255, 0.66);
|
||
--glass-bg-strong: rgba(255, 255, 255, 0.88);
|
||
--glass-border: rgba(255, 127, 172, 0.22);
|
||
--glass-hover: rgba(255, 127, 172, 0.07);
|
||
--shadow-sm: 0 1px 3px rgba(153, 27, 75, 0.08);
|
||
--shadow-md: 0 6px 20px rgba(153, 27, 75, 0.1);
|
||
--shadow-lg: 0 16px 40px rgba(153, 27, 75, 0.14);
|
||
--shadow-glow:
|
||
0 0 0 1px rgba(243, 59, 124, 0.3), 0 6px 22px rgba(243, 59, 124, 0.14);
|
||
--bg-primary: #ffffff;
|
||
--bg-secondary: rgba(255, 255, 255, 0.78);
|
||
--bg-card: rgba(255, 255, 255, 0.72);
|
||
--bg-input: rgba(255, 224, 233, 0.55);
|
||
--bg-hover: rgba(255, 127, 172, 0.08);
|
||
--text-primary: #3b2030;
|
||
--text-secondary: #6b4b5c;
|
||
--text-muted: #8f6f7d;
|
||
--border-color: rgba(201, 36, 98, 0.14);
|
||
--accent: #c92462;
|
||
--accent-bg: #ffe4e9;
|
||
--toast-bg: rgba(23, 169, 100, 0.14);
|
||
--toast-color: #128a52;
|
||
--toast-error-bg: rgba(219, 54, 148, 0.12);
|
||
--toast-error-color: #c2185b;
|
||
--pre-color: #5c4060;
|
||
--pre-bg: #fff0f5;
|
||
--chat-bg: #fff0f5;
|
||
--msg-user-bg: #ffe4e9;
|
||
--msg-user-color: #c2185b;
|
||
--msg-assistant-bg: #e3f2f6;
|
||
--msg-assistant-color: #2f7188;
|
||
--msg-bubble-bg: #ffffff;
|
||
--msg-bubble-color: #262a33;
|
||
--msg-bubble-border: rgba(201, 36, 98, 0.14);
|
||
--msg-system-bg: #e6ecfe;
|
||
--msg-system-color: #3f6ef5;
|
||
--kv-border: rgba(201, 36, 98, 0.1);
|
||
--btn-ghost-border: rgba(201, 36, 98, 0.22);
|
||
--btn-ghost-hover-bg: #ffe4e9;
|
||
--save-btn-border: #d99a2b;
|
||
--loading-border: rgba(201, 36, 98, 0.18);
|
||
--loading-top: #c92462;
|
||
}
|
||
[data-color="sakura"][data-theme="light"] {
|
||
--bg-primary: #ffffff;
|
||
--bg-input: rgba(255, 224, 233, 0.55);
|
||
--bg-hover: rgba(255, 127, 172, 0.08);
|
||
--pre-bg: #fff0f5;
|
||
--chat-bg: #fff0f5;
|
||
--msg-bubble-border: rgba(201, 36, 98, 0.14);
|
||
--btn-ghost-hover-bg: #ffe4e9;
|
||
--grad-a: rgba(255, 127, 172, 0.14);
|
||
--grad-c: rgba(243, 59, 124, 0.09);
|
||
}
|
||
[data-color="cyan"] {
|
||
--accent: #2dd4bf;
|
||
--accent-bg: rgba(45, 212, 191, 0.14);
|
||
--msg-user-bg: rgba(45, 212, 191, 0.16);
|
||
--msg-user-color: #99f6e4;
|
||
--loading-top: #2dd4bf;
|
||
--grad-a: rgba(45, 212, 191, 0.14);
|
||
--grad-c: rgba(45, 212, 191, 0.1);
|
||
}
|
||
[data-color="cyan"][data-theme="light"] {
|
||
--accent: #0f766e;
|
||
--accent-bg: #ccfbf1;
|
||
--msg-user-bg: #ccfbf1;
|
||
--msg-user-color: #0f766e;
|
||
--loading-top: #0f766e;
|
||
--bg-primary: #f0fdfa;
|
||
--bg-input: rgba(204, 251, 241, 0.6);
|
||
--bg-hover: rgba(13, 148, 136, 0.08);
|
||
--pre-bg: #e7f9f3;
|
||
--chat-bg: #e7f9f3;
|
||
--msg-bubble-border: rgba(13, 148, 136, 0.14);
|
||
--btn-ghost-hover-bg: #ccfbf1;
|
||
--grad-a: rgba(13, 148, 136, 0.14);
|
||
--grad-c: rgba(13, 148, 136, 0.09);
|
||
}
|
||
[data-color="violet"] {
|
||
--accent: #a78bfa;
|
||
--accent-bg: rgba(167, 139, 250, 0.14);
|
||
--msg-user-bg: rgba(167, 139, 250, 0.16);
|
||
--msg-user-color: #ddd6fe;
|
||
--loading-top: #a78bfa;
|
||
--grad-a: rgba(167, 139, 250, 0.14);
|
||
--grad-c: rgba(167, 139, 250, 0.1);
|
||
}
|
||
[data-color="violet"][data-theme="light"] {
|
||
--accent: #7c3aed;
|
||
--accent-bg: #ede9fe;
|
||
--msg-user-bg: #ede9fe;
|
||
--msg-user-color: #7c3aed;
|
||
--loading-top: #7c3aed;
|
||
--bg-primary: #f8f6ff;
|
||
--bg-input: rgba(237, 233, 254, 0.6);
|
||
--bg-hover: rgba(124, 58, 237, 0.08);
|
||
--pre-bg: #f3f0ff;
|
||
--chat-bg: #f3f0ff;
|
||
--msg-bubble-border: rgba(124, 58, 237, 0.14);
|
||
--btn-ghost-hover-bg: #ede9fe;
|
||
--grad-a: rgba(124, 58, 237, 0.13);
|
||
--grad-c: rgba(124, 58, 237, 0.08);
|
||
}
|
||
[data-color="emerald"] {
|
||
--accent: #34d399;
|
||
--accent-bg: rgba(52, 211, 153, 0.14);
|
||
--msg-user-bg: rgba(52, 211, 153, 0.16);
|
||
--msg-user-color: #a7f3d0;
|
||
--loading-top: #34d399;
|
||
--grad-a: rgba(52, 211, 153, 0.14);
|
||
--grad-c: rgba(52, 211, 153, 0.1);
|
||
}
|
||
[data-color="emerald"][data-theme="light"] {
|
||
--accent: #059669;
|
||
--accent-bg: #d1fae5;
|
||
--msg-user-bg: #d1fae5;
|
||
--msg-user-color: #059669;
|
||
--loading-top: #059669;
|
||
--bg-primary: #f0fdf6;
|
||
--bg-input: rgba(209, 250, 229, 0.6);
|
||
--bg-hover: rgba(5, 150, 105, 0.08);
|
||
--pre-bg: #e9f9f0;
|
||
--chat-bg: #e9f9f0;
|
||
--msg-bubble-border: rgba(5, 150, 105, 0.14);
|
||
--btn-ghost-hover-bg: #d1fae5;
|
||
--grad-a: rgba(5, 150, 105, 0.14);
|
||
--grad-c: rgba(5, 150, 105, 0.09);
|
||
}
|
||
[data-color="amber"] {
|
||
--accent: #fbbf24;
|
||
--accent-bg: rgba(251, 191, 36, 0.14);
|
||
--msg-user-bg: rgba(251, 191, 36, 0.16);
|
||
--msg-user-color: #fde68a;
|
||
--loading-top: #fbbf24;
|
||
--grad-a: rgba(251, 191, 36, 0.14);
|
||
--grad-c: rgba(251, 191, 36, 0.1);
|
||
}
|
||
[data-color="amber"][data-theme="light"] {
|
||
--accent: #d97706;
|
||
--accent-bg: #fef3c7;
|
||
--msg-user-bg: #fef3c7;
|
||
--msg-user-color: #b45309;
|
||
--loading-top: #d97706;
|
||
--bg-primary: #fffdf4;
|
||
--bg-input: rgba(254, 243, 199, 0.6);
|
||
--bg-hover: rgba(217, 119, 6, 0.08);
|
||
--pre-bg: #fdf6e1;
|
||
--chat-bg: #fdf6e1;
|
||
--msg-bubble-border: rgba(217, 119, 6, 0.14);
|
||
--btn-ghost-hover-bg: #fef3c7;
|
||
--grad-a: rgba(217, 119, 6, 0.13);
|
||
--grad-c: rgba(217, 119, 6, 0.08);
|
||
}
|
||
[data-color="blue"] {
|
||
--accent: #60a5fa;
|
||
--accent-bg: rgba(96, 165, 250, 0.14);
|
||
--msg-user-bg: rgba(96, 165, 250, 0.16);
|
||
--msg-user-color: #bfdbfe;
|
||
--loading-top: #60a5fa;
|
||
--grad-a: rgba(96, 165, 250, 0.14);
|
||
--grad-c: rgba(96, 165, 250, 0.1);
|
||
}
|
||
[data-color="blue"][data-theme="light"] {
|
||
--accent: #2563eb;
|
||
--accent-bg: #dbeafe;
|
||
--msg-user-bg: #dbeafe;
|
||
--msg-user-color: #2563eb;
|
||
--loading-top: #2563eb;
|
||
--bg-primary: #f7faff;
|
||
--bg-input: rgba(219, 234, 254, 0.6);
|
||
--bg-hover: rgba(37, 99, 235, 0.08);
|
||
--pre-bg: #eef4ff;
|
||
--chat-bg: #eef4ff;
|
||
--msg-bubble-border: rgba(37, 99, 235, 0.14);
|
||
--btn-ghost-hover-bg: #dbeafe;
|
||
--grad-a: rgba(37, 99, 235, 0.13);
|
||
--grad-c: rgba(37, 99, 235, 0.08);
|
||
}
|
||
* {
|
||
margin: 0;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
font-family: var(--font-sans);
|
||
}
|
||
.selectable,
|
||
.msg .text,
|
||
.msg .tc-args,
|
||
.msg .tc-result,
|
||
.msg .reasoning-body,
|
||
pre,
|
||
input,
|
||
textarea,
|
||
.term-buf {
|
||
user-select: text;
|
||
-webkit-user-select: text;
|
||
}
|
||
body {
|
||
background: var(--bg-primary);
|
||
background-attachment: fixed;
|
||
color: var(--text-primary);
|
||
min-height: 100vh;
|
||
overflow-x: hidden;
|
||
font-family: var(--font-sans);
|
||
transition:
|
||
background 0.2s,
|
||
color 0.2s;
|
||
font-size: 15px;
|
||
-webkit-font-smoothing: antialiased;
|
||
text-rendering: optimizeLegibility;
|
||
user-select: none;
|
||
-webkit-user-select: none;
|
||
}
|
||
#app {
|
||
display: flex;
|
||
height: 100vh;
|
||
overflow: hidden;
|
||
position: relative;
|
||
z-index: 1;
|
||
}
|
||
|
||
/* ===== 沉浸式标题栏 ===== */
|
||
.titlebar {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
height: 36px;
|
||
z-index: 1100;
|
||
display: flex;
|
||
align-items: center;
|
||
background: var(--bg-secondary);
|
||
backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
|
||
-webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
|
||
border-bottom: 1px solid var(--glass-border);
|
||
-webkit-app-region: drag;
|
||
user-select: none;
|
||
}
|
||
.titlebar-title {
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
color: var(--text-muted);
|
||
letter-spacing: 0.02em;
|
||
padding-left: 12px;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
.titlebar-logo {
|
||
width: 18px;
|
||
height: 18px;
|
||
border-radius: 50%;
|
||
object-fit: cover;
|
||
flex-shrink: 0;
|
||
}
|
||
.titlebar-controls {
|
||
margin-left: auto;
|
||
display: flex;
|
||
height: 36px;
|
||
-webkit-app-region: no-drag;
|
||
}
|
||
.tb-btn {
|
||
width: 46px;
|
||
height: 36px;
|
||
border: none;
|
||
background: transparent;
|
||
color: var(--text-secondary);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
cursor: pointer;
|
||
transition: background 0.13s;
|
||
}
|
||
.tb-btn:hover {
|
||
background: var(--glass-hover);
|
||
color: var(--text-primary);
|
||
}
|
||
.tb-btn.tb-close:hover {
|
||
background: #e81123;
|
||
color: #fff;
|
||
}
|
||
body.maximized .tb-max svg {
|
||
transform: scale(0.85);
|
||
}
|
||
|
||
/* ===== Icon Rail (主视图导航) ===== */
|
||
.rail {
|
||
width: 56px;
|
||
flex-shrink: 0;
|
||
background: var(--bg-secondary);
|
||
backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
|
||
-webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
|
||
border-right: 1px solid var(--glass-border);
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
padding: 12px 0;
|
||
gap: 4px;
|
||
position: sticky;
|
||
top: 36px;
|
||
height: calc(100% - 36px);
|
||
z-index: 100;
|
||
}
|
||
.rail .rail-logo {
|
||
width: 34px;
|
||
height: 34px;
|
||
margin-bottom: 10px;
|
||
overflow: hidden;
|
||
}
|
||
.rail .rail-logo img {
|
||
width: 100%;
|
||
height: 100%;
|
||
border-radius: 50%;
|
||
object-fit: cover;
|
||
}
|
||
.rail .rail-btn {
|
||
width: 38px;
|
||
height: 38px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border: none;
|
||
background: transparent;
|
||
color: var(--text-muted);
|
||
cursor: pointer;
|
||
border-radius: var(--radius-md);
|
||
transition: all 0.15s;
|
||
position: relative;
|
||
}
|
||
.rail .rail-btn svg {
|
||
width: 20px;
|
||
height: 20px;
|
||
}
|
||
.rail .rail-btn:hover {
|
||
color: var(--text-primary);
|
||
background: var(--glass-hover);
|
||
}
|
||
.rail .rail-btn.active {
|
||
color: var(--accent);
|
||
background: var(--accent-bg);
|
||
}
|
||
.rail .rail-btn.active::before {
|
||
content: "";
|
||
position: absolute;
|
||
left: -8px;
|
||
top: 8px;
|
||
bottom: 8px;
|
||
width: 3px;
|
||
background: var(--accent);
|
||
border-radius: var(--radius-pill);
|
||
}
|
||
.rail .rail-btn[title]:hover::after {
|
||
content: attr(title);
|
||
position: absolute;
|
||
left: 46px;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
background: var(--glass-bg-strong);
|
||
backdrop-filter: blur(8px);
|
||
color: var(--text-primary);
|
||
font-size: 12px;
|
||
padding: 4px 10px;
|
||
border-radius: var(--radius-sm);
|
||
border: 1px solid var(--glass-border);
|
||
white-space: nowrap;
|
||
z-index: 200;
|
||
pointer-events: none;
|
||
}
|
||
.rail .rail-spacer {
|
||
flex: 1;
|
||
}
|
||
.rail .conn-dot {
|
||
width: 10px;
|
||
height: 10px;
|
||
border-radius: 50%;
|
||
background: var(--text-muted);
|
||
margin-bottom: 4px;
|
||
}
|
||
.rail .conn-dot.dot-green {
|
||
background: var(--success);
|
||
box-shadow: 0 0 8px rgba(23, 169, 100, 0.6);
|
||
}
|
||
.rail .conn-dot.dot-red {
|
||
background: var(--error);
|
||
}
|
||
.rail .conn-dot.dot-yellow {
|
||
background: var(--warning);
|
||
}
|
||
|
||
/* ===== Main ===== */
|
||
.main {
|
||
flex: 1;
|
||
min-width: 0;
|
||
min-height: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
overflow: hidden;
|
||
padding-top: 36px;
|
||
}
|
||
.topbar {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
padding: 10px 24px;
|
||
background: var(--bg-secondary);
|
||
backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
|
||
-webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
|
||
border-bottom: 1px solid var(--glass-border);
|
||
position: sticky;
|
||
top: 0;
|
||
z-index: 50;
|
||
flex-shrink: 0;
|
||
}
|
||
.topbar h1 {
|
||
font-size: 16px;
|
||
font-weight: 700;
|
||
color: var(--accent);
|
||
white-space: nowrap;
|
||
}
|
||
.topbar .conn-indicator {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
cursor: pointer;
|
||
padding: 4px 10px;
|
||
border-radius: var(--radius-pill);
|
||
font-size: 12px;
|
||
color: var(--text-secondary);
|
||
border: 1px solid var(--glass-border);
|
||
transition: all 0.15s;
|
||
user-select: none;
|
||
}
|
||
.topbar .conn-indicator:hover {
|
||
background: var(--glass-hover);
|
||
color: var(--text-primary);
|
||
}
|
||
.topbar .spacer {
|
||
flex: 1;
|
||
}
|
||
.theme-btn {
|
||
background: none;
|
||
border: 1px solid var(--border-color);
|
||
color: var(--text-secondary);
|
||
cursor: pointer;
|
||
padding: 4px 8px;
|
||
border-radius: var(--radius-sm);
|
||
font-size: 14px;
|
||
line-height: 1;
|
||
transition: all 0.15s;
|
||
}
|
||
.theme-btn:hover {
|
||
color: var(--accent);
|
||
border-color: var(--accent);
|
||
}
|
||
#bg-layer {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 0;
|
||
pointer-events: none;
|
||
background-image:
|
||
radial-gradient(900px 700px at 85% -10%, var(--grad-a), transparent 60%),
|
||
radial-gradient(800px 600px at -10% 20%, var(--grad-b), transparent 60%),
|
||
radial-gradient(700px 500px at 50% 110%, var(--grad-c), transparent 60%),
|
||
var(--bg-img, none);
|
||
background-size: auto, auto, auto, cover;
|
||
background-position: center;
|
||
background-repeat: no-repeat;
|
||
transform: scale(1.04);
|
||
filter: blur(calc(var(--bg-blur, 0) * 1px));
|
||
transition: filter 0.25s var(--ease-out);
|
||
}
|
||
|
||
.palette-pop {
|
||
position: fixed;
|
||
bottom: 56px;
|
||
left: 6px;
|
||
width: 216px;
|
||
max-width: calc(100vw - 24px);
|
||
max-height: calc(100vh - 120px);
|
||
overflow-y: auto;
|
||
padding: 12px;
|
||
background: var(--glass-bg-strong);
|
||
backdrop-filter: blur(12px);
|
||
border: 1px solid var(--glass-border);
|
||
border-radius: var(--radius-md);
|
||
box-shadow: var(--shadow-lg);
|
||
display: none;
|
||
z-index: 300;
|
||
}
|
||
.palette-pop.on {
|
||
display: block;
|
||
animation: viewIn 0.16s var(--ease-out);
|
||
}
|
||
.palette-pop h4 {
|
||
font-size: 11px;
|
||
font-weight: 600;
|
||
color: var(--text-secondary);
|
||
margin: 2px 0 6px;
|
||
}
|
||
.palette-pop button.cdot {
|
||
width: 22px;
|
||
height: 22px;
|
||
border-radius: 50%;
|
||
border: 2px solid rgba(255, 255, 255, 0.18);
|
||
cursor: pointer;
|
||
margin: 3px;
|
||
padding: 0;
|
||
vertical-align: middle;
|
||
transition:
|
||
transform 0.15s,
|
||
box-shadow 0.15s;
|
||
}
|
||
.palette-pop button.cdot:hover {
|
||
transform: scale(1.25);
|
||
}
|
||
.palette-pop button.cdot.on {
|
||
border-color: var(--text-primary);
|
||
box-shadow: var(--shadow-glow);
|
||
transform: scale(1.15);
|
||
}
|
||
.palette-pop input[type="text"] {
|
||
background: var(--bg-input);
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--radius-sm);
|
||
padding: 5px 8px;
|
||
color: var(--text-primary);
|
||
font-size: 11px;
|
||
width: 100%;
|
||
margin-bottom: 6px;
|
||
outline: none;
|
||
}
|
||
.palette-pop .pp-row {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-items: center;
|
||
gap: 5px;
|
||
margin-top: 4px;
|
||
}
|
||
.palette-pop .pp-row .btn {
|
||
padding: 3px 9px;
|
||
font-size: 11px;
|
||
white-space: nowrap;
|
||
}
|
||
.palette-pop .pp-val {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
font-size: 10px;
|
||
color: var(--text-muted);
|
||
min-width: 0;
|
||
text-align: right;
|
||
margin-left: auto;
|
||
}
|
||
.palette-pop input[type="range"] {
|
||
width: 72px;
|
||
margin: 0;
|
||
accent-color: var(--accent);
|
||
vertical-align: middle;
|
||
}
|
||
.lang-btn {
|
||
font-size: 13px;
|
||
min-width: 28px;
|
||
cursor: pointer;
|
||
padding: 4px 8px;
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--radius-sm);
|
||
text-align: center;
|
||
background: none;
|
||
color: var(--text-secondary);
|
||
}
|
||
.lang-btn:hover {
|
||
color: var(--accent);
|
||
border-color: var(--accent);
|
||
}
|
||
.container {
|
||
padding: 16px 24px;
|
||
flex: 1;
|
||
min-width: 0;
|
||
min-height: 0;
|
||
overflow: hidden;
|
||
}
|
||
.view {
|
||
display: none;
|
||
height: 100%;
|
||
overflow-y: auto;
|
||
}
|
||
.view.active {
|
||
display: block;
|
||
animation: viewIn 0.18s var(--ease-out);
|
||
}
|
||
@keyframes viewIn {
|
||
from {
|
||
opacity: 0;
|
||
transform: translateY(6px);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: translateY(0);
|
||
}
|
||
}
|
||
|
||
/* ===== Cards ===== */
|
||
.card {
|
||
position: relative;
|
||
background: var(--bg-card);
|
||
backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
|
||
-webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
|
||
border: 1px solid var(--glass-border);
|
||
border-radius: var(--radius-lg);
|
||
padding: 20px;
|
||
margin-bottom: 16px;
|
||
box-shadow: var(--shadow-sm);
|
||
transition:
|
||
background 0.2s,
|
||
border 0.2s,
|
||
box-shadow 0.2s,
|
||
transform 0.2s var(--ease-out);
|
||
}
|
||
.card:hover {
|
||
box-shadow: var(--shadow-md);
|
||
border-color: color-mix(in srgb, var(--accent) 28%, transparent);
|
||
transform: translateY(-1px);
|
||
}
|
||
.card h2 {
|
||
font-size: 16px;
|
||
font-weight: 600;
|
||
margin-bottom: 12px;
|
||
color: var(--text-primary);
|
||
}
|
||
.card h3 {
|
||
font-size: 14px;
|
||
font-weight: 600;
|
||
color: var(--text-secondary);
|
||
margin: 16px 0 8px;
|
||
}
|
||
.grid-2 {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 16px;
|
||
}
|
||
.grid-3 {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr 1fr;
|
||
gap: 16px;
|
||
}
|
||
.grid-4 {
|
||
display: grid;
|
||
grid-template-columns: repeat(4, 1fr);
|
||
gap: 16px;
|
||
}
|
||
.stat-value {
|
||
font-size: 26px;
|
||
font-weight: 700;
|
||
color: var(--accent);
|
||
}
|
||
.stat-label {
|
||
font-size: 11px;
|
||
color: var(--text-muted);
|
||
margin-top: 2px;
|
||
}
|
||
.stat-card {
|
||
padding: 16px 20px;
|
||
transition: transform 0.12s var(--ease-out);
|
||
}
|
||
.stat-card:hover {
|
||
transform: translateY(-2px);
|
||
}
|
||
.status-dot {
|
||
display: inline-block;
|
||
width: 8px;
|
||
height: 8px;
|
||
border-radius: 50%;
|
||
margin-right: 6px;
|
||
}
|
||
.dot-green {
|
||
background: var(--success);
|
||
}
|
||
.dot-green.pulse {
|
||
animation: pulseDot 2s ease-in-out infinite;
|
||
}
|
||
.dot-yellow {
|
||
background: var(--warning);
|
||
}
|
||
.dot-red {
|
||
background: var(--error);
|
||
}
|
||
.dot-gray {
|
||
background: #475569;
|
||
}
|
||
/* 单独用作状态点(无 status-dot 前缀时)也呈现为小圆点 */
|
||
.dot-green,
|
||
.dot-yellow,
|
||
.dot-red,
|
||
.dot-gray {
|
||
display: inline-block;
|
||
width: 8px;
|
||
height: 8px;
|
||
border-radius: 50%;
|
||
margin-right: 6px;
|
||
vertical-align: middle;
|
||
flex-shrink: 0;
|
||
}
|
||
/* 含文字的场景(点+文字并排)不受圆点尺寸影响 */
|
||
.kv-row .val .dot-green,
|
||
.kv-row .val .dot-gray,
|
||
.kv-row .val .dot-red {
|
||
margin-right: 4px;
|
||
}
|
||
@keyframes pulseDot {
|
||
0%,
|
||
100% {
|
||
opacity: 1;
|
||
transform: scale(1);
|
||
}
|
||
50% {
|
||
opacity: 0.6;
|
||
transform: scale(1.3);
|
||
}
|
||
}
|
||
table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
font-size: 13px;
|
||
}
|
||
th {
|
||
text-align: left;
|
||
padding: 8px 10px;
|
||
color: var(--text-muted);
|
||
font-weight: 500;
|
||
border-bottom: 1px solid var(--border-color);
|
||
font-size: 11px;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.5px;
|
||
}
|
||
td {
|
||
padding: 8px 10px;
|
||
border-bottom: 1px solid var(--kv-border);
|
||
}
|
||
tr:hover td {
|
||
background: var(--bg-hover);
|
||
}
|
||
.badge {
|
||
display: inline-block;
|
||
padding: 2px 8px;
|
||
border-radius: 4px;
|
||
font-size: 11px;
|
||
font-weight: 500;
|
||
}
|
||
.badge-green {
|
||
background: rgba(23, 169, 100, 0.18);
|
||
color: #6ee7a8;
|
||
}
|
||
.badge-red {
|
||
background: rgba(219, 54, 148, 0.18);
|
||
color: #ff9ec6;
|
||
}
|
||
.badge-yellow {
|
||
background: rgba(217, 154, 43, 0.18);
|
||
color: #fcd9a0;
|
||
}
|
||
.badge-blue {
|
||
background: rgba(63, 110, 245, 0.18);
|
||
color: #a3b8ff;
|
||
}
|
||
.btn {
|
||
padding: 6px 14px;
|
||
border-radius: var(--radius-md);
|
||
border: none;
|
||
font-size: 12px;
|
||
cursor: pointer;
|
||
font-weight: 500;
|
||
transition: all 0.12s var(--ease-out);
|
||
}
|
||
.btn:active {
|
||
transform: scale(0.97);
|
||
}
|
||
.btn-primary {
|
||
background: var(--accent);
|
||
color: #fff;
|
||
}
|
||
.btn-primary:hover {
|
||
background: var(--sakura-500);
|
||
}
|
||
.btn-danger {
|
||
background: var(--error);
|
||
color: #fff;
|
||
}
|
||
.btn-danger:hover {
|
||
background: var(--sakura-700);
|
||
}
|
||
.btn-warning {
|
||
background: var(--save-btn-border);
|
||
color: #fff;
|
||
}
|
||
.btn-warning:hover {
|
||
background: #b87e1f;
|
||
}
|
||
.btn-sm {
|
||
padding: 4px 10px;
|
||
font-size: 11px;
|
||
}
|
||
.btn-ghost {
|
||
background: transparent;
|
||
border: 1px solid var(--btn-ghost-border);
|
||
color: var(--text-secondary);
|
||
}
|
||
.btn-ghost:hover {
|
||
background: var(--btn-ghost-hover-bg);
|
||
color: var(--text-primary);
|
||
}
|
||
input,
|
||
textarea,
|
||
select {
|
||
background: var(--bg-input);
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--radius-sm);
|
||
padding: 8px 12px;
|
||
color: var(--text-primary);
|
||
font-size: 14px;
|
||
width: 100%;
|
||
margin-bottom: 10px;
|
||
outline: none;
|
||
transition:
|
||
border 0.15s,
|
||
background 0.2s,
|
||
color 0.2s;
|
||
}
|
||
input:focus,
|
||
textarea:focus,
|
||
select:focus {
|
||
border-color: var(--accent);
|
||
}
|
||
textarea {
|
||
resize: vertical;
|
||
min-height: 80px;
|
||
font-family: var(--font-mono);
|
||
font-size: 12px;
|
||
}
|
||
label {
|
||
display: block;
|
||
font-size: 13px;
|
||
color: var(--text-secondary);
|
||
margin-bottom: 4px;
|
||
font-weight: 500;
|
||
}
|
||
pre {
|
||
background: var(--pre-bg);
|
||
border-radius: var(--radius-sm);
|
||
padding: 12px;
|
||
font-size: 12px;
|
||
overflow-x: auto;
|
||
color: var(--pre-color);
|
||
font-family: var(--font-mono);
|
||
max-height: 400px;
|
||
overflow-y: auto;
|
||
}
|
||
code {
|
||
font-family: var(--font-mono);
|
||
font-size: 12px;
|
||
color: var(--pre-color);
|
||
}
|
||
.empty-state {
|
||
text-align: center;
|
||
padding: 40px 20px;
|
||
color: var(--text-muted);
|
||
}
|
||
.empty-state p {
|
||
font-size: 14px;
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
/* ===== Chat (对话主页) ===== */
|
||
.chat-layout {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 12px;
|
||
height: 100%;
|
||
min-height: 0;
|
||
}
|
||
.chat-tabs {
|
||
display: flex;
|
||
gap: 4px;
|
||
flex-wrap: wrap;
|
||
border-bottom: 1px solid var(--border-color);
|
||
padding-bottom: 10px;
|
||
}
|
||
.chat-tabs span {
|
||
padding: 6px 14px;
|
||
font-size: 13px;
|
||
cursor: pointer;
|
||
color: var(--text-muted);
|
||
border-radius: var(--radius-pill);
|
||
border: 1px solid transparent;
|
||
transition: all 0.15s;
|
||
}
|
||
.chat-tabs span:hover {
|
||
color: var(--text-primary);
|
||
background: var(--bg-hover);
|
||
}
|
||
.chat-tabs span.active {
|
||
color: var(--accent);
|
||
background: var(--accent-bg);
|
||
border-color: color-mix(in srgb, var(--accent) 35%, transparent);
|
||
}
|
||
.chat-panel {
|
||
display: none;
|
||
flex: 1;
|
||
min-height: 0;
|
||
flex-direction: column;
|
||
overflow: hidden;
|
||
}
|
||
.chat-panel.active {
|
||
display: flex;
|
||
}
|
||
.chat-main {
|
||
flex: 1;
|
||
min-width: 0;
|
||
min-height: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.chat-main .card {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
margin-bottom: 0;
|
||
min-height: 0;
|
||
background: transparent;
|
||
border: none;
|
||
box-shadow: none;
|
||
backdrop-filter: none;
|
||
padding: 0;
|
||
overflow: hidden;
|
||
}
|
||
.chat-main .card h2 {
|
||
flex-shrink: 0;
|
||
}
|
||
.chat-messages {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
padding: 18px 18px 26px;
|
||
margin-bottom: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 6px;
|
||
min-height: 0;
|
||
}
|
||
.msg {
|
||
display: flex;
|
||
gap: 8px;
|
||
margin-bottom: 2px;
|
||
align-items: flex-start;
|
||
max-width: 100%;
|
||
}
|
||
.msg-user {
|
||
flex-direction: row-reverse;
|
||
align-self: flex-end;
|
||
}
|
||
.msg-assistant {
|
||
align-self: flex-start;
|
||
}
|
||
.msg-system {
|
||
align-self: center;
|
||
max-width: 90%;
|
||
}
|
||
.msg-avatar {
|
||
width: 28px;
|
||
height: 28px;
|
||
border-radius: 50%;
|
||
overflow: hidden;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 12px;
|
||
flex-shrink: 0;
|
||
}
|
||
.msg-avatar img {
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
display: block;
|
||
}
|
||
.msg-assistant .msg-avatar img {
|
||
transform: scale(1.5);
|
||
}
|
||
.msg-avatar svg {
|
||
display: block;
|
||
width: 16px;
|
||
height: 16px;
|
||
}
|
||
.msg-user .msg-avatar {
|
||
background: var(--msg-user-bg);
|
||
color: var(--msg-user-color);
|
||
}
|
||
.msg-assistant .msg-avatar {
|
||
background: transparent;
|
||
}
|
||
.msg-system .msg-avatar {
|
||
background: var(--msg-system-bg);
|
||
color: var(--msg-system-color);
|
||
}
|
||
.msg-content {
|
||
min-width: 0;
|
||
flex: 1;
|
||
}
|
||
.msg-content .msg-bubble + .msg-bubble {
|
||
margin-top: 6px;
|
||
}
|
||
.msg-channel {
|
||
align-self: flex-start;
|
||
}
|
||
.msg-channel .msg-avatar.chan-avatar {
|
||
color: #ffffff;
|
||
font-weight: 700;
|
||
font-size: 13px;
|
||
text-transform: uppercase;
|
||
}
|
||
.msg-channel .msg-chan-name {
|
||
font-size: 10px;
|
||
color: var(--text-muted);
|
||
opacity: 0.8;
|
||
margin-bottom: 2px;
|
||
padding-left: 4px;
|
||
letter-spacing: 0.5px;
|
||
}
|
||
.msg-channel .msg-bubble {
|
||
background: var(--msg-bubble-bg);
|
||
color: var(--msg-bubble-color);
|
||
border-bottom-left-radius: 4px;
|
||
border: 1px solid var(--msg-bubble-border);
|
||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
|
||
}
|
||
.msg-bubble {
|
||
padding: 9px 12px;
|
||
border-radius: var(--radius-md);
|
||
font-size: 15px;
|
||
line-height: 1.62;
|
||
word-break: break-word;
|
||
position: relative;
|
||
}
|
||
.msg-source {
|
||
font-size: 11px;
|
||
opacity: 0.55;
|
||
margin-bottom: 4px;
|
||
color: inherit;
|
||
}
|
||
.msg-user .msg-bubble {
|
||
background: var(--msg-bubble-bg);
|
||
color: var(--msg-bubble-color);
|
||
border-bottom-right-radius: 4px;
|
||
border: 1px solid var(--msg-bubble-border);
|
||
}
|
||
.msg-assistant .msg-bubble {
|
||
background: var(--msg-bubble-bg);
|
||
color: var(--msg-bubble-color);
|
||
border-bottom-left-radius: 4px;
|
||
border: 1px solid var(--msg-bubble-border);
|
||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
|
||
}
|
||
.msg-system .msg-bubble {
|
||
background: var(--msg-system-bg);
|
||
color: var(--msg-system-color);
|
||
text-align: center;
|
||
font-size: 12px;
|
||
border: 1px solid var(--msg-bubble-border);
|
||
}
|
||
.msg-bubble .text {
|
||
white-space: pre-wrap;
|
||
}
|
||
.msg-bubble .text p {
|
||
margin: 4px 0;
|
||
}
|
||
.msg-bubble .text h1,
|
||
.msg-bubble .text h2,
|
||
.msg-bubble .text h3 {
|
||
font-size: 1em;
|
||
margin: 8px 0 4px;
|
||
}
|
||
.msg-bubble .text ul,
|
||
.msg-bubble .text ol {
|
||
padding-left: 20px;
|
||
margin: 4px 0;
|
||
}
|
||
.msg-bubble .text pre {
|
||
background: var(--pre-bg);
|
||
color: var(--pre-color);
|
||
border-radius: var(--radius-sm);
|
||
padding: 8px;
|
||
margin: 4px 0;
|
||
overflow-x: auto;
|
||
font-size: 12px;
|
||
line-height: 1.5;
|
||
border: 1px solid var(--border-color);
|
||
max-height: 200px;
|
||
}
|
||
.msg-bubble .text code {
|
||
background: var(--pre-bg);
|
||
color: var(--pre-color);
|
||
padding: 1px 4px;
|
||
border-radius: 3px;
|
||
font-size: 12px;
|
||
}
|
||
.msg-bubble .text pre code {
|
||
background: none;
|
||
padding: 0;
|
||
}
|
||
.msg-bubble .text blockquote {
|
||
border-left: 3px solid var(--border-color);
|
||
padding-left: 8px;
|
||
margin: 4px 0;
|
||
opacity: 0.8;
|
||
}
|
||
.msg-bubble .text table {
|
||
border-collapse: collapse;
|
||
margin: 4px 0;
|
||
font-size: 12px;
|
||
width: 100%;
|
||
}
|
||
.msg-bubble .text th,
|
||
.msg-bubble .text td {
|
||
border: 1px solid var(--border-color);
|
||
padding: 3px 6px;
|
||
text-align: left;
|
||
}
|
||
.msg-bubble .text img {
|
||
max-width: 100%;
|
||
border-radius: var(--radius-sm);
|
||
}
|
||
|
||
/* ===== 思考卡片(PiDeck 风格)===== */
|
||
.reasoning-card {
|
||
margin: 6px 0;
|
||
border: 1px dashed var(--kv-border);
|
||
border-radius: var(--radius-sm);
|
||
background: var(--bg-panel, var(--bg-hover));
|
||
overflow: hidden;
|
||
}
|
||
.reasoning-card .reasoning-head {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 7px;
|
||
padding: 6px 10px;
|
||
font-size: 11px;
|
||
cursor: pointer;
|
||
user-select: none;
|
||
color: var(--text-secondary);
|
||
}
|
||
.reasoning-card .reasoning-head:hover {
|
||
background: var(--bg-hover);
|
||
}
|
||
.reasoning-card .rc-ico {
|
||
color: var(--accent);
|
||
flex-shrink: 0;
|
||
}
|
||
.reasoning-card .rc-title {
|
||
font-weight: 600;
|
||
color: var(--text-primary);
|
||
}
|
||
.reasoning-card .rc-chev {
|
||
margin-left: auto;
|
||
font-size: 10px;
|
||
color: var(--text-muted);
|
||
transition: transform 0.2s var(--ease-out);
|
||
}
|
||
.reasoning-card.open .rc-chev {
|
||
transform: rotate(180deg);
|
||
}
|
||
.reasoning-card .reasoning-body {
|
||
padding: 4px 10px 8px;
|
||
}
|
||
.reasoning-card .reasoning-content {
|
||
line-height: 1.5;
|
||
color: var(--text-tertiary);
|
||
font-size: 11.5px;
|
||
}
|
||
.reasoning-card .reasoning-content p {
|
||
margin: 4px 0;
|
||
}
|
||
.reasoning-card .reasoning-sweep {
|
||
height: 2px;
|
||
border-radius: 2px;
|
||
margin-top: 6px;
|
||
background: linear-gradient(90deg, transparent, var(--accent), transparent);
|
||
background-size: 200% 100%;
|
||
animation: reasoningSweep 1.2s var(--ease-out) infinite;
|
||
opacity: 0.6;
|
||
}
|
||
@keyframes reasoningSweep {
|
||
from {
|
||
background-position: 200% 0;
|
||
}
|
||
to {
|
||
background-position: -200% 0;
|
||
}
|
||
}
|
||
|
||
/* ===== 工具卡片(PiDeck 风格,扁平不套气泡)===== */
|
||
.tool-card {
|
||
background: var(--bg-panel, var(--bg-hover));
|
||
color: var(--text-secondary);
|
||
border-radius: var(--radius-sm);
|
||
padding: 7px 10px;
|
||
margin: 6px 0;
|
||
font-size: 11px;
|
||
border: 1px solid var(--kv-border);
|
||
border-left: 3px solid var(--accent);
|
||
cursor: pointer;
|
||
transition:
|
||
border-color 0.2s var(--ease-out),
|
||
background 0.2s var(--ease-out);
|
||
}
|
||
.tool-card.tc-running {
|
||
border-left-color: var(--accent);
|
||
}
|
||
.tool-card.tc-done {
|
||
border-left-color: rgba(23, 169, 100, 0.8);
|
||
}
|
||
.tool-card.tc-error {
|
||
border-left-color: var(--error, #db3694);
|
||
}
|
||
.tool-card .tc-line {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
font-size: 11px;
|
||
user-select: none;
|
||
}
|
||
.tool-card .tc-ico {
|
||
display: inline-flex;
|
||
flex-shrink: 0;
|
||
color: var(--accent);
|
||
}
|
||
.tool-card.tc-error .tc-ico {
|
||
color: var(--error, #db3694);
|
||
}
|
||
.tool-card.tc-done .tc-ico {
|
||
color: rgba(23, 169, 100, 0.9);
|
||
}
|
||
.tool-card .tc-name {
|
||
font-weight: 600;
|
||
color: var(--text-primary);
|
||
}
|
||
.tool-card .tc-plugin {
|
||
font-size: 9.5px;
|
||
color: var(--text-muted);
|
||
background: var(--pre-bg);
|
||
border-radius: 4px;
|
||
padding: 0 4px;
|
||
line-height: 1.6;
|
||
flex-shrink: 0;
|
||
}
|
||
.tool-card .tc-state {
|
||
margin-left: auto;
|
||
font-size: 9.5px;
|
||
font-weight: 500;
|
||
padding: 1px 6px;
|
||
border-radius: 999px;
|
||
flex-shrink: 0;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
}
|
||
.tool-card .tc-run {
|
||
background: rgba(63, 110, 245, 0.18);
|
||
color: #a3b8ff;
|
||
}
|
||
.tool-card .tc-done {
|
||
background: rgba(23, 169, 100, 0.18);
|
||
color: #6ee7a8;
|
||
}
|
||
.tool-card .tc-deny {
|
||
background: rgba(219, 54, 148, 0.18);
|
||
color: #ff9ec6;
|
||
}
|
||
.tool-card .tc-spinner {
|
||
width: 11px;
|
||
height: 11px;
|
||
border-radius: 50%;
|
||
border: 2px solid rgba(63, 110, 245, 0.25);
|
||
border-top-color: #3f6ef5;
|
||
animation: spin 0.7s linear infinite;
|
||
display: inline-block;
|
||
}
|
||
.tool-card .tc-caret {
|
||
font-size: 10px;
|
||
color: var(--text-muted);
|
||
transition: transform 0.15s var(--ease-out);
|
||
}
|
||
.tool-card.open .tc-caret {
|
||
transform: rotate(180deg);
|
||
}
|
||
.tool-card .tc-detail {
|
||
margin-top: 6px;
|
||
}
|
||
.tool-card .tc-detail-label {
|
||
font-size: 9.5px;
|
||
font-weight: 600;
|
||
color: var(--text-muted);
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.03em;
|
||
margin-bottom: 2px;
|
||
}
|
||
.tool-card .tc-args,
|
||
.tool-card .tc-result {
|
||
font-family: var(--font-mono);
|
||
font-size: 11px;
|
||
opacity: 0.85;
|
||
white-space: pre-wrap;
|
||
word-break: break-all;
|
||
margin-top: 5px;
|
||
background: var(--pre-bg);
|
||
color: var(--pre-color);
|
||
border-radius: 4px;
|
||
padding: 5px 7px;
|
||
}
|
||
.tool-card .tc-result {
|
||
opacity: 0.72;
|
||
max-height: 80px;
|
||
overflow-y: auto;
|
||
}
|
||
[data-theme="light"] .tool-card .tc-run {
|
||
color: #3f6ef5;
|
||
}
|
||
[data-theme="light"] .tool-card .tc-done {
|
||
color: #128a52;
|
||
}
|
||
[data-theme="light"] .tool-card .tc-deny {
|
||
color: #c2185b;
|
||
}
|
||
.tool-card.tool-drip-in {
|
||
animation: toolDripIn 0.32s var(--ease-out) both;
|
||
}
|
||
@keyframes toolDripIn {
|
||
0% {
|
||
opacity: 0;
|
||
transform: translateY(-18px) scale(0.96);
|
||
}
|
||
70% {
|
||
opacity: 1;
|
||
transform: translateY(2px) scale(1.005);
|
||
}
|
||
100% {
|
||
opacity: 1;
|
||
transform: translateY(0) scale(1);
|
||
}
|
||
}
|
||
.msg-bubble .thinking-tools {
|
||
display: flex;
|
||
gap: 6px;
|
||
align-items: center;
|
||
flex-wrap: wrap;
|
||
}
|
||
.msg-bubble .thinking-tool {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
font-size: 11px;
|
||
color: var(--text-secondary);
|
||
background: var(--pre-bg);
|
||
border-radius: 999px;
|
||
padding: 3px 10px;
|
||
}
|
||
.msg-bubble .thinking-tool.pill-in {
|
||
animation: pillIn 0.25s var(--ease-out) both;
|
||
}
|
||
@keyframes pillIn {
|
||
from {
|
||
opacity: 0;
|
||
transform: translateX(8px);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: none;
|
||
}
|
||
}
|
||
.msg-bubble .live-spinner {
|
||
width: 15px;
|
||
height: 15px;
|
||
border-radius: 50%;
|
||
border: 2px solid var(--msg-user-bg);
|
||
border-top-color: var(--accent);
|
||
animation: spin 0.7s linear infinite;
|
||
flex-shrink: 0;
|
||
display: inline-block;
|
||
vertical-align: middle;
|
||
}
|
||
.msg-bubble .live-spinner + .thinking-tools,
|
||
.msg-bubble .live-spinner + .text {
|
||
margin-left: 8px;
|
||
}
|
||
.msg-bubble.grow-in {
|
||
animation: bubbleGrow 0.5s var(--ease-out) both;
|
||
}
|
||
.msg-bubble.grow-in .text {
|
||
animation: textFadeIn 0.35s ease 0.125s both;
|
||
}
|
||
@keyframes bubbleGrow {
|
||
from {
|
||
max-height: 28px;
|
||
opacity: 0.4;
|
||
}
|
||
to {
|
||
max-height: 3000px;
|
||
opacity: 1;
|
||
}
|
||
}
|
||
@keyframes textFadeIn {
|
||
from {
|
||
opacity: 0;
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
}
|
||
}
|
||
.tool-call.tool-drip-in {
|
||
animation: toolDripIn 0.3s var(--ease-out) both;
|
||
}
|
||
@keyframes toolDripIn {
|
||
from {
|
||
opacity: 0;
|
||
transform: translateY(-14px) scale(0.98);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: none;
|
||
}
|
||
}
|
||
.chat-input-row {
|
||
display: flex;
|
||
gap: 8px;
|
||
flex-shrink: 0;
|
||
padding-top: 10px;
|
||
}
|
||
.chat-input-row input {
|
||
flex: 1;
|
||
margin-bottom: 0;
|
||
}
|
||
.chat-input-row button {
|
||
flex-shrink: 0;
|
||
margin-bottom: 0;
|
||
}
|
||
#sm-container-chat {
|
||
height: 480px;
|
||
background: var(--bg-input);
|
||
border-radius: var(--radius-md);
|
||
border: 1px solid var(--glass-border);
|
||
overflow: hidden;
|
||
position: relative;
|
||
}
|
||
#sm-container-chat canvas {
|
||
display: block;
|
||
}
|
||
.loading {
|
||
display: inline-block;
|
||
width: 16px;
|
||
height: 16px;
|
||
border: 2px solid var(--loading-border);
|
||
border-radius: 50%;
|
||
border-top-color: var(--loading-top);
|
||
animation: spin 0.6s linear infinite;
|
||
}
|
||
.loading-spinner {
|
||
width: 32px;
|
||
height: 32px;
|
||
border: 3px solid color-mix(in srgb, var(--accent) 15%, transparent);
|
||
border-top: 3px solid var(--accent);
|
||
border-radius: 50%;
|
||
animation: spin 0.8s linear infinite;
|
||
}
|
||
@keyframes spin {
|
||
to {
|
||
transform: rotate(360deg);
|
||
}
|
||
}
|
||
|
||
/* ===== 未配置后端引导 ===== */
|
||
.setup-card {
|
||
text-align: center;
|
||
padding: 48px 32px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 16px;
|
||
}
|
||
.setup-card .setup-icon {
|
||
width: 64px;
|
||
height: 64px;
|
||
opacity: 0.8;
|
||
}
|
||
.setup-card h2 {
|
||
font-size: 18px;
|
||
margin-bottom: 0;
|
||
}
|
||
.setup-card p {
|
||
color: var(--text-muted);
|
||
font-size: 13px;
|
||
max-width: 420px;
|
||
line-height: 1.6;
|
||
}
|
||
.setup-card .btn {
|
||
padding: 8px 20px;
|
||
font-size: 13px;
|
||
}
|
||
|
||
/* ===== Settings ===== */
|
||
.settings-tabs {
|
||
display: flex;
|
||
gap: 4px;
|
||
flex-wrap: wrap;
|
||
border-bottom: 1px solid var(--border-color);
|
||
padding-bottom: 10px;
|
||
margin-bottom: 16px;
|
||
}
|
||
.settings-tabs span {
|
||
padding: 7px 16px;
|
||
font-size: 14px;
|
||
cursor: pointer;
|
||
color: var(--text-secondary);
|
||
border-radius: var(--radius-pill);
|
||
border: 1px solid transparent;
|
||
transition: all 0.15s;
|
||
}
|
||
.settings-tabs span:hover {
|
||
color: var(--text-primary);
|
||
background: var(--bg-hover);
|
||
}
|
||
.settings-tabs span.active {
|
||
color: var(--accent);
|
||
background: var(--accent-bg);
|
||
border-color: color-mix(in srgb, var(--accent) 35%, transparent);
|
||
}
|
||
.settings-content {
|
||
min-width: 0;
|
||
}
|
||
.settings-key {
|
||
font-family: var(--font-mono);
|
||
font-size: 13px;
|
||
color: var(--text-secondary);
|
||
margin-bottom: 3px;
|
||
}
|
||
.kv-row {
|
||
display: flex;
|
||
padding: 7px 0;
|
||
border-bottom: 1px solid var(--kv-border);
|
||
font-size: 14px;
|
||
}
|
||
.kv-row .key {
|
||
color: var(--text-secondary);
|
||
width: 180px;
|
||
flex-shrink: 0;
|
||
}
|
||
.kv-row .val {
|
||
color: var(--text-primary);
|
||
word-break: break-all;
|
||
}
|
||
.tool-badge {
|
||
display: inline-block;
|
||
padding: 1px 6px;
|
||
border-radius: 3px;
|
||
font-size: 10px;
|
||
background: var(--accent-bg);
|
||
color: var(--accent);
|
||
margin: 1px;
|
||
}
|
||
.check-pass {
|
||
color: #6ee7a8;
|
||
}
|
||
.check-fail {
|
||
color: #ff9ec6;
|
||
}
|
||
.check-skip {
|
||
color: var(--text-secondary);
|
||
}
|
||
.health-item {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
padding: 8px 12px;
|
||
background: var(--bg-input);
|
||
border-radius: var(--radius-sm);
|
||
font-size: 13px;
|
||
}
|
||
.health-item .check-name {
|
||
flex: 1;
|
||
}
|
||
.health-item .check-status {
|
||
font-size: 11px;
|
||
font-weight: 500;
|
||
}
|
||
|
||
/* ===== 连接管理 (设置页内嵌) ===== */
|
||
.conn-item {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
padding: 12px 16px;
|
||
border: 1px solid var(--glass-border);
|
||
border-radius: var(--radius-md);
|
||
margin-bottom: 8px;
|
||
cursor: pointer;
|
||
transition: all 0.12s;
|
||
}
|
||
.conn-item:hover {
|
||
background: var(--bg-hover);
|
||
border-color: var(--accent);
|
||
}
|
||
.conn-item.active {
|
||
border-color: var(--accent);
|
||
background: var(--accent-bg);
|
||
}
|
||
.conn-item .conn-info {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
.conn-item .conn-name {
|
||
font-size: 14px;
|
||
font-weight: 600;
|
||
color: var(--text-primary);
|
||
}
|
||
.conn-item .gw-badge {
|
||
display: inline-block;
|
||
margin-left: 6px;
|
||
padding: 1px 6px;
|
||
font-size: 10px;
|
||
font-weight: 600;
|
||
line-height: 1.4;
|
||
color: var(--accent);
|
||
background: var(--accent-bg);
|
||
border: 1px solid var(--accent);
|
||
border-radius: 8px;
|
||
vertical-align: 1px;
|
||
}
|
||
.conn-item .conn-url {
|
||
font-size: 12px;
|
||
color: var(--text-secondary);
|
||
margin-top: 2px;
|
||
}
|
||
.conn-item .conn-actions {
|
||
display: flex;
|
||
gap: 4px;
|
||
flex-shrink: 0;
|
||
}
|
||
.conn-form h3 {
|
||
font-size: 15px;
|
||
margin-bottom: 12px;
|
||
}
|
||
.conn-form-actions {
|
||
display: flex;
|
||
gap: 8px;
|
||
justify-content: flex-end;
|
||
margin-top: 12px;
|
||
}
|
||
|
||
/* ===== Toast ===== */
|
||
.toast {
|
||
position: fixed;
|
||
bottom: 20px;
|
||
right: 20px;
|
||
background: var(--toast-bg);
|
||
color: var(--toast-color);
|
||
backdrop-filter: blur(10px);
|
||
padding: 10px 20px;
|
||
border-radius: var(--radius-md);
|
||
font-size: 13px;
|
||
display: none;
|
||
z-index: 300;
|
||
border: 1px solid rgba(23, 169, 100, 0.3);
|
||
box-shadow: var(--shadow-md);
|
||
animation: toastIn 0.15s var(--ease-out);
|
||
}
|
||
.toast.error {
|
||
background: var(--toast-error-bg);
|
||
color: var(--toast-error-color);
|
||
border-color: rgba(219, 54, 148, 0.3);
|
||
}
|
||
.toast.warn {
|
||
background: rgba(217, 154, 43, 0.16);
|
||
color: #fcd9a0;
|
||
border-color: rgba(217, 154, 43, 0.35);
|
||
}
|
||
[data-theme="light"] .toast.warn {
|
||
background: rgba(217, 154, 43, 0.14);
|
||
color: #92400e;
|
||
border-color: rgba(217, 154, 43, 0.3);
|
||
}
|
||
@keyframes toastIn {
|
||
from {
|
||
opacity: 0;
|
||
transform: translateX(30px);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: translateX(0);
|
||
}
|
||
}
|
||
|
||
/* ===== 动效补齐:自定义确认弹窗(替换原生 confirm) ===== */
|
||
.confirm-overlay {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 400;
|
||
display: none;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: rgba(8, 10, 20, 0.55);
|
||
backdrop-filter: blur(6px);
|
||
-webkit-backdrop-filter: blur(6px);
|
||
animation: overlayIn 0.18s var(--ease-out);
|
||
}
|
||
.confirm-box {
|
||
width: min(420px, 88vw);
|
||
background: var(--glass-bg-strong);
|
||
backdrop-filter: blur(14px);
|
||
-webkit-backdrop-filter: blur(14px);
|
||
border: 1px solid var(--glass-border);
|
||
border-radius: var(--radius-lg);
|
||
padding: 22px 24px;
|
||
box-shadow: var(--shadow-lg);
|
||
animation: confirmIn 0.22s var(--ease-out);
|
||
}
|
||
.confirm-box h3 {
|
||
font-size: 15px;
|
||
font-weight: 600;
|
||
color: var(--text-primary);
|
||
margin-bottom: 10px;
|
||
}
|
||
.confirm-box p {
|
||
font-size: 13px;
|
||
color: var(--text-secondary);
|
||
line-height: 1.6;
|
||
margin-bottom: 18px;
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
}
|
||
.confirm-actions {
|
||
display: flex;
|
||
gap: 8px;
|
||
justify-content: flex-end;
|
||
}
|
||
@keyframes overlayIn {
|
||
from {
|
||
opacity: 0;
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
}
|
||
}
|
||
@keyframes confirmIn {
|
||
from {
|
||
opacity: 0;
|
||
transform: translateY(10px) scale(0.97);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: none;
|
||
}
|
||
}
|
||
|
||
/* ===== 动效补齐:卡片 3D tilt + 光标光斑 ===== */
|
||
.card.tilt {
|
||
transform-style: preserve-3d;
|
||
transition:
|
||
box-shadow var(--dur-normal) var(--ease-out),
|
||
transform 0.15s ease-out;
|
||
}
|
||
.card.tilt .tilt-glow {
|
||
position: absolute;
|
||
inset: 0;
|
||
border-radius: inherit;
|
||
pointer-events: none;
|
||
opacity: 0;
|
||
transition: opacity 0.3s ease-out;
|
||
background: radial-gradient(
|
||
240px circle at var(--mx, 50%) var(--my, 50%),
|
||
rgba(255, 127, 172, 0.12),
|
||
transparent 70%
|
||
);
|
||
}
|
||
.card.tilt:hover .tilt-glow {
|
||
opacity: 1;
|
||
}
|
||
|
||
/* ===== 动效补齐:无障碍(焦点环 / 选区 / 降级动效) ===== */
|
||
:focus-visible {
|
||
outline: 2px solid var(--accent);
|
||
outline-offset: 2px;
|
||
border-radius: var(--radius-sm);
|
||
}
|
||
::selection {
|
||
background: rgba(255, 127, 172, 0.35);
|
||
}
|
||
|
||
/* ===== 动效补齐:主题化滚动条 ===== */
|
||
::-webkit-scrollbar {
|
||
width: 10px;
|
||
height: 10px;
|
||
}
|
||
::-webkit-scrollbar-track {
|
||
background: transparent;
|
||
}
|
||
::-webkit-scrollbar-thumb {
|
||
background: rgba(255, 127, 172, 0.25);
|
||
border-radius: var(--radius-pill);
|
||
border: 2px solid transparent;
|
||
background-clip: content-box;
|
||
}
|
||
::-webkit-scrollbar-thumb:hover {
|
||
background: rgba(255, 127, 172, 0.45);
|
||
background-clip: content-box;
|
||
border: 2px solid transparent;
|
||
}
|
||
* {
|
||
scrollbar-width: thin;
|
||
scrollbar-color: rgba(255, 127, 172, 0.35) transparent;
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
*,
|
||
*::before,
|
||
*::after {
|
||
animation-duration: 0.01ms !important;
|
||
animation-iteration-count: 1 !important;
|
||
transition-duration: 0.01ms !important;
|
||
}
|
||
.card.tilt {
|
||
transform: none !important;
|
||
transition: none !important;
|
||
}
|
||
.card.tilt .tilt-glow {
|
||
display: none !important;
|
||
}
|
||
}
|
||
|
||
/* ===== Starmap ===== */
|
||
#starmap-stats,
|
||
#starmap-info {
|
||
position: absolute;
|
||
top: 16px;
|
||
background: rgba(10, 10, 26, 0.85);
|
||
padding: 12px 16px;
|
||
border-radius: var(--radius-md);
|
||
border: 1px solid rgba(100, 100, 255, 0.3);
|
||
font-size: 13px;
|
||
z-index: 10;
|
||
backdrop-filter: blur(10px);
|
||
color: #ccc;
|
||
}
|
||
#starmap-stats {
|
||
left: 16px;
|
||
}
|
||
#starmap-info {
|
||
right: 16px;
|
||
display: none;
|
||
max-width: 260px;
|
||
}
|
||
#starmap-stats h3,
|
||
#starmap-info h3 {
|
||
margin-bottom: 6px;
|
||
font-size: 14px;
|
||
}
|
||
#starmap-stats h3 {
|
||
color: #4488ff;
|
||
}
|
||
#starmap-info h3 {
|
||
color: #44ff88;
|
||
}
|
||
#starmap-stats p,
|
||
#starmap-info p {
|
||
margin: 2px 0;
|
||
color: #888;
|
||
font-size: 12px;
|
||
}
|
||
#starmap-stats span {
|
||
color: #fff;
|
||
font-weight: 700;
|
||
}
|
||
#starmap-info .label {
|
||
color: #666;
|
||
}
|
||
#starmap-loading {
|
||
position: absolute;
|
||
top: 50%;
|
||
left: 50%;
|
||
transform: translate(-50%, -50%);
|
||
font-size: 18px;
|
||
color: #4488ff;
|
||
z-index: 20;
|
||
}
|
||
.starmap-toggle {
|
||
position: absolute;
|
||
bottom: 16px;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
display: flex;
|
||
gap: 8px;
|
||
z-index: 10;
|
||
}
|
||
.starmap-toggle button {
|
||
background: rgba(10, 10, 26, 0.85);
|
||
border: 1px solid rgba(100, 100, 255, 0.3);
|
||
color: #aaa;
|
||
padding: 6px 14px;
|
||
border-radius: var(--radius-sm);
|
||
cursor: pointer;
|
||
font-size: 12px;
|
||
font-family: inherit;
|
||
backdrop-filter: blur(10px);
|
||
transition: all 0.2s;
|
||
}
|
||
.starmap-toggle button:hover {
|
||
background: rgba(68, 136, 255, 0.2);
|
||
color: #fff;
|
||
border-color: rgba(68, 136, 255, 0.6);
|
||
}
|
||
.starmap-toggle button.on {
|
||
background: rgba(68, 136, 255, 0.3);
|
||
color: #4488ff;
|
||
border-color: #4488ff;
|
||
}
|
||
.fade-in {
|
||
animation: fadeIn 0.2s var(--ease-out);
|
||
}
|
||
@keyframes fadeIn {
|
||
from {
|
||
opacity: 0;
|
||
transform: translateY(4px);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: translateY(0);
|
||
}
|
||
}
|
||
|
||
@media (max-width: 768px) {
|
||
.rail {
|
||
width: 48px;
|
||
}
|
||
.container {
|
||
padding: 12px;
|
||
}
|
||
.card {
|
||
padding: 12px;
|
||
}
|
||
.grid-2,
|
||
.grid-3,
|
||
.grid-4 {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
.stat-value {
|
||
font-size: 20px;
|
||
}
|
||
.kv-row {
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
}
|
||
.kv-row .key {
|
||
width: auto;
|
||
}
|
||
.msg {
|
||
max-width: 100%;
|
||
}
|
||
.term-screen {
|
||
background: #0f1115;
|
||
border: 1px solid #2a2e35;
|
||
border-radius: 8px;
|
||
margin: 6px 0 4px 0;
|
||
overflow: hidden;
|
||
font-size: 11px;
|
||
line-height: 1.45;
|
||
}
|
||
.term-screen .term-head {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 4px 8px;
|
||
background: #1a1d23;
|
||
color: #9aa0a8;
|
||
font-size: 10px;
|
||
border-bottom: 1px solid #2a2e35;
|
||
font-family: var(--font-mono);
|
||
}
|
||
.term-screen .term-head .term-dot {
|
||
width: 8px;
|
||
height: 8px;
|
||
border-radius: 50%;
|
||
background: #3fb950;
|
||
flex-shrink: 0;
|
||
}
|
||
.term-screen .term-head .term-dot.stopped {
|
||
background: #d29922;
|
||
}
|
||
.term-screen pre.term-buf {
|
||
margin: 0;
|
||
padding: 6px 8px;
|
||
background: transparent;
|
||
color: #d8dee9;
|
||
font-family: var(--font-mono);
|
||
font-size: 11px;
|
||
white-space: pre-wrap;
|
||
word-break: break-all;
|
||
max-height: 260px;
|
||
overflow-y: auto;
|
||
scrollbar-width: thin;
|
||
}
|
||
.term-screen pre.term-buf::-webkit-scrollbar {
|
||
width: 6px;
|
||
}
|
||
.term-screen pre.term-buf::-webkit-scrollbar-thumb {
|
||
background: #33373d;
|
||
border-radius: 3px;
|
||
}
|
||
.health-item {
|
||
flex-wrap: wrap;
|
||
gap: 4px;
|
||
}
|
||
}
|
||
|
||
/* ===== Toggle switch(左右滑动开关按钮)===== */
|
||
.switch {
|
||
position: relative;
|
||
display: inline-block;
|
||
width: 44px;
|
||
height: 24px;
|
||
vertical-align: middle;
|
||
flex-shrink: 0;
|
||
cursor: pointer;
|
||
}
|
||
.switch input {
|
||
opacity: 0;
|
||
width: 0;
|
||
height: 0;
|
||
position: absolute;
|
||
}
|
||
.switch span {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
background: #888;
|
||
border-radius: 24px;
|
||
transition: background 0.25s;
|
||
}
|
||
.switch span::before {
|
||
content: "";
|
||
position: absolute;
|
||
width: 18px;
|
||
height: 18px;
|
||
left: 3px;
|
||
top: 3px;
|
||
background: #fff;
|
||
border-radius: 50%;
|
||
transition: transform 0.25s;
|
||
}
|
||
.switch input:checked + span {
|
||
background: #34c759;
|
||
}
|
||
.switch input:checked + span::before {
|
||
transform: translateX(20px);
|
||
}
|
||
td .switch {
|
||
margin-right: 6px;
|
||
}
|
||
|
||
/* ===== 设备页样式修复 ===== */
|
||
/* 开关输入框彻底隐藏,避免浅蓝方框露出 */
|
||
.switch input {
|
||
-webkit-appearance: none;
|
||
appearance: none;
|
||
border: none;
|
||
outline: none;
|
||
background: transparent;
|
||
}
|
||
/* 设备列表表格圆角化(去方框感) */
|
||
.card table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
overflow: hidden;
|
||
border-radius: var(--radius-md);
|
||
font-size: 13px;
|
||
}
|
||
.card table th,
|
||
.card table td {
|
||
text-align: left;
|
||
padding: 8px 10px;
|
||
border-bottom: 1px solid var(--glass-border, rgba(128, 128, 128, 0.15));
|
||
vertical-align: middle;
|
||
}
|
||
.card table th {
|
||
font-weight: 600;
|
||
color: var(--text-muted, #888);
|
||
white-space: nowrap;
|
||
}
|
||
.card table tr:last-child td {
|
||
border-bottom: none;
|
||
}
|
||
.card table tr:hover td {
|
||
background: var(--glass-hover, rgba(128, 128, 128, 0.06));
|
||
}
|
||
/* kv-row 值区对齐(含开关) */
|
||
.kv-row .val {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
.kv-row .val .switch {
|
||
margin-right: 4px;
|
||
}
|