BlueGit

projects-timfalken-com meteors

Files

meteors / build / style.css

style.css

style.css 8.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 -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] { 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 {
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) {
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 { 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 { 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 {
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 {
231 z-index: 5;
232 overflow: auto;
233 text-align: center;
234 padding: 32px 16px 48px;
235}
236#online-panel .who {
237 color: #c5cae0;
238 margin: 0 0 16px;
239}
240#online-panel .notice {
241 max-width: 36em;
242 margin: 0 auto 16px;
243 text-align: left;
244 line-height: 1.45;
245 color: #c5cae0;
246}
247#online-panel code {
248 font-size: 0.92em;
249 color: #ffe27a;
250}
251#online-panel a { color: #9ec5ff; }
252.error {
253 color: #ffb0a0;
254 margin: 8px 0;
255}
256.notice {
257 background: rgba(20, 24, 48, 0.7);
258 border: 1px solid #3a4268;
259 border-radius: 12px;
260 padding: 14px 16px;
261}
262.join-form {
263 display: flex;
264 gap: 8px;
265 justify-content: center;
266 align-items: flex-end;
267 flex-wrap: wrap;
268 margin: 16px 0;
269}
270.join-form label {
271 display: flex;
272 flex-direction: column;
273 align-items: flex-start;
274 font-size: 13px;
275 color: #9aa3c2;
276}
277.join-form input {
278 font-size: 22px;
279 letter-spacing: 0.2em;
280 text-transform: uppercase;
281 width: 8em;
282 padding: 8px 10px;
283 border-radius: 8px;
284 border: 1px solid #6a7394;
285 background: #141a33;
286 color: #fff6c8;
287 font-family: inherit;
288 text-align: center;
289}
290.lobby-code {
291 font-size: clamp(22px, 6vw, 34px);
292 margin: 8px 0 16px;
293 color: #ffe27a;
294}
295.btn-tiny {
296 font-size: 13px;
297 padding: 4px 10px;
298 margin-left: 8px;
299 border-radius: 999px;
300 border: 1px solid #6a7394;
301 background: #1b2038;
302 color: #e8eaf2;
303 cursor: pointer;
304 font-family: inherit;
305 letter-spacing: 0;
306 vertical-align: middle;
307}
308.player-list {
309 list-style: none;
310 padding: 0;
311 margin: 0 auto 18px;
312 max-width: 22em;
313 text-align: left;
314}
315.player-list li {
316 display: flex;
317 justify-content: space-between;
318 padding: 8px 12px;
319 border-bottom: 1px solid #2a3150;
320 color: #e8eaf2;
321}
322.player-list .ready { color: #8eec9a; }
323.player-list .waiting { color: #8e95b3; }
324.player-list .you { font-weight: 700; }
325.lobby-actions {
326 display: flex;
327 gap: 10px;
328 justify-content: center;
329 flex-wrap: wrap;
330 margin-top: 12px;
331}
332
333#minis {
334 position: fixed;
335 top: 0;
336 left: 0;
337 right: 0;
338 z-index: 4;
339 display: flex;
340 gap: 10px;
341 justify-content: center;
342 align-items: flex-end;
343 flex-wrap: wrap;
344 padding: 6px 8px 0;
345 pointer-events: none;
346}
347.mini {
348 text-align: center;
349 color: #c5cae0;
350 font-size: 11px;
351 min-width: 72px;
352}
353.mini-name {
354 max-width: 90px;
355 overflow: hidden;
356 text-overflow: ellipsis;
357 white-space: nowrap;
358 font-weight: 700;
359}
360.mini-canvas {
361 display: block;
362 width: 80px;
363 height: 104px;
364 background: #0c1020;
365 border: 1px solid #2a3150;
366 border-radius: 4px;
367 image-rendering: pixelated;
368}
369.mini.eliminated { opacity: 0.45; }
370.mini.eliminated .mini-meta { color: #ffb0a0; }
371
372#flights {
373 position: fixed;
374 inset: 0;
375 z-index: 6;
376 pointer-events: none;
377 overflow: visible;
378}
379#flights .flight {
380 position: fixed;
381 top: 0;
382 left: 0;
383 width: 40px;
384 height: 40px;
385 will-change: transform;
386 pointer-events: none;
387}
388
389#spectator h2, #podium h2 {
390 color: #ffe27a;
391}
392.podium-list {
393 list-style: none;
394 padding: 0;
395 margin: 16px auto;
396 max-width: 16em;
397 font-size: clamp(20px, 5vw, 28px);
398}
399.podium-list li {
400 padding: 6px 0;
401 color: #e8eaf2;
402}
403.podium-list li:first-child { color: #ffe27a; font-size: 1.2em; font-weight: 700; }
404.podium-list li:nth-child(2) { color: #d0d6ea; }
405.podium-list li:nth-child(3) { color: #e0a878; }
406
407@media (max-height: 520px) {
408 #online-panel .hint, #online-panel .tagline { display: block; }
409 .mini-canvas { width: 56px; height: 73px; }
410}