-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
358 lines (325 loc) · 8.87 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
body {
background-color: #e0e0e0;
font-family: 'Press Start 2P', cursive;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
}
.title-bar {
background-color: rgba(255, 255, 255, 0.4);
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 20px;
width: 600px;
border: 2px solid black;
box-shadow: 3px 4px 6px rgba(0, 0, 0, 0.3);
border-radius: 10px;
}
.game-window {
width: 600px;
height: 800px;
background-color: #72C4CF;
position: relative;
z-index: 2;
overflow: hidden;
border: 2px solid black;
box-shadow: 3px 4px 6px rgba(0, 0, 0, 0.3);
border-radius: 10px;
}
.star {
position: absolute;
background-color: white;
width: 2px;
height: 2px;
animation: flicker 1s linear infinite; /* Apply the animation */
animation-duration: 1s; /* Base duration (we'll vary this slightly) */
}
@keyframes flicker {
0% { opacity: 1; }
50% { opacity: 0.6; }
100% { opacity: 1; }
}
#flash-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 5;
background-color: white;
opacity: 0;
}
.bird {
position: absolute;
width: 50px; /* Your desired hitbox width */
height: 35px; /* Your desired hitbox height */
background-image: url('assets/textures/bird1.png'); /* Load the sprite */
background-size: 100% 100%; /* Scale the sprite to fit the hitbox */
background-repeat: no-repeat; /* Prevent sprite repetition */
left: 280px;
top: 380px;
z-index: 1;
}
#bird-selection {
position: relative;
display: grid; /* Enable grid layout */
grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
grid-gap: 5px; /* Spacing between grid items */
}
.bird-box {
width: 50px;
height: 50px;
margin: 0;
border: 2px solid black;
border-radius: 10px;
display: flex; /* Enable flexbox for centering */
align-items: center; /* Vertical centering */
justify-content: center; /* Horizontal centering */
box-shadow: 3px 4px 6px rgba(0, 0, 0, 0.3);
background-color: rgba(255, 255, 255, 0.8);
}
.bird-box img {
max-width: 100%; /* Ensure the image doesn't overflow its container*/
max-height: 100%; /* Ensure the image doesn't overflow its container*/
}
#bird-container {
position: absolute;
top: 20px;
right: 50%;
transform: translateX(50%) translateX(-450px);
padding: 15px;
width: 200px;
height: 200px;
display: flex; /* Enable flexbox for centering */
flex-direction: column;
align-items: center; /* Center vertically */
justify-content: center; /* Center horizontally */
background-color: rgba(255, 255, 255, 0.5);
border: 2px solid black;
border-radius: 10px;
box-shadow: 3px 4px 6px rgba(0, 0, 0, 0.3);
font-family: 'Press Start 2P', cursive; /* The font */
}
.coins-label {
text-align: center;
margin-bottom: 5px; /* Add spacing below the label */
font-weight: bold;
}
.pipe {
width: 60px;
background-image: url('assets/textures/pipe.png'); /* Load your pipe image */
background-repeat: repeat-y; /* Repeat the image vertically */
background-size: 100% auto; /* Scale to fit horizontally */
border: 3px solid black;
position: absolute;
box-shadow: 3px 4px 6px rgba(0, 0, 0, 0.3);
z-index: 3;
}
.pipe-bottom {
bottom: 0;
}
.pipe-top {
top: -5px;
}
.floor {
width: 100%;
height: 70px;
background-image: url('assets/textures/floor.png'); /* Load your image */
background-repeat: repeat-x; /* Repeat on the x-axis */
position: absolute;
bottom: 0px;
z-index: 4;
}
.coin {
width: 30px; /* Adjust the size as needed */
height: 44px;
background-image: url('assets/textures/coin.png');
background-size: cover;
position: absolute;
}
#coin-display {
position: absolute;
top: 170px;
left: 50%;
transform: translateX(-50%) translateX(450px);
width: 200px;
padding: 15px;
background-color: rgba(255, 255, 255, 0.5);
border: 2px solid black;
border-radius: 10px;
box-shadow: 3px 4px 6px rgba(0, 0, 0, 0.3);
font-size: 36px;
}
#coin-display img {
width: 30px; /* Adjust as needed */
height: 44px; /* Adjust as needed */
}
.start-button {
background-color: green;
color: white;
padding: 15px 30px;
border: 3px solid black;
border-radius: 5px; /* Slightly rounded corners */
cursor: pointer; /* Indicate it's clickable */
font-family: 'Press Start 2P', cursive;
font-size: 16px;
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%); /* Center the button */
z-index: 6;
box-shadow: 3px 4px 6px rgba(0, 0, 0, 0.3);
}
.start-button:hover {
background-color: #006400; /* Darker green on hover */
}
.game-over-button {
background-color: red;
color: white;
padding: 15px 30px;
border: 3px solid black;
border-radius: 5px; /* Slightly rounded corners */
cursor: pointer; /* Indicate it's clickable */
font-family: 'Press Start 2P', cursive;
font-size: 16px;
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%); /* Center the button */
z-index: 6;
box-shadow: 3px 4px 6px rgba(0, 0, 0, 0.3);
}
.restart-button {
background-color: green;
color: white;
border: 3px solid black;
border-radius: 5px;
cursor: pointer;
font-family: 'Press Start 2P', cursive;
font-size: 14px; /* Slightly smaller font */
position: absolute;
top: 55%; /* Adjust as needed */
left: 50%;
transform: translate(-50%, -50%);
z-index: 6;
box-shadow: 3px 4px 6px rgba(0, 0, 0, 0.3);
}
.restart-button:hover {
background-color: #006400;
}
.quit-button {
background-color: green;
color: white;
border: 3px solid black;
border-radius: 5px;
cursor: pointer;
font-family: 'Press Start 2P', cursive;
font-size: 14px; /* Slightly smaller font */
position: absolute;
top: 61%; /* Adjust as needed */
left: 50%;
transform: translate(-50%, -50%);
z-index: 6;
box-shadow: 3px 4px 6px rgba(0, 0, 0, 0.3);
}
.quit-button:hover {
background-color: #006400;
}
.action-button {
background-color: green;
color: white;
padding: 10px ;
border: 3px solid black;
border-radius: 5px;
cursor: pointer;
font-family: 'Press Start 2P', cursive;
font-size: 14px;
box-shadow: 3px 4px 6px rgba(0, 0, 0, 0.3);
width: 130px;
}
/* Score Board */
.score-board {
position: absolute;
top: 20px;
left: 50%;
transform: translateX(-50%) translateX(450px); /* Adjusted centering */
width: 200px;
background-color: rgba(255, 255, 255, 0.5);
padding: 15px;
border: 2px solid black;
border-radius: 10px;
box-shadow: 3px 4px 6px rgba(0, 0, 0, 0.3);
font-family: 'Press Start 2P', cursive; /* The font */
}
#new-high-score-banner {
position: absolute;
top: -60px;
left: 50%;
transform: translateX(-50%);
background-color: yellow;
padding: 10px 20px;
border-radius: 10px;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
font-family: 'Press Start 2P', cursive;
transition: top 0.5s ease-in-out;
overflow: hidden;
z-index: 4;
border: 2px solid black;
}
#not-enough-coins-banner {
position: absolute;
top: -60px;
left: 50%;
transform: translateX(-50%);
background-color: red;
padding: 10px 20px;
border-radius: 10px;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
font-family: 'Press Start 2P', cursive;
transition: top 0.5s ease-in-out;
overflow: hidden;
z-index: 4;
border: 2px solid black;
}
.button-container {
text-align: center; /* To center the button */
margin-top: 10px; /* Adjust spacing as needed */
}
#change-theme-button {
background-color: #777777; /* Example color */
color: white;
padding: 10px 20px;
border: 2px solid black;
border-radius: 10px;
cursor: pointer;
font-family: 'Press Start 2P', cursive; /* The font */
position: absolute;
top: 260px;
left: 50%;
transform: translateX(-50%) translateX(450px);
width: 235px;
box-shadow: 3px 4px 6px rgba(0, 0, 0, 0.3);
}
#toggle-sound-button {
background-color: #777777; /* Example color */
color: white;
padding: 10px 20px;
border: 2px solid black;
border-radius: 10px;
cursor: pointer;
font-family: 'Press Start 2P', cursive; /* The font */
position: absolute;
top: 310px;
left: 50%;
transform: translateX(-50%) translateX(450px);
width: 235px;
box-shadow: 3px 4px 6px rgba(0, 0, 0, 0.3);
}