Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
583 lines (504 loc) · 12.3 KB
/
Copy pathstyle.css
File metadata and controls
583 lines (504 loc) · 12.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
/* Base styles and aesthetics */
body {
margin: 0;
overflow: hidden;
background-color: #050505;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
user-select: none;
}
#canvas-container {
width: 100vw;
height: 100vh;
}
/* Glassmorphism UI */
.glass-panel {
background: rgba(15, 23, 42, 0.85);
backdrop-filter: blur(12px);
border: 1px solid rgba(56, 189, 248, 0.1);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
/* Interactive elements styles */
.service-btn {
transition: all 0.2s ease;
}
.service-btn:hover {
transform: translateY(-2px);
box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
border-color: rgba(56, 189, 248, 0.5);
}
.service-btn:active {
transform: translateY(0);
}
.service-btn.active {
background: rgba(56, 189, 248, 0.2);
border: 1px solid #38bdf8;
box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.2);
}
.time-btn {
transition: all 0.1s ease;
}
.time-btn.active {
background: rgba(56, 189, 248, 0.4);
border-color: #38bdf8;
color: white;
}
.tooltip {
position: absolute;
pointer-events: none;
background: rgba(0, 0, 0, 0.9);
color: white;
padding: 8px 12px;
border-radius: 6px;
font-size: 12px;
display: none;
z-index: 100;
border: 1px solid #333;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
/* Onboarding Modal Styles */
.onboarding-step {
display: none;
}
.onboarding-step.active {
display: block;
animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.key-badge {
display: inline-block;
padding: 2px 6px;
border-radius: 4px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
font-family: monospace;
font-size: 0.8em;
color: #fff;
}
/* Custom Select Styles */
#lang-select option {
background-color: #1f2937; /* Tailwind gray-800 */
color: white;
}
/* Neon Green Pulse for Play Button */
.pulse-green {
background-color: #39ff14 !important;
color: #000 !important;
border-color: #39ff14 !important;
box-shadow: 0 0 10px #39ff14, 0 0 20px #39ff14;
animation: neonPulse 1.5s infinite;
}
@keyframes neonPulse {
0% {
box-shadow: 0 0 5px #39ff14, 0 0 10px #39ff14;
transform: scale(1);
}
50% {
box-shadow: 0 0 20px #39ff14, 0 0 30px #39ff14;
transform: scale(1.1);
}
100% {
box-shadow: 0 0 5px #39ff14, 0 0 10px #39ff14;
transform: scale(1);
}
}
/* Animation for Onboarding Flow */
.flow-container {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
margin-bottom: 20px;
}
.flow-node {
width: 40px;
height: 40px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
position: relative;
background: #1f2937;
border: 1px solid #374151;
}
.flow-line {
width: 60px;
height: 2px;
background: #4b5563;
position: relative;
}
.flow-packet {
width: 8px;
height: 8px;
border-radius: 50%;
background: #fff;
position: absolute;
top: -3px;
left: 0;
animation: flowMove 1.5s infinite linear;
}
@keyframes flowMove {
0% {
left: 0;
opacity: 0;
}
10% {
opacity: 1;
}
90% {
opacity: 1;
}
100% {
left: 100%;
opacity: 0;
}
}
/* Tutorial Styles */
#tutorial-popup {
transition: right 0.4s ease-out, bottom 0.4s ease-out, left 0.4s ease-out,
top 0.4s ease-out, transform 0.4s ease-out;
}
#tutorial-popup.tutorial-enter {
animation: tutorialFadeIn 0.5s ease-out;
}
@keyframes tutorialFadeIn {
from {
opacity: 0;
transform: translate(-50%, -50%) scale(0.9);
}
to {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
}
#tutorial-popup.tutorial-step-change {
animation: tutorialStepChange 0.3s ease-out;
}
@keyframes tutorialStepChange {
0% {
opacity: 1;
transform: scale(1);
}
50% {
opacity: 0.7;
transform: scale(0.97);
}
100% {
opacity: 1;
transform: scale(1);
}
}
#tutorial-highlight {
animation: tutorialHighlightPulse 1.5s infinite;
}
@keyframes tutorialHighlightPulse {
0%,
100% {
box-shadow: 0 0 15px rgba(6, 182, 212, 0.5), 0 0 30px rgba(6, 182, 212, 0.3);
}
50% {
box-shadow: 0 0 30px rgba(6, 182, 212, 0.8), 0 0 60px rgba(6, 182, 212, 0.5);
}
}
.tutorial-tool-highlight {
animation: toolHighlightPulse 1.2s infinite !important;
position: relative;
z-index: 100;
}
@keyframes toolHighlightPulse {
0%,
100% {
box-shadow: 0 0 10px rgba(6, 182, 212, 0.6),
inset 0 0 8px rgba(6, 182, 212, 0.2);
border-color: rgba(6, 182, 212, 0.8) !important;
transform: scale(1);
}
50% {
box-shadow: 0 0 25px rgba(6, 182, 212, 1), 0 0 40px rgba(6, 182, 212, 0.5),
inset 0 0 12px rgba(6, 182, 212, 0.3);
border-color: rgba(6, 182, 212, 1) !important;
transform: scale(1.05);
}
}
/* Intervention Warning Styles */
.intervention-warning {
animation: warningSlideIn 0.3s ease-out, warningPulse 1s ease-in-out infinite;
}
@keyframes warningSlideIn {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes warningPulse {
0%,
100% {
transform: scale(1);
box-shadow: 0 0 10px currentColor;
}
50% {
transform: scale(1.02);
box-shadow: 0 0 20px currentColor;
}
}
.warning-danger {
background: rgba(220, 38, 38, 0.9);
border-color: #ef4444;
color: #fecaca;
}
.warning-warning {
background: rgba(217, 119, 6, 0.9);
border-color: #f59e0b;
color: #fef3c7;
}
.warning-info {
background: rgba(37, 99, 235, 0.9);
border-color: #3b82f6;
color: #dbeafe;
}
/* Event indicator bar */
.event-active-bar {
animation: eventBarPulse 0.5s ease-in-out infinite alternate;
}
@keyframes eventBarPulse {
from {
opacity: 0.8;
}
to {
opacity: 1;
}
}
/* Achievement unlock toasts (#158) — celebration chrome, distinct from the
intervention-warning alarm styles above. */
.achievement-toast {
animation: achievementSlideIn 0.35s ease-out;
}
.achievement-toast-out {
transition: all 0.35s ease-in;
opacity: 0;
transform: translateX(24px);
}
@keyframes achievementSlideIn {
from {
opacity: 0;
transform: translateX(24px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
/* Desktop HUD columns. The panels used to be pinned at fixed offsets with no
idea of each other, of the screen's height or of the toolbar: the right
column grew past the bottom of the screen with nothing to scroll it (on a
1080p screen Finances ended 300px below the edge), the toolbar covered the
objectives and the metrics panel on any laptop, and at 1280x720 the
objectives sat on top of the stats.
Each side is now one column (#hudLeft, #hudRight in index.html) with a top
and a bottom: below the time controls' row, above the toolbar's band. What
does not fit scrolls inside its column. The left column pins the objectives
(or the sandbox controls) to its foot, where they always lived.
--hud-top is the height of the event banner while one is showing, so the
banner pushes the HUD down instead of covering the time controls.
--hud-bottom is the toolbar's band (131px tall at its widest category, plus
a gap); from 1680px wide the toolbar, 964px at most and centred, clears both
columns and they may run to the bottom of the screen. */
:root {
--hud-top: 0px;
--hud-bottom: 8.75rem;
}
body.event-active {
--hud-top: 2rem;
}
@media (min-width: 1680px) {
:root {
--hud-bottom: 1rem;
}
}
.hud-col {
position: absolute;
top: calc(1rem + var(--hud-top));
bottom: var(--hud-bottom);
display: flex;
flex-direction: column;
gap: 0.75rem;
overflow-y: auto;
overscroll-behavior: contain;
scrollbar-width: thin;
pointer-events: none;
}
.hud-col > * {
flex-shrink: 0;
}
.hud-col-left {
left: 1rem;
align-items: flex-start;
}
.hud-col-right {
right: 1rem;
align-items: flex-end;
}
/* Centred dialogs (main menu, Save, Share). Auto margins centre the card while
it fits and give way when it doesn't, so a card taller than the screen
scrolls from its top instead of being cut off at both ends. */
.dialog-overlay {
overflow-y: auto;
overscroll-behavior: contain;
padding: 1rem;
}
.dialog-overlay > * {
margin: auto;
}
/* Repair table: the header and each row are separate grids, so the number
columns have fixed widths to line up. 3.75rem holds the widest Repair header
(German, 57px); the auto-repair header wraps to two lines inside 5rem. */
.repair-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) 3.75rem 5rem;
column-gap: 0.25rem;
}
.repair-grid > * {
overflow-wrap: anywhere;
}
#sandboxPanel,
#objectivesPanel {
margin-top: auto;
}
#timeControls {
top: calc(1rem + var(--hud-top));
}
#intervention-warnings {
top: calc(5rem + var(--hud-top));
}
/* Narrower than this, the 405px time controls reach the 320px stats panel and
the right column's first panel; start both columns below their row. */
@media (max-width: 1099px) {
.hud-col {
top: calc(5.25rem + var(--hud-top));
}
}
/* Phone HUD (#12). Everything below is inert on a screen at least 768px wide
and 501px tall: the tab strip is display:none there and every rule that
touches a panel sits inside the media query, so a desktop layout is
unchanged.
Narrower than that, the six panels cannot share the screen — side by side
they need about 640px, and stacked they cover the whole board. Shorter than
that (a phone held sideways, ~375px), the stats panel alone is taller than
the screen. Either way each panel opens on its own from #hudTabs
(src/ui/hud-tabs.js adds .m-open). An open panel never overrides .hidden:
the game still decides whether objectives or the sandbox panel exists in
this mode; the tab only decides whether it is shown. */
.hud-tabs {
display: none;
}
.hud-tab {
width: 2.5rem;
height: 2.5rem;
display: flex;
align-items: center;
justify-content: center;
border-radius: 0.5rem;
color: #9ca3af;
}
.hud-tab[aria-pressed="true"] {
color: #fff;
background: rgba(56, 189, 248, 0.25);
}
@media (max-width: 767px), (max-height: 500px) {
#timeControls {
top: calc(0.5rem + var(--hud-top));
gap: 0.375rem;
max-width: calc(100vw - 1rem);
overflow-x: auto;
}
#timeControls > * {
flex-shrink: 0;
}
#timeControls .time-btn {
width: 2.125rem;
height: 2.125rem;
}
.hud-tabs {
display: flex;
position: absolute;
top: calc(4rem + var(--hud-top));
left: 50%;
transform: translateX(-50%);
/* Never wider than the screen. Wider, it pushed the page into sideways
scroll, which is the first thing this block exists to stop: seven
buttons already overran a 320px phone. Past the cap it scrolls inside
itself, as the time controls do. */
max-width: calc(100vw - 0.5rem);
overflow-x: auto;
}
.hud-tabs > * {
flex-shrink: 0;
}
/* Warnings and hints. Pinned at left:50% and shifted back by half its own
width, the container only ever had half the screen to lay out in, so on
a phone every message wrapped into a column ~190px wide. Spanning the
screen, its children still centre themselves. Below the tab row, not
behind it. */
#intervention-warnings {
top: calc(7.25rem + var(--hud-top));
left: 0.5rem;
right: 0.5rem;
transform: none;
}
#statsPanel,
#objectivesPanel,
#sandboxPanel,
#detailsPanel,
#healthPanel,
#metricsPanel,
#financesPanel {
position: fixed;
top: calc(7.25rem + var(--hud-top));
left: 0.5rem;
right: 0.5rem;
bottom: auto;
width: auto;
max-width: 24rem;
max-height: min(50vh, calc(100vh - 15rem));
overflow-y: auto;
z-index: 30;
}
#statsPanel:not(.m-open),
#objectivesPanel:not(.m-open),
#sandboxPanel:not(.m-open),
#detailsPanel:not(.m-open),
#healthPanel:not(.m-open),
#metricsPanel:not(.m-open),
#financesPanel:not(.m-open) {
display: none;
}
}
/* Build-tool key hints (#70). A screen with no hover is almost always a touch
screen with no keyboard, where a letter in the corner is only clutter. */
@media (hover: none) {
.key-hint {
display: none;
}
}
/* The narrowest phones (360px is the most common Android width) get slightly
smaller HUD tabs, so the whole row fits without scrolling. 36px still clears
the 34px the phone time controls use. */
@media (max-width: 380px) {
.hud-tab {
width: 2.25rem;
height: 2.25rem;
}
}