-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
478 lines (467 loc) · 26.7 KB
/
popup.html
File metadata and controls
478 lines (467 loc) · 26.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
:root {
--sc-bg:#11111b;--sc-surface:#1e1e2e;--sc-overlay:#313244;
--sc-text:#cdd6f4;--sc-subtext:#bac2de;--sc-muted:#585b70;--sc-faint:#45475a;
--sc-accent:#cba6f7;--sc-accent-dim:rgba(203,166,247,0.08);--sc-accent-med:rgba(203,166,247,0.15);
--sc-blue:#89b4fa;--sc-green:#a6e3a1;--sc-red:#f38ba8;--sc-pink:#f5c2e7;
--sc-yellow:#f9e2af;--sc-peach:#fab387;
--sc-border:rgba(203,166,247,0.08);--sc-border-h:rgba(203,166,247,0.15);
--sc-input-bg:rgba(17,17,27,0.7);--sc-input-border:rgba(203,166,247,0.1);
--sc-code-fg:#f5c2e7;--sc-toggle-bg:rgba(69,71,90,0.6);--sc-toggle-on:rgba(203,166,247,0.5);
--sc-shadow:rgba(0,0,0,0.3);--sc-glass:rgba(30,30,46,0.8);
--sc-grad-start:#1e1e2e;--sc-grad-end:rgba(30,30,46,0);
--sc-scrollbar-thumb:rgba(203,166,247,0.2);--sc-scrollbar-thumb-h:rgba(203,166,247,0.35);
}
html.sc-dark {
--sc-bg:#000000;--sc-surface:#0a0a0f;--sc-overlay:#16161e;
--sc-text:#c0caf5;--sc-subtext:#a9b1d6;--sc-muted:#565f89;--sc-faint:#3b3f5c;
--sc-accent:#7aa2f7;--sc-accent-dim:rgba(122,162,247,0.08);--sc-accent-med:rgba(122,162,247,0.15);
--sc-blue:#7aa2f7;--sc-green:#9ece6a;--sc-red:#f7768e;--sc-pink:#bb9af7;
--sc-yellow:#e0af68;--sc-peach:#ff9e64;
--sc-border:rgba(122,162,247,0.06);--sc-border-h:rgba(122,162,247,0.12);
--sc-input-bg:rgba(0,0,0,0.7);--sc-input-border:rgba(122,162,247,0.1);
--sc-code-fg:#bb9af7;--sc-toggle-bg:rgba(86,95,137,0.4);--sc-toggle-on:rgba(122,162,247,0.5);
--sc-shadow:rgba(0,0,0,0.6);--sc-glass:rgba(10,10,15,0.9);
--sc-grad-start:#0a0a0f;--sc-grad-end:rgba(10,10,15,0);
--sc-scrollbar-thumb:rgba(122,162,247,0.2);--sc-scrollbar-thumb-h:rgba(122,162,247,0.35);
}
html.sc-light {
--sc-bg:#eff1f5;--sc-surface:#ffffff;--sc-overlay:#dce0e8;
--sc-text:#4c4f69;--sc-subtext:#5c5f77;--sc-muted:#8c8fa1;--sc-faint:#bcc0cc;
--sc-accent:#8839ef;--sc-accent-dim:rgba(136,57,239,0.06);--sc-accent-med:rgba(136,57,239,0.12);
--sc-blue:#1e66f5;--sc-green:#40a02b;--sc-red:#d20f39;--sc-pink:#ea76cb;
--sc-yellow:#df8e1d;--sc-peach:#fe640b;
--sc-border:rgba(136,57,239,0.1);--sc-border-h:rgba(136,57,239,0.2);
--sc-input-bg:rgba(239,241,245,0.9);--sc-input-border:rgba(136,57,239,0.15);
--sc-code-fg:#8839ef;--sc-toggle-bg:rgba(140,143,161,0.3);--sc-toggle-on:rgba(136,57,239,0.4);
--sc-shadow:rgba(0,0,0,0.08);--sc-glass:rgba(255,255,255,0.9);
--sc-grad-start:#ffffff;--sc-grad-end:rgba(255,255,255,0);
--sc-scrollbar-thumb:rgba(136,57,239,0.15);--sc-scrollbar-thumb-h:rgba(136,57,239,0.25);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
width: 420px; min-height: 200px; max-height: 600px; margin: 0;
background: linear-gradient(168deg, var(--sc-surface) 0%, var(--sc-bg) 40%, color-mix(in srgb, var(--sc-accent) 3%, var(--sc-bg)) 100%);
color: var(--sc-text); font-family: system-ui, -apple-system, sans-serif;
font-size: 13px; overflow-y: auto;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: color-mix(in srgb, var(--sc-bg) 80%, transparent); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: var(--sc-scrollbar-thumb); border-radius: 3px; transition: background 0.2s; }
::-webkit-scrollbar-thumb:hover { background: var(--sc-accent); box-shadow: 0 0 6px var(--sc-accent); }
.header {
padding: 10px 16px 8px;
border-bottom: 1px solid var(--sc-border);
background: linear-gradient(180deg, color-mix(in srgb, var(--sc-accent) 4%, var(--sc-surface)) 0%, transparent 100%);
position: relative;
}
.header::after {
content:''; position:absolute; bottom:0; left:16px; right:16px; height:1px;
background:linear-gradient(90deg, transparent, var(--sc-accent), transparent); opacity:0.2;
}
.header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.logo {
font-size: 16px; font-weight: 800; letter-spacing: -0.3px;
background: linear-gradient(135deg, var(--sc-accent), var(--sc-blue), var(--sc-pink), var(--sc-accent));
background-size: 300% 300%; animation: gradientShift 6s ease infinite;
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
filter: drop-shadow(0 0 8px color-mix(in srgb, var(--sc-accent) 30%, transparent));
}
.version {
font-size: 8px; color: var(--sc-accent); font-weight: 700; letter-spacing: 0.5px;
padding: 1px 6px; border-radius: 6px;
background: var(--sc-accent-dim); border: 1px solid color-mix(in srgb, var(--sc-accent) 15%, transparent);
}
.domain-row { display: flex; align-items: center; gap: 8px; }
.domain-text {
flex: 1; font-size: 12px; color: var(--sc-blue);
font-family: 'SFMono-Regular','Cascadia Code','Consolas','Liberation Mono','Menlo',monospace;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.toggle { position: relative; width: 36px; height: 18px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-sl {
position: absolute; inset: 0; cursor: pointer;
background: rgba(69,71,90,0.6); border-radius: 9px; transition: all 0.2s;
}
.toggle-sl::before {
content: ''; position: absolute; left: 2px; top: 2px;
width: 14px; height: 14px; background: var(--sc-text);
border-radius: 50%; transition: transform 0.2s;
}
.toggle input:checked + .toggle-sl { background: rgba(203,166,247,0.5); box-shadow: 0 0 10px rgba(203,166,247,0.3); }
.toggle input:checked + .toggle-sl::before { transform: translateX(18px); background: var(--sc-accent); box-shadow: 0 0 6px var(--sc-accent); }
.no-styles { font-size: 10px; color: var(--sc-muted); margin-top: 2px; padding: 6px 14px; display: none; animation: fadeSlideIn 0.3s ease-out; }
.style-count {
font-size: 10px; color: var(--sc-green); margin-top: 2px; font-weight: 600;
text-shadow: 0 0 8px color-mix(in srgb, var(--sc-green) 25%, transparent);
}
.actions {
padding: 6px 14px; display: flex; flex-wrap: wrap; gap: 4px;
border-bottom: 1px solid rgba(203,166,247,0.06);
}
.btn {
flex: 1; min-width: calc(50% - 2px); height: 28px; border-radius: 6px;
background: color-mix(in srgb, var(--sc-accent) 5%, var(--sc-surface));
border: 1px solid var(--sc-input-border);
color: var(--sc-subtext); cursor: pointer; font-size: 10px; font-weight: 600;
display: flex; align-items: center; justify-content: center; gap: 4px;
transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
backdrop-filter: blur(4px);
}
.btn:hover {
background: var(--sc-accent-med); color: var(--sc-accent);
border-color: color-mix(in srgb, var(--sc-accent) 20%, transparent);
transform: translateY(-1px);
box-shadow: 0 2px 8px color-mix(in srgb, var(--sc-accent) 12%, transparent);
}
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.active {
background: rgba(203,166,247,0.18); border-color: rgba(203,166,247,0.3); color: var(--sc-accent);
box-shadow: inset 0 0 0 1px rgba(203,166,247,0.15), 0 0 8px rgba(203,166,247,0.1);
}
.btn.primary {
background: rgba(166,227,161,0.08); border-color: rgba(166,227,161,0.18); color: var(--sc-green);
position: relative; overflow: hidden;
}
.btn.primary::before {
content:''; position:absolute; inset:0;
background:linear-gradient(135deg, transparent 40%, rgba(166,227,161,0.06) 50%, transparent 60%);
background-size:200% 200%; animation: shimmer 3s ease-in-out infinite;
}
.btn.primary:hover { background: rgba(166,227,161,0.18); box-shadow: 0 2px 8px rgba(166,227,161,0.12); }
/* Readability settings panel */
.read-panel{padding:4px 14px 6px;border-bottom:1px solid var(--sc-border);background:var(--sc-bg);}
.read-row{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:3px;}
.read-row:last-of-type{margin-bottom:0;}
.read-label{font-size:10px;color:var(--sc-muted);font-weight:600;min-width:60px;white-space:nowrap;}
.read-label span{color:var(--sc-accent);font-family:'SFMono-Regular','Cascadia Code','Consolas','Liberation Mono','Menlo',monospace;}
.read-themes{display:flex;gap:3px;}
.read-theme-btn{width:24px;height:20px;border:1px solid var(--sc-border);border-radius:3px;font-size:8px;font-weight:800;cursor:pointer;transition:all .12s;padding:0;}
.read-theme-btn.active{border-color:var(--sc-accent);box-shadow:0 0 0 1px var(--sc-accent);}
.read-theme-btn:hover{border-color:var(--sc-accent);}
.read-select{flex:1;height:22px;padding:0 4px;background:var(--sc-input-bg);border:1px solid var(--sc-input-border);border-radius:4px;color:var(--sc-text);font-size:10px;outline:none;cursor:pointer;}
.read-select option{background:#1e1e2e;color:#cdd6f4;}
.read-slider{flex:1;height:4px;accent-color:var(--sc-accent);cursor:pointer;}
.read-note{font-size:8px;color:var(--sc-faint);margin-top:3px;font-style:italic;}
.search-section { padding: 6px 14px 5px; }
.search-label {
font-size: 8px; font-weight: 800; text-transform: uppercase;
letter-spacing: 1.5px; margin-bottom: 4px;
background: linear-gradient(90deg, var(--sc-accent), var(--sc-blue), var(--sc-accent));
background-size: 200% 100%; animation: shimmer 4s ease-in-out infinite;
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.search-bar { display: flex; gap: 4px; }
.search-input {
flex: 1; height: 28px; padding: 0 10px;
background: var(--sc-input-bg); border: 1px solid var(--sc-input-border);
border-radius: 6px; color: var(--sc-text); font-size: 11px; outline: none;
transition: all 0.2s;
}
.search-input:focus {
border-color: var(--sc-accent);
box-shadow: 0 0 0 2px color-mix(in srgb, var(--sc-accent) 12%, transparent), 0 0 12px color-mix(in srgb, var(--sc-accent) 8%, transparent);
}
.search-input::placeholder { color: rgba(127,132,156,0.4); }
.search-go {
height: 28px; padding: 0 12px; border-radius: 6px;
background: linear-gradient(135deg, color-mix(in srgb, var(--sc-accent) 12%, transparent), color-mix(in srgb, var(--sc-blue) 8%, transparent));
border: 1px solid color-mix(in srgb, var(--sc-accent) 20%, transparent);
color: var(--sc-accent); font-size: 10px; font-weight: 700; cursor: pointer;
transition: all 0.2s;
}
.search-go:hover {
background: linear-gradient(135deg, color-mix(in srgb, var(--sc-accent) 22%, transparent), color-mix(in srgb, var(--sc-blue) 15%, transparent));
box-shadow: 0 2px 8px color-mix(in srgb, var(--sc-accent) 15%, transparent);
transform: translateY(-1px);
}
.result-count { padding: 2px 14px 1px; font-size: 8px; color: var(--sc-muted); display: none; }
.results { padding: 0 12px 6px; }
.load-more-btn{
display:block;width:100%;padding:8px;margin:6px 0 2px;border-radius:6px;
background:linear-gradient(135deg, var(--sc-accent-dim), color-mix(in srgb, var(--sc-blue) 5%, transparent));
border:1px solid color-mix(in srgb, var(--sc-accent) 12%, transparent);
color:var(--sc-accent);font-size:11px;font-weight:700;cursor:pointer;
transition:all .25s cubic-bezier(0.22,1,0.36,1);text-align:center;
position:relative;overflow:hidden;
}
.load-more-btn::before{
content:'';position:absolute;inset:0;
background:linear-gradient(90deg,transparent,color-mix(in srgb, var(--sc-accent) 8%, transparent),transparent);
background-size:200% 100%;animation:shimmer 2.5s ease-in-out infinite;
}
.load-more-btn:hover{
background:var(--sc-accent-med);border-color:var(--sc-accent);
transform:translateY(-1px);box-shadow:0 4px 12px color-mix(in srgb, var(--sc-accent) 15%, transparent);
}
/* Style cards — compact list mode */
.s-card {
margin-bottom: 3px; border-radius: 6px;
background: color-mix(in srgb, var(--sc-surface) 60%, transparent);
border: 1px solid rgba(203,166,247,0.06);
overflow: hidden; transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
animation: fadeSlideIn 0.3s ease-out backwards;
backdrop-filter: blur(8px);
}
.s-card:nth-child(1){animation-delay:0s} .s-card:nth-child(2){animation-delay:.04s}
.s-card:nth-child(3){animation-delay:.08s} .s-card:nth-child(4){animation-delay:.12s}
.s-card:nth-child(5){animation-delay:.16s} .s-card:nth-child(6){animation-delay:.2s}
.s-card:nth-child(7){animation-delay:.24s} .s-card:nth-child(8){animation-delay:.28s}
.s-card:hover {
border-color: rgba(203,166,247,0.18); transform: translateY(-1px);
box-shadow: 0 3px 10px rgba(0,0,0,0.2), 0 0 8px color-mix(in srgb, var(--sc-accent) 6%, transparent);
}
.s-card.installed {
border-color: rgba(166,227,161,0.2);
box-shadow: inset 0 0 0 1px rgba(166,227,161,0.05);
}
.s-card.installed:hover {
border-color: rgba(166,227,161,0.35);
box-shadow: 0 3px 10px rgba(0,0,0,0.2), 0 0 6px rgba(166,227,161,0.08);
}
.s-thumb { display: none !important; }
.s-body { padding: 6px 10px; display: flex; align-items: center; gap: 8px; }
.s-info { flex: 1; min-width: 0; }
.s-body { padding: 5px 8px; }
.s-name {
font-size: 11px; font-weight: 700; color: var(--sc-text);
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.s-meta { font-size: 8px; color: var(--sc-muted); display: flex; gap: 6px; }
.s-meta span { display: flex; align-items: center; gap: 2px; }
.s-actions { display: flex; gap: 3px; flex-shrink: 0; }
.s-btn {
flex: 1; height: 24px; border-radius: 5px; border: 1px solid;
font-size: 9px; font-weight: 700; cursor: pointer;
display: flex; align-items: center; justify-content: center; gap: 3px;
transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.s-btn.preview {
background: rgba(137,180,250,0.06); border-color: rgba(137,180,250,0.15); color: var(--sc-blue);
}
.s-btn.preview:hover { background: rgba(137,180,250,0.15); box-shadow: 0 0 8px rgba(137,180,250,0.12); transform: translateY(-1px); }
.s-btn.preview.active { background: rgba(137,180,250,0.2); border-color: rgba(137,180,250,0.35); color: var(--sc-blue); box-shadow: 0 0 10px rgba(137,180,250,0.15); }
.s-btn.install {
background: rgba(166,227,161,0.06); border-color: rgba(166,227,161,0.15); color: var(--sc-green);
}
.s-btn.install:hover { background: rgba(166,227,161,0.15); box-shadow: 0 0 8px rgba(166,227,161,0.12); transform: translateY(-1px); }
.s-btn.install.done {
background: rgba(166,227,161,0.12); border-color: rgba(166,227,161,0.25); color: var(--sc-green);
cursor: default;
}
.s-btn.uninstall {
background: rgba(243,139,168,0.06); border-color: rgba(243,139,168,0.15); color: var(--sc-red);
}
.s-btn.uninstall:hover { background: rgba(243,139,168,0.15); box-shadow: 0 0 8px rgba(243,139,168,0.12); transform: translateY(-1px); }
.s-btn:disabled { opacity: 0.4; cursor: wait; transform: none !important; box-shadow: none !important; }
.empty-msg {
text-align: center; padding: 24px 16px; color: var(--sc-faint); font-size: 11px;
background: radial-gradient(ellipse at center, color-mix(in srgb, var(--sc-accent) 3%, transparent) 0%, transparent 70%);
}
.loading { text-align: center; padding: 10px; color: var(--sc-accent); font-size: 10px; display: none; }
.loading .spinner {
display: inline-block; width: 14px; height: 14px;
border: 2px solid color-mix(in srgb, var(--sc-accent) 15%, transparent); border-top-color: var(--sc-accent);
border-radius: 50%; animation: spin 0.6s linear infinite;
vertical-align: middle; margin-right: 6px;
filter: drop-shadow(0 0 4px var(--sc-accent));
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0%{background-position:-200% 0} 100%{background-position:200% 0} }
@keyframes fadeSlideIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }
@keyframes pulseGlow { 0%,100%{box-shadow:0 0 4px rgba(203,166,247,0.1)} 50%{box-shadow:0 0 12px rgba(203,166,247,0.25)} }
@keyframes gradientShift { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
.powered {
text-align: center; padding: 3px 16px 5px; font-size: 8px; color: var(--sc-faint); flex-shrink: 0;
border-top: 1px solid var(--sc-border);
background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--sc-accent) 2%, transparent));
}
.powered a { color: var(--sc-muted); text-decoration: none; transition: color 0.2s; }
.powered a:hover { color: var(--sc-accent); }
/* Installed styles for current site */
.installed-section {
padding: 6px 14px 2px; border-bottom: 1px solid var(--sc-border);
background: linear-gradient(180deg, color-mix(in srgb, var(--sc-green) 2%, transparent) 0%, transparent 100%);
}
.installed-label {
font-size: 8px; font-weight: 800; text-transform: uppercase;
letter-spacing: 1.5px; margin-bottom: 3px;
background: linear-gradient(90deg, var(--sc-green), var(--sc-blue));
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.installed-list { display: flex; flex-direction: column; gap: 3px; padding-bottom: 4px; }
.i-row {
display: flex; align-items: center; gap: 6px; padding: 4px 8px;
border-radius: 6px; background: color-mix(in srgb, var(--sc-accent) 4%, var(--sc-surface));
border: 1px solid var(--sc-border); transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
backdrop-filter: blur(4px);
}
.i-row:hover {
border-color: var(--sc-border-h); transform: translateX(2px);
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.i-row .toggle { flex-shrink: 0; }
.i-icon { flex-shrink: 0; width: 16px; text-align: center; font-size: 10px; color: var(--sc-muted); }
.i-name {
flex: 1; font-size: 11px; font-weight: 600; color: var(--sc-text);
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.i-name.disabled { opacity: 0.5; }
.i-source { font-size: 8px; color: var(--sc-muted); flex-shrink: 0; }
.i-edit { flex-shrink: 0; width: 20px; height: 20px; border: 1px solid var(--sc-border); border-radius: 5px; background: color-mix(in srgb, var(--sc-accent) 4%, var(--sc-surface)); color: var(--sc-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s cubic-bezier(0.22,1,0.36,1); padding: 0; }
.i-edit:hover { background: var(--sc-accent-med); color: var(--sc-accent); border-color: var(--sc-accent); box-shadow: 0 0 8px color-mix(in srgb, var(--sc-accent) 20%, transparent); transform: scale(1.1); }
.sc-theme-select{height:22px;padding:0 6px;background:color-mix(in srgb, var(--sc-accent) 4%, var(--sc-surface));border:1px solid var(--sc-border);border-radius:5px;color:var(--sc-accent);font-size:9px;font-weight:700;outline:none;cursor:pointer;appearance:auto;transition:all .2s;}
.sc-theme-select:hover{border-color:var(--sc-accent);box-shadow:0 0 6px color-mix(in srgb, var(--sc-accent) 12%, transparent);}
/* Quick CSS editor */
.quick-edit-section { border-bottom: 1px solid var(--sc-border); }
.quick-edit-header {
display: flex; align-items: center; gap: 6px; padding: 5px 14px;
cursor: pointer; transition: all 0.2s; font-size: 8px;
font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: var(--sc-muted);
}
.quick-edit-header:hover { background: var(--sc-accent-dim); color: var(--sc-accent); }
.quick-chevron { flex-shrink: 0; transition: transform 0.25s cubic-bezier(0.22,1,0.36,1); color: var(--sc-muted); }
.quick-edit-header:hover .quick-chevron { color: var(--sc-accent); }
.quick-edit-header.open .quick-chevron { transform: rotate(90deg); }
.quick-edit-domain { font-size: 9px; color: var(--sc-accent); margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; }
.quick-edit-body { padding: 0 14px 6px; }
.quick-edit-code {
width: 100%; height: 80px; padding: 8px; resize: vertical;
background: var(--sc-input-bg); border: 1px solid var(--sc-input-border);
border-radius: 6px; color: var(--sc-text); font-family: 'SFMono-Regular','Cascadia Code','Consolas','Liberation Mono','Menlo',monospace;
font-size: 11px; line-height: 1.5; tab-size: 2; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.quick-edit-code:focus {
border-color: var(--sc-accent);
box-shadow: 0 0 0 2px color-mix(in srgb, var(--sc-accent) 10%, transparent);
}
.quick-edit-actions { display: flex; gap: 6px; margin-top: 6px; }
.sc-theme-select option{background:var(--sc-surface);color:var(--sc-text);}
</style>
</head>
<body>
<div class="header">
<div class="header-row">
<div class="logo">StyleCraft</div>
<div style="display:flex;align-items:center;gap:8px">
<select class="sc-theme-select" id="popup-theme">
<option value="catppuccin">Catppuccin</option>
<option value="dark">Dark</option>
<option value="light">Light</option>
</select>
<span class="version">v1.5.0</span>
</div>
</div>
<div class="domain-row">
<span id="domain-text" class="domain-text"></span>
<label class="toggle"><input id="domain-toggle" type="checkbox"/><span class="toggle-sl"></span></label>
</div>
<div id="no-styles" class="no-styles">
<div style="font-size:11px;font-weight:600;color:var(--sc-subtext);margin-bottom:4px">No styles for this site</div>
<div style="font-size:10px;color:var(--sc-faint);line-height:1.5">
Click <strong style="color:var(--sc-accent)">Visual Editor</strong> to pick elements and style them, <strong style="color:var(--sc-accent)">CSS Editor</strong> to write CSS directly, or expand <strong style="color:var(--sc-accent)">Quick CSS</strong> below for a quick edit.
</div>
</div>
<div id="style-count" class="style-count"></div>
</div>
<div class="actions">
<button id="btn-open" class="btn primary">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M12 20h9"/><path d="M16.5 3.5a2.121 2.121 0 013 3L7 19l-4 1 1-4L16.5 3.5z"/></svg>
Visual Editor
</button>
<button id="btn-css-editor" class="btn">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>
CSS Editor
</button>
<button id="btn-readability" class="btn">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M2 3h6a4 4 0 014 4v14a3 3 0 00-3-3H2z"/><path d="M22 3h-6a4 4 0 00-4 4v14a3 3 0 013-3h7z"/></svg>
Read
</button>
<!-- Readability Settings Panel -->
<div id="read-panel" class="read-panel" style="display:none">
<div class="read-row">
<span class="read-label">Theme</span>
<div class="read-themes">
<button class="read-theme-btn active" data-rtheme="dark" style="background:#1a1a2e;color:#e0e0e0" title="Dark">Dk</button>
<button class="read-theme-btn" data-rtheme="sepia" style="background:#f4ecd8;color:#5b4636" title="Sepia">Se</button>
<button class="read-theme-btn" data-rtheme="light" style="background:#ffffff;color:#333" title="Light">Lt</button>
<button class="read-theme-btn" data-rtheme="oled" style="background:#000;color:#ccc" title="OLED">OL</button>
</div>
</div>
<div class="read-row">
<span class="read-label">Font</span>
<select id="read-font" class="read-select">
<option value="Georgia, serif">Georgia</option>
<option value="'Times New Roman', serif">Times New Roman</option>
<option value="system-ui, sans-serif">System Sans</option>
<option value="'Helvetica Neue', Helvetica, sans-serif">Helvetica</option>
<option value="Verdana, sans-serif">Verdana</option>
<option value="'Courier New', monospace">Courier New</option>
</select>
</div>
<div class="read-row">
<span class="read-label">Size <span id="read-size-val">18</span>px</span>
<input type="range" id="read-size" class="read-slider" min="12" max="28" value="18"/>
</div>
<div class="read-row">
<span class="read-label">Spacing <span id="read-lh-val">1.7</span></span>
<input type="range" id="read-lh" class="read-slider" min="12" max="24" value="17" step="1"/>
</div>
<div class="read-row">
<span class="read-label">Width <span id="read-w-val">720</span>px</span>
<input type="range" id="read-w" class="read-slider" min="400" max="1000" value="720" step="20"/>
</div>
</div>
<button id="btn-grayscale" class="btn">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 2a15.3 15.3 0 014 10 15.3 15.3 0 01-4 10"/></svg>
Gray
</button>
<button id="btn-options" class="btn">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"/></svg>
Options
</button>
<button id="btn-export" class="btn">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
Export
</button>
</div>
<div id="installed-section" class="installed-section" style="display:none">
<div class="installed-label">Installed for this site</div>
<div id="installed-list" class="installed-list"></div>
</div>
<div id="quick-edit-section" class="quick-edit-section">
<div class="quick-edit-header" id="quick-edit-toggle">
<svg class="quick-chevron" id="quick-chevron" width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="9 18 15 12 9 6"/></svg>
<span>Quick CSS</span>
<span class="quick-edit-domain" id="quick-edit-domain"></span>
</div>
<div class="quick-edit-body" id="quick-edit-body" style="display:none">
<textarea id="quick-edit-code" class="quick-edit-code" spellcheck="false" placeholder="/* Type CSS here... */"></textarea>
<div class="quick-edit-actions">
<button id="quick-edit-save" class="btn primary" style="flex:1;justify-content:center;">Save & Apply</button>
<button id="quick-edit-expand" class="btn" title="Open in CSS Editor">
<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg>
</button>
</div>
</div>
</div>
<div class="search-section">
<div class="search-label">Community Styles</div>
<div class="search-bar">
<input id="search-input" class="search-input" type="text" placeholder="Search UserStyles.world..." spellcheck="false"/>
<button id="search-btn" class="search-go">Search</button>
</div>
</div>
<div id="result-count" class="result-count"></div>
<div id="search-loading" class="loading"><span class="spinner"></span>Searching UserStyles.world...</div>
<div id="search-results" class="results"></div>
<div class="powered">Powered by <a href="https://userstyles.world" target="_blank">UserStyles.world</a></div>
<script src="theme.js"></script>
<script src="popup.js"></script>
</body>
</html>