Update style.css
Browse files
style.css
CHANGED
@@ -1,35 +1,32 @@
|
|
1 |
-
/* General Reset and Full Page Setup */
|
2 |
* {
|
3 |
margin: 0;
|
4 |
padding: 0;
|
5 |
box-sizing: border-box;
|
6 |
}
|
7 |
|
8 |
-
body
|
9 |
-
|
10 |
font-family: 'Arial', sans-serif;
|
|
|
11 |
overflow: hidden;
|
12 |
display: flex;
|
13 |
justify-content: center;
|
14 |
align-items: center;
|
15 |
-
background: #1a1a1a; /* Dark background to enhance futuristic feel */
|
16 |
}
|
17 |
|
18 |
-
/* Futuristic Background with
|
19 |
.game-container {
|
20 |
position: relative;
|
21 |
-
width:
|
22 |
-
height:
|
23 |
-
overflow: hidden;
|
24 |
-
border-radius: 10px;
|
25 |
-
background: rgba(0, 0, 0, 0.6);
|
26 |
display: flex;
|
27 |
justify-content: center;
|
28 |
align-items: center;
|
29 |
flex-direction: column;
|
30 |
-
|
31 |
}
|
32 |
|
|
|
33 |
.game-container::before {
|
34 |
content: "";
|
35 |
position: absolute;
|
@@ -37,16 +34,82 @@ body, html {
|
|
37 |
left: 0;
|
38 |
width: 100%;
|
39 |
height: 100%;
|
40 |
-
background:
|
41 |
-
|
42 |
-
z-index: -1;
|
43 |
-
animation: gradientShift 5s ease infinite;
|
44 |
}
|
45 |
|
46 |
-
/*
|
47 |
-
@keyframes
|
48 |
0% {
|
49 |
-
background:
|
50 |
}
|
51 |
50% {
|
52 |
-
background:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
* {
|
2 |
margin: 0;
|
3 |
padding: 0;
|
4 |
box-sizing: border-box;
|
5 |
}
|
6 |
|
7 |
+
body {
|
8 |
+
background: linear-gradient(to bottom, #0f0f0f, #131313); /* Background gelap untuk kontras */
|
9 |
font-family: 'Arial', sans-serif;
|
10 |
+
color: white;
|
11 |
overflow: hidden;
|
12 |
display: flex;
|
13 |
justify-content: center;
|
14 |
align-items: center;
|
|
|
15 |
}
|
16 |
|
17 |
+
/* Futuristic Background with animated elements */
|
18 |
.game-container {
|
19 |
position: relative;
|
20 |
+
width: 100vw;
|
21 |
+
height: 100vh;
|
|
|
|
|
|
|
22 |
display: flex;
|
23 |
justify-content: center;
|
24 |
align-items: center;
|
25 |
flex-direction: column;
|
26 |
+
overflow: hidden;
|
27 |
}
|
28 |
|
29 |
+
/* Adding animated background */
|
30 |
.game-container::before {
|
31 |
content: "";
|
32 |
position: absolute;
|
|
|
34 |
left: 0;
|
35 |
width: 100%;
|
36 |
height: 100%;
|
37 |
+
background: radial-gradient(circle, rgba(0, 255, 171, 0.1), rgba(0, 0, 0, 0.7)); /* Radial gradient with transparency */
|
38 |
+
animation: glowingBackground 10s ease-in-out infinite; /* Subtle glowing background animation */
|
39 |
+
z-index: -1; /* Place behind game elements */
|
|
|
40 |
}
|
41 |
|
42 |
+
/* Animation for glowing background */
|
43 |
+
@keyframes glowingBackground {
|
44 |
0% {
|
45 |
+
background: radial-gradient(circle, rgba(0, 255, 171, 0.1), rgba(0, 0, 0, 0.7));
|
46 |
}
|
47 |
50% {
|
48 |
+
background: radial-gradient(circle, rgba(0, 255, 171, 0.4), rgba(0, 0, 0, 0.5));
|
49 |
+
}
|
50 |
+
100% {
|
51 |
+
background: radial-gradient(circle, rgba(0, 255, 171, 0.1), rgba(0, 0, 0, 0.7));
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
/* Ball Styling */
|
56 |
+
.ball {
|
57 |
+
position: absolute;
|
58 |
+
width: 30px;
|
59 |
+
height: 30px;
|
60 |
+
background: radial-gradient(circle, #00FFAB, #00B89C);
|
61 |
+
border-radius: 50%;
|
62 |
+
box-shadow: 0 0 20px rgba(0, 255, 171, 0.8);
|
63 |
+
animation: fall 3s linear infinite;
|
64 |
+
}
|
65 |
+
|
66 |
+
/* Platform Styling */
|
67 |
+
.platform {
|
68 |
+
position: absolute;
|
69 |
+
width: 100px;
|
70 |
+
height: 20px;
|
71 |
+
background: linear-gradient(to left, #FF007A, #E5006D);
|
72 |
+
bottom: 0;
|
73 |
+
border-radius: 10px;
|
74 |
+
box-shadow: 0 0 20px rgba(255, 0, 122, 0.8);
|
75 |
+
}
|
76 |
+
|
77 |
+
/* Score and Level Display */
|
78 |
+
#score {
|
79 |
+
position: absolute;
|
80 |
+
top: 20px;
|
81 |
+
font-size: 24px;
|
82 |
+
text-shadow: 0 0 10px rgba(0, 255, 171, 0.8);
|
83 |
+
}
|
84 |
+
|
85 |
+
#level {
|
86 |
+
position: absolute;
|
87 |
+
top: 60px;
|
88 |
+
font-size: 20px;
|
89 |
+
text-shadow: 0 0 10px rgba(0, 255, 171, 0.8);
|
90 |
+
}
|
91 |
+
|
92 |
+
/* Lives Icons */
|
93 |
+
#lives {
|
94 |
+
position: absolute;
|
95 |
+
bottom: 20px;
|
96 |
+
display: flex;
|
97 |
+
justify-content: center;
|
98 |
+
align-items: center;
|
99 |
+
}
|
100 |
+
|
101 |
+
.life {
|
102 |
+
width: 30px;
|
103 |
+
height: 30px;
|
104 |
+
margin: 0 5px;
|
105 |
+
}
|
106 |
+
|
107 |
+
/* Animations for falling ball */
|
108 |
+
@keyframes fall {
|
109 |
+
0% {
|
110 |
+
top: -30px;
|
111 |
+
}
|
112 |
+
100% {
|
113 |
+
top: 100%;
|
114 |
+
}
|
115 |
+
}
|