BlueGit

projects-timfalken-com meteors

Files

meteors / build / style.css

style.css

style.css 11.5 KiB Download Raw
1/* Meteors — responsive, portrait-friendly, no page scroll during play. */
2*, *::before, *::after { box-sizing: border-box; }
3
4html, body {
5 margin: 0;
6 padding: 0;
7 width: 100%;
8 height: 100%;
9 overflow: hidden;
10 background: #0b1020;
11 color: #e8eaf2;
12 font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
13 touch-action: none;
14 -webkit-user-select: none;
15 user-select: none;
16 -webkit-tap-highlight-color: transparent;
17}
18
19#stars {
20 position: fixed;
21 inset: 0;
22 pointer-events: none;
23 background:
24 radial-gradient(1px 1px at 12% 18%, #fff 0 50%, transparent 51%),
25 radial-gradient(1px 1px at 28% 72%, #cde 0 50%, transparent 51%),
26 radial-gradient(1.5px 1.5px at 47% 32%, #fff 0 50%, transparent 51%),
27 radial-gradient(1px 1px at 63% 81%, #bbd 0 50%, transparent 51%),
28 radial-gradient(1px 1px at 81% 22%, #fff 0 50%, transparent 51%),
29 radial-gradient(1.5px 1.5px at 91% 64%, #def 0 50%, transparent 51%),
30 radial-gradient(1px 1px at 8% 88%, #fff 0 50%, transparent 51%),
31 radial-gradient(2px 2px at 72% 48%, #89a 0 50%, transparent 51%),
32 linear-gradient(180deg, #0b1020 0%, #141a33 55%, #1a1440 100%);
33 z-index: 0;
34}
35
36.screen {
37 position: fixed;
38 inset: 0;
39 z-index: 5;
40 display: flex;
41 flex-direction: column;
42 align-items: center;
43 justify-content: center;
44 padding: 24px 20px;
45 text-align: center;
46}
47
48.screen[hidden], #hud[hidden], #game-over[hidden], #online-panel[hidden], #minis[hidden], #spectator[hidden], #podium[hidden], #flights[hidden], #planet-select[hidden] { display: none !important; }
49
50h1 {
51 font-size: clamp(48px, 14vw, 96px);
52 letter-spacing: 0.06em;
53 margin: 0 0 8px;
54 font-weight: 800;
55 background: linear-gradient(180deg, #fff6c8 0%, #ff9a3a 45%, #e85d3a 100%);
56 -webkit-background-clip: text;
57 background-clip: text;
58 color: transparent;
59 filter: drop-shadow(0 2px 12px rgba(232, 93, 58, 0.55));
60}
61
62.tagline {
63 margin: 0 0 28px;
64 font-size: clamp(15px, 3.6vw, 20px);
65 color: #c5cae0;
66 max-width: 28em;
67}
68
69#btn-play, #btn-planet-go {
70 appearance: none;
71 border: 0;
72 cursor: pointer;
73 font: inherit;
74 font-size: clamp(20px, 5vw, 28px);
75 font-weight: 700;
76 letter-spacing: 0.08em;
77 text-transform: uppercase;
78 color: #1a1020;
79 background: linear-gradient(180deg, #ffe27a, #f0c53a 40%, #e89a20);
80 padding: 14px 48px;
81 border-radius: 999px;
82 box-shadow:
83 0 0 0 3px rgba(255, 220, 120, 0.25),
84 0 8px 24px rgba(240, 197, 58, 0.45);
85 touch-action: manipulation;
86 min-height: 52px;
87 min-width: 200px;
88}
89
90#btn-play:is(:hover, :focus-visible), #btn-planet-go:is(:hover, :focus-visible) {
91 transform: translateY(-1px);
92 box-shadow:
93 0 0 0 3px rgba(255, 220, 120, 0.4),
94 0 10px 28px rgba(240, 197, 58, 0.6);
95}
96
97#btn-play:active, #btn-planet-go:active { transform: translateY(1px); }
98
99.last-score {
100 margin: 22px 0 0;
101 font-size: clamp(16px, 4vw, 22px);
102 color: #ffe27a;
103}
104
105.hint {
106 margin: 36px auto 0;
107 max-width: 32em;
108 font-size: clamp(13px, 3.2vw, 16px);
109 line-height: 1.45;
110 color: #8e95b3;
111}
112
113#hud {
114 position: fixed;
115 top: 0;
116 left: 0;
117 right: 0;
118 z-index: 4;
119 display: flex;
120 justify-content: space-between;
121 align-items: flex-start;
122 padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 4px;
123 pointer-events: none;
124 text-shadow: 0 1px 4px #000;
125 gap: 12px;
126}
127
128.hud-label {
129 font-size: 11px;
130 letter-spacing: 0.14em;
131 text-transform: uppercase;
132 color: #9aa3c2;
133}
134
135#score {
136 font-size: clamp(28px, 8vw, 42px);
137 font-weight: 800;
138 line-height: 1;
139 color: #fff6c8;
140}
141
142#planet-name {
143 font-weight: 700;
144 font-size: clamp(14px, 3.5vw, 18px);
145 text-align: right;
146}
147
148#planet-stats {
149 font-variant-numeric: tabular-nums;
150 font-size: clamp(11px, 2.8vw, 14px);
151 color: #b7bdd4;
152 text-align: right;
153 white-space: nowrap;
154}
155
156.overlay {
157 background: rgba(8, 10, 22, 0.78);
158 backdrop-filter: blur(6px);
159}
160
161.overlay h2 {
162 font-size: clamp(32px, 9vw, 56px);
163 margin: 0 0 8px;
164 color: #ffb0a0;
165}
166
167.go-score {
168 font-size: clamp(20px, 5vw, 28px);
169 color: #ffe27a;
170 margin-top: 18px;
171}
172
173/* Framework canvases sit on the body. Keep them above the starfield, below HUD. */
174canvas {
175 z-index: 2;
176 touch-action: none;
177 display: block;
178}
179
180/* Very narrow / short phones: shrink hints so the Play button stays on screen. */
181@media (max-height: 520px) {
182 .hint { display: none; }
183 h1 { font-size: 42px; }
184 #btn-play, #btn-planet-go { padding: 10px 36px; }
185}
186
187
188/* ---- Stage 2: online, lobby, miniatures, flights, podium ---- */
189
190#btn-online, .btn-secondary, a.button {
191 margin-top: 12px;
192 padding: 10px 36px;
193 font-size: clamp(16px, 4vw, 20px);
194 border: 1px solid #6a7394;
195 border-radius: 999px;
196 color: #e8eaf2;
197 background: linear-gradient(180deg, #2a3150, #1b2038);
198 cursor: pointer;
199 text-decoration: none;
200 display: inline-block;
201 font-family: inherit;
202}
203#btn-online:is(:hover, :focus-visible),
204.btn-secondary:is(:hover, :focus-visible),
205a.button:is(:hover, :focus-visible) {
206 border-color: #ffe27a;
207 color: #fff6c8;
208}
209#btn-create, #btn-join, #btn-ready, #btn-start, #btn-spectate,
210#btn-play, #btn-planet-go {
211 /* play already styled */
212}
213
214#btn-create, #btn-join, #btn-ready, #btn-start, #btn-spectate {
215 padding: 10px 28px;
216 font-size: clamp(16px, 4vw, 20px);
217 border: 0;
218 border-radius: 999px;
219 color: #1a1020;
220 background: linear-gradient(180deg, #ffe27a, #f0c53a 40%, #e89a20);
221 cursor: pointer;
222 font-weight: 700;
223 font-family: inherit;
224}
225#btn-start:disabled, #btn-ready:disabled {
226 opacity: 0.45;
227 cursor: default;
228}
229
230#online-panel h1 {
231 font-size: clamp(36px, 9vw, 64px);
232}
233#online-panel {
234 z-index: 5;
235 overflow: auto;
236 text-align: center;
237 padding: 16px 16px 24px;
238}
239#online-panel .who {
240 color: #c5cae0;
241 margin: 0 0 8px;
242}
243#online-lobby .tagline { margin-bottom: 8px; }
244#online-lobby .lobby-code { margin: 4px 0 6px; }
245#online-panel .notice {
246 max-width: 36em;
247 margin: 0 auto 16px;
248 text-align: left;
249 line-height: 1.45;
250 color: #c5cae0;
251}
252#online-panel code {
253 font-size: 0.92em;
254 color: #ffe27a;
255}
256#online-panel a { color: #9ec5ff; }
257.error {
258 color: #ffb0a0;
259 margin: 8px 0;
260}
261.notice {
262 background: rgba(20, 24, 48, 0.7);
263 border: 1px solid #3a4268;
264 border-radius: 12px;
265 padding: 14px 16px;
266}
267.join-form {
268 display: flex;
269 gap: 8px;
270 justify-content: center;
271 align-items: flex-end;
272 flex-wrap: wrap;
273 margin: 16px 0;
274}
275.join-form label {
276 display: flex;
277 flex-direction: column;
278 align-items: flex-start;
279 font-size: 13px;
280 color: #9aa3c2;
281}
282.join-form input {
283 font-size: 22px;
284 letter-spacing: 0.2em;
285 text-transform: uppercase;
286 width: 8em;
287 padding: 8px 10px;
288 border-radius: 8px;
289 border: 1px solid #6a7394;
290 background: #141a33;
291 color: #fff6c8;
292 font-family: inherit;
293 text-align: center;
294}
295.lobby-code {
296 font-size: clamp(22px, 6vw, 34px);
297 margin: 8px 0 16px;
298 color: #ffe27a;
299}
300.btn-tiny {
301 font-size: 13px;
302 padding: 4px 10px;
303 margin-left: 8px;
304 border-radius: 999px;
305 border: 1px solid #6a7394;
306 background: #1b2038;
307 color: #e8eaf2;
308 cursor: pointer;
309 font-family: inherit;
310 letter-spacing: 0;
311 vertical-align: middle;
312}
313.player-list {
314 list-style: none;
315 padding: 0;
316 margin: 0 auto 18px;
317 max-width: 22em;
318 text-align: left;
319}
320.player-list li {
321 display: flex;
322 justify-content: space-between;
323 padding: 8px 12px;
324 border-bottom: 1px solid #2a3150;
325 color: #e8eaf2;
326}
327.player-list .ready { color: #8eec9a; }
328.player-list .waiting { color: #8e95b3; }
329.player-list .you { font-weight: 700; }
330.lobby-actions {
331 display: flex;
332 gap: 10px;
333 justify-content: center;
334 flex-wrap: wrap;
335 margin-top: 12px;
336}
337
338#minis {
339 position: fixed;
340 top: 0;
341 left: 0;
342 right: 0;
343 z-index: 4;
344 display: flex;
345 gap: 10px;
346 justify-content: center;
347 align-items: flex-end;
348 flex-wrap: wrap;
349 padding: 6px 8px 0;
350 pointer-events: none;
351}
352.mini {
353 text-align: center;
354 color: #c5cae0;
355 font-size: 11px;
356 min-width: 72px;
357}
358.mini-name {
359 max-width: 90px;
360 overflow: hidden;
361 text-overflow: ellipsis;
362 white-space: nowrap;
363 font-weight: 700;
364}
365.mini-canvas {
366 display: block;
367 width: 80px;
368 height: 104px;
369 background: #0c1020;
370 border: 1px solid #2a3150;
371 border-radius: 4px;
372 image-rendering: pixelated;
373}
374.mini.eliminated { opacity: 0.45; }
375.mini.eliminated .mini-meta { color: #ffb0a0; }
376
377#flights {
378 position: fixed;
379 inset: 0;
380 z-index: 6;
381 pointer-events: none;
382 overflow: visible;
383}
384#flights .flight {
385 position: fixed;
386 top: 0;
387 left: 0;
388 width: 40px;
389 height: 40px;
390 will-change: transform;
391 pointer-events: none;
392}
393
394#spectator h2, #podium h2 {
395 color: #ffe27a;
396}
397.podium-list {
398 list-style: none;
399 padding: 0;
400 margin: 16px auto;
401 max-width: 16em;
402 font-size: clamp(20px, 5vw, 28px);
403}
404.podium-list li {
405 padding: 6px 0;
406 color: #e8eaf2;
407}
408.podium-list li:first-child { color: #ffe27a; font-size: 1.2em; font-weight: 700; }
409.podium-list li:nth-child(2) { color: #d0d6ea; }
410.podium-list li:nth-child(3) { color: #e0a878; }
411
412@media (max-height: 520px) {
413 #online-panel .hint, #online-panel .tagline { display: block; }
414 .mini-canvas { width: 56px; height: 73px; }
415}
416
417/* Stage 3: planet (field) selection */
418#planet-select {
419 justify-content: flex-start;
420 overflow-y: auto;
421 touch-action: pan-y;
422 -webkit-overflow-scrolling: touch;
423 padding-top: 20px;
424 padding-bottom: 32px;
425}
426#planet-select h1 {
427 font-size: clamp(32px, 9vw, 64px);
428 margin-bottom: 4px;
429}
430#planet-select .tagline { margin-bottom: 16px; }
431.planet-grid {
432 display: grid;
433 grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
434 gap: 12px;
435 width: min(1000px, 100%);
436 margin: 0 auto 16px;
437 text-align: left;
438 touch-action: pan-y;
439}
440.planet-card {
441 appearance: none;
442 display: block;
443 width: 100%;
444 margin: 0;
445 padding: 12px 14px 10px;
446 border: 1px solid rgba(200, 210, 240, 0.16);
447 border-radius: 14px;
448 background: rgba(16, 20, 40, 0.72);
449 color: inherit;
450 font: inherit;
451 text-align: left;
452 cursor: pointer;
453 touch-action: manipulation;
454 transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
455}
456.planet-card:hover, .planet-card:focus-visible {
457 border-color: rgba(255, 226, 122, 0.55);
458 outline: none;
459}
460.planet-card.selected {
461 border-color: #ffe27a;
462 box-shadow: 0 0 0 2px rgba(255, 226, 122, 0.35), 0 8px 24px rgba(0,0,0,0.35);
463 background: rgba(40, 32, 16, 0.78);
464}
465.planet-card .planet-title {
466 font-size: 1.15rem;
467 font-weight: 700;
468 letter-spacing: 0.03em;
469 color: #fff6c8;
470}
471.planet-card .planet-people {
472 font-size: 0.85rem;
473 color: #8e95b3;
474 margin: 0 0 6px;
475}
476.planet-card .planet-nums {
477 font-variant-numeric: tabular-nums;
478 font-size: 0.78rem;
479 color: #c5cae0;
480 letter-spacing: 0.01em;
481 line-height: 1.35;
482 margin: 0 0 8px;
483}
484.planet-card .planet-swatches {
485 display: flex;
486 gap: 6px;
487 align-items: center;
488}
489.planet-card .planet-swatches img {
490 width: 26px;
491 height: 26px;
492 image-rendering: auto;
493 flex: 0 0 auto;
494}
495.planet-actions {
496 display: flex;
497 gap: 12px;
498 flex-wrap: wrap;
499 justify-content: center;
500 margin-top: 8px;
501 flex-shrink: 0;
502}
503.planet-grid.compact {
504 grid-template-columns: repeat(4, minmax(0, 1fr));
505 gap: 8px;
506 width: min(920px, 92vw);
507 min-width: min(920px, 92vw);
508 max-height: none;
509 overflow: visible;
510 touch-action: pan-y;
511 margin-bottom: 10px;
512 align-self: center;
513}
514@media (max-width: 720px) {
515 .planet-grid.compact {
516 grid-template-columns: repeat(2, minmax(0, 1fr));
517 }
518}
519.planet-grid.compact .planet-card { padding: 6px 8px; }
520.planet-grid.compact .planet-title { font-size: 1rem; }
521.planet-grid.compact .planet-nums { font-size: 0.7rem; margin-bottom: 6px; }
522.planet-grid.compact .planet-swatches img { width: 20px; height: 20px; }
523.lobby-planet-label { margin: 8px 0 6px; }
524.player-list .planet-tag {
525 display: block;
526 font-size: 0.78rem;
527 font-weight: 500;
528 color: #9aa3c4;
529}
530#online-lobby {
531 overflow-y: auto;
532 touch-action: pan-y;
533 -webkit-overflow-scrolling: touch;
534 justify-content: flex-start;
535 padding-top: 8px;
536}
537@media (max-width: 520px) {
538 .planet-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
539 .planet-card .planet-nums { font-size: 0.68rem; }
540 .planet-card { padding: 10px 8px 8px; }
541}