
/* @group Reset */

* {
	box-sizing: border-box;
}


a {
	color: inherit;
	text-decoration: none;
}

ul, li, header ul, header li {
	list-style: none;
	display: inline-block;
	margin: 0;
	padding: 0;
}

button, select, input {
	background: none;
	border: none;
	outline: none;
	-moz-appearance: none;
	-webkit-appearance: none;
	appearance: none;

}

h1, h2, h3, h4, h5, h6, p, a {
	margin: 0;
	padding: 0;
}


/* @end */

html {
	-moz-osx-font-smoothing: grayscale;
	 -webkit-font-smoothing: antialiased;
	 font-smoothing: antialiased;		 
}

body, html {
	height: 100%;
}

body {
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;	
	background: #fff;
}

#page-wrapper {
	height: 100%;
	min-width: 260px;
	min-height: 400px;
	position: relative;
	display: grid;
	grid-template-columns: 100%;
	grid-template-rows: auto 1fr 2vw;
	
	
}


header {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	grid-template-rows: 90px;
	align-items: center;
	column-gap: 20px;
	
}

header>section {
	/*background-color: lime;*/
	height: 100%;
}


/* @group Logo */

#titlelogo {
	margin-left: 3vw;
	height: 30px;
	
	
}

#titlelogo button {
	width: auto;
	height: 100%;
	position: relative;
	padding: 0;
	margin: 0;
}

#titlelogo svg {
	width: auto;
	height: 100%;
	cursor: pointer;
}

#titlelogo h1 {
	display: none;
}



/* @end Logo */

/* @group Scoreboard */

#scoreboard {
	border-bottom-left-radius: 20px;
	border-bottom-right-radius: 20px;
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: auto auto;
	align-content: center;
	text-align: center;
	font: 1em  Courier, "Courier New", Georgia, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
	background-color: hsl(201, 15%, 97%);
	padding: 0 5vw;
	pointer-events: none;
	position: relative;
	transform: translateZ(4vw);
}

#scoreboard h1 {
	font-weight: normal;
	font-size: clamp(1em, 2.5vw, 1.5em);
	margin-bottom: 5px;
	color: hsl(201, 20%, 20%);
	font-family: Courier, "Courier New";
	position: relative;
	margin: auto;
}

#scoreboard h1:before {
	content: url(../images/square_bubble.svg);
	position: absolute;
	top: -0.6em;
	left: -0.7em;
	width: 0.6em;
	height: 0.6em;
}

#scoreboard h1:after {
	content: url(../images/square_bubble.svg);
	position: absolute;
	bottom: -0.2em;
	right: -0.4em;
	width: 0.6em;
	height: 0.6em;
	transform: rotate(-90deg);
}



#scoreboard ul {
	display: grid;
	grid-template-columns: repeat(3, 2.5em);
	column-gap: 1em;
	justify-content: center;
}

#scoreboard li {
	position: relative;
}

#scoreboard li:after {
	content: "";
	position: absolute;
	height: 3px;
	background-color: hsl(201, 65%, 85%);
	left: 0;
	right: 0;
	bottom: 0;
	border-radius: 2px;
}

#scoreboard p {
	font-family: "Bradley Hand", Courier, "Courier New", Georgia, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
	font-size: 1.5em;
	font-weight: bold;
	color: hsl(201, 65%, 85%);
	
}


#scoreboard .round-activate::after, #scoreboard .round-complete::after {
	background-color: hsl(201, 85%, 55%);
}

#scoreboard .round-activate p, #scoreboard .round-complete p{
	color: hsl(201, 85%, 55%);
	
}

#lost-point {
	position: absolute;
	font-family: "Bradley Hand", Courier, "Courier New", Georgia, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
	font-size: 2em;
	font-weight: bold;
	text-align: center;
	margin: auto;
	bottom: 0.5em;
	vertical-align: middle;
	right: 0;
	/*left: auto;*/
	color: tomato;
	
	opacity: 0;
	
}

