-
Notifications
You must be signed in to change notification settings - Fork 11
/
styles-luck.css
223 lines (194 loc) · 5.03 KB
/
styles-luck.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
/* Body styling */
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
background-color: black;
margin: 0;
font-family: Arial, sans-serif;
}
/* Info section styling */
.info {
display: flex;
justify-content: space-around;
width: 90%;
max-width: 500px;
margin-bottom: 20px;
color: aqua;
font-size: 1.5rem;
text-align: center;
}
.firstGrid{
background-color: rgb(90, 0, 0);
}
/* Grid styling */
#grid {
display: grid;
grid-template-columns: repeat(5, 1fr);
grid-gap: 5px;
width: 100%;
max-width: 500px;
margin: 0 auto;
padding: 3px;
padding-left: 3px;
}
/* Button styling */
button {
background-color: black;
border: none;
padding: 5px;
aspect-ratio: 1 / 1; /* Ensure buttons remain square */
transition: background-color 1s ease;
display: flex;
align-items: center;
justify-content: center;
}
button img {
max-width: 70%; /* Reduced to provide padding around images */
max-height: 70%;
object-fit: contain;
}
button.clicked img {
transform: scale(1.5);
transition: transform 0.3s ease;
}
/* Centering the game-over container */
#game-over {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, black, darkred); /* Gradient from black to dark red */
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
max-width: 90vw; /* Use viewport width to ensure it doesn’t overflow */
max-height: 90vh; /* Limit height to viewport height */
box-sizing: border-box; /* Include padding in width/height calculation */
overflow: hidden; /* Prevent any overflow */
position: absolute; /* Position relative to viewport */
top: 50%; /* Center vertically */
left: 50%;
transform: translate(-50%, -50%); /* Adjust for true center */
}
/* Styling for the final score heading */
#game-over h2 {
color: #ff6666; /* Light shade of red */
font-size: 2rem;
margin: 0;
text-align: center; /* Center text */
}
/* Styling for the final score paragraph */
#game-over p {
color: #ff9999; /* Lighter shade of red */
font-size: 1.8rem;
font-weight: bold;
margin: 10px 0;
text-align: center; /* Center text */
animation: pulse 1s infinite; /* Optional animation */
}
/* Styling for the restart and theme buttons */
#game-over .restart-btn {
display: inline-block;
background-color: #b30000; /* Dark red button background */
color: white;
padding: 10px 20px;
border-radius: 5px;
text-decoration: none;
font-size: 1rem;
font-weight: bold;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
/* Hover effect for the restart and theme buttons */
#game-over .restart-btn:hover {
background-color: #ff3333; /* Lighter red on hover */
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}
/* Active effect for the restart and theme buttons */
#game-over .restart-btn:active {
background-color: #990000; /* Slightly darker red on click */
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
/* Restart button styling */
.restart-btn {
background-color: yellow;
color: black;
font-size: 1.5rem;
padding: 10px 20px;
text-decoration: none;
border-radius: 5px;
margin-top: 10px;
transition: background-color 0.3s ease;
}
.restart-btn:hover {
background-color: orange;
}
/* Pulsing animation for the final score */
@keyframes pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
}
/* Responsive styling */
/* Ensure proper scaling on mobile devices */
@media screen and (max-width: 768px) {
.info {
font-size: 1.2rem;
}
#grid {
grid-gap: 8px;
width: 90vw; /* Ensure the grid takes 90% of the viewport width */
}
button {
padding: 3px;
min-width: 40px; /* Set a minimum width */
min-height: 40px; /* Set a minimum height */
}
button img {
max-width: 70%; /* Adjust image size */
max-height: 70%;
}
}
@media screen and (max-width: 480px) {
.info {
font-size: 1rem;
}
#grid {
grid-gap: 6px;
width: 90vw; /* Ensure the grid takes 90% of the viewport width */
}
button {
min-width: 40px; /* Set a minimum width */
min-height: 40px; /* Set a minimum height */
}
button img {
max-width: 60%; /* Adjust image size */
max-height: 60%;
}
}
@media screen and (max-width: 360px) {
.info {
font-size: 0.9rem;
}
#grid {
grid-gap: 4px;
width: 90vw; /* Ensure the grid takes 90% of the viewport width */
}
button {
min-width: 30px; /* Set a minimum width */
min-height: 30px; /* Set a minimum height */
}
button img {
max-width: 55%; /* Adjust image size */
max-height: 55%;
}
}