forked from YadavAkhileshh/Alien-Invasion-Defense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
231 lines (200 loc) · 4.03 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
@font-face {
font-family: "Rio";
src: url(Rio.ttf);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family:"Rio", Georgia, 'Times New Roman', Times, serif;
}
body {
background-color: #000;
overflow-x: hidden;
text-align: center;
}
.container {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
color: white;
text-align: center;
}
.spaceship-animation {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
overflow: hidden;
}
/* Spaceship and alien animation - moving vertically */
.spaceship {
position: absolute;
width: 80px;
height: 50px;
background: url('spaceship.webp') no-repeat center center;
background-size: contain;
animation: fly-vertical 10s infinite linear;
}
.spaceship1 {
left: 5%;
top: -100px;
animation-delay: 0s;
}
.spaceship2 {
left: 15%;
top: -150px;
animation-delay: 1s;
}
.spaceship3 {
left: 25%;
top: -200px;
animation-delay: 2s;
}
.spaceship4 {
left: 35%;
top: -250px;
animation-delay: 3s;
}
.spaceship5 {
left: 45%;
top: -300px;
animation-delay: 4s;
}
.spaceship6 {
left: 55%;
top: -350px;
animation-delay: 5s;
}
.spaceship7 {
left: 65%;
top: -400px;
animation-delay: 6s;
}
.spaceship8 {
left: 75%;
top: -450px;
animation-delay: 7s;
}
.spaceship9 {
left: 85%;
top: -500px;
animation-delay: 8s;
}
.spaceship10 {
left: 95%;
top: -550px;
animation-delay: 9s;
}
/* Animation for vertical movement (top to bottom) */
@keyframes fly-vertical {
from {
transform: translateY(0);
}
to {
transform: translateY(110vh);
}
}
h1 {
font-size: 3rem;
margin-bottom: 1rem;
}
.mute-btn {
position: absolute;
top: 20px;
right: 20px;
background-color: transparent;
border: none;
font-size: 24px;
color: white;
cursor: pointer;
outline: none;
}
.mute-btn:hover {
transform: scale(1.1);
}
.game-description {
font-size: 1.2rem;
width: 60%;
margin-bottom: 2rem;
opacity: 1;
background-color: orange;
padding: 20px;
border-radius: 30px;
transform: translateY(30px);
transition: opacity 0.6s ease, transform 0.6s ease;
}
.game-description:hover{
transform: scale(1.1);
}
.start-btn {
padding: 10px 30px;
background-color: orange;
color: white;
font-size: 1.5rem;
border-radius: 40px;
border: none;
cursor: pointer;
transition: background-color 0.3s ease, transform 0.3s ease;
}
.start-btn:hover {
background-color: darkorange;
transform: scale(1.1);
}
/* Scroll reveal effect for description */
.reveal {
opacity: 1;
transform: translateY(0);
}
.content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
text-align: center;
FeedbackPage
}
#nextLevelMessage {
display: none;
position: absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 28px;
font-weight: bold;
color: white;
background-color: rgba(0, 0, 0, 0.7);
padding: 15px 20px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
text-align: center;
z-index: 1000; /* Make sure it's above other elements */
}
.hidden {
display: none;
}
FeedbackPage
.feedback-button {
position: fixed; /* Fixes the button in place */
bottom: 20px; /* Distance from the bottom */
left: 20px; /* Distance from the left */
padding: 10px 15px; /* Add some padding */
border-radius: 10px; /* Rounded corners */
background-color: #f39c12; /* Button color */
color: white; /* Text color */
border: none; /* No border */
cursor: pointer; /* Pointer cursor on hover */
z-index: 1000; /* Ensure it's above other elements */
margin-left: 300px
}
.feedback-button:hover {
background-color: #e67e22; /* Darker shade on hover */
}
main
main