ai4scholar 0.1.0

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 (57) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +159 -0
  3. package/assets/styles.css +588 -0
  4. package/assets/template_fulltext.html +342 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +65 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/src/commands.d.ts +5 -0
  10. package/dist/src/commands.d.ts.map +1 -0
  11. package/dist/src/commands.js +89 -0
  12. package/dist/src/commands.js.map +1 -0
  13. package/dist/src/hooks/scholar-mode.d.ts +16 -0
  14. package/dist/src/hooks/scholar-mode.d.ts.map +1 -0
  15. package/dist/src/hooks/scholar-mode.js +10 -0
  16. package/dist/src/hooks/scholar-mode.js.map +1 -0
  17. package/dist/src/tools/api-client.d.ts +19 -0
  18. package/dist/src/tools/api-client.d.ts.map +1 -0
  19. package/dist/src/tools/api-client.js +119 -0
  20. package/dist/src/tools/api-client.js.map +1 -0
  21. package/dist/src/tools/arxiv.d.ts +20 -0
  22. package/dist/src/tools/arxiv.d.ts.map +1 -0
  23. package/dist/src/tools/arxiv.js +83 -0
  24. package/dist/src/tools/arxiv.js.map +1 -0
  25. package/dist/src/tools/biorxiv.d.ts +37 -0
  26. package/dist/src/tools/biorxiv.d.ts.map +1 -0
  27. package/dist/src/tools/biorxiv.js +76 -0
  28. package/dist/src/tools/biorxiv.js.map +1 -0
  29. package/dist/src/tools/google-scholar.d.ts +20 -0
  30. package/dist/src/tools/google-scholar.d.ts.map +1 -0
  31. package/dist/src/tools/google-scholar.js +57 -0
  32. package/dist/src/tools/google-scholar.js.map +1 -0
  33. package/dist/src/tools/params.d.ts +8 -0
  34. package/dist/src/tools/params.d.ts.map +1 -0
  35. package/dist/src/tools/params.js +35 -0
  36. package/dist/src/tools/params.js.map +1 -0
  37. package/dist/src/tools/pubmed.d.ts +71 -0
  38. package/dist/src/tools/pubmed.d.ts.map +1 -0
  39. package/dist/src/tools/pubmed.js +118 -0
  40. package/dist/src/tools/pubmed.js.map +1 -0
  41. package/dist/src/tools/result.d.ts +19 -0
  42. package/dist/src/tools/result.d.ts.map +1 -0
  43. package/dist/src/tools/result.js +21 -0
  44. package/dist/src/tools/result.js.map +1 -0
  45. package/dist/src/tools/semantic-scholar.d.ts +159 -0
  46. package/dist/src/tools/semantic-scholar.d.ts.map +1 -0
  47. package/dist/src/tools/semantic-scholar.js +254 -0
  48. package/dist/src/tools/semantic-scholar.js.map +1 -0
  49. package/openclaw.plugin.json +34 -0
  50. package/package.json +60 -0
  51. package/scripts/__pycache__/fulltext_search.cpython-313.pyc +0 -0
  52. package/scripts/__pycache__/generate_html.cpython-313.pyc +0 -0
  53. package/scripts/__pycache__/translate_titles.cpython-313.pyc +0 -0
  54. package/scripts/fulltext_search.py +386 -0
  55. package/scripts/generate_html.py +632 -0
  56. package/scripts/translate_titles.py +156 -0
  57. package/skills/literature-survey/SKILL.md +206 -0
