@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap");

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	background: #1c1b22;
	color: #fff;
	min-height: 100vh;
}

/* -- Landing page layout -- */
.landing {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 60px 20px 40px;
}

/* -- Logo -- */
.logo-wrapper {
	margin-bottom: 32px;
}

.logo {
	height: 80px;
	filter: drop-shadow(0 4px 24px rgba(255, 255, 255, 0.08));
}

.logo-text {
	font-size: 48px;
	font-weight: 600;
	letter-spacing: -1px;
	background: linear-gradient(135deg, #7c8aff, #c084fc);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* -- Search bar -- */
.search-wrapper {
	width: 100%;
	max-width: 620px;
	margin-bottom: 40px;
}

.search-box {
	display: flex;
	align-items: center;
	background: #42414d;
	border: 1px solid transparent;
	border-radius: 12px;
	padding: 0 16px;
	height: 52px;
	transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.search-box:focus-within {
	background: #53515e;
	border-color: rgba(255, 255, 255, 0.15);
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.search-icon {
	width: 18px;
	height: 18px;
	color: #b1b1b3;
	flex-shrink: 0;
	margin-right: 12px;
}

#sj-address {
	flex: 1;
	background: none;
	border: none;
	outline: none;
	color: #fff;
	font-size: 15px;
	font-family: inherit;
	height: 100%;
}

#sj-address::placeholder {
	color: #b1b1b3;
}

/* -- Shortcut grid -- */
.shortcuts {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	max-width: 620px;
	width: 100%;
}

.shortcut {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: 72px;
	cursor: pointer;
	text-decoration: none;
	color: #b1b1b3;
	border-radius: 10px;
	padding: 12px 4px;
	transition: background 0.15s;
}

.shortcut:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}

.shortcut-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	font-weight: 600;
	color: #fff;
	user-select: none;
}

.shortcut-icon svg {
	width: 20px;
	height: 20px;
}

.shortcut-favicon {
	border-radius: 4px;
}

.shortcut span {
	font-size: 12px;
	text-align: center;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

/* -- Error -- */
.desc {
	margin-top: 16px;
	text-align: center;
}

#sj-error {
	color: #ff6666;
	white-space: pre-wrap;
	font-size: 14px;
}

#sj-error-code {
	font-size: 12px;
	color: #b1b1b3;
	font-family: "Courier New", Courier, monospace;
	margin-top: 8px;
}

/* -- Browsing mode: hide landing -- */
body.sj-browsing .landing {
	display: none;
}

/* -- Proxy frame -- */
#sj-frame {
	border: none;
	position: absolute;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: #1c1b22;
}

/* -- Credits page -- */
.credit {
	border-radius: 10px;
	padding: 10px;
	display: flex;
	flex-wrap: wrap;
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #fff;
	margin-bottom: 15px;
}

.credit label {
	margin-left: auto;
	margin-right: 15px;
}

.credit a,
.credit label {
	color: white;
	text-decoration: underline;
	text-align: right;
}

.credit pre {
	display: none;
	width: 100%;
}

.credit label::after {
	content: "show license";
	cursor: pointer;
}

.credit input:checked + label::after {
	content: "hide license";
}

.credit input:checked ~ pre {
	display: block;
}

/* -- Responsive -- */
@media (max-width: 500px) {
	.shortcuts {
		gap: 8px;
	}

	.shortcut {
		width: 64px;
		padding: 8px 2px;
	}

	.shortcut-icon {
		width: 40px;
		height: 40px;
		border-radius: 10px;
		font-size: 16px;
	}

	.shortcut-icon svg {
		width: 16px;
		height: 16px;
	}

	.search-box {
		height: 46px;
	}
}
