-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
371 lines (328 loc) · 8.02 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
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
/* General Reset */
html, body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background-color: #1a1a1a;
overflow: hidden;
color: white;
}
/* Game Container */
#game-container {
width: 100vw;
height: 100vh;
position: relative;
display: flex;
justify-content: center;
align-items: flex-end;
}
/* Control Buttons */
.controls {
position: absolute;
top: 20px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 20px;
}
.control-btn {
background-color: #0071E3;
border: none;
padding: 10px 20px;
border-radius: 5px;
color: white;
font-size: 16px;
cursor: pointer;
transition: background-color 0.2s ease, transform 0.2s ease;
}
.control-btn:hover {
background-color: #005bb5;
transform: scale(1.1);
}
.control-btn:active {
background-color: #003d7a;
}
/* Falling Notes */
.note {
width: 60px;
height: 60px;
background-color: #0071E3;
border-radius: 50%;
position: absolute;
animation: moveDown 2s linear infinite;
}
.hit-zone {
width: 60px;
height: 60px;
background-color: gray;
border-radius: 50%;
position: absolute;
bottom: 20px;
transform: translateX(0%);
transition: transform 0.1s ease;
}
.hit-zone::before {
content: '';
position: absolute;
top: -20px;
left: -20px;
width: 120px; /* Larger width */
height: 120px; /* Larger height */
border-radius: 50%;
background-color: transparent; /* Invisible but interactive */
z-index: -1; /* Keeps it behind visible elements */
}
/* Score and Combo Display */
#score, #combo {
position: absolute;
font-size: 24px;
font-weight: bold;
color: white;
}
#score {
top: 10px;
left: 10px;
}
#combo {
top: 10px;
right: 10px;
}
/* Animation for Notes */
@keyframes moveDown {
0% {
top: -60px;
}
100% {
top: 100%;
}
}
/* Neon Glow Effect for Hit Zones */
.hit-zone.glowing {
box-shadow: 0 0 20px 5px #00ff00, 0 0 40px 10px #00ff00; /* Neon green */
}
.hit-zone[data-key="a"].glowing {
box-shadow: 0 0 20px 5px #ff0000, 0 0 40px 10px #ff0000; /* Red neon for 'A' */
transform: translateX(0%) scale(1.1);
}
.hit-zone[data-key="s"].glowing {
box-shadow: 0 0 20px 5px #0000ff, 0 0 40px 10px #0000ff; /* Blue neon for 'S' */
transform: translateX(0%) scale(1.1);
}
.hit-zone[data-key="d"].glowing {
box-shadow: 0 0 20px 5px #ff00ff, 0 0 40px 10px #ff00ff; /* Purple neon for 'D' */
transform: translateX(0%) scale(1.1);
}
.hit-zone[data-key="f"].glowing {
transform: translateX(0%) scale(1.1);
box-shadow: 0 0 20px 5px #ffff00, 0 0 40px 10px #ffff00; /* Yellow neon for 'F' */
}
.hit-zone.pressed {
transform: translateX(-50%) scale(1.1);
box-shadow: 0 0 20px 5px #00ff00, 0 0 40px 10px #00ff00; /* Glow based on active zone */
}
/* Cogwheel Button */
#cogwheel {
position: absolute;
bottom: 20px; /* Adjust for better positioning */
left: 20px; /* Adjust for better positioning */
width: 50px;
height: 50px;
font-size: 30px; /* Increase font size for better visibility */
display: flex; /* Use flexbox */
justify-content: center; /* Center horizontally */
align-items: center; /* Center vertically */
cursor: pointer;
background-color: #0071E3;
border-radius: 50%; /* Make it round */
color: white;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Adding a soft shadow */
transition: transform 0.2s ease-in-out, background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
border: none;
}
/* Hover and Active Effects */
#cogwheel:hover {
background-color: #005bb5;
transform: scale(1.1) rotate(90deg); /* Enlarge slightly and rotate 90 degrees */
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4); /* Increase shadow for hover effect */
}
#cogwheel:active {
background-color: #003d7a; /* Darken when clicked */
transform: scale(1) rotate(90deg); /* Keep the rotation when clicked */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Slightly reduce shadow on click */
}
/* Make the text align center, considering rotation */
#cogwheel span {
position: absolute;
transform: rotate(-90deg); /* Counteract rotation */
line-height: 0; /* Adjust line-height to prevent extra space */
}
/* Initially hide the song menu */
#song-menu {
position: absolute;
bottom: 60px; /* Position just below the cogwheel */
left: 10px;
background-color: #222;
border: 1px solid #444;
border-radius: 8px;
padding: 10px;
width: 220px;
color: white;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
display: none; /* Initially hidden */
z-index: 100;
font-family: Arial, sans-serif;
}
/* Show the song menu when visible */
#song-menu.visible {
display: block; /* This class will display the menu */
}
/* Menu section headings */
#song-menu h3 {
margin: 0;
font-size: 18px;
color: #ddd;
padding: 5px 0;
}
/* Song list items */
#song-list li {
margin: 5px 0;
cursor: pointer;
padding: 8px;
border-radius: 4px;
transition: background-color 0.2s ease;
font-size: 16px;
}
#song-list li:hover {
background-color: #444;
}
/* Divider for separating sections */
.divider {
border-top: 1px solid #444;
margin: 10px 0;
}
/* Speed control buttons */
#speed-controls {
margin-top: 10px;
}
.control-btn {
background-color: #0071E3;
border: none;
padding: 10px 20px;
border-radius: 5px;
color: white;
font-size: 14px;
cursor: pointer;
transition: background-color 0.2s ease, transform 0.2s ease;
width: 100%;
margin: 5px 0;
}
.control-btn:hover {
background-color: #005bb5;
transform: scale(1.05);
}
.control-btn:active {
background-color: #003d7a;
}
/* Additional settings container */
#other-settings {
margin-top: 10px;
font-size: 14px;
}
.note {
position: absolute;
z-index: 1; /* Place falling dots above hit zones */
}
/* Pause button in front of everything */
#pause-btn {
position: absolute;
top: 20px;
z-index: 10; /* Ensure pause button is at the highest level */
background-color: #0071E3;
border: none;
padding: 10px 20px;
border-radius: 5px;
color: white;
font-size: 16px;
cursor: pointer;
transition: background-color 0.2s ease, transform 0.2s ease;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
/* Hover and active effects for the pause button */
#pause-btn:hover {
background-color: #005bb5;
transform: scale(1.1);
}
#pause-btn:active {
background-color: #003d7a;
}
/* Highest Score */
#highest-score {
position: absolute;
top: 40px;
right: 10px;
font-size: 24px;
color: white;
font-weight: bold;
}
/* Confetti styles */
.confetti {
position: absolute;
width: 10px;
height: 10px;
background-color: #ff0; /* Default color */
border-radius: 50%;
pointer-events: none;
opacity: 0.8;
animation: fall 2s linear forwards, drift 2s ease-in-out infinite;
}
/* Falling animation */
@keyframes fall {
0% {
transform: translateY(-10%);
opacity: 1;
}
100% {
transform: translateY(110vh); /* Falls off the screen */
opacity: 0;
}
}
/* Horizontal drifting animation */
@keyframes drift {
0%, 100% {
transform: translateX(0);
}
50% {
transform: translateX(20px);
}
}
/* Style for the "HIT" text */
.hit-text {
position: absolute;
font-size: 48px;
font-weight: bold;
color: green; /* You can change this to any color */
opacity: 1;
pointer-events: none;
animation: shrinkFadeOut 2s forwards;
}
/* Style for the "HIT" text */
.miss-text {
position: absolute;
font-size: 48px;
font-weight: bold;
color: red; /* You can change this to any color */
opacity: 1;
pointer-events: none;
animation: shrinkFadeOut 2s forwards;
}
/* Keyframes for shrinking and fading out */
@keyframes shrinkFadeOut {
0% {
transform: scale(1);
opacity: 1;
}
100% {
transform: scale(0.5);
opacity: 0;
}
}