html, body {
	color: #f2f5f4;
	background: #161618;
	font-family: Helvetica;
}
::-webkit-input-placeholder {
	color: #f2f5f4;
}

/* heading (ascii art) */
#heading {
	font-size: 18px;
	text-align: center;
	margin: -20px auto 15px;
	transition: color 7.5s;
}

/* instant win debug btn */
#magic-btn {display: none;}


/* === P R E G A M E:  N I C K N A M E === */
/* nickname box */
#getnickname-wrapper::before {
	content: "a game by Markus K.";
	position: absolute;
	left: 0; right: 0; bottom: -25px;
	color: #444;
	font-size: 14px;
	margin: 0 auto;
	text-align: center;
}
#getnickname-wrapper {
	position: absolute;
	top: 20%; left: 0; right: 0;
	margin: 0 auto;
	width: 500px;
	height: 200px;
	border-top-left-radius: 15px;
	border-bottom-right-radius: 15px;
	background: #ee4d2e;
	box-shadow: 0px 5px 15px 5px #090909;
	z-index: 99999;
	display: none;
}
/* caption */
#getnickname-wrapper h3 {
	font-size: 22px;
	margin: 16px auto 0;
	text-align: center;
}
#getnickname-wrapper small {font-size: 10px;}
/* text and btn input main */
#getnickname-wrapper input {
	outline: none;
	color: #f2f5f4;
	font-size: 17px;
	padding: 10px;
	margin: 10px auto;
	border: none;
	background: rgba(0, 0, 0, .3);
}
/* text input */
#nickname {display: block;}
#nickname:focus {
	outline: 3px solid #eee;
}
/* play and show highscorelist btns */
#getnickname-wrapper .pre-game-btn-wrapper {
	margin: 0 auto;
	text-align: center;
}
#nickname-submit, #highscorelist-btn {
	cursor: pointer;
	border-radius: 10px;
	box-shadow: 0 1px 0 #222, 1px 2px 0 #222, 3px 4px 0 #222;
	transition: all .1s;
}
#nickname-submit:active, #highscorelist-btn:active {
	box-shadow: none;
	transform: translate(4px, 4px);
}


/* === G A M E  -  U I === */
#game-ui {/* main wrapper */
	display: flex;
	flex-direction: row;
	justify-content: center;
}

#game-stats {/* playername, moves, ... */
	position: absolute;
	top: 1px; left: 1px;
	padding: 15px;
	font-size: 20px;
	line-height: 1.3;
	border-bottom-right-radius: 15px;
	box-shadow: 0px 5px 15px 5px #090909;
	background: #161618;
	z-index: 99999999;
	display: none;
}

#game-stats-endgame {
	position: relative;
	text-align: center;
	display: none;
}
#game-stats-endgame hr {
	margin-bottom: 20px;
}
#game-stats-endgame .action-btn {
	animation: btn-color-change 10s infinite;
}
@keyframes btn-color-change {
	10% {
		background: #f7c516;
	}
	20% {
		background: #cc0000;
	}
	40% {
		background: #1db992;
	}
	60% {
		background: #008fff;
	}
	100% {
		background: #161618;
	}
}

#game-board {/* where the action lives */
	position: relative;
	width: 50%;
	max-width: 750px;
	height: calc(100vh - 135px); /* viewport height - love, just love */
	border-top-left-radius: 15px;
	border-bottom-right-radius: 15px;
	box-shadow: 0px 5px 15px 5px #090909;
	background: #161618;
	z-index: 99999;
	display: none;
}
#game-board .game-row {
	position: relative;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    padding: 10px;
    margin-bottom: 5px;
    border-bottom: 1px solid #000;
    /* background: rgba(0, 0, 0, 0.25); */
}
#game-board .game-row .color-btn {
	/* override few styles from color-btn class below */
	width: 30px;
	height: 30px;
	margin: 0;
	cursor: default;
}
/* pointer - only on active row */
#game-board .game-row.active .color-btn {
	cursor: pointer;
}
/* row number display */
#game-board .game-row::before {
	content: attr(data-row-number);
	position: absolute;
	top: 20%; left: -35px;
	font-size: 20px;
	line-height: 1;
	padding: 5px;
}
#game-board .game-row .game-row-score {
	position: absolute;
    top: 20%; left: -75px;
    font-size: 20px;
    padding-right: 5px;
    border-right: 2px solid #fff
	/* display: none; */
}
#game-board .game-row .color-btn {
	opacity: 0;
}


