-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
111 lines (94 loc) · 1.91 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
:root {
--dark-blue: #1C274C;
}
* {
margin: 0;
padding: 0;
font-family: Arial, Helvetica, sans-serif;
color: var(--dark-blue);
}
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: #8EC5FC;
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
}
#game-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
#volume {
width: 40px;
position: absolute;
top: 0;
right: 0;
margin: 15px;
cursor: pointer;
}
#resetBtn {
margin: 10px;
padding: 5px 10px;
border: 1px solid var(--dark-blue);
border-radius: 5px;
background-color: #caaffc;
font-size: large;
transition: 0.2s;
}
#resetBtn:hover {
background-color: #d4bfff;
border-color: #caaffc;
cursor: pointer;
}
#stats {
display: flex;
justify-content: space-evenly;
width: 100%;
}
#cards-container {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(4, 1fr);
grid-gap: 10px;
margin: 10px 0;
}
.card {
/* center card images */
display: flex;
justify-content: center;
align-items: center;
/* mobile width */
width: 20vw;
height: 20vw;
/* desktop width */
max-width: 100px;
max-height: 100px;
border: 1px solid #ccc;
border-radius: 10px;
transition: transform 0.6s; /* Smooth flip animation */
cursor: pointer;
background-image: url(images/card-back.png);
background-repeat: no-repeat;
background-size: cover;
background-position: center;
}
.card img {
width: 15vw; /* mobile */
max-width: 80px; /* desktop */
visibility: hidden;
}
.flipped {
transform: rotateY(180deg);
background: none;
background-color: white;
}
.flipped img {
visibility: visible;
}
.matched {
border: 0px;
background: none;
}