@font-face {
	font-family: "Comfortaa";
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url("fonts/comfortaa.woff2") format("woff2");
}

:root {
	--violet: #8b5cf6;
	--violet-soft: #a78bfa;
	--violet-deep: #6d28d9;
	--cornflower: #6495ed;
	--cornflower-soft: #8fb4f5;
	--text: #eceaf6;
	--muted: #9a92c4;
	--surface: rgba(255, 255, 255, 0.045);
	--surface-2: rgba(255, 255, 255, 0.07);
	--border: rgba(139, 109, 230, 0.28);
	--border-focus: rgba(100, 149, 237, 0.75);
	--danger: #ff8095;
	--font: "Comfortaa", "Segoe UI", system-ui, -apple-system, "Helvetica Neue",
		Arial, sans-serif;
	--mono: ui-monospace, "Cascadia Code", "SF Mono", "Courier New", monospace;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
}

body {
	font-family: var(--font);
	color: var(--text);
	background:
		radial-gradient(
			1100px 620px at 12% -12%,
			rgba(100, 149, 237, 0.22),
			transparent 60%
		),
		radial-gradient(
			1000px 720px at 92% 112%,
			rgba(124, 58, 237, 0.28),
			transparent 62%
		),
		linear-gradient(158deg, #140d2c 0%, #180f31 44%, #0b0817 100%);
	background-attachment: fixed;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

/* Soft drifting aurora behind the content */
.aurora {
	position: fixed;
	inset: -20vmax;
	z-index: -1;
	background:
		radial-gradient(
			38vmax 38vmax at 20% 30%,
			rgba(139, 92, 246, 0.16),
			transparent 60%
		),
		radial-gradient(
			34vmax 34vmax at 80% 70%,
			rgba(100, 149, 237, 0.16),
			transparent 60%
		);
	filter: blur(10px);
	animation: drift 26s ease-in-out infinite alternate;
	pointer-events: none;
}

@keyframes drift {
	0% {
		transform: translate3d(-3%, -2%, 0) scale(1);
	}
	100% {
		transform: translate3d(3%, 2%, 0) scale(1.08);
	}
}

.hero {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 48px 20px;
	gap: 4px;
}

.mark {
	filter: drop-shadow(0 14px 34px rgba(100, 149, 237, 0.4))
		drop-shadow(0 6px 18px rgba(124, 58, 237, 0.45));
	animation: float 6s ease-in-out infinite;
}

@keyframes float {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-7px);
	}
}

.wordmark {
	margin: 18px 0 0;
	font-size: clamp(38px, 8vw, 62px);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1;
	background: linear-gradient(
		120deg,
		var(--violet-soft) 0%,
		#c4b5fd 30%,
		var(--cornflower-soft) 100%
	);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.tagline {
	margin: 14px 0 0;
	max-width: 30ch;
	color: var(--muted);
	font-size: clamp(14px, 2.4vw, 16px);
	line-height: 1.55;
}

/* Search bar */
.search {
	margin-top: 34px;
	display: flex;
	align-items: center;
	gap: 12px;
	width: min(560px, 92vw);
	height: 62px;
	padding: 0 18px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.04) inset,
		0 20px 50px -28px rgba(100, 149, 237, 0.5);
	transition:
		border-color 0.2s ease,
		box-shadow 0.25s ease,
		background 0.2s ease,
		transform 0.2s ease;
}

.search:focus-within {
	background: var(--surface-2);
	border-color: var(--border-focus);
	transform: translateY(-1px);
	box-shadow:
		0 0 0 4px rgba(100, 149, 237, 0.16),
		0 24px 60px -26px rgba(124, 58, 237, 0.6);
}

.search-icon {
	color: var(--muted);
	flex: 0 0 auto;
	transition: color 0.2s ease;
}

.search:focus-within .search-icon {
	color: var(--cornflower-soft);
}

#sj-address {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	background: none;
	border: none;
	outline: none;
	color: var(--text);
	font-family: inherit;
	font-size: 16px;
	letter-spacing: 0.01em;
}

#sj-address::placeholder {
	color: rgba(154, 146, 196, 0.7);
}

.enter-hint {
	flex: 0 0 auto;
	font-family: var(--mono);
	font-size: 13px;
	color: var(--muted);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 7px;
	padding: 3px 8px;
	opacity: 0;
	transform: scale(0.9);
	transition:
		opacity 0.2s ease,
		transform 0.2s ease;
}

