返回 oh-my-ppt
index.css
根目录 / src / renderer / src / index.css
1 /* Tailwind CSS v4 - loaded via local package imports */
2 @import "tailwindcss/theme.css" layer(theme);
3 @import "tailwindcss/preflight.css" layer(base);
4 @import "tailwindcss/utilities.css" layer(utilities);
5
6 @font-face {
7 font-family: "Elms Sans";
8 src: url("./assets/fonts/ElmsSans-Light.ttf") format("truetype");
9 font-weight: 300;
10 font-style: normal;
11 font-display: swap;
12 }
13
14 @font-face {
15 font-family: "Elms Sans";
16 src: url("./assets/fonts/ElmsSans-Regular.ttf") format("truetype");
17 font-weight: 400;
18 font-style: normal;
19 font-display: swap;
20 }
21
22 @font-face {
23 font-family: "Elms Sans";
24 src: url("./assets/fonts/ElmsSans-Bold.ttf") format("truetype");
25 font-weight: 700;
26 font-style: normal;
27 font-display: swap;
28 }
29
30 /* Custom theme */
31 @theme {
32 --color-background: #f5f1e8;
33 --color-foreground: #3e4a32;
34 --color-card: rgba(255, 251, 244, 0.88);
35 --color-card-foreground: #3e4a32;
36 --color-primary: #5d6b4d;
37 --color-primary-foreground: #ffffff;
38 --color-secondary: #e8e0d0;
39 --color-secondary-foreground: #4f5f42;
40 --color-muted: #efe7d7;
41 --color-muted-foreground: #7a8369;
42 --color-accent: #d4e4c1;
43 --color-accent-foreground: #3e4a32;
44 --color-destructive: #b15a58;
45 --color-destructive-foreground: #ffffff;
46 --color-border: rgba(161, 142, 112, 0.26);
47 --color-input: rgba(78, 96, 64, 0.12);
48 --color-ring: #8fbc8f;
49 }
50
51 * {
52 border-color: var(--color-border);
53 }
54
55 html,
56 body,
57 #root {
58 height: 100%;
59 }
60
61 body {
62 background-color: var(--color-background);
63 color: var(--color-foreground);
64 font-family: "Elms Sans", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
65 text-rendering: optimizeLegibility;
66 background-image:
67 radial-gradient(circle at 12% 8%, rgba(212, 228, 193, 0.55), transparent 32%),
68 radial-gradient(circle at 88% 0%, rgba(200, 184, 158, 0.38), transparent 30%),
69 linear-gradient(145deg, #f5f1e8 0%, #f1eadb 48%, #ece3cf 100%);
70 }
71
72 /* Global scrollbar theme (Windows + macOS + Firefox) */
73 :root {
74 --scrollbar-thumb: rgba(116, 136, 90, 0.72);
75 --scrollbar-thumb-hover: rgba(99, 120, 73, 0.86);
76 --scrollbar-track: rgba(232, 223, 205, 0.62);
77 }
78
79 * {
80 scrollbar-width: thin; /* Firefox */
81 scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); /* Firefox */
82 }
83
84 *::-webkit-scrollbar {
85 width: 10px;
86 height: 10px;
87 }
88
89 *::-webkit-scrollbar-track {
90 background: var(--scrollbar-track);
91 border-radius: 999px;
92 }
93
94 *::-webkit-scrollbar-thumb {
95 background: linear-gradient(180deg, rgba(128, 149, 101, 0.9), rgba(106, 127, 80, 0.9));
96 border: 2px solid rgba(242, 233, 217, 0.78);
97 border-radius: 999px;
98 }
99
100 *::-webkit-scrollbar-thumb:hover {
101 background: var(--scrollbar-thumb-hover);
102 }
103
104 *::-webkit-scrollbar-corner {
105 background: transparent;
106 }
107
108 #root {
109 min-height: 100%;
110 }
111
112 :root {
113 --app-titlebar-height: 48px;
114 --app-titlebar-control-safe-area: 136px;
115 }
116
117 .app-drag-region {
118 -webkit-app-region: drag;
119 user-select: none;
120 }
121
122 .app-no-drag {
123 -webkit-app-region: no-drag;
124 }
125
126 /* Reserve space for custom titlebar on Windows/Linux */
127 .app-titlebar-spacer {
128 height: var(--app-titlebar-height);
129 flex-shrink: 0;
130 }
131
132 .app-titlebar {
133 height: var(--app-titlebar-height);
134 flex-shrink: 0;
135 }
136
137 .app-titlebar-content {
138 padding-left: 64px;
139 padding-right: var(--app-titlebar-control-safe-area);
140 }
141
142 .app-shell {
143 animation: shell-enter 280ms ease-out;
144 }
145
146 .soft-card {
147 background: linear-gradient(165deg, rgba(255, 252, 247, 0.93), rgba(244, 238, 225, 0.88));
148 box-shadow: 0 14px 34px rgba(88, 75, 56, 0.12), 0 2px 8px rgba(79, 66, 49, 0.08);
149 border: 1px solid rgba(173, 154, 123, 0.35);
150 border-radius: 10px;
151 }
152
153 .soft-card-hover {
154 transition: all 180ms ease;
155 }
156
157 .soft-card-hover:hover {
158 box-shadow: 0 18px 36px rgba(92, 78, 57, 0.16), 0 4px 12px rgba(83, 70, 52, 0.1);
159 transform: translateY(-2px);
160 }
161
162 .soft-btn {
163 background: linear-gradient(145deg, rgba(255, 250, 242, 0.98), rgba(238, 227, 206, 0.95));
164 box-shadow: 0 8px 20px rgba(86, 72, 53, 0.13), 0 2px 6px rgba(86, 72, 53, 0.08);
165 border: 1px solid rgba(168, 148, 116, 0.36);
166 }
167
168 .soft-btn:hover {
169 box-shadow: 0 11px 24px rgba(86, 72, 53, 0.18), 0 3px 8px rgba(86, 72, 53, 0.1);
170 transform: translateY(-2px);
171 }
172
173 .soft-btn:active {
174 box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
175 transform: translateY(0);
176 }
177
178 .soft-input {
179 background: rgba(255, 251, 245, 0.8);
180 box-shadow: inset 0 2px 6px rgba(73, 61, 44, 0.08);
181 border: 1px solid rgba(148, 128, 94, 0.24);
182 }
183
184 .soft-input:focus {
185 background: rgba(255, 252, 248, 0.97);
186 border-color: #8fbc8f;
187 box-shadow: 0 0 0 3px rgba(143, 188, 143, 0.24);
188 }
189
190 .soft-surface,
191 .soft-surface-subtle,
192 .soft-titlebar {
193 background: rgba(255, 251, 244, 0.78);
194 box-shadow: 0 10px 28px rgba(86, 73, 54, 0.13), 0 2px 6px rgba(86, 73, 54, 0.08);
195 border: 1px solid rgba(166, 145, 110, 0.3);
196 }
197
198 .soft-inset {
199 background: rgba(247, 240, 226, 0.75);
200 box-shadow: inset 0 2px 6px rgba(85, 70, 50, 0.09);
201 border: 1px solid rgba(155, 134, 98, 0.28);
202 }
203
204 .soft-pill {
205 background: rgba(249, 244, 233, 0.9);
206 border: 1px solid rgba(166, 145, 110, 0.33);
207 box-shadow: 0 6px 14px rgba(85, 71, 51, 0.12), 0 1px 3px rgba(85, 71, 51, 0.06);
208 }
209
210 .soft-panel-edge {
211 border: 1px solid rgba(166, 145, 110, 0.3);
212 }
213
214 .organic-serif {
215 font-family: "Elms Sans", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
216 letter-spacing: 0.01em;
217 }
218
219 .organic-shape {
220 border-radius: 12px;
221 }
222
223 .leaf-shape {
224 border-radius: 12px;
225 }
226
227 /* App-wide radius scale: keep the UI soft, but avoid overly pill-like controls. */
228 .rounded-sm {
229 border-radius: 3px !important;
230 }
231
232 .rounded,
233 .rounded-md {
234 border-radius: 5px !important;
235 }
236
237 .rounded-lg {
238 border-radius: 8px !important;
239 }
240
241 .rounded-xl {
242 border-radius: 10px !important;
243 }
244
245 .rounded-2xl,
246 .rounded-3xl,
247 [class*="rounded-[1rem]"],
248 [class*="rounded-[1.15rem]"],
249 [class*="rounded-[1.25rem]"],
250 [class*="rounded-[1.35rem]"],
251 [class*="rounded-[1.4rem]"],
252 [class*="rounded-[1.5rem]"],
253 [class*="rounded-[1.55rem]"],
254 [class*="rounded-[2rem]"] {
255 border-radius: 12px !important;
256 }
257
258 .rounded-full,
259 [class*="rounded-[30%"],
260 [class*="rounded-[38%"],
261 [class*="rounded-[5%"] {
262 border-radius: 10px !important;
263 }
264
265 .session-create-workspace {
266 background: transparent !important;
267 }
268
269 @keyframes shell-enter {
270 from {
271 opacity: 0;
272 transform: translateY(10px);
273 }
274 to {
275 opacity: 1;
276 transform: translateY(0);
277 }
278 }
279
280 .gen-grid {
281 background-image:
282 linear-gradient(rgba(132, 141, 102, 0.16) 1px, transparent 1px),
283 linear-gradient(90deg, rgba(132, 141, 102, 0.16) 1px, transparent 1px);
284 background-size: 36px 36px;
285 animation: gen-grid-pan 18s linear infinite;
286 }
287
288 .gen-orb {
289 animation: gen-orb-float 9s ease-in-out infinite;
290 }
291
292 .gen-shimmer {
293 background-size: 220% 100%;
294 animation: gen-shimmer-slide 2.2s linear infinite;
295 }
296
297 @keyframes gen-grid-pan {
298 from {
299 transform: translate3d(0, 0, 0);
300 }
301 to {
302 transform: translate3d(-36px, -36px, 0);
303 }
304 }
305
306 @keyframes gen-orb-float {
307 0%,
308 100% {
309 transform: translateY(0px);
310 }
311 50% {
312 transform: translateY(-18px);
313 }
314 }
315
316 @keyframes gen-shimmer-slide {
317 from {
318 background-position: 0% 50%;
319 }
320 to {
321 background-position: 220% 50%;
322 }
323 }
324
324 lines CSS