@charset "utf-8";
/* CSS Document */

@font-face {
	font-family: "rounds black";
	src: url("../fonts/rounds_black/Rounds Black.otf");
}


* {
	/* margin: 0 auto; */
	padding: 0;
	box-sizing: border-box;
	font-family: "rounds black";
}

button,
label {
	cursor: pointer;
}

hr {
	border: none;
	margin: 0;
	padding: 20px 0;
}

input {
	padding: 1% 3% !important;
}

#wrap {
	width: 100%;
	height: 100%;
	position: fixed;
	overflow: hidden;
	left: 0;
	top: 0;
}

#inner {
	width: 300%;
	height: 100%;
	position: absolute;
	transition: transform 1.2s;
	left: 0;
	top: 0;
}

#inner>div {
	width: calc(100% / 3);
	height: 100%;
	position: relative;
	float: left;
}

form div {
	margin-bottom: 10px;
}

input {
	width: 100%;
	height: 60px;
	border: none;
	border-radius: 30px;
	padding: 10px 30px;
	box-shadow: 0 0 16px -5px #333;
}

svg {
	max-width: 100%;
	max-height: 100%;
	display: block;
	overflow: visible;
}

/*start*/
#start {
	background-image: url("../imgs/bg.png");
}

#start-svg {
	top: 41%;
	width: 800px;
	position: relative;
}

#start-form {
	width: 400px;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
}

/*game*/
#game {
	background-image: url("../imgs/bg.png");
}

#info-wrapper {
	position: absolute;
	left: 10%;
	background: rgba(255, 255, 255, 0.4);
	border-radius: 50px;
	top: 45%;
	width: 30%;
	aspect-ratio: 16 / 9;
	transform: translateY(-50%);
}

#info-wrapper img {
	left: -6%;
}

#info-wrapper h2 {
	width: 70%;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	-moz-background-clip: text;
	-moz-text-fill-color: transparent;

	-webkit-text-stroke-width: 0.2vw;
	-webkit-text-stroke-color: #3f2000;
	-moz-text-stroke-width: 0.2vw;
	-moz-text-stroke-color: #3f2000;

	position: absolute;
	left: 27%;
	transform: translateY(-50%);
	font-size: 2vw;
	letter-spacing: -2px;
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
	display: block;
	text-align: center;
}

#text-stage {
	background: -webkit-linear-gradient(rgb(255, 218, 0), rgb(239, 111, 37));
	background: linear-gradient(rgb(255, 218, 0), rgb(239, 111, 37));
	top: 20%;
	border: 2px solid #c9c9c9;
	border-radius: 23px;
}

#text-nickname {
	background: -webkit-linear-gradient(rgb(248, 210, 11), rgb(0, 162, 160));
	background: linear-gradient(rgb(248, 210, 11), rgb(0, 162, 160));
	top: 45%;
	border: 2px solid #c9c9c9;
	border-radius: 23px;
}

#text-score {
	background: -webkit-linear-gradient(rgb(255, 218, 0), rgb(239, 111, 37));
	background: linear-gradient(rgb(255, 218, 0), rgb(239, 111, 37));
	top: 70%;
	border: 2px solid #c9c9c9;
	border-radius: 23px;
}

#game-timer-svg {
	width: 750px;
	position: absolute;
	right: 250px;
	top: 0;
}

#game-boards-svg {
	width: 800px;
	position: absolute;
	right: 220px;
	top: 150px;
}

#game-board-items {
	width: 48%;
	height: 47%;
	position: absolute;
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	grid-template-rows: repeat(6, 1fr);
	top: 31%;
	left: 26%;
	text-align: center;
}

.item img {
	width: 100%;
}

#game-board-items>div {
	width: 80%;
	height: 80%;
	position: relative;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}

/*end*/
#end {
	background-image: url("../imgs/bg.png");
}

#end-result-svg {
	width: 1000px;
	position: relative;
}

#end-wrapper h4 {
	width: 50%;
	-webkit-background-clip: text;
	-webkit-text-fill-color: #f7efdd;
	-moz-background-clip: text;
	-moz-text-fill-color: #f7efdd;

	-webkit-text-stroke-width: 0.2vw;
	-webkit-text-stroke-color: #814925;
	-moz-text-stroke-width: 0.2vw;
	-moz-text-stroke-color: #814925;

	position: absolute;
	left: 26%;
	letter-spacing: -0.5px;
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
	display: block;
	font-size: 2.2vw;
	text-align: center;
	z-index: 3;
}

