/**
 * Jamiah Quran Hifz Quiz — front-end styles.
 * TV-Studio "Who Wants to Be a Millionaire" style layout & graphics.
 */

/* ==========================================================================
   Admin list badge
   ========================================================================== */
.jhq-badge {
	display: inline-block;
	padding: 1px 10px;
	border-radius: 12px;
	background: #1d3160;
	color: #ffd54a;
	font-weight: 700;
	font-size: 12px;
	line-height: 20px;
}

/* ==========================================================================
   Game container / Studio Atmosphere
   ========================================================================== */
.jhq-game {
	--jhq-bg: #030617;
	--jhq-navy-deep: #050d26;
	--jhq-navy-card: #081438;
	--jhq-cyan-bright: #00d2ff;
	--jhq-cyan-glow: #00f0ff;
	--jhq-cyan-border: #2ac4ea;
	--jhq-cyan-dark: #0f3966;
	--jhq-silver: #a0c4df;
	--jhq-gold: #e5a93b;
	--jhq-orange: #ff9100;
	--jhq-orange-light: #ffaa33;
	--jhq-green: #00e676;
	--jhq-red: #ff3d00;
	--jhq-text: #ffffff;
	--jhq-text-muted: #8ea8c7;

	position: relative;
	max-width: 1040px;
	margin: 1.5rem auto;
	padding: 0;
	background-color: var(--jhq-bg);
	background-image:
		radial-gradient(circle at 45% 28%, rgba(0, 140, 255, 0.28) 0%, rgba(5, 13, 38, 0.85) 55%, #020512 100%),
		linear-gradient(180deg, #020514 0%, #06112c 50%, #020514 100%);
	border: 1px solid rgba(0, 210, 255, 0.35);
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 50px rgba(0, 160, 255, 0.12);
	color: var(--jhq-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
	overflow: hidden;
}

/* Full screen mode: the game becomes the whole viewport, with no page
   header/footer or side margins. The class is toggled by game.js for both
   the native Fullscreen API and the CSS fallback. */
.jhq-game.is-fullscreen {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	overflow: hidden;
}

/* Keep the top bar (and its exit-full-screen button) visible while only the
   play area scrolls on short screens. */
.jhq-game.is-fullscreen .jhq-body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
}

/* Fallback for browsers without element fullscreen (e.g. iOS Safari). */
.jhq-game.is-fullscreen.jhq-fullscreen-fallback {
	position: fixed;
	inset: 0;
	z-index: 999999;
}

body.jhq-fullscreen-active {
	overflow: hidden;
}

.jhq-game *,
.jhq-game *::before,
.jhq-game *::after {
	box-sizing: border-box;
}

.jhq-game button {
	font-family: inherit;
	cursor: pointer;
}

.jhq-game .is-hidden {
	display: none !important;
}

/* Studio ambient stage lighting & glowing floor ring */
.jhq-stage-fx {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 1;
}

.jhq-light-beam {
	position: absolute;
	width: 280px;
	height: 100%;
	top: -50px;
	opacity: 0.18;
	filter: blur(40px);
}

.jhq-light-beam-left {
	left: 5%;
	background: linear-gradient(135deg, rgba(0, 210, 255, 0.6) 0%, transparent 70%);
	transform: rotate(-15deg);
}

.jhq-light-beam-center {
	left: 35%;
	width: 320px;
	background: radial-gradient(ellipse at center, rgba(0, 190, 255, 0.25) 0%, transparent 75%);
}

.jhq-light-beam-right {
	right: 15%;
	background: linear-gradient(225deg, rgba(0, 210, 255, 0.5) 0%, transparent 70%);
	transform: rotate(15deg);
}

.jhq-floor-ring {
	position: absolute;
	bottom: -160px;
	left: 20%;
	width: 600px;
	height: 320px;
	border-radius: 50%;
	border: 2px solid rgba(0, 210, 255, 0.22);
	box-shadow: 0 0 50px rgba(0, 210, 255, 0.18), inset 0 0 50px rgba(0, 210, 255, 0.1);
	transform: perspective(600px) rotateX(72deg);
}

/* ==========================================================================
   Top HUD Bar (Lifelines, HUD Timer, Walk Away)
   ========================================================================== */
.jhq-topbar {
	position: relative;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 28px 10px;
	background: linear-gradient(180deg, rgba(3, 7, 24, 0.95) 0%, rgba(3, 7, 24, 0.4) 100%);
}

/* ---- Left: Lifelines ---- */
.jhq-lifelines-wrap {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.jhq-lifelines {
	display: flex;
	align-items: center;
	gap: 14px;
}

.jhq-lifeline {
	width: 62px;
	height: 62px;
	border-radius: 50%;
	border: 2px solid var(--jhq-cyan-border);
	background: radial-gradient(circle at 35% 35%, #183c6d, #081636 75%);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 16px rgba(0, 210, 255, 0.35), inset 0 0 10px rgba(0, 210, 255, 0.2);
	transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, filter 0.2s ease;
	padding: 0;
}

.jhq-lifeline:hover:not(:disabled) {
	transform: scale(1.08);
	box-shadow: 0 0 24px rgba(0, 240, 255, 0.7), inset 0 0 12px rgba(0, 240, 255, 0.4);
	filter: brightness(1.15);
}

.jhq-lifeline:disabled {
	opacity: 0.28;
	filter: grayscale(1);
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
	border-color: rgba(255, 255, 255, 0.2);
}

.jhq-lifeline-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 1.15rem;
	color: #ffffff;
	text-shadow: 0 0 8px rgba(0, 210, 255, 0.8);
}

.jhq-lifeline[data-lifeline="fifty"] .jhq-lifeline-icon {
	font-size: 1.05rem;
	letter-spacing: -0.02em;
}

.jhq-svg-icon {
	width: 26px;
	height: 26px;
	filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.7));
}

/* ---- Center: Circular HUD countdown timer ---- */
.jhq-timer-center {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
}

.jhq-clock {
	--clock-size: 110px;
	--clock-border: 4px;
	position: relative;
	width: var(--clock-size);
	height: var(--clock-size);
	border-radius: 50%;
	background: radial-gradient(circle, #02081c 45%, #07153a 90%);
	box-shadow: 0 0 25px rgba(0, 210, 255, 0.45), inset 0 0 18px rgba(0, 0, 0, 0.9);
}

/* Outer concentric cyan ring with ticks */
.jhq-clock-ring-outer {
	position: absolute;
	inset: -5px;
	border-radius: 50%;
	border: 1px dashed rgba(0, 210, 255, 0.6);
	box-shadow: 0 0 12px rgba(0, 210, 255, 0.3);
	pointer-events: none;
}

.jhq-clock .circle-timer {
	position: relative;
	width: 100%;
	height: 100%;
}

.jhq-clock .timer-slot {
	position: absolute;
	top: 0;
	width: 50%;
	height: 100%;
	overflow: hidden;
}

.jhq-clock .timer-slot:nth-child(1) {
	left: 0;
}

.jhq-clock .timer-slot:nth-child(2) {
	left: 50%;
}

.jhq-clock .timer-lt,
.jhq-clock .timer-rt {
	position: absolute;
	top: 50%;
	width: calc(var(--clock-size) - (var(--clock-border) * 2));
	height: calc(var(--clock-size) - (var(--clock-border) * 2));
	margin-top: calc((var(--clock-size) - (var(--clock-border) * 2)) / -2);
	border-radius: 50%;
	border: var(--clock-border) solid var(--jhq-cyan-glow);
	border-left-color: transparent;
	border-top-color: transparent;
	box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
	transform-origin: 50% 50%;
}

.jhq-clock .timer-lt {
	left: 100%;
	margin-left: calc((var(--clock-size) - (var(--clock-border) * 2)) / -2);
	animation: jhq-timer-slide-lt 60s linear forwards;
}

.jhq-clock .timer-rt {
	left: 0;
	margin-left: calc((var(--clock-size) - (var(--clock-border) * 2)) / -2);
	animation: jhq-timer-slide-rt 60s linear forwards;
}

@keyframes jhq-timer-slide-lt {
	0%, 50% { transform: rotate(135deg); }
	100% { transform: rotate(315deg); }
}

@keyframes jhq-timer-slide-rt {
	0% { transform: rotate(-45deg); }
	50%, 100% { transform: rotate(135deg); }
}

.jhq-clock .count {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.1rem;
	font-weight: 900;
	color: #00ff66;
	font-variant-numeric: tabular-nums;
	text-shadow: 0 0 12px rgba(0, 255, 102, 0.8), 0 0 20px rgba(0, 255, 102, 0.4);
	letter-spacing: -0.03em;
	z-index: 10;
}

/* Clock danger mode (<=10s) */
.jhq-clock.is-danger .count {
	color: var(--jhq-red);
	text-shadow: 0 0 16px rgba(255, 61, 0, 0.9), 0 0 25px rgba(255, 61, 0, 0.5);
	animation: jhq-clock-blink 1s steps(2, jump-none) infinite;
}

.jhq-clock.is-danger .timer-lt,
.jhq-clock.is-danger .timer-rt {
	border-color: var(--jhq-red);
	border-left-color: transparent;
	border-top-color: transparent;
	box-shadow: 0 0 16px rgba(255, 61, 0, 0.8);
}

.jhq-clock.is-paused .timer-lt,
.jhq-clock.is-paused .timer-rt {
	animation-play-state: paused;
	opacity: 0.6;
}

@keyframes jhq-clock-blink {
	0% { opacity: 1; }
	100% { opacity: 0.35; }
}

/* ---- Right: Walk Away & Sound Toggle ---- */
.jhq-topbar-actions {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
}

.jhq-btn {
	border: 1.5px solid var(--jhq-cyan-border);
	background: linear-gradient(180deg, #183c6d, #081636);
	color: #ffffff;
	padding: 8px 18px;
	border-radius: 20px;
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
	box-shadow: 0 0 14px rgba(0, 210, 255, 0.25);
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.jhq-btn:hover {
	transform: translateY(-1px);
	border-color: var(--jhq-cyan-glow);
	box-shadow: 0 0 22px rgba(0, 240, 255, 0.6);
	filter: brightness(1.15);
}

.jhq-btn-walk {
	border-radius: 24px;
	padding: 10px 24px;
	font-size: 0.9rem;
	letter-spacing: 0.08em;
	background: linear-gradient(180deg, #12345e 0%, #081a38 100%);
	border-color: #00d2ff;
	box-shadow: 0 0 16px rgba(0, 210, 255, 0.35);
}

.jhq-btn-sound {
	width: 38px;
	height: 38px;
	padding: 0;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	opacity: 0.8;
}

.jhq-btn-sound .jhq-sound-off { display: none; }
.jhq-game[data-sound="off"] .jhq-sound-on { display: none; }
.jhq-game[data-sound="off"] .jhq-sound-off { display: inline; }

/* Full screen toggle */
.jhq-btn-fullscreen .jhq-fs-icon {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.jhq-btn-fullscreen .jhq-fs-exit { display: none; }
.jhq-game.is-fullscreen .jhq-btn-fullscreen .jhq-fs-enter { display: none; }
.jhq-game.is-fullscreen .jhq-btn-fullscreen .jhq-fs-exit { display: block; }

.jhq-btn-primary {
	background: linear-gradient(180deg, #ffc23d, #f08a00);
	border-color: #ffe08a;
	color: #1a0e00;
	box-shadow: 0 0 30px rgba(255, 145, 0, 0.6);
}

.jhq-btn-lg {
	padding: 14px 38px;
	font-size: 1.05rem;
	border-radius: 26px;
}

.jhq-btn-small {
	padding: 5px 14px;
	font-size: 0.78rem;
}

/* ==========================================================================
   Body Layout (Main Stage on Left, Prize Ladder on Right)
   ========================================================================== */
.jhq-body {
	position: relative;
	z-index: 5;
	display: grid;
	grid-template-columns: 1fr 240px;
	gap: 20px;
	padding: 16px 28px 28px;
	min-height: 520px;
}

/* Main game content area: the studio image from assets/images sits behind the
   screens, under a dark scrim so the question and option text stay readable. */
.jhq-stage {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	padding: 22px 20px;
	border-radius: 10px;
	background-color: #03081c;
	background-image:
		linear-gradient(180deg, rgba(3, 7, 24, 0.86) 0%, rgba(3, 7, 24, 0.6) 45%, rgba(3, 7, 24, 0.88) 100%),
		url("../images/bg.jpg");
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	border: 1px solid rgba(0, 210, 255, 0.22);
	box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   Prize Ladder (Right Sidebar)
   ========================================================================== */
.jhq-ladder {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.jhq-ladder-inner {
	background: rgba(3, 7, 24, 0.82);
	border: 2px solid rgba(0, 210, 255, 0.6);
	box-shadow: 0 0 20px rgba(0, 210, 255, 0.25), inset 0 0 20px rgba(0, 0, 0, 0.8);
	border-radius: 8px;
	padding: 10px 8px;
}

.jhq-ladder ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.jhq-ladder li,
.jhq-ladder-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 4px 8px;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--jhq-gold);
	border-radius: 4px;
	letter-spacing: 0.03em;
	transition: all 0.2s ease;
}

.jhq-ladder-left {
	display: flex;
	align-items: center;
	gap: 6px;
}

.jhq-ladder-diamond {
	font-size: 0.65rem;
	opacity: 0.85;
}

.jhq-ladder-level {
	font-size: 0.76rem;
	font-variant-numeric: tabular-nums;
	width: 18px;
	text-align: right;
}

.jhq-ladder-amount {
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.04em;
}

/* Milestone rows (15, 10, 5) -> Bright White text & diamond */
.jhq-ladder li.jhq-milestone,
.jhq-ladder-row.jhq-milestone {
	color: #ffffff;
	font-weight: 900;
	text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.jhq-ladder li.jhq-milestone .jhq-ladder-diamond,
.jhq-ladder-row.jhq-milestone .jhq-ladder-diamond {
	color: #ffffff;
}

/* Active current row -> Vivid Amber / Orange Pill Lozenge */
.jhq-ladder li.jhq-current,
.jhq-ladder-row.jhq-current {
	background: linear-gradient(90deg, #ff8f00 0%, #ffb300 50%, #ff8f00 100%);
	color: #0c0800 !important;
	font-weight: 900;
	border-radius: 14px;
	box-shadow: 0 0 18px rgba(255, 143, 0, 0.85);
	animation: jhq-pulse 1.2s ease-in-out infinite;
	text-shadow: none !important;
}

.jhq-ladder li.jhq-current .jhq-ladder-diamond,
.jhq-ladder-row.jhq-current .jhq-ladder-diamond {
	color: #0c0800 !important;
}

.jhq-ladder li.jhq-passed,
.jhq-ladder-row.jhq-passed {
	color: #00e676;
	opacity: 0.75;
}

@keyframes jhq-pulse {
	0%, 100% { box-shadow: 0 0 10px rgba(255, 143, 0, 0.6); }
	50% { box-shadow: 0 0 24px rgba(255, 143, 0, 0.95); }
}

/* ==========================================================================
   Millionaire Hexagonal Lozenge Shapes & Stage Connector Lines
   ========================================================================== */

/* Universal Millionaire Lozenge
   The element itself paints the border; .jhq-lozenge-fill paints the inner
   face. Both share the same fixed-cap hexagon so the 45° angled ends stay
   consistent no matter how wide or tall the box becomes. */
.jhq-lozenge {
	--jhq-lozenge-cap: 26px;
	--jhq-lozenge-border: 1.5px;
	--jhq-lozenge-border-diag: 2.121px; /* border * sqrt(2) for the 45° edges */
	--jhq-lozenge-edge: linear-gradient(180deg, #eaf5ff 0%, #a9cdee 55%, #6fa6d8 100%);
	--jhq-lozenge-face: linear-gradient(180deg, #0a1738 0%, #050b1e 100%);

	position: relative;
	display: flex;
	align-items: center;
	background: var(--jhq-lozenge-edge);
	border: none;
	padding: 0;
	box-sizing: border-box;
	clip-path: polygon(
		var(--jhq-lozenge-cap) 0,
		calc(100% - var(--jhq-lozenge-cap)) 0,
		100% 50%,
		calc(100% - var(--jhq-lozenge-cap)) 100%,
		var(--jhq-lozenge-cap) 100%,
		0 50%
	);
}

/* Inner face of the lozenge. The clip-path is offset inward by the border
   width so the outer element reads as a single crisp border line. */
.jhq-lozenge-fill {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: var(--jhq-lozenge-face);
	clip-path: polygon(
		calc(var(--jhq-lozenge-cap) + var(--jhq-lozenge-border-diag) - var(--jhq-lozenge-border)) var(--jhq-lozenge-border),
		calc(100% - var(--jhq-lozenge-cap) - var(--jhq-lozenge-border-diag) + var(--jhq-lozenge-border)) var(--jhq-lozenge-border),
		calc(100% - var(--jhq-lozenge-border-diag)) 50%,
		calc(100% - var(--jhq-lozenge-cap) - var(--jhq-lozenge-border-diag) + var(--jhq-lozenge-border)) calc(100% - var(--jhq-lozenge-border)),
		calc(var(--jhq-lozenge-cap) + var(--jhq-lozenge-border-diag) - var(--jhq-lozenge-border)) calc(100% - var(--jhq-lozenge-border)),
		var(--jhq-lozenge-border-diag) 50%
	);
	overflow: hidden;
	pointer-events: none;
	transition: background 0.25s ease;
}

/* Horizontal TV Studio Connector Lines */
.jhq-connector-line {
	height: 2px;
	background: linear-gradient(90deg, #cde3ff, #82b6ff 50%, #cde3ff 100%);
	box-shadow: 0 0 6px rgba(180, 220, 255, 0.8);
}

/* Question row */
.jhq-question-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	margin-top: 10px;
}

.jhq-question-wrapper .jhq-connector-left,
.jhq-question-wrapper .jhq-connector-right {
	flex: 1;
	min-width: 12px;
}

.jhq-question-box-wrap {
	flex: 0 0 calc(100% - 24px);
	min-width: 0;
	filter: drop-shadow(0 0 7px rgba(200, 230, 255, 0.5));
}

.jhq-question-box {
	width: 100%;
	min-height: 84px;
	justify-content: center;
	text-align: center;
	--jhq-lozenge-cap: 40px;
}

.jhq-lozenge-content {
	position: relative;
	z-index: 3;
	width: 100%;
	padding: 16px 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-width: 0;
}

.jhq-question-text {
	margin: 0;
	font-size: clamp(1rem, 2.2vw, 1.25rem);
	font-weight: 700;
	line-height: 1.45;
	color: #ffffff;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.jhq-reference {
	min-height: 22px;
	font-size: 0.85rem;
	color: var(--jhq-gold);
	letter-spacing: 0.05em;
	text-align: center;
	margin: 6px 0 12px;
	font-style: italic;
	transition: opacity 0.3s ease;
}

/* Options 2x2 Grid with connecting lines */
.jhq-options-container {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
}

.jhq-options-row {
	display: flex;
	align-items: center;
	width: 100%;
}

.jhq-connector-outer-left,
.jhq-connector-outer-right {
	flex: 1;
	min-width: 8px;
}

.jhq-connector-middle {
	flex: 0 0 16px;
}

.jhq-option-wrapper {
	flex: 0 0 calc(50% - 16px);
	filter: drop-shadow(0 0 5px rgba(200, 230, 255, 0.45));
	transition: filter 0.2s ease;
}

.jhq-option-wrapper:has(.jhq-option:hover:not(:disabled):not(.is-locked):not(.is-removed):not(.is-correct):not(.is-wrong)),
.jhq-option-wrapper:has(.jhq-option:focus-visible) {
	filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.85));
}

.jhq-option-wrapper:has(.jhq-option.is-locked) {
	filter: drop-shadow(0 0 18px rgba(255, 145, 0, 0.95));
}

.jhq-option-wrapper:has(.jhq-option.is-correct) {
	filter: drop-shadow(0 0 22px rgba(0, 230, 118, 0.95));
}

.jhq-option-wrapper:has(.jhq-option.is-wrong) {
	filter: drop-shadow(0 0 18px rgba(255, 23, 68, 0.95));
}

.jhq-option-wrapper:has(.jhq-option.is-removed) {
	filter: none;
}

/* Option button */
.jhq-option {
	width: 100%;
	min-height: 52px;
	cursor: pointer;
	text-align: left;
	outline: none;
	font-family: inherit;
	transition: transform 0.15s ease;
}

.jhq-option-content {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: center;
	width: 100%;
	padding: 10px 40px 10px 36px;
	box-sizing: border-box;
	min-width: 0;
}

.jhq-option-diamond {
	font-size: 0.72rem;
	color: var(--jhq-orange);
	margin-right: 8px;
	filter: drop-shadow(0 0 4px rgba(255, 143, 0, 0.8));
	flex: 0 0 auto;
}

.jhq-option-letter {
	font-weight: 900;
	color: var(--jhq-orange-light);
	margin-right: 8px;
	font-size: 1.05rem;
	flex: 0 0 auto;
}

.jhq-option-text {
	flex: 1;
	color: #ffffff;
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1.35;
	white-space: normal;
	word-break: break-word;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   Choice Button Hover Shimmer Sweep Animation
   The shimmer lives inside the clipped inner face, so it can never spill
   outside the hexagon or across the border.
   ========================================================================== */
.jhq-lozenge-fill::after {
	content: "";
	position: absolute;
	top: -60%;
	left: -150%;
	width: 80%;
	height: 220%;
	background: linear-gradient(
		105deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.05) 20%,
		rgba(200, 230, 255, 0.45) 50%,
		rgba(255, 255, 255, 0.85) 60%,
		rgba(200, 230, 255, 0.45) 70%,
		rgba(255, 255, 255, 0) 100%
	);
	transform: skewX(-25deg);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.jhq-option:hover:not(:disabled):not(.is-locked):not(.is-removed):not(.is-correct):not(.is-wrong) {
	--jhq-lozenge-edge: linear-gradient(180deg, #ffffff 0%, #d8edff 55%, #a9d4f5 100%);
	--jhq-lozenge-face: linear-gradient(180deg, #143566 0%, #081a3d 100%);
}

.jhq-option:hover:not(:disabled):not(.is-locked):not(.is-removed):not(.is-correct):not(.is-wrong) .jhq-lozenge-fill::after {
	opacity: 1;
	animation: jhq-shimmer-sweep 1.2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

@keyframes jhq-shimmer-sweep {
	0% {
		left: -150%;
	}
	100% {
		left: 200%;
	}
}

/* ==========================================================================
   Answer States (Locked Orange, Correct Green, Wrong Red, Removed)
   ========================================================================== */

/* Locked state - Orange */
.jhq-option.is-locked {
	--jhq-lozenge-edge: linear-gradient(180deg, #fff8d6 0%, #ffd54f 55%, #ffb300 100%);
	--jhq-lozenge-face: linear-gradient(180deg, #ffb300 0%, #e66a00 100%);
}

.jhq-option.is-locked .jhq-lozenge-fill {
	animation: jhq-flash-fill-orange 0.5s steps(2, jump-none) infinite;
}

.jhq-option.is-locked .jhq-option-diamond,
.jhq-option.is-locked .jhq-option-letter,
.jhq-option.is-locked .jhq-option-text {
	color: #000000 !important;
	text-shadow: none;
	font-weight: 800;
}

@keyframes jhq-flash-fill-orange {
	0%, 100% { background: linear-gradient(180deg, #ffb300, #e66a00); }
	50% { background: linear-gradient(180deg, #8a3000, #5c1f00); }
}

/* Correct state - Bright Green */
.jhq-option.is-correct {
	--jhq-lozenge-edge: linear-gradient(180deg, #e8fff2 0%, #6fffb0 55%, #00c853 100%);
	--jhq-lozenge-face: linear-gradient(180deg, #00e676 0%, #008f3a 100%);
}

.jhq-option.is-correct .jhq-lozenge-fill {
	animation: jhq-flash-fill-green 0.45s steps(2, jump-none) infinite;
}

.jhq-option.is-correct .jhq-option-diamond,
.jhq-option.is-correct .jhq-option-letter,
.jhq-option.is-correct .jhq-option-text {
	color: #000000 !important;
	text-shadow: none;
	font-weight: 800;
}

@keyframes jhq-flash-fill-green {
	0%, 100% { background: linear-gradient(180deg, #00e676, #008f3a); }
	50% { background: linear-gradient(180deg, #004d20, #002e13); }
}

/* Wrong state - Crimson Red */
.jhq-option.is-wrong {
	--jhq-lozenge-edge: linear-gradient(180deg, #ffe0e0 0%, #ff8a80 55%, #ff1744 100%);
	--jhq-lozenge-face: linear-gradient(180deg, #ff3d00 0%, #b71c1c 100%);
	animation: jhq-shake 0.4s ease 2;
}

.jhq-option.is-wrong .jhq-option-diamond,
.jhq-option.is-wrong .jhq-option-letter,
.jhq-option.is-wrong .jhq-option-text {
	color: #ffffff !important;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

@keyframes jhq-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-6px); }
	75% { transform: translateX(6px); }
}

.jhq-option.is-removed {
	opacity: 0.18;
	filter: grayscale(1);
	pointer-events: none;
}

/* ==========================================================================
   Answer confirmation hint & Next Question button
   ========================================================================== */
.jhq-answer-hint {
	min-height: 20px;
	margin: 12px 0 0;
	text-align: center;
	font-size: 0.85rem;
	font-style: italic;
	letter-spacing: 0.04em;
	color: var(--jhq-silver);
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.jhq-answer-hint.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.jhq-next-wrap {
	display: flex;
	justify-content: center;
	margin-top: 16px;
	animation: jhq-next-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes jhq-next-in {
	from { opacity: 0; transform: translateY(14px) scale(0.94); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.jhq-btn-next {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 14px 40px;
	border: 2px solid #ffe9a8;
	border-radius: 30px;
	background: linear-gradient(180deg, #ffe082 0%, #ffc107 45%, #f57c00 100%);
	color: #1a0e00;
	font-size: 1rem;
	font-weight: 900;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	box-shadow: 0 0 28px rgba(255, 179, 0, 0.6), 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.75);
	animation: jhq-next-pulse 2s ease-in-out infinite;
	overflow: hidden;
}

/* Sweeping shine across the face of the button. */
.jhq-btn-next::after {
	content: "";
	position: absolute;
	top: -60%;
	left: -150%;
	width: 70%;
	height: 220%;
	background: linear-gradient(
		105deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.75) 50%,
		rgba(255, 255, 255, 0) 100%
	);
	transform: skewX(-25deg);
	pointer-events: none;
	animation: jhq-next-shine 2.4s ease-in-out infinite;
}

.jhq-btn-next:hover {
	transform: translateY(-2px) scale(1.03);
	border-color: #fff6d0;
	box-shadow: 0 0 40px rgba(255, 200, 0, 0.9), 0 8px 24px rgba(0, 0, 0, 0.5);
	filter: brightness(1.06);
}

.jhq-btn-next:active {
	transform: translateY(0) scale(0.99);
}

.jhq-next-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(26, 14, 0, 0.15);
	font-size: 0.8rem;
	animation: jhq-next-arrow 1.4s ease-in-out infinite;
}

@keyframes jhq-next-pulse {
	0%, 100% {
		box-shadow: 0 0 20px rgba(255, 179, 0, 0.5), 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.75);
	}
	50% {
		box-shadow: 0 0 36px rgba(255, 200, 0, 0.85), 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.75);
	}
}

@keyframes jhq-next-shine {
	0%, 55% { left: -150%; }
	85%, 100% { left: 200%; }
}

@keyframes jhq-next-arrow {
	0%, 100% { transform: translateX(0); }
	50% { transform: translateX(3px); }
}

/* ==========================================================================
   Start Screen & Result Screen
   ========================================================================= */
.jhq-screen {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	flex: 1;
	padding: 10px 4px;
	text-align: center;
}

.jhq-start-ornament {
	font-size: 3.2rem;
	line-height: 1;
	filter: drop-shadow(0 0 16px rgba(0, 210, 255, 0.8));
}

.jhq-start-title {
	margin: 0;
	font-size: clamp(1.4rem, 4vw, 2.2rem);
	font-weight: 900;
	letter-spacing: 0.03em;
	color: #ffffff;
	text-shadow: 0 0 20px rgba(0, 210, 255, 0.6);
}

.jhq-start-sub {
	margin: 0;
	max-width: 48ch;
	color: #b8cbe8;
	line-height: 1.6;
}

.jhq-start-rules {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	color: #9cb4dc;
	font-size: 0.9rem;
}

.jhq-start-rules li::before {
	content: "\25C6";
	color: var(--jhq-gold);
	margin-right: 8px;
	font-size: 0.75rem;
}

.jhq-start-hint {
	margin: 0;
	color: var(--jhq-gold);
	font-style: italic;
	font-size: 0.9rem;
}

/* Poll overlay */
.jhq-poll {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 460px;
	background: rgba(3, 8, 30, 0.95);
	border: 2px solid var(--jhq-cyan-border);
	border-radius: 12px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	z-index: 30;
	box-shadow: 0 0 35px rgba(0, 210, 255, 0.4);
}

.jhq-poll-title {
	margin: 0;
	font-size: 1rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--jhq-cyan-glow);
}

.jhq-poll-bars {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 22px;
	height: 140px;
}

.jhq-poll-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	width: 52px;
	height: 100%;
}

.jhq-poll-fill {
	width: 100%;
	height: 0;
	min-height: 4px;
	border-radius: 4px 4px 0 0;
	background: linear-gradient(180deg, #00f0ff, #0088cc);
	box-shadow: 0 0 14px rgba(0, 240, 255, 0.6);
	transition: height 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.jhq-poll-pct {
	font-size: 0.8rem;
	font-weight: 800;
	color: #ffffff;
}

.jhq-poll-letter {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--jhq-cyan-border);
}

/* Friend overlay */
.jhq-friend {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 480px;
	background: rgba(3, 8, 30, 0.95);
	border: 2px solid var(--jhq-cyan-border);
	border-radius: 12px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	z-index: 30;
	box-shadow: 0 0 35px rgba(0, 210, 255, 0.4);
}

.jhq-friend-bubble {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

.jhq-friend-avatar {
	font-size: 2rem;
	line-height: 1;
	filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.6));
}

.jhq-friend-text {
	margin: 0;
	padding: 12px 18px;
	background: rgba(0, 210, 255, 0.08);
	border: 1px solid rgba(0, 210, 255, 0.25);
	border-radius: 12px;
	text-align: left;
	line-height: 1.55;
	font-style: italic;
	color: #e0f2fe;
}

/* Result screen */
.jhq-result-emoji {
	font-size: 3.8rem;
	line-height: 1;
	filter: drop-shadow(0 0 16px rgba(0, 210, 255, 0.7));
}

.jhq-result-title {
	margin: 0;
	font-size: clamp(1.4rem, 3.8vw, 2rem);
	font-weight: 900;
	color: #ffffff;
	text-shadow: 0 0 20px rgba(0, 210, 255, 0.7);
}

.jhq-result-message {
	margin: 0;
	max-width: 52ch;
	color: #cddff4;
	line-height: 1.6;
}

.jhq-result-stats {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	justify-content: center;
}

.jhq-result-stat {
	background: rgba(0, 210, 255, 0.08);
	border: 1px solid rgba(0, 210, 255, 0.35);
	border-radius: 10px;
	padding: 10px 18px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 110px;
}

.jhq-result-stat .jhq-stat-value {
	font-size: 1.4rem;
	font-weight: 900;
	color: var(--jhq-cyan-glow);
}

.jhq-result-stat .jhq-stat-label {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #9cb4dc;
}

.jhq-result-stat.jhq-fail .jhq-stat-value {
	color: var(--jhq-red);
}

/* Toast */
.jhq-toast {
	position: absolute;
	left: 50%;
	bottom: 18px;
	transform: translate(-50%, 20px);
	background: rgba(3, 8, 30, 0.95);
	border: 1.5px solid var(--jhq-cyan-border);
	border-radius: 20px;
	padding: 10px 24px;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--jhq-cyan-glow);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease, transform 0.3s ease;
	z-index: 40;
	max-width: 90%;
	text-align: center;
	box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}

.jhq-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 860px) {
	.jhq-body {
		grid-template-columns: 1fr;
	}

	.jhq-topbar {
		padding: 12px 16px;
	}

	.jhq-topbar-actions {
		gap: 8px;
	}

	.jhq-btn-walk {
		padding: 10px 20px;
	}

	.jhq-btn-sound,
	.jhq-btn-fullscreen {
		width: 34px;
		height: 34px;
	}

	.jhq-ladder {
		order: 2;
	}

	.jhq-ladder ul {
		display: grid;
		grid-template-columns: repeat(5, 1fr);
		gap: 4px;
	}

	.jhq-ladder-row {
		flex-direction: column;
		gap: 2px;
		text-align: center;
		padding: 4px;
		font-size: 0.72rem;
	}

	.jhq-ladder-left {
		justify-content: center;
	}
}

@media (min-width: 601px) and (max-width: 700px) {
	.jhq-topbar {
		padding: 10px 12px;
	}

	.jhq-lifelines {
		gap: 10px;
	}

	.jhq-lifeline {
		width: 50px;
		height: 50px;
	}

	.jhq-lifeline-icon {
		font-size: 1rem;
	}

	.jhq-svg-icon {
		width: 22px;
		height: 22px;
	}

	.jhq-clock {
		--clock-size: 92px;
	}

	.jhq-clock .count {
		font-size: 1.8rem;
	}

	.jhq-topbar-actions {
		gap: 6px;
	}

	.jhq-btn-walk {
		padding: 8px 16px;
		font-size: 0.8rem;
		letter-spacing: 0.05em;
	}

	.jhq-btn-sound,
	.jhq-btn-fullscreen {
		width: 32px;
		height: 32px;
		flex: 0 0 auto;
	}
}

@media (max-width: 600px) {
	.jhq-topbar {
		flex-wrap: wrap;
		gap: 12px;
		justify-content: center;
	}

	.jhq-body {
		padding: 12px 16px 22px;
	}

	.jhq-clock {
		--clock-size: 92px;
	}

	.jhq-clock .count {
		font-size: 1.8rem;
	}

	.jhq-lifelines-wrap,
	.jhq-topbar-actions {
		flex: 0 0 100%;
		justify-content: center;
	}

	.jhq-question-wrapper .jhq-connector-left,
	.jhq-question-wrapper .jhq-connector-right {
		display: none;
	}

	.jhq-question-box-wrap {
		flex: 0 0 100%;
	}

	.jhq-lozenge-content {
		padding: 14px 46px;
	}

	.jhq-option-content {
		padding: 9px 38px 9px 34px;
	}

	.jhq-options-row {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.jhq-option-wrapper {
		flex: 0 0 auto;
		width: 100%;
	}

	.jhq-connector-outer-left,
	.jhq-connector-outer-right,
	.jhq-connector-middle {
		display: none;
	}

	.jhq-btn-next {
		padding: 12px 28px;
		font-size: 0.9rem;
		letter-spacing: 0.08em;
	}

	.jhq-next-arrow {
		width: 23px;
		height: 23px;
	}

	.jhq-ladder ul {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Very narrow phones: two ladder columns keep the prize amounts legible
   without letting the grid's min-content widen the whole game container. */
@media (max-width: 380px) {
	.jhq-ladder ul {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.jhq-ladder-row {
		min-width: 0;
	}

	.jhq-poll-bars {
		gap: 12px;
	}
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
	.jhq-game *,
	.jhq-game *::before,
	.jhq-game *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
