/* --- Hare hunt captcha (x-toptiger.hare-captcha) ------------------------ */
/* The stage keeps 16:9 (config hare_captcha.aspect); sizes inside follow its width through cqw. */
.tt-hare-hunt { width: 100%; max-width: 720px; }

.tt-hare-hunt-stage {
	position: relative;
	container-type: inline-size;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 16px;
	background: #8fd3ff;
	color: #15171a;
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cg fill='none' stroke='%23fff' stroke-width='4'%3E%3Ccircle cx='18' cy='18' r='11'/%3E%3Cpath d='M18 2v10M18 24v10M2 18h10M24 18h10'/%3E%3C/g%3E%3Cg fill='none' stroke='%23d92d20' stroke-width='2'%3E%3Ccircle cx='18' cy='18' r='11'/%3E%3Cpath d='M18 2v10M18 24v10M2 18h10M24 18h10'/%3E%3C/g%3E%3C/svg%3E") 18 18, crosshair;
	user-select: none;
	-webkit-user-select: none;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.tt-hare-hunt-stage:focus-visible { outline: 3px solid #ff5a36; outline-offset: 2px; }
.tt-hare-hunt-stage.is-shot { animation: tt-hare-kick 0.12s ease-out; }

.tt-hare-hunt-bg,
.tt-hare-hunt-field { position: absolute; inset: 0; width: 100%; height: 100%; }

.tt-hare-hunt-fg { position: absolute; left: 0; bottom: 0; width: 100%; height: 9%; pointer-events: none; }
.tt-hare-hunt-field { pointer-events: none; }

.tt-hare-hunt-hare { position: absolute; left: 0; top: 0; will-change: transform; }
.tt-hare-hunt-hare img { display: block; width: 100%; height: auto; aspect-ratio: 1; pointer-events: none; }
.tt-hare-hunt-hare.is-left img { transform: scaleX(-1); }
.tt-hare-hunt-hare.is-hit img { animation: tt-hare-fall 0.6s ease-in forwards; }
.tt-hare-hunt-hare.is-left.is-hit img { animation-name: tt-hare-fall-left; }

.tt-hare-hunt-puff,
.tt-hare-hunt-plus { position: absolute; pointer-events: none; transform: translate(-50%, -50%); }

.tt-hare-hunt-puff {
	width: 4cqw;
	height: 4cqw;
	border-radius: 50%;
	background: radial-gradient(circle, #fff 0, rgba(255, 255, 255, 0.7) 40%, rgba(255, 255, 255, 0) 70%);
	animation: tt-hare-puff 0.35s ease-out forwards;
}

.tt-hare-hunt-plus {
	font-size: 5cqw;
	font-weight: 800;
	line-height: 1;
	color: #fff;
	text-shadow: 0 2px 0 #d92d20, 0 0 8px rgba(0, 0, 0, 0.35);
	animation: tt-hare-plus 0.8s ease-out forwards;
}

.tt-hare-hunt-aim {
	position: absolute;
	width: 36px;
	height: 36px;
	margin: -18px 0 0 -18px;
	border: 3px solid #d92d20;
	border-radius: 50%;
	box-shadow: 0 0 0 2px #fff;
	pointer-events: none;
}

.tt-hare-hunt-hud,
.tt-hare-hunt-ammo {
	position: absolute;
	left: 2cqw;
	right: 2cqw;
	display: flex;
	align-items: center;
	gap: 2cqw;
	pointer-events: none;
}

.tt-hare-hunt-hud { top: 2cqw; }
.tt-hare-hunt-ammo { bottom: 2cqw; justify-content: space-between; }
.tt-hare-hunt-hud[hidden],
.tt-hare-hunt-ammo[hidden],
.tt-hare-hunt-overlay[hidden] { display: none; }

.tt-hare-hunt-score {
	margin: 0;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.9);
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}

.tt-hare-hunt-time { flex: 1; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.6); overflow: hidden; }
.tt-hare-hunt-time i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #ff5a36, #ff8a3d); transform-origin: left center; }

.tt-hare-hunt-sound,
.tt-hare-hunt-reload {
	pointer-events: auto;
	border: 0;
	background: rgba(255, 255, 255, 0.9);
	color: #15171a;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.tt-hare-hunt-sound { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; }
.tt-hare-hunt-sound[aria-pressed="true"] .tt-hare-hunt-sound-off,
.tt-hare-hunt-sound[aria-pressed="false"] .tt-hare-hunt-sound-on { display: none; }
.tt-hare-hunt-reload { min-height: 32px; padding: 0 12px; border-radius: 999px; }
.tt-hare-hunt-ammo.is-empty .tt-hare-hunt-reload { background: #ff5a36; color: #fff; animation: tt-hare-blink 0.7s ease-in-out infinite; }

.tt-hare-hunt-shells { display: flex; gap: 4px; align-items: flex-end; }
.tt-hare-hunt-shells i {
	display: block;
	width: 10px;
	height: 26px;
	border-radius: 3px 3px 2px 2px;
	background: linear-gradient(180deg, #d92d20 0 68%, #e3b341 68% 100%);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
	transition: opacity 0.15s, transform 0.15s;
}
.tt-hare-hunt-shells i.is-spent { opacity: 0.25; transform: translateY(6px); }
.tt-hare-hunt-ammo.is-reloading .tt-hare-hunt-shells { animation: tt-hare-blink 0.3s linear infinite; }

.tt-hare-hunt-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px;
	background: rgba(15, 23, 42, 0.55);
	color: #fff;
	text-align: center;
	cursor: default;
}

.tt-hare-hunt .tt-hare-hunt-title { margin: 0; color: #fff; font-size: clamp(16px, 4.2cqw, 26px); font-weight: 800; line-height: 1.2; }
.tt-hare-hunt .tt-hare-hunt-text { margin: 0; color: #fff; max-width: 34em; font-size: clamp(12px, 2.6cqw, 15px); line-height: 1.4; }
.tt-hare-hunt-text:empty { display: none; }

.tt-hare-hunt-btn {
	min-height: 44px;
	padding: 0 24px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(90deg, #ff5a36, #ff8a3d);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}
.tt-hare-hunt-btn:disabled { opacity: 0.6; cursor: progress; }
.tt-hare-hunt-btn[hidden] { display: none; }

@keyframes tt-hare-kick {
	0% { transform: translateY(0); }
	40% { transform: translateY(-1.2%); }
	100% { transform: translateY(0); }
}
@keyframes tt-hare-fall {
	to { transform: translateY(120%) rotate(200deg); opacity: 0; }
}
@keyframes tt-hare-fall-left {
	from { transform: scaleX(-1); }
	to { transform: translateY(120%) scaleX(-1) rotate(200deg); opacity: 0; }
}
@keyframes tt-hare-puff {
	from { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
	to { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}
@keyframes tt-hare-plus {
	from { transform: translate(-50%, -50%); opacity: 1; }
	to { transform: translate(-50%, -260%); opacity: 0; }
}
@keyframes tt-hare-blink {
	50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
	.tt-hare-hunt-stage.is-shot,
	.tt-hare-hunt-ammo.is-empty .tt-hare-hunt-reload,
	.tt-hare-hunt-ammo.is-reloading .tt-hare-hunt-shells { animation: none; }
}