#lost-point.animate {
	
	animation: losePoint 1s ease-out 0s 1;
	animation-fill-mode: forwards;
	
}


/* @end */

/* @group gameSettings */

#gameSettings {
	position: relative;
}

#gameSettings ul {
	display: grid;
	grid-template-columns: repeat(2, 44px);
	grid-template-rows: 44px;
	align-content: center;
	justify-content: end;
	column-gap: 15px;
	margin-right: 3vw;
	/*margin-right: -15px;*/
	height: 100%;
	
}


#gameSettings button {
	height: 100%;
	width: 100%;
	position: relative;
	background-color: #fff;
	border: 2px solid hsl(201, 75%, 80%);
	border-radius: 50%;
	cursor: pointer;
}

#gameSettings button::before, #gameSettings button::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

#gameSettings button::before {
	background-color: #fff;
	opacity: 0;
	z-index: 1;
}

#gameSettings button::after {
	box-shadow: 0 2px 6px hsl(201, 35%, 50%);
	z-index: -1;
}

#gameSettings button:active::before {
	opacity: .5;
	transition: opacity 0.15s ease-out;
}

#gameSettings button:active::after {
	opacity: 0;
	transition: opacity 0.15s ease-out;
}

#gameSettings button.inactive {
	border-color: hsl(0, 0%, 90%);
}

#gameSettings button.inactive::before {
	opacity: .7;
	transition: opacity 0.1s ease-out;
}

#gameSettings button.inactive::after {
	opacity: .3;
	transition: opacity 0.15s ease-out;
}


#gameSettings button img {
	
	position: absolute;
	inset: 0;
	margin: auto;
	width: 70%;
	height: 70%;
}

/* @end */

/* @group Menu Button */



/* @group Menu Dots */

.button-dots, .button-dots::before, .button-dots::after {
	display: inline-block;
	position: absolute;
	top: 13px;
	/*left: 0;
	right: 0;*/
	margin: auto;
	background-color: hsl(0, 0%, 30%);
	width: 2px;
	height: 2px;
	border-radius: 10px;
}

.button-dots {
	left: 6px;
	
}

.button-dots::before, .button-dots::after {
	content: "";
	position: absolute;
	left: 0;
	width: 2px;
	
}

.button-dots::before {
	top: -6px;
}

.button-dots::after {
	top: 6px;
}

/* @end */

/* @group Menu Lines */

.button-inner, .button-inner::before, .button-inner::after {
	display: inline-block;
	position: absolute;
	top: 13px;
	/*left: 0;
	right: 0;*/
	margin: auto;
	background-color: hsl(0, 0%, 30%);
	width: 13px;
	height: 2px;
	border-radius: 10px;
}

.button-inner {
	right: 5px;
}

.button-inner::before, .button-inner::after {
	content: "";
	position: absolute;
	right: 0;
	width: 13px;
	
}

.button-inner::before {
	top: -6px;
}

.button-inner::after {
	top: 6px;
}

/* @end */

#menubutton:active {
	box-shadow: 0 2px 5px rgba(68, 68, 68, 0.3);
	transform: translateY(1px);
}

/* @end */






#categories {
	position: relative;
	display: block;
	width: 100%;
	margin-bottom: 10px;
	margin-top: 10px;
	/*background-color: steelblue;*/
	
}

#categories input {
	display: block;
	width: 200px;
	text-align: center;
	margin: 0 auto;
	font: 1.2em/1.5em Bozon, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
	left: 0;
	right: 0;
	background-image: url(../images/search.png);
	background-repeat: no-repeat;
	background-size: 20px;
	background-position: right center;
	border-radius: 0;
	/*padding-right: 35px;*/
	line-height: 1.2em;
	
	
	}

li.ui-menu-item {
	display: block;
	padding: 5px 0;
}

.ui-menu {
	padding: 5px 0;
	height: auto;
	max-height: 50%;
	overflow-y: scroll;
	overflow-x: hidden;
	width: auto;
	box-shadow: 0 12px 15px rgba(68, 68, 68, 0.61);
}



