#quiz {
	/* height: 90vh; */
	height: 100vh;
	/* max-height: 850px; */
	max-height: 900px;
	max-width: 500px;
	margin: auto;
	display: flex;
	justify-content: center;
	flex-direction: column;
	align-items: center;
	transition: background-color 0.2s linear;
	/* background-color: var(--background-color-l); */
	background-color: black;
	overflow: hidden;
	position: relative;
	border: 2px solid #e1510a;
	z-index: 1;
	padding-top: 110px;
}

input.hidden {
	display: none;
}

.backgroundCircle {
	border-radius: 50%;
	position: absolute;
	filter: blur(8px);
	z-index: -1;
	opacity: 1;
	transition: opacity 0.3s;
}

.backgroundCircle.blue {
	height: 200px;
	width: 200px;
	background-color: #0167b8;
	top: 0;
	right: -50px;
	animation: floatUpDown 3.5s ease-in-out infinite alternate;
	animation-delay: -1s;
}

.backgroundCircle.blue2 {
	height: 260px;
	width: 260px;
	background-color: #0167b8;
	top: 50%;
	left: -100px;
	animation: floatUpDown 4.5s ease-in-out infinite alternate;
	animation-delay: -0.5s;
}

.backgroundCircle.orange {
	height: 120px;
	width: 120px;
	background-color: #e1510a;
	right: 30px;
	bottom: 0;
	animation: floatUpDown 4s ease-in-out infinite alternate;
}

.backgroundCircle.hide {
	opacity: 0;
}

@keyframes floatUpDown {
	0% {
		transform: translate(0%, 20%);
	}

	100% {
		transform: translate(0%, -20%);
	}
}

#quiz h1 {
	/* color: #e1510a; */
	color: white;
	font-size: 30px;
	margin: 0;
}

#quiz h2 {
	color: #e1510a;
	font-size: 42px;
	margin: 0;
	margin-bottom: 1.5em;
	position: relative;
}
.menu {
	display: none;
	flex: 1;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.menu.show {
	display: flex;
}

.menu p {
	margin: 0;
}

#avatarSelect {
	display: none;
}

#avatarSelect.show {
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	width: 100%;
	margin-top: -110px;
}

.avatarSelectStats p {
	background-color: #000000;
	color: white;
	padding: 2px 10px;

	border-radius: 10px;
	box-shadow: 0 0 8px white inset;
	margin: 0 2px 4px 2px;
}

#avatars {
	display: flex;
	flex-direction: column;
	width: 100%;
	align-items: center;
	gap: 4px;
	overflow-y: auto;
}

#avatars .avatarItem {
	display: flex;
	gap: 12px;
	align-items: center;
	width: 90%;
	padding: 2px 4px;
}

#avatars .avatarItem.unlocked {
	border: 1px solid #0167b8;
}
#avatars .avatarItem.selected {
	border: 1px solid #e1510a;
	box-shadow: 0px 0px 15px inset #e1510a;
}

#avatars .avatarItem .avatarItemValue {
	flex: 1;
}

#avatars .avatarItem .avatarEffect {
	font-size: 14px;
	flex: 1;
}

#avatars img {
	width: 100px;
}
#avatars .avatarItem.locked {
	border: 1px solid #b4b4b4;
	background-color: var(--background-color-l);
}

#avatars .avatarItem.locked img {
	filter: grayscale(1);
}

button.avatarButton {
	background-color: white;
	color: black;
	padding: 0.3em 1em;
	font-size: 24px;
	border: none;
	outline: none;
	border-radius: 10px;
}

button.quizButton {
	background-color: #e1510a;
	color: white;
	padding: 0.3em 1em;
	font-size: 30px;
	border: none;
	outline: none;
	border-radius: 10px;
	animation: growCorrect 2s ease-in-out infinite;
	position: relative;
	z-index: 1000;
}

.quizArea {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 90vw;
	/* max-width: 420px; */
	max-width: 400px;
	height: 100%;
	position: relative;
	top: 0;
	transition: height 0.5s;
}

.quizArea.show {
	display: flex;
}

#quiz.green {
	background-color: rgb(0, 121, 0);
}

#quiz.red {
	background-color: rgb(165, 0, 0);
}

.quizArea.shrink {
	animation: shrink 0.4s ease-in forwards;
}

@keyframes shrink {
	0% {
		height: 90vh;
		max-height: 90vh;
	}

	100% {
		height: 90vw;
		max-height: 400px;
	}
}

.quizArea.fall {
	animation: fall 0.3s ease-in forwards;
}

@keyframes fall {
	0% {
		top: 0;
		height: 90vw;
		max-height: 400px;
	}

	100% {
		top: 100%;
		height: 90vw;
		max-height: 400px;
	}
}

.quizArea .question {
	background-color: var(--background-color-l);
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	padding: 10px 5px;
	font-size: 20px;
	z-index: 10;
	width: 85%;
	text-align: center;
	backdrop-filter: blur(5px);
	pointer-events: none;
	opacity: 0;
	/* transition: top 0.5s linear; */
}

