/*!
 * Snek game.
 *
 * @author sizeof(cat) <sizeofcat AT riseup.net>
 * @copyright 2022 - 2025 sizeof(cat)
 * @version 1.2.0
 * @license GPLv3
 * 
 *           o8o                                  .o88o.   .o                         .   o.   
 *           `"'                                  888 `"  .8'                       .o8   `8.  
 *  .oooo.o oooo    oooooooo  .ooooo.   .ooooo.  o888oo  .8'   .ooooo.   .oooo.   .o888oo  `8. 
 * d88(  "8 `888   d'""7d8P  d88' `88b d88' `88b  888    88   d88' `"Y8 `P  )88b    888     88 
 * `"Y88b.   888     .d8P'   888ooo888 888   888  888    88   888        .oP"888    888     88 
 * o.  )88b  888   .d8P'  .P 888    .o 888   888  888    `8.  888   .o8 d8(  888    888 .  .8' 
 * 8""888P' o888o d8888888P  `Y8bod8P' `Y8bod8P' o888o    `8. `Y8bod8P' `Y888""8o   "888" .8'  
 *                                                         `"                             "'   
 */

@font-face {
	font-family: 'Eczar';
	font-style: normal;
	font-weight: 400;
	src: local('Eczar Regular'),
		local('Eczar-Regular'),
		url(../fonts/font.woff2) format('woff2');
}

.application {
	position: relative;
	background-color: #1f1f1f;
	color: #FAFAFA;
	margin: 0;
	padding: 0;
	font-family: 'Eczar', serif;
	width: 360px;
	top: 0;
	left: 0;
	height: 100%;
}

.application header {
	background-color: #1f1f1f;
	font-size: 28px;
	overflow: hidden;
	width: 100%;
	text-transform: uppercase;
	line-height: 28px;
}

.application .column {
	color: #6648EE;
	font-weight: normal;
	text-align: center;
	font-style: italic;
}

.application .column.first {
	float: left;
	margin: 0;
	color: #F6BDFF;
	padding: 4px 0 4px 10px;
	text-align: left;
}

.application .column.second {
	float: right;
	margin: 0;
	color: #70EFDE;
	padding: 4px 10px 4px 0;
	text-align: right;
}

.application footer {
	padding: 8px 4px 12px;
	text-align: center;
	position: absolute;
	bottom: 0;
	width: 100%;
	box-sizing: border-box;
	z-index: 999;
	background-color: #1f1f1f;
	display: none;
}

.application footer .button {
	margin: 0 !important;
}

.application .content {
	position: absolute;
	width: 360px;
	height: calc(100% - 38px);
	text-align: center;
	color: #ffffff;
	background-color: #1f1f1f;
	z-index: 999;
	overflow: hidden;
}

.application .content h1 {
	font-size: 50px;
	margin: 10px 0;
	position: absolute;
	text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 10px #000;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
}

.application .notification {
	position: absolute;
	left: 0;
	top: 38px;
	z-index: 100;
	width: 100%;
	color: #fff;
	text-align: center;
	background: #1f1f1f;
	opacity: 0.9;
	text-transform: uppercase;
	font-size: 18px;
}

.application .select,
.application .input {
	border-radius:3px;
	font-size:14pt;
	padding:3px 10px;
	background-color: #5B61ED;
	color:#fff;
	width:160px;
	text-align:center;
	border: 1px solid #5B61ED;
	box-sizing: border-box;
}

.application .button {
	background-color: #BB86FC;
	border-radius: 3px;
	cursor: pointer;
	color: #000;
	margin: 10px;
	font-size: 26px;
	line-height: 34px;
	padding: 10px 20px;
}

.application .button.secondary {
	background-color: #54DBC5;
}

.application .button.tertiary {
	background-color: #555;
	padding: 3px;
}

.application .button.attention {
	background-color: #F24264;
}

.application ul.settings {
	list-style-type: none;
	margin: 0 80px;
	padding: 0;
	text-align: center;
}

.application .board {
	margin: 0 auto;
	width: 100%;
	position: relative;
	overflow: hidden;
	line-height: 1px !important;
}

.application .main-menu {
	position: absolute;
	bottom: 0;
	width: 100%;
	background-color: #1f1f1f;
}

