160 lines
2.4 KiB
CSS
160 lines
2.4 KiB
CSS
@import url("https://alv.cx/styles.css");
|
|
|
|
:root {
|
|
--default-bg: #fefefe;
|
|
--dark-bg: #b8b8b8;
|
|
--selected-bg: #383838;
|
|
--default-fg: #454545;
|
|
--red: #ab4642;
|
|
--orange: #dc9656;
|
|
--yellow: #f7ca88;
|
|
--green: #a1b56c;
|
|
--teal: #86c1b9;
|
|
--blue: #7cafc2;
|
|
--purple: #ba8baf;
|
|
--brown: #a16946;
|
|
}
|
|
|
|
body {
|
|
font-family: monospace;
|
|
margin-top: 0;
|
|
}
|
|
|
|
#game_container {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
#letter_grid {
|
|
width: fit-content;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
#footer { margin-top: 4em; }
|
|
|
|
.grid_row {
|
|
display: flex;
|
|
flex-direction: row;
|
|
}
|
|
|
|
.grid_item {
|
|
width: 8vw;
|
|
max-width: 3em;
|
|
height: 8vw;
|
|
max-height: 3em;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
border: 0.2em solid var(--default-fg);
|
|
margin: min(1em, 3vw);
|
|
text-transform: uppercase;
|
|
font-weight: 800;
|
|
transition: 0.5s;
|
|
}
|
|
|
|
.grid_item * {
|
|
text-align: center;
|
|
margin: 0;
|
|
}
|
|
|
|
.grid_correct { background-color: var(--green)}
|
|
.grid_present { background-color: var(--yellow)}
|
|
.grid_wrong { background-color: var(--default-bg)}
|
|
|
|
.correct {
|
|
animation: correct 0.5s;
|
|
}
|
|
|
|
.incorrect {
|
|
animation: incorrect 0.5s;
|
|
}
|
|
|
|
.clicked {
|
|
animation: clicked 0.5s;
|
|
}
|
|
|
|
@keyframes correct {
|
|
0% {
|
|
background: var(--default-bg);
|
|
}
|
|
50% {
|
|
background: var(--green);
|
|
}
|
|
100% {
|
|
background: var(--default-bg);
|
|
}
|
|
}
|
|
|
|
@keyframes incorrect {
|
|
0% {
|
|
background: var(--default-bg);
|
|
}
|
|
50% {
|
|
background: var(--red);
|
|
}
|
|
100% {
|
|
background: var(--default-bg);
|
|
}
|
|
}
|
|
|
|
@keyframes clicked {
|
|
0% {
|
|
background: var(--default-bg);
|
|
}
|
|
50% {
|
|
background: var(--dark-bg);
|
|
}
|
|
100% {
|
|
background: var(--default-bg);
|
|
}
|
|
}
|
|
|
|
#end_screen {
|
|
position: fixed;
|
|
height: 100vh;
|
|
width: 100vw;
|
|
top: 0;
|
|
left: 0;
|
|
padding: 1em;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
background-color: rgba(255, 255, 255, 0.8)
|
|
}
|
|
|
|
#end_screen * {
|
|
width: fit-content;
|
|
}
|
|
|
|
#end_screen_image {
|
|
max-width: 80vw;
|
|
}
|
|
|
|
#keyboard {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.kb_row {
|
|
display: flex;
|
|
}
|
|
|
|
.kb_row * {
|
|
width: min(10vw, 3em);
|
|
height: min(10vw, 3em);
|
|
text-align: center;
|
|
margin: 0;
|
|
}
|
|
|
|
.kb_filler {
|
|
width: min(5vw, 1.5em);
|
|
}
|
|
|
|
.kb_letter {
|
|
line-height: min(10vw, 3em)
|
|
}
|