.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active,
a.ui-button:active,
.ui-button:active,
.ui-button.ui-state-active:hover {
	border-left: 3px solid #6dd5ed;
	border-top-color: #ffffff;
	border-bottom-color: #ffffff;
	border-right-color: #ffffff;
	background: none;
	margin-left: 5px;
	font-weight: normal;
	color: hsl(0, 0%, 40%);
}

#menubutton {
	cursor: pointer;
}

.info nav {
	display: none;
}


.info li::before {
	content: "|";
	color: #6dd5ed;
	font-weight: bold;
	margin-right: 10px;
}



#notification {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 10;
	transform: translateZ(11vw);
	opacity: 0;
	
	transition: opacity 0.2s ease-out;
}

#notification.triggered {
	opacity: 1;
	
}

#notification p {
	margin: auto;
	display: block;
	text-align: center;
	background-color: hsla(0, 0%, 10%, .90);
	color: #fff;
	
	position: relative;
	top: 50%;
	transform: translateY(-50%);
	
	width: 50vw;
	min-width: 300px;
	max-width: 450px;
	font: bold 2em Courier, "Courier New", "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
	font-size: clamp(1.5em, 3vw, 2em);
	height: auto;
	padding: 1.5em 0;
	border-radius: 15px;
	/*box-shadow: 0px 3px 25px #444;*/
	
}

/* @group END Popup */


#end-screen {
	position: fixed;
	opacity: 0;
	inset: 0;
	background-color: hsla(0, 0%, 100%, .55);
	overflow: scroll;
	transition: opacity 0.2s ease-out 0s;
	pointer-events: none;
	cursor: default;
	z-index: 1;
	transform: translateZ(10vw);
}

#score-display {
	position: relative;
	padding: 3em 0;
	background-color: #fff;
	width: 530px;
	margin: 80px auto;
	border-radius: 50px;
	border: 4px solid #EAF0F1;
	display: grid;
	grid-template-columns: auto;
	grid-template-rows: auto auto auto;
	justify-content: center;
	align-content: start;
	row-gap: 3em;
	text-align: center;
	box-shadow: 0 5px 15px hsl(188, 20%, 43%);
	font: 1em Courier, "Courier New", "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
	color: #0C3F5A;
	
	opacity: 1;
	transform: scale(.9);
	transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

#end-screen.gameover {
	opacity: 1;
	pointer-events: auto;
}

#score-display.gameover {
	opacity: 1;
	transform: scale(1);
	transition: opacity 0.2s ease-out 0.1s, transform 0.2s ease-out 0.1s;
	
	
	
}

#score-display h1, #reward, #total-time {
	font-weight: normal;
	
}

#score-display h1 {
	font-size: 1.5em;
	/*padding-bottom: 0.2em;*/
}

#total-time {
	font-size: 1em;
}

#reward {
	font-size: 1.4em;
	margin-top: 20px;
}

#final-score {

}



#total {
	font: 4em "Bradley Hand", Courier, "Courier New", Georgia, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
}

#statistics {

}

#stat-table {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr 1fr;
	grid-template-rows: 1fr 1fr 1fr 1fr;
	column-gap: 30px;
	row-gap: 10px;
	
}

#stat-table h2, #stat-table h3 {
	font-size: 1.2em;
}

#stat-table h3, #stat-table p {
	font-weight: normal;
	font-size: 1.2em;
}

/* @group Action */

#action {
	font-size: 1.4em;
}

#action ul {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 50px;
	align-items: center;
	column-gap: 15px;
}

#action ul li {
	height: 100%;
}

#action button {
	border-radius: 7px;
	height: 100%;
	width: 100%;
	position: relative;
	cursor: pointer;
	
}

#action button::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	opacity: 0;
}

#action button:active::after {
	opacity: .5;
	
}

#action button[name="restart"] {
	
	border: 1px solid #0C3F5A;
	color: #0C3F5A;
}

