GarGerry commited on
Commit
48a6b47
·
verified ·
1 Parent(s): 7459f56

Update style.css

Browse files
Files changed (1) hide show
  1. style.css +107 -38
style.css CHANGED
@@ -1,84 +1,153 @@
1
- /* General Body Styling */
2
  body {
3
  margin: 0;
4
  padding: 0;
5
- background: linear-gradient(90deg, #000428, #004e92);
6
- font-family: Arial, sans-serif;
7
  overflow: hidden;
 
 
 
 
 
 
8
  }
9
 
10
  /* Game Container */
11
  .game-container {
 
 
12
  position: relative;
13
- width: 100vw;
14
- height: 80vh; /* Reduced height for controls */
15
- border: 3px solid #00ffcc;
16
- overflow: hidden;
17
- box-shadow: 0 0 20px #00ffcc;
18
  }
19
 
20
- /* Ball */
21
  .ball {
22
  position: absolute;
 
 
 
 
23
  top: 0;
24
  left: 50%;
25
- width: 20px;
26
- height: 20px;
27
- background: radial-gradient(circle, #ff00cc, #ff0066);
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
- /* Score Board */
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
  }
 
1
+ /* Styling untuk body dan kontainer utama */
2
  body {
3
  margin: 0;
4
  padding: 0;
 
 
5
  overflow: hidden;
6
+ background-color: #0d0d0d;
7
+ display: flex;
8
+ justify-content: center;
9
+ align-items: center;
10
+ height: 100vh;
11
+ font-family: 'Roboto', sans-serif;
12
  }
13
 
14
  /* Game Container */
15
  .game-container {
16
+ width: 80%;
17
+ height: 80%;
18
  position: relative;
19
+ background: linear-gradient(45deg, #00b3b3, #cc00cc);
20
+ border-radius: 15px;
21
+ box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.5);
 
 
22
  }
23
 
24
+ /* Styling bola */
25
  .ball {
26
  position: absolute;
27
+ width: 30px;
28
+ height: 30px;
29
+ background-color: #ffcc00;
30
+ border-radius: 50%;
31
  top: 0;
32
  left: 50%;
33
+ transform: translateX(-50%);
34
+ box-shadow: 0px 0px 10px rgba(255, 204, 0, 0.6);
35
+ transition: transform 0.2s ease;
 
 
 
36
  }
37
 
38
+ /* Styling platform */
39
  .platform {
40
  position: absolute;
41
+ bottom: 10px;
 
42
  width: 100px;
43
  height: 20px;
44
+ background-color: #ff6600;
45
+ border-radius: 5px;
46
+ left: 50%;
47
  transform: translateX(-50%);
48
+ box-shadow: 0px 0px 15px rgba(255, 102, 0, 0.6);
49
  }
50
 
51
+ /* Styling untuk skor dan nyawa */
52
+ .score-board, .lives {
53
  position: absolute;
54
  top: 10px;
 
55
  font-size: 1.5em;
56
  color: #ffffff;
57
+ background-color: rgba(0, 0, 0, 0.5);
58
+ padding: 10px;
59
+ font-weight: bold;
60
  border-radius: 10px;
 
61
  }
62
 
63
+ .score-board {
64
+ left: 10px;
65
+ }
66
+
67
+ .lives {
68
+ right: 10px;
69
+ }
70
+
71
+ /* Kontrol tombol */
72
  .controls {
73
+ position: absolute;
74
+ bottom: 20px;
75
  display: flex;
76
  justify-content: center;
 
77
  gap: 20px;
78
+ width: 100%;
79
  }
80
 
81
  .controls button {
 
 
 
 
82
  padding: 10px 20px;
83
  font-size: 1.5em;
84
+ background-color: rgba(0, 0, 0, 0.7);
85
+ color: white;
86
+ border: none;
87
+ border-radius: 5px;
88
  cursor: pointer;
89
+ transition: background-color 0.2s ease, transform 0.1s ease;
 
90
  }
91
 
92
  .controls button:hover {
93
+ background-color: rgba(0, 0, 0, 0.9);
94
+ transform: scale(1.1);
95
+ }
96
+
97
+ /* Styling untuk pesan Game Over */
98
+ .game-over-message {
99
+ position: fixed;
100
+ top: 50%;
101
+ left: 50%;
102
+ transform: translate(-50%, -50%);
103
+ background-color: rgba(0, 0, 0, 0.8);
104
+ color: white;
105
+ text-align: center;
106
+ padding: 30px;
107
+ border-radius: 15px;
108
+ display: none; /* Sembunyikan Game Over saat permainan berlangsung */
109
+ width: 60%;
110
+ box-shadow: 0px 0px 30px rgba(0, 255, 255, 0.7);
111
+ }
112
+
113
+ .game-over-message h2 {
114
+ font-size: 2.5em;
115
+ margin-bottom: 10px;
116
+ text-transform: uppercase;
117
+ color: #00b3b3;
118
+ font-weight: 700;
119
+ }
120
+
121
+ .game-over-message p {
122
+ font-size: 1.5em;
123
+ margin-bottom: 20px;
124
+ }
125
+
126
+ .game-over-message button {
127
+ background-color: #ff6600;
128
+ color: white;
129
+ border: none;
130
+ padding: 12px 25px;
131
+ font-size: 1.6em;
132
+ border-radius: 10px;
133
+ cursor: pointer;
134
+ transition: background-color 0.3s ease, transform 0.1s ease;
135
+ }
136
+
137
+ .game-over-message button:hover {
138
+ background-color: #e64a19;
139
  transform: scale(1.1);
140
+ }
141
+
142
+ /* Styling untuk timer */
143
+ .timer {
144
+ position: absolute;
145
+ top: 50px;
146
+ right: 10px;
147
+ font-size: 1.5em;
148
+ color: white;
149
+ background-color: rgba(0, 0, 0, 0.5);
150
+ padding: 10px;
151
+ font-weight: bold;
152
+ border-radius: 10px;
153
  }