index.css
6.88 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
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--bg: 246 247 250;
--surface: 255 255 255;
--elevated: 252 252 254;
--line: 226 230 238;
--ink: 24 28 40;
--muted: 116 125 146;
--brand: 79 70 229;
--brand2: 14 165 233;
--ok: 22 163 74;
--warn: 217 119 6;
--bad: 220 38 38;
--shadow: 0 1px 2px rgb(16 20 35 / 0.05), 0 8px 24px -8px rgb(16 20 35 / 0.12);
}
.dark {
--bg: 12 15 22;
--surface: 20 24 34;
--elevated: 27 32 44;
--line: 42 49 65;
--ink: 228 233 243;
--muted: 138 148 170;
--brand: 129 124 255;
--brand2: 56 189 248;
--ok: 52 190 104;
--warn: 245 175 61;
--bad: 248 113 113;
--shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 10px 30px -10px rgb(0 0 0 / 0.6);
}
* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
@apply bg-bg text-ink font-sans antialiased;
margin: 0;
font-size: 14px;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
background: rgb(var(--muted) / 0.28);
border-radius: 99px;
border: 3px solid transparent;
background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgb(var(--muted) / 0.5); background-clip: content-box; }
:focus-visible { outline: 2px solid rgb(var(--brand)); outline-offset: 2px; border-radius: 6px; }
}
@layer components {
.card {
@apply bg-surface border border-line rounded-xl;
box-shadow: var(--shadow);
}
.btn {
@apply inline-flex items-center justify-center gap-1.5 rounded-lg border border-line
bg-surface px-3 py-1.5 text-[13.5px] font-medium text-ink
transition-colors disabled:opacity-50 disabled:pointer-events-none whitespace-nowrap;
}
.btn:hover { @apply bg-elevated border-brand/40; }
.btn-primary {
@apply bg-brand text-white border-transparent;
}
.btn-primary:hover { @apply bg-brand/90 border-transparent; }
.btn-ghost { @apply border-transparent bg-transparent; }
.btn-ghost:hover { @apply bg-ink/5; }
.btn-danger { @apply bg-bad text-white border-transparent; }
.btn-danger:hover { @apply bg-bad/90; }
.btn-sm { @apply px-2.5 py-1 text-[13px]; }
.input {
@apply w-full rounded-lg border border-line bg-surface px-3 py-1.5 text-[14px] text-ink
placeholder:text-muted/60 transition-colors;
}
.input:disabled { @apply bg-ink/[0.03] text-ink/70; }
.input:focus { @apply border-brand outline-none ring-2 ring-brand/20; }
.chip {
@apply inline-flex items-center gap-1.5 rounded-full border border-line bg-surface
px-2.5 py-1 text-[13px] text-ink transition-colors cursor-pointer select-none;
}
.chip-off { @apply opacity-40; }
/* 字段标签:比说明文字大一号、颜色更深,一眼能和下面的说明分开 */
.label { @apply mb-1.5 block text-[13px] font-medium text-ink/85; }
.hint { @apply mt-1 text-[12px] leading-[18px] text-muted; }
/* 数据表:全站表格用同一套表头、行高、分隔线 */
.tbl { @apply w-full border-collapse text-body; }
.tbl thead th { @apply sticky top-0 z-[1] whitespace-nowrap border-b border-line bg-surface px-3 py-2.5 text-left
text-[13px] font-medium text-muted; }
.tbl tbody td { @apply border-b border-line/60 px-3 py-2.5 align-middle; }
.tbl tbody tr:last-child td { @apply border-b-0; }
.tbl tbody tr.row-link { @apply cursor-pointer; }
.tbl tbody tr.row-link:hover { @apply bg-ink/[0.03]; }
.num { @apply text-right tabular-nums; }
.skeleton {
@apply relative overflow-hidden rounded-md bg-ink/5;
}
.skeleton::after {
content: "";
@apply absolute inset-0 -translate-x-full animate-shimmer;
background: linear-gradient(90deg, transparent, rgb(var(--ink) / 0.06), transparent);
}
.prose-answer {
@apply text-[14px] leading-7 text-ink;
}
.prose-answer h1, .prose-answer h2, .prose-answer h3 {
@apply font-semibold mt-5 mb-2 text-[15px];
}
.prose-answer p { @apply my-2.5; }
.prose-answer ul { @apply my-2.5 list-disc pl-5 space-y-1; }
.prose-answer ol { @apply my-2.5 list-decimal pl-5 space-y-1; }
.prose-answer code {
@apply rounded bg-ink/[0.07] px-1.5 py-0.5 font-mono text-[12.5px];
}
.prose-answer pre {
@apply my-3 overflow-x-auto rounded-lg bg-ink/[0.06] p-3 text-[12.5px];
}
.prose-answer pre code { @apply bg-transparent p-0; }
.prose-answer table { @apply my-3 w-full border-collapse text-[13px]; }
.prose-answer th, .prose-answer td { @apply border border-line px-2.5 py-1.5 text-left; }
.prose-answer th { @apply bg-ink/[0.04] font-medium; }
.prose-answer blockquote { @apply my-3 border-l-[3px] border-brand/40 pl-3 text-muted; }
.prose-answer a { @apply text-brand underline underline-offset-2; }
}
/* Sigma 的 canvas 容器必须显式定位,否则 hover 命中判定会错位 */
.sigma-host { position: relative; width: 100%; height: 100%; }
.sigma-host > .sigma-container { position: absolute; inset: 0; }
/* ---------- 提问:多智能体思考动效 ---------- */
@keyframes agent-pulse {
0% { box-shadow: 0 0 0 0 var(--pulse, rgb(var(--brand) / 0.35)); }
70% { box-shadow: 0 0 0 7px transparent; }
100% { box-shadow: 0 0 0 0 transparent; }
}
.agent-pulse { animation: agent-pulse 1.6s ease-out infinite; }
@keyframes thinking-glow {
0%, 100% { box-shadow: 0 0 0 0 rgb(var(--brand) / 0.0); }
50% { box-shadow: 0 0 0 3px rgb(var(--brand) / 0.08); }
}
.thinking-glow { animation: thinking-glow 2.4s ease-in-out infinite; }
.thinking-dots { display: inline-flex; gap: 3px; align-items: center; }
.thinking-dots i {
width: 4px; height: 4px; border-radius: 99px; background: currentColor; opacity: .3;
animation: thinking-dot 1.2s infinite ease-in-out;
}
.thinking-dots i:nth-child(2) { animation-delay: .15s; }
.thinking-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes thinking-dot { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-2px); } }
.typing-caret {
display: inline-block; width: 6px; height: 13px; margin-left: 2px; vertical-align: -2px;
background: rgb(var(--brand)); animation: caret-blink 1s steps(2, start) infinite;
}
@keyframes caret-blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
.agent-pulse, .thinking-glow, .thinking-dots i, .typing-caret { animation: none; }
}
/* 原生下拉和可搜索下拉用同一个箭头,页面上两种并排时看不出区别 */
select.input {
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.625rem center;
padding-right: 1.875rem;
}