-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
129 lines (112 loc) · 2.22 KB
/
styles.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
:root {
--primary-color: #4caf50;
--primary-hover: #45a049;
--primary-active: #3e8e41;
--background-color: #f0f0f0;
--card-background: #ddd;
--card-flipped: #fff;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Lucida Sans', 'Lucida Sans Regular', Geneva, Verdana, sans-serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: var(--background-color);
}
.container {
text-align: center;
max-width: 37.5rem;
margin: 0 auto;
padding: 1.25rem;
}
h1.title {
margin-bottom: 1.25rem;
}
.game-info {
display: flex;
margin-bottom: 1.25rem;
gap: 0.8rem;
}
.game-info span {
/* display: grid;
grid-template-columns: repeat(4, 1fr); */
flex: 1;
text-align: center;
}
.start-stop-btn {
background-color: var(--primary-color);
border: none;
color: white;
padding: 1rem 2rem;
text-align: center;
text-decoration: none;
display: inline-flex;
font-size: 1rem;
margin: 1rem 0.0625rem;
cursor: pointer;
border-radius: 0.5rem;
transition: background-color 0.3s ease;
}
.start-stop-btn:hover {
background-color: var(--primary-hover);
}
.start-stop-btn:active {
background-color: var(--primary-active);
}
.game-board {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 0.625rem;
max-width: 37.5rem;
margin: 0 auto;
animation: fadeIn 0.5s ease-in-out;
}
.card {
aspect-ratio: 3/4;
background-color: var(--card-background);
display: flex;
justify-content: center;
align-items: center;
/* font-size: 0; */
cursor: pointer;
transition: transform 0.3s, background-color 0.3s;
border-radius: 0.3rem;
}
.card.flipped {
transform: rotateY(180deg);
background-color: var(--card-flipped);
font-size: 2rem;
}
.hidden {
display: none;
}
.game-board.fade-out {
animation: fadeOut 0.5s ease-in-out;
}
@media (max-width: 37.5rem) {
.game-board {
grid-template-columns: repeat(3, 1fr);
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}