.quizArea .question.easy:before {
	content: "";
	position: absolute;
	right: 100%;
	bottom: 0;
	top: 0;
	width: 20px;
	background-color: green;
	color: white;
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
}

.quizArea .question.easy:after {
	content: "+1";
	position: absolute;
	left: -7px;
	top: 50%;
	transform-origin: center;
	transform: translateY(-50%) rotate(-90deg) translateY(-50%);

	color: white;
	font-size: 14px;
}

.quizArea .question.med:before {
	content: "";
	position: absolute;
	right: 100%;
	bottom: 0;
	top: 0;
	width: 20px;
	background-color: #e1510a;
	color: white;
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
}

.quizArea .question.med:after {
	content: "+2";
	position: absolute;
	left: -7px;
	top: 50%;
	transform-origin: center;
	transform: translateY(-50%) rotate(-90deg) translateY(-50%);

	color: white;
	padding: 2px 4px;
	font-size: 14px;
}

.quizArea .question.hard:before {
	content: "";
	position: absolute;
	right: 100%;
	bottom: 0;
	top: 0;
	width: 20px;
	background-color: red;
	color: white;
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
}

.quizArea .question.hard:after {
	content: "+3";
	position: absolute;
	left: -7px;
	top: 50%;
	transform-origin: center;
	transform: translateY(-50%) rotate(-90deg) translateY(-50%);

	color: white;
	padding: 2px 4px;
	font-size: 14px;
}

.quizArea .question.show {
	animation: dropIn 0.3s ease-in forwards;
}

.quizArea .question.hide {
	animation: dropInReverse 0.3s ease-in forwards;
	/* top: 0; */
}

.choice {
	width: 600px;
	max-width: 100%;
	position: absolute;
	transition: top 0.2s, right 0.2s, left 0.2s;
	opacity: 0;
}

.quizArea .option1 {
	top: 0;
	clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}
.quizArea .option1.swipeRight {
	opacity: 1;
	animation: swipeInFromLeft 0.5s ease-in-out forwards;
}

.quizArea .option2 {
	bottom: 0;
	clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%);
}

.quizArea .option2.swipeLeft {
	opacity: 1;
	animation: swipeInFromRight 0.5s ease-in-out forwards;
}

.quizArea img {
	width: 100%;
	aspect-ratio: 1/1;
}

.hidden {
	display: none;
}

.choice.chosen.wiggleWrong {
	animation: wiggleWrong 0.6s linear forwards;
	animation-delay: 0.2s;
}

.choice.chosen.growCorrect {
	animation: growCorrect 1.4s linear forwards;
}

.choice.swipeLeftReverse {
	animation: swipeInFromLeftReverse 0.5s ease-in-out forwards;
	opacity: 1;
}
.choice.swipeRightReverse {
	animation: swipeInFromRightReverse 0.5s ease-in-out forwards;
	opacity: 1;
}

@keyframes swipeInFromLeft {
	0% {
		right: 110%;
	}
	88% {
		right: -10%;
	}
	100% {
		right: 0px;
	}
}

@keyframes swipeInFromLeftReverse {
	0% {
		right: 0px;
	}
	12% {
		right: -10%;
	}
	100% {
		right: 110%;
		visibility: hidden;
	}
}

@keyframes swipeInFromRight {
	0% {
		left: 110%;
	}
	88% {
		left: -10%;
	}
	100% {
		left: 0px;
	}
}

@keyframes swipeInFromRightReverse {
	0% {
		left: 0px;
	}
	12% {
		left: -10%;
	}
	100% {
		left: 110%;
		visibility: hidden;
	}
}

@keyframes dropIn {
	0% {
		opacity: 0;
		transform: translate(-50%, -50%) scale(1.8);
		filter: blur(2px);
	}

	100% {
		opacity: 0.9;
		transform: translate(-50%, -50%) scale(1);
		filter: blur(0px);
	}
}

@keyframes dropInReverse {
	0% {
		transform: translate(-50%, -50%) scale(1);
		filter: blur(0px);
		opacity: 0.9;
	}

	100% {
		transform: translate(-50%, -50%) scale(1.8);
		filter: blur(2px);
		opacity: 0;
	}
}

@keyframes wiggleWrong {
	0% {
		transform: rotate(0deg);
	}
	10% {
		transform: rotate(10deg);
	}

	20% {
		transform: rotate(-10deg);
	}
	30% {
		transform: rotate(15deg);
	}
	40% {
		transform: rotate(-10deg);
	}
	50% {
		transform: rotate(10deg);
	}
	60% {
		transform: rotate(-15deg);
	}
	70% {
		transform: rotate(15deg);
	}
	80% {
		transform: rotate(0deg);
	}
	90% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(0deg);
	}
}

@keyframes growCorrect {
	0% {
		transform: scale(1);
	}
	20% {
		transform: scale(1.2);
	}
	40% {
		transform: scale(1);
	}
	60% {
		transform: scale(1.2);
	}

	80% {
		transform: scale(1);
	}

	100% {
		transform: scale(1);
	}
}

@keyframes dropInLanguage {
	0% {
		opacity: 0;
		transform: scale(2);
		filter: blur(3px);
	}

	100% {
		opacity: 1;
		transform: scale(1);
		filter: blur(0px);
	}
}

