forked from cmalpass/tiny-rex
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
102 lines (93 loc) · 2.45 KB
/
Copy pathstyles.css
File metadata and controls
102 lines (93 loc) · 2.45 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
/* Tiny Rex: Crystal Valley — page shell, letterboxed canvas, touch controls */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
height: 100%;
overflow: hidden;
overscroll-behavior: none;
background: #12203a;
font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
}
#game-shell {
position: fixed;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
}
#game {
display: block;
touch-action: none;
background: #79d0f0;
/* Crisp pixels for the procedural art */
image-rendering: auto;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
border-radius: 8px;
}
/* HUD buttons (pause + mute): 44px+ targets, high contrast */
.hud-btn {
position: absolute;
top: 14px;
min-width: 48px;
min-height: 48px;
font-size: 22px;
line-height: 1;
border: none;
border-radius: 12px;
cursor: pointer;
background: rgba(16, 30, 54, 0.78);
color: #ffffff;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
-webkit-tap-highlight-color: transparent;
touch-action: manipulation;
font-family: inherit;
}
.hud-btn:hover { background: rgba(30, 50, 88, 0.92); }
.hud-btn:focus-visible { outline: 3px solid #ffd23e; outline-offset: 2px; }
#pauseBtn { right: 70px; }
#muteBtn { right: 14px; }
/* Touch controls: hidden on desktop, shown for coarse pointers / first touch.
Every button is at least 44x44 CSS px (88px here) for comfortable targets. */
#touch-controls {
position: absolute;
left: 0;
right: 0;
bottom: 0;
padding: 0 22px 26px;
display: none;
justify-content: space-between;
align-items: flex-end;
pointer-events: none;
user-select: none;
-webkit-user-select: none;
}
#touch-controls.visible { display: flex; }
.tc-cluster { display: flex; gap: 18px; pointer-events: auto; }
.tc-btn {
width: 88px;
height: 88px;
border: none;
border-radius: 50%;
font-size: 34px;
color: #ffffff;
background: rgba(20, 36, 64, 0.55);
border: 3px solid rgba(255, 255, 255, 0.65);
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
touch-action: none;
-webkit-tap-highlight-color: transparent;
user-select: none;
}
.tc-btn.pressed, .tc-btn:active {
background: rgba(255, 210, 62, 0.55);
transform: scale(0.94);
}
.tc-jump {
pointer-events: auto;
background: rgba(63, 163, 77, 0.55);
}
@media (max-width: 640px) {
.hud-btn { top: 10px; }
#pauseBtn { right: 60px; }
#muteBtn { right: 10px; }
#touch-controls { padding: 0 14px 18px; }
.tc-btn { width: 74px; height: 74px; font-size: 28px; }
}