.application .panel.settings,
.application .panel.scores,
.application .panel.about {
	display: none;
	margin: 10px;
	background-color: #1f1f1f;
	padding: 10px 0;
	text-align: left !important;
	border-radius: 3px;
}

.application .panel.about a {
	color: #fff;
}

.application .loading {
	text-align: center;
}

.application .scoreboard {
	display: none;
	margin: 0;
	padding: 0;
}

.application .scoreboard li {
	margin: 0 auto;
	font-style: italic;
	padding: 5px 0 !important;
	list-style-type: none;
	position: relative;
	overflow: hidden;
}

.application .panel p,
.application .panel li {
	font-size: 15px;
	margin: 0;
	padding: 0;
}

.application .best_move,
.application .best_score {
	font-size: 20px;
	opacity: 0.6;
}

.application .game-username {
	margin-bottom: 10px;
}

.application .high-score-name {
	color: #EFC5FF;
	float: right;
	background: #1f1f1f;
	padding-left: 7px;
	padding-right: 6px;
	z-index: 3;
	position: absolute;
	right: 0;
	top: 0;
}

.application .high-score-score {
	color: #87EADC;
	background: #1f1f1f;
	padding-right: 11px;
	position: relative;
}
.application .scoreboard li:after {
	content: ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .";
	opacity: .3;
	white-space: nowrap;
	position: absolute;
	z-index: 1;
	font-size: 20px;
}

.application .scoreboard li {
	line-height: 36px;
	font-size: 30px;
}

.application .scoreboard li:first-child {
	line-height: 46px;
	font-size: 35px;
}

.application .scoreboard li:last-child {
	line-height: 33px;
	font-size: 27px;
}

.application .button.attention {
	animation-name: RESET-BTN;
	animation-duration: 5s;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

.application #intro {
	position: relative;
	overflow: hidden;
	height: 100%;
	width: 100%;
}

.application #intro:before {
	content: "";
	position: absolute;
	width: 500%;
	height: 500%;
	top: -150%;
	left: -150%;
	z-index: -1;
	background: url(../img/intro.png) 0 0 repeat;
	transform: rotate(30deg);
	animation-name: MOVE-BG;
	animation-duration: 45s;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

::placeholder {
	color: rgba(255, 255, 255, 0.7);
	opacity: 1;
}

::-ms-input-placeholder,
:-ms-input-placeholder {
	color: rgba(255, 255, 255, 0.7);
}

@media (max-width:440px) {
	.application {
		width: 100%;
	}
	.application .content {
		width: 100%;
	}
	.application .board {
		margin: 0 auto;
	}
}

@media (min-width:441px) {
	.application {
		overflow: hidden;
		margin: 0 auto;
		max-height: 100vh;
		height: 640px;
		box-sizing: content-box;
		border-radius: 5px;
		box-shadow: 0 0 50px #000;
		border: 10px solid #1f1f1f;
		border-bottom: none;
		width: calc( 100% - 60px);
		max-width: 600px;
	}
	.application .content {
		width: 100%;
		max-width: 600px;
	}
	.column.second,
	.column.first {
		padding-left: 0;
		padding-right: 0;
	}
	.application .button {
		margin: 10px 0;
	}
}

@media (min-width: 1600px) {
	.application {
		max-height: 100%;
		height: calc( 100% - 60px);
		width: calc( 100% - 60px);
		max-width: calc( 100vh - 60px);
	}
	.application .content {
		max-width: 100%;
	}
}

@keyframes MOVE-BG {
	from {
		transform: translate(0, 0) rotate(30deg);
	}
	to { 
		transform: translate(-50%, -15%)  rotate(30deg);
	}
}

@keyframes RESET-BTN {
	from {
		background-color: #F24264;
	}
	to { 
		background-color: #555;
	}
}

.cell {
	display: inline-block;
	width: 24px;
	height: 24px;
	background-color: #000;
	margin: 0 2px 2px 0;
}

.snakehead {
	background-color: #FA8C5A;
	border-radius:20%;
}

.snakebody {
	background-color: #FAC15A;
	border-radius:20%;
}

.food {
	background-color: #5AC8FA;
	opacity: 0.6;
	border-radius:100%;
}