/* picker and game-board interactive "buttons" */
.color-btn {
	margin: 15px auto;
	background: #333;
	border-radius: 50px;
	width: 50px;
	height: 50px;
	cursor: pointer;
	border: 2px solid transparent;
	transform: rotate(0deg);
	transition: all .3s;
}


/* SIDEBAR (colorpicker and reroll-btn) */
#game-sidebar {
	position: relative;
	width: auto;
	height: auto;
	max-height: 0;
	padding: 20px;
	align-self: baseline;
	box-shadow: 0px 5px 15px 5px #090909;
	background: #161618;
	/* display: none; */
	opacity: 0;
	overflow: hidden;
}
#game-sidebar span {/* title: colorpicker */
	text-align: center;
	font-size: 20px;
	display: block;
}

#game-sidebar .color-btn.red {background: #cc0000;}
#game-sidebar .color-btn.green {background: #1db992;}
#game-sidebar .color-btn.blue {background: #008fff;}
#game-sidebar .color-btn.yellow {background: #f7c516;}

#game-sidebar .color-btn.active {
	transform: scale(1.2) !important;
	border: 2px solid #fff;
}

.action-btn {
	outline: none;
	color: #f2f5f4;
	font-size: 16px;
	padding: 10px;
	margin: 10px auto;
	display: block;
	border: none;
	cursor: pointer;
	border-radius: 10px;
	background: rgba(0, 0, 0, .3);
	box-shadow: 0 1px 0 #000, 1px 2px 0 #000, 3px 4px 0 #000;
	transition: all .1s;
}
.action-btn:active {
	box-shadow: none;
	transform: translate(4px, 4px);
}


#endgame-center {
	position: absolute;
	height: auto;
	width: 50%;
	top: 15%; left: 0; right: 0;
	margin: 0 auto;
	background: rgba(255, 0, 0, 0.25);
	z-index: 99999999;
}


#result-heading {
	position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    margin: 0 auto;
    font-size: 0px;
    /* z-index: 99999; */
	text-shadow: 0px 1px 0px #999, 0px 2px 0px #888, 0px 3px 0px #777, 0px 4px 0px #666, 0px 5px 0px #555, 0px 6px 0px #444, 0px 7px 0px #333, 0px 8px 7px #001135;
	display: none;
	transition: all 2s;
}


#highscorelist {
	position: absolute;
	top: 100px; left: 0; right: 0;
	width: 75%;
	height: 425px;
	margin: 0 auto;
	border-top-left-radius: 15px;
	border-bottom-right-radius: 15px;
	background: #161618;
	box-shadow: 0px 5px 15px 5px #090909;
	/* z-index: 99999; */
	overflow: auto;
	display: none;
}
#highscorelist .hl-header {
	padding: 10px;
	border-bottom: 2px solid #ee4d2e;
}
#highscorelist .hl-heading {
	position: relative;
	text-align: center;
	font-size: 22px;
	letter-spacing: 1px;
}
#highscorelist .hl-close {
	position: absolute;
	top: 0; right: 0;
	float: right;
	padding: 13px 9px;
	font-size: 20px;
	line-height: 1;
	border-left: 2px solid #ee4d2e;
	cursor: pointer;
}
/* table */
#highscorelist .hl-body table {
	text-align: center;
	width: 100%;
	border-collapse: collapse;
}
#highscorelist .hl-body th, #highscorelist .hl-body td {
	padding: 7px;
	border: 2px solid #ee4d2e;
	border-top: none;
}
#highscorelist .hl-body td {
	border-bottom: none;
}
#highscorelist .hl-body th:first-child, #highscorelist .hl-body td:first-child {
	border-left: none;
}
#highscorelist .hl-body th:last-child, #highscorelist .hl-body td:last-child {
	border-right: none;
}
.hl-new-entry {
	font-weight: bold;
	animation: hl-new-entry .75s infinite alternate;
}
@keyframes hl-new-entry {
	from {background: transparent;}
	to {background: rgba(158, 158, 158, 0.3);}
}


/* == CODE ENDGAME RESULT == */
#code-solution {
	position: absolute;
	left: 0; right: 0; bottom: 0;
    /* display: flex; */
    flex-direction: row;
    justify-content: space-around;
	background: rgba(0, 0, 0, 0.5);
	z-index: 99999;
	display: none;
}
.code-solution-visible {display: flex !important;}
#code-solution span {
	position: absolute;
	top: -50px; left: 0; right: 0;
    text-align: center;
    font-size: 45px;
}
