/* TYPOGRAPHY */
html{
    -webkit-font-smoothing: antialiased;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
@font-face {
    font-family: 'pluto';
    src: url('fonts/pluto.eot');
    src: url('fonts/pluto.eot?#iefix') format('embedded-opentype'),
         url('fonts/pluto.woff2') format('woff2'),
         url('fonts/pluto.woff') format('woff'),
         url('fonts/pluto.ttf') format('truetype');
	font-weight: 700;
}
body{
	margin: 0px;
	font-family: 'Roboto', sans-serif;
}
h1, h2, h3, h4, h5, p{
	margin: 0px;
	line-height: 1em;
	width: 100%;
}
h1, h2, h3, h4, h5{
    font-family: 'pluto';
	margin: 5px 0px;

	font-weight: 700;
	hyphens: auto;
	word-wrap: break-word;
	overflow-wrap: break-word;
}
h1{
	font-size: 50px;
}
h2{
	font-size: 30px;
}
h3{
	font-size: 30px;
}
p{
	font-size: 20px;
}
p.margin{
	margin: 10px 0px;
}
a{
	color: inherit;
}
.spacer{
	width: 100%;
	height: 20px;
}
button, input{
	padding: 10px 20px;
	border-radius: 100px;
	margin: auto;
	margin-top: 10px;
	border: none;
	line-height: 1em;
}
button{
	min-width: 220px;
	text-align: center;
    font-family: 'pluto';
	text-transform: uppercase;
	font-size: 22px;
	line-height: 1em;
	color: white;
	background-color: black;
	cursor: pointer;
	
}
input{
	font-family: 'Roboto', sans-serif;
	font-size: 16px;
	line-height: 1em;
}
input:focus, button:focus {
	outline:0;
}
input[type="text"]{
	width: 180px;
}
.checkbox{
	position: relative;
	margin: auto;
	text-align: center;
	vertical-align: middle;
	margin-top: 10px;
	font-size: 12px;
}
.checkContainer {
	vertical-align: middle;
	display: inline-block;
	position: relative;
	padding-left: 35px;
	margin-bottom: 30px;
	cursor: pointer;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
.checkContainer input {
	position: absolute;
	opacity: 0;
	height: 0;
	width: 0;
}
.checkmark {
	position: absolute;
	top: 0;
	left: 0;
	height: 30px;
	width: 30px;
	border-radius: 100%;
	background-color: #ffffff;
}
.uppercase{
	text-transform: uppercase;
}
.left{
	text-align: left;
}
.right{
	text-align: right;
}
.hidden{
	display: none;
}

/* ASSETS / PALLETE */
main{
	background-color: #6dbae6;
}
.oButton, .life, .timer, .checkContainer input:checked ~ .checkmark, .descO{
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	background-image: url('assets/o_texture.png');
	background-color: #000000;
}
.reButton, .descRe{
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	background-image: url('assets/re_texture.png');
	background-color: #ffffff;
}
.cookieO{
    background-image: url('assets/o.png');
}
.cookieRe{
    background-image: url('assets/re.png');
}

/* GLOBAL */
main{
	position: absolute;
	top: 0px;
	left: 0px;
	width: 100%;
	min-height: 100%;
	color: #ffffff;
	overflow-x: hidden;
}
section{
	position: absolute;
	display: flex;
	width: 100%;
	min-height: 100vh;
	justify-content: center;
	align-items: center;
}
.innerContainer{
	width: calc(100% - 40px);
	max-width: 500px;
	margin: auto;
	padding: 20px;
	text-align: center;
	padding: 
}
.highlight{
	padding: 20px;
	margin: 20px -20px;
	background-color: rgba(0, 0, 0, 0.05);
	border-radius: 4px
}
.logo{
	width: 80%;
	max-width: 380px;
	height: auto;
}
.timer{
	position: relative;
	width: 90px;
	height: 90px;
	margin: auto;
	border-radius: 100%;
}
.innerTimer{
	position: absolute;
	bottom: -1px;
    left: -1px;
    padding: 1px;
	width: 100%;
	height: 100%;
	border-radius: 100%;
	overflow: hidden;
}
.timerFill{
	position: absolute;
	bottom: 0px;
	left: 0px;
	width: 100%;
	height: 0%;
	margin-bottom: -20px;
	background-color: white;
}


/* GAME TUTORIAL */
.descContainer{
	display: flex;
	align-content: center;
	justify-content: center;
}
.gameDesc{
	width: 50%;
	margin: 10px 0px;
	display: flex;
	flex-wrap: wrap;
	align-content: center;
}
.gameDesc:first-child{
	margin-right: 10px;
}
.gameDesc h1{
	font-size: 60px;
}

.descCookie{
	width: 100%;
    max-width: 150px;
	border-radius: 100%;
	background-repeat: no-repeat;
	background-size: contain;
	background-position: bottom center;
    margin: auto;
}
.descCookie:after {
	content: "";
	display: block;
	padding-bottom: 100%;
}

.tutorialStack{
	display: flex;
	flex-direction: column-reverse;
}
.tutorialCookie{
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: -10%;
}
.tutorialCookie:first-child{
	margin-bottom: 0px;
}
.tutorialCookieImage, .tutorialCookieWord{
	width: 100%;
}
.tutorialCookieImage{
	text-align: right;
}
.tutorialCookieImage img{
	position: relative;
	width: 100%;
	max-width: 150px;
}
.tutorialCookieWord{
	text-align: left;
    font-family: 'pluto';
	text-transform: uppercase;
	font-size: 46px;
	line-height: 1em;
}

/* HIGHSCORE */
.highscoreList{
	width: 100%;
	margin-top: 10px;
}
.highscoreEntry{
	width: 100%;
	margin-bottom: 10px;
	font-size: 22px;
	line-height: 1em;
	display: flex;
	justify-content: center;
}
.highscorePoint{
	width: 40%;
	margin-right: 20px;
	text-align: right;
}
.highscoreName{
	width: 60%;
	text-align: left;
}

/* ROUND OVER */
.roundSummary{
	margin-bottom: 10px;
}
.lifeDisplay{
	width: 100%;
	display: flex;
	justify-content: center;
}
.lifeContainer{
	position: relative;
	padding: 25px;
	margin: 0px 10px;
	border-radius: 100%;
	background-color: #ffffff;
}
.life{
	position: absolute;
	padding: 2px;
	top: -2px;
	left: -2px;
	width: 100%;
	height: 100%;
	border-radius: 100%;
}

/* CHALLENGE */
.challengeString{
	display: inline-block;
}
.skip{
	position: absolute;
	bottom: 10px;
	left: 0px;
	width: 100%;
	cursor: pointer;
}

/* GAME */
.gameHeader{
	position: absolute;
	top: 0px;
	width: calc(100% - 20px);
	padding: 10px;
	padding-bottom: 4px;
	background-color: rgba(0, 0, 0, 0.05);
}
.innerHeader{
	position: relative;
	margin: auto;
	width: 100%;
	display: flex;
	justify-content: center;
}
.headerContainer{
	width: 100%;
	max-width: 200px;
	display: flex;
    justify-content: center;
    align-items: center;
}
.headerContainer:first-child{
	justify-content: flex-end;
}
.headerContainer:last-child{
	justify-content: flex-start;
}
.headerInnerContainer{

}
.headerTooltip{
	width: 100%;
	font-size: 20px;
	line-height: 1em;
	margin-bottom: 2px;
}
.headerScore{
    font-family: 'pluto';
	font-size: 30px;
	line-height: 1em;
}
.headerContainer .timer{
	width: 70px;
	height: 70px;
	margin: 0px 20px;
	margin-bottom: -20px;
}
.headerContainer .lifeDisplay{
	justify-content: flex-start;
}
.headerContainer .lifeContainer{
	padding: 10px;
	margin: 4px 0px;
	margin-right: 10px;
}
.headerContainer .lifeContainer:last-child{
	margin-right: 0px;
}
.gameFooter{
	position: absolute;
	bottom: 0px;
	left: 0px;
	width: 100%;
	height: auto;
	background-color: rgba(0, 0, 0, 0.4);
}
.innerFooter{
	position: relative;
	margin: auto;
	width: 100%;
	max-width: 450px;
	display: flex;
	justify-content: space-between;
}
.gameButton{
	position: relative;
	width: 100%;
	max-width: 150px;
	margin: 10px;
	margin-top: -50px;
	border-radius: 100%;
	-ms-touch-action: manipulation;
	touch-action: manipulation;
	cursor: pointer;
}
.gameButton:after {
	content: "";
	display: block;
	padding-bottom: 100%;
}

.gameHeader, .gameFooter{
	z-index: 2;
}

.gameBoard{
	position: absolute;
	top: 90px;
	left: 0px;
	width: 100%;
	height: calc(100% - 240px);
	
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
.stackWord{
	position: absolute;
	bottom: calc(100% + 60px);
	width: calc(100% - 20px);
	text-align: center;
	max-width: 400px;
    font-family: 'pluto';
	font-size: 30px;
	line-height: 1em;
	hyphens: auto;
	word-wrap: break-word;
	overflow-wrap: break-word;
	transition-delay: 0.5s;
	transition-duration: 0.5s;
	opacity: 0;
	transform: translateY(20px);
}
.stackWord.open{
	opacity: 1;
	transform: translateY(0px);
}
.stackShadow{
	position: absolute;
	top: 105%;
	width: 100%;
	max-width: 300px;
	border-radius: 100%;
	opacity: 0.1;
	background-color: #000000;
}
.stackShadow:after {
	content: "";
	display: block;
	padding-bottom: 38%;
}

.innerBoard{
	position: absolute;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 100%;
}
.stackContainer{
	position: relative;
	width: 80%;
	height: 100%;
	max-width: 170px;
	height: auto;
	z-index: 1;
	
	display: flex;
	flex-wrap: wrap;
	flex-direction: column-reverse;
}
.cookie{
	width: 100%;
	margin-bottom: -46%;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: auto 100%;
}
.cookie:after {
	content: "";
	display: block;
	padding-bottom: 55%;
}



/* ANIMATIONS */
#curtainContainer{
	position: absolute;
	top: 0px;
	left: 0px;
	width: 100%;
	height: 100%;
	display: none;
	overflow: hidden;
}
#curtain{
	position: absolute;
	top: calc(-100% - 100px);
	left: 0%;
	width: 100%;
	height: 100%;
	z-index: 100;
	background-color: white;
	transition: 0.5s;
}
.curtainBorder{
	position: absolute;
	width: 100%;
	height: 100px;
	left: 0%;
	margin: -2px 0px;
	background-position:  center center;
	background-repeat: repeat-x;
	background-size: auto 100%;
}
.timerFill .curtainBorder{
	height: 20px;
}
.curtainTop{
	bottom: 100%;
	background-image: url('assets/up.svg');
}
.curtainBottom{
	top: 100%;
	background-image: url('assets/down.svg');
}
section{
	display: none;
}
section.open{
	display: flex;
}

.stackContainer{
	animation-delay: 0.5s;
	animation-duration: 0.5s;
	animation-iteration-count: 1;
	animation-fill-mode: forwards;
}
.stackWin{
	animation-name: stackWin;
}
.stackLose{
	animation-name: stackLose;
}
@keyframes stackWin{
	0%{
		transform: translateY(0px);
	}
	100%{
		transform: translateY(-50px);
	}
}
@keyframes stackLose{
	0%{
		transform: translateY(0px);
	}
	100%{
		transform: translateY(50px);
	}
}

.cookie{
	animation-name: cookieIntro;
	animation-duration: 0.2s;
	animation-iteration-count: 1;
	animation-fill-mode: forwards;
}
@keyframes cookieIntro{
	0%{
		transform: translateY(20px);
		opacity: 0;
		margin-bottom: -55%;
	}
	100%{
		transform: translateY(0px);
		opacity: 1;
		margin-bottom: -46%;
	}
}
.life{
	transition-delay: 0.5s;
	transition: 1s;
}
.dead .life{
	transform: translateY(25px) scale(0.8);
	opacity: 0;
}
#isHighscore{
	animation-name: isHighscore;
	animation-iteration-count: infinite;
	animation-duration: 1s;
	transform-origin: center center;
}
@keyframes isHighscore{
	0%{
		transform: scale(1);
	}
	50%{
		transform: scale(1.2);
	}
	100%{
		transform: scale(1);
	}
}