-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.css
160 lines (138 loc) · 3.04 KB
/
main.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
:root {
--card-width: 120px;
}
html, body {
overflow-x: hidden; /* Prevent sidescroll during touch events */
}
body {
display: flex;
flex-direction: column;
min-height: 100vh;
margin: 0;
background-color: #e0f7e0; /* Spearmint green background */
font-family: "Jost", sans-serif;
font-optical-sizing: auto;
font-weight: 400;
font-style: normal;
/* Prevent sidescroll during touch events */
max-width: 100%;
}
main {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
padding-bottom: 32px;
}
footer {
background-color: #709170;
color: white;
text-align: center;
padding: 10px 0;
width: 100%;
margin-top: auto; /* Pushes the footer to the bottom */
}
h1 {
color: #709170;
margin-top: 4px;
}
.hidden {
display: none;
}
.grid-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(var(--card-width), 1fr));
grid-gap: 8px;
width: 100%;
max-width: 600px;
margin: 0 auto;
padding-left: 3px; /* Since there's a box-shadow to the right we gotta pad left to center */
justify-content: center; /* Center the grid items */
}
.card {
display: flex;
align-items: center;
justify-content: center;
width: var(--card-width);
height: var(--card-width);
border-radius: 10px;
background-color: #fdfbf8; /* Bone white gradient */
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2), -2px -2px 5px rgba(255, 255, 255, 0.5); /* Subtle shadow effect */
cursor: pointer;
user-select: none;
color: #333;
font-weight: bold;
text-align: center;
transition: transform 0.25s, background-color 0.5s, top 0.25s, left 0.25s;
&:hover {
transform: scale(1.05);
}
&.selected {
background: rgb(142 241 143 / 90%);
}
&.warn {
background-color: rgba(197, 178, 70, 0.837);
}
&.resolved {
background: linear-gradient(145deg, #90ee90, #76c776); /* Green for resolved cards */
box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.2), inset -2px -2px 5px rgba(255, 255, 255, 0.5); /* Subtle inset shadow */
cursor: default;
}
}
.correct-answers {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
max-width: 600px;
margin: 0 auto 20px;
}
.theme {
text-align: center;
font-weight: bold;
margin-top: 10px;
margin-bottom: 10px;
}
.items-list {
grid-column: span 4;
text-align: center;
font-size: 1em;
color: #333;
}
#message {
margin-top: 20px;
font-size: 1.2em;
color: #333;
min-height: 1.5em; /* Reserve space for the message */
opacity: 0;
transition: opacity 0.5s ease-in-out;
}
button {
margin-top: 20px;
padding: 10px 20px;
font-size: 1em;
cursor: pointer;
border: none;
border-radius: 5px;
background-color: #333;
color: white;
transition: background-color 0.2s;
font-family: "Jost";
}
button:hover {
background-color: #555;
}
.difficulty-selection {
display: flex;
gap: 10px;
margin-bottom: 20px;
}
.difficulty-selection label {
font-weight: bold;
}
.difficulty-selection select {
padding: 5px;
border-radius: 5px;
border: 1px solid #ccc;
}