:root {
    --col1: #aea69e;
    --col2: #11151c;
    --col3: #212d40;
    --col4: #364156;
    --col5: #7d4e57;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@font-face {
	font-family: 'BoggleFont';
	src: url(/static/font/BoggleFont.ttf) format('truetype');
}

body {
	background-color: var(--col1);
	/* Background texture from www.transparenttextures.com - Fabric(Plaid) by James Basoo*/
	background-image: url("/static/img/fabric-plaid.png");
	color: var(--col2);
    font-family: 'Roboto', sans-serif;
}

.top_div {
	align-items: center;
	display: flex;
	flex-direction: column;
	height: 100vh;
	margin: 0 auto;
	padding: 5px;
}

header h1 {
    font-family: 'BoggleFont', 'Zilla Slab Highlight', cursive;
    color: var(--col4);
    font-size: 3rem;
}

main {
	flex: 1;
}

form {
    border: 1px solid var(--col4);
    margin:auto;
    padding: 0.5rem;
}

form > div {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.error {
	color: var(--col5);
	text-align: center;
}

input[type='text'] {
    background-color: var(--col1);
    border: 1px solid var(--col3);
    color: var(--col2); 
    font-size: 1.05rem;
    font-style: italic;
    font-weight: 600;
    line-height: 1.5;
}

.flash, .help, details {
	color: var(--col4);
	font-family: 'Ubuntu', sans-serif;
}

.flash {
	font-size: 1.2em;
	/*line-height: 1.7;*/
}

details:not([open]) {
	text-align: center;
}

summary {
	font-family: 'Zilla Slab Highlight', cursive;
}

summary::marker {
	color:var(--col5);
}

.btns_div, .img_div, #timer_p, #points_p, #status_msg_p {
	text-align: center;
}

#status_msg_p {
	color: var(--col5);
}

button {
    background-color: var(--col4);
    border-color: var(--col3);
    border-radius: 5px;
    color: var(--col1);
	font-weight: bold;
    padding: 5px;
	vertical-align: middle;
}

button:disabled {
    background-color: var(--col4);
    border: none;
	opacity: 0.5;
}

button:enabled:active {
    background-color: var(--col3);
    border-color: var(--col4);
	padding-top: 7px;
	padding-bottom: 3px;
	padding-left: 5px;
	padding-right: 5px;
}


#letter_block_div {
	display: grid;
	grid-template-rows: repeat(4, auto);
	row-gap: 1.5em;
	width: 22em;
	margin: 1.5em auto;
	padding: 1em;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
	touch-action: none;
}

.letter_row_div {
	display: flex;
	justify-content: space-evenly;
}

.letter_div {
	background-image: radial-gradient(circle, rgba(185,178,144,1) 35%, rgba(247,239,200,1) 100%);
	border-radius: 10px;
	color: var(--col5);
	padding: 0.30em;
	text-align: center;
	font-family: 'Courier New', Courier, monospace;
	font-size: 2.25em;
	font-weight: bold;
	line-height: 0.7;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
	touch-action: none;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.player_words {
	font-size: 0.85em;
}

#missed_words_p {
	display: none;
}

#your_words_p::before {
	content: "Your words: ";
	color: var(--col4);
}

#missed_words_p::before {
	content: "Words you missed: ";
	color: var(--col4);
}

.front {
	color: var(--col4);
}

.sthru {
	text-decoration: line-through;
}

.main_row {
	margin-top: 1.5em;
}

footer {
    font-family: 'Tangerine', cursive;
    font-size: 1.4rem;
}

footer a, .link {
    text-decoration: none;
}

.link {
    color: var(--col5);
}

.word_try {
	color: #321f23;
}

.word_success {
	animation: success-normal 1.5s forwards;
	color:chartreuse;
}

@keyframes success-normal {
	from {color: chartreuse;}
	to {color:var(--col5)}
}

.word_fail {
	animation: fail-normal 1.5s forwards;
	color: red;
}

@keyframes fail-normal {
	from {color: red;}
	to {color: var(--col5);}
}

.flash_goaway {
    animation: goaway 2s;
    animation-fill-mode: forwards;
}

@keyframes goaway {
    from {
        font-size: 1.3em;
        line-height: 1.5;
        opacity: 1.0;
        margin-bottom: 1rem;
    }
    to {
        font-size: 0.1em;
        line-height: 0;
        opacity: 0;
        margin-bottom: 0;
    }
}

@media screen and (min-width: 640px) {
    .top_div {
		align-items: center;
		display: flex;
		flex-direction: column;
		height: 100vh;
		margin: 0 auto;
		max-width: 40em;
	}
}