#text-nickname-2 {
	background: -webkit-linear-gradient(rgb(248, 210, 11), rgb(0, 162, 160));
	background: linear-gradient(rgb(248, 210, 11), rgb(0, 162, 160));
	top: 28%;
}

#text-score-2 {
	background: -webkit-linear-gradient(rgb(255, 218, 0), rgb(239, 111, 37));
	background: linear-gradient(rgb(255, 218, 0), rgb(239, 111, 37));
	top: 40.5%;
}

#text-time {
	background: -webkit-linear-gradient(rgb(248, 210, 11), rgb(0, 162, 160));
	background: linear-gradient(rgb(248, 210, 11), rgb(0, 162, 160));
	top: 52.6%;
}


#start,
#game,
#end {
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

/* custom css */
#start.start,
#game.game {
	width: 0;
}

.item {
	cursor: pointer;
}

/* start */
#start-object {
	user-select: none;
	width: 100%;
}

#start-wrapper {
	margin: 0;
	position: relative;
	width: 50%;
	min-width: 500px;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

#start-panel {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
}

#nickname {
	position: absolute;
	top: 40.2%;
	left: 50.5%;
	height: 10%;
	border-radius: 39px;
	width: 41%;
	transform: translate(-50%, -50%);
	background: transparent;
	font-size: 2.6vw;
	transition: background 0.3s;
	outline: none;
	box-shadow: none;
}

#error-placeholder {
	position: absolute;
	top: 40%;
	left: 50.5%;
	height: 14%;
	border-radius: 39px;
	width: 47%;
	transform: translate(-50%, -50%);
	background: transparent;
	user-select: none;
	z-index: -1;
	opacity: 1;
}

#error-placeholder.error {
	animation: nickname_error_animation 0.5s ease-in-out;
}

#error-msg {
	position: absolute;
	color: rgb(249, 75, 75);
	transform: translate(-50%, -50%);
	top: 51%;
	left: 50.5%;
	z-index: 3;
	font-size: 1.2vw;
	opacity: 0;
	transition: opacity 0.5s;
	user-select: none;
}

#nickname.not_empty {
	background: linear-gradient(179deg, #f7f0dc, #eaddc8 146%);
}

#start-btn {
	position: absolute;
	/* top: 65%; */
	transform: translate(-50%, -50%);
	background: transparent;
	z-index: 2;
	cursor: pointer;
	user-select: none;
	border: 10px solid #b44b3a;
	transition: border 0.3s;

	top: 63.2%;
	left: 50.2%;
	width: 44.5%;
	border-radius: 5vw;
	height: 14.4%;
}

#start-btn:hover {
	border: 10px solid #8c4aa7;
}

#start-btn:active {
	border: 10px solid #5d2b76;
}

.start-fruit {
	position: absolute;
	transform: translate(-50%, -50%);
	top: 50%;
	left: 50%;
	width: 10%;
	z-index: 2;
}

.start-apple-object {
	left: 13%;
	top: 17%;
	transform: rotate(-30deg);
	animation: start_fruit_animation infinite 1.3s ease-in-out;
}

.start-banana-object {
	left: 75%;
	top: 17%;
	transform: rotate(30deg);
	animation: start_fruit_animation infinite 1.3s ease-in-out;
	animation-delay: 0.5s;
}

.start-grape-object {
	left: 75%;
	top: 75%;
	transform: rotate(40deg);
	animation: start_fruit_animation infinite 1.3s ease-in-out;
	animation-delay: 1s;
}

.start-peach-object {
	left: 13%;
	top: 76%;
	transform: rotate(260deg);
	animation: start_fruit_animation infinite 1.3s ease-in-out;
	animation-delay: 1.5s;
}

/* ready css */
.ready-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0;
	background: rgba(0, 0, 0, 0.3);
	width: 105vw;
	height: 100vh;
	transition: opacity 0.5s;

	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 5vw;
	color: white;
}

/* timer */

.info-object {
	position: absolute;
	z-index: 3;
	width: 60%;
}

#nickname-object {
	top: 13%;
}

#score-object {
	top: 37.5%;
}

#stage-object {
	/* top: -17%; */
	top: -13%;
}

#timer-text {
	position: absolute;
	top: 56.3%;
	left: 41.8%;
	width: 17.6%;
	height: 4%;
	border-radius: 21px;
	background: #f3e3cb;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 1.5vw;
	z-index: 2;
}

.matched {
	animation: pop 0.5s ease-in-out;
}

