/* Codex 插件市场 —— 深色为主,支持浅色。无外部 CDN,系统字体栈。 */ :root { --grad: linear-gradient(135deg, #5B6CFF 0%, #A855F7 100%); --accent: #7c85ff; --bg: #0f1117; --bg-2: #161923; --card: #1b1f2b; --card-2: #212636; --border: #2a3042; --text: #e8eaf2; --muted: #9aa2b8; --danger: #ff6b6b; --ok: #4ade80; --radius: 14px; --shadow: 0 8px 30px rgba(0, 0, 0, 0.35); } @media (prefers-color-scheme: light) { :root { --bg: #f5f6fb; --bg-2: #eceef6; --card: #ffffff; --card-2: #f3f4fa; --border: #e2e5ef; --text: #1b1e29; --muted: #6b7186; --shadow: 0 8px 24px rgba(60, 60, 120, 0.12); } } * { box-sizing: border-box; } html, body { height: 100%; margin: 0; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); display: flex; flex-direction: column; overflow: hidden; font-size: 14px; } code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--card-2); padding: 1px 6px; border-radius: 6px; } /* 顶栏 */ .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--bg-2); border-bottom: 1px solid var(--border); /* 窗口用系统原生标题栏(main.js 未设 frame:false),不需要自绘拖拽区。 -webkit-app-region: drag 会让浏览器进程在 OS 层拦截该区域的鼠标事件用于「拖窗」, 真实鼠标点击到导航(含标签间隙/品牌区,以及 no-drag 命中不稳的边角)会被吞掉, 而 CDP Input.dispatchMouseEvent 直接注入渲染进程、绕过该拦截,所以静态与 CDP 都看不出。 原生边框已提供拖窗,这里移除以杜绝该类「点不动」。 */ } .brand { display: flex; align-items: center; gap: 12px; } .logo { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; box-shadow: var(--shadow); } .brand-name { font-weight: 700; font-size: 15px; letter-spacing: .2px; } .brand-sub { color: var(--muted); font-size: 12px; margin-top: 1px; } /* —— 顶部广告:官方推荐中转 —— */ .promo { -webkit-app-region: no-drag; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 12px; white-space: nowrap; background: linear-gradient(90deg, rgba(91,108,255,.14), rgba(168,85,247,.14)); border: 1px solid rgba(124,108,255,.35); transition: .15s; } .promo:hover { border-color: rgba(124,108,255,.7); background: linear-gradient(90deg, rgba(91,108,255,.22), rgba(168,85,247,.22)); } .promo-badge { font-size: 11px; font-weight: 700; color: #fff; background: var(--grad); padding: 2px 7px; border-radius: 6px; letter-spacing: .2px; } .promo-text { color: var(--muted); } .promo-text b { color: var(--text); font-weight: 600; } .promo-arrow { color: var(--muted); font-weight: 700; } .tabs { display: flex; gap: 4px; background: var(--card); padding: 4px; border-radius: 12px; border: 1px solid var(--border); } .tab { border: 0; background: transparent; color: var(--muted); padding: 7px 16px; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 600; transition: .15s; } .tab:hover { color: var(--text); } .tab.active { color: #fff; background: var(--grad); box-shadow: var(--shadow); } /* 内容区 */ .content { flex: 1; overflow-y: auto; padding: 22px; } .panel { display: none; animation: fade .2s ease; } .panel.active { display: block; } @keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } } .panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; } h2 { margin: 0; font-size: 20px; } h3 { margin: 0; font-size: 16px; } .muted { color: var(--muted); margin: 4px 0 0; } .small { font-size: 12px; } .head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .search { background: var(--card); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 9px 12px; width: 220px; outline: none; } .search:focus { border-color: var(--accent); } .segmented { display: flex; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 3px; } .seg { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 7px; cursor: pointer; font-size: 12px; font-weight: 600; } .seg.active { background: var(--card-2); color: var(--text); } /* 按钮 */ .btn { border: 1px solid var(--border); background: var(--card); color: var(--text); padding: 9px 16px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600; transition: .15s; } .btn:hover { border-color: var(--accent); } .btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: var(--shadow); } .btn.primary:hover { filter: brightness(1.07); } .btn.ghost { background: transparent; } .btn:disabled { opacity: .5; cursor: not-allowed; } .btn.small { padding: 6px 12px; font-size: 12px; } .btn.danger { border-color: var(--danger); color: var(--danger); } .btn.danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); } .btn-group { display: flex; gap: 10px; } .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; opacity: .7; word-break: break-all; } /* 市场网格 */ .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; } .plugin-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: .15s; } .plugin-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); } .pc-top { display: flex; align-items: center; gap: 10px; } .pc-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; } .pc-badge.plugin { background: rgba(124,133,255,.16); color: var(--accent); } .pc-badge.skill { background: rgba(74,222,128,.15); color: var(--ok); } .pc-badge.plat { background: rgba(245,158,11,.16); color: #f59e0b; } .pc-badge.on { background: rgba(74,222,128,.18); color: var(--ok); } /* 全局代理:两种模式说明块 */ .proxy-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; } .pm-item { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.02); } .pm-item b { font-size: 14px; } @media (max-width: 760px) { .proxy-modes { grid-template-columns: 1fr; } } .pc-name { font-weight: 700; font-size: 15px; word-break: break-all; } .pc-meta { color: var(--muted); font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; } .pc-desc { color: var(--muted); font-size: 13px; line-height: 1.5; min-height: 20px; flex: 1; } .pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; } .link { color: var(--accent); cursor: pointer; font-size: 12px; text-decoration: none; } .link:hover { text-decoration: underline; } /* 勾选列表(备份/还原) */ .checklist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; } .cl-group { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 10px 2px 2px; } .cl-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 11px; padding: 11px 14px; cursor: pointer; transition: .12s; } .cl-item:hover { border-color: var(--accent); } .cl-item input { width: 17px; height: 17px; accent-color: var(--accent); } .cl-item .cl-name { font-weight: 600; } .cl-item .cl-src { color: var(--muted); font-size: 12px; } .cl-item .cl-size { margin-left: auto; color: var(--muted); font-size: 12px; } /* 子标签 */ .subtabs { display: flex; gap: 6px; margin-bottom: 18px; } .subtab { border: 1px solid var(--border); background: var(--card); color: var(--muted); padding: 8px 16px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13px; } .subtab.active { color: var(--text); border-color: var(--accent); background: var(--card-2); } .subpanel { display: none; } .subpanel.active { display: block; } /* 表单卡片 */ .card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; } .action-card { margin-top: 8px; display: flex; flex-direction: column; gap: 14px; } .row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; } .row.between { justify-content: space-between; align-items: center; } .field { display: flex; flex-direction: column; gap: 6px; } .field.grow { flex: 1; min-width: 200px; } .field span { font-size: 12px; color: var(--muted); font-weight: 600; } .field input { background: var(--bg-2); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 10px 12px; outline: none; } .field input:focus { border-color: var(--accent); } .check-inline { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; cursor: pointer; } .check-inline input { accent-color: var(--accent); width: 16px; height: 16px; } /* 空 / 加载态 */ .empty { text-align: center; color: var(--muted); padding: 50px 20px; border: 1px dashed var(--border); border-radius: var(--radius); } .spinner { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px; } @keyframes spin { to { transform: rotate(360deg); } } .hidden { display: none !important; } /* 日志抽屉 */ .logbar { border-top: 1px solid var(--border); background: var(--bg-2); } .log-toggle { width: 100%; text-align: left; border: 0; background: transparent; color: var(--muted); padding: 8px 20px; cursor: pointer; font-size: 12px; font-weight: 600; display: flex; justify-content: space-between; } .log-panel { max-height: 190px; overflow-y: auto; padding: 0 20px 12px; } .log-panel pre { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.6; color: var(--muted); white-space: pre-wrap; word-break: break-word; } /* Toast */ .toast { position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%); background: var(--card); border: 1px solid var(--border); color: var(--text); padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow); z-index: 50; max-width: 80%; font-size: 13px; } .toast.ok { border-color: var(--ok); } .toast.err { border-color: var(--danger); } /* 卡片内按钮忙碌态 */ .installing { pointer-events: none; opacity: .7; } /* 会话记录:同步横幅 */ .sync-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: linear-gradient(135deg, rgba(124,133,255,.12), rgba(168,85,247,.10)); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; } .sync-banner .sync-text { display: flex; flex-direction: column; gap: 3px; } .sync-banner .sync-text strong { font-size: 14px; } .sync-banner .sync-text b { color: var(--danger); } .sync-progress { display: flex; align-items: center; gap: 10px; margin-top: 6px; } .sync-progress-bar { flex: 1; max-width: 320px; height: 7px; background: var(--card-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); } .sync-progress-fill { height: 100%; width: 0%; background: var(--grad); border-radius: 999px; transition: width .2s ease; } .sync-progress-label { white-space: nowrap; } /* 会话记录:左右两栏 */ .sess-layout { display: grid; grid-template-columns: 300px 1fr; gap: 14px; height: calc(100vh - 240px); min-height: 320px; } .sess-list { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; } .sess-item { background: var(--card); border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px; cursor: pointer; transition: .12s; } .sess-item:hover { border-color: var(--accent); } .sess-item.active { border-color: var(--accent); background: var(--card-2); } .sess-item .si-title { font-weight: 600; font-size: 13px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sess-item .si-meta { color: var(--muted); font-size: 11px; display: flex; gap: 8px; flex-wrap: wrap; } .si-badge { border: 1px solid var(--border); border-radius: 999px; padding: 1px 6px; color: var(--text); background: var(--card-2); font-weight: 700; } .sess-reader { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; } .sess-conv { display: flex; flex-direction: column; height: 100%; } .sess-conv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); } .sess-conv-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sess-messages { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; } .msg { display: flex; flex-direction: column; gap: 4px; } .msg .who { font-size: 11px; font-weight: 700; color: var(--muted); } .msg .bubble { border-radius: 12px; padding: 10px 13px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; } .msg.user { align-items: flex-end; } .msg.user .bubble { background: var(--grad); color: #fff; max-width: 85%; } .msg.assistant .bubble { background: var(--card-2); color: var(--text); border: 1px solid var(--border); max-width: 92%; } .msg.tool .bubble { background: transparent; color: var(--muted); font-size: 12px; border: 1px dashed var(--border); padding: 5px 10px; } /* 常驻页脚:版权 / 使用说明 */ .footer-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 20px; background: var(--bg-2); border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); } .footer-notice .fn-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .footer-notice .fn-links { display: flex; gap: 14px; flex-shrink: 0; } .fn-link { border: 0; background: transparent; color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 600; padding: 0; } .fn-link:hover { text-decoration: underline; } /* 说明弹窗 */ .modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 24px; animation: fade .15s ease; } .modal { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); max-width: 640px; width: 100%; max-height: 82vh; display: flex; flex-direction: column; } .modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid var(--border); } .modal-head h3 { font-size: 16px; } .modal-close { border: 0; background: transparent; color: var(--muted); font-size: 17px; cursor: pointer; line-height: 1; padding: 3px 7px; border-radius: 8px; } .modal-close:hover { color: var(--text); background: var(--card-2); } .modal-body { padding: 18px 22px; overflow-y: auto; line-height: 1.7; font-size: 13px; color: var(--text); } .modal-body h4 { margin: 18px 0 6px; font-size: 14px; } .modal-body h4:first-child { margin-top: 0; } .modal-body p { margin: 6px 0; color: var(--muted); } .modal-body ul { margin: 6px 0; padding-left: 20px; color: var(--muted); } .modal-body li { margin: 4px 0; } .modal-body strong { color: var(--text); } .modal-body .step { display: flex; gap: 10px; margin: 8px 0; align-items: baseline; } .modal-body .step .n { flex-shrink: 0; width: 20px; height: 20px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; } .cv-media-modal { max-width: min(1120px, 94vw); } .cv-media-modal .modal-body { padding: 10px; overflow: hidden; } .cv-modal-media { display: block; width: 100%; max-height: 76vh; object-fit: contain; background: #000; border-radius: 8px; } .grp-select { margin-top: 8px; width: 100%; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 9px 12px; outline: none; font-size: 13px; } .grp-select:focus { border-color: var(--accent); } /* —— 会话记忆 —— */ .mem-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 16px; margin-bottom: 10px; } .mem-item:hover { border-color: var(--accent); } .mem-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .mem-topic { font-weight: 600; } .mem-actions { margin-left: auto; display: flex; gap: 6px; } .mem-sum { margin-top: 8px; white-space: pre-wrap; font-size: 13px; color: var(--text); opacity: .88; } .mem-line { margin-top: 6px; font-size: 12px; color: var(--muted); } .mem-line b { color: var(--text); margin-right: 8px; font-weight: 600; } /* =========================================================================== 技能商店(cocoloop 镜像)—— 侧栏分类 + 精致卡片 =========================================================================== */ .store { display: grid; grid-template-columns: 236px 1fr; gap: 18px; height: calc(100vh - 150px); min-height: 420px; } /* 左侧分类导航 */ .store-nav { display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; } .store-nav-head { display: flex; align-items: baseline; justify-content: space-between; padding: 13px 15px 9px; border-bottom: 1px solid var(--border); } .store-nav-title { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .5px; } .store-nav-total { font-size: 11px; color: var(--accent); font-weight: 700; } .store-nav-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; } .store-nav-list::-webkit-scrollbar { width: 8px; } .store-nav-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; } .store-nav-group { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; padding: 10px 10px 4px; opacity: .7; } .nav-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; transition: .12s; color: var(--text); } .nav-item:hover { background: var(--card); } .nav-item.active { background: var(--grad); color: #fff; box-shadow: var(--shadow); } .nav-item.active .nav-count { background: rgba(255,255,255,.22); color: #fff; } .nav-ico { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; } .nav-name { flex: 1; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .nav-count { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--card-2); padding: 1px 8px; border-radius: 999px; flex-shrink: 0; } /* 右侧主区 */ .store-main { display: flex; flex-direction: column; min-width: 0; } .store-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; } .store-crumb { display: flex; align-items: baseline; gap: 8px; font-size: 20px; font-weight: 700; } .store-crumb .muted { font-size: 13px; font-weight: 600; } .store-crumb-sep { color: var(--muted); font-weight: 400; } .store-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .store-sub { margin: 6px 0 14px; font-size: 12.5px; } .store-grid { overflow-y: auto; align-content: start; padding: 2px 4px 4px 2px; flex: 1; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); } .store-grid::-webkit-scrollbar { width: 9px; } .store-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 9px; } /* 技能卡片 */ .skill-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; display: flex; flex-direction: column; gap: 11px; transition: .15s; position: relative; overflow: hidden; } .skill-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); opacity: 0; transition: .15s; } .skill-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); } .skill-card:hover::before { opacity: 1; } .sk-top { display: flex; align-items: flex-start; gap: 11px; } .sk-ico { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; font-size: 22px; background: var(--card-2); border: 1px solid var(--border); border-radius: 11px; } .sk-headings { min-width: 0; flex: 1; } .sk-name { font-weight: 700; font-size: 15px; line-height: 1.25; word-break: break-word; } .sk-author { color: var(--muted); font-size: 12px; margin-top: 2px; } .sk-sec { flex-shrink: 0; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; font-size: 11px; font-weight: 800; } .sk-sec.S { background: linear-gradient(135deg,#f59e0b,#f97316); color: #fff; } .sk-sec.A { background: rgba(74,222,128,.16); color: var(--ok); } .sk-sec.B { background: var(--card-2); color: var(--muted); } .sk-subtitle { font-weight: 600; font-size: 13.5px; line-height: 1.4; color: var(--text); } .sk-brief { color: var(--muted); font-size: 12.5px; line-height: 1.55; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .sk-agents { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .sk-agents .lab { font-size: 11px; color: var(--muted); margin-right: 2px; } .agent-badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; background: var(--card-2); border: 1px solid var(--border); } .agent-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; } .agent-badge.claude::before { background: #d97757; } .agent-badge.codex::before { background: #5b6cff; } .agent-badge.openclaw::before { background: #a855f7; } .agent-badge.mm { background: rgba(245,158,11,.14); border-color: transparent; color: #f59e0b; } .agent-badge.mm::before { display: none; } .sk-meta { display: flex; align-items: center; gap: 13px; padding-top: 9px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; flex-wrap: wrap; } .sk-meta .cred { margin-left: auto; font-size: 10px; font-weight: 700; padding: 1px 7px; border: 1px solid var(--border); border-radius: 6px; letter-spacing: .3px; } .sk-foot { display: flex; align-items: center; gap: 9px; } .sk-foot .btn.primary { flex: 1; } /* 加载更多 */ .store-more { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; color: var(--muted); font-size: 13px; } /* 技能详情弹窗内的排版 */ .sd-hero { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 4px; } .sd-hero .sk-ico { width: 52px; height: 52px; font-size: 27px; } .sd-hero h3 { font-size: 18px; } .sd-stats { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; color: var(--muted); font-size: 13px; } .sd-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; } .sd-tag { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--card-2); color: var(--muted); border: 1px solid var(--border); } .sd-install-row { display: flex; gap: 10px; margin-top: 8px; } @media (max-width: 820px) { .store { grid-template-columns: 1fr; height: auto; } .store-nav { max-height: 200px; } } /* 品牌 logo 图片 */ .logo img { width: 100%; height: 100%; border-radius: 10px; display: block; object-fit: cover; } /* =========================================================================== 更新弹窗 =========================================================================== */ .update-modal { max-width: 480px; padding: 0; } .update-head { display: flex; align-items: center; gap: 13px; padding: 20px 22px 14px; } .update-ico { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; font-size: 24px; border-radius: 12px; background: var(--grad); } .update-head h3 { font-size: 17px; margin: 0; } .update-badge { margin-left: auto; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; } .update-badge.force { background: rgba(255,107,107,.16); color: var(--danger); } .update-badge.normal { background: rgba(74,222,128,.15); color: var(--ok); } .update-notes { margin: 0 22px; padding: 14px 16px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; max-height: 300px; overflow-y: auto; font-size: 13px; line-height: 1.65; color: var(--text); white-space: pre-wrap; word-break: break-word; } .update-notes:empty::before { content: "本次更新暂无详细说明。"; color: var(--muted); } .update-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px 20px; } .update-foot .btn { min-width: 96px; } /* =========================================================================== 插件市场 —— 内置工具卡片 + 分区标题 + 返回按钮 =========================================================================== */ .tools-title { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .5px; margin: 6px 2px 12px; } .tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 26px; } .tool-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: .15s; } .tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); } .tool-top { display: flex; align-items: center; gap: 11px; } .tool-ico { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; font-size: 21px; background: var(--card-2); border: 1px solid var(--border); border-radius: 11px; } .tool-name { font-weight: 700; font-size: 15px; } .tool-desc { color: var(--muted); font-size: 13px; line-height: 1.6; flex: 1; } .tool-foot { display: flex; justify-content: flex-end; } .back-btn { margin-right: 8px; vertical-align: middle; padding: 4px 10px; } /* ============================================================ 创意画布(Drawflow 节点画布) 复用 :root 设计变量,覆写 Drawflow 默认外观,明/暗色协调。 ============================================================ */ /* 画布面板占满内容区高度:工具条固定 + 画布撑满剩余空间 */ /* 画布面板占满内容区高度:抵消 .content 的 22px padding,铺满更大气 */ #tab-canvas.active { display: flex; flex-direction: column; min-height: 0; margin: -22px; height: calc(100% + 44px); padding: 22px; } .cv-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; } .cv-toolbar-left { display: flex; align-items: center; gap: 12px; } .cv-title { font-size: 18px; } .cv-status { border: 1px solid var(--border); background: var(--card-2); color: var(--muted); } .cv-status.on { background: rgba(74,222,128,.18); color: var(--ok); border-color: transparent; } .cv-status.off { background: rgba(255,107,107,.16); color: var(--danger); border-color: transparent; } .cv-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .cv-add-label { color: var(--muted); font-size: 12px; font-weight: 600; margin-right: 2px; } /* 画布舞台:明确高度(Drawflow 容器需要),点阵底纹 */ .cv-stage { position: relative; flex: 1; min-height: 560px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); } #drawflow { position: absolute; inset: 0; width: 100%; height: 100%; background-color: var(--bg-2); background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 22px 22px; } /* 悬浮缩放控件(右下角,覆盖在画布上) */ .cv-zoom { position: absolute; right: 14px; bottom: 14px; z-index: 15; display: flex; flex-direction: column; gap: 1px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); } .cv-zoom-btn { border: 0; background: var(--card); color: var(--text); width: 38px; height: 34px; cursor: pointer; font-size: 17px; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center; transition: .12s; user-select: none; } .cv-zoom-btn:hover { background: var(--accent); color: #fff; } .cv-zoom-btn:active { transform: scale(.94); } .cv-zoom-level { font-size: 11px; font-weight: 600; color: var(--muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); } /* 未就绪遮罩 */ .cv-mask { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(2px); } .cv-mask-box { text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 32px; box-shadow: var(--shadow); max-width: 380px; } .cv-mask-ico { font-size: 34px; } .cv-mask-title { font-weight: 700; font-size: 16px; margin: 8px 0 4px; } .cv-mask-text { color: var(--muted); font-size: 13px; margin: 0 0 14px; line-height: 1.6; } /* —— 覆写 Drawflow 节点为卡片风 —— */ .drawflow .drawflow-node { background: transparent; border: 0; padding: 0; border-radius: 16px; box-shadow: none; width: 250px; } .drawflow .drawflow-node.selected { box-shadow: none; } .drawflow .drawflow-node .drawflow_content_node { width: 100%; } .cv-node { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: border-color .15s; } .drawflow-node:hover .cv-node { border-color: var(--accent); } .drawflow-node.selected .cv-node { border-color: transparent; box-shadow: 0 0 0 2px var(--accent), var(--shadow); } .cv-node-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--card-2); border-bottom: 1px solid var(--border); } .cv-node-ico { font-size: 15px; } .cv-node-name { font-weight: 700; font-size: 13px; color: var(--text); } .cv-node-tag { margin-left: auto; font-size: 10px; font-weight: 700; color: #f59e0b; background: rgba(245,158,11,.16); padding: 2px 7px; border-radius: 999px; } .cv-node-body { display: flex; flex-direction: column; gap: 8px; padding: 11px 12px; } .cv-node-hint { color: var(--muted); font-size: 11px; line-height: 1.5; } /* 节点内表单控件 */ .cv-field { width: 100%; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); border-radius: 9px; padding: 8px 10px; font-size: 12px; font-family: inherit; outline: none; resize: vertical; } .cv-field:focus { border-color: var(--accent); } select.cv-field { resize: none; cursor: pointer; } /* 并排两个下拉(比例 + 清晰度 / 音色 + 格式 等) */ .cv-row2 { display: flex; gap: 8px; } .cv-row2 .cv-field { flex: 1; min-width: 0; } /* 模型输入框 + 每节点「拉取」小按钮 */ .cv-model-row { display: flex; gap: 6px; align-items: stretch; } .cv-model-row .cv-field { flex: 1; min-width: 0; } .cv-fetch-models { flex: none; border: 1px solid var(--border); background: var(--card-2); color: var(--muted); border-radius: 9px; padding: 0 10px; cursor: pointer; font-size: 11px; font-weight: 700; transition: .15s; } .cv-fetch-models:hover { border-color: var(--accent); color: var(--accent); } .cv-fetch-models:disabled { opacity: .5; cursor: not-allowed; } /* 素材上传控件(图片节点参考图 / 视频节点首帧·尾帧·多参考图)——走自建图床 */ .cv-refimg-row, .cv-vmat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } .cv-refimg-pick { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; border: 1px dashed var(--accent); color: var(--accent); background: var(--card-2); border-radius: 9px; padding: 7px 12px; font-size: 11px; font-weight: 700; transition: .15s; white-space: nowrap; user-select: none; } .cv-refimg-pick:hover { background: var(--accent); color: #fff; } .cv-refimg-thumb, .cv-vmat-thumb { border: 1px solid var(--border); } .cv-refimg-clear, .cv-vmat-clear { flex: none; border: 1px solid var(--border); background: var(--card-2); color: var(--muted); border-radius: 7px; cursor: pointer; width: 24px; height: 24px; font-size: 12px; line-height: 1; padding: 0; transition: .15s; } .cv-refimg-clear:hover, .cv-vmat-clear:hover { border-color: var(--danger); color: var(--danger); } /* URL 输入 / 提示 / 多图缩略图 各自独占一行 */ .cv-vmat-url { flex: 1 1 100%; } .cv-refimg-row .cv-node-hint, .cv-vmat .cv-node-hint { flex: 1 1 100%; } .cv-vmat-refs-thumbs { display: flex; flex-wrap: wrap; gap: 2px; flex: 1 1 100%; } /* 复选标签(生成音频 / 水印 / 固定镜头)对齐 */ .cv-check { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); cursor: pointer; user-select: none; } /* 折叠「高级」区(接口地址覆盖),别把节点撑太高 */ .cv-adv { border-top: 1px dashed var(--border); padding-top: 6px; } .cv-adv > summary { cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 600; list-style: none; user-select: none; } .cv-adv > summary::-webkit-details-marker { display: none; } .cv-adv > summary::before { content: "▸ "; } .cv-adv[open] > summary::before { content: "▾ "; } .cv-adv[open] > summary { margin-bottom: 6px; } /* 运行按钮(沿用主色渐变观感) */ .cv-run { align-self: stretch; border: 0; background: var(--grad); color: #fff; padding: 8px 14px; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 700; transition: .15s; } .cv-run:hover { filter: brightness(1.08); } .cv-run:disabled { opacity: .6; cursor: not-allowed; } /* 错误红字 */ .cv-node-err { color: var(--danger); font-size: 11px; line-height: 1.5; background: rgba(255,107,107,.1); border-radius: 8px; padding: 6px 9px; } /* 预览区(img/video/audio)圆角、限高、加载骨架 */ .cv-node-preview { border-radius: 10px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--border); } .cv-preview-shell { position: relative; background: #000; } .cv-preview-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 5px; z-index: 2; opacity: .92; } .cv-preview-actions button { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 7px; background: rgba(15,17,23,.78); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; padding: 0; } .cv-preview-actions button:hover { background: rgba(90,103,216,.92); border-color: rgba(255,255,255,.4); } .cv-media { display: block; width: 100%; max-height: 220px; object-fit: contain; background: #000; } .cv-media-audio { display: block; width: 100%; } .cv-meta { font-size: 10px; color: var(--muted); padding: 5px 8px; border-top: 1px solid var(--border); } .cv-skeleton { display: flex; align-items: center; justify-content: center; gap: 8px; height: 120px; color: var(--muted); font-size: 12px; background: linear-gradient(100deg, var(--bg-2) 30%, var(--card-2) 50%, var(--bg-2) 70%); background-size: 200% 100%; animation: cv-shimmer 1.2s linear infinite; } @keyframes cv-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } } .cv-spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: cv-rot .7s linear infinite; } @keyframes cv-rot { to { transform: rotate(360deg); } } /* —— 端口与连线用主题色 —— */ .drawflow .drawflow-node .input, .drawflow .drawflow-node .output { background: var(--card); border: 2px solid var(--accent); width: 13px; height: 13px; } .drawflow .drawflow-node .output:hover, .drawflow .drawflow-node .input:hover { background: var(--accent); } .drawflow .connection .main-path { stroke: var(--accent); stroke-width: 2.4px; } .drawflow .connection .main-path:hover { stroke: var(--text); } .drawflow .connection .point { stroke: var(--accent); fill: var(--card); } /* —— 沉浸式全屏:fixed 覆盖整个应用窗口(含顶部导航) —— */ body.cv-noscroll { overflow: hidden; } #tab-canvas.cv-fullscreen { position: fixed; inset: 0; z-index: 9999; margin: 0; height: auto; padding: 14px 16px; background: var(--bg); } #tab-canvas.cv-fullscreen .cv-stage { min-height: 0; border-radius: 12px; }