@@ -0,0 +1,588 @@
1
+ /* ===== 全局样式 ===== */
2
+ html { scroll-behavior: smooth; }
3
+
4
+ /* ===== 主题变量 ===== */
5
+ :root {
6
+ --primary: #1e40af;
7
+ --primary-light: #3b82f6;
8
+ --primary-dark: #1e3a8a;
9
+ --accent: #06b6d4;
10
+ --bg: #f8fafc;
11
+ --card: #ffffff;
12
+ --text: #0f172a;
13
+ --text-secondary: #475569;
14
+ --text-muted: #94a3b8;
15
+ --border: #e2e8f0;
16
+ --border-light: #f1f5f9;
17
+ --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05);
18
+ --shadow: 0 2px 8px rgb(0 0 0 / 0.08);
19
+ --shadow-lg: 0 8px 24px rgb(0 0 0 / 0.1);
20
+ --radius-sm: 6px;
21
+ --radius: 10px;
22
+ --radius-lg: 14px;
23
+ --radius-xl: 20px;
24
+ }
25
+
26
+ [data-theme="sepia"] {
27
+ --primary: #b45309;
28
+ --primary-light: #d97706;
29
+ --primary-dark: #92400e;
30
+ --accent: #059669;
31
+ --bg: #faf7f2;
32
+ --card: #fffcf7;
33
+ --text: #292524;
34
+ --text-secondary: #57534e;
35
+ --text-muted: #a8a29e;
36
+ --border: #e7e5e4;
37
+ --border-light: #f5f5f4;
38
+ }
39
+
40
+ [data-theme="dark"] {
41
+ --primary: #7c9ab8;
42
+ --primary-light: #94b0c8;
43
+ --primary-dark: #5a7a96;
44
+ --accent: #6eb4bf;
45
+ --bg: #121417;
46
+ --card: #1a1d21;
47
+ --text: #e8e9eb;
48
+ --text-secondary: #a3a8b0;
49
+ --text-muted: #5c6370;
50
+ --border: #2a2e35;
51
+ --border-light: #1f2227;
52
+ }
53
+
54
+ [data-theme="green"] {
55
+ --primary: #059669;
56
+ --primary-light: #10b981;
57
+ --primary-dark: #047857;
58
+ --accent: #0891b2;
59
+ --bg: #f0fdf4;
60
+ --card: #ffffff;
61
+ --text: #1a3d2e;
62
+ --text-secondary: #3d6b56;
63
+ --text-muted: #6b9c85;
64
+ --border: #a7e3c4;
65
+ --border-light: #d1f5e0;
66
+ }
67
+
68
+ [data-theme="pink"] {
69
+ --primary: #db2777;
70
+ --primary-light: #ec4899;
71
+ --primary-dark: #be185d;
72
+ --accent: #8b5cf6;
73
+ --bg: #fdf2f8;
74
+ --card: #ffffff;
75
+ --text: #4a1942;
76
+ --text-secondary: #7c3a6d;
77
+ --text-muted: #b58aa8;
78
+ --border: #f5d0e8;
79
+ --border-light: #fce7f3;
80
+ }
81
+
82
+ [data-theme="perplexity"] {
83
+ --primary: #20b8cd;
84
+ --primary-light: #5dd3e2;
85
+ --primary-dark: #1a9aab;
86
+ --accent: #22d3ee;
87
+ --bg: #0a0a0a;
88
+ --card: #141414;
89
+ --text: #f5f5f5;
90
+ --text-secondary: #a8a8a8;
91
+ --text-muted: #6b6b6b;
92
+ --border: #262626;
93
+ --border-light: #1a1a1a;
94
+ }
95
+
96
+ /* ===== 基础重置 ===== */
97
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
98
+
99
+ body {
100
+ font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
101
+ font-size: 15px;
102
+ background: var(--bg);
103
+ color: var(--text);
104
+ line-height: 1.5;
105
+ -webkit-font-smoothing: antialiased;
106
+ }
107
+
108
+ /* ===== 主题切换器 ===== */
109
+ .theme-switcher { position: fixed; top: 16px; right: 16px; z-index: 1000; }
110
+
111
+ .theme-toggle {
112
+ width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
113
+ cursor: pointer; display: flex; align-items: center; justify-content: center;
114
+ background: var(--card); box-shadow: var(--shadow); transition: all 0.2s;
115
+ color: var(--text-muted); padding: 0;
116
+ }
117
+
118
+ .theme-toggle:hover { transform: scale(1.08); border-color: var(--primary); color: var(--primary); }
119
+ .theme-toggle svg { width: 18px; height: 18px; }
120
+
121
+ .theme-panel {
122
+ position: absolute; top: 44px; right: 0; background: var(--card);
123
+ border: 1px solid var(--border); border-radius: var(--radius); padding: 6px;
124
+ box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden;
125
+ transform: translateY(-8px); transition: all 0.2s; display: flex; gap: 4px;
126
+ }
127
+
128
+ .theme-switcher:hover .theme-panel { opacity: 1; visibility: visible; transform: translateY(0); }
129
+
130
+ .theme-btn {
131
+ width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent;
132
+ cursor: pointer; transition: all 0.15s;
133
+ }
134
+
135
+ .theme-btn:hover { transform: scale(1.1); }
136
+ .theme-btn.active { border-color: var(--primary); }
137
+
138
+ .theme-btn[data-theme="light"] { background: linear-gradient(135deg, #f8fafc, #e2e8f0); }
139
+ .theme-btn[data-theme="sepia"] { background: linear-gradient(135deg, #fef3c7, #fde68a); }
140
+ .theme-btn[data-theme="dark"] { background: linear-gradient(135deg, #1e293b, #0f172a); }
141
+ .theme-btn[data-theme="green"] { background: linear-gradient(135deg, #a7f3d0, #34d399); }
142
+ .theme-btn[data-theme="pink"] { background: linear-gradient(135deg, #fbcfe8, #f472b6); }
143
+ .theme-btn[data-theme="perplexity"] { background: linear-gradient(135deg, #0a0a0a, #20b8cd); }
144
+
145
+ /* ===== 主容器 ===== */
146
+ .container { max-width: 1100px; margin: 0 auto; padding: 20px 16px; }
147
+
148
+ /* ===== 报告头部 ===== */
149
+ .report-header {
150
+ background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
151
+ border-radius: var(--radius-xl); padding: 24px 28px; margin-bottom: 20px;
152
+ position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
153
+ }
154
+
155
+ .report-header::before {
156
+ content: ''; position: absolute; top: -50%; right: -30%; width: 50%; height: 200%;
157
+ background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
158
+ }
159
+
160
+ .report-header::after {
161
+ content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
162
+ background: linear-gradient(90deg, var(--accent), rgba(255,255,255,0.3), var(--accent));
163
+ }
164
+
165
+ [data-theme="dark"] .report-header {
166
+ background: linear-gradient(135deg, #1e2328 0%, #15181c 100%);
167
+ border: 1px solid #2a2e35;
168
+ }
169
+
170
+ [data-theme="perplexity"] .report-header {
171
+ background: linear-gradient(135deg, #141414 0%, #0a0a0a 100%);
172
+ border: 1px solid #262626;
173
+ }
174
+
175
+ .header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; position: relative; z-index: 1; }
176
+ .header-brand { display: flex; align-items: center; gap: 12px; }
177
+
178
+ .brand-logo { display: flex; align-items: center; }
179
+ .brand-logo-img {
180
+ height: 42px; width: auto;
181
+ border-radius: 6px;
182
+ transition: opacity 0.2s;
183
+ }
184
+ .brand-logo:hover .brand-logo-img { opacity: 0.85; }
185
+ .brand-name { font-size: 17px; font-weight: 600; color: rgba(255,255,255,0.95); }
186
+ a.brand-name { text-decoration: none; transition: color 0.2s; }
187
+ a.brand-name:hover { color: white; text-decoration: underline; }
188
+
189
+ .header-links { display: flex; align-items: center; gap: 10px; font-size: 13px; }
190
+ .header-links a { color: rgba(255,255,255,0.9); text-decoration: none; transition: color 0.2s; font-weight: 500; }
191
+ .header-links a:hover { color: white; text-decoration: underline; }
192
+ .header-links .header-text { color: rgba(255,255,255,0.6); }
193
+ .header-divider { color: rgba(255,255,255,0.3); }
194
+
195
+ .header-links .more-skills {
196
+ background: rgba(255,255,255,0.2); padding: 4px 12px; border-radius: 12px;
197
+ color: white; font-weight: 600; backdrop-filter: blur(4px);
198
+ border: 1px solid rgba(255,255,255,0.3); transition: all 0.2s;
199
+ }
200
+ .header-links .more-skills:hover {
201
+ background: rgba(255,255,255,0.3); text-decoration: none; transform: translateY(-1px);
202
+ }
203
+
204
+ .report-title { font-size: 26px; font-weight: 700; color: white; margin-bottom: 6px; }
205
+ .report-subtitle { font-size: 13px; color: rgba(255,255,255,0.7); }
206
+
207
+ /* ===== 搜索参数卡片 ===== */
208
+ .search-params-card {
209
+ background: var(--card); border-radius: var(--radius-lg); padding: 16px 20px;
210
+ margin-bottom: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
211
+ }
212
+
213
+ .search-query-section { margin-bottom: 12px; }
214
+
215
+ .search-query-label {
216
+ font-size: 10px; color: var(--text-muted); text-transform: uppercase;
217
+ letter-spacing: 1px; font-weight: 600; margin-bottom: 8px;
218
+ display: flex; align-items: center; gap: 6px;
219
+ }
220
+
221
+ .search-query-label svg { width: 12px; height: 12px; color: var(--primary); }
222
+ .search-query-box { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
223
+
224
+ .query-tag {
225
+ display: inline-flex; align-items: center; gap: 8px; background: var(--bg);
226
+ border: 1px solid var(--border); border-radius: var(--radius-sm);
227
+ padding: 8px 14px; font-size: 13px; font-weight: 500; max-width: 400px;
228
+ }
229
+
230
+ .query-tag .lang-badge {
231
+ font-size: 9px; padding: 2px 6px; border-radius: 4px; font-weight: 700; text-transform: uppercase;
232
+ }
233
+
234
+ .query-tag .lang-badge.zh { background: #8b5cf6; color: white; }
235
+ .query-tag .lang-badge.en { background: var(--primary); color: white; }
236
+ .query-arrow { color: var(--text-muted); font-size: 14px; }
237
+
238
+ .search-params-row, .search-results-row {
239
+ display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0;
240
+ }
241
+
242
+ .search-params-row { border-bottom: 1px dashed var(--border-light); }
243
+ .row-label { font-size: 11px; color: var(--text-muted); font-weight: 600; min-width: 60px; }
244
+ .search-params-tags { display: flex; flex-wrap: wrap; gap: 6px; }
245
+
246
+ .param-tag {
247
+ font-size: 11px; color: var(--text-secondary); background: var(--bg);
248
+ padding: 4px 10px; border-radius: 12px; border: 1px solid var(--border-light);
249
+ }
250
+
251
+ .param-tag .val { color: var(--primary); font-weight: 600; }
252
+ .search-stats { display: flex; gap: 16px; flex-wrap: wrap; }
253
+
254
+ .stat-item { display: flex; align-items: baseline; gap: 4px; font-size: 12px; color: var(--text-secondary); }
255
+ .stat-num { font-size: 18px; font-weight: 700; color: var(--primary); }
256
+
257
+ /* ===== 章节标题 ===== */
258
+ .section-header { display: flex; align-items: center; gap: 12px; margin: 28px 0 16px; }
259
+
260
+ .section-icon {
261
+ width: 36px; height: 36px;
262
+ background: linear-gradient(135deg, var(--primary), var(--primary-dark));
263
+ border-radius: var(--radius-sm); display: flex; align-items: center;
264
+ justify-content: center; box-shadow: var(--shadow-sm);
265
+ }
266
+
267
+ .section-icon svg { width: 18px; height: 18px; color: white; }
268
+ .section-title { font-size: 18px; font-weight: 700; color: var(--text); }
269
+ .section-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
270
+
271
+ [data-theme="dark"] .section-icon { background: linear-gradient(135deg, #3a4550 0%, #2a3138 100%); }
272
+ [data-theme="perplexity"] .section-icon { background: linear-gradient(135deg, #20b8cd 0%, #1a9aab 100%); }
273
+
274
+ /* ===== AI 总结卡片 ===== */
275
+ .summary-card {
276
+ background: var(--card); border-radius: var(--radius-lg); padding: 16px 20px;
277
+ margin-bottom: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
278
+ position: relative;
279
+ }
280
+
281
+ .summary-card::before {
282
+ content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
283
+ background: linear-gradient(180deg, var(--primary), var(--accent)); border-radius: 4px 0 0 4px;
284
+ }
285
+
286
+ [data-theme="dark"] .summary-card::before { background: linear-gradient(180deg, #7c9ab8, #5a7a96); }
287
+ [data-theme="perplexity"] .summary-card::before { background: linear-gradient(180deg, #20b8cd, #22d3ee); }
288
+
289
+ .summary-content { font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
290
+ .summary-content strong { color: var(--text); font-weight: 600; }
291
+ .summary-content a { color: var(--primary); text-decoration: none; font-weight: 500; }
292
+ .summary-content a:hover { text-decoration: underline; }
293
+
294
+ /* ===== 筛选栏 ===== */
295
+ .filter-bar {
296
+ display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
297
+ padding: 12px 16px; background: var(--card); border: 1px solid var(--border-light);
298
+ border-radius: var(--radius); margin-bottom: 16px;
299
+ }
300
+
301
+ .filter-group { display: flex; align-items: center; gap: 6px; }
302
+ .filter-group label { font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
303
+
304
+ .filter-group select {
305
+ padding: 5px 24px 5px 8px; font-size: 11px; border: 1px solid var(--border);
306
+ background: var(--card); color: var(--text); border-radius: var(--radius-sm);
307
+ cursor: pointer; appearance: none;
308
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
309
+ background-repeat: no-repeat; background-position: right 6px center;
310
+ }
311
+
312
+ .filter-buttons { display: flex; gap: 4px; }
313
+
314
+ .filter-btn {
315
+ padding: 4px 10px; font-size: 11px; border: 1px solid var(--border);
316
+ background: var(--card); color: var(--text-secondary); border-radius: var(--radius-sm);
317
+ cursor: pointer; transition: all 0.15s; font-weight: 500;
318
+ }
319
+
320
+ .filter-btn:hover { border-color: var(--primary); color: var(--primary); }
321
+ .filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
322
+
323
+ .search-group { flex: 1; min-width: 140px; max-width: 200px; }
324
+
325
+ .search-group input {
326
+ width: 100%; padding: 5px 8px 5px 28px; font-size: 11px;
327
+ border: 1px solid var(--border); background: var(--card); color: var(--text);
328
+ border-radius: var(--radius-sm);
329
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
330
+ background-repeat: no-repeat; background-position: 8px center;
331
+ }
332
+
333
+ .filter-stats { font-size: 11px; color: var(--text-muted); margin-left: auto; }
334
+ .filter-stats span { font-weight: 700; color: var(--primary); }
335
+
336
+ /* ===== 片段卡片网格 ===== */
337
+ .snippets-grid { display: grid; gap: 12px; }
338
+
339
+ /* ===== 片段卡片 ===== */
340
+ .snippet-card {
341
+ background: var(--card); border: 1px solid var(--border-light);
342
+ border-radius: var(--radius); padding: 14px 16px; cursor: pointer;
343
+ transition: all 0.2s; position: relative;
344
+ }
345
+
346
+ .snippet-card::before {
347
+ content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
348
+ background: var(--border); border-radius: 3px 0 0 3px; transition: all 0.2s;
349
+ }
350
+
351
+ .snippet-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow); }
352
+ .snippet-card:hover::before { background: var(--primary); }
353
+
354
+ .snippet-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; gap: 8px; }
355
+ .snippet-badges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
356
+
357
+ /* 匹配类型徽章 - 标题/摘要/正文 */
358
+ .snippet-kind {
359
+ font-size: 10px; padding: 3px 8px; border-radius: 10px; font-weight: 600;
360
+ background: rgba(59, 130, 246, 0.1); color: var(--primary);
361
+ }
362
+ .snippet-kind.body { background: #dcfce7; color: #16a34a; }
363
+ .snippet-kind.abstract { background: #fef3c7; color: #d97706; }
364
+ .snippet-kind.title { background: #dbeafe; color: #2563eb; }
365
+
366
+ /* 相关度徽章 - 颜色深浅随分数变化 */
367
+ .score-badge {
368
+ font-size: 10px; padding: 3px 8px; border-radius: 10px; font-weight: 600;
369
+ background: hsl(210, var(--score-sat, 40%), var(--score-light, 85%));
370
+ color: hsl(210, 70%, 35%);
371
+ }
372
+ [data-theme="dark"] .score-badge {
373
+ background: hsl(210, var(--score-sat, 40%), 25%);
374
+ color: hsl(210, 60%, 70%);
375
+ }
376
+
377
+ /* 开放获取徽章 - 不同状态不同颜色 */
378
+ .oa-badge {
379
+ font-size: 9px; padding: 2px 6px; border-radius: 8px; font-weight: 700;
380
+ text-transform: uppercase; letter-spacing: 0.3px;
381
+ }
382
+ .oa-badge.gold { background: #fef3c7; color: #b45309; }
383
+ .oa-badge.green { background: #dcfce7; color: #15803d; }
384
+ .oa-badge.bronze { background: #fed7aa; color: #c2410c; }
385
+ .oa-badge.hybrid { background: #e0e7ff; color: #4338ca; }
386
+ .oa-badge.closed { background: #f1f5f9; color: #64748b; }
387
+
388
+ /* 原文摘录标签 */
389
+ .snippet-text-label {
390
+ font-size: 11px; font-weight: 600; color: var(--text-muted);
391
+ margin-bottom: 6px; display: flex; align-items: center; gap: 4px;
392
+ }
393
+ .snippet-text-label::before {
394
+ content: ''; display: inline-block; width: 3px; height: 12px;
395
+ background: var(--primary-light); border-radius: 2px;
396
+ }
397
+
398
+ .snippet-title {
399
+ font-size: 14px; font-weight: 600; margin-bottom: 6px; line-height: 1.4;
400
+ display: flex; align-items: flex-start; gap: 6px;
401
+ }
402
+
403
+ .snippet-num { color: var(--primary); font-weight: 700; font-size: 12px; flex-shrink: 0; }
404
+ .snippet-title a { color: var(--text); text-decoration: none; }
405
+ .snippet-title a:hover { color: var(--primary); }
406
+
407
+ .snippet-title-cn {
408
+ font-size: 13px; color: var(--text-secondary); margin-bottom: 6px;
409
+ padding-left: 22px; line-height: 1.4;
410
+ }
411
+ .modal-title-cn {
412
+ font-size: 14px; color: var(--text-secondary); margin: -8px 0 12px 0;
413
+ font-style: italic;
414
+ }
415
+
416
+ .snippet-meta {
417
+ font-size: 12px; color: var(--text-muted); margin-bottom: 10px;
418
+ display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
419
+ }
420
+
421
+ .snippet-meta .venue { font-style: italic; color: var(--text-secondary); }
422
+ .snippet-meta .year { font-weight: 600; color: var(--text-secondary); }
423
+ .snippet-meta .authors { color: var(--text-muted); }
424
+ .snippet-meta .pdf-link {
425
+ color: #dc2626; font-weight: 600; text-decoration: none;
426
+ padding: 1px 4px; border-radius: 3px; background: rgba(220, 38, 38, 0.08);
427
+ }
428
+ .snippet-meta .pdf-link:hover { background: rgba(220, 38, 38, 0.15); }
429
+
430
+ .snippet-text {
431
+ font-size: 13px; line-height: 1.6; color: var(--text-secondary);
432
+ background: var(--bg); padding: 10px 12px; border-radius: var(--radius-sm);
433
+ border-left: 2px solid var(--primary-light);
434
+ max-height: 130px; overflow: hidden;
435
+ position: relative;
436
+ }
437
+ .snippet-text::after {
438
+ content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 30px;
439
+ background: linear-gradient(transparent, var(--bg));
440
+ }
441
+
442
+ [data-theme="dark"] .snippet-text { border-left-color: #5a7a96; }
443
+ [data-theme="perplexity"] .snippet-text { border-left-color: #20b8cd; }
444
+
445
+ /* Dark theme 徽章适配 */
446
+ [data-theme="dark"] .snippet-kind.body { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
447
+ [data-theme="dark"] .snippet-kind.abstract { background: rgba(217, 119, 6, 0.15); color: #fbbf24; }
448
+ [data-theme="dark"] .snippet-kind.title { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
449
+ [data-theme="dark"] .oa-badge.gold { background: rgba(180, 83, 9, 0.2); color: #fbbf24; }
450
+ [data-theme="dark"] .oa-badge.green { background: rgba(21, 128, 61, 0.2); color: #4ade80; }
451
+ [data-theme="dark"] .oa-badge.bronze { background: rgba(194, 65, 12, 0.2); color: #fb923c; }
452
+ [data-theme="dark"] .oa-badge.hybrid { background: rgba(67, 56, 202, 0.2); color: #a5b4fc; }
453
+ [data-theme="dark"] .oa-badge.closed { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
454
+ [data-theme="dark"] .snippet-meta .pdf-link { background: rgba(220, 38, 38, 0.15); color: #f87171; }
455
+
456
+ .view-detail {
457
+ display: inline-flex; align-items: center; gap: 4px; margin-top: 10px;
458
+ color: var(--primary); font-size: 11px; font-weight: 600;
459
+ }
460
+
461
+ .view-detail svg { width: 12px; height: 12px; transition: transform 0.2s; }
462
+ .snippet-card:hover .view-detail svg { transform: translateX(2px); }
463
+
464
+ /* ===== 弹窗 ===== */
465
+ .modal {
466
+ display: none; position: fixed; z-index: 1000; inset: 0;
467
+ background-color: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px);
468
+ padding: 16px; overflow-y: auto; justify-content: center; align-items: flex-start;
469
+ }
470
+
471
+ .modal.show { display: flex; }
472
+
473
+ .modal-content {
474
+ background: var(--card); padding: 24px; width: 100%; max-width: 700px;
475
+ margin: 40px 0; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); position: relative;
476
+ }
477
+
478
+ .close {
479
+ position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
480
+ border-radius: 50%; background: var(--bg); border: 1px solid var(--border);
481
+ display: flex; align-items: center; justify-content: center;
482
+ font-size: 18px; cursor: pointer; color: var(--text-muted); transition: all 0.2s;
483
+ }
484
+
485
+ .close:hover { background: var(--primary); color: white; border-color: var(--primary); }
486
+
487
+ .modal-content h3 {
488
+ font-size: 16px; font-weight: 700; color: var(--text);
489
+ margin-bottom: 16px; padding-right: 40px; line-height: 1.4;
490
+ }
491
+
492
+ .modal-content h3 a { color: var(--text); text-decoration: none; }
493
+ .modal-content h3 a:hover { color: var(--primary); }
494
+ .modal-content p { margin: 8px 0; font-size: 13px; color: var(--text-secondary); }
495
+ .modal-content p strong { color: var(--text); }
496
+ .modal-content p a { color: var(--primary); text-decoration: none; font-weight: 500; }
497
+ .modal-content p a:hover { text-decoration: underline; }
498
+
499
+ [data-theme="dark"] .modal-content p a { color: #93c5fd; }
500
+ [data-theme="dark"] .modal-content p a:hover { color: #bfdbfe; }
501
+ [data-theme="perplexity"] .modal-content p a { color: #22d3ee; }
502
+ [data-theme="perplexity"] .modal-content p a:hover { color: #67e8f9; }
503
+
504
+ .modal-snippet {
505
+ background: var(--bg); padding: 16px; border-radius: var(--radius);
506
+ border-left: 3px solid var(--primary); margin: 12px 0;
507
+ font-size: 13px; line-height: 1.7; color: var(--text-secondary);
508
+ }
509
+
510
+ .citation-box {
511
+ background: var(--bg); padding: 12px; border-radius: var(--radius-sm);
512
+ display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
513
+ border: 1px solid var(--border-light); margin-top: 12px;
514
+ }
515
+
516
+ .citation-text { font-size: 12px; line-height: 1.6; color: var(--text-secondary); flex: 1; }
517
+
518
+ .copy-btn {
519
+ background: var(--card); border: 1px solid var(--border); cursor: pointer;
520
+ padding: 6px 10px; border-radius: var(--radius-sm); display: flex;
521
+ align-items: center; gap: 4px; flex-shrink: 0; transition: all 0.2s;
522
+ color: var(--text-secondary); font-size: 11px; font-weight: 500;
523
+ }
524
+
525
+ .copy-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
526
+
527
+ /* ===== 页脚 ===== */
528
+ footer {
529
+ text-align: center; margin-top: 40px; padding: 24px;
530
+ background: var(--card); border-radius: var(--radius-lg); border: 1px solid var(--border-light);
531
+ }
532
+
533
+ footer .footer-main { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
534
+ footer .footer-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
535
+
536
+ footer .footer-links {
537
+ display: flex; justify-content: center; align-items: center;
538
+ gap: 8px 14px; flex-wrap: wrap; font-size: 13px; margin-bottom: 16px;
539
+ }
540
+
541
+ footer .footer-links span { color: var(--text-secondary); }
542
+ footer .footer-links .sep { color: var(--text-muted); opacity: 0.5; display: none; }
543
+ footer a { color: var(--primary); text-decoration: none; font-weight: 500; }
544
+ footer a:hover { text-decoration: underline; }
545
+
546
+ footer .footer-api { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
547
+
548
+ footer .footer-blessing { font-size: 15px; color: var(--text-secondary); margin-top: 12px; font-weight: 500; }
549
+
550
+ /* ===== 高亮 ===== */
551
+ mark { background: #fef08a; color: #854d0e; padding: 1px 4px; border-radius: 3px; font-weight: 500; }
552
+ [data-theme="sepia"] mark { background: #fde68a; }
553
+ [data-theme="dark"] mark { background: #d4a853; color: #1a1d21; }
554
+ [data-theme="green"] mark { background: #86efac; color: #14532d; }
555
+ [data-theme="pink"] mark { background: #fbcfe8; color: #9d174d; }
556
+ [data-theme="perplexity"] mark { background: #20b8cd; color: #0a0a0a; }
557
+
558
+ /* ===== 滚动条 ===== */
559
+ ::-webkit-scrollbar { width: 8px; height: 8px; }
560
+ ::-webkit-scrollbar-track { background: var(--bg); }
561
+ ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
562
+ ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
563
+
564
+ /* ===== 响应式 ===== */
565
+ @media (max-width: 768px) {
566
+ .container { padding: 12px; }
567
+ .report-header { padding: 20px; }
568
+ .report-title { font-size: 22px; }
569
+ .header-top { flex-direction: column; gap: 12px; align-items: flex-start; }
570
+ .header-links { flex-wrap: wrap; }
571
+ .filter-bar { padding: 10px 12px; }
572
+ .filter-buttons { flex-wrap: wrap; }
573
+ .snippet-card { padding: 12px; }
574
+ .snippet-text { max-height: 160px; }
575
+ .modal-content { padding: 16px; margin: 16px 0; }
576
+ footer { padding: 20px 16px; }
577
+ footer .footer-links {
578
+ display: grid;
579
+ grid-template-columns: repeat(2, auto);
580
+ justify-content: center;
581
+ gap: 6px 20px;
582
+ font-size: 12px;
583
+ }
584
+ footer .footer-main { font-size: 13px; }
585
+ footer .footer-desc { font-size: 11px; }
586
+ footer .footer-api { font-size: 11px; }
587
+ footer .footer-blessing { font-size: 13px; }
588
+ }