/* BASE */
html {
	font-size: 62.5%;
}

body {
	padding: 0;
	margin: 0;
	box-sizing: border-box;

	font-size: 1.6rem;
	font-family: montserrat, Arial, Helvetica, sans-serif;
}

*, ::after, ::before {
	box-sizing: inherit;
}

img {
	max-width: 100%;
}

textarea, button, input, select, a {
	font-family: inherit;
	font-size: inherit;
}

/* MODAL */
.modal__host {
	display: none;
	position: fixed;
	z-index: 1;
	padding-top: 8rem;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgb(0, 0, 0);
	background-color: rgba(0, 0, 0, 0.9);
}

.modal__content {
	margin: auto;
	display: block;

	-webkit-animation-name: zoom;
	-webkit-animation-duration: 0.6s;
	animation-name: zoom;
	animation-duration: 0.6s;
}

img.modal__content {
	height: 100%;
}

.modal__content--out {
	animation-name: zoom-out;
	animation-duration: 0.6s;
}

@-webkit-keyframes zoom {
	from {
		-webkit-transform: scale(1)
	}
	to {
		-webkit-transform: scale(2)
	}
}

@keyframes zoom {
	from {
		transform: scale(0.4)
	}
	to {
		transform: scale(1)
	}
}

@keyframes zoom-out {
	from {
		transform: scale(1)
	}
	to {
		transform: scale(0)
	}
}

.close {
	position: absolute;
	top: 1.5rem;
	right: 3.5rem;
	color: #f1f1f1;
	font-size: 4rem;
	font-weight: bold;
	transition: 0.3s;
}

.close:hover,
.close:focus {
	color: #bbb;
	text-decoration: none;
	cursor: pointer;
}

@media only screen and (max-width: 70rem) {
	.modal__content {
		width: 100%;
	}
}

/* PIE */
.pie {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 100%;
	clip: rect(0, 4.5rem, 4.5rem, 2.25rem);
}

.pie-wrapper {
	display: block;
	position: relative;
	height: 4.5rem;
	width: 4.5rem;
}

.pie-label {
	display: block;
	position: absolute;
	font-weight: bold;
	font-size: 2rem;
	border-radius: 50%;
	left: 0.5rem;
	right: 0.5rem;
	top: 1.2rem;
	line-height: 1;
	text-align: center;
}

.pie-shadow {
	height: 100%;
	width: 100%;
	border: .4rem solid #e18d1c;
	border-radius: 50%;
}

.pie-half-circle {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 100%;
	border: .4rem solid #f5ede8;
	border-radius: 50%;
	clip: rect(0, 2.25rem, 4.5rem, 0);
}

/* COMMON */
#gameRoot {
	overflow: hidden;
	min-height: 100vh;
}

.game__btn {
	display: inline-block;
	vertical-align: top;
	background-color: #FFFFFF;
	transition: background-color .2s;
	border: 1px solid black;
	border-radius: .5rem;
	font-family: "Roboto", Arial, Helvetica, sans-serif;
	font-size: 1.2rem;
	padding: 1rem 0.7rem;
	cursor: pointer;
	position: relative;
	text-decoration: none;
	text-align: center;
	color: black !important;
}

.game__btn:hover {
	background-color: #F0F0F0;
}

.game__btn--link {
	background: transparent;
	padding: 0;
	margin: 0;
	border: none;
	color: #551a8b;
	color: -webkit-link;
	text-decoration: underline;
	display: inline;
	cursor: pointer;
}

/* GAME */

#gamePanel {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
}

.game__user {
	display: inline-block;
	vertical-align: top;
	width: 30%;
	position: relative;
	padding: 0 0 0 5.5rem;
	min-height: 5rem;
	margin-bottom: 2rem;
	flex-grow: 1;
	min-width: 17rem;
}

.game__user-image {
	position: absolute;
	top: 0;
	left: 0;
	display: inline-block;
}

.game__user-image > div {
	display: block;
	border-radius: 50%;
	border: .1rem solid #c0c0c0;
	overflow: hidden;
	width: 5rem;
	height: 5rem;
}

.game__user-image > div:empty {
	background-image: url("img/misc/avatar.png");
	background-size: 80%;
	background-position: center center;
	background-repeat: no-repeat;
}

