@import url('https://fonts.googleapis.com/css2?family=Exo:wght@100;400;500;700&display=swap');
@font-face {
    font-family: pokemon;
    src: url(../poke_match_assets/pokemon.ttf);
}

body {
	margin: 0;
}

h1, h3 {
	font-family: 'Exo', sans-serif;
}

.winner{
	background: linear-gradient(45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab, #ee7752, #e73c7e, #23a6d5 );
	background-size: 400% 400%;
	-webkit-animation: gradient 2000ms linear infinite;
	        animation: gradient 2000ms linear infinite;
	height: 100vh;
}

@-webkit-keyframes gradient {
	0% {
		background-position: 100% 0%;
	}
	100% {
		background-position: 15% 100%;
	}
}

@keyframes gradient {
	0% {
		background-position: 100% 0%;
	}
	100% {
		background-position: 15% 100%;
	}
}

header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

#pokeball_logo{
	font-weight: 700;
	background: url("../poke_match_assets/pokeball.png") no-repeat;
	background-size: 42px;
	width: 212px;
	text-align: right;
	margin: 21px 0 15px 0;
}

#attempt_count {
	font-size: x-large;
}

button {
	font-family: "Exo", sans-serif;
    font-size: 18px;
    letter-spacing: 0.05em;
    background-image: linear-gradient(#c62828, #a82525);
    box-shadow: -1px 4px 6px lightgray, 1px 4px 6px lightgray;
    color: #FFF;
    border-radius: 5px;
    border: 2px solid #FFF;
    padding: 10px 20px;
    cursor: pointer;
}

button:hover {
	background-image: linear-gradient(#c62828, #942121);
	box-shadow: -1px 2px 6px lightgray, 1px 2px 6px lightgray;
}

@media only screen and (max-width: 600px) {
	header{
		height: 8%;
	}
	#pokeball_logo{
		margin: 10px 0 10px 0;
		font-size: 22px;
		width: 160px;
		background: url("https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/versions/generation-v/black-white/animated/25.gif") no-repeat;
		background-size: 20%;
		background-position: 12px -1px;
	}
	button {
		font-size: 15px;
		padding: 5px 10px;
		margin: 0 10px 3px 0;
		box-shadow: -1px 2px 4px lightgray, 1px 2px 4px lightgray;
		z-index: 1;
	}
	#attempt_count {
		font-size: 0px;
		color: transparent;
	}
	#attempt_count_v {
		color:#000;
		font-size: x-large;
	}
}

/* Main container */

#container {
	display: flex;
	place-items: center;
	flex-direction: column;
	grid-template-columns: auto auto auto;
	height: 100%;
	margin: 0px auto;
	max-width: 1300px;
	padding: 0 20px;
	position: relative;
}

@media only screen and (max-width: 600px) {
	#container {
	  max-width: 600px;
	  height: 100%;
	}
}

.msg_match{
	grid-row-start: 1;
	grid-column-end: span 6;
    font-family: 'pokemon';
	font-size: 700%;
    letter-spacing: 20px;
    text-transform: uppercase;
	width: 100%;
	text-align: center;
    position: absolute;
	top: 70%;
	text-shadow: -3px 3px 0px #000000, 3px -3px 0px #000000, 3px 3px 0px #000000, -3px -3px 0px #000000, 0px 10px 10px #000;
	z-index: 1;
	margin: 0;
	transition-timing-function: ease-in;
	transition: all 200ms;
	transform: scale(10);
}

.msg_match_visible{
	transform: scale(1) !important; 
	transform: translateY(-90%) !important;
	opacity: 1;
	display: block;
}

.msg_match_disolve{
	opacity: 0 !important;
}

.msg_match_vis_win{
	opacity: 1;
	display: block;
	transform: translateY(3%);
}

.msg_complete{
	grid-row-start: 1;
	grid-column-end: span 6;
    font-family: 'pokemon';
	font-size: 1000%;
    letter-spacing: 30px;
	width: 100%;
    text-shadow: -3px 3px 0px #000000, 3px -3px 0px #000000, 3px 3px 0px #000000, -3px -3px 0px #000000, 0px 10px 10px #000;
    color: #CE2211;
	text-align: center;
    position: absolute;
	top: 8%;
	transition: all 200ms;
	transition-timing-function: ease-in;
	transform: scale(10);
	z-index: 1;
	margin: 0;
}

