:root {
	--gwc-red: #c1272d;
	--gwc-dark: #1c1c1c;
	--gwc-green: #2e7d32;
	--gwc-bg: #000000;
	--gwc-surface: #131313;
	--gwc-border: #333333;
}

.gwc-game-root, .gwc-game-root *,
.gwc-overlay, .gwc-overlay * {
	box-sizing: border-box;
}

.gwc-wrap {
	max-width: 1020px;
	margin: 0 auto;
	padding: 32px 16px 40px;
	text-align: center;
	font-family: inherit;
	background: var(--gwc-bg);
	color: #fff;
	border-radius: 18px;
}

.gwc-header .gwc-title {
	color: #fff;
	font-size: 1.7em;
	margin: 0 0 6px;
}

.gwc-header .gwc-sub {
	color: #fff;
	margin: 0 0 24px;
	font-size: 1em;
}

/* Scene banner */
.gwc-scene-banner {
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 1;
	border-radius: 14px;
	overflow: hidden;
	margin: 0 0 24px;
	background: #000;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}

.gwc-scene-banner picture {
	display: block;
	width: 100%;
	height: 100%;
}

.gwc-scene-bg {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

@media (max-width: 600px) {
	.gwc-scene-banner {
		aspect-ratio: 4 / 5;
	}
}

.gwc-scene-caption {
	position: absolute;
	top: 10px;
	left: 10px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 0.78em;
	border: 1px solid rgba(255, 255, 255, 0.3);
	backdrop-filter: blur(2px);
}

/* Track */
.gwc-track {
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 0;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 8px 8px 16px;
	scroll-snap-type: x proximity;
}

.gwc-node-wrap {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 0 0 auto;
	width: 76px;
	scroll-snap-align: center;
}

.gwc-mascot-slot {
	height: 48px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	margin-bottom: 6px;
}

.gwc-mascot {
	width: 42px;
	height: 42px;
	object-fit: contain;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

.gwc-mascot.is-active {
	animation: gwc-bounce 1.4s ease-in-out infinite;
}

@keyframes gwc-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}

.gwc-node {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 3px solid #fff;
	background: var(--gwc-surface);
	color: #fff;
	font-weight: 700;
	font-size: 1.1em;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.gwc-node:hover:not(:disabled):not(.is-locked) {
	transform: scale(1.08);
}

.gwc-node.is-current {
	background: var(--gwc-red);
	border-color: var(--gwc-red);
	color: #fff;
	box-shadow: 0 0 0 4px rgba(193, 39, 45, 0.35);
}

.gwc-node.is-completed {
	background: var(--gwc-green);
	border-color: var(--gwc-green);
	color: #fff;
}

.gwc-node.is-locked {
	background: #1a1a1a;
	border-color: #444;
	color: #777;
	cursor: not-allowed;
}

.gwc-node-label {
	margin-top: 6px;
	font-size: 0.72em;
	color: #fff;
}

.gwc-connector {
	flex: 0 0 24px;
	height: 3px;
	background: #3a3a3a;
	margin-top: 26px;
	align-self: flex-start;
}

.gwc-connector.is-completed {
	background: var(--gwc-green);
}

/* Reset button */
.gwc-reset-btn {
	margin-top: 24px;
	background: none;
	border: 2px solid #fff;
	color: #fff;
	border-radius: 999px;
	padding: 8px 20px;
	font-size: 0.9em;
	cursor: pointer;
}

.gwc-reset-btn:hover {
	background: #fff;
	color: #000;
}

/* Certificate */
.gwc-certificate {
	margin: 20px auto 0;
	max-width: 480px;
	background: var(--gwc-surface);
	border: 3px solid var(--gwc-red);
	border-radius: 16px;
	padding: 24px 20px;
}

.gwc-cert-mascot {
	width: 80px;
	height: 80px;
	object-fit: contain;
	margin-bottom: 12px;
}

.gwc-certificate h3 {
	margin: 0 0 8px;
	color: var(--gwc-red);
}

.gwc-certificate p {
	margin: 0;
	color: #fff;
}

/* Modal */
.gwc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	z-index: 99999;
}

.gwc-modal {
	position: relative;
	background: var(--gwc-surface);
	border: 1px solid var(--gwc-border);
	border-radius: 16px;
	max-width: 480px;
	width: 100%;
	padding: 28px 22px 22px;
	text-align: left;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
	max-height: 90vh;
	overflow-y: auto;
	color: #fff;
}

.gwc-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	font-size: 1.6em;
	line-height: 1;
	cursor: pointer;
	color: #fff;
}

.gwc-close:hover {
	color: var(--gwc-red);
}

.gwc-q-num {
	font-size: 0.8em;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 6px;
}

.gwc-q-text {
	margin: 0 0 18px;
	color: #fff;
	font-size: 1.15em;
	line-height: 1.4;
}

.gwc-answers {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.gwc-answer-btn {
	text-align: left;
	background: #1e1e1e;
	border: 2px solid #3a3a3a;
	border-radius: 12px;
	padding: 12px 14px;
	font-size: 1em;
	color: #fff;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.gwc-answer-btn:hover:not(:disabled) {
	border-color: var(--gwc-red);
	background: #262626;
}

.gwc-answer-btn:disabled {
	cursor: default;
	opacity: 0.85;
}

.gwc-answer-btn.is-correct {
	border-color: var(--gwc-green);
	background: rgba(46, 125, 50, 0.3);
}

.gwc-answer-btn.is-wrong {
	border-color: var(--gwc-red);
	background: rgba(193, 39, 45, 0.3);
}

.gwc-feedback {
	margin-top: 16px;
	padding: 14px;
	border-radius: 10px;
	font-size: 0.98em;
	color: #fff;
}

.gwc-feedback:empty {
	display: none;
}

.gwc-feedback.is-correct {
	background: rgba(46, 125, 50, 0.25);
}

.gwc-feedback.is-wrong {
	background: rgba(193, 39, 45, 0.25);
}

.gwc-feedback p {
	margin: 0 0 12px;
}

.gwc-next-btn,
.gwc-retry-btn {
	border: none;
	border-radius: 999px;
	padding: 10px 20px;
	font-size: 0.95em;
	font-weight: 600;
	cursor: pointer;
	color: #fff;
}

.gwc-next-btn {
	background: var(--gwc-green);
}

.gwc-retry-btn {
	background: var(--gwc-red);
}

@media (max-width: 480px) {
	.gwc-scene-caption {
		font-size: 0.7em;
		padding: 3px 9px;
	}
	.gwc-node-wrap {
		width: 64px;
	}
	.gwc-node {
		width: 46px;
		height: 46px;
		font-size: 1em;
	}
	.gwc-mascot-slot {
		height: 42px;
	}
	.gwc-mascot {
		width: 36px;
		height: 36px;
	}
}