.game__user-image > div > img {
	width: 100%;
}

.game__user-name {
	display: block;
	color: #008f86;
	padding: 0.6rem;
	line-height: 1.4;
}

.game__user-logout {
	display: block;
	padding: 0 0.6rem;
}

@media only screen and (max-width: 499px) {
	.game__user {
		flex-grow: 1;
		width: 30%;
		padding-left: 3rem;
		font-size: 1.2rem;
		min-width: unset;
	}

	.hide--mobile {
		display: none;
	}

	.pie {
		clip: rect(0, 3.5rem, 3.5rem, 1.75rem);
	}

	.pie-wrapper {
		height: 3.5rem;
		width: 3.5rem;
	}

	.pie-label {
		top: 1rem;
		font-size: 1.5rem;
	}

	.pie-half-circle {
		clip: rect(0, 1.75rem, 3.5rem, 0);
	}

	.game__user-image > div {
		width: 3rem;
		height: 3rem;
	}

	.game__user-name {
		padding: 0 .4rem;
	}

	.game__user-logout {
		padding: 0 .4rem;
	}
}

#gameResultModal {
	background-color: #FFFFFF;
	border-radius: 1rem;
	padding: 2rem;
	max-width: 24rem;
}

#gameResultModal .game__btn {
	display: block;
	margin: 1rem auto;
}

#gameResultModal .game__btn::before {
	z-index: 0;
}

#gameResultModal a:visited {
	color: #551a8b;
}

/* LOGIN */
.game__login {
	width: 19.9rem;
	display: block;
	margin: 2rem auto 0;
	position: relative;
	padding: 2rem;
}


.game__login > .game__btn {
	display: block;
	width: 100%;
	z-index: 2;
}

.game__login > .game__btn:not(:last-child) {
	margin-bottom: 2rem;
}

/* RULES AND TOP SCORE */
#gameRules, #gameTopScores {
	max-width: 80rem;
	width: 100%;
	margin: 0 auto;
	padding: 2rem;
}

#gameRules {
	line-height: 1.4;
}

.prizeList {
	display: block;
	list-style: none;
	padding: 0;
	margin: 0;
}

.prizeItem {
	display: block;
	padding: 0;
	margin: 0;
}

.prizeTitle {
	display: block;
}

.prizeImage {
	display: block;
	width: 100%;
	max-width: 20rem;
	margin: 0 auto 2rem;
	cursor: zoom-in;
}

.tstable__table {
	width: 100%;
	margin: 0;
	padding: 0;
	border-spacing: 0;
	border-left: .1rem solid #000000;
	border-top: .1rem solid #000000;
	border-right: .1rem solid #000000;
}

.tstable__cell {
	padding: 1rem;
	border-bottom: .1rem solid #000000;
	font-weight: bold;
	text-align: left;
}

.tstable__cell--avatar {
	padding: 1.2rem;
	width: 12.5rem;
	height: 12.5rem;
}

.tstable__cell--avatar > div {
	display: block;
	border-radius: 50%;
	border: .1rem solid #c0c0c0;
	overflow: hidden;
	width: 10rem;
	height: 10rem;
}

.tstable__cell--avatar > div:empty {
	background-image: url("img/misc/avatar.png");
	background-size: 5rem;
	background-position: center center;
	background-repeat: no-repeat;
}

.tstable__cell--avatar > div > img {
	width: 100%;
}

.tstable__cell--score,
.tstable__cell--time {
	width: 12rem;
}

.tstable__cell--started {
	width: 3rem;
	text-align: center;
}

.tstable__cell--place {
	width: 7rem;
}

.tstable__row--current .tstable__cell {
	background-color: rgba(179, 252, 128, 0.5);
}

#gameTopScoresBackLink {
	float: right;
	display: block;
	margin-top: 2rem;
	border-radius: 1rem;
	padding: .5rem 1rem;
	border: 3px solid #008f86;
	cursor: pointer;
	color: black !important;
	text-decoration: none;
}

#gameTopScoresBackLink:hover {
	background-color: rgba(0, 143, 134, 0.40);
}

.game__root {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
}

.game__field {
	display: flex;
	flex-grow: 1;
	flex-shrink: 1;
	position: relative;
}

.game__controls {
	width: 8.6rem;
	background-color: #008f86;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	flex-shrink: 0;
	flex-grow: 0;
}

