Files
gen2d/frontend/src/styles/global.css
T
wonder a2736f722c feat(frontend): 构建前端 MVP,实现完整 UI 框架与 mock 数据层
- 安装 zustand + react-router-dom 依赖
- 修复 Vite 代理配置,添加 /auth 路由转发
- 实现 API 封装层(client.ts 统一 fetch、auth.ts 真实调用)
- 实现 mock 数据层(mock.ts 模拟 WebSocket 管线进度)
- 实现 4 个 zustand stores(auth/project/task/generation)
- 实现 5 个组件(StyleSelector/PromptEditor/GenerateForm/ProgressBar/AssetPreview)
- 实现 5 个页面(Login/Register/Project/Generate/Result)
- 实现路由含 ProtectedRoute 守卫
- 添加暗色主题全局样式
- 更新前端文档与 API 文档
2026-05-24 14:18:39 +08:00

118 lines
1.9 KiB
CSS

:root {
--bg-primary: #1a1a2e;
--bg-secondary: #16213e;
--bg-card: #0f3460;
--bg-input: #1a1a3e;
--text-primary: #e0e0e0;
--text-secondary: #a0a0a0;
--text-muted: #666;
--accent: #e94560;
--accent-hover: #ff6b81;
--accent-dim: rgba(233, 69, 96, 0.15);
--success: #4ade80;
--warning: #fbbf24;
--error: #ef4444;
--border: #2a2a4a;
--radius: 8px;
--radius-lg: 12px;
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
'Helvetica Neue', Arial, sans-serif;
background-color: var(--bg-primary);
color: var(--text-primary);
line-height: 1.6;
min-height: 100vh;
}
a {
color: var(--accent);
text-decoration: none;
}
a:hover {
color: var(--accent-hover);
}
input,
textarea,
select,
button {
font-family: inherit;
font-size: inherit;
color: inherit;
}
input,
textarea,
select {
background: var(--bg-input);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 10px 14px;
outline: none;
transition: border-color 0.2s;
}
input:focus,
textarea:focus,
select:focus {
border-color: var(--accent);
}
button {
cursor: pointer;
border: none;
border-radius: var(--radius);
padding: 10px 20px;
font-weight: 600;
transition: all 0.2s;
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn-primary {
background: var(--accent);
color: #fff;
}
.btn-primary:hover:not(:disabled) {
background: var(--accent-hover);
}
.btn-secondary {
background: transparent;
color: var(--text-primary);
border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) {
border-color: var(--accent);
color: var(--accent);
}
.card {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 24px;
}
.container {
max-width: 960px;
margin: 0 auto;
padding: 0 20px;
}