/* Game Header and Avatar section */

#gameHeader {
	position: absolute;
	top: 0px;
	left: 0px;
	right: 0;
	background-color: black;
	height: 100px;
	padding: 4px 20px;
	display: flex;
	opacity: 0;
	transition: opacity 0.4s linear;
}

#gameHeader.hide {
	display: none;
}

#gameHeader.show {
	opacity: 1;
}

#runInfo {
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
}

#runInfo p {
	padding: 0;
	margin: 0;
	font-size: 20px;
}

#currentLanguage {
	border-bottom: 2px solid white;
}

#language {
	color: #e1510a;
	text-shadow: 2px 2px 4px #e1510a;
	font-size: 2em !important;
}

#language.drop {
	animation: dropInLanguage 0.5s ease-in forwards;
}

#avatarHUD {
	border-radius: 50%;
	width: 100px;
	height: 100px;
	position: relative;
	z-index: 100;
	transform: scale(1);
	transition: transform 0.3s ease-in-out;
}

#avatarHUD.grow {
	transform: scale(1.15);
}

#imgBack {
	background: linear-gradient(20deg, #ffe6d9 2%, #e1510a, #ffe6d9);
	border-radius: 50%;
	width: 100px;
	height: 100px;
	position: relative;
	z-index: 2;
	box-shadow: 0 0 10px 2px white;
}

#imgBack:before {
	content: "";
	height: 90%;
	width: 90%;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: conic-gradient(#e1510a 20%, #e7e7e7 50%, #e1510a);
	border-radius: 50%;
}

#avatarHUD img {
	width: 100px;
	position: absolute;
	right: 0;
	bottom: 0;
	/* top: 50%;
	left: 50%;
	transform: translate(-50%, -50%); */
	z-index: 3;
}

#healthBar {
	position: absolute;
	z-index: 10;
	bottom: 0;
	display: flex;
	gap: 4px;
	left: 6px;
	right: 6px;
	height: 10px;
	z-index: 4;
}

#healthBar .HPpoint {
	flex: 1;
	max-width: 40px;
	background-color: #0167b8;
	border: 1px solid white;
	height: 100%;
	clip-path: polygon(20% 0, 100% 0, 80% 100%, 0 100%);
	opacity: 1;
	transition: background-color 0.25s;
}

#healthBar .HPpoint.hide {
	/* opacity: 0; */
	background-color: black;
	animation: hideHP 0.6s linear forwards;
}

@keyframes hideHP {
	0% {
		opacity: 1;
		transform: scale(1) translateY(0) rotate(0deg);
		filter: blur(0px);
	}

	100% {
		opacity: 0;
		transform: scale(3) translateY(10px) rotate(50deg);
		filter: blur(3px);
	}
}

#xpBar {
	position: absolute;
	height: 80%;
	top: 50%;
	transform: translateY(-50%);
	right: -24px;
	/* width: 20px; */
	/* clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%); */

	border-radius: 50%;
	width: 60px;
	/* background: linear-gradient(0deg, #0167b8, #4ca7f2); */
	background: linear-gradient(0deg, #e1510a 20%, #ffffff 50%, #0167b8 80%);

	z-index: 1;
	border-right: 3px solid white;
	overflow: hidden;
}

#xpBar.shake {
	animation: shakeBurn 0.09s linear infinite;
}

@keyframes shakeBurn {
	0% {
		transform: translateX(-1px) translateY(-50%);
	}

	100% {
		transform: translateX(1px) translateY(-50%);
	}
}

#xpBar:before {
	content: "";
	position: absolute;
	height: 100%;
	width: 100%;
	top: 0;
	right: 28px;
	background-color: black;
	z-index: 6;
}

#xpBarCover {
	position: absolute;
	top: 0;
	left: -10px;
	right: -10px;
	background-color: rgb(59, 59, 59);
	transition: height 0.8s ease-in;
	box-shadow: 20px 0px 8px white;
}

#xpBarCircleNegative {
	top: 0;
	position: absolute;
	right: 10px;
	width: 100%;
	height: 100%;
	background-color: black;
	border-radius: 50%;
	z-index: 5;
	border-right: 3px solid white;
}

/* instructions */
#howToPlay {
	background-color: #e1510a;
	padding: 0;
	border: none;
	font-size: 18px;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	text-align: center;
	color: white;
	position: absolute;
	top: -10px;
	right: -24px;
	box-shadow: 0px 0px 3px white;
}

#instructions {
	display: none;
	flex: 1;
	flex-direction: column;
	align-items: center;
}

#instructions.show {
	display: flex;
	margin: 10px 0;
}

#instructions li {
	font-size: 14px;
	padding-top: 6px;
}

/* media queries */

@media screen and (max-width: 375px) and (max-height: 680px) {
	.quizArea {
		width: 80vw;
	}
}

@media screen and (max-height: 680px) {
	.quizArea .question {
		font-size: 16px;
		line-height: 1.2em;
	}
}

@media screen and (max-height: 900px) {
	.quizArea {
		max-width: 45vh;
	}
}
