one-model-router 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +32 -5
  3. package/bin/omr.js +46 -0
  4. package/package.json +3 -2
  5. package/src/admin.js +965 -941
  6. package/src/balances.js +61 -61
  7. package/src/boot.js +117 -117
  8. package/src/channels/buddy.js +2031 -2031
  9. package/src/channels/cline.js +753 -753
  10. package/src/channels/codearts.js +2051 -2051
  11. package/src/channels/comate.js +830 -830
  12. package/src/channels/doubaowork.js +1784 -1784
  13. package/src/channels/freebuff.js +1316 -1316
  14. package/src/channels/gemini.js +1721 -1721
  15. package/src/channels/index.js +270 -270
  16. package/src/channels/joycode.js +936 -936
  17. package/src/channels/kimi.js +572 -572
  18. package/src/channels/lobsterai.js +1226 -1226
  19. package/src/channels/loomy.js +1032 -1032
  20. package/src/channels/miaoshou.js +1396 -1396
  21. package/src/channels/mimo.js +474 -474
  22. package/src/channels/minimax.js +1451 -1451
  23. package/src/channels/qoder-wasm.js +434 -434
  24. package/src/channels/qoder.js +1619 -1619
  25. package/src/channels/raccoon.js +1842 -1842
  26. package/src/channels/tabbit.js +1457 -1457
  27. package/src/channels/trae.js +1405 -1405
  28. package/src/channels/zcode-global.js +35 -35
  29. package/src/channels/zcode.js +2085 -2085
  30. package/src/checkin.js +496 -496
  31. package/src/credits.js +464 -464
  32. package/src/crypto.js +132 -132
  33. package/src/free-models.js +683 -683
  34. package/src/gateway.js +596 -578
  35. package/src/health.js +86 -86
  36. package/src/model-key.js +35 -35
  37. package/src/paths.js +96 -96
  38. package/src/probe.js +318 -318
  39. package/src/providers/builtin.js +626 -626
  40. package/src/providers/index.js +483 -457
  41. package/src/providers/kilo.js +111 -111
  42. package/src/providers/last-good.js +69 -69
  43. package/src/providers/modelsdev.js +242 -242
  44. package/src/providers/openai-compat.js +312 -312
  45. package/src/providers/opencode/bun-fetch.js +226 -226
  46. package/src/providers/opencode/lane.js +186 -186
  47. package/src/providers/opencode/o2a/LICENSE.dsh-our-free-model +21 -21
  48. package/src/providers/opencode/o2a/asset-source.js +43 -43
  49. package/src/providers/opencode/o2a/assets/opencode_prompt_v2.txt +96 -96
  50. package/src/providers/opencode/o2a/assets/opencode_tools.json +327 -327
  51. package/src/providers/opencode/o2a/entry.js +17 -17
  52. package/src/providers/opencode/o2a/gateway-body.js +42 -42
  53. package/src/providers/opencode/o2a/headers.js +133 -133
  54. package/src/providers/opencode/o2a/identity.js +148 -148
  55. package/src/providers/opencode/o2a/official-prompt.js +191 -191
  56. package/src/providers/opencode/o2a/official-tools.js +110 -110
  57. package/src/providers/opencode/o2a/tool-renames.js +217 -217
  58. package/src/providers/opencode/o2a/toolshape.js +418 -418
  59. package/src/providers/opencode/o2a/version.js +37 -37
  60. package/src/providers/opencode/upstream.js +403 -403
  61. package/src/providers/opencode/wire.js +496 -496
  62. package/src/providers/opencode.js +652 -652
  63. package/src/router.js +629 -629
  64. package/src/server.js +49 -33
  65. package/src/store.js +467 -467
  66. package/src/sync/index.js +1529 -1529
  67. package/src/sync/login-preload.cjs +52 -52
  68. package/src/sync/noise.js +141 -141
  69. package/src/sync/relay-http.js +176 -176
  70. package/src/sync/remote-host.js +818 -818
  71. package/src/sync/remote-http.js +112 -112
  72. package/src/sync/remote-login.js +657 -657
  73. package/src/sync/remote-pairing.js +204 -204
  74. package/src/sync/remote-protocol.js +321 -321
  75. package/src/sync/snapshot.js +211 -211
  76. package/src/update.js +458 -0
  77. package/src/util.js +334 -334
  78. package/web/app.js +4010 -3972
  79. package/web/index.html +32 -32
  80. package/web/style.css +971 -971
