/* ==========================================================================
   TopBet TR — girl landing (Figma Desktop 1920 / Tablet 820 / Mob 375)
   Form + scripts from tr-girl-banner-pinned. Art from assets/img.
   ========================================================================== */

:root {
	--tb-red: #d21502;
	--tb-red-dark: #a10f02;
	--tb-ink: #08070a;
	--tb-display: "Fira Sans Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
	--tb-body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--glass-line: rgba(255, 255, 255, 0.18);
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	height: 100%;
	overflow: hidden;
	overscroll-behavior: none;
}

body {
	background: var(--tb-ink);
	color: #fff;
	font-family: var(--tb-body);
	-webkit-font-smoothing: antialiased;
}

button {
	font: inherit;
}

img {
	max-width: 100%;
}

/* ==========================================================================
   Stage
   ========================================================================== */

.page {
	position: relative;
	width: 100%;
	height: 100dvh;
	overflow: hidden;
	isolation: isolate;
}

.page__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: #000 url("../assets/img/bg.webp") center / cover no-repeat;
	pointer-events: none;
}

.page__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(80% 80% at 70% 50%, transparent 30%, rgba(0, 0, 0, 0.35));
}

.coin {
	position: absolute;
	z-index: 4;
	pointer-events: none;
	mix-blend-mode: screen;
	object-fit: contain;
	will-change: transform;
	animation: coin-float 5.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.coin--a {
	left: 40%;
	top: 64%;
	width: min(247px, 13vw);
	animation-duration: 5.2s;
}

.coin--b {
	left: 3%;
	bottom: 2%;
	width: min(232px, 12vw);
	animation-duration: 6.6s;
	animation-delay: -2.4s;
}

@keyframes coin-float {
	0%,
	100% {
		transform: translate3d(0, 0, 0);
	}

	50% {
		transform: translate3d(0, -32px, 0);
	}
}

/* ==========================================================================
   Desktop — Figma 1920×1080
   ========================================================================== */

.hero {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
}

.hero__copy {
	position: absolute;
	left: 7.3%;
	top: 13%;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: min(25px, 2.4vh);
	max-width: 42vw;
}

.headline {
	margin: 0;
	font-family: var(--tb-display);
	font-weight: 800;
	font-size: min(8.65vw, 15.4vh, 166px);
	line-height: 0.88;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	color: #fff;
	text-align: left;
}

.headline__line {
	display: block;
	white-space: nowrap;
}

.headline__line--sub {
	font-size: 0.88em;
}

.headline__accent {
	font-style: normal;
	color: var(--tb-red);
}

.tiers {
	display: flex;
	flex-direction: column;
	gap: min(25px, 2.3vh);
	margin: min(25px, 2.3vh) 0 0;
	padding: 0;
	list-style: none;
}

.tier {
	display: flex;
	align-items: center;
	gap: min(18px, 1vw);
}

.tier__icon {
	width: min(52px, 2.7vw);
	height: min(52px, 2.7vw);
	flex: none;
	object-fit: contain;
	mix-blend-mode: screen;
}

.tier__dep,
.tier__win {
	font-family: var(--tb-display);
	font-weight: 700;
	font-size: min(2.4vw, 4.3vh, 46px);
	line-height: 1;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	white-space: nowrap;
}

.tier__dep {
	color: var(--tb-red);
}

.tier__win {
	color: #fff;
}

.tier__arrow {
	width: min(46px, 2.4vw);
	height: auto;
	flex: none;
}

.badge {
	position: absolute;
	left: 21.6%;
	top: 69.4%;
	z-index: 5;
	width: min(210px, 19.4vh, 11vw);
	aspect-ratio: 1;
	pointer-events: none;
	container-type: inline-size;
}

.badge__seal {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transform-origin: center;
	will-change: transform;
	animation: badge-spin 16s linear infinite;
}

@keyframes badge-spin {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}

.badge__copy {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2%;
	color: var(--tb-red);
	font-family: var(--tb-display);
	font-weight: 800;
	text-transform: uppercase;
	line-height: 0.9;
	letter-spacing: -0.01em;
	text-align: center;
}

.badge__pct {
	font-size: 36cqw;
}

.badge__label {
	font-size: 17cqw;
}

.hero__art {
	position: absolute;
	right: 0;
	top: 0;
	z-index: 1;
	width: 39.5%;
	height: 100%;
	overflow: visible;
	container-type: inline-size;
	container-name: art;
}

.hero__girl {
	position: absolute;
	right: 0;
	bottom: 0;
	top: auto;
	height: 100%;
	width: auto;
	max-width: none;
	max-height: 100%;
	object-fit: contain;
	object-position: bottom right;
	pointer-events: none;
}

/* ==========================================================================
   Registration form — same glass UI as banner-pinned, placed on the girl
   ========================================================================== */

.reg {
	--fs: max(11px, 3.35cqw);
	--h: calc(2.5 * var(--fs));
	--gap: calc(0.55 * var(--fs));
	--radius: calc(0.6 * var(--fs));

	position: absolute;
	z-index: 6;
	left: 2%;
	bottom: 11%;
	width: 84cqw;
	font-size: var(--fs);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
}

.reg.is-ready {
	opacity: 1;
	pointer-events: auto;
}

.reg .form__block,
.reg .form__shell {
	width: 100%;
}

.reg .form__wrap {
	display: flex;
	flex-direction: column;
	gap: var(--gap);
	width: 100%;
	padding: calc(0.7 * var(--fs));
	border: 1px solid var(--glass-line);
	border-radius: calc(1.1 * var(--fs));
	background: rgba(12, 9, 11, 0.5);
	-webkit-backdrop-filter: blur(calc(1.1 * var(--fs))) saturate(150%);
	backdrop-filter: blur(calc(1.1 * var(--fs))) saturate(150%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.14),
		0 calc(0.8 * var(--fs)) calc(2 * var(--fs)) rgba(0, 0, 0, 0.5);
}

.reg .form__title,
.reg .form__confirm,
.reg .register-drop-currency,
.reg .container-inputs,
.reg .phone-hint,
.reg #send-sms,
.reg .phone-check,
.language-select {
	display: none !important;
}

.reg .form__tabs {
	display: flex;
	gap: calc(0.3 * var(--fs));
	width: 100%;
	padding: calc(0.2 * var(--fs));
	border-radius: calc(0.75 * var(--fs));
	background: rgba(255, 255, 255, 0.09);
}

.reg .form__tabs>span[data-tabs] {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	height: calc(1.85 * var(--fs));
	border-radius: calc(0.55 * var(--fs));
	color: rgba(255, 255, 255, 0.62);
	cursor: pointer;
	user-select: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.reg .form__tabs>span[data-tabs].active {
	background: linear-gradient(180deg, #ff2a30, var(--tb-red-dark));
	color: #fff;
	box-shadow: 0 calc(0.25 * var(--fs)) calc(0.8 * var(--fs)) rgba(210, 21, 2, 0.4);
}

.reg .tab__label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: calc(0.32 * var(--fs));
	font-family: var(--tb-display);
	font-size: calc(0.82 * var(--fs));
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.reg .tab__icon {
	width: calc(0.85 * var(--fs));
	height: calc(0.85 * var(--fs));
	object-fit: contain;
	filter: brightness(0) invert(1);
	opacity: 0.85;
}

.reg .form__register,
.reg .send-sms-wrap {
	display: flex;
	flex-direction: column;
	gap: var(--gap);
	width: 100%;
}

.reg .form__register:not(.isEmail-form) .email-input-wrap,
.reg .isEmail-form .send-sms-wrap {
	display: none;
}

.reg .input-wrap,
.reg .email-input-wrap,
.reg .phone-input-error-wrap,
.reg .phone-field {
	position: relative;
	width: 100%;
}

.reg .input {
	width: 100%;
	height: var(--h);
	padding: 0 calc(0.7 * var(--fs));
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: var(--radius);
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-family: var(--tb-body);
	font-size: calc(0.86 * var(--fs));
	font-weight: 500;
	line-height: 1.2;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.reg .input:focus {
	outline: none;
	border-color: var(--tb-red);
	background: rgba(255, 255, 255, 0.15);
}

.reg .input::placeholder {
	color: rgba(255, 255, 255, 0.5);
	text-transform: none;
}

.reg .email-input-wrap .input {
	padding-right: calc(2.2 * var(--fs));
}

.reg .email-input-wrap .input-icon {
	position: absolute;
	right: calc(0.6 * var(--fs));
	top: 50%;
	transform: translateY(-50%);
	width: var(--fs);
	height: var(--fs);
	object-fit: contain;
	pointer-events: none;
	opacity: 0.75;
	filter: brightness(0) invert(1);
}

.reg .phone__input-wrap {
	display: flex;
	gap: calc(0.4 * var(--fs));
	align-items: stretch;
	width: 100%;
}

.reg .register-country {
	display: flex;
	align-items: center;
	gap: calc(0.4 * var(--fs));
	flex: none;
	height: var(--h);
	padding: 0 calc(0.6 * var(--fs));
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: var(--radius);
	background: rgba(255, 255, 255, 0.1);
}

.reg .country-flag {
	width: calc(1.25 * var(--fs));
	height: calc(1.25 * var(--fs));
	object-fit: cover;
	border-radius: calc(0.15 * var(--fs));
	flex: none;
}

.reg .country-flag.is-placeholder {
	object-fit: contain;
	border-radius: 50%;
	background: transparent;
}

.reg .country__code {
	font-family: var(--tb-body);
	font-size: calc(0.86 * var(--fs));
	font-weight: 500;
	color: rgba(255, 255, 255, 0.85);
	white-space: nowrap;
}

.reg .phone-input-error-wrap {
	flex: 1 1 auto;
	min-width: 0;
}

.reg .phone-field {
	display: flex;
	align-items: center;
	height: var(--h);
}

.reg .phone-field .phone__input {
	height: 100%;
}

.reg .error-email-message,
.reg .error-phone-message,
.reg .error-code-message {
	position: absolute;
	z-index: 10;
	top: 0;
	left: calc(0.2 * var(--fs));
	transform: translateY(-105%);
	font-family: var(--tb-body);
	font-size: calc(0.62 * var(--fs));
	line-height: 1.2;
	color: #ff8080;
	opacity: 0;
	pointer-events: none;
}

.reg .error-phone-message {
	max-width: calc(100% - 0.4 * var(--fs));
}

.reg .user-is-exist,
.reg .invalid-number,
.reg .sms-error {
	display: none;
	align-items: center;
	justify-content: center;
	margin: 0;
	color: #ff8080;
	font-family: var(--tb-body);
	font-size: calc(0.68 * var(--fs));
	line-height: 1.3;
	text-align: center;
	text-transform: uppercase;
}

.reg .sms-error.isError,
.reg .user-is-exist.isError {
	display: flex;
}

.reg .form__footer-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: calc(0.45 * var(--fs));
	width: 100%;
}

.reg .form__button-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: calc(2.6 * var(--fs));
	padding: 0 var(--fs);
	border: 0;
	border-radius: 999px;
	background: linear-gradient(180deg, #ff2a30, var(--tb-red-dark));
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.4),
		0 calc(0.4 * var(--fs)) calc(1.2 * var(--fs)) rgba(210, 21, 2, 0.42);
	color: #fff;
	font-family: var(--tb-display);
	font-size: calc(1.15 * var(--fs));
	font-weight: 800;
	font-style: italic;
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.12s ease;
}

.reg .form__button-submit:hover {
	filter: brightness(1.08);
}

.reg .form__button-submit:active {
	transform: translateY(1px);
}

.reg .form__button-submit[disabled] {
	opacity: 0.65;
	cursor: not-allowed;
}

.reg .btn-label-confirm {
	display: none;
}

.reg .form__footer {
	margin: 0;
	text-align: center;
	font-family: var(--tb-body);
	font-size: calc(0.66 * var(--fs));
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.62);
}

.reg .form__footer a {
	color: #fff;
	font-weight: 600;
	text-decoration: underline;
}

.reg .otp-wrap {
	display: none;
	flex-direction: column;
	align-items: center;
	gap: calc(0.5 * var(--fs));
	width: 100%;
}

.reg .otp-title {
	display: none;
	margin: 0;
	text-align: center;
	text-transform: uppercase;
	font-family: var(--tb-display);
	font-weight: 700;
	font-size: calc(0.95 * var(--fs));
	line-height: 1.15;
	color: #fff;
}

.reg .otp-hint {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: calc(0.2 * var(--fs)) calc(0.4 * var(--fs));
	margin: 0;
	text-align: center;
	font-family: var(--tb-body);
	font-size: calc(0.66 * var(--fs));
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.62);
}

