/* =============================
   Leukequizzen — Type-on-map quiz
   ============================= */

.lq-tc {
	background: var(--color-white);
	border-radius: var(--radius-card);
	padding: clamp(20px, 3vw, 32px);
	box-shadow: var(--shadow-card);
	max-width: 1000px;
	margin: 0 auto;
}

/* ---------- Setup screen ---------- */
.lq-tc__screen--setup {
	max-width: 600px;
	margin: 0 auto;
	text-align: center;
}
.lq-tc__setup-head h2 {
	font-size: clamp(1.5rem, 3vw, 2rem);
	margin: 0 0 12px;
}
.lq-tc__setup-head p {
	color: var(--color-muted);
	font-size: 1rem;
	margin: 0 0 24px;
}
.lq-tc__nick-field {
	display: block;
	max-width: 320px;
	margin: 0 auto 18px;
	text-align: left;
}
.lq-tc__nick-field span {
	display: block;
	font-weight: 700;
	margin-bottom: 6px;
	color: var(--color-dark);
}
.lq-tc__nick-field input {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid var(--color-border);
	border-radius: var(--radius-pill);
	background: var(--color-cream);
	font: inherit;
	font-size: 1rem;
}
.lq-tc__nick-field input:focus {
	background: var(--color-white);
	border-color: var(--color-primary);
	outline: none;
}
.lq-tc__nick--error,
.lq-tc__nick-field input.lq-tc__nick--error {
	border-color: #FF7B7B;
	background: #FFF0F0;
	animation: lq-nick-shake 0.35s ease;
}
.lq-tc__nick-error {
	display: block;
	color: #FF5252;
	font-size: 0.85rem;
	margin-top: 6px;
}
.lq-tc__rules {
	margin-top: 28px;
	text-align: left;
	background: var(--color-cream-2);
	border-radius: 14px;
	padding: 18px 22px;
	list-style: none;
}
.lq-tc__rules li {
	padding: 4px 0;
	font-size: 0.95rem;
	color: var(--color-text);
}
.lq-tc__rules li::before {
	content: "→ ";
	color: var(--color-primary);
	font-weight: 800;
	margin-right: 4px;
}

/* ---------- Play screen ---------- */
.lq-tc__topbar {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}
.lq-tc__stat {
	background: var(--color-cream-2);
	border-radius: 14px;
	padding: 10px 18px;
	display: flex; flex-direction: column; gap: 2px;
	flex: 1;
	min-width: 140px;
}
.lq-tc__stat span {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 800;
	color: var(--color-muted);
}
.lq-tc__stat strong {
	font-family: var(--font-heading);
	font-weight: 900;
	font-size: 1.6rem;
	color: var(--color-dark);
	line-height: 1;
}
.lq-tc__stat--timer strong.is-warning {
	color: #E63838;
	animation: lq-tc-pulse 1s ease-in-out infinite;
}
@keyframes lq-tc-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.6; }
}

.lq-tc__input-wrap {
	display: block;
	margin-bottom: 18px;
}
.lq-tc__input-wrap input {
	width: 100%;
	padding: 14px 20px;
	border: 3px solid var(--color-dark);
	border-radius: var(--radius-pill);
	background: var(--color-white);
	font: inherit;
	font-size: 1.1rem;
	font-weight: 600;
	box-shadow: 0 4px 0 rgba(31,77,67,0.18);
}
.lq-tc__input-wrap input:focus {
	outline: none;
	border-color: var(--color-primary);
}

/* ---------- Map ---------- */
.lq-tc__map {
	background: linear-gradient(180deg, #E8F4FF 0%, #CFE5F5 100%);
	border-radius: 14px;
	padding: 8px;
	margin-bottom: 18px;
	overflow: hidden;
	box-shadow: inset 0 0 0 3px var(--color-dark);
}
.lq-tc__map svg {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	max-height: 70vh;
	/* Geen tekst-selectie + geen hover-cursor: het is een quiz, geen interactie-element. */
	user-select: none;
	-webkit-user-select: none;
}
.lq-tc__map svg * {
	pointer-events: none;
}
/* Default fill: lichtgrijs voor speelbare landen, donkerder voor de rest. */
.lq-tc__map svg path,
.lq-tc__map svg g path {
	fill: #D8D3C0;
	stroke: #1F4D43;
	stroke-width: 0.4;
	transition: fill 0.3s ease;
}
/* Niet-Europese landen aan de randen: dimmen. */
.lq-tc__map svg path:not([data-lq-playable]),
.lq-tc__map svg g:not([data-lq-playable]) path {
	fill: #B8B2A0;
	opacity: 0.5;
}
/* Water / oceanen */
.lq-tc__map svg #large_masses_of_water,
.lq-tc__map svg #large_masses_of_water path {
	fill: transparent;
	stroke: none;
	pointer-events: none;
}
/* Gevonden = groen met flash (werkt voor zowel filled polygons als stroke-only rivers) */
.lq-tc__map svg path.is-found,
.lq-tc__map svg g.is-found,
.lq-tc__map svg g.is-found path {
	fill: var(--color-primary) !important;
	opacity: 1 !important;
}
/* Rivier-stijl paths: stroke-only. Bij is-found stroke groen + dikker, fill blijft none
   (anders zou de rivier-polyline een gevulde polygoon worden). */
