-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
364 lines (339 loc) · 7.48 KB
/
styles.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
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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
-moz-user-select: none;
}
#game-canvas {
position: absolute;
width: 100%;
height: 100%;
}
#loading-screen {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: black;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 9000;
opacity: 1;
transition: opacity 1s ease;
font-family: 'Times New Roman', sans-serif;
color: white;
font-size: 24px;
margin-bottom: 20px;
}
#loading-text {
animation: fadeInOut 2s infinite;
}
@keyframes fadeInOut {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
/* Loading spinner */
#loading-spinner {
width: 60px;
height: 60px;
border: 8px solid rgba(255, 255, 255, 0.3);
border-top-color: #fff;
border-radius: 50%;
animation: spin 1s linear infinite;
transition: inherit;
}
@keyframes spin {
100% { transform: rotate(360deg); }
}
.overlay {
display: none;
position: absolute;
font-family: "Times New Roman", sans-serif;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(10px);
z-index: 1000;
justify-content: center;
align-items: center;
text-align: center;
}
.overlay.active {
display: block !important;
}
.pause-content {
background: #fff;
padding: 20px;
border-radius: 10px;
}
button {
display: block;
margin: 10px auto;
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
border: none;
border-radius: 5px;
background-color: #007BFF;
color: white;
font-family: inherit;
}
button:hover {
background-color: #0056b3;
}
.custom-cursor {
width: 20px;
height: 20px;
border-radius: 50%;
background-color: red;
position: absolute;
pointer-events: none;
z-index: 1001;
}
.keybind-row {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.keybind-container {
display: flex;
align-items: center;
flex: 1;
}
.keybind-label {
flex: 1;
font-weight: bold;
color: white;
margin-right: 10px;
}
.keybox {
display: inline-block;
padding: 5px 10px;
border: 1px solid #ccc;
margin-right: 5px;
cursor: pointer;
background-color: #f0f0f0;
}
.keybox:hover {
background-color: #e0e0e0;
}
#start-menu {
font-family: "JetBrains Mono", monospace;
background-color: black;
}
#main-play-button {
background-color: transparent;
position: absolute;
width: fit-content;
height: fit-content;
font-size: 3rem;
bottom: 20vh;
left: 10vw;
}
#main-play-button:hover {
text-decoration: underline;
}
#connection-id-span {
display: inline-flex;
align-items: center;
position: absolute;
top: 20vh;
left: 5vw;
font-family: "JetBrains Mono", monospace;
font-size: 3rem;
color: #fff;
}
#connection-id-span button {
position: relative;
font-size: inherit;
}
#connection-id {
position: relative;
font-family: inherit;
font-size: inherit;
background-color: transparent;
padding: 0;
}
#connection-id-span button {
background: linear-gradient(90deg, #555 0%, #555 50%, #ffff 50%);
background-size: 200% 100%;
background-position-x: 100%;
color: transparent;
text-decoration: none;
border-radius: 0;
transition: background-position 1s ease-in-out,
background-size 1s step-end,
color 1s step-end,
text-decoration 1s step-end;
}
#connection-id-span button:hover {
background-position: 0;
background-size: 0 0;
color: white;
text-decoration: underline;
}
#name-input-container {
position: absolute;
top: 10vh;
left: 5vw;
display: inline-flex;
max-width: 80% !important;
overflow: hidden;
text-wrap: nowrap;
align-items: center;
justify-content: flex-start;
font-family: 'JetBrains Mono', monospace;
font-size: 3rem;
color: #fff;
}
#player-name {
border: none;
outline: none;
background: transparent;
font-family: inherit;
font-size: inherit;
color: #fff;
width: 2ch;
text-wrap: nowrap;
white-space: nowrap;
padding-right: 0;
border-right: 1px solid white;
caret-color: white;
transition: border-right-color 2s ease-out,
caret-color 2s ease-out;
animation: blink-caret 1s step-end infinite;
}
.typed {
border-right-color: #0ff !important;
caret-color: #0ff !important;
}
@keyframes blink-caret { 0% {border-right-width: 0} 50% {border-right-width: 1px} }
#player-name:focus {
border-right-width: 0 !important;
}
#connection-widgets {
position: absolute;
display: inline-flex;
align-items: center;
top: 30vh;
left: 5vw;
}
#create-connection-id {
font-family: inherit;
font-size: 3rem !important;
background-color: transparent;
}
#create-connection-id:hover {
text-decoration: underline;
}
#error-icon {
display: inline-flex;
justify-content: center;
align-items: center;
margin-left: 1rem;
width: 2rem;
height: 2rem;
font-size: 1rem;
color: #bbb;
cursor: pointer;
background-color: #222;
border-radius: 50%;
border: 2px solid #bbb;
}
.tooltip-text {
background-color: #333;
color: #fff;
text-align: center;
padding: 5px;
border-radius: 4px;
position: absolute;
left: 105%;
font-size: 20px;
white-space: nowrap;
z-index: 1;
opacity: 0;
transition: opacity 0.2s;
}
#error-icon:hover .tooltip-text {
visibility: visible;
opacity: 1;
}
#lobby-container {
display: inline-flex;
flex-direction: column;
align-items: center;
position: absolute;
width: 20rem;
right: 5vw;
top: 10vh;
background-color: #333;
font-family: inherit;
color: white;
padding: 0.5rem;
margin-bottom: 0.25rem;
border-radius: 0.5rem;
border: 2px solid #bbb;
}
#lobby-title {
font-size: 3rem;
}
#lobby-join {
display: inline-flex;
align-items: center;
justify-content: space-evenly;
width: 100%;
margin-bottom: 0.5rem;
}
#lobby-join input {
width: 40%;
height: 2rem;
margin: 0.5rem;
background-color: transparent;
border: none;
border-bottom: 2px solid #bbb;
text-align: center;
color: white;
}
#lobby-join button {
height: 2rem;
padding: 0.5rem;
background-color: transparent;
}
#lobby-join button:hover {
text-decoration: underline;
}
#lobby-connections {
display: flex;
flex-wrap: wrap;
flex-direction: column;
width: 90%;
border: 2px solid #bbb;
}
#lobby-connections .lobby-item {
list-style: none;
width: auto;
font-size: 90%;
padding: 0.25rem;
}
#lobby-connections .lobby-item button {
justify-content: center;
align-items: center;
padding: 0;
margin: 0 0 0 0.5rem;
background-color: #fd008a;
border-radius: 50%;
font-size: clamp(80%, 0.75rem, 100%);
color: #fff;
width: 1rem;
height: 1rem;
}
.lobby-leader {color: goldenrod !important;}
.lobby-ready {color: #8afd00 !important;}