:root {
	--bgTop: #b3ecff;
	--bgMid: #9be7ff;
	--river: #7fd0ff;
	--riverDeep: #4bb3ff;
	--hud: #ffffffcc;
	--shadow: #00000020;
	--good: #00c853;
	--bad: #ff5252;
	--accent: #ffb300;
}

* {
	box-sizing: border-box
}

html,
body {
	height: 100%
}

body {
	margin: 0;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	background: linear-gradient(var(--bgTop), var(--bgMid));
	color: #222;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
	/* 长按不弹出菜单 */
	touch-action: manipulation;
	/* 避免双击缩放，允许按钮点击 */
	overscroll-behavior: contain;
	/* 阻止边界回弹 */
}

#app {
	max-width: 1100px;
	margin: 0 auto;
	padding: 12px
}

.hud {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 12px;
	background: var(--hud);
	border-radius: 12px;
	padding: 8px 12px;
	box-shadow: 0 4px 12px var(--shadow)
}

.group {
	display: grid;
	gap: 6px
}

.left .label {
	font-weight: 800
}

.center {
	text-align: center
}

.message {
	font-weight: 800
}

.tips {
	opacity: .85;
	font-size: 12px
}

.stage-wrap {
	margin: 14px 0
}

.stage-wrap {
	position: relative;
}

#game {
	width: 100%;
	height: auto;
	display: block;
	background: linear-gradient(#a9e8ff, #8ed8ff);
	border-radius: 16px;
	box-shadow: 0 8px 24px var(--shadow);
	-webkit-tap-highlight-color: transparent;
	/* iOS 去点击高亮 */
}

/* 触屏按键 */
.touch-controls {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 12px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	padding: 0 12px;
	pointer-events: none
}

.tc-left,
.tc-right {
	display: grid;
	gap: 6px;
	justify-items: center;
	pointer-events: auto
}

.touch-controls .title {
	font-weight: 800;
	background: var(--hud);
	padding: 2px 8px;
	border-radius: 8px
}

.row {
	display: flex;
	gap: 10px
}

.tc-btn {
	min-width: 72px;
	min-height: 72px;
	border-radius: 16px;
	border: 2px solid #2222;
	background: #ffffffee;
	font-size: 22px;
	font-weight: 900;
	box-shadow: 0 4px 12px var(--shadow)
}

.tc-btn.shoot {
	background: #ffe9a8
}

/* 全屏/胜利覆盖层样式，复用 pong-duo 的风格简化版 */
.overlay {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	display: grid;
	place-items: center;
	background: rgba(255, 255, 255, 0.75);
}

.overlay[aria-hidden="true"] {
	display: none;
}

.win-card {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 10px 30px var(--shadow);
	padding: 18px 20px;
	text-align: center;
	min-width: 260px;
}

.win-title {
	font-weight: 900;
	font-size: 22px;
	margin-bottom: 6px;
}

.win-sub {
	opacity: .9;
	margin-bottom: 12px;
}

.win-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
}

.primary {
	background: #ffe9a8;
	border: 1px solid #0002;
	border-radius: 10px;
	padding: 8px 12px;
	font-weight: 800;
}

.ghost {
	color: inherit;
	text-decoration: none;
	border: 1px dashed #0003;
	border-radius: 10px;
	padding: 8px 12px;
}

.tc-btn:active {
	transform: scale(.98)
}

@media(hover:hover) and (pointer:fine) {
	.touch-controls {
		display: none
	}
}