.reg .otp-hint__phone {
	color: #fff;
	font-weight: 600;
}

.reg .otp-edit {
	padding: 0;
	border: 0;
	background: none;
	color: var(--tb-red);
	font-size: calc(0.66 * var(--fs));
	text-decoration: underline;
	cursor: pointer;
}

.reg .otp-wrap .input-wrapper {
	display: flex;
	justify-content: center;
	gap: calc(0.4 * var(--fs));
	width: 100%;
}

.reg .code-input {
	flex: 0 1 calc(2.3 * var(--fs));
	width: calc(2.3 * var(--fs));
	height: var(--h);
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: var(--radius);
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	text-align: center;
	font-family: var(--tb-body);
	font-size: var(--fs);
	font-weight: 600;
	caret-color: var(--tb-red);
}

.reg .code-input::placeholder {
	color: rgba(255, 255, 255, 0.35);
}

.reg .code-input:focus {
	outline: none;
	border-color: var(--tb-red);
}

.reg .code-input.error-state {
	border-color: var(--tb-red);
	color: #ff8080;
}

.reg .otp-wrap .error-code-message {
	position: static;
	transform: none;
	opacity: 1;
	text-align: center;
	text-transform: uppercase;
	font-size: calc(0.66 * var(--fs));
}

.reg .otp-wrap .error-code-message:empty {
	display: none;
}

