-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
175 lines (154 loc) · 3.97 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
html, body {
height: 100%;
margin: 0;
}
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
background: black;
}
#game-container {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: auto;
max-height: 100vh;
}
#top-container {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between; /* Adjust this as needed */
color: white;
font-family: 'Press Start 2P', cursive; /* Assuming you're using this font */
background: black;
padding: 10px;
font-size: 16px; /* Adjust size as needed */
}
#score {
display: flex;
flex-direction: row;
justify-content: center;
margin: 0;
font-family: 'Press Start 2P', cursive;
color: white;
padding: 5px;
margin-right: 120px;
z-index: 5;
}
#level {
display: flex;
flex-direction: row;
justify-content: center;
margin: 0;
font-family: 'Press Start 2P', cursive;
color: white;
padding: 5px;
z-index: 5;
}
#game-over, #winner {
display: none; /* Initially hidden; set to block or flex when the game is over */
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%); /* Center the div over the canvas */
color: white; /* Or any color you want */
font-family: 'Press Start 2P', cursive;
font-size: 2em; /* Adjust as needed */
text-align: center;
z-index: 10; /* Make sure this is above the canvas layer */
}
#pwr {
display: block; /* Initially hidden; set to block or flex when the game is over */
position: relative;
color: white; /* Or any color you want */
font-family: 'Press Start 2P', cursive;
font-size: 2em; /* Adjust as needed */
text-align: center;
}
#powerupText {
position: absolute;
top: 75px;
display: none; /* Initially hidden */
z-index: 10;
-webkit-background-clip: text;
background-clip: text;
background-image: -webkit-gradient(linear, left top, right top, from(#09f1b8), color-stop(#00a2ff), color-stop(#ff00d2), to(#fed90f));
background-image: -o-linear-gradient(left, #09f1b8, #00a2ff, #ff00d2, #fed90f);
background-image: linear-gradient(to right, #09f1b8, #00a2ff, #ff00d2, #fed90f);
padding: 5px;
color: #000119;
color: var(--color-background);
font-family: Poppins, sans-serif;
font-size: 35px;
font-weight: 700;
letter-spacing: calc(1em / 8);
letter-spacing: 10px;
padding: calc(--stroke-width / 2);
-webkit-text-stroke-color: transparent;
-webkit-text-stroke-width: calc(1em / 16);
-webkit-text-stroke-width: var(--stroke-width);
}
#fpsCounter {
color: red;
position: fixed;
top: 10px;
left: 10px;
background-color: rgba(255, 255, 255, 0.7);
padding: 5px;
border-radius: 5px;
font-family: Arial, sans-serif;
font-size: 14px;
}
p {
font-family: 'Press Start 2P', cursive;
font-size: 2em;
text-align: center;
animation-name: example;
animation-duration: 1s;
animation-iteration-count: infinite;
}
@keyframes example {
0% {
color: lime;
text-shadow: 0 0 20px green;
}
25% {
color: green;
text-shadow: 2px 2px 2px lime;
transform: translate(-2px, 1px);
}
40%, 70% {
color: lime;
text-shadow: none;
transform: translate(0, 0);
}
50% {
color: green;
text-shadow: 5px 5px 2px blue, -5px -5px 2px red;
transform: translate(0px, 5px);
}
80%, 100% {
color: lime;
text-shadow: 0 0 20px green;
transform: translate(-2px, 1px);
}
}
/* POWERUP CSS TEXT EFFECTS */
:root {
--color-background: #000119;
--stroke-width: calc(1em / 16);
--font-size: 40px;
--font-weight: 700;
--letter-spacing: calc(1em / 8);
}
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}