:root {
	--color-primary-variation-1: #bb26ef;
}

.lds-ring {
	display: block;
	position: relative;
	width: 80px;
	height: 80px;
}

.lds-ring div {
	box-sizing: border-box;
	display: block;
	position: absolute;
	width: 64px;
	height: 64px;
	margin: 8px;
	border: 8px solid var(--color-primary-variation-1);
	border-radius: 50%;
	animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
	border-color: var(--color-primary-variation-1) transparent transparent
		transparent;
}

.lds-ring div:nth-child(1) {
	animation-delay: -0.45s;
}

.lds-ring div:nth-child(2) {
	animation-delay: -0.3s;
}

.lds-ring div:nth-child(3) {
	animation-delay: -0.15s;
}

@keyframes lds-ring {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

body.mainbot-redirect {
	margin: 0;
	min-height: 100vh;
	font-family:
		'SF Pro Display', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
	background:
		radial-gradient(
			circle at top,
			rgba(146, 56, 251, 0.22),
			transparent 34%
		),
		radial-gradient(
			circle at 85% 18%,
			rgba(83, 192, 252, 0.24),
			transparent 28%
		),
		linear-gradient(180deg, #091120 0%, #0d1730 54%, #07101f 100%);
	color: #f4f7ff;
	overflow: hidden;
}

body.mainbot-redirect * {
	box-sizing: border-box;
}

.mainbot-redirect__page {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 24px;
	isolation: isolate;
}

.mainbot-redirect__backdrop {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.mainbot-redirect__orb,
.mainbot-redirect__grid {
	position: absolute;
}

.mainbot-redirect__orb {
	border-radius: 999px;
	filter: blur(12px);
	opacity: 0.9;
	animation: mainbot-orb-float 12s ease-in-out infinite;
}

.mainbot-redirect__orb--primary {
	top: 8%;
	left: -4%;
	width: 280px;
	height: 280px;
	background: radial-gradient(
		circle,
		rgba(146, 56, 251, 0.42),
		rgba(146, 56, 251, 0)
	);
}

.mainbot-redirect__orb--secondary {
	right: -6%;
	bottom: 6%;
	width: 320px;
	height: 320px;
	background: radial-gradient(
		circle,
		rgba(83, 192, 252, 0.34),
		rgba(83, 192, 252, 0)
	);
	animation-delay: -4s;
}

.mainbot-redirect__grid {
	inset: 0;
	background:
		linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
	background-size: 34px 34px;
	mask-image: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.18),
		rgba(0, 0, 0, 0.7)
	);
	opacity: 0.28;
}

.mainbot-redirect__panel {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: min(100%, 560px);
	padding: 40px 28px 32px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 28px;
	background: linear-gradient(
		180deg,
		rgba(20, 30, 58, 0.9) 0%,
		rgba(10, 18, 38, 0.92) 100%
	);
	box-shadow:
		0 28px 80px rgba(3, 8, 18, 0.5),
		inset 0 1px 0 rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(18px);
	text-align: center;
	animation: mainbot-panel-enter 650ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.mainbot-redirect__page--fallback .mainbot-redirect__panel {
	border-color: rgba(83, 192, 252, 0.3);
	box-shadow:
		0 28px 80px rgba(3, 8, 18, 0.5),
		0 0 0 1px rgba(83, 192, 252, 0.08),
		inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mainbot-redirect__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: min(100%, 320px);
	margin-bottom: 20px;
	padding: 10px 8px;
}

.mainbot-redirect__logo-svg {
	width: 100%;
	height: auto;
	overflow: visible;
	filter: drop-shadow(0 14px 34px rgba(15, 30, 66, 0.45));
	transform-origin: center center;
	animation: mainbot-logo-breathe 2600ms ease-in-out infinite;
}

.mainbot-redirect__eyebrow {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(191, 210, 255, 0.72);
}

.mainbot-redirect__title {
	margin: 0 0 14px;
	font-size: clamp(28px, 5vw, 42px);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.03em;
	max-width: 12ch;
}

.mainbot-redirect__status,
.mainbot-redirect__description {
	max-width: 390px;
	margin: 0;
}

.mainbot-redirect__status {
	font-size: 17px;
	line-height: 1.55;
	color: rgba(244, 247, 255, 0.94);
}

.mainbot-redirect__status[data-state='error'] {
	color: #ffd9da;
}

.mainbot-redirect__description {
	margin-top: 10px;
	font-size: 15px;
	line-height: 1.6;
	color: rgba(191, 210, 255, 0.76);
}

.mainbot-redirect__loader {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 28px;
	min-height: 16px;
}

.mainbot-redirect__loader[hidden],
.mainbot-redirect__actions[hidden] {
	display: none;
}

.mainbot-redirect__loader span {
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: linear-gradient(180deg, #ffffff 0%, #7ccfff 100%);
	box-shadow: 0 0 18px rgba(124, 207, 255, 0.55);
	animation: mainbot-loader-pulse 1.15s ease-in-out infinite;
}

.mainbot-redirect__loader span:nth-child(2) {
	animation-delay: 0.16s;
}

.mainbot-redirect__loader span:nth-child(3) {
	animation-delay: 0.32s;
}

.mainbot-redirect__actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-top: 26px;
	width: 100%;
}

.mainbot-redirect__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: min(100%, 320px);
	min-height: 52px;
	padding: 14px 22px;
	border-radius: 999px;
	background: linear-gradient(135deg, #53c0fc 0%, #8d7dff 100%);
	color: #06101f;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-decoration: none;
	box-shadow:
		0 16px 34px rgba(83, 192, 252, 0.26),
		inset 0 1px 0 rgba(255, 255, 255, 0.28);
	transition:
		transform 180ms ease,
		box-shadow 180ms ease,
		filter 180ms ease;
}

.mainbot-redirect__button--secondary {
	border: 1px solid rgba(191, 210, 255, 0.28);
	background: rgba(255, 255, 255, 0.06);
	color: rgba(244, 247, 255, 0.92);
	box-shadow: none;
}

.mainbot-redirect__button:hover {
	transform: translateY(-1px);
	box-shadow:
		0 20px 38px rgba(83, 192, 252, 0.32),
		inset 0 1px 0 rgba(255, 255, 255, 0.28);
	filter: saturate(1.05);
}

.mainbot-redirect__button--secondary:hover {
	box-shadow: none;
	background: rgba(255, 255, 255, 0.1);
}

.mainbot-redirect__button:active {
	transform: translateY(0);
}

@keyframes mainbot-panel-enter {
	0% {
		opacity: 0;
		transform: scale(0.94) translateY(18px);
	}
	65% {
		opacity: 1;
		transform: scale(1.02) translateY(0);
	}
	100% {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

@keyframes mainbot-logo-breathe {
	0%,
	100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.035);
	}
}

@keyframes mainbot-loader-pulse {
	0%,
	100% {
		transform: translateY(0) scale(0.82);
		opacity: 0.45;
	}
	50% {
		transform: translateY(-4px) scale(1);
		opacity: 1;
	}
}

@keyframes mainbot-orb-float {
	0%,
	100% {
		transform: translate3d(0, 0, 0);
	}
	50% {
		transform: translate3d(12px, -18px, 0);
	}
}

@media (max-width: 640px) {
	.mainbot-redirect__page {
		padding: 16px;
	}

	.mainbot-redirect__panel {
		padding: 28px 20px 24px;
		border-radius: 24px;
	}

	.mainbot-redirect__logo {
		width: min(100%, 260px);
		margin-bottom: 18px;
	}

	.mainbot-redirect__status {
		font-size: 16px;
	}

	.mainbot-redirect__description {
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mainbot-redirect__panel,
	.mainbot-redirect__orb,
	.mainbot-redirect__logo-svg,
	.mainbot-redirect__loader span,
	.mainbot-redirect__button {
		animation: none !important;
		transition: none !important;
	}
}