.msg_complete_visible{
	opacity: 1;
}

.msg_complete_zoom_in{
	transform: scale(1);
}

.msg_complete_drop{
	transform: translateY(900px);
	transition: all 500ms !important;
	opacity: 0;
}

.main_img_container{
	position: absolute;
	justify-content: center;
	align-items: center;
	top: 15%;
	width: 70%;
	height: 90%;
    background:radial-gradient(circle at 50% 50%, #FFFFFF 15%, #F7F7F700 68%);
	transition: all 500ms;
	display: none;
}

.main_img_container_visible{
	display: flex !important;
	transform: translateY(-30%);
}

.main_img_container_transition{
	opacity: 0 !important;
}

.main_img_container_visible_complete{
	display: flex !important;
	transform: translateY(-12%);
	opacity: 1;
}

.poke_img{
	position: relative;
	width: 475px;
	height: 475px;
	transform: scaleX(-1);
	transition: all 500ms;
	display: none;
}

.poke_img_display{
	display: block !important;
	opacity: 1;
}


/* Media break points: Message and main image */

@media only screen and (max-width: 600px) {
	.msg_match{
		font-size: 200%;
		letter-spacing: 5px;
		width: 100%;
		text-shadow: -1px 1px 0px #000000, 1px -1px 0px #000000, 1px 1px 0px #000000, -1px -1px 0px #000000, 0px 5px 5px #000;
		top: 67%;
	}

	.msg_match_mob{
		top: 57%;
	}
	
	.msg_complete{
		font-size: 400%;
		letter-spacing: 8px;
		text-shadow: -1px 1px 0px #000000, 1px -1px 0px #000000, 1px 1px 0px #000000, -1px -1px 0px #000000, 0px 5px 5px #000;
		transition-timing-function: ease-in;
		z-index: 1;
		margin: 0;
	}
	
	.main_img_container{
		width:100%;
		top: 10%;
	}

	.poke_img{
		width: 80% !important;
		width: 312px;
		height: 312px;
	}
}

/* Load spinner */

.spinner{
	position: relative;
	top: 25%;
	left: 9%;
	border-radius: 50%;
	grid-column-start: 4;
	grid-row-start: 2;
	width: 300px;
	height: 300px;
	background: conic-gradient(#f0f0f0, #222224, #CE2211, #f0f0f0);
	box-shadow: 0px 0px 150px -40px;
	-webkit-animation: spin 1700ms ease infinite;
	        animation: spin 1700ms ease infinite;
	border: 2px solid #FFF;
}

.spinner::before{
	content: "";
	background-color: #FFF;
	position: absolute;
	width: 86%;
	height: 86%;
	border-radius: 50%;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	box-shadow: inset 0px 0px 110px -40px;
	border: 2px solid #FFF;
}

@keyframes spin{
	to {transform: rotate(360deg);}
}

@-webkit-keyframes spin{
	0% {-webkit-transform: rotate(0deg);}
	100% {-webkit-transform: rotate(360deg);}
}

#load_txt{
	position: relative;
	bottom: 3.25%;
	font-family: 'Exo', sans-serif;
	font-weight: 500;
	text-shadow: -2px 2px 0px #FFF, 2px -2px 0px #FFF, 2px 2px 0px #FFF, -2px -2px 0px #FFF;
	font-size: 250%;
	color: #000;
	grid-column-start: 4;
	grid-column-end: 6;
	grid-row-start: 2;
	grid-row-end: 4;
	margin: auto;
	z-index: 1;
}

@media only screen and (max-width: 600px) {
	.spinner{
		top: 0%;
		left: 2%;
		border-radius: 50%;
		grid-column-start: 2;
		grid-column-end: 4;
		grid-row-start: 2;
		grid-row-end: 4;
		width: 145px;
		height: 145px;
	}
	.spinner::before{
		box-shadow: inset 0px 0px 110px -80px;
	}
	#load_txt{
		grid-column-start: 2;
		grid-column-end: 4;
		grid-row-start: 2;
		grid-row-end: 4;
		width: 100%;
		top: auto;
		font-size: 130%;
		text-align: center;
		bottom: 1%;
		left: 1%;
	}
}