.search:focus-within .enter-hint {
	opacity: 1;
	transform: scale(1);
}

/* Status / errors */
.status {
	margin-top: 18px;
	min-height: 20px;
	max-width: min(560px, 92vw);
}

#sj-error {
	margin: 0;
	color: var(--danger);
	font-size: 14px;
	white-space: pre-wrap;
}

#sj-error-code {
	margin: 8px 0 0;
	font-family: var(--mono);
	font-size: 12px;
	color: rgba(255, 128, 149, 0.75);
	white-space: pre-wrap;
	word-break: break-word;
}

/* Footer */
footer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 22px 16px 26px;
	font-size: 13px;
	flex-wrap: wrap;
}

.muted {
	color: var(--muted);
}

.pulse {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--cornflower-soft);
	box-shadow: 0 0 0 0 rgba(143, 180, 245, 0.6);
	animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(143, 180, 245, 0.55);
	}
	70% {
		box-shadow: 0 0 0 9px rgba(143, 180, 245, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(143, 180, 245, 0);
	}
}

footer a {
	color: var(--cornflower-soft);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease;
}

footer a:hover {
	border-bottom-color: var(--cornflower-soft);
}

/* ---------- in-proxy browser shell (tab bar + address bar) ---------- */
#vbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	display: none;
	flex-direction: column;
	background: rgba(18, 12, 38, 0.86);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--border);
	box-shadow: 0 10px 34px -20px rgba(0, 0, 0, 0.85);
}

#vbar.show {
	display: flex;
}

.vrow {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 10px;
}

.vrow-tabs {
	height: 42px;
	padding-top: 6px;
}

.vrow-tools {
	height: 50px;
}

.vbrand {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	filter: drop-shadow(0 3px 10px rgba(100, 149, 237, 0.5));
}

.vtabs {
	display: flex;
	align-items: flex-end;
	gap: 6px;
	flex: 1;
	overflow-x: auto;
	scrollbar-width: none;
}

.vtabs::-webkit-scrollbar {
	display: none;
}

.vtab {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 190px;
	min-width: 92px;
	height: 34px;
	padding: 0 6px 0 12px;
	border: 1px solid transparent;
	border-radius: 11px 11px 0 0;
	background: rgba(255, 255, 255, 0.04);
	color: var(--muted);
	font-family: inherit;
	font-size: 13px;
	cursor: pointer;
	white-space: nowrap;
	transition:
		background 0.15s ease,
		color 0.15s ease;
}

.vtab:hover {
	background: rgba(255, 255, 255, 0.09);
	color: var(--text);
}

.vtab.active {
	background: rgba(100, 149, 237, 0.18);
	color: var(--text);
	border-color: var(--border);
}

.vtab-label {
	overflow: hidden;
	text-overflow: ellipsis;
}

.vtab-close {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	line-height: 16px;
	text-align: center;
	border-radius: 6px;
	font-size: 15px;
}

.vtab-close:hover {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

.vbtn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--border);
	color: var(--text);
	font-family: inherit;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	transition:
		background 0.15s ease,
		border-color 0.15s ease,
		transform 0.1s ease;
}

.vbtn:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: var(--border-focus);
}

.vbtn:active {
	transform: scale(0.94);
}

.vnew {
	font-size: 20px;
}

.vurl {
	flex: 1;
	display: flex;
}

#vurl {
	flex: 1;
	min-width: 0;
	height: 38px;
	padding: 0 16px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	color: var(--text);
	font-family: inherit;
	font-size: 14px;
	outline: none;
	transition:
		border-color 0.15s ease,
		background 0.15s ease;
}

#vurl:focus {
	border-color: var(--border-focus);
	background: var(--surface-2);
}

#vurl::placeholder {
	color: rgba(154, 146, 196, 0.7);
}

#vframes {
	position: fixed;
	left: 0;
	right: 0;
	top: 92px;
	bottom: 0;
	z-index: 90;
	display: none;
	background: #0b0817;
}

#vframes.show {
	display: block;
}

.vframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: none;
	background: #0b0817;
}

.vframe.active {
	display: block;
}

body.proxying .hero,
body.proxying > footer,
body.proxying .aurora {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.aurora,
	.mark,
	.pulse {
		animation: none;
	}
}

@media (max-width: 480px) {
	.search {
		height: 56px;
	}
	.tagline {
		padding: 0 8px;
	}
}
