00e1845f2c
- 消除 !important 滥用:134 → 49(仅保留 Leaflet/图表所必需项),浅色主题使用 html.light 选择器获得更高优先级 - 修复 font-weight:13 个文件中所有 760/850/860/880/950 等非标准值已映射为 Inter 支持的 300–800 - 移除未加载的 Geist 字体声明,替换为 Inter - 添加全局 :focus-visible 轮廓环、跳过链接、Tab ARIA 属性(role/aria-selected) - 统一断点体系:18 → 10(480/640/768/960/1024/1200/1280/1360/1440/1680) - 创建 scan-root-styles.ts 桶文件,将 22 个 CSS Module 导入合并为 1 个 - Token 迁移:10 个文件中数百处硬编码颜色(#4DA3FF/#E6EDF3/#9FB2C7/#6B7A90)已替换为 CSS 变量 - 去重 @keyframes:spin 4→1、loading-spin 2→0、pulse-pending 已移至 globals.css - 添加统一的 empty/error/retry 状态组件 - 添加全局 prefers-reduced-motion 支持 - 修复 accent-primary 与 accent-secondary 相同值的问题 - 修复 accent-green 类错误渲染为蓝色 - 添加 CSS 渐变品牌 Logo - 移除死代码(1,697 行):public/static/style.css + public/legacy/index.html - Dashboard.module.css 本地变量已桥接至全局 token - 提升文字对比度:#6B7A90 → #7D8FA3 Fixed: !important-134-to-49, font-weight-13-files, Geist-removal, focus-visible, breakpoints-18-to-10, CSS-module-barrel, token-migration-10-files, keyframe-dedup, dead-code-removal, accent-color-fix, contrast-improvement Scope: frontend CSS architecture, design tokens, accessibility, responsive breakpoints Tested: npx tsc --noEmit
317 lines
6.6 KiB
CSS
317 lines
6.6 KiB
CSS
/* Scan terminal empty, loading, error, and skeleton signal states. */
|
|
|
|
/* ── Empty state ── */
|
|
.root :global(.scan-empty-state) {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: 48px 32px;
|
|
text-align: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.root :global(.scan-empty-icon) {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 14px;
|
|
background: rgba(77, 163, 255, 0.1);
|
|
border: 1px solid rgba(77, 163, 255, 0.16);
|
|
display: grid;
|
|
place-items: center;
|
|
color: var(--color-accent-secondary);
|
|
font-size: 20px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.root :global(.scan-empty-title) {
|
|
font-size: 20px;
|
|
font-weight: 800;
|
|
color: #e8f2ff;
|
|
}
|
|
|
|
.root :global(.scan-empty-copy) {
|
|
max-width: 360px;
|
|
font-size: 14px;
|
|
color: #8fa4c3;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* ── Error state ── */
|
|
.root :global(.scan-error-state) {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: 48px 32px;
|
|
text-align: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.root :global(.scan-error-icon) {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 14px;
|
|
background: rgba(239, 68, 68, 0.1);
|
|
border: 1px solid rgba(239, 68, 68, 0.2);
|
|
display: grid;
|
|
place-items: center;
|
|
color: #FCA5A5;
|
|
font-size: 20px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.root :global(.scan-error-title) {
|
|
font-size: 20px;
|
|
font-weight: 800;
|
|
color: #e8f2ff;
|
|
}
|
|
|
|
.root :global(.scan-error-copy) {
|
|
max-width: 360px;
|
|
font-size: 14px;
|
|
color: #8fa4c3;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.root :global(.scan-retry-button) {
|
|
margin-top: 8px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
min-height: 40px;
|
|
padding: 10px 16px;
|
|
border: 1px solid rgba(77, 163, 255, 0.3);
|
|
border-radius: 12px;
|
|
background: rgba(77, 163, 255, 0.12);
|
|
color: #9ecbff;
|
|
font-size: 13px;
|
|
font-weight: 800;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.root :global(.scan-retry-button:hover) {
|
|
background: rgba(77, 163, 255, 0.18);
|
|
border-color: rgba(111, 183, 255, 0.48);
|
|
}
|
|
|
|
.root :global(.scan-loading-state) {
|
|
flex: 1;
|
|
min-height: 520px;
|
|
display: grid;
|
|
place-items: center;
|
|
padding: 48px 32px;
|
|
text-align: center;
|
|
}
|
|
|
|
.root :global(.scan-loading-signal) {
|
|
position: relative;
|
|
width: min(100%, 420px);
|
|
display: grid;
|
|
justify-items: center;
|
|
gap: 18px;
|
|
padding: 28px 30px;
|
|
border: 1px solid rgba(125, 211, 252, 0.14);
|
|
border-radius: 28px;
|
|
background:
|
|
radial-gradient(circle at 18% 18%, rgba(77, 163, 255, 0.18), transparent 34%),
|
|
linear-gradient(145deg, rgba(12, 20, 36, 0.92), rgba(5, 11, 22, 0.74));
|
|
box-shadow:
|
|
0 22px 70px rgba(0, 0, 0, 0.3),
|
|
inset 0 1px 0 rgba(255, 255, 255, 0.05);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.root :global(.scan-loading-signal::before) {
|
|
content: "";
|
|
position: absolute;
|
|
inset: 0;
|
|
background: linear-gradient(
|
|
100deg,
|
|
transparent 0%,
|
|
rgba(125, 211, 252, 0.08) 42%,
|
|
rgba(34, 197, 94, 0.1) 50%,
|
|
transparent 58%
|
|
);
|
|
transform: translateX(-120%);
|
|
animation: scan-loading-sweep 2.6s ease-in-out infinite;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.root :global(.scan-loading-signal.compact) {
|
|
width: min(100%, 340px);
|
|
gap: 12px;
|
|
padding: 18px 20px;
|
|
border-radius: 22px;
|
|
background:
|
|
radial-gradient(circle at 20% 20%, rgba(77, 163, 255, 0.14), transparent 36%),
|
|
rgba(10, 18, 32, 0.62);
|
|
box-shadow: none;
|
|
}
|
|
|
|
.root :global(.scan-loading-decision-flow) {
|
|
position: relative;
|
|
z-index: 1;
|
|
display: grid;
|
|
grid-template-columns: 16px minmax(70px, 1fr) 16px minmax(70px, 1fr) 16px;
|
|
align-items: center;
|
|
width: min(100%, 300px);
|
|
}
|
|
|
|
.root :global(.scan-loading-node) {
|
|
width: 16px;
|
|
height: 16px;
|
|
border: 1px solid rgba(226, 232, 240, 0.16);
|
|
border-radius: 999px;
|
|
background: #0b1220;
|
|
box-shadow: 0 0 0 5px rgba(77, 163, 255, 0.05);
|
|
}
|
|
|
|
.root :global(.scan-loading-node.hot) {
|
|
background: linear-gradient(135deg, #f97316, #fde047);
|
|
box-shadow: 0 0 24px rgba(251, 146, 60, 0.26);
|
|
}
|
|
|
|
.root :global(.scan-loading-node.market) {
|
|
background: linear-gradient(135deg, #38bdf8, var(--color-accent-primary));
|
|
box-shadow: 0 0 24px rgba(56, 189, 248, 0.26);
|
|
}
|
|
|
|
.root :global(.scan-loading-node.action) {
|
|
background: linear-gradient(135deg, #22c55e, #1be392);
|
|
box-shadow: 0 0 24px rgba(34, 197, 94, 0.3);
|
|
animation: scan-loading-node-breathe 1.8s ease-in-out infinite;
|
|
}
|
|
|
|
.root :global(.scan-loading-rail) {
|
|
position: relative;
|
|
height: 2px;
|
|
overflow: hidden;
|
|
background: rgba(148, 163, 184, 0.16);
|
|
}
|
|
|
|
.root :global(.scan-loading-rail i) {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 48%;
|
|
border-radius: 999px;
|
|
background: linear-gradient(90deg, transparent, #7dd3fc, #22c55e);
|
|
transform: translateX(-110%);
|
|
animation: scan-loading-rail-flow 1.55s ease-in-out infinite;
|
|
}
|
|
|
|
.root :global(.scan-loading-rail:nth-of-type(4) i) {
|
|
animation-delay: 0.45s;
|
|
}
|
|
|
|
.root :global(.scan-loading-copy-block) {
|
|
position: relative;
|
|
z-index: 1;
|
|
display: grid;
|
|
gap: 7px;
|
|
justify-items: center;
|
|
}
|
|
|
|
.root :global(.scan-loading-copy-block strong) {
|
|
color: var(--color-text-primary);
|
|
font-size: 18px;
|
|
font-weight: 900;
|
|
letter-spacing: -0.02em;
|
|
}
|
|
|
|
.root :global(.scan-loading-copy-block span) {
|
|
max-width: 320px;
|
|
color: var(--color-text-secondary);
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
line-height: 1.55;
|
|
}
|
|
|
|
.root :global(.scan-loading-signal-bars) {
|
|
position: relative;
|
|
z-index: 1;
|
|
display: flex;
|
|
align-items: end;
|
|
gap: 5px;
|
|
height: 28px;
|
|
}
|
|
|
|
.root :global(.scan-loading-signal-bars span) {
|
|
width: 7px;
|
|
min-height: 8px;
|
|
border-radius: 999px 999px 4px 4px;
|
|
background: linear-gradient(180deg, #7dd3fc, var(--color-accent-primary) 52%, #1be392);
|
|
opacity: 0.42;
|
|
transform-origin: center bottom;
|
|
animation: scan-loading-bars 1.35s ease-in-out infinite;
|
|
}
|
|
|
|
.root :global(.scan-loading-signal-bars span:nth-child(1)) {
|
|
height: 12px;
|
|
}
|
|
|
|
.root :global(.scan-loading-signal-bars span:nth-child(2)) {
|
|
height: 22px;
|
|
animation-delay: 0.16s;
|
|
}
|
|
|
|
.root :global(.scan-loading-signal-bars span:nth-child(3)) {
|
|
height: 16px;
|
|
animation-delay: 0.32s;
|
|
}
|
|
|
|
.root :global(.scan-loading-signal-bars span:nth-child(4)) {
|
|
height: 25px;
|
|
animation-delay: 0.48s;
|
|
}
|
|
|
|
@keyframes scan-loading-sweep {
|
|
0% {
|
|
transform: translateX(-130%);
|
|
}
|
|
46%,
|
|
100% {
|
|
transform: translateX(130%);
|
|
}
|
|
}
|
|
|
|
@keyframes scan-loading-rail-flow {
|
|
0% {
|
|
transform: translateX(-110%);
|
|
opacity: 0.15;
|
|
}
|
|
45% {
|
|
opacity: 1;
|
|
}
|
|
100% {
|
|
transform: translateX(220%);
|
|
opacity: 0.15;
|
|
}
|
|
}
|
|
|
|
@keyframes scan-loading-node-breathe {
|
|
0%,
|
|
100% {
|
|
transform: scale(0.92);
|
|
filter: saturate(0.9);
|
|
}
|
|
50% {
|
|
transform: scale(1.08);
|
|
filter: saturate(1.25);
|
|
}
|
|
}
|
|
|
|
@keyframes scan-loading-bars {
|
|
0%,
|
|
100% {
|
|
opacity: 0.38;
|
|
transform: scaleY(0.72);
|
|
}
|
|
50% {
|
|
opacity: 0.95;
|
|
transform: scaleY(1);
|
|
}
|
|
}
|