Update style.css
Browse files
style.css
CHANGED
@@ -1,106 +1,52 @@
|
|
1 |
-
|
2 |
-
body {
|
3 |
margin: 0;
|
4 |
padding: 0;
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
}
|
9 |
|
10 |
-
/* Game Container */
|
11 |
.game-container {
|
12 |
position: relative;
|
13 |
width: 100vw;
|
14 |
-
height:
|
15 |
-
border: 3px solid #00ffcc;
|
16 |
overflow: hidden;
|
17 |
-
box-shadow: 0 0 20px #00ffcc;
|
18 |
}
|
19 |
|
20 |
-
|
21 |
-
.ball {
|
22 |
position: absolute;
|
23 |
-
|
24 |
left: 50%;
|
25 |
-
width:
|
26 |
-
height:
|
27 |
-
background:
|
28 |
border-radius: 50%;
|
29 |
-
box-shadow: 0 0 15px #ff0066;
|
30 |
-
transform: translate(-50%, -50%);
|
31 |
-
}
|
32 |
-
|
33 |
-
/* Platform */
|
34 |
-
.platform {
|
35 |
-
position: absolute;
|
36 |
-
bottom: 5%;
|
37 |
-
left: 50%;
|
38 |
-
width: 100px;
|
39 |
-
height: 20px;
|
40 |
-
background: linear-gradient(90deg, #00ffcc, #0066ff);
|
41 |
-
border-radius: 10px;
|
42 |
-
box-shadow: 0 0 20px #00ffcc;
|
43 |
transform: translateX(-50%);
|
44 |
}
|
45 |
|
46 |
-
|
47 |
-
.score-board {
|
48 |
-
position: absolute;
|
49 |
-
top: 10px;
|
50 |
-
left: 10px;
|
51 |
-
font-size: 1.5em;
|
52 |
-
color: #ffffff;
|
53 |
-
background: rgba(0, 0, 0, 0.5);
|
54 |
-
padding: 10px 20px;
|
55 |
-
border-radius: 10px;
|
56 |
-
box-shadow: 0 0 10px #00ffcc;
|
57 |
-
}
|
58 |
-
|
59 |
-
/* Controls */
|
60 |
-
.controls {
|
61 |
-
display: flex;
|
62 |
-
justify-content: center;
|
63 |
-
align-items: center;
|
64 |
-
gap: 20px;
|
65 |
-
margin-top: 10px;
|
66 |
-
}
|
67 |
-
|
68 |
-
.controls button {
|
69 |
-
background: linear-gradient(90deg, #ff0066, #ffcc00);
|
70 |
-
color: white;
|
71 |
-
border: none;
|
72 |
-
border-radius: 10px;
|
73 |
-
padding: 10px 20px;
|
74 |
-
font-size: 1.5em;
|
75 |
-
box-shadow: 0 0 10px #ff0066;
|
76 |
-
cursor: pointer;
|
77 |
-
outline: none;
|
78 |
-
transition: transform 0.2s, box-shadow 0.2s;
|
79 |
-
}
|
80 |
-
|
81 |
-
.controls button:hover {
|
82 |
-
transform: scale(1.1);
|
83 |
-
box-shadow: 0 0 15px #ffcc00;
|
84 |
-
}
|
85 |
-
|
86 |
-
/* Game Over Overlay */
|
87 |
-
.overlay {
|
88 |
position: absolute;
|
89 |
-
top:
|
90 |
-
left:
|
91 |
-
width:
|
92 |
-
height:
|
93 |
-
background:
|
94 |
-
|
95 |
-
|
96 |
-
align-items: center;
|
97 |
}
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
}
|
|
|
1 |
+
* {
|
|
|
2 |
margin: 0;
|
3 |
padding: 0;
|
4 |
+
box-sizing: border-box;
|
5 |
+
}
|
6 |
+
|
7 |
+
body {
|
8 |
+
background-color: #121212;
|
9 |
+
font-family: 'Arial', sans-serif;
|
10 |
+
display: flex;
|
11 |
+
justify-content: center;
|
12 |
+
align-items: center;
|
13 |
+
height: 100vh;
|
14 |
}
|
15 |
|
|
|
16 |
.game-container {
|
17 |
position: relative;
|
18 |
width: 100vw;
|
19 |
+
height: 100vh;
|
|
|
20 |
overflow: hidden;
|
|
|
21 |
}
|
22 |
|
23 |
+
.player {
|
|
|
24 |
position: absolute;
|
25 |
+
bottom: 20px;
|
26 |
left: 50%;
|
27 |
+
width: 50px;
|
28 |
+
height: 50px;
|
29 |
+
background-color: #00ff00;
|
30 |
border-radius: 50%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
transform: translateX(-50%);
|
32 |
}
|
33 |
|
34 |
+
.falling-ball {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
position: absolute;
|
36 |
+
top: -50px;
|
37 |
+
left: 50%;
|
38 |
+
width: 30px;
|
39 |
+
height: 30px;
|
40 |
+
background-color: #ff007f;
|
41 |
+
border-radius: 50%;
|
42 |
+
animation: fall 3s linear infinite;
|
|
|
43 |
}
|
44 |
|
45 |
+
@keyframes fall {
|
46 |
+
0% {
|
47 |
+
top: -50px;
|
48 |
+
}
|
49 |
+
100% {
|
50 |
+
top: 100vh;
|
51 |
+
}
|
52 |
}
|