#timer-bar {
	background: #e1574f;
	position: absolute;
	top: 48.8%;
	left: 30.2%;
	width: 46%;
	height: 4.8%;
	border-radius: 30px;
	z-index: 3;
}

#timer-bar-background {
	background: #e8d3b8;
	position: absolute;
	top: 48.8%;
	left: 30.2%;
	width: 46%;
	height: 4.4%;
	border-radius: 30px;
	z-index: 2;
}

/* board and items */
.selected {
	animation: selected_animation infinite 1.5s ease-in-out;
}

/* stage */
#stage-modal {
	position: absolute;
	background: white;
	border-radius: 20px;
	width: 30%;
	height: 40%;
	left: 50%;
	top: 50%;
	z-index: 99;
	transform: translate(-50%, -300%);
	transition: all 0.8s;
	opacity: 0;

	display: flex;
	justify-content: center;
	flex-direction: column;
	align-items: center;
	font-size: 2.5vw;
}

#stage-modal.show {
	opacity: 1;
	transform: translate(-50%, -80%);
}

/* end */

/* start */
#end-object {
	user-select: none;
	width: 100%;
}

#end-wrapper {
	aspect-ratio: 1 / 1;

	position: absolute;
	width: 50%;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);


	background: url("../imgs/end-board.png");
	background-size: 100% 100%;
	background-repeat: no-repeat;
}

#end-nickname-background,
#end-score-background,
#end-time-background {
	background: linear-gradient(177deg, #f4edd6, #f1e5cc 94%);
	position: absolute;
	width: 40%;
	border-radius: 33px;
	height: 8%;
	top: 36%;
	transform: translate(-50%, -50%);
	left: 50%;
	z-index: 1;
}

#end-score-background {
	top: 48%;
}

#end-time-background {
	top: 61%;
}

#end-btn {
	position: absolute;
	top: 69.2%;
	left: 50%;
	transform: translateX(-50%);
	background: transparent;
	width: 36%;
	height: 8%;
	border-radius: 64px;
	cursor: pointer;
}

#success,
#failed {
	position: absolute;
	top: -12%;
	width: 80%;
	height: 80%;
	left: 52%;
	transform: translateX(-50%);
	z-index: 5;
	filter: brightness(1.5);
}

#failed {
	filter: brightness(0.8);
}

#star-object {
	position: absolute;
	top: 25%;
	left: 52%;
	z-index: 5;
}

.star {
	position: absolute;
	transform: translate(-50%, -50%);
	top: 5%;
	left: 52%;
	animation: star_animation infinite 1.5s;
}

#success-object {
	position: absolute;
	top: 10%;
	z-index: 5;
}

.watermelon {
	animation: watermelon_animation infinite 1.5s ease-in-out;
}

/* item drag */
#game-board-items .item {
	cursor: grab;
}

#game-board-items .item.dragging {
	opacity: 0.5;
	cursor: grabbing;
}

.matched-background {
	width: 50%;
	height: 50%;
	background: #ffffff;
	border-radius: 100%;
	position: absolute;
	top: 25%;
	left: 25%;
	animation: matched_bg_animation 0.5s;
}

.scored {
	position: absolute;
	top: 30%;
	left: 0%;
	font-size: 1.5vw;
	width: 100%;
	height: 70%;
	opacity: 0;
	z-index: -1;
}

.scored.show {
	animation: matched_scored_animation 0.5s;
}

.total_score {
	font-size: 2.2vw;
	position: absolute;
	top: 50%;
	left: 0%;
	opacity: 0;
	transform: rotate(-30deg);
	z-index: 3;
}

.total_score.show {
	animation: total_scored_animation 2s;
}


#game-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
}

#logo-wrapper {
	position: absolute;
	left: 10%;
	top: 25%;
	width: 30%;
	aspect-ratio: 1 / 1;
	transform: translateY(-50%);

	background: url("../imgs/logo.png");
	background-size: 100% 100%;
	background-repeat: no-repeat;
}

#timer-wrapper {
	left: 5%;
	top: 40%;
	height: 40vw;
	position: absolute;
	aspect-ratio: 1 / 1;

	background: url("../imgs/timer\ bar.png");
	background-size: 100% 100%;
	background-repeat: no-repeat;
}

#board-wrapper {
	margin: 0;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	right: 0;
	background: url("../imgs/game-board.png");
	background-size: 100% 100%;
	background-repeat: no-repeat;
	height: 60vw;
	aspect-ratio: 1 / 1;
}

#timer-panel {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
}

#timer-object {
	width: 100%;
	user-select: none;
}