@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
	/* Base */
	--color-bg: #ffffff;
	--color-text: #111;

	/* Grays */
	--gray-100: #f2f2f2;
	--gray-200: #e5e5e5;
	--gray-700: #555;
	--gray-900: #2e2e2e;

	/* Brand / UI */
	--yellow-primary: #f2c300;
	--green-success: #1f9d55;
	--blue-progress: #3b93c8;

	/* Illustration */
	--illustration-bg: #b8a86a;

	/* Common */
	--white: #fff;
}

/* =====================
   Base / Reset
===================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
}

body {
	font-family:
		"Poppins",
		system-ui,
		-apple-system,
		sans-serif;
	font-size: 16px;
	    background: var(--gray-100);
	color: var(--color-text);
	line-height: 1.4;
	min-height: 100vh;
}

button {
	font-family: inherit;
}

header {
	width: 100%;
	margin: auto;
	font-weight: 700;
}

/* =====================
   Top Bar
===================== */
.top-bar {
	position: relative;
	display: flex;
	align-items: center;
	height: 75px;
	padding: 0 16px;
}

.back-btn {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	border: none;
	background: var(--gray-700);
	color: var(--white);
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	z-index: 2;
}

/* Center logo */
.logo {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	height: 100%;
	display: flex;
	align-items: center;
}

.logo img {
	height: 100%;
	width: auto;
	object-fit: contain;
}

/* =====================
   Extended Header Layout
===================== */
header.top-bar {
	flex-direction: column;
	align-items: stretch;
	height: auto;
	padding: 0;
	background: var(--white);
	position: sticky;
	top: 0;
	z-index: 100;
}

.top-bar-main {
	position: relative;
	height: 75px;
	display: flex;
	align-items: center;
	padding: 0 16px;
	width: 500px;
	margin: auto;
}

/* Menu */
.top-bar-menu {
	display: flex;
	justify-content: center;
	gap: 40px;
	background: var(--gray-100);
	border-top: 1px solid var(--gray-200);
	border-bottom: 1px solid var(--gray-200);
	width: 100%;
	padding: 0 12px;
}

.top-bar-menu a {
	padding: 10px 6px;
	font-size: 16px;
	text-decoration: none;
	color: var(--color-text);
	white-space: nowrap;
}

/* Progress */
.top-bar-progress {
	background: var(--blue-progress);
	color: var(--white);
	text-align: center;
	padding: 8px 12px;
	font-size: 16px;
	width: 100%;
}

/* =====================
   Challenge Header
===================== */
.challenge-header {
	background: var(--yellow-primary);
}

.challenge-header h1,
.challenge-header h2 {
	max-width: 500px;
	margin: 0 auto;
	color: var(--white);
}

.challenge-header h1 {
	padding: 16px 20px 0;
	font-size: 20px;
	font-weight: 900;
}

.challenge-header h2 {
	padding: 0 20px 16px;
	font-size: 20px;
	font-weight: 500;
}

.challenge-number {
	display: block;
	font-size: 16px;
	font-weight: 500;
	margin-bottom: 6px;
}

/* =====================
   Main Content
===================== */
.content {
	display: flex;
	flex-direction: column;
	padding-bottom: 75px;
}

/* =====================
   Illustration Area
===================== */
.illustration-area {
	position: relative;
	background: var(--illustration-bg);
	display: flex;
	align-items: center;
	justify-content: center;
}

.illustration-area img {
	width: 100%;
	max-width: 500px;
}

.illustration-label {
	font-size: 22px;
	font-weight: 500;
	letter-spacing: 2px;
	transform: rotate(-35deg);
	opacity: 0.8;
}

/* =====================
   Description
===================== */
.description {
	font-size: 18px;
	padding: 20px;
	max-width: 500px;
	margin: auto;
}

.description p {
	margin: 20px 0 0;
}

.description p:first-of-type {
	margin-top: 0;
}

/* =====================
   Game Area
===================== */
.wrapper {
	max-width: 500px;
	padding: 20px;
	margin: auto;
}

#gameArea {
	font-size: 18px;
	font-weight: 800;
	padding: 0 20px 20px;
	width: 500px;
	max-width: 100%;
	margin: auto;
}

.cluebox,
#clueBox {
	background: var(--gray-900);
	color: var(--white);
	padding: 14px 16px;
	border-radius: 12px;
	font-size: 0.95rem;
	line-height: 1.45;
	max-width: 520px;
	margin: 0 auto;
	font-weight: 400;
}

.cluebox strong,
#clueBox strong {
	font-weight: 900;
}

/* =====================
   Completion Button
===================== */
#markCompleted,
.complete-btn {
	margin-top: 20px;
	padding: 14px 18px;
	background: var(--green-success);
	color: var(--white);
	border: none;
	border-radius: 999px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	width: 100%;
	max-width: 340px;
}

#markCompleted .label,
.complete-btn .label {
	flex: 1;
	font-size: 18px;
	line-height: 1.2;
}

#markCompleted .check,
.complete-btn .check {
	background: var(--white);
	color: var(--green-success);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	height: 40px;
	width: 40px;
	font-size: 27px;
}

/* =====================
   Burger Menu
===================== */
.menu-toggle {
	display: none;
	width: 40px;
	height: 40px;
	padding: 8px;
	background: none;
	border: none;
	cursor: pointer;
	position: relative;
	z-index: 30;
}

.menu-toggle span {
	display: block;
	height: 3px;
	width: 100%;
	background: var(--color-text);
	border-radius: 2px;
	transition:
		transform 0.3s ease,
		opacity 0.2s ease;
}

.menu-toggle span:not(:last-child) {
	margin-bottom: 6px;
}

/* X state */
.menu-toggle.is-open span:nth-child(1) {
	transform: translateY(9px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
	opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
	transform: translateY(-9px) rotate(-45deg);
}

/* =====================
   Responsive
===================== */
@media (max-width: 900px) {
	.wrapper {
		max-width: 100%;
	}
}

@media (max-width: 500px) {
	.menu-toggle {
		display: block;
		margin-left: auto;
	}

	.top-bar-main {
		width: 100%;
	}

	.top-bar-menu {
		position: absolute;
		top: 68%;
		left: 0;
		right: 0;
		flex-direction: column;
		gap: 0;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.35s ease;
		z-index: 20;
	}

	.top-bar-menu.is-open {
		max-height: 300px;
	}

	.top-bar-menu a {
		padding: 14px 16px;
		border-top: 1px solid var(--gray-200);
		text-align: center;
	}

	#markCompleted .label {
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		font-size: 5vw;
	}

	#markCompleted .check {
		width: 14vw;
		height: 14vw;
		font-size: 10vw;
	}
}
