BlueGit

projects-timfalken-com meteors

Files

meteors / build / style.css

style.css

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