#action button[name="restart"]:after {
	background-color: #1E95D8;
}


#action button[name="share"] {
	color: #fff;
	background-color: #1E95D8;
	font-weight: bold;
}

#action button[name="share"]:after {
	background-color: #fff;
}

/* @end */

/* @end */


#credits-screen {
	position: fixed;
	inset: 0;
	overflow: scroll;
	opacity: 0;
	pointer-events: none;
	background-color: lightblue;
	z-index: 10;
	transform: translateZ(10vw);
	transition: opacity .2s ease-out 0.1s;
	font: 1.5em  Courier, "Courier New", Georgia, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
	padding: 5vw;
	text-align: center;
	/*border-radius: 3vw;*/
}

#credits-screen.display {
	opacity: 1;
	pointer-events: auto;
	
	
}

#credits-screen button[name="closeCredits"] {
	position: absolute;
	top: 15px;
	left: 3vw;
	width: auto;
	height: auto;
	/*border: none;*/
	/*margin: auto;*/
}

button[name="closeCredits"] svg {
	position: relative;
	cursor: pointer;
	width: 42px;
	height: 42px;
	stroke: hsl(0, 0%, 10%);
	fill: hsl(0, 0%, 10%);
}

#credits-screen article {
	position: relative;
	margin: auto;
	top: 50%;
	transform: translateY(-50%);
	
}

#credits-screen h1 {
	
	font: 1em Courier, "Courier New", Georgia, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
	margin-bottom: 2em;
	
}



#credits-screen a {
	text-decoration: underline;
	white-space: nowrap;
}

#social {
	display: block;
	margin-bottom: 2em;
}

#social li{
	margin: 5px;
}




.role {
	position: relative;
}

/*.role:after {
	position: relative;
	content: ":";
}*/


#app-grid {
	
	/*overflow: hidden;*/
}

.row {
	text-align: center;
	width: 100%;
	/*height: 30%;*/
	margin: clamp(8px, 1%, 20px) auto;
	box-sizing: border-box;
	/*-webkit-perspective: 1000px;
	perspective: 1000px;*/
}

.column {
	display: inline-block;
	text-align: center;
	opacity: 100%;
	transform: rotateY(0deg) translateY(0px);
	/*width: 30%;*/
	height: 100%;
	margin: 0 clamp(4px, 0.5%, 10px);
	border-radius: 5px;
	-webkit-transition: transform 0.4s;
	transition: transform 0.4s;
	-webkit-transform-style: preserve-3d;	
	transform-style: preserve-3d;
	box-sizing: border-box;
	vertical-align: middle;
	position: relative;
	font: bold 1em/1.5em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
}

.column>button, .card-seperator {
	width: 100%;
	height: 100%;
	vertical-align: middle;
	visibility: hidden;
	border-radius: 15px;
	position: absolute;
	inset: 0;
	cursor: pointer;

}

.column:active {
	transform: scale(0.99);
	transition: transform 0s ease-in-out 0s;
}

/*.column:active>button.seperator {
	box-shadow: 0 2px 4px rgba(68, 68, 68, 0.3);
}*/

.column>button.front {
	/*background-color: #1a1a1a;*/
	background-size: cover;
	background-position: left bottom;
	transition: filter 0.3s ease-in-out 0s;

	transform: translateZ(30px);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	
	box-shadow: 0 2px 5px hsla(100, 25%, 30%, .5);
	
	z-index: 1;
}

.column>button.back {
	background-position: center;
	background-size: contain;
	background-repeat: no-repeat;
	background-origin: content-box;
	
	transform: rotateY(180deg) translateZ(5vw);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	
	/*padding: 7%;*/
	

}

.column>button.back.visualDisabled {
	opacity: 0;
	transition: opacity .15s ease-out 0.15s;

}

/*.column>button.back::after {
	content: "";
	margin: auto;
	inset: 0;
	background-color: green;
	position: absolute;

}*/

