:root {
	--teal: #3ec9b0;
	--teal-hover: #34b89f;
	--text: #2b2f33;
	--muted: #8a9299;
	--card-shadow: 0 12px 32px rgba(35, 55, 70, 0.1);
}

* {
	box-sizing: border-box;
}

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

body {
	font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	color: var(--text);
	background: #f4f7f9 url(../images/hero-bg.png) left top / cover no-repeat fixed;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: inherit;
	text-decoration: none;
}

.page {
	height: 100vh;
	max-height: 100vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	padding: 28px 80px 20px;
}

.header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-shrink: 0;
}

.brand img {
	display: block;
	height: 56px;
	width: auto;
}

.lang-switch {
	display: flex;
	align-items: center;
	gap: 32px;
	padding-top: 6px;
	font-size: 16px;
	color: var(--muted);
}

.lang-item {
	position: relative;
	padding-bottom: 8px;
	cursor: default;
}

.lang-item.active {
	color: var(--text);
	font-weight: 500;
}

.lang-item.active::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 40px;
	height: 3px;
	border-radius: 2px;
	background: var(--teal);
	transform: translateX(-50%);
}

a.lang-item {
	cursor: pointer;
	transition: color 0.2s ease;
}

a.lang-item:hover {
	color: var(--text);
}

.hero {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: 12px 0 16px;
	min-height: 0;
	width: 100%;
	margin: 0 auto;
	overflow: hidden;
}

.download-wrap {
	display: flex;
	flex-direction: column;
	width: fit-content;
	max-height: 100%;
	flex-shrink: 0;
	margin-right: 10%;
	animation: rise-in 0.8s ease 0.12s both;
}

.app-tabs {
	display: flex;
	align-items: flex-end;
	gap: 40px;
	margin-bottom: 24px;
}

.app-tab {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	padding: 0 0 10px;
	background: transparent;
	font-size: 24px;
	font-weight: 500;
	line-height: 1;
	color: var(--text);
	cursor: pointer;
	position: relative;
	outline: none;
	box-shadow: none;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	user-select: none;
}

.app-tab:focus,
.app-tab:active,
.app-tab:focus-visible {
	outline: none;
	background: transparent;
	box-shadow: none;
}

.app-tab.active {
	color: var(--teal);
}

.app-tab.active::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 100%;
	height: 4px;
	border-radius: 2px;
	background: var(--teal);
	transform: translateX(-50%);
}

.download-panel {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 20px;
	width: 100%;
	max-height: 100%;
}

.download-panel.is-hidden {
	display: none !important;
}

.download-card {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 16px;
	min-width: 580px;
	padding: 16px 28px;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 28px rgba(35, 55, 70, 0.1);
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 36px rgba(35, 55, 70, 0.14);
}

.platform-icon {
	width: 50px;
	height: 50px;
	object-fit: contain;
	flex-shrink: 0;
}

.platform-icon.platform-icon-app {
	width: 50px;
	height: 50px;
	border-radius: 11px;
}

.platform-name {
	display: flex;
	align-items: center;
	width: 110px;
	height: 50px;
	font-size: 30px;
	line-height: 1;
	letter-spacing: 0;
	font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	color: #1f2326;
	white-space: nowrap;
	flex-shrink: 0;
}

.download-btn {
	appearance: none;
	border: 0;
	width: 148px;
	height: 42px;
	margin-left: 8px;
	padding: 0;
	border-radius: 999px;
	background: var(--teal);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0;
	font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	white-space: nowrap;
	cursor: pointer;
	pointer-events: none;
	flex-shrink: 0;
	transition: background 0.2s ease;
}

.download-card:hover .download-btn {
	background: var(--teal-hover);
}

.qrcode {
	width: 112px;
	height: 112px;
	object-fit: contain;
	border-radius: 4px;
	margin-left: auto;
	flex-shrink: 0;
}

.qrcode img,
.qrcode canvas {
	width: 100% !important;
	height: 100% !important;
	display: block;
	object-fit: contain;
}

.footer {
	flex-shrink: 0;
	text-align: center;
	font-size: 14px;
	color: #171F24;
	letter-spacing: 0.02em;
}

.footer a {
	color: #7a848c;
}

.footer a:hover {
	color: var(--text);
}