.reg .otp-timer-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: calc(0.15 * var(--fs)) calc(0.7 * var(--fs));
	width: 100%;
}

.reg .resend-timer {
	display: flex;
	align-items: center;
	gap: calc(0.2 * var(--fs));
	margin: 0;
	font-family: var(--tb-body);
	font-size: calc(0.6 * var(--fs));
	color: rgba(255, 255, 255, 0.5);
}

.reg .resend-timer__icon {
	width: calc(0.72 * var(--fs));
	height: calc(0.72 * var(--fs));
}

.reg .resend-button {
	padding: 0;
	border: 0;
	background: none;
	color: var(--tb-red);
	font-size: calc(0.6 * var(--fs));
	text-transform: uppercase;
	text-decoration: underline;
	cursor: pointer;
}

.reg .resend-button:disabled {
	opacity: 0.4;
	cursor: default;
	text-decoration: none;
}

.reg:has(#otp-wrap[style*="flex"]) {
	bottom: 4%;
}

.reg:has(#otp-wrap[style*="flex"]) .form__tabs,
.reg:has(#otp-wrap[style*="flex"]) .form__footer {
	display: none;
}

.reg:has(#otp-wrap[style*="flex"]) .otp-title {
	display: block;
}

.reg:has(#otp-wrap[style*="flex"]) .btn-label-register {
	display: none;
}

.reg:has(#otp-wrap[style*="flex"]) .btn-label-confirm {
	display: inline;
}

/* ==========================================================================
   Tablet — Figma 820×1180
   ========================================================================== */

@media (max-width: 1100px) and (orientation: portrait) {
	.hero__copy {
		left: 50%;
		top: 3.4%;
		transform: translateX(-50%);
		align-items: center;
		max-width: 92%;
		text-align: center;
		gap: 10px;
	}

	.headline {
		font-size: min(13.5vw, 9.4vh, 111px);
		text-align: center;
	}

	.tiers {
		gap: 16px;
		margin-top: 14px;
	}

	.tier__icon {
		width: min(35px, 4.2vw);
		height: min(35px, 4.2vw);
	}

	.tier__dep,
	.tier__win {
		font-size: min(4.5vw, 3.2vh, 37px);
	}

	.tier__arrow {
		width: min(30px, 3.7vw);
	}

	.badge {
		left: 50%;
		top: 36.6%;
		transform: translateX(-50%);
		width: min(159px, 13.5vh, 19.4vw);
	}

	.hero__art {
		left: 0;
		right: 0;
		top: 36%;
		width: 100%;
		height: 64%;
	}

	.hero__girl {
		right: 50%;
		left: auto;
		transform: translateX(50%);
		top: 0;
		bottom: auto;
		height: 100%;
		object-position: bottom center;
	}

	.reg {
		--fs: clamp(11px, 3.6cqw, 18px);
		left: 50%;
		bottom: 3%;
		transform: translateX(-50%);
		width: min(63vw, 520px);
	}

	.coin--a {
		left: auto;
		right: 4%;
		top: 42%;
		width: min(180px, 22vw);
	}

	.coin--b {
		left: 2%;
		bottom: 18%;
		width: min(160px, 20vw);
	}
}

/* ==========================================================================
   Mobile — Figma 375×767
   ========================================================================== */

@media (max-width: 520px) {
	.hero__copy {
		top: 3.9%;
		gap: 6px;
	}

	.headline {
		font-size: min(18.5vw, 9.1vh, 70px);
	}

	.tiers {
		gap: 10px;
		margin-top: 8px;
	}

	.tier {
		gap: 6px;
	}

	.tier__icon {
		width: 22px;
		height: 22px;
	}

	.tier__dep,
	.tier__win {
		font-size: min(4.9vw, 2.6vh, 20px);
	}

	.tier__arrow {
		width: 16px;
	}

	.badge {
		top: 36%;
		width: min(100px, 13vh, 27vw);
	}

	.hero__art {
		top: 42%;
		height: 58%;
	}

	.reg {
		--fs: clamp(10px, 3.8cqw, 14px);
		bottom: 2%;
		width: 90vw;
	}

	.coin--a {
		right: -6%;
		top: 48%;
		width: 28vw;
	}

	.coin--b {
		left: -8%;
		bottom: 14%;
		width: 26vw;
	}
}

/* ==========================================================================
   Result modals
   ========================================================================== */

.modal__wrap,
.success-modal__wrap,
.disabled-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 10050;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(4, 3, 5, 0.8);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.modal__wrap.active,
.success-modal__wrap.active,
.disabled-modal.active {
	display: flex;
}

.modal,
.success-modal,
.disabled-modal .modal-content {
	width: 100%;
	max-width: 360px;
	max-height: 92dvh;
	overflow-y: auto;
	padding: 26px 20px;
	border: 1px solid var(--glass-line);
	border-radius: 18px;
	background: rgba(20, 14, 16, 0.94);
	text-align: center;
	color: #fff;
}

.modal__text {
	margin: 0;
	font-family: var(--tb-display);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
}

.success-modal {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.success-modal__logo {
	width: 110px;
	height: auto;
}

.success-modal__title {
	margin: 0;
	font-family: var(--tb-display);
	font-size: 22px;
	font-weight: 800;
	text-transform: uppercase;
}

.success-modal__ok,
.success-modal__desc,
.success-modal__note,
.success-modal__label {
	margin: 0;
	font-family: var(--tb-body);
	font-size: 12px;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.65);
}

.success-modal__ok {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.success-modal__creds {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

.success-modal__cred {
	display: flex;
	flex-direction: column;
	gap: 5px;
	text-align: left;
}

.success-modal__label {
	text-transform: uppercase;
	font-size: 11px;
}

.success-modal__field {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	height: 44px;
	padding: 0 12px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.08);
}

.success-modal__value {
	font-family: var(--tb-body);
	font-size: 14px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.success-modal__copy {
	display: inline-flex;
	flex: none;
	width: 20px;
	height: 20px;
	padding: 0;
	border: 0;
	background: none;
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
}

.success-modal__copy-check {
	display: none;
}

.success-modal__copy.is-copied .success-modal__copy-icon {
	display: none;
}

.success-modal__copy.is-copied .success-modal__copy-check {
	display: block;
}

.success-modal__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 48px;
	border-radius: 999px;
	background: linear-gradient(180deg, #ff2a30, var(--tb-red-dark));
	color: #fff;
	font-family: var(--tb-display);
	font-size: 18px;
	font-weight: 800;
	font-style: italic;
	text-transform: uppercase;
	text-decoration: none;
}

.disabled-modal .socials {
	display: flex;
	justify-content: center;
	gap: 16px;
	margin-top: 16px;
}

.disabled-modal .social-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.disabled-modal a {
	color: var(--tb-red);
}

.grecaptcha-badge {
	visibility: hidden !important;
}
