GarGerry commited on
Commit
992fe69
·
verified ·
1 Parent(s): 26a3c52

Update style.css

Browse files
Files changed (1) hide show
  1. style.css +62 -29
style.css CHANGED
@@ -1,79 +1,112 @@
 
1
  * {
2
  margin: 0;
3
  padding: 0;
4
  box-sizing: border-box;
5
  }
6
 
7
- body {
8
- background: linear-gradient(to bottom, #0f0f0f, #131313);
9
  font-family: 'Arial', sans-serif;
10
- color: white;
11
  overflow: hidden;
 
 
 
 
12
  }
13
 
 
14
  .game-container {
15
  position: relative;
16
- width: 100vw;
17
- height: 100vh;
 
 
 
18
  display: flex;
19
  justify-content: center;
20
  align-items: center;
21
  flex-direction: column;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  }
23
 
 
24
  .ball {
25
  position: absolute;
26
  width: 30px;
27
  height: 30px;
28
- background: radial-gradient(circle, #00FFAB, #00B89C);
29
  border-radius: 50%;
30
- box-shadow: 0 0 20px rgba(0, 255, 171, 0.8);
31
  animation: fall 3s linear infinite;
32
  }
33
 
 
34
  .platform {
35
  position: absolute;
36
  width: 100px;
37
  height: 20px;
38
- background: linear-gradient(to left, #FF007A, #E5006D);
 
39
  bottom: 0;
40
- border-radius: 10px;
41
- box-shadow: 0 0 20px rgba(255, 0, 122, 0.8);
42
  }
43
 
44
- #score {
45
- position: absolute;
46
- top: 20px;
47
  font-size: 24px;
48
- text-shadow: 0 0 10px rgba(0, 255, 171, 0.8);
49
- }
50
-
51
- #level {
52
- position: absolute;
53
- top: 60px;
54
- font-size: 20px;
55
- text-shadow: 0 0 10px rgba(0, 255, 171, 0.8);
56
  }
57
 
 
58
  #lives {
59
  position: absolute;
60
- bottom: 20px;
61
  display: flex;
62
- justify-content: center;
63
- align-items: center;
 
64
  }
65
 
66
  .life {
67
- width: 30px;
68
- height: 30px;
69
- margin: 0 5px;
70
  }
71
 
 
72
  @keyframes fall {
73
  0% {
74
- top: -30px;
75
  }
76
  100% {
77
- top: 100%;
78
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  }
 
1
+ /* General Reset and Full Page Setup */
2
  * {
3
  margin: 0;
4
  padding: 0;
5
  box-sizing: border-box;
6
  }
7
 
8
+ body, html {
9
+ height: 100%;
10
  font-family: 'Arial', sans-serif;
 
11
  overflow: hidden;
12
+ display: flex;
13
+ justify-content: center;
14
+ align-items: center;
15
+ background: linear-gradient(45deg, #2a2a72, #009ffd);
16
  }
17
 
18
+ /* Futuristic Background with moving particles effect */
19
  .game-container {
20
  position: relative;
21
+ width: 80vw;
22
+ height: 80vh;
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
+ z-index: 1;
31
+ }
32
+
33
+ .game-container::before {
34
+ content: "";
35
+ position: absolute;
36
+ top: 0;
37
+ left: 0;
38
+ width: 100%;
39
+ height: 100%;
40
+ background: url('https://www.transparenttextures.com/patterns/3px-ninesquare.png');
41
+ background-size: cover;
42
+ opacity: 0.2;
43
+ z-index: -1;
44
  }
45
 
46
+ /* Ball Styling */
47
  .ball {
48
  position: absolute;
49
  width: 30px;
50
  height: 30px;
51
+ background-color: #ff6f61;
52
  border-radius: 50%;
 
53
  animation: fall 3s linear infinite;
54
  }
55
 
56
+ /* Platform Styling */
57
  .platform {
58
  position: absolute;
59
  width: 100px;
60
  height: 20px;
61
+ background-color: #00bcd4;
62
+ border-radius: 5px;
63
  bottom: 0;
 
 
64
  }
65
 
66
+ /* Score and Level Display */
67
+ #score, #level {
68
+ color: #fff;
69
  font-size: 24px;
70
+ margin-bottom: 10px;
71
+ z-index: 2;
 
 
 
 
 
 
72
  }
73
 
74
+ /* Lives Icons */
75
  #lives {
76
  position: absolute;
77
+ bottom: 30px;
78
  display: flex;
79
+ justify-content: space-between;
80
+ width: 100%;
81
+ z-index: 2;
82
  }
83
 
84
  .life {
85
+ width: 40px;
86
+ height: 40px;
 
87
  }
88
 
89
+ /* Animations for falling ball */
90
  @keyframes fall {
91
  0% {
92
+ transform: translateY(0);
93
  }
94
  100% {
95
+ transform: translateY(100vh);
96
  }
97
+ }
98
+
99
+ /* Background particles animation */
100
+ @keyframes particlesMovement {
101
+ 0% {
102
+ transform: translateY(0) translateX(0);
103
+ }
104
+ 100% {
105
+ transform: translateY(100vh) translateX(100vw);
106
+ }
107
+ }
108
+
109
+ /* Add subtle movement effect */
110
+ body {
111
+ animation: particlesMovement 10s infinite linear;
112
  }