/* Game container */

#game {
	display: grid;
	grid-template-columns: repeat(8, 160px);
	grid-template-rows: repeat(4, 210px);
	grid-gap: 10px;
	position: relative;
}

@media only screen and (max-width: 600px) {
	#game {
		grid-template-columns: repeat(4, 74px);
		grid-template-rows: repeat(8, 70px);
		grid-gap: 6px;
	}
}

/* Card layout */

.card {
	position: relative;
	transform-style: preserve-3d;
}

.front, .back {
	height: 100%;
	width: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	position: absolute;
	-webkit-backface-visibility: hidden;
	        backface-visibility: hidden;
	transition: transform 300ms ease-out;
	border-radius: 10px;
}

.front {
	background: black url("../poke_match_assets/pokeball.png") no-repeat center;
}

.front::after{
	position: relative;
	content: "";
	height: 100%;
	width: 100%;
	box-shadow: 0 3px 10px rgba(86, 86, 86, 0.9);
	border-radius: 10px;
}

.back {
	background-size: 85% !important;
	background-position: center 41% !important;
	background-repeat: no-repeat !important;
}

.back::after{
	position: relative;
	content: "";
	height: 100%;
	width: 100%;
	box-shadow: 0 3px 10px rgba(86, 86, 86, 0.9);
	border-radius: 10px;
}

.rotated {
	transform: rotateY(180deg);
}

.abilities{
	position: absolute;
	top: 7px;
	width: 88%;
}

.pill {
	font-family: "Exo" ,sans-serif;
	font-weight: 500;
    border-radius: 3px;
    line-height: 18px;
    text-transform: capitalize;
    font-size: 11px;
    text-align: center;
    padding: 2px 5px 0px 6px;
    box-shadow: -1px 2px 2px gray, 1px 2px 2px gray;
}

.pill_l{
	float: left;
}

.pill_r{
	float: right;
}

.poke_name_container{
	border-top: 1px solid #aaa9a9;
	background: rgb(209,209,209);
	background: linear-gradient(0deg, rgba(209,209,209,1) 0%, rgba(255,255,255,1) 51%, rgba(255,255,255,1) 78%, rgba(207,207,207,1) 100%);
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#d1d1d1",endColorstr="#cfcfcf",GradientType=1);
	color: #FFF;
	position: absolute;
	bottom: 0%;
	width: 100%;
	border-radius: 0 0 10px 10px;
}

.poke_name {
	font-family: pokemon;
	font-size: 20px;
	letter-spacing: 3px;
	text-align: center;
	text-transform: capitalize;
  	text-shadow: -1px 1px 0px #000000, 1px -1px 0px #000000, 1px 1px 0px #000000, -1px -1px 0px #000000, 0px 3px 3px #000;
  	color: #F9F9F9;
	margin: 0;
	padding: 5px 0 0 0 ;
}

.poke_name_detail {
	font-family: "Exo", sans-serif;
	font-size: 10px;
	text-align: center;
	text-transform: capitalize;
  	color: #000;
	margin: 0 0 5px 0;
}

/* Card media brek points */

@media only screen and (max-width: 600px) {
	.front {
		background: black url("../poke_match_assets/pokeball.png") no-repeat center;
		background-size: 90%;
	}
	
	.front::after{
		box-shadow: 0px 2px 4px rgba(86, 86, 86, 0.9);
	}
	
	.back {
		background-size: 85% !important;
		background-position: center !important;
		background-repeat: no-repeat !important;
	}
	
	.back::after{
		box-shadow: 0px 3px 5px rgba(86, 86, 86, 0.5);
	}
	
	.poke_name_container {
		display: none;
	}

	.pill {
		display: none;
	}
  }