BlueGit

projects-timfalken-com meteors

Files

meteors / build / style.css

style.css

style.css 13.3 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], #flights-back[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#minis.sides {
354 inset: 0;
355 display: block;
356 padding: 0;
357 overflow: visible;
358 max-height: none;
359 gap: 0;
360}
361#minis.sides .mini {
362 position: absolute;
363 margin: 0;
364 min-width: 0;
365}
366#minis.sides .mini-name {
367 max-width: 100%;
368}
369.mini {
370 text-align: center;
371 color: #c5cae0;
372 font-size: 11px;
373 min-width: 72px;
374}
375.mini-name {
376 max-width: 90px;
377 overflow: hidden;
378 text-overflow: ellipsis;
379 white-space: nowrap;
380 font-weight: 700;
381}
382.mini-canvas {
383 display: block;
384 width: 80px;
385 height: 104px;
386 background: #0c1020;
387 border: 1px solid #2a3150;
388 border-radius: 4px;
389 image-rendering: pixelated;
390}
391.mini.eliminated { opacity: 0.45; }
392.mini.eliminated .mini-meta { color: #ffb0a0; }
393
394#flights {
395 position: fixed;
396 inset: 0;
397 z-index: 6;
398 pointer-events: none;
399 overflow: visible;
400}
401/* Enemy-to-enemy arcs: above the starfield and minis, but the field
402 rectangle is clipped out so they pass behind the player's field (t1125). */
403#flights-back {
404 position: fixed;
405 inset: 0;
406 z-index: 5;
407 pointer-events: none;
408 overflow: visible;
409}
410#flights .flight,
411#flights-back .flight {
412 position: fixed;
413 top: 0;
414 left: 0;
415 width: 40px;
416 height: 40px;
417 will-change: transform;
418 pointer-events: none;
419}
420
421#spectator h2, #podium h2 {
422 color: #ffe27a;
423}
424.podium-list {
425 list-style: none;
426 padding: 0;
427 margin: 16px auto;
428 max-width: 16em;
429 font-size: clamp(20px, 5vw, 28px);
430}
431.podium-list li {
432 padding: 6px 0;
433 color: #e8eaf2;
434}
435.podium-list li:first-child { color: #ffe27a; font-size: 1.2em; font-weight: 700; }
436.podium-list li:nth-child(2) { color: #d0d6ea; }
437.podium-list li:nth-child(3) { color: #e0a878; }
438
439@media (max-height: 520px) {
440 #online-panel .hint, #online-panel .tagline { display: block; }
441 .mini-canvas { width: 56px; height: 73px; }
442}
443
444/* Stage 3: planet (field) selection */
445#planet-select {
446 justify-content: flex-start;
447 overflow-y: auto;
448 touch-action: pan-y;
449 -webkit-overflow-scrolling: touch;
450 padding-top: 20px;
451 padding-bottom: 32px;
452}
453#planet-select h1 {
454 font-size: clamp(32px, 9vw, 64px);
455 margin-bottom: 4px;
456}
457#planet-select .tagline { margin-bottom: 16px; }
458.planet-grid {
459 display: grid;
460 grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
461 gap: 12px;
462 width: min(1000px, 100%);
463 margin: 0 auto 16px;
464 text-align: left;
465 touch-action: pan-y;
466}
467.planet-card {
468 appearance: none;
469 display: block;
470 width: 100%;
471 margin: 0;
472 padding: 12px 14px 10px;
473 border: 1px solid rgba(200, 210, 240, 0.16);
474 border-radius: 14px;
475 background: rgba(16, 20, 40, 0.72);
476 color: inherit;
477 font: inherit;
478 text-align: left;
479 cursor: pointer;
480 touch-action: manipulation;
481 transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
482}
483.planet-card:hover, .planet-card:focus-visible {
484 border-color: rgba(255, 226, 122, 0.55);
485 outline: none;
486}
487.planet-card.selected {
488 border-color: #ffe27a;
489 box-shadow: 0 0 0 2px rgba(255, 226, 122, 0.35), 0 8px 24px rgba(0,0,0,0.35);
490 background: rgba(40, 32, 16, 0.78);
491}
492.planet-card .planet-title {
493 font-size: 1.15rem;
494 font-weight: 700;
495 letter-spacing: 0.03em;
496 color: #fff6c8;
497}
498.planet-card .planet-people {
499 font-size: 0.85rem;
500 color: #8e95b3;
501 margin: 0 0 6px;
502}
503.planet-card .planet-nums {
504 font-variant-numeric: tabular-nums;
505 font-size: 0.78rem;
506 color: #c5cae0;
507 letter-spacing: 0.01em;
508 line-height: 1.35;
509 margin: 0 0 8px;
510}
511.planet-card .planet-swatches {
512 display: flex;
513 gap: 6px;
514 align-items: center;
515}
516.planet-card .planet-swatches img {
517 width: 26px;
518 height: 26px;
519 image-rendering: auto;
520 flex: 0 0 auto;
521}
522.planet-actions {
523 display: flex;
524 gap: 12px;
525 flex-wrap: wrap;
526 justify-content: center;
527 margin-top: 8px;
528 flex-shrink: 0;
529}
530.planet-grid.compact {
531 grid-template-columns: repeat(4, minmax(0, 1fr));
532 gap: 8px;
533 width: min(920px, 92vw);
534 min-width: min(920px, 92vw);
535 max-height: none;
536 overflow: visible;
537 touch-action: pan-y;
538 margin-bottom: 10px;
539 align-self: center;
540}
541@media (max-width: 720px) {
542 .planet-grid.compact {
543 grid-template-columns: repeat(2, minmax(0, 1fr));
544 }
545}
546.planet-grid.compact .planet-card { padding: 6px 8px; }
547.planet-grid.compact .planet-title { font-size: 1rem; }
548.planet-grid.compact .planet-nums { font-size: 0.7rem; margin-bottom: 6px; }
549.planet-grid.compact .planet-swatches img { width: 20px; height: 20px; }
550.lobby-planet-label { margin: 8px 0 6px; }
551.player-list .planet-tag {
552 display: block;
553 font-size: 0.78rem;
554 font-weight: 500;
555 color: #9aa3c4;
556}
557#online-lobby {
558 overflow-y: auto;
559 touch-action: pan-y;
560 -webkit-overflow-scrolling: touch;
561 justify-content: flex-start;
562 padding-top: 8px;
563}
564@media (max-width: 520px) {
565 .planet-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
566 .planet-card .planet-nums { font-size: 0.68rem; }
567 .planet-card { padding: 10px 8px 8px; }
568}
569
570/* t1106: on-screen log for ?debug=drag */
571#drag-debug {
572 position: fixed;
573 left: 6px;
574 right: 6px;
575 bottom: 6px;
576 z-index: 50;
577 pointer-events: none;
578 background: rgba(8, 10, 22, 0.82);
579 color: #c6f6c8;
580 font: 11px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
581 padding: 8px 10px;
582 border-radius: 6px;
583 border: 1px solid #3a6;
584 white-space: pre-wrap;
585 word-break: break-word;
586 max-height: 28vh;
587 overflow: hidden;
588}
589
590
591/* ---- Offline Strijd (t1119), chain bonus (t1120), column warn (t1123) ---- */
592.hud-offline {
593 position: absolute;
594 left: 50%;
595 transform: translateX(-50%);
596 bottom: 6px;
597 font-size: 12px;
598 color: #c5cae0;
599 white-space: nowrap;
600 letter-spacing: 0.02em;
601 pointer-events: none;
602}
603.hud-sep { opacity: 0.55; margin: 0 0.25em; }
604#chain-indicator {
605 position: absolute;
606 left: 50%;
607 transform: translateX(-50%);
608 top: 100%;
609 margin-top: 4px;
610 color: #ffe27a;
611 font-weight: 700;
612 font-size: 14px;
613 text-shadow: 0 1px 4px #000;
614 pointer-events: none;
615 z-index: 5;
616}
617#offline-result h2 { color: #ffe27a; }
618#minis {
619 overflow: auto;
620 flex-wrap: wrap;
621}
622#minis.crowded .mini { min-width: 44px; }
623#minis.crowded .mini-canvas {
624 width: 56px;
625 height: 73px;
626}
627@media (max-width: 520px) {
628 .hud-offline { font-size: 11px; bottom: 4px; }
629}