package/web/style.css CHANGED
@@ -1,971 +1,971 @@
1
- :root {
2
- --bg: #0d1117;
3
- --bg-2: #090c10;
4
- --panel: #161b22;
5
- --panel-2: #1c2129;
6
- --panel-3: #222831;
7
- --border: #2d333b;
8
- --border-soft: #232932;
9
- --text: #e6edf3;
10
- --muted: #8b949e;
11
- --accent: #3fb950;
12
- --accent-2: #58a6ff;
13
- --accent-3: #bc8cff;
14
- --warn: #d29922;
15
- --err: #f85149;
16
- --radius: 10px;
17
- --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -12px rgba(0, 0, 0, .6);
18
- }
19
- * { box-sizing: border-box; }
20
- body {
21
- margin: 0;
22
- background:
23
- radial-gradient(900px 420px at 12% -8%, rgba(88, 166, 255, .10), transparent 70%),
24
- radial-gradient(760px 380px at 88% -12%, rgba(63, 185, 80, .08), transparent 70%),
25
- var(--bg);
26
- color: var(--text);
27
- font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
28
- font-size: 14px;
29
- -webkit-font-smoothing: antialiased;
30
- }
31
- header {
32
- padding: 16px 24px;
33
- border-bottom: 1px solid var(--border);
34
- display: flex;
35
- align-items: center;
36
- gap: 16px;
37
- flex-wrap: wrap;
38
- background: linear-gradient(180deg, rgba(22, 27, 34, .92), rgba(13, 17, 23, .72));
39
- backdrop-filter: blur(8px);
40
- }
41
- header .logo { width: 34px; height: 34px; border-radius: 9px; display: block; flex: none; box-shadow: 0 0 0 1px var(--border), 0 4px 14px -6px rgba(88, 166, 255, .8); }
42
- header h1 { font-size: 18px; margin: 0; letter-spacing: .2px; }
43
- header .sub { color: var(--muted); font-size: 12px; }
44
- nav {
45
- display: flex;
46
- gap: 4px;
47
- padding: 8px 24px;
48
- border-bottom: 1px solid var(--border);
49
- background: rgba(22, 27, 34, .86);
50
- backdrop-filter: blur(8px);
51
- position: sticky;
52
- top: 0;
53
- z-index: 5;
54
- }
55
- nav button {
56
- background: transparent;
57
- border: 1px solid transparent;
58
- color: var(--muted);
59
- padding: 8px 14px;
60
- border-radius: 8px;
61
- cursor: pointer;
62
- font-size: 14px;
63
- transition: color .15s, background .15s, border-color .15s;
64
- }
65
- nav button:hover { color: var(--text); background: var(--panel-2); }
66
- nav button.active {
67
- background: var(--panel-2);
68
- color: var(--text);
69
- border-color: var(--border);
70
- box-shadow: inset 0 -2px 0 var(--accent);
71
- }
72
- main { padding: 20px 24px 28px; width: 100%; max-width: min(2080px, 94vw); margin: 0 auto; }
73
- .card {
74
- background: linear-gradient(180deg, var(--panel), #141920);
75
- border: 1px solid var(--border);
76
- border-radius: var(--radius);
77
- padding: 16px;
78
- margin-bottom: 16px;
79
- box-shadow: var(--shadow);
80
- }
81
- .card h2 { font-size: 15px; margin: 0 0 12px; letter-spacing: .2px; }
82
- .card h3 { font-size: 14px; margin: 12px 0 8px; }
83
- /* 卡片头行:标题靠左、操作按钮靠右,同一行放置 */
84
- .card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
85
- .card-head h2 { margin: 0; }
86
- /* 卡片标题块:主标题 + 一行灰色副标题 */
87
- .card-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
88
- .card-sub { color: var(--muted); font-size: 12px; }
89
- .row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
90
- .row > * { flex: 1; min-width: 140px; }
91
- /* 行右侧按钮组:不吃 min-width 压窄(否则按钮在容器内堆叠换行),整体贴右 */
92
- .row-actions { flex: 0 0 auto; min-width: 0; margin-left: auto; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
93
- /* 行左块:不拉伸、靠左聚拢;-wide 用于 Base URL 等输入块(基准 380px,窄屏可收缩) */
94
- .row-lead { flex: 0 0 auto; min-width: 0; }
95
- .row-lead-wide { flex: 0 1 380px; min-width: 0; }
96
- /* 操作区内联的启用复选框:不占块级标签的 margin-bottom,与按钮同高对齐 */
97
- .row-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); margin-bottom: 0; white-space: nowrap; cursor: pointer; }
98
- /* 行内标签块:文字标签与输入框同一行(标签在左、输入框占满剩余宽度) */
99
- .row-inline { display: flex; align-items: center; gap: 8px; }
100
- .row-inline > label { margin-bottom: 0; white-space: nowrap; flex: 0 0 auto; }
101
- .row-inline > input { flex: 1 1 auto; }
102
- label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
103
- input, select, textarea {
104
- width: 100%;
105
- background: var(--bg);
106
- border: 1px solid var(--border);
107
- color: var(--text);
108
- border-radius: 8px;
109
- padding: 8px 10px;
110
- font-size: 13px;
111
- font-family: inherit;
112
- }
113
- textarea { min-height: 80px; resize: vertical; font-family: Consolas, monospace; }
114
- input:focus, select:focus, textarea:focus { outline: 1px solid var(--accent-2); }
115
- /* 复选框不吃全局 width:100%(否则下拉/弹窗里复选框被拉满宽,把行内容挤乱) */
116
- input[type="checkbox"] { width: auto; flex: none; }
117
- /* 下拉/弹窗行内复选框:定尺寸、去 padding,强调色跟主题 */
118
- .modal-row input[type="checkbox"] { width: 14px; height: 14px; padding: 0; margin: 0; accent-color: var(--accent); }
119
- button.btn {
120
- background: var(--panel-2);
121
- border: 1px solid var(--border);
122
- color: var(--text);
123
- padding: 8px 14px;
124
- border-radius: 8px;
125
- cursor: pointer;
126
- font-size: 13px;
127
- white-space: nowrap;
128
- transition: background .15s, border-color .15s, color .15s, transform .06s;
129
- }
130
- button.btn:hover { border-color: var(--accent-2); background: var(--panel-3); }
131
- button.btn:active { transform: translateY(1px); }
132
- button.btn:disabled { opacity: .45; color: var(--muted); cursor: not-allowed; }
133
- button.btn:disabled:hover { border-color: var(--border); background: var(--panel-2); }
134
- button.btn.primary { background: #1f6feb; border-color: #1f6feb; color: #fff; }
135
- button.btn.primary:hover { background: #2a7bf5; border-color: #2a7bf5; }
136
- button.btn.danger { color: var(--err); }
137
- button.btn.danger:hover { border-color: var(--err); background: rgba(248, 81, 73, .1); }
138
- button.btn.small { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
139
- /* 表格行内操作按钮:默认低调,行悬停时才提亮,避免整屏按钮抢视觉 */
140
- .cell-actions { display: flex; gap: 5px; justify-content: flex-end; }
141
- .cell-actions button.btn { color: var(--muted); border-color: transparent; background: transparent; padding: 3px 7px; }
142
- tr:hover .cell-actions button.btn { color: var(--text); border-color: var(--border); background: var(--panel-2); }
143
- .cell-actions button.btn:hover { color: var(--text); border-color: var(--accent-2); background: var(--panel-3); }
144
- /* 操作列固定在表格右侧:表格横向滚动时「测试」等按钮始终可见 */
145
- .table-wrap td.cell-actions {
146
- position: sticky;
147
- right: 0;
148
- z-index: 1;
149
- background: #151a21;
150
- box-shadow: -10px 0 14px -12px rgba(0, 0, 0, .95);
151
- }
152
- .table-wrap tbody tr:hover td.cell-actions { background: #1a212a; }
153
- /* 模型目录分组标题行:左侧渠道名 + 右侧(上次测试时间 +「测试本渠道」按钮) */
154
- tr.src-group td .src-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; row-gap: 4px; }
155
- tr.src-group td .ch-test-wrap { display: inline-flex; align-items: center; gap: 8px; flex: none; }
156
- tr.src-group td .ch-tested-at { color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
157
- tr.src-group td .ch-test-btn { font-weight: 400; position: sticky; right: 0; }
158
- table { width: 100%; border-collapse: collapse; font-size: 13px; }
159
- th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border-soft); }
160
- /* 模型目录:每行模型信息保持单行,超宽时横向滚动而非换行 */
161
- .table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: 8px; background: rgba(9, 12, 16, .35); }
162
- .table-wrap th, .table-wrap td { white-space: nowrap; }
163
- .table-wrap thead th {
164
- position: sticky;
165
- top: 0;
166
- z-index: 2;
167
- background: var(--panel-2);
168
- border-bottom: 1px solid var(--border);
169
- padding-top: 9px;
170
- padding-bottom: 9px;
171
- letter-spacing: .3px;
172
- }
173
- /* 最近请求表格:固定可见约 10 行,右侧滚动条浏览全部 500 条(横向沿用全局 auto) */
174
- #recent-card .table-wrap { max-height: 420px; overflow-y: auto; }
175
- /* 最近请求:序号列(最新请求排最前) */
176
- #recent-card td.col-idx, #recent-card th.col-idx { width: 1%; padding-right: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
177
- th { color: var(--muted); font-weight: 500; font-size: 12px; }
178
- tr:last-child td { border-bottom: none; }
179
- .table-wrap tbody tr:hover td { background: rgba(88, 166, 255, .06); }
180
- /* 模型目录:按提供商来源分组的分组标题行 */
181
- tr.src-group td {
182
- background: linear-gradient(90deg, rgba(31, 111, 235, .20), rgba(31, 111, 235, .05));
183
- color: #a8cfff;
184
- font-weight: 600;
185
- font-size: 12px;
186
- padding: 7px 10px;
187
- border-top: 1px solid var(--border);
188
- border-bottom: 1px solid var(--border);
189
- }
190
- tr.src-group:first-child td { border-top: none; }
191
- tr.src-group td .src-name { display: inline-flex; align-items: center; gap: 8px; }
192
- tr.src-group td .src-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 3px rgba(88, 166, 255, .18); flex: none; }
193
- tr.src-group td .src-count { color: var(--muted); font-weight: 400; font-size: 11px; }
194
- tr.src-group td .muted { font-weight: 400; }
195
- /* agent 名称右侧折叠展开三角:默认折叠朝右,展开后旋转 90° 朝下 */
196
- tr.src-group td .src-toggle {
197
- background: none;
198
- border: none;
199
- padding: 0 2px;
200
- color: var(--muted);
201
- font-size: 10px;
202
- line-height: 1;
203
- cursor: pointer;
204
- flex: none;
205
- transition: transform .15s ease, color .15s ease;
206
- }
207
- tr.src-group td .src-toggle:hover { color: var(--accent-2); }
208
- tr.src-group td .src-toggle[aria-expanded="true"] { transform: rotate(90deg); }
209
- .badge {
210
- display: inline-block;
211
- padding: 2px 8px;
212
- border-radius: 999px;
213
- font-size: 11px;
214
- line-height: 16px;
215
- border: 1px solid var(--border);
216
- background: rgba(139, 148, 158, .08);
217
- color: var(--muted);
218
- vertical-align: middle;
219
- }
220
- .badge.ok { color: var(--accent); border-color: rgba(63, 185, 80, .5); background: rgba(63, 185, 80, .12); }
221
- .badge.cool { color: var(--warn); border-color: rgba(210, 153, 34, .5); background: rgba(210, 153, 34, .12); }
222
- .badge.err { color: var(--err); border-color: rgba(248, 81, 73, .5); background: rgba(248, 81, 73, .12); }
223
- .badge.free { color: var(--accent-2); border-color: rgba(88, 166, 255, .5); background: rgba(88, 166, 255, .12); }
224
- .badge.pro { color: var(--accent-3); border-color: rgba(188, 140, 255, .5); background: rgba(188, 140, 255, .12); }
225
- /* 模型目录「模型组」列:徽章悬停时在右侧显示 ✕(点击从该组移除) */
226
- .badge.grp { display: inline-flex; align-items: center; gap: 5px; }
227
- .badge.grp button[data-grp-x] { display: none; background: none; border: none; padding: 0; color: var(--err); cursor: pointer; font-size: 12px; line-height: 1; }
228
- .badge.grp:hover button[data-grp-x] { display: inline-block; }
229
- .badge.grp button[data-grp-x]:hover { transform: scale(1.15); }
230
- /* 渠道卡片标题旁的「源码」外链(小字弱化,不抢标题视觉权重) */
231
- .ch-repo { margin-left: 6px; font-size: 11px; font-weight: 400; color: var(--muted); text-decoration: none; border-bottom: 1px dashed var(--border); }
232
- .ch-repo:hover { color: var(--accent); border-bottom-color: var(--accent); }
233
-
234
- /* 弹窗(添加到模型组等):fixed 铺满视口 + 双保险居中 */
235
- .modal-mask { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; z-index: 100; }
236
- .modal { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; width: min(560px, 92vw); max-height: 80vh; overflow: auto; box-shadow: 0 8px 40px rgba(0, 0, 0, .5); margin: auto; }
237
- .modal h3 { margin: 0 0 6px; }
238
- .modal-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
239
- .modal-row { display: flex; align-items: center; gap: 10px; cursor: pointer; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; }
240
- .modal-row:hover { border-color: var(--accent); }
241
- /* 模型组:候选多选下拉浮层(锚定在触发按钮旁) */
242
- .combo-menu {
243
- position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
244
- background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
245
- box-shadow: 0 8px 24px rgba(0, 0, 0, .5); padding: 6px; margin-top: 0; max-height: 280px;
246
- }
247
- .combo-menu[hidden] { display: none; }
248
- /* 下拉浮层内的行:内容靠左对齐,行内 hover 高亮 */
249
- .combo-menu { text-align: left; align-items: stretch; }
250
- .combo-menu .modal-row span { text-align: left; word-break: break-all; }
251
- /* 总览统计卡:6 列自适应网格,卡片带语义强调色(--tone)+ 顶部渐变描边 */
252
- .stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 12px; margin-bottom: 16px; }
253
- .stat {
254
- position: relative;
255
- overflow: hidden;
256
- background: linear-gradient(180deg, var(--panel), #141920);
257
- border: 1px solid var(--border);
258
- border-radius: var(--radius);
259
- padding: 14px 16px 13px;
260
- box-shadow: var(--shadow);
261
- transition: border-color .18s, transform .18s;
262
- --tone: var(--accent-2);
263
- }
264
- .stat::before {
265
- content: "";
266
- position: absolute;
267
- inset: 0 0 auto 0;
268
- height: 2px;
269
- background: linear-gradient(90deg, var(--tone), transparent 85%);
270
- opacity: .85;
271
- }
272
- .stat::after {
273
- content: "";
274
- position: absolute;
275
- right: -28px;
276
- top: -34px;
277
- width: 96px;
278
- height: 96px;
279
- border-radius: 50%;
280
- background: var(--tone);
281
- opacity: .07;
282
- pointer-events: none;
283
- }
284
- .stat:hover { border-color: color-mix(in srgb, var(--tone) 45%, var(--border)); transform: translateY(-1px); }
285
- .stat .stat-top { display: flex; align-items: center; gap: 8px; }
286
- .stat .stat-ico {
287
- width: 26px; height: 26px; flex: none;
288
- display: inline-flex; align-items: center; justify-content: center;
289
- border-radius: 8px;
290
- color: var(--tone);
291
- background: color-mix(in srgb, var(--tone) 14%, transparent);
292
- border: 1px solid color-mix(in srgb, var(--tone) 28%, transparent);
293
- }
294
- .stat .stat-ico svg { width: 15px; height: 15px; }
295
- .stat .num { font-size: 26px; font-weight: 650; line-height: 1.2; margin-top: 8px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
296
- .stat .lbl { color: var(--muted); font-size: 12px; letter-spacing: .2px; }
297
- .stat .stat-foot { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
298
- /* 成功率细条:贴在「总请求」卡底部 */
299
- .rate-bar { flex: 1 1 auto; min-width: 34px; max-width: 74px; height: 3px; border-radius: 999px; background: rgba(139, 148, 158, .22); overflow: hidden; }
300
- .rate-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #56d364); transition: width .35s ease; }
301
- .stat.tone-green { --tone: #3fb950; }
302
- .stat.tone-cyan { --tone: #39c5cf; }
303
- .stat.tone-purple { --tone: #bc8cff; }
304
- .stat.tone-blue { --tone: #58a6ff; }
305
- .stat.tone-amber { --tone: #d29922; }
306
- .stat.tone-red { --tone: #f85149; }
307
- /* 实时推送指示点:呼吸动画 */
308
- .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(63, 185, 80, .6); animation: live-pulse 2s infinite; flex: none; }
309
- @keyframes live-pulse {
310
- 0% { box-shadow: 0 0 0 0 rgba(63, 185, 80, .55); }
311
- 70% { box-shadow: 0 0 0 6px rgba(63, 185, 80, 0); }
312
- 100% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0); }
313
- }
314
- .probe-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46ch; }
315
- /* 模型目录标题行的操作区:提示文字允许换行占满剩余空间,不再被按钮挤成省略号(遮挡) */
316
- .card-head .probe-actions { flex: 1 1 auto; flex-wrap: wrap; justify-content: flex-end; white-space: normal; row-gap: 4px; }
317
- .card-head .probe-actions .probe-hint { flex: 1 1 20ch; min-width: 0; max-width: none; white-space: normal; overflow: visible; text-align: right; line-height: 1.5; }
318
- .card-head .probe-actions .btn { flex: none; }
319
- code, .mono { font-family: Consolas, monospace; font-size: 12px; background: var(--panel-2); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
320
- /* 表格内的等宽内容(模型 ID / 上下文 / 链路):去掉底色,避免整列出现色块 */
321
- .table-wrap td.mono { background: none; border-radius: 0; word-break: normal; }
322
- .table-wrap td.model-id { color: #cfe3ff; font-weight: 500; }
323
- .table-wrap td.ctx { color: var(--muted); font-variant-numeric: tabular-nums; }
324
- /* 滚动条:贴合深色主题(Chromium / Edge) */
325
- .table-wrap::-webkit-scrollbar { width: 9px; height: 9px; }
326
- .table-wrap::-webkit-scrollbar-track { background: transparent; }
327
- .table-wrap::-webkit-scrollbar-thumb { background: #30363d; border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
328
- .table-wrap::-webkit-scrollbar-thumb:hover { background: #454c56; background-clip: content-box; }
329
- .table-wrap::-webkit-scrollbar-corner { background: transparent; }
330
- @media (max-width: 720px) {
331
- main { padding: 14px; }
332
- header, nav { padding-left: 14px; padding-right: 14px; }
333
- .stat-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
334
- .stat .num { font-size: 22px; }
335
- .probe-hint { max-width: 100%; }
336
- }
337
- .copyline { display: flex; gap: 8px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
338
- .copyline code { flex: 1; min-width: 200px; }
339
- .muted { color: var(--muted); font-size: 12px; }
340
- .toast {
341
- position: fixed; bottom: 20px; right: 20px;
342
- /* 高于表格 sticky 操作列/表头(z-index 1~2)与弹窗遮罩(z-index 100),避免右下角提示被遮挡 */
343
- z-index: 1000;
344
- background: var(--panel-2); border: 1px solid var(--border);
345
- border-radius: var(--radius); padding: 10px 16px;
346
- box-shadow: 0 4px 16px rgba(0,0,0,.4);
347
- opacity: 0; transition: opacity .2s;
348
- max-width: 420px;
349
- display: flex; align-items: flex-start; gap: 10px;
350
- }
351
- .toast.show { opacity: 1; }
352
- .toast.err { border-color: var(--err); }
353
- .toast.ok { border-color: var(--accent); }
354
- .toast-msg { flex: 1; word-break: break-word; white-space: pre-wrap; }
355
- .toast-copy {
356
- flex: none; align-self: center;
357
- background: none; border: 1px solid var(--border); border-radius: 6px;
358
- color: var(--muted); font-size: 12px; padding: 2px 10px; cursor: pointer;
359
- transition: color .15s, border-color .15s;
360
- }
361
- .toast-copy:hover { color: var(--text); border-color: var(--muted); }
362
- .item-list { display: flex; flex-direction: column; gap: 10px; }
363
- .item {
364
- background: var(--panel-2);
365
- border: 1px solid var(--border);
366
- border-radius: var(--radius);
367
- padding: 12px;
368
- }
369
- .item .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
370
- .item .title { font-weight: 600; }
371
- .item .meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
372
- /* 免费渠道:新增表单单占一张卡片、每个提供商各占一张卡片(头部排版见 .ch-card-head) */
373
- .provider-card .meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
374
- /* OpenCode 槽:单行布局,操作按钮靠右 */
375
- .item.slot-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
376
- .item.slot-row .slot-name, .item.slot-row .slot-key, .item.slot-row .slot-proxy {
377
- display: flex; align-items: center; gap: 6px;
378
- }
379
- .item.slot-row .slot-name label, .item.slot-row .slot-key label, .item.slot-row .slot-proxy label {
380
- font-size: 12px; color: var(--muted); white-space: nowrap; flex: 0 0 auto;
381
- }
382
- .item.slot-row .slot-name input, .item.slot-row .slot-key input, .item.slot-row .slot-proxy input {
383
- width: 100%;
384
- }
385
- .item.slot-row .slot-name { flex: 1 1 auto; min-width: 120px; }
386
- /* API Key 加宽:长 key 需可读/可粘贴,占据槽位行主要宽度 */
387
- .item.slot-row .slot-key { flex: 0 1 340px; min-width: 220px; }
388
- .item.slot-row .slot-proxy { flex: 1 1 auto; min-width: 160px; }
389
- .item.slot-row .slot-enabled { white-space: nowrap; flex: 0 0 auto; }
390
- .item.slot-row .slot-del { margin-left: auto; flex: 0 0 auto; }
391
- /* OpenCode Zen 账号槽 / 新增提供商表单:账号槽收窄、API Key 加宽(代理不变占次要宽度) */
392
- #oc-slots .item.slot-row .slot-name,
393
- #cp-slots .item.slot-row .slot-name { flex: 0 1 168px; min-width: 120px; }
394
- #oc-slots .item.slot-row .slot-key,
395
- #cp-slots .item.slot-row .slot-key { flex: 1 1 300px; min-width: 240px; }
396
- #oc-slots .item.slot-row .slot-proxy,
397
- #cp-slots .item.slot-row .slot-proxy { flex: 0 1 240px; min-width: 150px; }
398
- /* 自定义提供商卡片:账号槽面板(显示/隐藏 + 快捷添加 + 行内编辑) */
399
- .cp-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
400
- .cp-card-slots { margin-top: 6px; padding: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
401
- .cp-card-slots[hidden] { display: none; }
402
- .cp-card-slots .item-list { margin-top: 0; }
403
- .cp-slot-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
404
- .cp-slot-add[hidden] { display: none; }
405
- .cp-slot-add input { flex: 1 1 160px; min-width: 120px; }
406
- /* 快捷添加行:API Key 输入框加宽 */
407
- .cp-slot-add input[data-cp-new-key] { flex: 3 1 320px; min-width: 240px; }
408
- /* 槽行紧凑双态:只读 span ↔ 编辑 input,.editing 切换 */
409
- .cp-slot-list { gap: 6px; }
410
- .cp-slot-list .cp-slot-line { padding: 6px 10px; }
411
- .cp-slot-line .ro { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
412
- .cp-slot-line input { display: none; width: 100%; }
413
- .cp-slot-line.editing .ro { display: none; }
414
- .cp-slot-line.editing input { display: block; }
415
- .cp-slot-line .slot-edit { margin-left: auto; flex: 0 0 auto; }
416
- /* 槽行启用复选框:显式定尺寸并显示,复选框在「启用」文字前面、与文字同基线 */
417
- .cp-slot-line .slot-enabled { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; margin-bottom: 0; font-size: 12px; color: var(--text); white-space: nowrap; cursor: pointer; }
418
- .cp-slot-line .slot-enabled input[type="checkbox"] { display: inline-block; width: 14px; height: 14px; padding: 0; margin: 0; flex: none; accent-color: var(--accent); }
419
- .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
420
- .chip { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
421
- /* 自动签到的渠道状态:covered 绿 / pending 黄 / 出错 红 */
422
- .chip.ok { color: var(--accent); border-color: var(--accent); }
423
- .chip.cool { color: var(--warn); border-color: var(--warn); }
424
- .chip.err { color: var(--err); border-color: var(--err); }
425
- .chip button { background: none; border: none; color: var(--err); cursor: pointer; padding: 0; font-size: 12px; }
426
- .chip button.pin { color: var(--accent-2); }
427
- /* 可移除 chip:✕ 默认隐藏,鼠标悬停在 chip 上时才在右侧出现 */
428
- .chip button[data-rm] { display: none; }
429
- .chip:hover button[data-rm] { display: inline-block; text-decoration: none; }
430
- .chip button[data-rm]:hover { transform: scale(1.15); }
431
- /* 拖拽排序:可拖 chip 抓手光标,拖起半透明,落点目标高亮 */
432
- .chip[draggable="true"] { cursor: grab; }
433
- .chip.dragging { opacity: .35; }
434
- .chip.drag-over { border-color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--accent-2); }
435
- /* 模型组卡片:组内模型清单面板(展开/折叠 + 统计信息 + 表格清单 + 添加模型) */
436
- .gm-panel { margin-top: 6px; padding: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
437
- .gm-panel[hidden] { display: none; }
438
- .gm-stats { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
439
- .gm-stats b { color: var(--text); }
440
- .gm-panel .gm-add { margin-bottom: 8px; }
441
- .gm-panel .gm-add[hidden] { display: none; }
442
- /* 组「添加模型」操作条:多选后显示待应用计数与「全选/反选/应用」按钮 */
443
- .gm-add-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; font-size: 12px; }
444
- .gm-add-bar[hidden] { display: none; }
445
- .gm-add-acts { display: flex; gap: 6px; }
446
-
447
- /* 模型级联选择器:渠道 → 模型 两级下拉,两级均可搜索 */
448
- .cascade { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; margin-top: 6px; }
449
- .cascade-col { flex: 1 1 220px; min-width: 200px; }
450
- .cascade-col > label { display: block; margin-bottom: 4px; }
451
- .cascade-box { position: relative; }
452
- .cascade-trigger {
453
- width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
454
- background: var(--bg); border: 1px solid var(--border); color: var(--text);
455
- border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; cursor: pointer; text-align: left;
456
- }
457
- .cascade-trigger:hover { border-color: var(--accent-2); }
458
- .cascade-trigger-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
459
- .cascade-caret { color: var(--muted); flex: none; font-size: 11px; }
460
- .cascade-menu {
461
- position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
462
- background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
463
- box-shadow: 0 8px 24px rgba(0, 0, 0, .5); padding: 6px;
464
- }
465
- .cascade-menu[hidden] { display: none; }
466
- .cascade-search { width: 100%; margin-bottom: 6px; }
467
- .cascade-list { max-height: 240px; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
468
- .cascade-item {
469
- display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
470
- background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px;
471
- padding: 6px 10px; color: var(--text); font-size: 13px; font-family: inherit; cursor: pointer; text-align: left;
472
- }
473
- .cascade-item:hover { border-color: var(--accent); }
474
- .cascade-item.active { border-color: var(--accent-2); background: #1a3a5c; }
475
- .cascade-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
476
- .cascade-item-count { color: var(--muted); font-size: 11px; flex: none; }
477
- .cascade-group { padding: 6px 10px 2px; color: var(--accent-2); font-size: 12px; font-weight: 600; }
478
- .cascade-row {
479
- display: flex; align-items: center; gap: 8px; cursor: pointer;
480
- background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px;
481
- }
482
- .cascade-row:hover { border-color: var(--accent); }
483
- .cascade-row input[type="checkbox"] { width: 14px; height: 14px; padding: 0; margin: 0; flex: none; accent-color: var(--accent); }
484
- .cascade-row span.mono { background: none; padding: 0; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
485
- .cascade-empty { padding: 8px 10px; }
486
- /* 组卡片内的级联选择器:浮层改为面板内展开(面板本身已在卡片流内,不叠加绝对定位) */
487
- .gm-panel .gm-add .cascade-menu { position: static; box-shadow: none; margin-top: 6px; }
488
- /* 组内模型清单:行拖拽排序(行首 ⣿ 抓手,拖起半透明,落点行高亮) */
489
- .gm-table .gm-grip { width: 22px; text-align: center; color: var(--muted); cursor: grab; user-select: none; }
490
- /* 组内模型清单:序号列前的置顶按钮(点击把该行移到已启用模型的第一个) */
491
- .gm-table .gm-idx { white-space: nowrap; }
492
- .gm-table .gm-pin { background: none; border: none; color: var(--accent-2); cursor: pointer; padding: 0 4px 0 0; font-size: 12px; line-height: 1; vertical-align: middle; }
493
- .gm-table .gm-pin:hover { text-decoration: none; transform: translateY(-1px); }
494
- .gm-table .gm-pin[disabled] { color: var(--muted); opacity: .3; cursor: default; transform: none; }
495
- .gm-table tr.gm-row { cursor: grab; }
496
- .gm-table tr.gm-row.dragging { opacity: .35; }
497
- .gm-table tr.gm-row.drag-over td { box-shadow: inset 0 2px 0 var(--accent-2); }
498
- details summary { cursor: pointer; color: var(--muted); font-size: 12px; }
499
- .hint { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 8px 0; }
500
- /* 设置页折叠说明:默认只留一行摘要,点开才展示完整解释 */
501
- .hint-more { margin: 6px 0; }
502
- .hint-more > summary { color: var(--accent-2); width: fit-content; user-select: none; }
503
- .hint-more > summary:hover { text-decoration: underline; }
504
- .hint-more > .hint { margin: 6px 0 0; padding-left: 10px; border-left: 2px solid var(--border); }
505
- /* 设置页操作行:按钮与辅助文字同一行,间距统一 */
506
- .settings-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
507
- .inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 10px; }
508
- .statusline { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
509
-
510
- /* 最近请求 Token 列:输入/输出/总计分别着色;图标加粗,Σ 用独立强调色 */
511
- .tok-in { color: #58a6ff; }
512
- .tok-out { color: #bc8cff; }
513
- .tok-sum { color: var(--text); }
514
- .tok-ic { font-weight: 700; }
515
- .tok-sum .tok-ic { color: #d29922; }
516
-
517
- /* 模型目录行高亮样式 - 整行背景色高亮 */
518
- tr.selected-row td {
519
- background-color: rgba(59, 185, 80, 0.15) !important;
520
- }
521
- tr.selected-row:hover td {
522
- background-color: rgba(59, 185, 80, 0.25) !important;
523
- }
524
-
525
- /* 自定义提供商「获取可用模型」:锚定按钮右对齐的下拉勾选清单 */
526
- .cp-anchor { position: relative; display: inline-flex; }
527
- .cp-picker-menu { left: auto; right: 0; width: min(460px, 92vw); max-height: 360px; display: flex; flex-direction: column; gap: 6px; }
528
- .cp-picker-menu .cp-pop-list { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
529
- /* 模型勾选清单顶部的标题栏:占满整行(负 margin 抵消菜单 6px 内边距,顶部圆角贴合容器),字体加大居中;提供商名称加粗、换色 */
530
- .cp-picker-menu .cp-pop-title {
531
- margin: -6px -6px 0; /* 抵消容器 6px 内边距,让标题背景铺满整行 */
532
- font-size: 16px; color: var(--text); text-align: center;
533
- background: #1a3a5c; border-radius: 7px 7px 0 0;
534
- padding: 10px 12px;
535
- }
536
- .cp-picker-menu .cp-pop-title-name { font-weight: 700; color: var(--accent-2); }
537
-
538
- /* ── 渠道卡片网格(免密渠道 / 免费渠道 / 转发渠道三页统一)────────────────
539
- 卡片流:外层响应式多列网格,每渠道一卡,卡片 = 头部 + 信息区 + 操作区。
540
- auto-fit 让卡片少的页(免密只有 2 张)自动铺满,卡片多的页按 minmax 回流。 */
541
- /* 卡片网格:免密渠道只有 2 张,auto-fit 自动铺满两侧;
542
- 免费 / 转发渠道加 .channel-grid-max4:全屏最多 4 列,避免 5~6 列把卡片挤窄 */
543
- .channel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: stretch; margin-bottom: 16px; }
544
- .channel-grid-max4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
545
- @media (max-width: 1840px) { .channel-grid-max4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
546
- @media (max-width: 1360px) { .channel-grid-max4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
547
- @media (max-width: 860px) { .channel-grid-max4 { grid-template-columns: minmax(0, 1fr); } }
548
- .channel-grid > .card { margin-bottom: 0; }
549
- /* 卡片:flex 纵向布局 = 头部(固定)+ 内容区(滚动)+ 操作区(固定)。
550
- hover 只做描边与投影(不用 transform:fixed 弹层 cp-picker-menu 挂在卡内,
551
- 祖先一旦有 transform 会变成弹层的 containing block,把居中弹层拉歪并被裁剪) */
552
- .ch-card { position: relative; display: flex; flex-direction: column; transition: border-color .18s, box-shadow .18s; }
553
- /* hover:品牌色描边 + 品牌色氛围投影(不再是纯黑投影),顶部内高光提层次 */
554
- .ch-card:hover {
555
- border-color: color-mix(in srgb, var(--ch-accent, #6e7681) 46%, var(--border));
556
- box-shadow: 0 1px 2px rgba(0, 0, 0, .4),
557
- 0 18px 38px -20px color-mix(in srgb, var(--ch-accent, #6e7681) 36%, rgba(0, 0, 0, .9)),
558
- inset 0 1px 0 rgba(255, 255, 255, .05);
559
- z-index: 5;
560
- }
561
- .ch-card:focus-within { border-color: color-mix(in srgb, var(--ch-accent, #6e7681) 40%, var(--border)); }
562
- /* 网格内卡片统一尺寸:同页所有卡片等高(等宽由网格 1fr 保证)。
563
- 高度 = 边框 2 + 卡内边距 32 + 卡头 39 + 间距 12 + 按钮行 27 + 间距 12 + 内容区
564
- (说明 / Base URL 等 + 固定 364px 的模型面板),因此同页每张卡都恰好显示 10 个序号行。
565
- 三个页面卡头以上的结构略有差异,所以按页给不同高度 */
566
- .channel-grid .ch-card { border-radius: 14px; }
567
- .channel-grid-channels .ch-card { height: 498px; }
568
- .channel-grid-providers .ch-card { height: 524px; }
569
- .channel-grid-nokey .ch-card { height: 554px; }
570
- /* 免密页两张卡的说明 / Base URL / 车道代理会随卡宽折行,卡越高才能保住 10 行可见 */
571
- @media (max-width: 1800px) { .channel-grid-nokey .ch-card { height: 568px; } }
572
- @media (max-width: 1150px) { .channel-grid-nokey .ch-card { height: 579px; } }
573
- @media (max-width: 1000px) { .channel-grid-nokey .ch-card { height: 598px; } }
574
- /* 单列退化:窄窗口 / 移动端放开高度钳制走自然高度 */
575
- @media (max-width: 760px) {
576
- .channel-grid .ch-card { height: auto; min-height: 320px; }
577
- }
578
- /* 头部:第一行 标题 + 主开关,第二行状态徽章(窄卡也能稳定排版);固定不随内容滚动 */
579
- .ch-card-head { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--border-soft); }
580
- /* 内容滚动区:占满头/按钮行之间的全部空间,内容超出时上下左右滚动(不撑破统一尺寸)。
581
- 滚动条占位但滑块默认透明,仅滚动期间(.is-scrolling,由 JS 挂载)显形,停止约 800ms 后隐藏 */
582
- .ch-card-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding-right: 2px; scrollbar-width: thin; scrollbar-color: transparent transparent; }
583
- .ch-card-body.is-scrolling { scrollbar-color: rgba(139, 148, 158, .35) transparent; }
584
- .ch-card-body::-webkit-scrollbar { width: 8px; height: 8px; }
585
- .ch-card-body::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
586
- .ch-card-body.is-scrolling::-webkit-scrollbar-thumb { background: rgba(139, 148, 158, .28); }
587
- .ch-card-body.is-scrolling::-webkit-scrollbar-thumb:hover { background: rgba(139, 148, 158, .45); }
588
- .ch-card-body::-webkit-scrollbar-track { background: transparent; }
589
- .ch-card-body > :first-child { margin-top: 0; }
590
- .ch-card-title { grid-column: 1; grid-row: 1; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
591
- .ch-card-title h2 { margin: 0; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; min-width: 0; word-break: break-all; }
592
- .ch-card-title .card-sub { font-size: 11px; }
593
- .ch-card-switch { grid-column: 2; grid-row: 1; margin-bottom: 0; justify-self: end; white-space: nowrap; }
594
- .ch-card-badges { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
595
- /* 启用状态点:绿=启用,灰=停用(渠道 / 提供商卡标题前) */
596
- .ch-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px rgba(139, 148, 158, .16); flex: none; }
597
- .ch-dot.on { background: var(--accent); box-shadow: 0 0 0 3px rgba(63, 185, 80, .18); }
598
- /* 卡片操作区(底部按钮行):固定在卡底不随内容滚动;网格卡由 body 吃掉剩余空间,
599
- 网格外通栏卡(无 body)保持 12px 上边距 */
600
- .ch-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border-soft); }
601
- .channel-grid .ch-card > .ch-card-actions { margin-top: 0; }
602
- .ch-card-actions .btn { flex: 0 0 auto; }
603
- .ch-card-subrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
604
- /* 卡片内 Base URL 独占一行:输入框铺满卡宽,不再按 380px 基准留白 */
605
- .ch-card .row { gap: 8px; }
606
- .ch-card .row > .row-lead-wide { flex: 1 1 100%; }
607
- /* 卡片内的账号槽行:允许换行,字段按剩余宽度伸缩(宽卡两列、窄卡逐行),避免溢出压到相邻卡片 */
608
- .ch-card .item.slot-row { flex-wrap: wrap; row-gap: 6px; }
609
- .ch-card .item.slot-row .slot-name,
610
- .ch-card .item.slot-row .slot-key,
611
- .ch-card .item.slot-row .slot-proxy { flex: 1 1 132px; min-width: 0; }
612
- .ch-card .item.slot-row .slot-del { margin-left: 0; }
613
- /* 卡片内账号行的操作按钮组:窄卡下允许收缩 + 折行,避免「删除」被挤出卡片 */
614
- .ch-card .item .row-actions { flex: 1 1 auto; min-width: 0; white-space: normal; flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
615
- /* 卡片内账号行左侧(账号名 + 徽章):允许收缩,长账号名靠 chip 折行而不是撑破卡片 */
616
- .ch-card .item .row-lead { flex: 1 1 auto; min-width: 0; }
617
- /* 卡片内的 chip(账号名 / 模型 ID)允许长串折行,窄卡下不撑破卡片 */
618
- .ch-card .chip { max-width: 100%; overflow-wrap: anywhere; }
619
- .ch-card .cp-slot-add input { min-width: 0; }
620
- .ch-card .cp-slot-add input[data-cp-new-key] { flex: 1 1 100%; min-width: 0; }
621
- /* 卡片里展开的模型清单 / 账号槽面板:贴住操作区,宽度受卡宽约束由表格自身横向滚动 */
622
- .ch-card .gm-panel,
623
- .ch-card .cp-card-slots { margin-top: 10px; }
624
- /* 弹层(获取可用模型下拉)挂在卡片内:抬升整张卡,避免被后面的兄弟卡片盖住 */
625
- .ch-card:has(.cp-picker-menu) { z-index: 40; }
626
-
627
- /* ── 免密渠道卡片(nk-card):卡片三行式结构 ─────────────────────────────
628
- 标题行(圆点 + 官方图标 + 名称 + 内置标签 + 启停)
629
- / 按钮行(账号槽 / 添加槽 / 注册 / 获取可用模型 / 保存 + 右侧统计)
630
- / 内容行(可用模型列表,每行一个模型,超出卡内滚动)。
631
- 每渠道一个品牌色调(调研自官方 favicon 实测主色 / 官方 glyph 填色 / 官网 logo):
632
- Kilo = 官网 favicon 黄 #FFDD00;OpenCode = 官网黑白字标石墨灰 #8B949E(logo 黑底 #131010,暗色主题下提亮为石墨灰)。
633
- 未收录品牌色的自定义渠道兜底用中性灰。 */
634
- .nk-card { --ch-accent: #6e7681; --ch-accent-soft: rgba(110, 118, 129, .16); --ch-accent-text: #fff; }
635
- .nk-card[data-channel="kilo"] { --ch-accent: #ffdd00; --ch-accent-soft: rgba(255, 221, 0, .13); --ch-accent-text: #141414; }
636
- .nk-card[data-channel="opencode"] { --ch-accent: #8b949e; --ch-accent-soft: rgba(139, 148, 158, .18); --ch-accent-text: #131010; }
637
- /* ── 转发渠道品牌色(各取官方 App / 官网 / 图标最具辨识度的主色)──────────
638
- TRAE 蓝 #3C7EFF;Cline 靛 #6366F1;腾讯 CodeBuddy/WorkBuddy 国 #0052D9;
639
- WorkBuddy 国际 青 #00B8D9;Qoder 紫 #6D5BFF;商汤红 #CE0E2D;
640
- MiniMax 珊瑚红 #F25749;有道蓝 #1E7BE8;Gemini 蓝 #4285F4;讯飞蓝 #1571F2;
641
- Kimi 蓝 #1F6BFF;百度 Comate 蓝 #2932E1;小米橙 #FF6900;华为红 #CF0A2C;
642
- 智谱 ZCode 蓝 #3859FF / Z.ai 蓝 #0057FF;Freebuff 绿 #10B981;
643
- 美团黄 #FFC300 / 妙手 #FFD100(深字保证可读);豆包蓝 #4E6EF2;京东红 #E1251B。 */
644
- .nk-card[data-channel="trae"] { --ch-accent: #3c7eff; --ch-accent-soft: rgba(60, 126, 255, .15); --ch-accent-text: #fff; }
645
- .nk-card[data-channel="cline"] { --ch-accent: #6366f1; --ch-accent-soft: rgba(99, 102, 241, .16); --ch-accent-text: #fff; }
646
- .nk-card[data-channel="workbuddy-cn"] { --ch-accent: #0052d9; --ch-accent-soft: rgba(0, 82, 217, .18); --ch-accent-text: #fff; }
647
- .nk-card[data-channel="workbuddy-ai"] { --ch-accent: #00b8d9; --ch-accent-soft: rgba(0, 184, 217, .15); --ch-accent-text: #fff; }
648
- .nk-card[data-channel="qoder"] { --ch-accent: #6d5bff; --ch-accent-soft: rgba(109, 91, 255, .15); --ch-accent-text: #fff; }
649
- .nk-card[data-channel="qodercn"] { --ch-accent: #6d5bff; --ch-accent-soft: rgba(109, 91, 255, .15); --ch-accent-text: #fff; }
650
- .nk-card[data-channel="raccoon"] { --ch-accent: #ce0e2d; --ch-accent-soft: rgba(206, 14, 45, .18); --ch-accent-text: #fff; }
651
- .nk-card[data-channel="minimax"] { --ch-accent: #f25749; --ch-accent-soft: rgba(242, 87, 73, .16); --ch-accent-text: #fff; }
652
- .nk-card[data-channel="lobsterai"] { --ch-accent: #1e7be8; --ch-accent-soft: rgba(30, 123, 232, .16); --ch-accent-text: #fff; }
653
- .nk-card[data-channel="gemini"] { --ch-accent: #4285f4; --ch-accent-soft: rgba(66, 133, 244, .16); --ch-accent-text: #fff; }
654
- .nk-card[data-channel="loomy"] { --ch-accent: #1571f2; --ch-accent-soft: rgba(21, 113, 242, .16); --ch-accent-text: #fff; }
655
- .nk-card[data-channel="kimi"] { --ch-accent: #1f6bff; --ch-accent-soft: rgba(31, 107, 255, .16); --ch-accent-text: #fff; }
656
- .nk-card[data-channel="comate"] { --ch-accent: #2932e1; --ch-accent-soft: rgba(41, 50, 225, .16); --ch-accent-text: #fff; }
657
- .nk-card[data-channel="mimo"] { --ch-accent: #ff6900; --ch-accent-soft: rgba(255, 105, 0, .16); --ch-accent-text: #fff; }
658
- .nk-card[data-channel="codearts"] { --ch-accent: #cf0a2c; --ch-accent-soft: rgba(207, 10, 44, .18); --ch-accent-text: #fff; }
659
- .nk-card[data-channel="zcode"] { --ch-accent: #3859ff; --ch-accent-soft: rgba(56, 89, 255, .16); --ch-accent-text: #fff; }
660
- .nk-card[data-channel="zcode-global"] { --ch-accent: #0057ff; --ch-accent-soft: rgba(0, 87, 255, .16); --ch-accent-text: #fff; }
661
- .nk-card[data-channel="codebuff"] { --ch-accent: #10b981; --ch-accent-soft: rgba(16, 185, 129, .16); --ch-accent-text: #fff; }
662
- .nk-card[data-channel="tabbit"] { --ch-accent: #ffc300; --ch-accent-soft: rgba(255, 195, 0, .16); --ch-accent-text: #1f2328; }
663
- .nk-card[data-channel="doubaowork"] { --ch-accent: #4e6ef2; --ch-accent-soft: rgba(78, 110, 242, .16); --ch-accent-text: #fff; }
664
- .nk-card[data-channel="miaoshou"] { --ch-accent: #ffd100; --ch-accent-soft: rgba(255, 209, 0, .16); --ch-accent-text: #1f2328; }
665
- .nk-card[data-channel="joycode"] { --ch-accent: #e1251b; --ch-accent-soft: rgba(225, 37, 27, .18); --ch-accent-text: #fff; }
666
- /* ── 免费渠道品牌色(调研自官方 favicon 实测主色 / 官方 glyph 填色 / 官网 logo)────
667
- AMD Radeon 红 #ED1C24(官方黑字标,Radeon Token Factory 主色);
668
- SenseNova 蓝 #3F71CF(favicon 实测);Intern-ai 蓝 #4A78E8(logoIcon 深蓝提亮);
669
- Dots 红粉 #FF3B56(favicon 实测);NVIDIA 官方绿 #76B900;
670
- OpenRouter 紫 #7624F4(官方 glyph 填色);LongCat 绿 #29E154(官方 yeqian logo,深字保证可读);
671
- ModelScope 紫 #7A67FF(favicon 实测);Agnes 黑灰 #6E7681(官方黑白字标)。 */
672
- .nk-card[data-channel="amd"] { --ch-accent: #ed1c24; --ch-accent-soft: rgba(237, 28, 36, .16); --ch-accent-text: #fff; }
673
- .nk-card[data-channel="sensenova"] { --ch-accent: #3f71cf; --ch-accent-soft: rgba(63, 113, 207, .16); --ch-accent-text: #fff; }
674
- .nk-card[data-channel="intern-ai"] { --ch-accent: #4a78e8; --ch-accent-soft: rgba(74, 120, 232, .16); --ch-accent-text: #fff; }
675
- .nk-card[data-channel="dots-ai"] { --ch-accent: #ff3b56; --ch-accent-soft: rgba(255, 59, 86, .16); --ch-accent-text: #fff; }
676
- .nk-card[data-channel="nvidia"] { --ch-accent: #76b900; --ch-accent-soft: rgba(118, 185, 0, .18); --ch-accent-text: #141414; }
677
- .nk-card[data-channel="openrouter"] { --ch-accent: #7624f4; --ch-accent-soft: rgba(118, 36, 244, .16); --ch-accent-text: #fff; }
678
- .nk-card[data-channel="longcat"] { --ch-accent: #29e154; --ch-accent-soft: rgba(41, 225, 84, .16); --ch-accent-text: #0f2b16; }
679
- .nk-card[data-channel="modelscope"] { --ch-accent: #7a67ff; --ch-accent-soft: rgba(122, 103, 255, .16); --ch-accent-text: #fff; }
680
- /* 品牌色用于卡片区域:卡片底保持中性深色,只留「左上角一抹品牌氛围光 + 顶部品牌发丝轨 +
681
- 品牌色混入描边」三处克制的品牌信号 —— 十几张卡同屏时不至于变成彩色拼贴,正文对比度也更稳。
682
- 内嵌区域用 --nk-inner-bg(卡内再压暗一层)方便区分;启用圆点固定绿 / 停用灰(见 .ch-dot) */
683
- .nk-card {
684
- --nk-inner-bg: color-mix(in srgb, var(--ch-accent) 4%, var(--bg));
685
- background:
686
- radial-gradient(420px 160px at 12% -14%, color-mix(in srgb, var(--ch-accent) 10%, transparent), transparent 70%),
687
- linear-gradient(180deg, #171d25, var(--panel) 55%);
688
- border-color: color-mix(in srgb, var(--ch-accent) 16%, var(--border));
689
- box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
690
- }
691
- /* 卡片顶部品牌轨:贴合上边框(覆盖 1px 边框,避免双层描边错位)。
692
- 形状为左右对称的梭形(clip-path 菱形):左端细尖 → 向中心渐粗 → 中心最厚 →
693
- 向右渐细 → 右端收尖消失;颜色同步由淡入深、再由深转淡,两端与卡面融掉。
694
- 菱形左右尖点内缩 6px,落在卡片 14px 圆角之外,避免尖端溢出圆角外侧 */
695
- .nk-card::before {
696
- content: '';
697
- position: absolute;
698
- top: -1px; left: 0; right: 0;
699
- height: 6px;
700
- background: linear-gradient(90deg,
701
- color-mix(in srgb, var(--ch-accent) 32%, transparent) 0%,
702
- var(--ch-accent) 44%,
703
- color-mix(in srgb, var(--ch-accent) 26%, transparent) 82%,
704
- transparent 100%);
705
- clip-path: polygon(6px 50%, 50% 0, calc(100% - 6px) 50%, 50% 100%);
706
- pointer-events: none;
707
- }
708
- .nk-card .btn.primary { background: var(--ch-accent-soft); border-color: var(--ch-accent); color: var(--ch-accent-text); }
709
- .nk-card .btn.primary:hover { background: var(--ch-accent); color: var(--ch-accent-text); }
710
- /* 标题行(第一行):圆点 / 官方图标 / 名称 / 内置标签 / 模型数量 + 右侧启停,恒为单行。
711
- 不换行:超长渠道名用省略号收缩(h2 带 title 悬停看全名),保证卡头高度恒定、
712
- 模型清单始终完整露出 10 行;底部一道品牌淡染发丝线把标题行与按钮行切开 */
713
- .nk-head {
714
- display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0;
715
- margin-bottom: 12px; padding-bottom: 10px;
716
- border-bottom: 1px solid color-mix(in srgb, var(--ch-accent) 11%, var(--border-soft));
717
- }
718
- .nk-head .ch-logo {
719
- /* 裸 logo 方案:不再套徽片容器(无边框、无底色),图标 28px 原样展示 —— 尺寸即突出;
720
- 品牌色 drop-shadow 沿图标 alpha 形状打一圈光晕,深色 logo 在暗卡上也被托出来 */
721
- flex: none; display: block; width: 28px; height: 28px; padding: 0; box-sizing: border-box;
722
- border-radius: 7px;
723
- filter:
724
- drop-shadow(0 1px 3px rgba(0, 0, 0, .5))
725
- drop-shadow(0 0 9px color-mix(in srgb, var(--ch-accent) 42%, transparent));
726
- }
727
- /* 渠道名:只占自身宽度(超长可收缩),让「内置 / 模型 N」紧贴名称右侧;
728
- 名称优先于徽片收缩,h2 带 title 悬停看全名 */
729
- .nk-head h2 { flex: 0 1 auto; margin: 0; font-size: 16px; font-weight: 680; letter-spacing: .2px; white-space: nowrap; min-width: 40px; overflow: hidden; text-overflow: ellipsis; }
730
- .nk-head .card-sub { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
731
- /* 渠道名右侧的模型数量:字号更小、等宽数字,弱于名称但可一眼扫到 */
732
- .nk-head .nk-model-count { flex: none; white-space: nowrap; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
733
- .nk-head .badge { border-color: transparent; }
734
- /* 「内置 / 自定义」小徽片:真 chip 形状(描边圆角),不再是裸文字 */
735
- .nk-head .nk-builtin {
736
- flex: none; padding: 1px 7px; font-size: 11px; letter-spacing: .4px;
737
- color: var(--muted); border: 1px solid var(--border); border-radius: 6px; background: transparent;
738
- }
739
- /* 渠道名被压缩到极限时(如超长英文名),徽片与数量先让位,保证卡头单行 */
740
- .nk-head .ch-repo { flex: none; }
741
- /* 启停开关收成一枚胶囊控件:贴卡右缘(margin-left:auto),状态统一用全局绿 ——
742
- 启用=绿勾 + 淡绿胶囊;停用=灰勾 + 中性描边,不随渠道品牌色变化 */
743
- .nk-head .nk-switch {
744
- margin-left: auto; margin-bottom: 0; white-space: nowrap;
745
- padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 12px; gap: 5px;
746
- color: var(--text);
747
- border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
748
- background: color-mix(in srgb, var(--accent) 9%, transparent);
749
- transition: border-color .15s, background .15s, color .15s;
750
- }
751
- .nk-head .nk-switch:hover { border-color: color-mix(in srgb, var(--accent) 52%, var(--border)); background: color-mix(in srgb, var(--accent) 15%, transparent); }
752
- /* 停用态回到中性灰:灰勾 + 无底色 */
753
- .nk-head .nk-switch:has(input:not(:checked)) { border-color: var(--border); background: transparent; color: var(--muted); }
754
- .nk-head .nk-switch:has(input:not(:checked)):hover { border-color: var(--border-soft); background: var(--panel-2); color: var(--text); }
755
- .nk-head .nk-switch input[type="checkbox"] { width: 13px; height: 13px; margin: 0; accent-color: var(--accent); }
756
- /* 按钮行(第二行):账号槽 / 添加槽 / 探测 / 获取可用模型;窄卡折行不溢出。
757
- 幽灵按钮:透明底无边框,静息态比纯灰再亮一档(可读性),悬停显形为品牌淡染浮层 */
758
- .nk-btnrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 5px; margin-bottom: 12px; }
759
- .nk-btnrow .btn, .nk-btnrow .btn.small { flex: 0 0 auto; padding: 4px 7px; background: transparent; border-color: transparent; color: color-mix(in srgb, var(--muted) 55%, var(--text)); border-radius: 8px; transition: background .14s, border-color .14s, color .14s; }
760
- .nk-btnrow .btn:hover { background: var(--ch-accent-soft); border-color: color-mix(in srgb, var(--ch-accent) 36%, var(--border)); color: var(--text); }
761
- /* 危险操作(删除)保持红色语义,不被上面的通用颜色覆盖 */
762
- .nk-btnrow .btn.danger { color: var(--err); }
763
- .nk-btnrow .cp-anchor { flex: 0 0 auto; }
764
- /* 主行动「获取可用模型」常驻品牌淡染底:卡内唯一需要先点的动作,给一点引导而不抢标题权重 */
765
- .nk-btnrow .cp-anchor .btn {
766
- color: color-mix(in srgb, var(--ch-accent) 42%, var(--text));
767
- background: color-mix(in srgb, var(--ch-accent) 8%, transparent);
768
- border-color: color-mix(in srgb, var(--ch-accent) 18%, var(--border));
769
- }
770
- .nk-btnrow .cp-anchor .btn:hover { background: var(--ch-accent-soft); border-color: color-mix(in srgb, var(--ch-accent) 46%, var(--border)); color: var(--text); }
771
- /* 模型清单面板:固定高度 = 恰好 10 行(32px × 10 + 行间距 2px × 9 = 338px)+ 上下内边距 + 边框 = 364px,
772
- 模型少于 10 个也保持同样高度;多于 10 个在面板内滚动,卡头 / 说明 / 账号槽不跟着滚 */
773
- .nk-inner {
774
- display: flex;
775
- flex-direction: column;
776
- width: 100%;
777
- height: 364px;
778
- margin-top: 10px;
779
- padding: 12px;
780
- background: var(--nk-inner-bg);
781
- border: 1px solid color-mix(in srgb, var(--ch-accent) 10%, var(--border-soft));
782
- border-radius: 12px;
783
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
784
- }
785
- /* 内容行:可用模型列表,每行一个模型(统一格式:序号/ID/上下文/倍率/状态/操作)。
786
- 列表面板内滚动:固定占据 10 行高度,超出滚动(滚动条与卡内容区同样「滚动时显形」) */
787
- .nk-models {
788
- flex: 1 1 auto; min-height: 0;
789
- display: flex; flex-direction: column; gap: 2px;
790
- overflow-y: auto; overflow-x: hidden;
791
- overscroll-behavior: contain;
792
- padding-right: 2px;
793
- scrollbar-width: thin; scrollbar-color: transparent transparent;
794
- }
795
- .nk-models.is-scrolling { scrollbar-color: rgba(139, 148, 158, .35) transparent; }
796
- .nk-models::-webkit-scrollbar { width: 8px; }
797
- .nk-models::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
798
- .nk-models.is-scrolling::-webkit-scrollbar-thumb { background: rgba(139, 148, 158, .28); }
799
- .nk-models::-webkit-scrollbar-track { background: transparent; }
800
- /* 统一模型行:固定 32px 高(10 行 = 320px,配合 2px 行间距让清单面板高度可精确计算);
801
- 每行强制单行不换行(序号 + ID + 上下文 + 倍率 + 状态 + 操作恒在同一行);
802
- 各列紧凑排布,保证整行落在卡片可视宽度内(Cline 等长 ID 渠道不放横向滚动);
803
- 模型 ID 为唯一可收缩列,放不下时省略号截断,悬停看 title 全称 */
804
- .nk-model-line { position: relative; flex: none; display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 4px; min-width: 0; height: 32px; padding: 0 7px; border-radius: 8px; transition: background .12s; }
805
- /* 行悬停:品牌色淡染浮层(与卡的品牌基调呼应),不用重底色 */
806
- .nk-model-line:hover { background: color-mix(in srgb, var(--ch-accent) 10%, transparent); }
807
- /* 模型行内的等宽文本(ID / 上下文 / 倍率)去掉全局 .mono 的深色 chip 底与内边距:
808
- 整行只保留一层悬停底色,不再一节一节地出现色块;序号徽标 .nk-idx 保留自己的品牌底 */
809
- .nk-model-line .mono:not(.nk-idx) { background: none; padding: 0; border-radius: 0; }
810
- /* 序号:圆角小方块徽标(品牌淡染底,弱化存在感又与卡片基调一致) */
811
- .nk-idx {
812
- flex: none; min-width: 20px; height: 19px; padding: 0 4px;
813
- display: inline-flex; align-items: center; justify-content: center;
814
- border-radius: 6px; background: var(--ch-accent-soft);
815
- color: color-mix(in srgb, var(--ch-accent) 55%, var(--text));
816
- font-size: 11px; font-variant-numeric: tabular-nums;
817
- }
818
- /* 模型 ID:唯一可伸缩列(basis 0 + grow 1),先吃满整行剩余宽度,再把上下文 / 倍率 / 状态顶到右侧;
819
- 放不下时省略号收缩(悬停 title 看全 ID);保底 90px 保证可读 */
820
- .nk-id { flex: 1 1 0; min-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
821
- /* 统一模型行的上下文 / 倍率列:最小宽度右对齐,三页卡片(免密 / 免费 / 转发)列位一致;
822
- 最小宽度按最长常见内容收敛(7 位数字 / x3→x1.5);超长值(如 x0.12→x0.06、$2/M→$1/M)
823
- 拥挤时省略号收缩到下限,不再把整行顶出卡片 */
824
- .nk-ctx { flex: 0 1 auto; min-width: 46px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
825
- .nk-rate { flex: 0 1 auto; min-width: 44px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
826
- /* 状态徽章列按内容定宽,不参与收缩:避免「可用 1439s」这类徽章被挤压截断成「可用 79」 */
827
- .nk-health { flex: 0 0 auto; min-width: 0; overflow: hidden; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
828
- /* 状态徽章紧凑化:小一号 + 收窄内边距,给 ID 列让出宽度 */
829
- .nk-health .badge { padding: 1px 6px; font-size: 10.5px; line-height: 14px; }
830
- /* 中性态(未测 / 未探测)直接隐藏:缺省即未测,无信息量却各占 ~45px;
831
- 只有产生真实状态(正常/异常/冷却/探测中/可用/判死/未知)才显示徽章 */
832
- .nk-health .badge:not(.ok):not(.err):not(.cool):not(.pro) { display: none; }
833
- /* 行尾操作按钮:绝对定位成悬停浮层,静息态不占列宽 —— 模型 ID 因此能吃满整行剩余宽度;
834
- 悬停 / 键盘聚焦行时淡入,右侧带一层与卡面同色的渐隐底,盖住下方文字不糊在一起 */
835
- .nk-model-line .row-actions {
836
- position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
837
- display: inline-flex; gap: 3px; margin: 0;
838
- padding: 2px 2px 2px 16px; border-radius: 999px;
839
- background: linear-gradient(90deg, transparent 0, color-mix(in srgb, var(--ch-accent) 9%, var(--panel)) 16px);
840
- opacity: 0; pointer-events: none; transition: opacity .12s;
841
- }
842
- .nk-model-line:hover .row-actions,
843
- .nk-model-line:focus-within .row-actions { opacity: 1; pointer-events: auto; }
844
- .nk-model-line .row-actions .btn { background: transparent; border-color: transparent; color: var(--muted); padding: 2px 7px; font-size: 11px; }
845
- .nk-model-line:hover .row-actions .btn { color: var(--text); }
846
- .nk-model-line .row-actions .btn:hover { background: var(--panel-3); border-color: var(--border); }
847
- /* 空态:虚线内嵌容器,让「还没有模型」的卡片看起来是待填充而不是渲染坏了;
848
- 在面板里撑满 10 行高度,零模型的卡与满模型的卡视觉尺寸一致 */
849
- .nk-empty {
850
- padding: 18px 12px; text-align: center;
851
- border: 1px dashed color-mix(in srgb, var(--ch-accent) 18%, var(--border));
852
- border-radius: 10px;
853
- background: color-mix(in srgb, var(--ch-accent) 3%, transparent);
854
- }
855
- .nk-inner > .nk-empty { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; }
856
- /* 内容区里说明文字 + Base URL 同一行:说明占主宽,Base URL 只读展示(code + 复制按钮),窄卡自动折行 */
857
- .nk-infoline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 8px; }
858
- .nk-card .nk-hint { margin: 0; flex: 1 1 220px; min-width: 0; }
859
- .nk-card .nk-baseurl { display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; max-width: 100%; margin: 0; }
860
- .nk-card .nk-baseurl label { color: var(--muted); font-size: 12px; white-space: nowrap; flex: none; }
861
- .nk-card .nk-baseurl code {
862
- flex: 0 1 auto; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px;
863
- padding: 2px 8px; border-radius: 6px;
864
- background: color-mix(in srgb, var(--ch-accent) 8%, var(--bg));
865
- box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ch-accent) 16%, var(--border));
866
- }
867
- .nk-card .nk-baseurl input { width: 240px; min-width: 0; font-size: 12px; padding: 3px 6px; }
868
- /* 免费渠道卡里 Base URL 独占一行:整组铺满卡宽,超长 URL 在码片内省略号截断 */
869
- .nk-infoline > .nk-baseurl:only-child { flex: 1 1 auto; }
870
- .nk-infoline > .nk-baseurl:only-child code { flex: 1 1 auto; }
871
- .nk-card .nk-baseurl .btn { flex: none; }
872
- .nk-card .row { margin-bottom: 8px; }
873
- /* 账号槽面板(点「账号槽」展开):面板化容器(与 nk-inner 同款深一层面板 + 品牌发丝描边),每账号一行 */
874
- .nk-card .nk-slots { margin: 0 0 10px; padding: 12px; background: var(--nk-inner-bg); border: 1px solid color-mix(in srgb, var(--ch-accent) 13%, var(--border-soft)); border-radius: 12px; }
875
- .nk-card .nk-slots[hidden] { display: none; }
876
- /* 免费渠道卡的账号槽面板(cp-card-slots)与免密页 nk-slots 同款面板化外观 */
877
- .nk-card .cp-card-slots { margin: 0 0 10px; padding: 12px; background: var(--nk-inner-bg); border: 1px solid color-mix(in srgb, var(--ch-accent) 13%, var(--border-soft)); border-radius: 12px; }
878
- .nk-card .cp-card-slots[hidden] { display: none; }
879
- /* 账号槽行不容许换行(每账号恒为一行):字段排不下时面板按 min-content 撑宽、
880
- 由卡片内容区横向滚动兜底(面板 width:fit-content,可用宽度足够时行内字段照常收缩铺满) */
881
- .nk-card .item.slot-row { flex-wrap: nowrap; row-gap: 0; }
882
- /* 面板内的账号槽行:去边框去底色,悬停品牌淡染浮层(与模型行悬停一致),不再「盒中盒」 */
883
- .nk-card .nk-slots .item.slot-row,
884
- .nk-card .cp-card-slots .item.slot-row { background: transparent; border-color: transparent; transition: background .12s; }
885
- .nk-card .nk-slots .item.slot-row:hover,
886
- .nk-card .cp-card-slots .item.slot-row:hover { background: color-mix(in srgb, var(--ch-accent) 8%, transparent); }
887
- /* 转发渠道账号行:面板内不再套一层实底盒子(避免「盒中盒」),改为极淡浮层 + 发丝描边 */
888
- .nk-card .nk-slots .item:not(.slot-row) {
889
- background: color-mix(in srgb, var(--panel-2) 42%, transparent);
890
- border-color: var(--border-soft);
891
- padding: 10px 12px;
892
- }
893
- .nk-card .nk-slots, .nk-card .cp-card-slots { width: fit-content; min-width: 100%; }
894
- /* Base URL 行允许折行,避免长域名把内容区撑出无意义的横向滚动 */
895
- .nk-card .meta { overflow-wrap: anywhere; margin-bottom: 8px; }
896
-
897
- /* ── 桌面端自动升级 UI(DOM 仅在 Electron 桌面端由 app.js 注入;Web 端不存在) ── */
898
- .omr-update-wrap { position: relative; flex: none; display: flex; align-items: center; }
899
- .omr-update-wrap[hidden] { display: none; }
900
- /* 升级入口照 magpie 头部的 Update 胶囊:22px 高、accent 半透明底、悬停变实心 */
901
- .omr-update-btn {
902
- display: inline-flex;
903
- align-items: center;
904
- justify-content: center;
905
- gap: 4px;
906
- max-width: 20em;
907
- overflow: hidden;
908
- height: 22px;
909
- padding: 0 9px 0 7px;
910
- border: 0;
911
- border-radius: 999px;
912
- font-family: inherit;
913
- font-size: 11.5px;
914
- font-weight: 560;
915
- letter-spacing: .005em;
916
- white-space: nowrap;
917
- color: var(--accent-2);
918
- background: rgba(88, 166, 255, .14);
919
- box-shadow: inset 0 0 0 .5px rgba(88, 166, 255, .35);
920
- cursor: pointer;
921
- transition: background .15s, color .15s, transform .12s cubic-bezier(.22, .7, .3, 1), opacity .15s;
922
- animation: omr-update-in .3s cubic-bezier(.22, .7, .3, 1);
923
- }
924
- .omr-update-btn:hover { background: var(--accent-2); color: var(--bg); }
925
- .omr-update-btn:active { transform: scale(.96); }
926
- /* 下载/重启中:照 magpie 置灰且不再响应点击,文字改为进度 */
927
- .omr-update-btn.busy { pointer-events: none; opacity: .6; }
928
- .omr-update-btn svg { width: 11px; height: 11px; display: block; flex: none; }
929
- .omr-update-label { overflow: hidden; text-overflow: ellipsis; }
930
- @keyframes omr-update-in { from { opacity: 0; max-width: 0; padding: 0; } }
931
- /* 下拉面板:绝对定位在图标下方,z-index 高于 sticky nav(z-index:5) */
932
- /* header 有 backdrop-filter 会生成独立层叠上下文,必须让 header 本身压过 nav,
933
- 否则面板即使 z-index 更高也会被 sticky nav 拦截点击。 */
934
- header { position: relative; z-index: 6; }
935
- .omr-update-panel {
936
- position: absolute;
937
- top: calc(100% + 8px);
938
- right: 0;
939
- z-index: 30;
940
- width: max-content;
941
- min-width: 200px;
942
- max-width: 300px;
943
- padding: 12px;
944
- background: var(--panel);
945
- border: 1px solid var(--border);
946
- border-radius: var(--radius);
947
- box-shadow: var(--shadow);
948
- display: flex;
949
- flex-direction: column;
950
- gap: 8px;
951
- }
952
- .omr-update-panel[hidden] { display: none; }
953
- .omr-update-panel .btn { align-self: flex-end; }
954
- .omr-update-title { font-size: 13px; font-weight: 600; }
955
- .omr-update-title.err { color: var(--err); }
956
- .omr-update-line { font-size: 12px; color: var(--muted); word-break: break-all; }
957
- .omr-update-line.err { color: var(--err); }
958
- /* 进度条:纯 CSS width 驱动,事件推送刷新内联 style */
959
- .omr-update-progress {
960
- height: 6px;
961
- border-radius: 3px;
962
- background: var(--panel-3);
963
- border: 1px solid var(--border-soft);
964
- overflow: hidden;
965
- }
966
- .omr-update-progress i {
967
- display: block;
968
- height: 100%;
969
- background: linear-gradient(90deg, var(--accent-2), var(--accent-3));
970
- transition: width .25s;
971
- }
1
+ :root {
2
+ --bg: #0d1117;
3
+ --bg-2: #090c10;
4
+ --panel: #161b22;
5
+ --panel-2: #1c2129;
6
+ --panel-3: #222831;
7
+ --border: #2d333b;
8
+ --border-soft: #232932;
9
+ --text: #e6edf3;
10
+ --muted: #8b949e;
11
+ --accent: #3fb950;
12
+ --accent-2: #58a6ff;
13
+ --accent-3: #bc8cff;
14
+ --warn: #d29922;
15
+ --err: #f85149;
16
+ --radius: 10px;
17
+ --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -12px rgba(0, 0, 0, .6);
18
+ }
19
+ * { box-sizing: border-box; }
20
+ body {
21
+ margin: 0;
22
+ background:
23
+ radial-gradient(900px 420px at 12% -8%, rgba(88, 166, 255, .10), transparent 70%),
24
+ radial-gradient(760px 380px at 88% -12%, rgba(63, 185, 80, .08), transparent 70%),
25
+ var(--bg);
26
+ color: var(--text);
27
+ font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
28
+ font-size: 14px;
29
+ -webkit-font-smoothing: antialiased;
30
+ }
31
+ header {
32
+ padding: 16px 24px;
33
+ border-bottom: 1px solid var(--border);
34
+ display: flex;
35
+ align-items: center;
36
+ gap: 16px;
37
+ flex-wrap: wrap;
38
+ background: linear-gradient(180deg, rgba(22, 27, 34, .92), rgba(13, 17, 23, .72));
39
+ backdrop-filter: blur(8px);
40
+ }
41
+ header .logo { width: 34px; height: 34px; border-radius: 9px; display: block; flex: none; box-shadow: 0 0 0 1px var(--border), 0 4px 14px -6px rgba(88, 166, 255, .8); }
42
+ header h1 { font-size: 18px; margin: 0; letter-spacing: .2px; }
43
+ header .sub { color: var(--muted); font-size: 12px; }
44
+ nav {
45
+ display: flex;
46
+ gap: 4px;
47
+ padding: 8px 24px;
48
+ border-bottom: 1px solid var(--border);
49
+ background: rgba(22, 27, 34, .86);
50
+ backdrop-filter: blur(8px);
51
+ position: sticky;
52
+ top: 0;
53
+ z-index: 5;
54
+ }
55
+ nav button {
56
+ background: transparent;
57
+ border: 1px solid transparent;
58
+ color: var(--muted);
59
+ padding: 8px 14px;
60
+ border-radius: 8px;
61
+ cursor: pointer;
62
+ font-size: 14px;
63
+ transition: color .15s, background .15s, border-color .15s;
64
+ }
65
+ nav button:hover { color: var(--text); background: var(--panel-2); }
66
+ nav button.active {
67
+ background: var(--panel-2);
68
+ color: var(--text);
69
+ border-color: var(--border);
70
+ box-shadow: inset 0 -2px 0 var(--accent);
71
+ }
72
+ main { padding: 20px 24px 28px; width: 100%; max-width: min(2080px, 94vw); margin: 0 auto; }
73
+ .card {
74
+ background: linear-gradient(180deg, var(--panel), #141920);
75
+ border: 1px solid var(--border);
76
+ border-radius: var(--radius);
77
+ padding: 16px;
78
+ margin-bottom: 16px;
79
+ box-shadow: var(--shadow);
80
+ }
81
+ .card h2 { font-size: 15px; margin: 0 0 12px; letter-spacing: .2px; }
82
+ .card h3 { font-size: 14px; margin: 12px 0 8px; }
83
+ /* 卡片头行:标题靠左、操作按钮靠右,同一行放置 */
84
+ .card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
85
+ .card-head h2 { margin: 0; }
86
+ /* 卡片标题块:主标题 + 一行灰色副标题 */
87
+ .card-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
88
+ .card-sub { color: var(--muted); font-size: 12px; }
89
+ .row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
90
+ .row > * { flex: 1; min-width: 140px; }
91
+ /* 行右侧按钮组:不吃 min-width 压窄(否则按钮在容器内堆叠换行),整体贴右 */
92
+ .row-actions { flex: 0 0 auto; min-width: 0; margin-left: auto; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
93
+ /* 行左块:不拉伸、靠左聚拢;-wide 用于 Base URL 等输入块(基准 380px,窄屏可收缩) */
94
+ .row-lead { flex: 0 0 auto; min-width: 0; }
95
+ .row-lead-wide { flex: 0 1 380px; min-width: 0; }
96
+ /* 操作区内联的启用复选框:不占块级标签的 margin-bottom,与按钮同高对齐 */
97
+ .row-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); margin-bottom: 0; white-space: nowrap; cursor: pointer; }
98
+ /* 行内标签块:文字标签与输入框同一行(标签在左、输入框占满剩余宽度) */
99
+ .row-inline { display: flex; align-items: center; gap: 8px; }
100
+ .row-inline > label { margin-bottom: 0; white-space: nowrap; flex: 0 0 auto; }
101
+ .row-inline > input { flex: 1 1 auto; }
102
+ label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
103
+ input, select, textarea {
104
+ width: 100%;
105
+ background: var(--bg);
106
+ border: 1px solid var(--border);
107
+ color: var(--text);
108
+ border-radius: 8px;
109
+ padding: 8px 10px;
110
+ font-size: 13px;
111
+ font-family: inherit;
112
+ }
113
+ textarea { min-height: 80px; resize: vertical; font-family: Consolas, monospace; }
114
+ input:focus, select:focus, textarea:focus { outline: 1px solid var(--accent-2); }
115
+ /* 复选框不吃全局 width:100%(否则下拉/弹窗里复选框被拉满宽,把行内容挤乱) */
116
+ input[type="checkbox"] { width: auto; flex: none; }
117
+ /* 下拉/弹窗行内复选框:定尺寸、去 padding,强调色跟主题 */
118
+ .modal-row input[type="checkbox"] { width: 14px; height: 14px; padding: 0; margin: 0; accent-color: var(--accent); }
119
+ button.btn {
120
+ background: var(--panel-2);
121
+ border: 1px solid var(--border);
122
+ color: var(--text);
123
+ padding: 8px 14px;
124
+ border-radius: 8px;
125
+ cursor: pointer;
126
+ font-size: 13px;
127
+ white-space: nowrap;
128
+ transition: background .15s, border-color .15s, color .15s, transform .06s;
129
+ }
130
+ button.btn:hover { border-color: var(--accent-2); background: var(--panel-3); }
131
+ button.btn:active { transform: translateY(1px); }
132
+ button.btn:disabled { opacity: .45; color: var(--muted); cursor: not-allowed; }
133
+ button.btn:disabled:hover { border-color: var(--border); background: var(--panel-2); }
134
+ button.btn.primary { background: #1f6feb; border-color: #1f6feb; color: #fff; }
135
+ button.btn.primary:hover { background: #2a7bf5; border-color: #2a7bf5; }
136
+ button.btn.danger { color: var(--err); }
137
+ button.btn.danger:hover { border-color: var(--err); background: rgba(248, 81, 73, .1); }
138
+ button.btn.small { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
139
+ /* 表格行内操作按钮:默认低调,行悬停时才提亮,避免整屏按钮抢视觉 */
140
+ .cell-actions { display: flex; gap: 5px; justify-content: flex-end; }
141
+ .cell-actions button.btn { color: var(--muted); border-color: transparent; background: transparent; padding: 3px 7px; }
142
+ tr:hover .cell-actions button.btn { color: var(--text); border-color: var(--border); background: var(--panel-2); }
143
+ .cell-actions button.btn:hover { color: var(--text); border-color: var(--accent-2); background: var(--panel-3); }
144
+ /* 操作列固定在表格右侧:表格横向滚动时「测试」等按钮始终可见 */
145
+ .table-wrap td.cell-actions {
146
+ position: sticky;
147
+ right: 0;
148
+ z-index: 1;
149
+ background: #151a21;
150
+ box-shadow: -10px 0 14px -12px rgba(0, 0, 0, .95);
151
+ }
152
+ .table-wrap tbody tr:hover td.cell-actions { background: #1a212a; }
153
+ /* 模型目录分组标题行:左侧渠道名 + 右侧(上次测试时间 +「测试本渠道」按钮) */
154
+ tr.src-group td .src-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; row-gap: 4px; }
155
+ tr.src-group td .ch-test-wrap { display: inline-flex; align-items: center; gap: 8px; flex: none; }
156
+ tr.src-group td .ch-tested-at { color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
157
+ tr.src-group td .ch-test-btn { font-weight: 400; position: sticky; right: 0; }
158
+ table { width: 100%; border-collapse: collapse; font-size: 13px; }
159
+ th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border-soft); }
160
+ /* 模型目录:每行模型信息保持单行,超宽时横向滚动而非换行 */
161
+ .table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: 8px; background: rgba(9, 12, 16, .35); }
162
+ .table-wrap th, .table-wrap td { white-space: nowrap; }
163
+ .table-wrap thead th {
164
+ position: sticky;
165
+ top: 0;
166
+ z-index: 2;
167
+ background: var(--panel-2);
168
+ border-bottom: 1px solid var(--border);
169
+ padding-top: 9px;
170
+ padding-bottom: 9px;
171
+ letter-spacing: .3px;
172
+ }
173
+ /* 最近请求表格:固定可见约 10 行,右侧滚动条浏览全部 500 条(横向沿用全局 auto) */
174
+ #recent-card .table-wrap { max-height: 420px; overflow-y: auto; }
175
+ /* 最近请求:序号列(最新请求排最前) */
176
+ #recent-card td.col-idx, #recent-card th.col-idx { width: 1%; padding-right: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
177
+ th { color: var(--muted); font-weight: 500; font-size: 12px; }
178
+ tr:last-child td { border-bottom: none; }
179
+ .table-wrap tbody tr:hover td { background: rgba(88, 166, 255, .06); }
180
+ /* 模型目录:按提供商来源分组的分组标题行 */
181
+ tr.src-group td {
182
+ background: linear-gradient(90deg, rgba(31, 111, 235, .20), rgba(31, 111, 235, .05));
183
+ color: #a8cfff;
184
+ font-weight: 600;
185
+ font-size: 12px;
186
+ padding: 7px 10px;
187
+ border-top: 1px solid var(--border);
188
+ border-bottom: 1px solid var(--border);
189
+ }
190
+ tr.src-group:first-child td { border-top: none; }
191
+ tr.src-group td .src-name { display: inline-flex; align-items: center; gap: 8px; }
192
+ tr.src-group td .src-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 3px rgba(88, 166, 255, .18); flex: none; }
193
+ tr.src-group td .src-count { color: var(--muted); font-weight: 400; font-size: 11px; }
194
+ tr.src-group td .muted { font-weight: 400; }
195
+ /* agent 名称右侧折叠展开三角:默认折叠朝右,展开后旋转 90° 朝下 */
196
+ tr.src-group td .src-toggle {
197
+ background: none;
198
+ border: none;
199
+ padding: 0 2px;
200
+ color: var(--muted);
201
+ font-size: 10px;
202
+ line-height: 1;
203
+ cursor: pointer;
204
+ flex: none;
205
+ transition: transform .15s ease, color .15s ease;
206
+ }
207
+ tr.src-group td .src-toggle:hover { color: var(--accent-2); }
208
+ tr.src-group td .src-toggle[aria-expanded="true"] { transform: rotate(90deg); }
209
+ .badge {
210
+ display: inline-block;
211
+ padding: 2px 8px;
212
+ border-radius: 999px;
213
+ font-size: 11px;
214
+ line-height: 16px;
215
+ border: 1px solid var(--border);
216
+ background: rgba(139, 148, 158, .08);
217
+ color: var(--muted);
218
+ vertical-align: middle;
219
+ }
220
+ .badge.ok { color: var(--accent); border-color: rgba(63, 185, 80, .5); background: rgba(63, 185, 80, .12); }
221
+ .badge.cool { color: var(--warn); border-color: rgba(210, 153, 34, .5); background: rgba(210, 153, 34, .12); }
222
+ .badge.err { color: var(--err); border-color: rgba(248, 81, 73, .5); background: rgba(248, 81, 73, .12); }
223
+ .badge.free { color: var(--accent-2); border-color: rgba(88, 166, 255, .5); background: rgba(88, 166, 255, .12); }
224
+ .badge.pro { color: var(--accent-3); border-color: rgba(188, 140, 255, .5); background: rgba(188, 140, 255, .12); }
225
+ /* 模型目录「模型组」列:徽章悬停时在右侧显示 ✕(点击从该组移除) */
226
+ .badge.grp { display: inline-flex; align-items: center; gap: 5px; }
227
+ .badge.grp button[data-grp-x] { display: none; background: none; border: none; padding: 0; color: var(--err); cursor: pointer; font-size: 12px; line-height: 1; }
228
+ .badge.grp:hover button[data-grp-x] { display: inline-block; }
229
+ .badge.grp button[data-grp-x]:hover { transform: scale(1.15); }
230
+ /* 渠道卡片标题旁的「源码」外链(小字弱化,不抢标题视觉权重) */
231
+ .ch-repo { margin-left: 6px; font-size: 11px; font-weight: 400; color: var(--muted); text-decoration: none; border-bottom: 1px dashed var(--border); }
232
+ .ch-repo:hover { color: var(--accent); border-bottom-color: var(--accent); }
233
+
234
+ /* 弹窗(添加到模型组等):fixed 铺满视口 + 双保险居中 */
235
+ .modal-mask { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; z-index: 100; }
236
+ .modal { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; width: min(560px, 92vw); max-height: 80vh; overflow: auto; box-shadow: 0 8px 40px rgba(0, 0, 0, .5); margin: auto; }
237
+ .modal h3 { margin: 0 0 6px; }
238
+ .modal-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
239
+ .modal-row { display: flex; align-items: center; gap: 10px; cursor: pointer; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; }
240
+ .modal-row:hover { border-color: var(--accent); }
241
+ /* 模型组:候选多选下拉浮层(锚定在触发按钮旁) */
242
+ .combo-menu {
243
+ position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
244
+ background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
245
+ box-shadow: 0 8px 24px rgba(0, 0, 0, .5); padding: 6px; margin-top: 0; max-height: 280px;
246
+ }
247
+ .combo-menu[hidden] { display: none; }
248
+ /* 下拉浮层内的行:内容靠左对齐,行内 hover 高亮 */
249
+ .combo-menu { text-align: left; align-items: stretch; }
250
+ .combo-menu .modal-row span { text-align: left; word-break: break-all; }
251
+ /* 总览统计卡:6 列自适应网格,卡片带语义强调色(--tone)+ 顶部渐变描边 */
252
+ .stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 12px; margin-bottom: 16px; }
253
+ .stat {
254
+ position: relative;
255
+ overflow: hidden;
256
+ background: linear-gradient(180deg, var(--panel), #141920);
257
+ border: 1px solid var(--border);
258
+ border-radius: var(--radius);
259
+ padding: 14px 16px 13px;
260
+ box-shadow: var(--shadow);
261
+ transition: border-color .18s, transform .18s;
262
+ --tone: var(--accent-2);
263
+ }
264
+ .stat::before {
265
+ content: "";
266
+ position: absolute;
267
+ inset: 0 0 auto 0;
268
+ height: 2px;
269
+ background: linear-gradient(90deg, var(--tone), transparent 85%);
270
+ opacity: .85;
271
+ }
272
+ .stat::after {
273
+ content: "";
274
+ position: absolute;
275
+ right: -28px;
276
+ top: -34px;
277
+ width: 96px;
278
+ height: 96px;
279
+ border-radius: 50%;
280
+ background: var(--tone);
281
+ opacity: .07;
282
+ pointer-events: none;
283
+ }
284
+ .stat:hover { border-color: color-mix(in srgb, var(--tone) 45%, var(--border)); transform: translateY(-1px); }
285
+ .stat .stat-top { display: flex; align-items: center; gap: 8px; }
286
+ .stat .stat-ico {
287
+ width: 26px; height: 26px; flex: none;
288
+ display: inline-flex; align-items: center; justify-content: center;
289
+ border-radius: 8px;
290
+ color: var(--tone);
291
+ background: color-mix(in srgb, var(--tone) 14%, transparent);
292
+ border: 1px solid color-mix(in srgb, var(--tone) 28%, transparent);
293
+ }
294
+ .stat .stat-ico svg { width: 15px; height: 15px; }
295
+ .stat .num { font-size: 26px; font-weight: 650; line-height: 1.2; margin-top: 8px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
296
+ .stat .lbl { color: var(--muted); font-size: 12px; letter-spacing: .2px; }
297
+ .stat .stat-foot { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
298
+ /* 成功率细条:贴在「总请求」卡底部 */
299
+ .rate-bar { flex: 1 1 auto; min-width: 34px; max-width: 74px; height: 3px; border-radius: 999px; background: rgba(139, 148, 158, .22); overflow: hidden; }
300
+ .rate-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #56d364); transition: width .35s ease; }
301
+ .stat.tone-green { --tone: #3fb950; }
302
+ .stat.tone-cyan { --tone: #39c5cf; }
303
+ .stat.tone-purple { --tone: #bc8cff; }
304
+ .stat.tone-blue { --tone: #58a6ff; }
305
+ .stat.tone-amber { --tone: #d29922; }
306
+ .stat.tone-red { --tone: #f85149; }
307
+ /* 实时推送指示点:呼吸动画 */
308
+ .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(63, 185, 80, .6); animation: live-pulse 2s infinite; flex: none; }
309
+ @keyframes live-pulse {
310
+ 0% { box-shadow: 0 0 0 0 rgba(63, 185, 80, .55); }
311
+ 70% { box-shadow: 0 0 0 6px rgba(63, 185, 80, 0); }
312
+ 100% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0); }
313
+ }
314
+ .probe-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46ch; }
315
+ /* 模型目录标题行的操作区:提示文字允许换行占满剩余空间,不再被按钮挤成省略号(遮挡) */
316
+ .card-head .probe-actions { flex: 1 1 auto; flex-wrap: wrap; justify-content: flex-end; white-space: normal; row-gap: 4px; }
317
+ .card-head .probe-actions .probe-hint { flex: 1 1 20ch; min-width: 0; max-width: none; white-space: normal; overflow: visible; text-align: right; line-height: 1.5; }
318
+ .card-head .probe-actions .btn { flex: none; }
319
+ code, .mono { font-family: Consolas, monospace; font-size: 12px; background: var(--panel-2); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
320
+ /* 表格内的等宽内容(模型 ID / 上下文 / 链路):去掉底色,避免整列出现色块 */
321
+ .table-wrap td.mono { background: none; border-radius: 0; word-break: normal; }
322
+ .table-wrap td.model-id { color: #cfe3ff; font-weight: 500; }
323
+ .table-wrap td.ctx { color: var(--muted); font-variant-numeric: tabular-nums; }
324
+ /* 滚动条:贴合深色主题(Chromium / Edge) */
325
+ .table-wrap::-webkit-scrollbar { width: 9px; height: 9px; }
326
+ .table-wrap::-webkit-scrollbar-track { background: transparent; }
327
+ .table-wrap::-webkit-scrollbar-thumb { background: #30363d; border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
328
+ .table-wrap::-webkit-scrollbar-thumb:hover { background: #454c56; background-clip: content-box; }
329
+ .table-wrap::-webkit-scrollbar-corner { background: transparent; }
330
+ @media (max-width: 720px) {
331
+ main { padding: 14px; }
332
+ header, nav { padding-left: 14px; padding-right: 14px; }
333
+ .stat-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
334
+ .stat .num { font-size: 22px; }
335
+ .probe-hint { max-width: 100%; }
336
+ }
337
+ .copyline { display: flex; gap: 8px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
338
+ .copyline code { flex: 1; min-width: 200px; }
339
+ .muted { color: var(--muted); font-size: 12px; }
340
+ .toast {
341
+ position: fixed; bottom: 20px; right: 20px;
342
+ /* 高于表格 sticky 操作列/表头(z-index 1~2)与弹窗遮罩(z-index 100),避免右下角提示被遮挡 */
343
+ z-index: 1000;
344
+ background: var(--panel-2); border: 1px solid var(--border);
345
+ border-radius: var(--radius); padding: 10px 16px;
346
+ box-shadow: 0 4px 16px rgba(0,0,0,.4);
347
+ opacity: 0; transition: opacity .2s;
348
+ max-width: 420px;
349
+ display: flex; align-items: flex-start; gap: 10px;
350
+ }
351
+ .toast.show { opacity: 1; }
352
+ .toast.err { border-color: var(--err); }
353
+ .toast.ok { border-color: var(--accent); }
354
+ .toast-msg { flex: 1; word-break: break-word; white-space: pre-wrap; }
355
+ .toast-copy {
356
+ flex: none; align-self: center;
357
+ background: none; border: 1px solid var(--border); border-radius: 6px;
358
+ color: var(--muted); font-size: 12px; padding: 2px 10px; cursor: pointer;
359
+ transition: color .15s, border-color .15s;
360
+ }
361
+ .toast-copy:hover { color: var(--text); border-color: var(--muted); }
362
+ .item-list { display: flex; flex-direction: column; gap: 10px; }
363
+ .item {
364
+ background: var(--panel-2);
365
+ border: 1px solid var(--border);
366
+ border-radius: var(--radius);
367
+ padding: 12px;
368
+ }
369
+ .item .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
370
+ .item .title { font-weight: 600; }
371
+ .item .meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
372
+ /* 免费渠道:新增表单单占一张卡片、每个提供商各占一张卡片(头部排版见 .ch-card-head) */
373
+ .provider-card .meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
374
+ /* OpenCode 槽:单行布局,操作按钮靠右 */
375
+ .item.slot-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
376
+ .item.slot-row .slot-name, .item.slot-row .slot-key, .item.slot-row .slot-proxy {
377
+ display: flex; align-items: center; gap: 6px;
378
+ }
379
+ .item.slot-row .slot-name label, .item.slot-row .slot-key label, .item.slot-row .slot-proxy label {
380
+ font-size: 12px; color: var(--muted); white-space: nowrap; flex: 0 0 auto;
381
+ }
382
+ .item.slot-row .slot-name input, .item.slot-row .slot-key input, .item.slot-row .slot-proxy input {
383
+ width: 100%;
384
+ }
385
+ .item.slot-row .slot-name { flex: 1 1 auto; min-width: 120px; }
386
+ /* API Key 加宽:长 key 需可读/可粘贴,占据槽位行主要宽度 */
387
+ .item.slot-row .slot-key { flex: 0 1 340px; min-width: 220px; }
388
+ .item.slot-row .slot-proxy { flex: 1 1 auto; min-width: 160px; }
389
+ .item.slot-row .slot-enabled { white-space: nowrap; flex: 0 0 auto; }
390
+ .item.slot-row .slot-del { margin-left: auto; flex: 0 0 auto; }
391
+ /* OpenCode Zen 账号槽 / 新增提供商表单:账号槽收窄、API Key 加宽(代理不变占次要宽度) */
392
+ #oc-slots .item.slot-row .slot-name,
393
+ #cp-slots .item.slot-row .slot-name { flex: 0 1 168px; min-width: 120px; }
394
+ #oc-slots .item.slot-row .slot-key,
395
+ #cp-slots .item.slot-row .slot-key { flex: 1 1 300px; min-width: 240px; }
396
+ #oc-slots .item.slot-row .slot-proxy,
397
+ #cp-slots .item.slot-row .slot-proxy { flex: 0 1 240px; min-width: 150px; }
398
+ /* 自定义提供商卡片:账号槽面板(显示/隐藏 + 快捷添加 + 行内编辑) */
399
+ .cp-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
400
+ .cp-card-slots { margin-top: 6px; padding: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
401
+ .cp-card-slots[hidden] { display: none; }
402
+ .cp-card-slots .item-list { margin-top: 0; }
403
+ .cp-slot-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
404
+ .cp-slot-add[hidden] { display: none; }
405
+ .cp-slot-add input { flex: 1 1 160px; min-width: 120px; }
406
+ /* 快捷添加行:API Key 输入框加宽 */
407
+ .cp-slot-add input[data-cp-new-key] { flex: 3 1 320px; min-width: 240px; }
408
+ /* 槽行紧凑双态:只读 span ↔ 编辑 input,.editing 切换 */
409
+ .cp-slot-list { gap: 6px; }
410
+ .cp-slot-list .cp-slot-line { padding: 6px 10px; }
411
+ .cp-slot-line .ro { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
412
+ .cp-slot-line input { display: none; width: 100%; }
413
+ .cp-slot-line.editing .ro { display: none; }
414
+ .cp-slot-line.editing input { display: block; }
415
+ .cp-slot-line .slot-edit { margin-left: auto; flex: 0 0 auto; }
416
+ /* 槽行启用复选框:显式定尺寸并显示,复选框在「启用」文字前面、与文字同基线 */
417
+ .cp-slot-line .slot-enabled { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; margin-bottom: 0; font-size: 12px; color: var(--text); white-space: nowrap; cursor: pointer; }
418
+ .cp-slot-line .slot-enabled input[type="checkbox"] { display: inline-block; width: 14px; height: 14px; padding: 0; margin: 0; flex: none; accent-color: var(--accent); }
419
+ .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
420
+ .chip { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
421
+ /* 自动签到的渠道状态:covered 绿 / pending 黄 / 出错 红 */
422
+ .chip.ok { color: var(--accent); border-color: var(--accent); }
423
+ .chip.cool { color: var(--warn); border-color: var(--warn); }
424
+ .chip.err { color: var(--err); border-color: var(--err); }
425
+ .chip button { background: none; border: none; color: var(--err); cursor: pointer; padding: 0; font-size: 12px; }
426
+ .chip button.pin { color: var(--accent-2); }
427
+ /* 可移除 chip:✕ 默认隐藏,鼠标悬停在 chip 上时才在右侧出现 */
428
+ .chip button[data-rm] { display: none; }
429
+ .chip:hover button[data-rm] { display: inline-block; text-decoration: none; }
430
+ .chip button[data-rm]:hover { transform: scale(1.15); }
431
+ /* 拖拽排序:可拖 chip 抓手光标,拖起半透明,落点目标高亮 */
432
+ .chip[draggable="true"] { cursor: grab; }
433
+ .chip.dragging { opacity: .35; }
434
+ .chip.drag-over { border-color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--accent-2); }
435
+ /* 模型组卡片:组内模型清单面板(展开/折叠 + 统计信息 + 表格清单 + 添加模型) */
436
+ .gm-panel { margin-top: 6px; padding: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
437
+ .gm-panel[hidden] { display: none; }
438
+ .gm-stats { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
439
+ .gm-stats b { color: var(--text); }
440
+ .gm-panel .gm-add { margin-bottom: 8px; }
441
+ .gm-panel .gm-add[hidden] { display: none; }
442
+ /* 组「添加模型」操作条:多选后显示待应用计数与「全选/反选/应用」按钮 */
443
+ .gm-add-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; font-size: 12px; }
444
+ .gm-add-bar[hidden] { display: none; }
445
+ .gm-add-acts { display: flex; gap: 6px; }
446
+
447
+ /* 模型级联选择器:渠道 → 模型 两级下拉,两级均可搜索 */
448
+ .cascade { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; margin-top: 6px; }
449
+ .cascade-col { flex: 1 1 220px; min-width: 200px; }
450
+ .cascade-col > label { display: block; margin-bottom: 4px; }
451
+ .cascade-box { position: relative; }
452
+ .cascade-trigger {
453
+ width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
454
+ background: var(--bg); border: 1px solid var(--border); color: var(--text);
455
+ border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; cursor: pointer; text-align: left;
456
+ }
457
+ .cascade-trigger:hover { border-color: var(--accent-2); }
458
+ .cascade-trigger-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
459
+ .cascade-caret { color: var(--muted); flex: none; font-size: 11px; }
460
+ .cascade-menu {
461
+ position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
462
+ background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
463
+ box-shadow: 0 8px 24px rgba(0, 0, 0, .5); padding: 6px;
464
+ }
465
+ .cascade-menu[hidden] { display: none; }
466
+ .cascade-search { width: 100%; margin-bottom: 6px; }
467
+ .cascade-list { max-height: 240px; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
468
+ .cascade-item {
469
+ display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
470
+ background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px;
471
+ padding: 6px 10px; color: var(--text); font-size: 13px; font-family: inherit; cursor: pointer; text-align: left;
472
+ }
473
+ .cascade-item:hover { border-color: var(--accent); }
474
+ .cascade-item.active { border-color: var(--accent-2); background: #1a3a5c; }
475
+ .cascade-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
476
+ .cascade-item-count { color: var(--muted); font-size: 11px; flex: none; }
477
+ .cascade-group { padding: 6px 10px 2px; color: var(--accent-2); font-size: 12px; font-weight: 600; }
478
+ .cascade-row {
479
+ display: flex; align-items: center; gap: 8px; cursor: pointer;
480
+ background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px;
481
+ }
482
+ .cascade-row:hover { border-color: var(--accent); }
483
+ .cascade-row input[type="checkbox"] { width: 14px; height: 14px; padding: 0; margin: 0; flex: none; accent-color: var(--accent); }
484
+ .cascade-row span.mono { background: none; padding: 0; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
485
+ .cascade-empty { padding: 8px 10px; }
486
+ /* 组卡片内的级联选择器:浮层改为面板内展开(面板本身已在卡片流内,不叠加绝对定位) */
487
+ .gm-panel .gm-add .cascade-menu { position: static; box-shadow: none; margin-top: 6px; }
488
+ /* 组内模型清单:行拖拽排序(行首 ⣿ 抓手,拖起半透明,落点行高亮) */
489
+ .gm-table .gm-grip { width: 22px; text-align: center; color: var(--muted); cursor: grab; user-select: none; }
490
+ /* 组内模型清单:序号列前的置顶按钮(点击把该行移到已启用模型的第一个) */
491
+ .gm-table .gm-idx { white-space: nowrap; }
492
+ .gm-table .gm-pin { background: none; border: none; color: var(--accent-2); cursor: pointer; padding: 0 4px 0 0; font-size: 12px; line-height: 1; vertical-align: middle; }
493
+ .gm-table .gm-pin:hover { text-decoration: none; transform: translateY(-1px); }
494
+ .gm-table .gm-pin[disabled] { color: var(--muted); opacity: .3; cursor: default; transform: none; }
495
+ .gm-table tr.gm-row { cursor: grab; }
496
+ .gm-table tr.gm-row.dragging { opacity: .35; }
497
+ .gm-table tr.gm-row.drag-over td { box-shadow: inset 0 2px 0 var(--accent-2); }
498
+ details summary { cursor: pointer; color: var(--muted); font-size: 12px; }
499
+ .hint { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 8px 0; }
500
+ /* 设置页折叠说明:默认只留一行摘要,点开才展示完整解释 */
501
+ .hint-more { margin: 6px 0; }
502
+ .hint-more > summary { color: var(--accent-2); width: fit-content; user-select: none; }
503
+ .hint-more > summary:hover { text-decoration: underline; }
504
+ .hint-more > .hint { margin: 6px 0 0; padding-left: 10px; border-left: 2px solid var(--border); }
505
+ /* 设置页操作行:按钮与辅助文字同一行,间距统一 */
506
+ .settings-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
507
+ .inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 10px; }
508
+ .statusline { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
509
+
510
+ /* 最近请求 Token 列:输入/输出/总计分别着色;图标加粗,Σ 用独立强调色 */
511
+ .tok-in { color: #58a6ff; }
512
+ .tok-out { color: #bc8cff; }
513
+ .tok-sum { color: var(--text); }
514
+ .tok-ic { font-weight: 700; }
515
+ .tok-sum .tok-ic { color: #d29922; }
516
+
517
+ /* 模型目录行高亮样式 - 整行背景色高亮 */
518
+ tr.selected-row td {
519
+ background-color: rgba(59, 185, 80, 0.15) !important;
520
+ }
521
+ tr.selected-row:hover td {
522
+ background-color: rgba(59, 185, 80, 0.25) !important;
523
+ }
524
+
525
+ /* 自定义提供商「获取可用模型」:锚定按钮右对齐的下拉勾选清单 */
526
+ .cp-anchor { position: relative; display: inline-flex; }
527
+ .cp-picker-menu { left: auto; right: 0; width: min(460px, 92vw); max-height: 360px; display: flex; flex-direction: column; gap: 6px; }
528
+ .cp-picker-menu .cp-pop-list { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
529
+ /* 模型勾选清单顶部的标题栏:占满整行(负 margin 抵消菜单 6px 内边距,顶部圆角贴合容器),字体加大居中;提供商名称加粗、换色 */
530
+ .cp-picker-menu .cp-pop-title {
531
+ margin: -6px -6px 0; /* 抵消容器 6px 内边距,让标题背景铺满整行 */
532
+ font-size: 16px; color: var(--text); text-align: center;
533
+ background: #1a3a5c; border-radius: 7px 7px 0 0;
534
+ padding: 10px 12px;
535
+ }
536
+ .cp-picker-menu .cp-pop-title-name { font-weight: 700; color: var(--accent-2); }
537
+
538
+ /* ── 渠道卡片网格(免密渠道 / 免费渠道 / 转发渠道三页统一)────────────────
539
+ 卡片流:外层响应式多列网格,每渠道一卡,卡片 = 头部 + 信息区 + 操作区。
540
+ auto-fit 让卡片少的页(免密只有 2 张)自动铺满,卡片多的页按 minmax 回流。 */
541
+ /* 卡片网格:免密渠道只有 2 张,auto-fit 自动铺满两侧;
542
+ 免费 / 转发渠道加 .channel-grid-max4:全屏最多 4 列,避免 5~6 列把卡片挤窄 */
543
+ .channel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: stretch; margin-bottom: 16px; }
544
+ .channel-grid-max4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
545
+ @media (max-width: 1840px) { .channel-grid-max4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
546
+ @media (max-width: 1360px) { .channel-grid-max4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
547
+ @media (max-width: 860px) { .channel-grid-max4 { grid-template-columns: minmax(0, 1fr); } }
548
+ .channel-grid > .card { margin-bottom: 0; }
549
+ /* 卡片:flex 纵向布局 = 头部(固定)+ 内容区(滚动)+ 操作区(固定)。
550
+ hover 只做描边与投影(不用 transform:fixed 弹层 cp-picker-menu 挂在卡内,
551
+ 祖先一旦有 transform 会变成弹层的 containing block,把居中弹层拉歪并被裁剪) */
552
+ .ch-card { position: relative; display: flex; flex-direction: column; transition: border-color .18s, box-shadow .18s; }
553
+ /* hover:品牌色描边 + 品牌色氛围投影(不再是纯黑投影),顶部内高光提层次 */
554
+ .ch-card:hover {
555
+ border-color: color-mix(in srgb, var(--ch-accent, #6e7681) 46%, var(--border));
556
+ box-shadow: 0 1px 2px rgba(0, 0, 0, .4),
557
+ 0 18px 38px -20px color-mix(in srgb, var(--ch-accent, #6e7681) 36%, rgba(0, 0, 0, .9)),
558
+ inset 0 1px 0 rgba(255, 255, 255, .05);
559
+ z-index: 5;
560
+ }
561
+ .ch-card:focus-within { border-color: color-mix(in srgb, var(--ch-accent, #6e7681) 40%, var(--border)); }
562
+ /* 网格内卡片统一尺寸:同页所有卡片等高(等宽由网格 1fr 保证)。
563
+ 高度 = 边框 2 + 卡内边距 32 + 卡头 39 + 间距 12 + 按钮行 27 + 间距 12 + 内容区
564
+ (说明 / Base URL 等 + 固定 364px 的模型面板),因此同页每张卡都恰好显示 10 个序号行。
565
+ 三个页面卡头以上的结构略有差异,所以按页给不同高度 */
566
+ .channel-grid .ch-card { border-radius: 14px; }
567
+ .channel-grid-channels .ch-card { height: 498px; }
568
+ .channel-grid-providers .ch-card { height: 524px; }
569
+ .channel-grid-nokey .ch-card { height: 554px; }
570
+ /* 免密页两张卡的说明 / Base URL / 车道代理会随卡宽折行,卡越高才能保住 10 行可见 */
571
+ @media (max-width: 1800px) { .channel-grid-nokey .ch-card { height: 568px; } }
572
+ @media (max-width: 1150px) { .channel-grid-nokey .ch-card { height: 579px; } }
573
+ @media (max-width: 1000px) { .channel-grid-nokey .ch-card { height: 598px; } }
574
+ /* 单列退化:窄窗口 / 移动端放开高度钳制走自然高度 */
575
+ @media (max-width: 760px) {
576
+ .channel-grid .ch-card { height: auto; min-height: 320px; }
577
+ }
578
+ /* 头部:第一行 标题 + 主开关,第二行状态徽章(窄卡也能稳定排版);固定不随内容滚动 */
579
+ .ch-card-head { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--border-soft); }
580
+ /* 内容滚动区:占满头/按钮行之间的全部空间,内容超出时上下左右滚动(不撑破统一尺寸)。
581
+ 滚动条占位但滑块默认透明,仅滚动期间(.is-scrolling,由 JS 挂载)显形,停止约 800ms 后隐藏 */
582
+ .ch-card-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding-right: 2px; scrollbar-width: thin; scrollbar-color: transparent transparent; }
583
+ .ch-card-body.is-scrolling { scrollbar-color: rgba(139, 148, 158, .35) transparent; }
584
+ .ch-card-body::-webkit-scrollbar { width: 8px; height: 8px; }
585
+ .ch-card-body::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
586
+ .ch-card-body.is-scrolling::-webkit-scrollbar-thumb { background: rgba(139, 148, 158, .28); }
587
+ .ch-card-body.is-scrolling::-webkit-scrollbar-thumb:hover { background: rgba(139, 148, 158, .45); }
588
+ .ch-card-body::-webkit-scrollbar-track { background: transparent; }
589
+ .ch-card-body > :first-child { margin-top: 0; }
590
+ .ch-card-title { grid-column: 1; grid-row: 1; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
591
+ .ch-card-title h2 { margin: 0; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; min-width: 0; word-break: break-all; }
592
+ .ch-card-title .card-sub { font-size: 11px; }
593
+ .ch-card-switch { grid-column: 2; grid-row: 1; margin-bottom: 0; justify-self: end; white-space: nowrap; }
594
+ .ch-card-badges { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
595
+ /* 启用状态点:绿=启用,灰=停用(渠道 / 提供商卡标题前) */
596
+ .ch-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px rgba(139, 148, 158, .16); flex: none; }
597
+ .ch-dot.on { background: var(--accent); box-shadow: 0 0 0 3px rgba(63, 185, 80, .18); }
598
+ /* 卡片操作区(底部按钮行):固定在卡底不随内容滚动;网格卡由 body 吃掉剩余空间,
599
+ 网格外通栏卡(无 body)保持 12px 上边距 */
600
+ .ch-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border-soft); }
601
+ .channel-grid .ch-card > .ch-card-actions { margin-top: 0; }
602
+ .ch-card-actions .btn { flex: 0 0 auto; }
603
+ .ch-card-subrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
604
+ /* 卡片内 Base URL 独占一行:输入框铺满卡宽,不再按 380px 基准留白 */
605
+ .ch-card .row { gap: 8px; }
606
+ .ch-card .row > .row-lead-wide { flex: 1 1 100%; }
607
+ /* 卡片内的账号槽行:允许换行,字段按剩余宽度伸缩(宽卡两列、窄卡逐行),避免溢出压到相邻卡片 */
608
+ .ch-card .item.slot-row { flex-wrap: wrap; row-gap: 6px; }
609
+ .ch-card .item.slot-row .slot-name,
610
+ .ch-card .item.slot-row .slot-key,
611
+ .ch-card .item.slot-row .slot-proxy { flex: 1 1 132px; min-width: 0; }
612
+ .ch-card .item.slot-row .slot-del { margin-left: 0; }
613
+ /* 卡片内账号行的操作按钮组:窄卡下允许收缩 + 折行,避免「删除」被挤出卡片 */
614
+ .ch-card .item .row-actions { flex: 1 1 auto; min-width: 0; white-space: normal; flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
615
+ /* 卡片内账号行左侧(账号名 + 徽章):允许收缩,长账号名靠 chip 折行而不是撑破卡片 */
616
+ .ch-card .item .row-lead { flex: 1 1 auto; min-width: 0; }
617
+ /* 卡片内的 chip(账号名 / 模型 ID)允许长串折行,窄卡下不撑破卡片 */
618
+ .ch-card .chip { max-width: 100%; overflow-wrap: anywhere; }
619
+ .ch-card .cp-slot-add input { min-width: 0; }
620
+ .ch-card .cp-slot-add input[data-cp-new-key] { flex: 1 1 100%; min-width: 0; }
621
+ /* 卡片里展开的模型清单 / 账号槽面板:贴住操作区,宽度受卡宽约束由表格自身横向滚动 */
622
+ .ch-card .gm-panel,
623
+ .ch-card .cp-card-slots { margin-top: 10px; }
624
+ /* 弹层(获取可用模型下拉)挂在卡片内:抬升整张卡,避免被后面的兄弟卡片盖住 */
625
+ .ch-card:has(.cp-picker-menu) { z-index: 40; }
626
+
627
+ /* ── 免密渠道卡片(nk-card):卡片三行式结构 ─────────────────────────────
628
+ 标题行(圆点 + 官方图标 + 名称 + 内置标签 + 启停)
629
+ / 按钮行(账号槽 / 添加槽 / 注册 / 获取可用模型 / 保存 + 右侧统计)
630
+ / 内容行(可用模型列表,每行一个模型,超出卡内滚动)。
631
+ 每渠道一个品牌色调(调研自官方 favicon 实测主色 / 官方 glyph 填色 / 官网 logo):
632
+ Kilo = 官网 favicon 黄 #FFDD00;OpenCode = 官网黑白字标石墨灰 #8B949E(logo 黑底 #131010,暗色主题下提亮为石墨灰)。
633
+ 未收录品牌色的自定义渠道兜底用中性灰。 */
634
+ .nk-card { --ch-accent: #6e7681; --ch-accent-soft: rgba(110, 118, 129, .16); --ch-accent-text: #fff; }
635
+ .nk-card[data-channel="kilo"] { --ch-accent: #ffdd00; --ch-accent-soft: rgba(255, 221, 0, .13); --ch-accent-text: #141414; }
636
+ .nk-card[data-channel="opencode"] { --ch-accent: #8b949e; --ch-accent-soft: rgba(139, 148, 158, .18); --ch-accent-text: #131010; }
637
+ /* ── 转发渠道品牌色(各取官方 App / 官网 / 图标最具辨识度的主色)──────────
638
+ TRAE 蓝 #3C7EFF;Cline 靛 #6366F1;腾讯 CodeBuddy/WorkBuddy 国 #0052D9;
639
+ WorkBuddy 国际 青 #00B8D9;Qoder 紫 #6D5BFF;商汤红 #CE0E2D;
640
+ MiniMax 珊瑚红 #F25749;有道蓝 #1E7BE8;Gemini 蓝 #4285F4;讯飞蓝 #1571F2;
641
+ Kimi 蓝 #1F6BFF;百度 Comate 蓝 #2932E1;小米橙 #FF6900;华为红 #CF0A2C;
642
+ 智谱 ZCode 蓝 #3859FF / Z.ai 蓝 #0057FF;Freebuff 绿 #10B981;
643
+ 美团黄 #FFC300 / 妙手 #FFD100(深字保证可读);豆包蓝 #4E6EF2;京东红 #E1251B。 */
644
+ .nk-card[data-channel="trae"] { --ch-accent: #3c7eff; --ch-accent-soft: rgba(60, 126, 255, .15); --ch-accent-text: #fff; }
645
+ .nk-card[data-channel="cline"] { --ch-accent: #6366f1; --ch-accent-soft: rgba(99, 102, 241, .16); --ch-accent-text: #fff; }
646
+ .nk-card[data-channel="workbuddy-cn"] { --ch-accent: #0052d9; --ch-accent-soft: rgba(0, 82, 217, .18); --ch-accent-text: #fff; }
647
+ .nk-card[data-channel="workbuddy-ai"] { --ch-accent: #00b8d9; --ch-accent-soft: rgba(0, 184, 217, .15); --ch-accent-text: #fff; }
648
+ .nk-card[data-channel="qoder"] { --ch-accent: #6d5bff; --ch-accent-soft: rgba(109, 91, 255, .15); --ch-accent-text: #fff; }
649
+ .nk-card[data-channel="qodercn"] { --ch-accent: #6d5bff; --ch-accent-soft: rgba(109, 91, 255, .15); --ch-accent-text: #fff; }
650
+ .nk-card[data-channel="raccoon"] { --ch-accent: #ce0e2d; --ch-accent-soft: rgba(206, 14, 45, .18); --ch-accent-text: #fff; }
651
+ .nk-card[data-channel="minimax"] { --ch-accent: #f25749; --ch-accent-soft: rgba(242, 87, 73, .16); --ch-accent-text: #fff; }
652
+ .nk-card[data-channel="lobsterai"] { --ch-accent: #1e7be8; --ch-accent-soft: rgba(30, 123, 232, .16); --ch-accent-text: #fff; }
653
+ .nk-card[data-channel="gemini"] { --ch-accent: #4285f4; --ch-accent-soft: rgba(66, 133, 244, .16); --ch-accent-text: #fff; }
654
+ .nk-card[data-channel="loomy"] { --ch-accent: #1571f2; --ch-accent-soft: rgba(21, 113, 242, .16); --ch-accent-text: #fff; }
655
+ .nk-card[data-channel="kimi"] { --ch-accent: #1f6bff; --ch-accent-soft: rgba(31, 107, 255, .16); --ch-accent-text: #fff; }
656
+ .nk-card[data-channel="comate"] { --ch-accent: #2932e1; --ch-accent-soft: rgba(41, 50, 225, .16); --ch-accent-text: #fff; }
657
+ .nk-card[data-channel="mimo"] { --ch-accent: #ff6900; --ch-accent-soft: rgba(255, 105, 0, .16); --ch-accent-text: #fff; }
658
+ .nk-card[data-channel="codearts"] { --ch-accent: #cf0a2c; --ch-accent-soft: rgba(207, 10, 44, .18); --ch-accent-text: #fff; }
659
+ .nk-card[data-channel="zcode"] { --ch-accent: #3859ff; --ch-accent-soft: rgba(56, 89, 255, .16); --ch-accent-text: #fff; }
660
+ .nk-card[data-channel="zcode-global"] { --ch-accent: #0057ff; --ch-accent-soft: rgba(0, 87, 255, .16); --ch-accent-text: #fff; }
661
+ .nk-card[data-channel="codebuff"] { --ch-accent: #10b981; --ch-accent-soft: rgba(16, 185, 129, .16); --ch-accent-text: #fff; }
662
+ .nk-card[data-channel="tabbit"] { --ch-accent: #ffc300; --ch-accent-soft: rgba(255, 195, 0, .16); --ch-accent-text: #1f2328; }
663
+ .nk-card[data-channel="doubaowork"] { --ch-accent: #4e6ef2; --ch-accent-soft: rgba(78, 110, 242, .16); --ch-accent-text: #fff; }
664
+ .nk-card[data-channel="miaoshou"] { --ch-accent: #ffd100; --ch-accent-soft: rgba(255, 209, 0, .16); --ch-accent-text: #1f2328; }
665
+ .nk-card[data-channel="joycode"] { --ch-accent: #e1251b; --ch-accent-soft: rgba(225, 37, 27, .18); --ch-accent-text: #fff; }
666
+ /* ── 免费渠道品牌色(调研自官方 favicon 实测主色 / 官方 glyph 填色 / 官网 logo)────
667
+ AMD Radeon 红 #ED1C24(官方黑字标,Radeon Token Factory 主色);
668
+ SenseNova 蓝 #3F71CF(favicon 实测);Intern-ai 蓝 #4A78E8(logoIcon 深蓝提亮);
669
+ Dots 红粉 #FF3B56(favicon 实测);NVIDIA 官方绿 #76B900;
670
+ OpenRouter 紫 #7624F4(官方 glyph 填色);LongCat 绿 #29E154(官方 yeqian logo,深字保证可读);
671
+ ModelScope 紫 #7A67FF(favicon 实测);Agnes 黑灰 #6E7681(官方黑白字标)。 */
672
+ .nk-card[data-channel="amd"] { --ch-accent: #ed1c24; --ch-accent-soft: rgba(237, 28, 36, .16); --ch-accent-text: #fff; }
673
+ .nk-card[data-channel="sensenova"] { --ch-accent: #3f71cf; --ch-accent-soft: rgba(63, 113, 207, .16); --ch-accent-text: #fff; }
674
+ .nk-card[data-channel="intern-ai"] { --ch-accent: #4a78e8; --ch-accent-soft: rgba(74, 120, 232, .16); --ch-accent-text: #fff; }
675
+ .nk-card[data-channel="dots-ai"] { --ch-accent: #ff3b56; --ch-accent-soft: rgba(255, 59, 86, .16); --ch-accent-text: #fff; }
676
+ .nk-card[data-channel="nvidia"] { --ch-accent: #76b900; --ch-accent-soft: rgba(118, 185, 0, .18); --ch-accent-text: #141414; }
677
+ .nk-card[data-channel="openrouter"] { --ch-accent: #7624f4; --ch-accent-soft: rgba(118, 36, 244, .16); --ch-accent-text: #fff; }
678
+ .nk-card[data-channel="longcat"] { --ch-accent: #29e154; --ch-accent-soft: rgba(41, 225, 84, .16); --ch-accent-text: #0f2b16; }
679
+ .nk-card[data-channel="modelscope"] { --ch-accent: #7a67ff; --ch-accent-soft: rgba(122, 103, 255, .16); --ch-accent-text: #fff; }
680
+ /* 品牌色用于卡片区域:卡片底保持中性深色,只留「左上角一抹品牌氛围光 + 顶部品牌发丝轨 +
681
+ 品牌色混入描边」三处克制的品牌信号 —— 十几张卡同屏时不至于变成彩色拼贴,正文对比度也更稳。
682
+ 内嵌区域用 --nk-inner-bg(卡内再压暗一层)方便区分;启用圆点固定绿 / 停用灰(见 .ch-dot) */
683
+ .nk-card {
684
+ --nk-inner-bg: color-mix(in srgb, var(--ch-accent) 4%, var(--bg));
685
+ background:
686
+ radial-gradient(420px 160px at 12% -14%, color-mix(in srgb, var(--ch-accent) 10%, transparent), transparent 70%),
687
+ linear-gradient(180deg, #171d25, var(--panel) 55%);
688
+ border-color: color-mix(in srgb, var(--ch-accent) 16%, var(--border));
689
+ box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
690
+ }
691
+ /* 卡片顶部品牌轨:贴合上边框(覆盖 1px 边框,避免双层描边错位)。
692
+ 形状为左右对称的梭形(clip-path 菱形):左端细尖 → 向中心渐粗 → 中心最厚 →
693
+ 向右渐细 → 右端收尖消失;颜色同步由淡入深、再由深转淡,两端与卡面融掉。
694
+ 菱形左右尖点内缩 6px,落在卡片 14px 圆角之外,避免尖端溢出圆角外侧 */
695
+ .nk-card::before {
696
+ content: '';
697
+ position: absolute;
698
+ top: -1px; left: 0; right: 0;
699
+ height: 6px;
700
+ background: linear-gradient(90deg,
701
+ color-mix(in srgb, var(--ch-accent) 32%, transparent) 0%,
702
+ var(--ch-accent) 44%,
703
+ color-mix(in srgb, var(--ch-accent) 26%, transparent) 82%,
704
+ transparent 100%);
705
+ clip-path: polygon(6px 50%, 50% 0, calc(100% - 6px) 50%, 50% 100%);
706
+ pointer-events: none;
707
+ }
708
+ .nk-card .btn.primary { background: var(--ch-accent-soft); border-color: var(--ch-accent); color: var(--ch-accent-text); }
709
+ .nk-card .btn.primary:hover { background: var(--ch-accent); color: var(--ch-accent-text); }
710
+ /* 标题行(第一行):圆点 / 官方图标 / 名称 / 内置标签 / 模型数量 + 右侧启停,恒为单行。
711
+ 不换行:超长渠道名用省略号收缩(h2 带 title 悬停看全名),保证卡头高度恒定、
712
+ 模型清单始终完整露出 10 行;底部一道品牌淡染发丝线把标题行与按钮行切开 */
713
+ .nk-head {
714
+ display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0;
715
+ margin-bottom: 12px; padding-bottom: 10px;
716
+ border-bottom: 1px solid color-mix(in srgb, var(--ch-accent) 11%, var(--border-soft));
717
+ }
718
+ .nk-head .ch-logo {
719
+ /* 裸 logo 方案:不再套徽片容器(无边框、无底色),图标 28px 原样展示 —— 尺寸即突出;
720
+ 品牌色 drop-shadow 沿图标 alpha 形状打一圈光晕,深色 logo 在暗卡上也被托出来 */
721
+ flex: none; display: block; width: 28px; height: 28px; padding: 0; box-sizing: border-box;
722
+ border-radius: 7px;
723
+ filter:
724
+ drop-shadow(0 1px 3px rgba(0, 0, 0, .5))
725
+ drop-shadow(0 0 9px color-mix(in srgb, var(--ch-accent) 42%, transparent));
726
+ }
727
+ /* 渠道名:只占自身宽度(超长可收缩),让「内置 / 模型 N」紧贴名称右侧;
728
+ 名称优先于徽片收缩,h2 带 title 悬停看全名 */
729
+ .nk-head h2 { flex: 0 1 auto; margin: 0; font-size: 16px; font-weight: 680; letter-spacing: .2px; white-space: nowrap; min-width: 40px; overflow: hidden; text-overflow: ellipsis; }
730
+ .nk-head .card-sub { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
731
+ /* 渠道名右侧的模型数量:字号更小、等宽数字,弱于名称但可一眼扫到 */
732
+ .nk-head .nk-model-count { flex: none; white-space: nowrap; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
733
+ .nk-head .badge { border-color: transparent; }
734
+ /* 「内置 / 自定义」小徽片:真 chip 形状(描边圆角),不再是裸文字 */
735
+ .nk-head .nk-builtin {
736
+ flex: none; padding: 1px 7px; font-size: 11px; letter-spacing: .4px;
737
+ color: var(--muted); border: 1px solid var(--border); border-radius: 6px; background: transparent;
738
+ }
739
+ /* 渠道名被压缩到极限时(如超长英文名),徽片与数量先让位,保证卡头单行 */
740
+ .nk-head .ch-repo { flex: none; }
741
+ /* 启停开关收成一枚胶囊控件:贴卡右缘(margin-left:auto),状态统一用全局绿 ——
742
+ 启用=绿勾 + 淡绿胶囊;停用=灰勾 + 中性描边,不随渠道品牌色变化 */
743
+ .nk-head .nk-switch {
744
+ margin-left: auto; margin-bottom: 0; white-space: nowrap;
745
+ padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 12px; gap: 5px;
746
+ color: var(--text);
747
+ border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
748
+ background: color-mix(in srgb, var(--accent) 9%, transparent);
749
+ transition: border-color .15s, background .15s, color .15s;
750
+ }
751
+ .nk-head .nk-switch:hover { border-color: color-mix(in srgb, var(--accent) 52%, var(--border)); background: color-mix(in srgb, var(--accent) 15%, transparent); }
752
+ /* 停用态回到中性灰:灰勾 + 无底色 */
753
+ .nk-head .nk-switch:has(input:not(:checked)) { border-color: var(--border); background: transparent; color: var(--muted); }
754
+ .nk-head .nk-switch:has(input:not(:checked)):hover { border-color: var(--border-soft); background: var(--panel-2); color: var(--text); }
755
+ .nk-head .nk-switch input[type="checkbox"] { width: 13px; height: 13px; margin: 0; accent-color: var(--accent); }
756
+ /* 按钮行(第二行):账号槽 / 添加槽 / 探测 / 获取可用模型;窄卡折行不溢出。
757
+ 幽灵按钮:透明底无边框,静息态比纯灰再亮一档(可读性),悬停显形为品牌淡染浮层 */
758
+ .nk-btnrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 5px; margin-bottom: 12px; }
759
+ .nk-btnrow .btn, .nk-btnrow .btn.small { flex: 0 0 auto; padding: 4px 7px; background: transparent; border-color: transparent; color: color-mix(in srgb, var(--muted) 55%, var(--text)); border-radius: 8px; transition: background .14s, border-color .14s, color .14s; }
760
+ .nk-btnrow .btn:hover { background: var(--ch-accent-soft); border-color: color-mix(in srgb, var(--ch-accent) 36%, var(--border)); color: var(--text); }
761
+ /* 危险操作(删除)保持红色语义,不被上面的通用颜色覆盖 */
762
+ .nk-btnrow .btn.danger { color: var(--err); }
763
+ .nk-btnrow .cp-anchor { flex: 0 0 auto; }
764
+ /* 主行动「获取可用模型」常驻品牌淡染底:卡内唯一需要先点的动作,给一点引导而不抢标题权重 */
765
+ .nk-btnrow .cp-anchor .btn {
766
+ color: color-mix(in srgb, var(--ch-accent) 42%, var(--text));
767
+ background: color-mix(in srgb, var(--ch-accent) 8%, transparent);
768
+ border-color: color-mix(in srgb, var(--ch-accent) 18%, var(--border));
769
+ }
770
+ .nk-btnrow .cp-anchor .btn:hover { background: var(--ch-accent-soft); border-color: color-mix(in srgb, var(--ch-accent) 46%, var(--border)); color: var(--text); }
771
+ /* 模型清单面板:固定高度 = 恰好 10 行(32px × 10 + 行间距 2px × 9 = 338px)+ 上下内边距 + 边框 = 364px,
772
+ 模型少于 10 个也保持同样高度;多于 10 个在面板内滚动,卡头 / 说明 / 账号槽不跟着滚 */
773
+ .nk-inner {
774
+ display: flex;
775
+ flex-direction: column;
776
+ width: 100%;
777
+ height: 364px;
778
+ margin-top: 10px;
779
+ padding: 12px;
780
+ background: var(--nk-inner-bg);
781
+ border: 1px solid color-mix(in srgb, var(--ch-accent) 10%, var(--border-soft));
782
+ border-radius: 12px;
783
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
784
+ }
785
+ /* 内容行:可用模型列表,每行一个模型(统一格式:序号/ID/上下文/倍率/状态/操作)。
786
+ 列表面板内滚动:固定占据 10 行高度,超出滚动(滚动条与卡内容区同样「滚动时显形」) */
787
+ .nk-models {
788
+ flex: 1 1 auto; min-height: 0;
789
+ display: flex; flex-direction: column; gap: 2px;
790
+ overflow-y: auto; overflow-x: hidden;
791
+ overscroll-behavior: contain;
792
+ padding-right: 2px;
793
+ scrollbar-width: thin; scrollbar-color: transparent transparent;
794
+ }
795
+ .nk-models.is-scrolling { scrollbar-color: rgba(139, 148, 158, .35) transparent; }
796
+ .nk-models::-webkit-scrollbar { width: 8px; }
797
+ .nk-models::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
798
+ .nk-models.is-scrolling::-webkit-scrollbar-thumb { background: rgba(139, 148, 158, .28); }
799
+ .nk-models::-webkit-scrollbar-track { background: transparent; }
800
+ /* 统一模型行:固定 32px 高(10 行 = 320px,配合 2px 行间距让清单面板高度可精确计算);
801
+ 每行强制单行不换行(序号 + ID + 上下文 + 倍率 + 状态 + 操作恒在同一行);
802
+ 各列紧凑排布,保证整行落在卡片可视宽度内(Cline 等长 ID 渠道不放横向滚动);
803
+ 模型 ID 为唯一可收缩列,放不下时省略号截断,悬停看 title 全称 */
804
+ .nk-model-line { position: relative; flex: none; display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 4px; min-width: 0; height: 32px; padding: 0 7px; border-radius: 8px; transition: background .12s; }
805
+ /* 行悬停:品牌色淡染浮层(与卡的品牌基调呼应),不用重底色 */
806
+ .nk-model-line:hover { background: color-mix(in srgb, var(--ch-accent) 10%, transparent); }
807
+ /* 模型行内的等宽文本(ID / 上下文 / 倍率)去掉全局 .mono 的深色 chip 底与内边距:
808
+ 整行只保留一层悬停底色,不再一节一节地出现色块;序号徽标 .nk-idx 保留自己的品牌底 */
809
+ .nk-model-line .mono:not(.nk-idx) { background: none; padding: 0; border-radius: 0; }
810
+ /* 序号:圆角小方块徽标(品牌淡染底,弱化存在感又与卡片基调一致) */
811
+ .nk-idx {
812
+ flex: none; min-width: 20px; height: 19px; padding: 0 4px;
813
+ display: inline-flex; align-items: center; justify-content: center;
814
+ border-radius: 6px; background: var(--ch-accent-soft);
815
+ color: color-mix(in srgb, var(--ch-accent) 55%, var(--text));
816
+ font-size: 11px; font-variant-numeric: tabular-nums;
817
+ }
818
+ /* 模型 ID:唯一可伸缩列(basis 0 + grow 1),先吃满整行剩余宽度,再把上下文 / 倍率 / 状态顶到右侧;
819
+ 放不下时省略号收缩(悬停 title 看全 ID);保底 90px 保证可读 */
820
+ .nk-id { flex: 1 1 0; min-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
821
+ /* 统一模型行的上下文 / 倍率列:最小宽度右对齐,三页卡片(免密 / 免费 / 转发)列位一致;
822
+ 最小宽度按最长常见内容收敛(7 位数字 / x3→x1.5);超长值(如 x0.12→x0.06、$2/M→$1/M)
823
+ 拥挤时省略号收缩到下限,不再把整行顶出卡片 */
824
+ .nk-ctx { flex: 0 1 auto; min-width: 46px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
825
+ .nk-rate { flex: 0 1 auto; min-width: 44px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
826
+ /* 状态徽章列按内容定宽,不参与收缩:避免「可用 1439s」这类徽章被挤压截断成「可用 79」 */
827
+ .nk-health { flex: 0 0 auto; min-width: 0; overflow: hidden; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
828
+ /* 状态徽章紧凑化:小一号 + 收窄内边距,给 ID 列让出宽度 */
829
+ .nk-health .badge { padding: 1px 6px; font-size: 10.5px; line-height: 14px; }
830
+ /* 中性态(未测 / 未探测)直接隐藏:缺省即未测,无信息量却各占 ~45px;
831
+ 只有产生真实状态(正常/异常/冷却/探测中/可用/判死/未知)才显示徽章 */
832
+ .nk-health .badge:not(.ok):not(.err):not(.cool):not(.pro) { display: none; }
833
+ /* 行尾操作按钮:绝对定位成悬停浮层,静息态不占列宽 —— 模型 ID 因此能吃满整行剩余宽度;
834
+ 悬停 / 键盘聚焦行时淡入,右侧带一层与卡面同色的渐隐底,盖住下方文字不糊在一起 */
835
+ .nk-model-line .row-actions {
836
+ position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
837
+ display: inline-flex; gap: 3px; margin: 0;
838
+ padding: 2px 2px 2px 16px; border-radius: 999px;
839
+ background: linear-gradient(90deg, transparent 0, color-mix(in srgb, var(--ch-accent) 9%, var(--panel)) 16px);
840
+ opacity: 0; pointer-events: none; transition: opacity .12s;
841
+ }
842
+ .nk-model-line:hover .row-actions,
843
+ .nk-model-line:focus-within .row-actions { opacity: 1; pointer-events: auto; }
844
+ .nk-model-line .row-actions .btn { background: transparent; border-color: transparent; color: var(--muted); padding: 2px 7px; font-size: 11px; }
845
+ .nk-model-line:hover .row-actions .btn { color: var(--text); }
846
+ .nk-model-line .row-actions .btn:hover { background: var(--panel-3); border-color: var(--border); }
847
+ /* 空态:虚线内嵌容器,让「还没有模型」的卡片看起来是待填充而不是渲染坏了;
848
+ 在面板里撑满 10 行高度,零模型的卡与满模型的卡视觉尺寸一致 */
849
+ .nk-empty {
850
+ padding: 18px 12px; text-align: center;
851
+ border: 1px dashed color-mix(in srgb, var(--ch-accent) 18%, var(--border));
852
+ border-radius: 10px;
853
+ background: color-mix(in srgb, var(--ch-accent) 3%, transparent);
854
+ }
855
+ .nk-inner > .nk-empty { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; }
856
+ /* 内容区里说明文字 + Base URL 同一行:说明占主宽,Base URL 只读展示(code + 复制按钮),窄卡自动折行 */
857
+ .nk-infoline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 8px; }
858
+ .nk-card .nk-hint { margin: 0; flex: 1 1 220px; min-width: 0; }
859
+ .nk-card .nk-baseurl { display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; max-width: 100%; margin: 0; }
860
+ .nk-card .nk-baseurl label { color: var(--muted); font-size: 12px; white-space: nowrap; flex: none; }
861
+ .nk-card .nk-baseurl code {
862
+ flex: 0 1 auto; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px;
863
+ padding: 2px 8px; border-radius: 6px;
864
+ background: color-mix(in srgb, var(--ch-accent) 8%, var(--bg));
865
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ch-accent) 16%, var(--border));
866
+ }
867
+ .nk-card .nk-baseurl input { width: 240px; min-width: 0; font-size: 12px; padding: 3px 6px; }
868
+ /* 免费渠道卡里 Base URL 独占一行:整组铺满卡宽,超长 URL 在码片内省略号截断 */
869
+ .nk-infoline > .nk-baseurl:only-child { flex: 1 1 auto; }
870
+ .nk-infoline > .nk-baseurl:only-child code { flex: 1 1 auto; }
871
+ .nk-card .nk-baseurl .btn { flex: none; }
872
+ .nk-card .row { margin-bottom: 8px; }
873
+ /* 账号槽面板(点「账号槽」展开):面板化容器(与 nk-inner 同款深一层面板 + 品牌发丝描边),每账号一行 */
874
+ .nk-card .nk-slots { margin: 0 0 10px; padding: 12px; background: var(--nk-inner-bg); border: 1px solid color-mix(in srgb, var(--ch-accent) 13%, var(--border-soft)); border-radius: 12px; }
875
+ .nk-card .nk-slots[hidden] { display: none; }
876
+ /* 免费渠道卡的账号槽面板(cp-card-slots)与免密页 nk-slots 同款面板化外观 */
877
+ .nk-card .cp-card-slots { margin: 0 0 10px; padding: 12px; background: var(--nk-inner-bg); border: 1px solid color-mix(in srgb, var(--ch-accent) 13%, var(--border-soft)); border-radius: 12px; }
878
+ .nk-card .cp-card-slots[hidden] { display: none; }
879
+ /* 账号槽行不容许换行(每账号恒为一行):字段排不下时面板按 min-content 撑宽、
880
+ 由卡片内容区横向滚动兜底(面板 width:fit-content,可用宽度足够时行内字段照常收缩铺满) */
881
+ .nk-card .item.slot-row { flex-wrap: nowrap; row-gap: 0; }
882
+ /* 面板内的账号槽行:去边框去底色,悬停品牌淡染浮层(与模型行悬停一致),不再「盒中盒」 */
883
+ .nk-card .nk-slots .item.slot-row,
884
+ .nk-card .cp-card-slots .item.slot-row { background: transparent; border-color: transparent; transition: background .12s; }
885
+ .nk-card .nk-slots .item.slot-row:hover,
886
+ .nk-card .cp-card-slots .item.slot-row:hover { background: color-mix(in srgb, var(--ch-accent) 8%, transparent); }
887
+ /* 转发渠道账号行:面板内不再套一层实底盒子(避免「盒中盒」),改为极淡浮层 + 发丝描边 */
888
+ .nk-card .nk-slots .item:not(.slot-row) {
889
+ background: color-mix(in srgb, var(--panel-2) 42%, transparent);
890
+ border-color: var(--border-soft);
891
+ padding: 10px 12px;
892
+ }
893
+ .nk-card .nk-slots, .nk-card .cp-card-slots { width: fit-content; min-width: 100%; }
894
+ /* Base URL 行允许折行,避免长域名把内容区撑出无意义的横向滚动 */
895
+ .nk-card .meta { overflow-wrap: anywhere; margin-bottom: 8px; }
896
+
897
+ /* ── 桌面端自动升级 UI(DOM 仅在 Electron 桌面端由 app.js 注入;Web 端不存在) ── */
898
+ .omr-update-wrap { position: relative; flex: none; display: flex; align-items: center; }
899
+ .omr-update-wrap[hidden] { display: none; }
900
+ /* 升级入口照 magpie 头部的 Update 胶囊:22px 高、accent 半透明底、悬停变实心 */
901
+ .omr-update-btn {
902
+ display: inline-flex;
903
+ align-items: center;
904
+ justify-content: center;
905
+ gap: 4px;
906
+ max-width: 20em;
907
+ overflow: hidden;
908
+ height: 22px;
909
+ padding: 0 9px 0 7px;
910
+ border: 0;
911
+ border-radius: 999px;
912
+ font-family: inherit;
913
+ font-size: 11.5px;
914
+ font-weight: 560;
915
+ letter-spacing: .005em;
916
+ white-space: nowrap;
917
+ color: var(--accent-2);
918
+ background: rgba(88, 166, 255, .14);
919
+ box-shadow: inset 0 0 0 .5px rgba(88, 166, 255, .35);
920
+ cursor: pointer;
921
+ transition: background .15s, color .15s, transform .12s cubic-bezier(.22, .7, .3, 1), opacity .15s;
922
+ animation: omr-update-in .3s cubic-bezier(.22, .7, .3, 1);
923
+ }
924
+ .omr-update-btn:hover { background: var(--accent-2); color: var(--bg); }
925
+ .omr-update-btn:active { transform: scale(.96); }
926
+ /* 下载/重启中:照 magpie 置灰且不再响应点击,文字改为进度 */
927
+ .omr-update-btn.busy { pointer-events: none; opacity: .6; }
928
+ .omr-update-btn svg { width: 11px; height: 11px; display: block; flex: none; }
929
+ .omr-update-label { overflow: hidden; text-overflow: ellipsis; }
930
+ @keyframes omr-update-in { from { opacity: 0; max-width: 0; padding: 0; } }
931
+ /* 下拉面板:绝对定位在图标下方,z-index 高于 sticky nav(z-index:5) */
932
+ /* header 有 backdrop-filter 会生成独立层叠上下文,必须让 header 本身压过 nav,
933
+ 否则面板即使 z-index 更高也会被 sticky nav 拦截点击。 */
934
+ header { position: relative; z-index: 6; }
935
+ .omr-update-panel {
936
+ position: absolute;
937
+ top: calc(100% + 8px);
938
+ right: 0;
939
+ z-index: 30;
940
+ width: max-content;
941
+ min-width: 200px;
942
+ max-width: 300px;
943
+ padding: 12px;
944
+ background: var(--panel);
945
+ border: 1px solid var(--border);
946
+ border-radius: var(--radius);
947
+ box-shadow: var(--shadow);
948
+ display: flex;
949
+ flex-direction: column;
950
+ gap: 8px;
951
+ }
952
+ .omr-update-panel[hidden] { display: none; }
953
+ .omr-update-panel .btn { align-self: flex-end; }
954
+ .omr-update-title { font-size: 13px; font-weight: 600; }
955
+ .omr-update-title.err { color: var(--err); }
956
+ .omr-update-line { font-size: 12px; color: var(--muted); word-break: break-all; }
957
+ .omr-update-line.err { color: var(--err); }
958
+ /* 进度条:纯 CSS width 驱动,事件推送刷新内联 style */
959
+ .omr-update-progress {
960
+ height: 6px;
961
+ border-radius: 3px;
962
+ background: var(--panel-3);
963
+ border: 1px solid var(--border-soft);
964
+ overflow: hidden;
965
+ }
966
+ .omr-update-progress i {
967
+ display: block;
968
+ height: 100%;
969
+ background: linear-gradient(90deg, var(--accent-2), var(--accent-3));
970
+ transition: width .25s;
971
+ }