-
-
Notifications
You must be signed in to change notification settings - Fork 529
/
style.css
149 lines (125 loc) · 2.08 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
@import url("https://fonts.googleapis.com/css?family=Press+Start+2P&display=swap");
* {
box-sizing: border-box;
}
body {
background-color: #516dff;
color: #fff;
font-family: "Press Start 2P", sans-serif;
height: 100vh;
overflow: hidden;
margin: 0;
text-align: center;
}
a {
color: #fff;
}
h1 {
line-height: 1.4;
}
.btn {
border: 0;
background-color: #fff;
color: #516dff;
padding: 15px 20px;
font-family: inherit;
cursor: pointer;
}
.btn:hover {
opacity: 0.9;
}
.btn:focus {
outline: none;
}
.screen {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
width: 100vw;
transition: margin 0.5s ease-out;
}
.screen.up {
margin-top: -100vh;
}
.insects-list {
display: flex;
flex-wrap: wrap;
justify-content: center;
list-style-type: none;
padding: 0;
}
.insects-list li {
margin: 10px;
}
.choose-insect-btn {
background-color: transparent;
border: 2px solid #fff;
color: #fff;
cursor: pointer;
font-family: inherit;
width: 150px;
height: 150px;
}
.choose-insect-btn:hover {
background-color: #fff;
color: #516dff;
}
.choose-insect-btn:active {
background-color: rgba(255, 255, 255, 0.7);
}
.choose-insect-btn img {
width: 100px;
height: 100px;
object-fit: contain;
}
.game-container {
position: relative;
}
.time,
.score {
position: absolute;
top: 20px;
}
.time {
left: 20px;
}
.score {
right: 20px;
}
.message {
line-height: 1.7;
background-color: rgba(0, 0, 0, 0.5);
width: 100%;
padding: 20px;
z-index: 100;
text-align: center;
opacity: 0;
position: absolute;
top: 0;
left: 50%;
transform: translate(-50%, -150%);
}
.message.visible {
transform: translate(-50%, 150%);
opacity: 1;
}
.insect {
display: flex;
align-items: center;
justify-content: center;
width: 100px;
height: 100px;
position: absolute;
transform: translate(-50%, -50%) scale(1);
transition: transform 0.3s ease-in-out;
cursor: pointer;
}
.insect img {
width: 100px;
height: 100px;
}
.insect.caught {
transform: translate(-50%, -50%) scale(0);
}