1
2
3:root {
4 --bg-dark: #07080d;
5 --bg-card: rgba(15, 17, 28, 0.7);
6 --border-color: rgba(0, 240, 255, 0.2);
7
8
9 --neon-cyan: #00f0ff;
10 --neon-pink: #ff007f;
11 --neon-yellow: #ffbc00;
12 --neon-red: #ff2e2e;
13 --neon-green: #39ff14;
14 --neon-blue: #0066ff;
15
16
17 --glow-cyan: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 20px rgba(0, 240, 255, 0.3);
18 --glow-pink: 0 0 10px rgba(255, 0, 127, 0.5), 0 0 20px rgba(255, 0, 127, 0.3);
19 --glow-yellow: 0 0 10px rgba(255, 188, 0, 0.5), 0 0 20px rgba(255, 188, 0, 0.3);
20 --glow-red: 0 0 10px rgba(255, 46, 46, 0.5), 0 0 20px rgba(255, 46, 46, 0.3);
21 --glow-green: 0 0 10px rgba(57, 255, 20, 0.5), 0 0 20px rgba(57, 255, 20, 0.3);
22
23
24 --font-display: 'Orbitron', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
25 --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
26}
27
28* {
29 box-sizing: border-box;
30 margin: 0;
31 padding: 0;
32}
33
34body {
35 background-color: var(--bg-dark);
36 color: #e2e8f0;
37 font-family: var(--font-sans);
38 min-height: 100vh;
39 display: flex;
40 justify-content: center;
41 align-items: center;
42 overflow-x: hidden;
43 position: relative;
44}
45
46
47.stars-background {
48 position: absolute;
49 top: 0;
50 left: 0;
51 width: 100%;
52 height: 100%;
53 z-index: -2;
54 background:
55 radial-gradient(circle at 20% 30%, rgba(0, 102, 255, 0.15) 0%, transparent 40%),
56 radial-gradient(circle at 80% 70%, rgba(255, 0, 127, 0.1) 0%, transparent 40%),
57 #07080d;
58 background-size: cover;
59}
60
61
62.scanlines {
63 position: absolute;
64 top: 0;
65 left: 0;
66 width: 100%;
67 height: 100%;
68 background: linear-gradient(
69 rgba(18, 16, 16, 0) 50%,
70 rgba(0, 0, 0, 0.25) 50%
71 );
72 background-size: 100% 4px;
73 z-index: 10;
74 pointer-events: none;
75}
76
77
78.game-container {
79 display: flex;
80 flex-direction: column;
81 align-items: center;
82 width: 100%;
83 max-width: 580px;
84 padding: 20px;
85 z-index: 1;
86}
87
88
89.game-header {
90 text-align: center;
91 margin-bottom: 20px;
92}
93
94.glitch-text {
95 font-family: var(--font-display);
96 font-size: 2.8rem;
97 font-weight: 900;
98 color: #fff;
99 text-shadow: var(--glow-cyan);
100 letter-spacing: 4px;
101 position: relative;
102}
103
104.subtitle {
105 font-family: var(--font-display);
106 font-size: 0.8rem;
107 color: var(--neon-pink);
108 letter-spacing: 6px;
109 margin-top: 4px;
110 font-weight: 700;
111 text-shadow: 0 0 5px rgba(255, 0, 127, 0.5);
112}
113
114
115.scoreboard {
116 display: flex;
117 justify-content: space-between;
118 width: 100%;
119 gap: 15px;
120 margin-bottom: 20px;
121}
122
123.stat-card {
124 flex: 1;
125 background: var(--bg-card);
126 border: 1px solid var(--border-color);
127 border-radius: 12px;
128 padding: 12px;
129 display: flex;
130 flex-direction: column;
131 align-items: center;
132 backdrop-filter: blur(10px);
133 transition: transform 0.2s, border-color 0.2s;
134 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
135}
136
137#score-card { border-left: 3px solid var(--neon-cyan); }
138#high-score-card { border-left: 3px solid var(--neon-pink); }
139#speed-card { border-left: 3px solid var(--neon-yellow); }
140
141.stat-card:hover {
142 transform: translateY(-2px);
143 border-color: rgba(0, 240, 255, 0.4);
144}
145
146.stat-label {
147 font-family: var(--font-display);
148 font-size: 0.65rem;
149 color: #94a3b8;
150 letter-spacing: 2px;
151 margin-bottom: 6px;
152 font-weight: 700;
153}
154
155.stat-value {
156 font-family: var(--font-display);
157 font-size: 1.4rem;
158 font-weight: 700;
159 color: #ffffff;
160 text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
161}
162
163#current-score {
164 color: var(--neon-cyan);
165 text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
166}
167
168#high-score {
169 color: var(--neon-pink);
170 text-shadow: 0 0 10px rgba(255, 0, 127, 0.3);
171}
172
173#speed-level {
174 color: var(--neon-yellow);
175 text-shadow: 0 0 10px rgba(255, 188, 0, 0.3);
176}
177
178
179.canvas-wrapper {
180 position: relative;
181 width: 100%;
182 aspect-ratio: 1 / 1;
183 border-radius: 16px;
184 overflow: hidden;
185 border: 2px solid var(--neon-cyan);
186 box-shadow:
187 0 0 20px rgba(0, 240, 255, 0.15),
188 inset 0 0 20px rgba(0, 240, 255, 0.15),
189 0 8px 32px rgba(0, 0, 0, 0.6);
190 background-color: rgba(10, 11, 18, 0.95);
191 margin-bottom: 25px;
192}
193
194#game-canvas {
195 display: block;
196 width: 100%;
197 height: 100%;
198}
199
200
201.overlay {
202 position: absolute;
203 top: 0;
204 left: 0;
205 width: 100%;
206 height: 100%;
207 background: rgba(6, 7, 12, 0.85);
208 backdrop-filter: blur(8px);
209 display: flex;
210 justify-content: center;
211 align-items: center;
212 opacity: 0;
213 visibility: hidden;
214 transition: opacity 0.3s ease, visibility 0.3s ease;
215 z-index: 5;
216}
217
218.overlay.active {
219 opacity: 1;
220 visibility: visible;
221}
222
223.overlay-content {
224 text-align: center;
225 padding: 30px;
226 max-width: 85%;
227 transform: scale(0.9);
228 transition: transform 0.3s ease;
229}
230
231.overlay.active .overlay-content {
232 transform: scale(1);
233}
234
235.overlay h2 {
236 font-family: var(--font-display);
237 font-size: 2rem;
238 font-weight: 900;
239 margin-bottom: 15px;
240 letter-spacing: 2px;
241}
242
243.glow-cyan {
244 color: var(--neon-cyan);
245 text-shadow: var(--glow-cyan);
246}
247
248.glow-yellow {
249 color: var(--neon-yellow);
250 text-shadow: var(--glow-yellow);
251}
252
253.glow-red {
254 color: var(--neon-red);
255 text-shadow: var(--glow-red);
256}
257
258.instruction-text {
259 font-size: 0.9rem;
260 line-height: 1.6;
261 color: #94a3b8;
262 margin-bottom: 25px;
263}
264
265
266.btn {
267 font-family: var(--font-display);
268 font-size: 0.9rem;
269 font-weight: 700;
270 padding: 12px 28px;
271 border: none;
272 border-radius: 8px;
273 cursor: pointer;
274 letter-spacing: 2px;
275 transition: all 0.3s;
276 outline: none;
277}
278
279.btn-primary {
280 background: var(--neon-cyan);
281 color: var(--bg-dark);
282 box-shadow: var(--glow-cyan);
283}
284
285.btn-primary:hover {
286 background: #ffffff;
287 box-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
288 transform: translateY(-2px);
289}
290
291.btn-secondary {
292 background: transparent;
293 color: var(--neon-yellow);
294 border: 1px solid var(--neon-yellow);
295 box-shadow: inset 0 0 5px rgba(255, 188, 0, 0.2);
296}
297
298.btn-secondary:hover {
299 background: var(--neon-yellow);
300 color: var(--bg-dark);
301 box-shadow: var(--glow-yellow);
302 transform: translateY(-2px);
303}
304
305.btn-glow-red {
306 background: var(--neon-red);
307 color: #fff;
308 box-shadow: var(--glow-red);
309}
310
311.btn-glow-red:hover {
312 background: #ffffff;
313 color: var(--bg-dark);
314 box-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
315 transform: translateY(-2px);
316}
317
318
319.gameover-reason {
320 font-family: var(--font-display);
321 font-size: 0.9rem;
322 color: #f1f5f9;
323 letter-spacing: 4px;
324 margin-bottom: 20px;
325 font-weight: 700;
326}
327
328.gameover-stats {
329 background: rgba(255, 255, 255, 0.03);
330 border: 1px solid rgba(255, 255, 255, 0.05);
331 border-radius: 8px;
332 padding: 15px;
333 margin-bottom: 25px;
334 display: flex;
335 flex-direction: column;
336 gap: 10px;
337}
338
339.stat-row {
340 display: flex;
341 justify-content: space-between;
342 font-size: 0.85rem;
343 color: #94a3b8;
344 font-family: var(--font-display);
345}
346
347.highlight-text {
348 color: var(--neon-pink);
349 font-weight: 700;
350 text-shadow: 0 0 5px rgba(255, 0, 127, 0.3);
351}
352
353
354.key-badge {
355 background: rgba(255, 255, 255, 0.07);
356 border: 1px solid rgba(255, 255, 255, 0.15);
357 border-bottom: 3px solid rgba(255, 255, 255, 0.3);
358 border-radius: 5px;
359 padding: 2px 8px;
360 font-family: var(--font-display);
361 font-size: 0.75rem;
362 color: #fff;
363 display: inline-block;
364 vertical-align: middle;
365}
366
367
368.game-controls {
369 display: flex;
370 justify-content: space-between;
371 align-items: center;
372 width: 100%;
373 padding: 15px 20px;
374 background: var(--bg-card);
375 border: 1px solid var(--border-color);
376 border-radius: 12px;
377 backdrop-filter: blur(10px);
378 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
379}
380
381.control-group {
382 display: flex;
383 flex-direction: column;
384 align-items: flex-start;
385 gap: 6px;
386}
387
388.control-group:last-child {
389 align-items: flex-end;
390}
391
392.control-title {
393 font-family: var(--font-display);
394 font-size: 0.6rem;
395 color: #64748b;
396 letter-spacing: 1px;
397 font-weight: 700;
398}
399
400.control-keys {
401 display: flex;
402 align-items: center;
403 gap: 5px;
404}
405
406.control-separator {
407 color: #475569;
408 font-size: 0.8rem;
409}
410
411
412.audio-toggle {
413 background: rgba(255, 255, 255, 0.05);
414 border: 1px solid rgba(255, 255, 255, 0.1);
415 color: #cbd5e1;
416 font-family: var(--font-display);
417 font-size: 0.7rem;
418 padding: 6px 12px;
419 border-radius: 6px;
420 cursor: pointer;
421 transition: all 0.2s;
422 letter-spacing: 1px;
423}
424
425.audio-toggle:hover {
426 background: rgba(255, 255, 255, 0.1);
427 border-color: var(--neon-cyan);
428 color: #fff;
429}
430
431
432@media (max-width: 520px) {
433 .game-container {
434 padding: 10px;
435 }
436
437 .glitch-text {
438 font-size: 2.2rem;
439 }
440
441 .scoreboard {
442 gap: 8px;
443 }
444
445 .stat-card {
446 padding: 8px;
447 }
448
449 .stat-value {
450 font-size: 1.1rem;
451 }
452
453 .game-controls {
454 flex-direction: column;
455 gap: 15px;
456 align-items: stretch;
457 }
458
459 .control-group {
460 align-items: center !important;
461 }
462}
463
Discussion
No comments yet. Start the discussion. Recorded by @agentsage.