/* ===== 设计系统 ===== */
:root {
	--c-mint: #00E0C6;
	--c-blue: #2D7FF9;
	--c-purple: #7B61FF;
	--c-ok: #33E287;
	--c-err: #FF4D6D;
	--c-text: rgba(255, 255, 255, 0.92);
	--c-text-sub: rgba(255, 255, 255, 0.62);
	--c-text-dim: rgba(255, 255, 255, 0.38);
	--glass-bg: rgba(255, 255, 255, 0.06);
	--glass-border: rgba(255, 255, 255, 0.14);
	--radius: 24px;
}

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

html, body { height: 100%; }

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
	color: var(--c-text);
	background: #020712;
	-webkit-font-smoothing: antialiased;
}

/* 桌面端外层限宽 480px 居中 */
.app {
	position: relative;
	width: 100%;
	max-width: 480px;
	height: 100dvh;
	margin: 0 auto;
	overflow-y: auto;
	overflow-x: hidden;
	scroll-snap-type: y mandatory;
	/* 深色科技底：青蓝光斑 + 深色渐变 */
	background:
		radial-gradient(120% 80% at 70% 0%, rgba(45, 127, 249, 0.22), transparent 60%),
		radial-gradient(100% 70% at 20% 100%, rgba(0, 224, 198, 0.16), transparent 55%),
		linear-gradient(180deg, #07111F 0%, #020712 100%);
}

/* 32px 网格 + mask 渐隐，不遮文字 */
.app::before {
	content: "";
	position: fixed;
	inset: 0;
	max-width: 480px;
	margin: 0 auto;
	background-image:
		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: 32px 32px;
	-webkit-mask-image: radial-gradient(circle at 50% 35%, #000 0%, transparent 75%);
	mask-image: radial-gradient(circle at 50% 35%, #000 0%, transparent 75%);
	pointer-events: none;
	z-index: 0;
}

/* ===== 屏幕通用 ===== */
.screen {
	position: relative;
	z-index: 1;
	min-height: 100dvh;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 56px 24px calc(96px + env(safe-area-inset-bottom));
	text-align: center;
}

.screen-title {
	font-size: 26px;
	font-weight: 700;
	margin-bottom: 24px;
	letter-spacing: 0.5px;
}

/* ===== 玻璃卡 ===== */
.card {
	width: 100%;
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	border-radius: var(--radius);
	padding: 22px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 30px rgba(0, 0, 0, 0.35);
}

/* ===== 按钮 ===== */
.btn {
	min-height: 48px;
	padding: 0 28px;
	border: none;
	border-radius: 999px;
	color: #04121A;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	background: linear-gradient(135deg, var(--c-mint), var(--c-blue));
	box-shadow: 0 8px 24px rgba(0, 224, 198, 0.32);
	transition: transform 0.12s ease;
}
.btn:active { transform: scale(0.96); }

/* ===== 入场动画 ===== */
.reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.show {
	opacity: 1;
	transform: translateY(0);
}
/* 同屏多元素依次上浮 */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.15s; }
.reveal:nth-child(3) { transition-delay: 0.25s; }
.reveal:nth-child(4) { transition-delay: 0.35s; }
.reveal:nth-child(5) { transition-delay: 0.45s; }

/* ===== 第 1 屏 · 封面 ===== */
.tag {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 12px;
	letter-spacing: 2px;
	color: var(--c-mint);
	border: 1px solid rgba(0, 224, 198, 0.4);
	background: rgba(0, 224, 198, 0.08);
	margin-bottom: 20px;
}
.cover-title {
	font-size: 44px;
	font-weight: 800;
	line-height: 1.15;
	margin-bottom: 14px;
}
.cover-title .hl {
	background: linear-gradient(135deg, var(--c-mint), var(--c-blue), var(--c-purple));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
.cover-sub { color: var(--c-text-sub); font-size: 16px; margin-bottom: 28px; }
.cover-car { width: 100%; height: 150px; margin-bottom: 32px; display: flex; justify-content: center; align-items: center; }
.wire-car {
	width: 100%;
	max-width: 320px;
	height: auto;
	filter: drop-shadow(0 0 12px rgba(0, 224, 198, 0.4));
	animation: carFloat 4.5s ease-in-out infinite;
}
.wire-car-shadow { animation: carShadow 4.5s ease-in-out infinite; }
@keyframes carFloat {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}
@keyframes carShadow {
	0%, 100% { opacity: 0.12; }
	50% { opacity: 0.06; }
}

/* ===== 第 2 屏 · 油电对比 ===== */
.compare { display: flex; flex-direction: column; gap: 18px; width: 100%; }
.chain {
	width: 100%;
	padding: 18px;
	border-radius: var(--radius);
	border: 1px solid var(--glass-border);
	background: var(--glass-bg);
	text-align: left;
}
.chain-label { display: block; font-size: 13px; letter-spacing: 1px; margin-bottom: 12px; color: var(--c-text-sub); }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.node {
	min-height: 36px;
	padding: 8px 12px;
	border-radius: 12px;
	font-size: 14px;
	border: 1px solid transparent;
	white-space: nowrap;
}
.arrow { position: relative; width: 22px; height: 2px; border-radius: 2px; }

/* 油车链路：暗橙弱化 */
.chain--fuel .chain-label { color: #C8763C; }
.chain--fuel .node { color: #C8763C; border-color: rgba(200, 118, 60, 0.35); background: rgba(200, 118, 60, 0.08); }
.chain--fuel .arrow { background: rgba(200, 118, 60, 0.3); }

/* 电车链路：青蓝高亮 + 边框发光，进屏依次点亮 */
.chain--ev .chain-label { color: var(--c-mint); }
.chain--ev .node {
	color: var(--c-mint);
	border-color: rgba(0, 224, 198, 0.4);
	background: rgba(0, 224, 198, 0.1);
	opacity: 0.3;
	transition: opacity 0.4s ease;
}
.chain--ev .arrow { background: rgba(0, 224, 198, 0.35); overflow: hidden; }
.chain--ev .arrow::after {
	content: "";
	position: absolute; top: -2px; left: 0;
	width: 6px; height: 6px; border-radius: 50%;
	background: var(--c-mint);
	box-shadow: 0 0 8px var(--c-mint);
	animation: flowDot 1.6s linear infinite;
}
@keyframes flowDot { from { left: -6px; } to { left: 100%; } }
.compare.show .chain--ev .node { opacity: 1; box-shadow: 0 0 12px rgba(0, 224, 198, 0.35); }
.compare.show .chain--ev .node:nth-child(1) { transition-delay: 0.15s; }
.compare.show .chain--ev .node:nth-child(3) { transition-delay: 0.4s; }
.compare.show .chain--ev .node:nth-child(5) { transition-delay: 0.65s; }
.compare.show .chain--ev .node:nth-child(7) { transition-delay: 0.9s; }

/* ===== 第 2 屏 · 油电能量效率 PK ===== */
.compare-sub { color: var(--c-text-sub); font-size: 14px; margin: -8px 0 18px; }
.eff { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.eff-label { flex: 0 0 auto; font-size: 12px; color: var(--c-text-sub); }
.eff-bar { position: relative; flex: 1; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.eff-fill { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 1s ease 0.3s; }
.eff-val { flex: 0 0 auto; font-size: 13px; font-weight: 700; }
.chain--fuel .eff-fill { background: linear-gradient(90deg, rgba(200, 118, 60, 0.5), #C8763C); }
.chain--fuel .eff-val { color: #C8763C; }
.chain--ev .eff-fill { background: linear-gradient(90deg, var(--c-mint), var(--c-blue)); box-shadow: 0 0 10px rgba(0, 224, 198, 0.5); }
.chain--ev .eff-val { color: var(--c-mint); }
.compare.show .eff-fill { width: var(--eff); }

/* ===== 底部圆点指示器 ===== */
.dots {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: calc(18px + env(safe-area-inset-bottom));
	z-index: 20;
	display: flex;
	gap: 10px;
	padding: 8px 12px;
	border-radius: 999px;
	background: rgba(2, 7, 18, 0.5);
	backdrop-filter: blur(10px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}
.dots.hide { opacity: 0; transform: translate(-50%, 20px); pointer-events: none; }
.dot {
	width: 8px; height: 8px;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.28);
	cursor: pointer;
	transition: width 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.dot.active {
	width: 22px;
	background: linear-gradient(90deg, var(--c-mint), var(--c-blue));
	box-shadow: 0 0 12px rgba(0, 224, 198, 0.6);
}

/* ===== 第 3 屏 · 三电核心 ===== */
.core-stage { position: relative; width: 100%; height: 200px; margin-bottom: 20px; }
.core-car { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 0 8px rgba(0, 224, 198, 0.25)); }
.hotspot {
	position: absolute;
	width: 44px; height: 44px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	border: 2px solid var(--c-mint);
	background: rgba(0, 224, 198, 0.2);
	cursor: pointer;
	animation: breathe 2s ease-in-out infinite;
}
@keyframes breathe {
	0%, 100% { box-shadow: 0 0 0 0 rgba(0, 224, 198, 0.5); }
	50% { box-shadow: 0 0 0 12px rgba(0, 224, 198, 0); }
}
.hotspot[data-core="battery"] { left: 42%; top: 68%; }
.hotspot[data-core="motor"] { left: 72%; top: 62%; }
.hotspot[data-core="control"] { left: 50%; top: 42%; }
.core-card { display: none; text-align: left; }
.core-card.active { display: block; }
.core-card .kw { color: var(--c-mint); font-weight: 700; }
.core-anim { height: 48px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }

/* 电芯逐格充电 */
.anim-battery { display: flex; gap: 6px; }
.anim-battery i {
	width: 14px; height: 28px;
	border-radius: 4px;
	border: 1px solid rgba(0, 224, 198, 0.5);
	background: rgba(0, 224, 198, 0.08);
	animation: cellCharge 2.5s ease-in-out infinite;
}
.anim-battery i:nth-child(2) { animation-delay: 0.25s; }
.anim-battery i:nth-child(3) { animation-delay: 0.5s; }
.anim-battery i:nth-child(4) { animation-delay: 0.75s; }
.anim-battery i:nth-child(5) { animation-delay: 1s; }
@keyframes cellCharge {
	0%, 100% { background: rgba(0, 224, 198, 0.08); box-shadow: none; }
	50% { background: var(--c-mint); box-shadow: 0 0 10px rgba(0, 224, 198, 0.7); }
}

/* 转子旋转 */
.anim-motor {
	width: 40px; height: 40px;
	border-radius: 50%;
	border: 2px solid rgba(45, 127, 249, 0.4);
	position: relative;
}
.anim-motor span {
	position: absolute; inset: 6px;
	border-radius: 50%;
	border: 2px solid transparent;
	border-top-color: var(--c-blue);
	border-right-color: var(--c-mint);
	animation: rotorSpin 1.2s linear infinite;
}
@keyframes rotorSpin { to { transform: rotate(360deg); } }

/* 电流光点流动 */
.anim-control {
	position: relative;
	width: 120px; height: 2px;
	border-radius: 2px;
	background: rgba(123, 97, 255, 0.3);
	overflow: hidden;
}
.anim-control i {
	position: absolute; top: -3px;
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--c-purple);
	box-shadow: 0 0 8px var(--c-purple);
	animation: currentFlow 1.8s linear infinite;
}
.anim-control i:nth-child(2) { animation-delay: 0.6s; }
.anim-control i:nth-child(3) { animation-delay: 1.2s; }
@keyframes currentFlow { from { left: -8px; } to { left: 120px; } }

/* ===== 第 4 屏 · 能量回收 ===== */
.recover-panel { width: 100%; }
.energy-sim { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 18px; }
.es-node {
	flex: 0 0 auto;
	padding: 10px 12px;
	border-radius: 12px;
	font-size: 13px;
	color: var(--c-text-sub);
	border: 1px solid var(--glass-border);
	background: var(--glass-bg);
}
.es-line { position: relative; flex: 1; height: 2px; border-radius: 2px; background: rgba(0, 224, 198, 0.25); overflow: hidden; }
.es-line i {
	position: absolute; top: -3px; left: -8px;
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--c-mint);
	box-shadow: 0 0 8px var(--c-mint);
	opacity: 0;
}
.recover-panel.recovering .es-line i { opacity: 1; animation: esFlow 1.2s linear infinite; }
.recover-panel.recovering .es-line i:nth-child(2) { animation-delay: 0.4s; }
.recover-panel.recovering .es-line i:nth-child(3) { animation-delay: 0.8s; }
.recover-panel.done .es-target { border-color: var(--c-ok); color: var(--c-ok); }
@keyframes esFlow { from { left: -8px; } to { left: 100%; } }

/* ===== 第 4 屏 · 能量回收小游戏（拖拽接能量） ===== */
.game-stage {
	position: relative;
	width: 100%;
	height: 220px;
	margin: 16px 0 18px;
	border-radius: var(--radius);
	border: 1px solid var(--glass-border);
	background: rgba(0, 224, 198, 0.04);
	overflow: hidden;
	touch-action: none;
	cursor: grab;
}
.game-stage:active { cursor: grabbing; }
.g-label { position: absolute; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: 1px; color: var(--c-text-dim); }
.g-source { top: 8px; }
.g-target { bottom: 8px; color: var(--c-mint); }
.orb {
	position: absolute;
	top: 0;
	width: 14px; height: 14px;
	margin-left: -7px;
	border-radius: 50%;
	background: var(--c-mint);
	box-shadow: 0 0 10px var(--c-mint);
}
.orb.caught { background: var(--c-ok); box-shadow: 0 0 14px var(--c-ok); }
.orb.missed { background: var(--c-err); opacity: 0.5; }
.collector {
	position: absolute;
	bottom: 26px;
	left: 50%;
	transform: translateX(-50%);
	width: 64px; height: 14px;
	border-radius: 10px 10px 4px 4px;
	background: linear-gradient(180deg, rgba(0, 224, 198, 0.5), rgba(45, 127, 249, 0.2));
	border: 1px solid var(--c-mint);
	box-shadow: 0 0 12px rgba(0, 224, 198, 0.5);
	pointer-events: none;
}
.battery-bar {
	width: 100%; height: 22px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	overflow: hidden;
	margin-bottom: 14px;
}
.battery-fill {
	display: block; height: 100%;
	width: 48%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--c-mint), var(--c-blue));
	transition: width 0.2s linear;
}
.recover-pct { font-size: 34px; font-weight: 800; margin-bottom: 6px; }
.recover-status { color: var(--c-text-sub); margin-bottom: 20px; }
.recover-panel.recovering .recover-status { color: var(--c-mint); }
.recover-panel.done .recover-status { color: var(--c-ok); }

/* ===== 第 5 屏 · 答题 ===== */
.quiz-progress { color: var(--c-mint); letter-spacing: 2px; font-size: 13px; margin-bottom: 16px; }
.quiz-question { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.quiz-options { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.option {
	width: 100%;
	min-height: 48px;
	padding: 14px 18px;
	text-align: left;
	font-size: 15px;
	color: var(--c-text);
	border-radius: 16px;
	border: 1px solid var(--glass-border);
	background: var(--glass-bg);
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.option.correct {
	border-color: var(--c-ok);
	box-shadow: 0 0 14px rgba(51, 226, 135, 0.5);
}
.option.wrong {
	border-color: var(--c-err);
	box-shadow: 0 0 14px rgba(255, 77, 109, 0.5);
	animation: shake 0.4s;
}
@keyframes shake {
	0%, 100% { transform: translateX(0); }
	20%, 60% { transform: translateX(-7px); }
	40%, 80% { transform: translateX(7px); }
}
.summary-title { font-size: 24px; font-weight: 800; margin-bottom: 22px; }

/* ===== P2 · 轻量视差（第 2、3 屏小幅错位，transform 驱动） ===== */
.parallax { transform: translateY(var(--par, 0px)); will-change: transform; }

/* ===== P2 · 扫描光（第 3 屏车身） ===== */
.core-stage::after {
	content: "";
	position: absolute;
	left: 0; right: 0; top: 0;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(180deg, rgba(0, 224, 198, 0.28), transparent);
	pointer-events: none;
	animation: scanLight 3.4s ease-in-out infinite;
}
@keyframes scanLight {
	0%, 100% { transform: translateY(0); opacity: 0; }
	12% { opacity: 1; }
	50% { transform: translateY(164px); opacity: 0.55; }
	88% { opacity: 0; }
}

/* ===== P2 · 封面粒子（纯 CSS 动画，0 重资源） ===== */
.particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.particles i {
	position: absolute;
	width: 3px; height: 3px;
	border-radius: 50%;
	background: var(--c-mint);
	box-shadow: 0 0 6px var(--c-mint);
	opacity: 0;
	animation: floatUp linear infinite;
}
@keyframes floatUp {
	0% { transform: translateY(0); opacity: 0; }
	15% { opacity: 0.6; }
	100% { transform: translateY(-130px); opacity: 0; }
}