@keyframes rise-in {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media screen and (max-width: 1280px) {
	.page {
		padding: 24px 56px 18px;
	}

	.hero {
		max-width: 1160px;
	}

	.download-wrap {
		margin-right: 8%;
	}
}

/* Avoid desktop height shrink rules affecting mobile layout */
@media screen and (max-height: 900px) and (min-width: 861px) {
	.download-panel {
		gap: 16px;
	}

	.download-card {
		padding: 14px 18px;
	}

	.qrcode {
		width: 96px;
		height: 96px;
	}
}

@media screen and (max-height: 800px) and (min-width: 861px) {
	.brand img {
		height: 48px;
	}

	.download-panel {
		gap: 12px;
	}

	.download-card {
		padding: 10px 14px;
	}

	.platform-icon {
		width: 40px;
		height: 40px;
	}

	.platform-icon.platform-icon-app {
		width: 40px;
		height: 40px;
		border-radius: 9px;
	}

	.platform-name {
		height: 40px;
		font-size: 24px;
	}

	.qrcode {
		width: 77px;
		height: 77px;
	}
}

@media screen and (max-width: 1100px) {
	.page {
		padding: 24px 36px 18px;
	}

	.brand img {
		height: 52px;
	}

	.download-wrap {
		margin-right: 0;
	}

	.download-card {
		min-width: 480px;
		padding: 14px 16px;
		gap: 12px;
	}

	.app-tab {
		font-size: 20px;
	}

	.platform-icon {
		width: 40px;
		height: 40px;
	}

	.platform-icon.platform-icon-app {
		width: 40px;
		height: 40px;
		border-radius: 9px;
	}

	.platform-name {
		width: 90px;
		height: 40px;
		font-size: 22px;
	}

	.download-btn {
		width: 128px;
		height: 38px;
		margin-left: 4px;
		font-size: 13px;
	}

	.qrcode {
		width: 80px;
		height: 80px;
		margin-left: auto;
	}
}

@media screen and (max-width: 860px) {
	html,
	body {
		height: auto;
		min-height: 100%;
		overflow-x: hidden;
		overflow-y: auto;
	}

	body {
		background: #eef2f5 url(../images/app_bg.png) left top / cover no-repeat scroll;
	}

	.page {
		height: auto;
		min-height: 100vh;
		max-height: none;
		overflow: visible;
		padding: 24px 16px 20px;
	}

	.brand img {
		height: 48px;
	}

	.lang-switch {
		gap: 18px;
		font-size: 14px;
	}

	.hero {
		flex: 1;
		justify-content: center;
		align-items: center;
		padding: 28px 0 24px;
		max-width: none;
		overflow: visible;
	}

	.app-tabs {
		justify-content: center;
		gap: 36px;
		margin-bottom: 28px;
	}

	.app-tab {
		font-size: 16px;
		padding: 0 0 8px;
	}

	.app-tab.active::after {
		height: 3px;
	}

	.download-wrap {
		width: 100%;
		max-width: 420px;
		max-height: none;
		margin: 0 auto;
	}

	.download-panel {
		width: 100%;
		max-width: none;
		max-height: none;
		margin: 0;
		gap: 28px;
	}

	.download-card {
		width: 100%;
		min-width: 0;
		min-height: 108px;
		justify-content: flex-start;
		padding: 28px 24px;
		gap: 14px;
		border-radius: 16px;
		background: rgba(255, 255, 255, 0.88);
	}

	.platform-icon {
		width: 36px;
		height: 36px;
	}

	.platform-icon.platform-icon-app {
		width: 36px;
		height: 36px;
		border-radius: 8px;
	}

	.platform-name {
		width: auto;
		min-width: 0;
		height: 36px;
		font-size: 17px;
		font-weight: 500;
	}

	.download-btn {
		width: 122px;
		min-width: 122px;
		height: 40px;
		margin-left: auto;
		padding: 0;
		font-size: 13px;
	}

	.qrcode {
		display: block;
		width: 64px;
		height: 64px;
		margin-left: 0;
	}

	.footer {
		font-size: 12px;
		padding: 16px 8px 8px;
		line-height: 1.6;
		word-break: break-all;
		color: #171F24;
		background: transparent;
	}
}

@media screen and (max-width: 480px) {
	.page {
		padding: 16px 16px 16px;
	}

	.download-panel {
		max-width: none;
		gap: 24px;
	}

	.download-card {
		min-height: 100px;
		padding: 24px 20px;
		gap: 12px;
	}

	.platform-icon {
		width: 34px;
		height: 34px;
	}

	.platform-icon.platform-icon-app {
		width: 34px;
		height: 34px;
		border-radius: 8px;
	}

	.platform-name {
		height: 34px;
		font-size: 16px;
	}

	.download-btn {
		width: 110px;
		min-width: 110px;
		height: 38px;
		font-size: 12px;
	}

	.qrcode {
		width: 56px;
		height: 56px;
	}
}