.lq-tc__map svg path[fill="none"].is-found {
	fill: none !important;
	stroke: var(--color-primary) !important;
	stroke-width: 4 !important;
}
.lq-tc__map svg path.lq-flash {
	animation: lq-tc-flash 0.6s ease;
}
.lq-tc__map svg path[fill="none"].lq-flash {
	animation: lq-tc-flash-stroke 0.6s ease;
}
@keyframes lq-tc-flash {
	0%   { fill: #FFD23F; }
	100% { fill: var(--color-primary); }
}
@keyframes lq-tc-flash-stroke {
	0%   { stroke: #FFD23F; stroke-width: 6; }
	100% { stroke: var(--color-primary); stroke-width: 4; }
}

/* ---------- Found chips ---------- */
.lq-tc__found-wrap {
	margin-bottom: 16px;
}
.lq-tc__found-wrap h4 {
	font-size: 0.9rem;
	margin: 0 0 8px;
	color: var(--color-muted);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.lq-tc__found {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	min-height: 32px;
}
.lq-tc__chip {
	display: inline-block;
	background: var(--color-primary);
	color: var(--color-white);
	padding: 4px 10px;
	border-radius: var(--radius-pill);
	font-size: 0.85rem;
	font-weight: 700;
	animation: lq-tc-chip-in 0.3s ease;
}
@keyframes lq-tc-chip-in {
	from { transform: scale(0.6); opacity: 0; }
	to   { transform: scale(1);   opacity: 1; }
}

.lq-tc__give-up {
	display: block;
	margin: 0 auto;
}

/* ---------- Result screen ---------- */
.lq-tc__screen--result {
	text-align: center;
	max-width: 600px;
	margin: 0 auto;
}
.lq-tc__screen--result h2 {
	font-size: clamp(1.8rem, 4vw, 2.5rem);
	margin: 0 0 16px;
}
.lq-tc__final {
	font-size: 1.1rem;
	color: var(--color-text);
	margin: 0 0 16px;
}
.lq-tc__final strong {
	color: var(--color-primary);
	font-size: 1.4rem;
}
.lq-tc__rank {
	display: inline-block;
	background: var(--color-yellow);
	color: var(--color-dark);
	padding: 10px 18px;
	border-radius: var(--radius-pill);
	font-weight: 800;
	margin-bottom: 18px;
	box-shadow: 0 3px 0 rgba(31,77,67,0.18);
}
.lq-tc__missed {
	background: var(--color-cream-2);
	border-radius: 14px;
	padding: 18px;
	margin: 16px 0;
	text-align: left;
}
.lq-tc__perfect {
	font-size: 1.2rem;
	text-align: center;
	margin: 0;
	font-weight: 700;
}
.lq-tc__missed-head {
	margin: 0 0 8px;
	font-weight: 800;
	color: var(--color-dark);
}
.lq-tc__missed-list {
	list-style: none;
	padding: 0; margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.lq-tc__missed-list li {
	background: #FFF;
	padding: 4px 10px;
	border-radius: var(--radius-pill);
	font-size: 0.9rem;
	color: var(--color-dark);
	border: 1px solid var(--color-border);
}
.lq-tc__result-actions {
	margin-top: 18px;
}

/* ---------- Leaderboard ---------- */
.lq-tc__leaderboard {
	margin-top: 28px;
	background: var(--color-cream-2);
	border-radius: var(--radius-card);
	padding: 22px;
}
.lq-tc__lb-head { margin-bottom: 12px; }
.lq-tc__lb-head h3 { margin: 0 0 4px; font-size: 1.2rem; }
.lq-tc__lb-head p { margin: 0; color: var(--color-muted); font-size: 0.9rem; }

.lq-tc__lb-loading, .lq-tc__lb-empty {
	color: var(--color-muted);
	padding: 16px;
	text-align: center;
	margin: 0;
}
.lq-tc__lb-list { list-style: none; padding: 0; margin: 0; }
.lq-tc__lb-row {
	display: grid;
	grid-template-columns: 48px 1fr auto auto;
	gap: 12px;
	align-items: center;
	padding: 10px 14px;
	border-bottom: 1px solid var(--color-border);
}
.lq-tc__lb-row:last-child { border-bottom: 0; }
.lq-tc__lb-row:nth-child(1) { background: color-mix(in srgb, #FFD23F 18%, white); border-radius: 12px; }
.lq-tc__lb-row:nth-child(2) { background: color-mix(in srgb, #C0C0C0 16%, white); border-radius: 12px; }
.lq-tc__lb-row:nth-child(3) { background: color-mix(in srgb, #CD7F32 14%, white); border-radius: 12px; }
.lq-tc__lb-rank { font-family: var(--font-heading); font-weight: 900; font-size: 1.1rem; text-align: center; color: var(--color-dark); }
.lq-tc__lb-name { font-weight: 700; color: var(--color-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lq-tc__lb-score { font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; color: var(--color-dark); }
.lq-tc__lb-time { color: var(--color-muted); font-size: 0.9rem; }

@media (max-width: 540px) {
	.lq-tc__lb-row { grid-template-columns: 36px 1fr auto auto; padding: 8px; gap: 8px; }
}