/*.column>button.seperator {
	background-color: hsl(0, 0%, 100%);
	transform: translateZ(29px) scale(0.99);
	-webkit-backface-visibility: visible;
	backface-visibility: visible;
	
}*/

.card-seperator {
	/*background-color: hsl(100, 10%, 97%);*/
	background-color: hsl(201, 12%, 97%);
	visibility: visible;
	box-shadow: inset 0px 1px 10px hsla(201, 15%, 15%, .10);
	transform: rotateY(180deg);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}

.card-seperator::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: url(../images/audioToggle.svg);
	background-position: center;
	background-repeat: no-repeat;
	background-size: 30%;
	opacity: 0;
	transform: scale(.9);
	
}

.audio-only::after {
	transform: scale(1);
	opacity: 1;
	transition: opacity 0.15s ease-out 0.15s, transform 0.25s ease-out 0.15s;
	
}


.isFlipped {
	transform: rotateY(180deg);
	pointer-events: none;
}



.match {
	/*-webkit-animation: popCard 0.4s ease-in-out 0s forwards, disappear 0.4s ease-out 0.5s forwards;*/
	animation: popCard 0.4s ease-in-out 0s forwards;
	/*animation: popCard 0.4s ease-in-out 0s forwards;	*/
	
}

.match button {
	opacity: 0;
	transition: opacity 0.4s ease-out 0.5s;
}

.match .card-seperator::after {
	opacity: 0;
	transition: opacity 0.4s ease-out 0.5s;
}

.point-win {
	position: absolute;
	inset: 0;
	padding-top: 1.5em;
	margin: auto;
	transform: rotateY(0);	
	color: hsl(201, 85%, 55%);
	visibility: hidden;
	pointer-events: none;
}


.point-win p{
	margin: auto;
	position: relative;
	display: inline-block;
	font-family: "Bradley Hand", Courier, "Courier New", Georgia, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
	font-size: 1.5em;
	font-weight: bold;
	
}

.match .point-win {
	visibility: visible;
	
	opacity: 0;
	transform: translateY(-80px) rotateY(-180deg) translateZ(15vw);
	
	
	transition: transform 1.5s ease-out, opacity .3s ease-in 1.2s;
}





/* @group Animations */


@keyframes popCard {
	0% {
		transform: scale(1) rotateY(180deg);
	}
	
	40% {
		transform: scale(1.05) rotateY(180deg);
	}
	
	100% {
		transform: scale(1) rotateY(180deg);
	}
}



@keyframes disappear {
	0% {
		transform: translateY(0px) rotateY(180deg);
	}
	
	
	99% {
		transform: translateY(-50px) rotateY(180deg);
		
	}
	
	100% {
		transform: translateY(0px) rotateY(180deg);
		
	}
}

@keyframes losePoint {

	0% {
		transform: translateY(0);
		opacity: 0;
	}
	
	40% {
		opacity: 1;
	}
	
	90% {
		opacity: 1;
	}
	
	100% {
		transform: translateX(40px);
		opacity: 0;
	}

}



/* @end */



@media screen and (max-width: 540px) {
	
	header {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: 60px 70px;
	}
	

	#scoreboard {
		grid-area: 2 / 1 / 3 / 3;
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
		
	}
	
	
	#score-display {
		width: auto;
		min-width: 240px;
		margin: 120px 4vw;
		border-radius: 10vw;
		
		font-size: clamp(0.5em, 3.1vw, 0.8em);		
	}
	
	#lost-point {
		right: 60px;
		
	}
	
	#gameSettings ul {
		grid-template-columns: repeat(2, 36px);
		grid-template-rows: 36px;
		
	}
	
	#credits-screen button[name="closeCredits"] {
		
		left: 15px;
		
	}
	
	#action {
		font-size: 1.5em;
	}
	
	#action ul {
		
		grid-template-rows: 44px;
		column-gap: 10px;
	}
	
	.column>button.back {
		
		/*padding: 40% 10%;*/
		
	
	}
}

