193 lines
2.7 KiB
CSS
193 lines
2.7 KiB
CSS
:root {
|
|
--text: white;
|
|
|
|
--correct: limegreen;
|
|
--correct-shadow: green;
|
|
|
|
--fail: crimson;
|
|
--fail-shadow: red;
|
|
|
|
--hover: gray;
|
|
--selection: goldenrod;
|
|
--selection-shadow: gold;
|
|
}
|
|
|
|
html {
|
|
font-size: 62.5%;
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
body {
|
|
background-color: #0f1116;
|
|
color: var(--text);
|
|
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
|
margin: 0px;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
#counter {
|
|
margin: 10px;
|
|
font-size: 20px;
|
|
|
|
> div {
|
|
display: inline-block;
|
|
|
|
&.correct {
|
|
color: var(--correct);
|
|
text-shadow: var(--correct-shadow) 0px 0px 30px;
|
|
}
|
|
|
|
&.wrong {
|
|
color: var(--fail);
|
|
text-shadow: var(--fail-shadow) 0px 0px 30px;
|
|
}
|
|
|
|
&:not(:last-child)::after {
|
|
color: var(--text);
|
|
content: "/";
|
|
}
|
|
}
|
|
}
|
|
|
|
#result {
|
|
display: none;
|
|
position: absolute;
|
|
top: 40%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
justify-content: center;
|
|
align-items: center;
|
|
user-select: none;
|
|
opacity: 0;
|
|
cursor: default;
|
|
|
|
&.visible {
|
|
display: flex;
|
|
animation: 200ms fade-in forwards;
|
|
}
|
|
|
|
> div {
|
|
position: relative;
|
|
text-align: center;
|
|
font-size: 40vw;
|
|
|
|
&.correct {
|
|
color: var(--correct);
|
|
text-shadow: var(--correct-shadow) 0px 0px 30px;
|
|
}
|
|
|
|
&.wrong {
|
|
color: var(--fail);
|
|
text-shadow: var(--fail-shadow) 0px 0px 30px;
|
|
}
|
|
}
|
|
}
|
|
|
|
@keyframes fade-in {
|
|
0% {
|
|
opacity: 0;
|
|
display: none;
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
form {
|
|
width: 100%;
|
|
text-align: center;
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-size: 24px;
|
|
user-select: none;
|
|
|
|
h1 {
|
|
font-size: 3vw;
|
|
text-wrap: balance;
|
|
|
|
&.correct {
|
|
color: var(--correct);
|
|
text-shadow: var(--correct-shadow) 0px 0px 30px;
|
|
}
|
|
|
|
&.wrong {
|
|
color: var(--fail);
|
|
text-shadow: var(--fail-shadow) 0px 0px 30px;
|
|
}
|
|
}
|
|
|
|
> div {
|
|
width: 100%;
|
|
height: 80px;
|
|
display: flex;
|
|
margin-top: 10px;
|
|
align-items: center;
|
|
align-self: center;
|
|
box-sizing: border-box;
|
|
border: solid 2px unset;
|
|
text-wrap: balance;
|
|
|
|
&.selected {
|
|
border: solid 2px var(--selection);
|
|
box-shadow: 0px 0px 13px -5px var(--selection-shadow);
|
|
}
|
|
|
|
> input[type="checkbox"] {
|
|
display: none;
|
|
scale: 1.5;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
> label {
|
|
flex-grow: 1;
|
|
}
|
|
}
|
|
|
|
> input[type="submit"] {
|
|
margin-top: 40px;
|
|
height: 70px;
|
|
background-color: transparent;
|
|
border: none;
|
|
color: white;
|
|
font-size: 42px;
|
|
|
|
&:focus {
|
|
outline: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
@media only screen and (max-width: 640px) {
|
|
form {
|
|
h1 {
|
|
font-size: 5vw;
|
|
}
|
|
}
|
|
|
|
#result > div {
|
|
font-size: 70vw;
|
|
}
|
|
}
|
|
|
|
@media (hover: hover) {
|
|
form {
|
|
> input[type="submit"]:hover {
|
|
font-size: 48px;
|
|
color: var(--selection);
|
|
cursor: pointer;
|
|
}
|
|
|
|
> div {
|
|
&:hover:not(.selected) {
|
|
border: solid 1px var(--hover);
|
|
}
|
|
|
|
&:hover,
|
|
> *:hover {
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
}
|
|
}
|