.game__logo {
	position: absolute;
	top: 0;
	right: 0;
	display: block;
}

.game__logo > img {
	max-height: 100%;
}

#gameControlsStopTimerHost {
	padding: 1.25rem;
	margin: 1rem;
	border: 1px solid black;
	height: 7rem;
	width: 7rem;
	border-radius: .5rem;
	background-color: #FFFFFF;
}

#gameControlsStopTimer {
	display: block;
	margin: 0;
}

.game__btn-help {
	padding: 1rem;
	margin: 1rem;
	background-image: url("img/find.png");
	background-repeat: no-repeat;
	background-position: center center;
	height: 7rem;
	width: 7rem;
}

.game__host {
	display: none;
	position: relative;
	width: 100%;
	background-color: #008f86;
	user-select: none;
}

.game__image {
	display: block;
	width: 100%;
}

.game__target {
	display: block;
	position: absolute;
}

.game__start {
	width: 27rem;
	display: block;
	margin: 2rem auto 0;
	position: relative;
	padding: 2rem;
}

.game__start-buttons {
	display: block;
}

.game__start-buttons > .game__btn {
	display: block;
	width: 100%;
	margin-bottom: .4rem;
}

.game--running {
	height: 100vh;
}

.game--running .game__start {
	display: none;
}

.game--running .game__host {
	display: flex;
}

#gameControlsStopTimerHost,
#btnHelp {
	display: none;
}

.game--running #gameControlsStopTimerHost,
.game--running #btnHelp {
	display: block;
}

@media screen and (min-width: 1200.1px) {
	.game__field {
		width: 0;
	}
}

@media screen and (max-width: 1200px) {
	.game__logo {
		left: 0;
		right: unset;
		height: 8.6rem;
	}

	.game__root {
		flex-direction: column;
	}

	.game__field {
		order: 2;
		height: 0;
	}

	.game__controls {
		order: 1;
		width: auto;
		height: 8.6rem;
		flex-direction: row;
	}
}

.game__finished {
	display: block;
	border-radius: .5rem;
	border: 1px solid black;
	padding: .5rem;
	margin: 0 -.5rem 1rem;
}

.ghmodal {
	background-color: #FFFFFF;
	border-radius: 1rem;
	padding: 2rem;
	max-width: 60rem;
	font-family: "Comic Sans MS", "Comic Sans", cursive;
}

.ghmodal__close {
	vertical-align: top;
	background-color: #FFFFFF;
	transition: background-color .2s;
	border: 1px solid black;
	border-radius: .5rem;
	font-family: "Roboto", Arial, Helvetica, sans-serif;
	font-size: 1.2rem;
	cursor: pointer;;
	text-decoration: none;
	text-align: center;
	color: black !important;

	padding: 1rem;
	margin: 1rem;
	background-image: url("img/close.png");
	background-repeat: no-repeat;
	background-position: center center;
	height: 7rem;
	width: 7rem;
	position: absolute;
	right: 0;
	bottom: 0;
}

@media screen and (max-width: 1200px) {
	.ghmodal__close {
		bottom: unset;
		top: 0;
	}
}

.ghmodal__targets {
	list-style: none;
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	padding: 0;
	margin: 0;
	max-height: 33rem;
}

@media screen and (max-height: 900px) {
	.ghmodal__targets {
		max-height: 53rem;
	}
}

.ghmodal__target {
	display: block;
	padding: .5rem;
	color: #8f8f8f;
	text-decoration: none;
	transition: 0.3s;
}

.ghmodal__target-link {
	color: inherit;
	text-decoration: inherit;
}

.ghmodal__target-link:hover {
	text-decoration: inherit;
	color: inherit;
}

.ghmodal__target:not(.ghmodal__target--found):hover {
	color: #000000;
}

.ghmodal__target--found {
	color: #008f86;
	font-weight: 600;
}

.ghmodal__target--found > .ghmodal__target-link::before {
	content: '\2714';
	padding-right: .5rem;
}

.ghmodal__score {
	display: flex;
	justify-content: space-between;
}

.ghmodal__score > * {
	display: inline-block;
	border: .1rem solid;
	padding: .5rem;
	margin: 1rem;
	border-radius: .3rem;
	white-space: pre-wrap;
}
