| 1 | @import "tailwindcss"; |
| 2 | @plugin "@tailwindcss/typography"; |
| 3 | |
| 4 | @theme { |
| 5 | --font-display: "Geist", "Inter", "Noto Sans SC", system-ui, sans-serif; |
| 6 | --font-sans: "Geist", "Inter", "Noto Sans SC", system-ui, sans-serif; |
| 7 | } |
| 8 | |
| 9 | /* ============================================================ |
| 10 | Utopia design tokens — Vercel-style neutral dark + glass. |
| 11 | Chromatic color is reserved for DATA (graph entities, status); |
| 12 | the chrome itself is monochrome. |
| 13 | ============================================================ */ |
| 14 | :root { |
| 15 | font-family: var(--font-sans); |
| 16 | color-scheme: dark; |
| 17 | |
| 18 | /* 品牌字:碑铭式衬线(Marcellus 仅 400,一字不粗) */ |
| 19 | --font-brand: "Marcellus", "Georgia", "Times New Roman", serif; |
| 20 | |
| 21 | --u-ground: #0a0a0a; |
| 22 | --u-text: #ededed; |
| 23 | --u-text-2: #a1a1a1; |
| 24 | --u-text-3: #6e6e6e; |
| 25 | |
| 26 | /* 单色 chrome:accent 也是中性亮灰,彩色只属于数据(实体色/状态语义色) */ |
| 27 | --u-accent: #d4d4d4; |
| 28 | --u-accent-deep: 255, 255, 255; |
| 29 | |
| 30 | --u-ok: #4cc38a; |
| 31 | --u-warn: #f2b66d; |
| 32 | /* 浅玫瑰:深底上的危险"文字/描边/点"专用(够亮才可读) */ |
| 33 | --u-danger: #ff9daf; |
| 34 | /* 0017:争议色。派生撞上断言、被挡下的派生——警告与危险之外的第三种 */ |
| 35 | --u-contest: #ff6a3d; |
| 36 | /* 深红:危险"实底按钮"专用(浅玫瑰做底会发粉;亮红在单色 chrome 上嗓门过大),配白字 */ |
| 37 | --u-danger-solid: #c9353a; |
| 38 | --u-violet: #c4a5ff; |
| 39 | |
| 40 | --u-line: rgba(255, 255, 255, 0.08); |
| 41 | --u-line-strong: rgba(255, 255, 255, 0.14); |
| 42 | --u-surface: rgba(255, 255, 255, 0.04); |
| 43 | --u-surface-strong: rgba(10, 10, 10, 0.72); |
| 44 | /* 指针停在面上时的实底。**毛玻璃是给"没在看它"的时候用的**—— |
| 45 | 半透让浮层不至于把画布切断;可一旦人把指针移进来,他要读的就是面板本身, |
| 46 | 这时候背后的图反而是噪声。所以这两档不是审美偏好,是同一块面在 |
| 47 | "余光里"和"正在读"两种状态下该有的样子。 |
| 48 | 统一在这里定义,改一处四处都跟着:顶栏、导航、时间岛、控件塔、 |
| 49 | 以及所有 u-menu-glass 的弹出面板 */ |
| 50 | --u-surface-strong-hover: rgba(10, 10, 10, 0.94); |
| 51 | --u-menu-surface: rgba(14, 14, 14, 0.85); |
| 52 | --u-menu-surface-hover: rgba(14, 14, 14, 0.97); |
| 53 | } |
| 54 | |
| 55 | body { |
| 56 | background-color: var(--u-ground); |
| 57 | color: var(--u-text); |
| 58 | min-height: 100vh; |
| 59 | } |
| 60 | |
| 61 | /* 选中态:中性白纱替掉浏览器默认蓝(零色偏原则同样管到这里)。 |
| 62 | 只设底色不改字色——半透明白纱下内容自身的颜色(代码令牌、实体色)仍透出 */ |
| 63 | ::selection { |
| 64 | background: rgba(255, 255, 255, 0.22); |
| 65 | } |
| 66 | |
| 67 | /* 空间感:极克制的中性顶光 + 暗角,零色偏 */ |
| 68 | body::before { |
| 69 | content: ""; |
| 70 | position: fixed; |
| 71 | inset: 0; |
| 72 | z-index: -1; |
| 73 | background: |
| 74 | radial-gradient(1000px 600px at 50% -20%, rgba(255, 255, 255, 0.045), transparent 60%), |
| 75 | var(--u-ground); |
| 76 | } |
| 77 | |
| 78 | /* ---- surfaces ---- */ |
| 79 | .glass { |
| 80 | background: var(--u-surface); |
| 81 | backdrop-filter: blur(14px); |
| 82 | -webkit-backdrop-filter: blur(14px); |
| 83 | border: 1px solid var(--u-line); |
| 84 | } |
| 85 | |
| 86 | .glass-strong { |
| 87 | background: var(--u-surface-strong); |
| 88 | backdrop-filter: blur(20px); |
| 89 | -webkit-backdrop-filter: blur(20px); |
| 90 | border: 1px solid var(--u-line); |
| 91 | /* 基态上的时长是**离开**时用的:慢一点,指针擦过边缘不会闪。 |
| 92 | 进入的时长写在 :hover 里,更快,为的是跟手 */ |
| 93 | transition: background-color 260ms ease; |
| 94 | } |
| 95 | .glass-strong:hover { |
| 96 | background: var(--u-surface-strong-hover); |
| 97 | transition-duration: 120ms; |
| 98 | } |
| 99 | /* 正在工作时也按下去,与 hover 同一档。**这比在轨道上循环扫光更准**: |
| 100 | 它说的是"这块面正在工作",而不是"在等一件不知道多久的事"—— |
| 101 | 循环微光是不确定进度的语言,而时间轴是确定的。 |
| 102 | 播放中人本来就盯着它看,半透的毛玻璃这时候只是噪声 */ |
| 103 | /* 时间岛:宽度随单位变,所以它要**同时**过渡背景与宽度。 |
| 104 | 不能只挂 Tailwind 的 `transition-[width]`——上面 .glass-strong 用的是 |
| 105 | `transition` 简写,会把 transition-property 整个覆盖掉,而自定义 CSS |
| 106 | 不在 utilities 层里、胜过那个工具类。实测:岛的计算过渡只剩 |
| 107 | background-color,宽度变成瞬变。要过渡两样就得写在同一条声明里 */ |
| 108 | .u-scrub-island { |
| 109 | transition: |
| 110 | background-color 260ms ease, |
| 111 | width 300ms ease; |
| 112 | } |
| 113 | .u-scrub-island:hover, |
| 114 | .u-scrub-island.u-solid { |
| 115 | transition-duration: 120ms, 300ms; |
| 116 | } |
| 117 | |
| 118 | .glass-strong.u-solid { |
| 119 | background: var(--u-surface-strong-hover); |
| 120 | transition-duration: 120ms; |
| 121 | } |
| 122 | |
| 123 | /* 模态对话框的面:**近实底**。 |
| 124 | 毛玻璃本来留给"带遮罩的大弹窗",但确认框不是那种——它要人读一句话然后 |
| 125 | 做一个不可逆的决定,下层正文透上来是直接的干扰(实测删除对话的确认框, |
| 126 | 身后的回答文字清晰可辨,标题几乎读不出)。 |
| 127 | 遮罩也一并加深:0.6 的黑压不住一屏白字。 */ |
| 128 | .u-modal-panel { |
| 129 | /* **中性,不掺色相**:原本是 rgba(12,12,14),蓝比红绿高 2—— |
| 130 | 在大面积深底上肉眼看得出偏冷。这产品的既定原则是 |
| 131 | 「chrome 零色偏、彩色只属于数据」,这里也照办 */ |
| 132 | background: rgba(12, 12, 12, 0.97); |
| 133 | backdrop-filter: blur(24px); |
| 134 | -webkit-backdrop-filter: blur(24px); |
| 135 | border: 1px solid var(--u-line-strong); |
| 136 | } |
| 137 | |
| 138 | /* 确认框入场:遮罩淡入 + 面板浮起。 |
| 139 | 时长与缓动跟 u-pop-in 同族——同一套动作语汇,不另发明一种。 |
| 140 | 模态比下拉重一点(0.18s / 位移 8px),因为它要求人停下来看。 */ |
| 141 | @keyframes u-modal-scrim-kf { |
| 142 | from { |
| 143 | opacity: 0; |
| 144 | } |
| 145 | to { |
| 146 | opacity: 1; |
| 147 | } |
| 148 | } |
| 149 | @keyframes u-modal-panel-kf { |
| 150 | from { |
| 151 | opacity: 0; |
| 152 | transform: scale(0.97) translateY(8px); |
| 153 | } |
| 154 | to { |
| 155 | opacity: 1; |
| 156 | transform: scale(1) translateY(0); |
| 157 | } |
| 158 | } |
| 159 | .u-modal-scrim { |
| 160 | animation: u-modal-scrim-kf 0.14s ease-out both; |
| 161 | } |
| 162 | .u-modal-in { |
| 163 | animation: u-modal-panel-kf 0.18s cubic-bezier(0.16, 1, 0.3, 1) both; |
| 164 | } |
| 165 | /* 系统设了减少动效就只留淡入:位移与缩放是装饰,可读性不是 */ |
| 166 | @media (prefers-reduced-motion: reduce) { |
| 167 | .u-modal-in { |
| 168 | animation: u-modal-scrim-kf 0.14s ease-out both; |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | /* 弹出层(下拉/取色器等 popover):近实底——下层内容透出只会干扰 */ |
| 173 | .u-pop { |
| 174 | background: rgba(16, 16, 16, 0.98); |
| 175 | backdrop-filter: blur(8px); |
| 176 | -webkit-backdrop-filter: blur(8px); |
| 177 | border: 1px solid var(--u-line-strong); |
| 178 | } |
| 179 | |
| 180 | /* 弹层入场:锚点为原点的缩放浮现(用户菜单/下拉共用)。 |
| 181 | 160ms + 出挑缓动(与 u-rise 同族),克制但有生气 */ |
| 182 | @keyframes u-pop-in-kf { |
| 183 | from { |
| 184 | opacity: 0; |
| 185 | transform: scale(0.96) translateY(-4px); |
| 186 | } |
| 187 | to { |
| 188 | opacity: 1; |
| 189 | transform: scale(1) translateY(0); |
| 190 | } |
| 191 | } |
| 192 | .u-pop-in { |
| 193 | transform-origin: top right; |
| 194 | animation: u-pop-in-kf 0.16s cubic-bezier(0.16, 1, 0.3, 1) both; |
| 195 | } |
| 196 | .u-pop-in-tl { |
| 197 | transform-origin: top left; |
| 198 | } |
| 199 | /* 走到终点时扫一道光:从左到右扫过整条轨道。 |
| 200 | **它说的是"这条走完了"**——播放停下、时间跳回全时段, |
| 201 | 没有任何交代的话看着像中途断了。方向与刚刚走过的方向一致。 |
| 202 | 只演一次,走完就卸载;轨道自身 overflow-hidden,光不会溢出圆角 */ |
| 203 | @keyframes u-sweep-kf { |
| 204 | from { |
| 205 | transform: translateX(-100%); |
| 206 | opacity: 0; |
| 207 | } |
| 208 | 18% { |
| 209 | opacity: 1; |
| 210 | } |
| 211 | to { |
| 212 | transform: translateX(100%); |
| 213 | opacity: 0; |
| 214 | } |
| 215 | } |
| 216 | .u-sweep { |
| 217 | position: absolute; |
| 218 | inset: 0; |
| 219 | pointer-events: none; |
| 220 | background: linear-gradient( |
| 221 | 90deg, |
| 222 | transparent, |
| 223 | rgba(255, 255, 255, 0.18), |
| 224 | transparent |
| 225 | ); |
| 226 | animation: u-sweep-kf 720ms cubic-bezier(0.4, 0, 0.2, 1) both; |
| 227 | } |
| 228 | |
| 229 | /* 停靠面板的入场:从它停靠的那条边滑进来。 |
| 230 | **不用 u-pop-in 那种缩放**——那是给锚在某个按钮上的弹出菜单的, |
| 231 | 它有明确的"从哪儿长出来";侧栏是贴着右边缘停的一块面,该从边缘进来。 |
| 232 | 只在打开时演一次:在实体之间切换时面板留在原地只换内容, |
| 233 | 每点一个节点就抖一下反而吵 */ |
| 234 | @keyframes u-dock-in-kf { |
| 235 | from { |
| 236 | opacity: 0; |
| 237 | transform: translateX(14px); |
| 238 | } |
| 239 | to { |
| 240 | opacity: 1; |
| 241 | transform: translateX(0); |
| 242 | } |
| 243 | } |
| 244 | .u-dock-in { |
| 245 | animation: u-dock-in-kf 0.18s cubic-bezier(0.16, 1, 0.3, 1) both; |
| 246 | } |
| 247 | /* 退场。**比入场快、缓动相反**:进来要"落位"(减速停住), |
| 248 | 出去要"离开"(加速甩出)。同一条曲线两头用会让关闭显得拖沓。 |
| 249 | 退场期间不再接受点击——它已经在走了,这时候点上去只会让人困惑 */ |
| 250 | @keyframes u-dock-out-kf { |
| 251 | from { |
| 252 | opacity: 1; |
| 253 | transform: translateX(0); |
| 254 | } |
| 255 | to { |
| 256 | opacity: 0; |
| 257 | transform: translateX(14px); |
| 258 | } |
| 259 | } |
| 260 | .u-dock-out { |
| 261 | animation: u-dock-out-kf 0.15s cubic-bezier(0.4, 0, 1, 1) both; |
| 262 | pointer-events: none; |
| 263 | } |
| 264 | |
| 265 | /* 向上弹出的变体(composer 停靠底部时菜单开口朝上) */ |
| 266 | @keyframes u-pop-up-kf { |
| 267 | from { |
| 268 | opacity: 0; |
| 269 | transform: scale(0.96) translateY(4px); |
| 270 | } |
| 271 | to { |
| 272 | opacity: 1; |
| 273 | transform: scale(1) translateY(0); |
| 274 | } |
| 275 | } |
| 276 | .u-pop-up { |
| 277 | transform-origin: bottom left; |
| 278 | animation: u-pop-up-kf 0.16s cubic-bezier(0.16, 1, 0.3, 1) both; |
| 279 | } |
| 280 | |
| 281 | /* 用户菜单:半透玻璃面(比 .u-pop 更透,加强模糊补偿可读性)。 |
| 282 | 原地变形动画在组件内用 FLIP 实现(首帧压到胶囊真实边界再展开), |
| 283 | CSS 只负责面板的皮 */ |
| 284 | .u-menu-glass { |
| 285 | /* 中性,不掺色相:原本 rgba(14,14,16) 蓝比红绿高 2。这个面同时用在 |
| 286 | 通知、用户菜单、图例的「+N 个类」和 Inference 面板上,一处偏色四处都偏 */ |
| 287 | background: var(--u-menu-surface); |
| 288 | /* 基态上的时长是**离开**时用的:慢一点,指针擦过边缘不会闪。 |
| 289 | 进入的时长写在 :hover 里,更快,为的是跟手 */ |
| 290 | transition: background-color 260ms ease; |
| 291 | backdrop-filter: blur(24px); |
| 292 | -webkit-backdrop-filter: blur(24px); |
| 293 | border: 1px solid rgba(255, 255, 255, 0.14); |
| 294 | } |
| 295 | .u-menu-glass:hover { |
| 296 | background: var(--u-menu-surface-hover); |
| 297 | transition-duration: 120ms; |
| 298 | } |
| 299 | |
| 300 | @media (prefers-reduced-motion: reduce) { |
| 301 | .u-pop-in, |
| 302 | .u-pop-up, |
| 303 | .u-dock-in, |
| 304 | .u-dock-out, |
| 305 | .u-sweep { |
| 306 | animation: none; |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | .glass-hover { |
| 311 | transition: border-color 0.15s; |
| 312 | } |
| 313 | .glass-hover:hover { |
| 314 | border-color: var(--u-line-strong); |
| 315 | } |
| 316 | |
| 317 | /* ---- form controls ---- */ |
| 318 | .input-dark { |
| 319 | background: rgba(255, 255, 255, 0.04); |
| 320 | border: 1px solid var(--u-line-strong); |
| 321 | color: var(--u-text); |
| 322 | border-radius: 0.5rem; |
| 323 | } |
| 324 | .input-dark::placeholder { |
| 325 | color: var(--u-text-3); |
| 326 | } |
| 327 | .input-dark:focus { |
| 328 | outline: none; |
| 329 | border-color: rgba(255, 255, 255, 0.4); |
| 330 | box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08); |
| 331 | } |
| 332 | select.input-dark option { |
| 333 | background: #111111; |
| 334 | color: var(--u-text); |
| 335 | } |
| 336 | |
| 337 | /* mono 输入框的 placeholder 回默认字体(提示语不是代码) */ |
| 338 | .u-placeholder-sans::placeholder { |
| 339 | font-family: var(--font-sans); |
| 340 | } |
| 341 | |
| 342 | /* 数字输入:去掉原生 spinner,保持纯净外观 */ |
| 343 | .u-input-plain::-webkit-outer-spin-button, |
| 344 | .u-input-plain::-webkit-inner-spin-button { |
| 345 | -webkit-appearance: none; |
| 346 | margin: 0; |
| 347 | } |
| 348 | .u-input-plain { |
| 349 | -moz-appearance: textfield; |
| 350 | appearance: textfield; |
| 351 | } |
| 352 | |
| 353 | /* ---- buttons (Vercel: primary = white on black) ---- */ |
| 354 | .u-btn, |
| 355 | .btn-primary, |
| 356 | .btn-ghost { |
| 357 | border-radius: 0.5rem; |
| 358 | font-weight: 500; |
| 359 | transition: background 0.15s, border-color 0.15s, color 0.15s; |
| 360 | } |
| 361 | .u-btn:disabled, |
| 362 | .btn-primary:disabled, |
| 363 | .btn-ghost:disabled { |
| 364 | opacity: 0.4; |
| 365 | } |
| 366 | .u-btn-primary, |
| 367 | .btn-primary { |
| 368 | background: var(--u-text); |
| 369 | border: 1px solid var(--u-text); |
| 370 | color: #0a0a0a; |
| 371 | font-weight: 600; |
| 372 | } |
| 373 | .u-btn-primary:hover:not(:disabled), |
| 374 | .btn-primary:hover:not(:disabled) { |
| 375 | background: #ffffff; |
| 376 | border-color: #ffffff; |
| 377 | } |
| 378 | .u-btn-ghost, |
| 379 | .btn-ghost { |
| 380 | border: 1px solid var(--u-line-strong); |
| 381 | color: var(--u-text-2); |
| 382 | background: transparent; |
| 383 | } |
| 384 | .u-btn-ghost:hover:not(:disabled), |
| 385 | .btn-ghost:hover:not(:disabled) { |
| 386 | background: rgba(255, 255, 255, 0.06); |
| 387 | color: var(--u-text); |
| 388 | border-color: rgba(255, 255, 255, 0.22); |
| 389 | } |
| 390 | |
| 391 | /* ---- chips ---- */ |
| 392 | .u-chip { |
| 393 | display: inline-block; |
| 394 | border-radius: 9999px; |
| 395 | padding: 0.125rem 0.5rem; |
| 396 | font-size: 0.75rem; |
| 397 | line-height: 1.25; |
| 398 | white-space: nowrap; |
| 399 | } |
| 400 | .u-chip-neutral { |
| 401 | background: rgba(255, 255, 255, 0.08); |
| 402 | color: var(--u-text-2); |
| 403 | } |
| 404 | .u-chip-info { |
| 405 | background: rgba(255, 255, 255, 0.12); |
| 406 | color: #ededed; |
| 407 | } |
| 408 | .u-chip-success { |
| 409 | background: rgba(76, 195, 138, 0.12); |
| 410 | color: var(--u-ok); |
| 411 | } |
| 412 | .u-chip-warn { |
| 413 | background: rgba(242, 182, 109, 0.12); |
| 414 | color: var(--u-warn); |
| 415 | } |
| 416 | /* 争议(0017 §3):与图上的争议边同一个色相 */ |
| 417 | .u-chip-contest { |
| 418 | background: rgba(255, 106, 61, 0.14); |
| 419 | color: var(--u-contest); |
| 420 | } |
| 421 | .u-chip-danger { |
| 422 | background: rgba(255, 157, 175, 0.12); |
| 423 | color: var(--u-danger); |
| 424 | } |
| 425 | .u-chip-violet { |
| 426 | background: rgba(196, 165, 255, 0.12); |
| 427 | color: var(--u-violet); |
| 428 | } |
| 429 | |
| 430 | /* 浏览态里的程度标注:同一个警示色,但没有填充、没有药丸形状。 |
| 431 | chip 是"停下来看这个",用在审核队列上是对的;而在图谱列表里, |
| 432 | 主角是实体名,置信度和右侧的时间区间同属元信息——不该是整屏 |
| 433 | 唯一有填充色的东西。 */ |
| 434 | .u-meta-warn { |
| 435 | color: rgba(242, 182, 109, 0.55); |
| 436 | } |
| 437 | |
| 438 | /* ---- graph canvas: 图纸式大小网格(细密小格 + 每 4 格一条更亮的主线) ---- */ |
| 439 | .u-grid-bg { |
| 440 | background-image: |
| 441 | linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px), |
| 442 | linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px), |
| 443 | linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), |
| 444 | linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px); |
| 445 | background-size: |
| 446 | 104px 104px, |
| 447 | 104px 104px, |
| 448 | 26px 26px, |
| 449 | 26px 26px; |
| 450 | } |
| 451 | |
| 452 | /* ---- interactive accents ---- */ |
| 453 | .u-bubble-user { |
| 454 | background: rgba(255, 255, 255, 0.08); |
| 455 | border: 1px solid rgba(255, 255, 255, 0.14); |
| 456 | } |
| 457 | .u-highlight { |
| 458 | border-color: rgba(255, 255, 255, 0.45) !important; |
| 459 | background: rgba(255, 255, 255, 0.06) !important; |
| 460 | box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12); |
| 461 | } |
| 462 | .u-nav-active { |
| 463 | background: rgba(255, 255, 255, 0.09); |
| 464 | color: #ffffff; |
| 465 | } |
| 466 | |
| 467 | /* 引用定位闪现:进场强光收敛到持有亮度(运动比静态边框更抓眼)。 |
| 468 | fill-mode both 让 100% 帧在类存续期间保持;移除类后由元素自身的 |
| 469 | transition 淡回普通卡片 */ |
| 470 | @keyframes u-flash-kf { |
| 471 | 0% { |
| 472 | border-color: rgba(255, 255, 255, 0.9); |
| 473 | background-color: rgba(255, 255, 255, 0.14); |
| 474 | box-shadow: |
| 475 | 0 0 0 3px rgba(255, 255, 255, 0.3), |
| 476 | 0 0 36px rgba(255, 255, 255, 0.16); |
| 477 | } |
| 478 | 100% { |
| 479 | border-color: rgba(255, 255, 255, 0.55); |
| 480 | background-color: rgba(255, 255, 255, 0.07); |
| 481 | box-shadow: |
| 482 | 0 0 0 2px rgba(255, 255, 255, 0.16), |
| 483 | 0 0 18px rgba(255, 255, 255, 0.06); |
| 484 | } |
| 485 | } |
| 486 | .u-flash { |
| 487 | animation: u-flash-kf 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; |
| 488 | } |
| 489 | @media (prefers-reduced-motion: reduce) { |
| 490 | .u-flash { |
| 491 | animation: none; |
| 492 | border-color: rgba(255, 255, 255, 0.55); |
| 493 | background-color: rgba(255, 255, 255, 0.07); |
| 494 | box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16); |
| 495 | } |
| 496 | } |
| 497 | |
| 498 | /* ---- text helpers ---- */ |
| 499 | .u-accent { |
| 500 | color: var(--u-accent); |
| 501 | } |
| 502 | .u-link { |
| 503 | color: var(--u-text); |
| 504 | text-decoration: underline; |
| 505 | text-underline-offset: 3px; |
| 506 | text-decoration-color: rgba(255, 255, 255, 0.3); |
| 507 | } |
| 508 | .u-link:hover { |
| 509 | text-decoration-color: rgba(255, 255, 255, 0.8); |
| 510 | } |
| 511 | .u-title { |
| 512 | font-family: var(--font-display); |
| 513 | font-weight: 600; |
| 514 | letter-spacing: -0.01em; |
| 515 | color: #ffffff; |
| 516 | } |
| 517 | .brand-gradient { |
| 518 | color: #ffffff; |
| 519 | letter-spacing: -0.02em; |
| 520 | } |
| 521 | |
| 522 | /* 登录卡:近实底,不用 backdrop-filter(对动画背景每帧重算模糊,代价高) */ |
| 523 | .u-card-opaque { |
| 524 | background: rgba(12, 12, 12, 0.92); |
| 525 | border: 1px solid var(--u-line); |
| 526 | } |
| 527 | |
| 528 | /* ---- 入场动效(登录页等):淡入上浮 ---- */ |
| 529 | @keyframes u-rise-kf { |
| 530 | from { |
| 531 | opacity: 0; |
| 532 | transform: translateY(14px); |
| 533 | } |
| 534 | to { |
| 535 | opacity: 1; |
| 536 | transform: translateY(0); |
| 537 | } |
| 538 | } |
| 539 | .u-rise { |
| 540 | animation: u-rise-kf 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; |
| 541 | } |
| 542 | |
| 543 | /* 登录成功谢幕:内容上浮淡出;巨构放大淡出(像穿过它进入系统) */ |
| 544 | @keyframes u-depart-kf { |
| 545 | to { |
| 546 | opacity: 0; |
| 547 | transform: translateY(-14px); |
| 548 | } |
| 549 | } |
| 550 | .u-depart { |
| 551 | animation: u-depart-kf 0.55s cubic-bezier(0.5, 0, 0.9, 0.4) forwards; |
| 552 | } |
| 553 | .u-scene-depart { |
| 554 | transition: transform 0.7s cubic-bezier(0.5, 0, 0.9, 0.5), opacity 0.7s ease-in; |
| 555 | transform: scale(1.16); |
| 556 | opacity: 0; |
| 557 | } |
| 558 | |
| 559 | /* 登录后首屏入场:整体淡入,衔接登录页谢幕 */ |
| 560 | @keyframes u-arrive-kf { |
| 561 | from { |
| 562 | opacity: 0; |
| 563 | } |
| 564 | to { |
| 565 | opacity: 1; |
| 566 | } |
| 567 | } |
| 568 | .u-arrive { |
| 569 | animation: u-arrive-kf 0.45s ease both; |
| 570 | } |
| 571 | |
| 572 | @media (prefers-reduced-motion: reduce) { |
| 573 | .u-rise, |
| 574 | .u-depart, |
| 575 | .u-arrive { |
| 576 | animation: none; |
| 577 | } |
| 578 | .u-scene-depart { |
| 579 | transition: none; |
| 580 | } |
| 581 | } |
| 582 | |
| 583 | /* Chrome 自动填充的蓝底与"零色偏"冲突:压回中性深灰 */ |
| 584 | input:-webkit-autofill, |
| 585 | input:-webkit-autofill:hover, |
| 586 | input:-webkit-autofill:focus { |
| 587 | -webkit-box-shadow: 0 0 0 1000px #141414 inset; |
| 588 | -webkit-text-fill-color: var(--u-text); |
| 589 | caret-color: var(--u-text); |
| 590 | } |
| 591 | |
| 592 | /* ---- 品牌字标:逐字母左→右淡入;hover 浮出外链箭头 ---- */ |
| 593 | @keyframes u-letter-kf { |
| 594 | from { |
| 595 | opacity: 0; |
| 596 | } |
| 597 | to { |
| 598 | opacity: 1; |
| 599 | } |
| 600 | } |
| 601 | .u-letter { |
| 602 | animation: u-letter-kf 0.5s ease both; |
| 603 | } |
| 604 | .u-mark-arrow { |
| 605 | position: absolute; |
| 606 | right: -0.6em; |
| 607 | top: -0.08em; |
| 608 | width: 0.5em; |
| 609 | height: 0.5em; |
| 610 | color: var(--u-text-2); |
| 611 | opacity: 0; |
| 612 | transform: translate(-3px, 3px); |
| 613 | transition: opacity 0.18s ease, transform 0.18s ease; |
| 614 | } |
| 615 | a:hover > .u-mark-arrow { |
| 616 | opacity: 1; |
| 617 | transform: none; |
| 618 | } |
| 619 | @media (prefers-reduced-motion: reduce) { |
| 620 | .u-letter { |
| 621 | animation: none; |
| 622 | } |
| 623 | .u-mark-arrow { |
| 624 | transition: none; |
| 625 | } |
| 626 | } |
| 627 | |
| 628 | /* toast 入场:复用淡入上浮关键帧,节奏更快 */ |
| 629 | .u-toast-in { |
| 630 | animation: u-rise-kf 0.25s ease both; |
| 631 | } |
| 632 | @media (prefers-reduced-motion: reduce) { |
| 633 | .u-toast-in { |
| 634 | animation: none; |
| 635 | } |
| 636 | } |
| 637 | |
| 638 | /* 多行居中的短句:两行长度均衡,避免孤词 */ |
| 639 | .u-balance { |
| 640 | text-wrap: balance; |
| 641 | } |
| 642 | |
| 643 | /* ---- numbers in chrome: 默认字体(Geist)+ 等宽数字,不再用 mono ---- */ |
| 644 | .u-num { |
| 645 | font-variant-numeric: tabular-nums; |
| 646 | } |
| 647 | |
| 648 | /* ---- 全局滚动条:统一细条风格(Chromium 走 webkit 自绘;Firefox 走标准属性) ---- */ |
| 649 | @supports not selector(::-webkit-scrollbar) { |
| 650 | * { |
| 651 | scrollbar-width: thin; |
| 652 | scrollbar-color: rgba(255, 255, 255, 0.14) transparent; |
| 653 | } |
| 654 | } |
| 655 | *::-webkit-scrollbar { |
| 656 | width: 7px; |
| 657 | height: 7px; |
| 658 | } |
| 659 | *::-webkit-scrollbar-track { |
| 660 | background: transparent; |
| 661 | } |
| 662 | *::-webkit-scrollbar-thumb { |
| 663 | background: rgba(255, 255, 255, 0.14); |
| 664 | border-radius: 4px; |
| 665 | } |
| 666 | *::-webkit-scrollbar-thumb:hover { |
| 667 | background: rgba(255, 255, 255, 0.26); |
| 668 | } |
| 669 | *::-webkit-scrollbar-corner { |
| 670 | background: transparent; |
| 671 | } |
| 672 | |
| 673 | /* 面板内滚动区(滚动条样式已全局统一,这里只保留滚动隔离) */ |
| 674 | .u-scroll { |
| 675 | overscroll-behavior: contain; |
| 676 | } |
| 677 | |
| 678 | /* ---- timeline scrubber ---- */ |
| 679 | .scrubber-range { |
| 680 | -webkit-appearance: none; |
| 681 | appearance: none; |
| 682 | width: 100%; |
| 683 | height: 100%; |
| 684 | background: transparent; |
| 685 | position: absolute; |
| 686 | inset: 0; |
| 687 | margin: 0; |
| 688 | cursor: ew-resize; |
| 689 | } |
| 690 | .scrubber-range::-webkit-slider-thumb { |
| 691 | -webkit-appearance: none; |
| 692 | appearance: none; |
| 693 | width: 2px; |
| 694 | height: 28px; |
| 695 | border-radius: 1px; |
| 696 | background: #ffffff; |
| 697 | box-shadow: 0 0 6px rgba(255, 255, 255, 0.5); |
| 698 | cursor: ew-resize; |
| 699 | } |
| 700 | .scrubber-range::-moz-range-thumb { |
| 701 | width: 2px; |
| 702 | height: 28px; |
| 703 | border: none; |
| 704 | border-radius: 1px; |
| 705 | background: #ffffff; |
| 706 | box-shadow: 0 0 6px rgba(255, 255, 255, 0.5); |
| 707 | cursor: ew-resize; |
| 708 | } |
| 709 | .scrubber-range::-webkit-slider-runnable-track { |
| 710 | background: transparent; |
| 711 | } |
| 712 | .scrubber-range::-moz-range-track { |
| 713 | background: transparent; |
| 714 | } |
| 715 | |
| 716 | /* ---- 代码高亮(rehype-highlight / hljs):克制的粉彩令牌色, |
| 717 | 与实体色板同族——颜色属于内容,chrome 保持无色 ---- */ |
| 718 | .u-chat-prose .hljs-comment, |
| 719 | .u-chat-prose .hljs-quote { |
| 720 | color: #7d8590; |
| 721 | font-style: italic; |
| 722 | } |
| 723 | .u-chat-prose .hljs-keyword, |
| 724 | .u-chat-prose .hljs-selector-tag, |
| 725 | .u-chat-prose .hljs-meta { |
| 726 | color: #9fa8ff; |
| 727 | } |
| 728 | .u-chat-prose .hljs-string, |
| 729 | .u-chat-prose .hljs-regexp, |
| 730 | .u-chat-prose .hljs-addition { |
| 731 | color: #63e2b7; |
| 732 | } |
| 733 | .u-chat-prose .hljs-number, |
| 734 | .u-chat-prose .hljs-literal, |
| 735 | .u-chat-prose .hljs-symbol { |
| 736 | color: #ffd479; |
| 737 | } |
| 738 | .u-chat-prose .hljs-title, |
| 739 | .u-chat-prose .hljs-title.function_, |
| 740 | .u-chat-prose .hljs-section { |
| 741 | color: #7fd0ff; |
| 742 | } |
| 743 | .u-chat-prose .hljs-type, |
| 744 | .u-chat-prose .hljs-built_in, |
| 745 | .u-chat-prose .hljs-class .hljs-title { |
| 746 | color: #5fd4d0; |
| 747 | } |
| 748 | .u-chat-prose .hljs-attr, |
| 749 | .u-chat-prose .hljs-attribute, |
| 750 | .u-chat-prose .hljs-variable, |
| 751 | .u-chat-prose .hljs-template-variable { |
| 752 | color: #c4a5ff; |
| 753 | } |
| 754 | .u-chat-prose .hljs-deletion { |
| 755 | color: #ff8a9e; |
| 756 | } |
| 757 | |
| 758 | /* 对话气泡内的 markdown:紧凑排版,色彩服从气泡 */ |
| 759 | .u-chat-prose > :first-child { |
| 760 | margin-top: 0; |
| 761 | } |
| 762 | .u-chat-prose > :last-child { |
| 763 | margin-bottom: 0; |
| 764 | } |
| 765 | .u-chat-prose p { |
| 766 | margin: 0.4em 0; |
| 767 | } |
| 768 | .u-chat-prose ul, |
| 769 | .u-chat-prose ol { |
| 770 | margin: 0.4em 0; |
| 771 | padding-left: 1.25em; |
| 772 | } |
| 773 | .u-chat-prose ul { |
| 774 | list-style: disc; |
| 775 | } |
| 776 | .u-chat-prose ol { |
| 777 | list-style: decimal; |
| 778 | } |
| 779 | .u-chat-prose li { |
| 780 | margin: 0.15em 0; |
| 781 | } |
| 782 | .u-chat-prose strong { |
| 783 | color: #ffffff; |
| 784 | font-weight: 600; |
| 785 | } |
| 786 | .u-chat-prose h1, |
| 787 | .u-chat-prose h2, |
| 788 | .u-chat-prose h3 { |
| 789 | font-weight: 600; |
| 790 | color: #ffffff; |
| 791 | margin: 0.7em 0 0.3em; |
| 792 | font-size: 1em; |
| 793 | } |
| 794 | /* 分割线(模型爱写 ---):几乎隐形的发丝线,只当呼吸口,不当版面元素 */ |
| 795 | .u-chat-prose hr { |
| 796 | border: 0; |
| 797 | border-top: 1px solid var(--u-line); |
| 798 | margin: 1em 0; |
| 799 | } |
| 800 | .u-chat-prose code { |
| 801 | font-size: 0.85em; |
| 802 | background: rgba(255, 255, 255, 0.08); |
| 803 | border-radius: 4px; |
| 804 | padding: 0.1em 0.35em; |
| 805 | } |
| 806 | .u-chat-prose pre { |
| 807 | background: rgba(0, 0, 0, 0.45); |
| 808 | border: 1px solid var(--u-line); |
| 809 | border-radius: 8px; |
| 810 | padding: 0.6em 0.8em; |
| 811 | overflow-x: auto; |
| 812 | margin: 0.5em 0; |
| 813 | } |
| 814 | .u-chat-prose pre code { |
| 815 | background: transparent; |
| 816 | padding: 0; |
| 817 | } |
| 818 | .u-chat-prose table { |
| 819 | border-collapse: collapse; |
| 820 | margin: 0.5em 0; |
| 821 | font-size: 0.9em; |
| 822 | } |
| 823 | .u-chat-prose th, |
| 824 | .u-chat-prose td { |
| 825 | border: 1px solid var(--u-line-strong); |
| 826 | padding: 0.25em 0.6em; |
| 827 | } |
| 828 | .u-chat-prose a { |
| 829 | text-decoration: underline; |
| 830 | text-underline-offset: 2px; |
| 831 | } |
| 832 | .u-chat-prose blockquote { |
| 833 | border-left: 2px solid var(--u-line-strong); |
| 834 | padding-left: 0.75em; |
| 835 | color: var(--u-text-2); |
| 836 | margin: 0.4em 0; |
| 837 | } |
| 838 | |
| 839 | /* 左下控件塔:**整组一起展开**,不是逐个按钮。 |
| 840 | 一组是一个语义单元(派生 / 布局 / 相机),鼠标进了这一组, |
| 841 | 这一组的名字就都该出来——逐个展开的话,名字会随指针跳来跳去, |
| 842 | 而人想知道的往往正是"旁边那个是什么"。 |
| 843 | |
| 844 | 用 max-width 而不是 width 做过渡:名字长短不一,写死宽度要么截断 |
| 845 | 要么留白,max-width 让每个按钮按自己的内容收放。 |
| 846 | overflow-hidden 已经在组容器上了,收起时不会漏字。 */ |
| 847 | .u-tower-label { |
| 848 | max-width: 0; |
| 849 | overflow: hidden; |
| 850 | white-space: nowrap; |
| 851 | opacity: 0; |
| 852 | font-size: 11px; |
| 853 | line-height: 1; |
| 854 | /* 图标与文字之间的空当用 **margin**,既不能用按钮上的 gap,也不能用 padding: |
| 855 | gap 对宽度为 0 的项目照样生效;而 padding 不会被 max-width 压缩 |
| 856 | (border-box 下宽度最小就等于那点 padding)——两种写法都会让收起态 |
| 857 | 凭空多出 8px,方块就不方了。实测 39x31,改成 margin 后才是 31x31 */ |
| 858 | margin-left: 0; |
| 859 | transition: |
| 860 | max-width 220ms ease, |
| 861 | margin-left 220ms ease, |
| 862 | opacity 160ms ease; |
| 863 | } |
| 864 | .u-tower:hover .u-tower-label { |
| 865 | max-width: 9rem; |
| 866 | margin-left: 0.5rem; |
| 867 | opacity: 1; |
| 868 | } |
| 869 | /* 键盘走焦点时也要出来:只认 hover 的话,用键盘的人永远看不到名字 */ |
| 870 | .u-tower:focus-within .u-tower-label { |
| 871 | max-width: 9rem; |
| 872 | margin-left: 0.5rem; |
| 873 | opacity: 1; |
| 874 | } |
| 875 | @media (prefers-reduced-motion: reduce) { |
| 876 | .u-tower-label { |
| 877 | transition: none; |
| 878 | } |
| 879 | } |