-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
292 lines (254 loc) · 6.57 KB
/
style.css
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
body {
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #000;
height: 100vh;
overflow-y: auto; /* Make body scrollable */
overscroll-behavior: none; /* Prevent scrolling from affecting parent containers */
}
#gameContainer {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
height: 100%;
max-width: 800px;
padding: 10px;
box-sizing: border-box; /* Include padding and border in the element's total width and height */
opacity: 1;
filter: none;
transition: opacity 0.3s ease, filter 0.3s ease;
}
#gameContainer #canvasContainer {
position: relative; /* Important: This positions the #info div correctly */
display: flex;
justify-content: center;
align-items: center;
width: 100%;
max-width: 800px;
aspect-ratio: 800 / 600;
border: 5px solid white;
padding: 5px;
box-sizing: border-box; /* Include padding and border in the element's total width and height */
touch-action: none; /* Disable touch events */
margin-bottom: 20px;
}
#gameContainer #canvasContainer canvas {
width: 100%;
max-width: 800px;
aspect-ratio: 800 / 600; /* Maintain a 4:3 aspect ratio */
touch-action: none; /* Disable touch events */
}
#gameContainer #canvasContainer #info {
position: absolute;
padding: 10px;
background: rgba(255, 255, 255, 0.2);
color: #fff;
font-family: Arial, sans-serif;
font-size: 10px;
bottom: 10px;
right: 10px;
z-index: -1; /* Ensure it is behind other elements */
}
#gameContainer #header {
display: flex;
align-items: center;
width: 100%;
max-width: 800px;
justify-content: space-between;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 5px solid white;
}
#gameContainer #header button {
background-color: #fff;
border-radius: 2px;
border: none;
cursor: pointer;
padding: 0;
margin: 0 5px;
}
#gameContainer #header svg {
width: 24px;
height: 24px;
vertical-align: middle;
}
#gameContainer #header a {
display: inline-block;
width: 100%;
height: 100%;
}
#gameContainer #header .animated-click {
transform: rotate(360deg); /* Rotate the button 360 degrees on click */
}
#gameContainer #header .animated-click-end {
transform: rotate(360deg); /* Keep the button rotated after the click */
}
#gameContainer #header #audioToggle,
#gameContainer #header #refreshButton {
font-size: 24px;
background: none;
border: none;
cursor: pointer;
color: white;
touch-action: manipulation; /* Allow touch interactions specifically for these buttons */
flex-shrink: 0; /* Prevent the button from shrinking */
transition: transform 0.6s; /* Add transition for the click animation */
}
#gameContainer #header #audioToggle:focus,
#gameContainer #header #refreshButton:focus {
outline: none;
}
#gameContainer #header #title {
color: white;
font-family: "Arial", sans-serif;
font-size: 24px;
text-align: center;
width: 100%;
max-width: 800px;
flex-grow: 1; /* Allow the title to take up all available space */
}
#gameContainer #messageContainer {
width: 100%;
height: 100%;
max-width: 800px;
min-height: 200px;
margin: 0 auto;
display: flex;
flex-direction: column;
flex-grow: 1;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
#gameContainer #messageContainer #message {
display: flex;
flex-direction: column;
flex-grow: 1;
overflow: hidden;
border: 5px solid white;
border-top: none;
padding: 5px;
box-sizing: border-box;
}
#gameContainer #messageContainer #message p {
margin-top: 6px;
margin-bottom: 6px;
}
#gameContainer #messageContainer #message .indented {
padding-left: 120px;
}
#gameContainer #messageContainer #message .indented-inline {
flex-grow: 1; /* Allow the paragraph to take up the remaining space */
}
#gameContainer #messageContainer #message .timestamp {
width: 120px; /* Fixed width for the timestamp */
color: rgb(163, 163, 163);
flex-shrink: 0; /* Prevent the timestamp from shrinking */
}
#gameContainer #messageContainer #message .timestamp-paragraph {
display: flex; /* Use flexbox to align the timestamp and paragraph in a row */
align-items: flex-start; /* Align the timestamp to the top */
}
#gameContainer #messageContainer #tabs {
display: flex;
}
#gameContainer #messageContainer .tab {
flex: 1;
background-color: transparent;
color: white;
font-family: Arial, sans-serif;
padding: 10px;
cursor: pointer;
text-align: center;
border: none;
outline: none;
transition: background-color 0.3s;
}
#gameContainer #messageContainer .tab:first-child {
border-top-left-radius: 5px;
}
#gameContainer #messageContainer .tab:last-child {
border-top-right-radius: 5px;
}
#gameContainer #messageContainer .tab.active {
border: 5px solid white;
border-bottom: none;
}
#gameContainer #messageContainer .tab:not(.active) {
border-bottom: 5px solid white;
}
#gameContainer #messageContainer .tab:not(.active).flashing {
animation: tab-flash 1s ease-in-out; /* The animation will run once */
}
@keyframes tab-flash {
0% {
background-color: transparent;
}
50% {
background-color: rgba(255, 255, 255, 0.8); /* Flashing color */
}
100% {
background-color: transparent;
}
}
#gameContainer #messageContainer .tab:not(.active):hover {
background-color: rgba(255, 255, 255, 0.2);
}
#gameContainer #messageContainer .tab:not(.active):hover:first-child {
border-top-left-radius: 5px;
}
#gameContainer #messageContainer .tab:not(.active):hover:last-child {
border-top-right-radius: 5px;
}
#gameContainer #messageContainer .tab-content {
display: none;
flex-grow: 1;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
padding: 5px;
box-sizing: border-box;
color: white;
font-family: Arial, sans-serif;
white-space: pre-wrap; /* Enable word wrapping and preserve whitespace */
}
#gameContainer #messageContainer .tab-content.active {
display: block;
height: 100%;
}
@keyframes fadeInOut {
0%,
100% {
opacity: 0;
}
50% {
opacity: 1;
}
}
#loadingOverlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.75); /* Semi-transparent black */
color: white;
display: flex;
justify-content: center;
align-items: center;
z-index: 1000; /* Ensure it is above all other content */
animation: fadeInOut 2s infinite; /* Animate over 2 seconds, repeat infinitely */
}
#loadingOverlay.active + #gameContainer {
opacity: 0.3; /* Darkens the background */
filter: blur(5px); /* Blurs the background */
}
#loadingOverlay.hidden {
display: none;
}
#loadingOverlay #loadingMessage {
font-size: 2em;
text-align: center;
}