* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
body {
	overflow: hidden;
	user-select: none;
	-webkit-user-select: none;
	touch-action: manipulation;
	background: #ffffff;
}

/* 资源预加载 Loading 遮罩层 */
.loading-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: #ffffff;
	z-index: 9999;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: opacity 0.4s ease, visibility 0.4s ease;
}
.loading-overlay.loading-fade-out {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}
.loading-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 30px 40px;
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
	border: 3px solid #4eba6f;
	max-width: 90vw;
	width: 320px;
	text-align: center;
}
.loading-frog-icon {
	width: 72px;
	height: auto;
	margin-bottom: 12px;
	animation: frogBob 1.2s ease-in-out infinite alternate;
}
@keyframes frogBob {
	0% { transform: translateY(0); }
	100% { transform: translateY(-8px); }
}
.loading-title {
	font-size: 22px;
	font-weight: bold;
	color: #1b4327;
	margin-bottom: 6px;
}
.loading-subtitle {
	font-size: 13px;
	color: #666666;
	margin-bottom: 18px;
}
.loading-bar-wrap {
	width: 100%;
	height: 10px;
	background: #e2f0d9;
	border-radius: 10px;
	overflow: hidden;
	position: relative;
	box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.loading-bar {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, #4eba6f, #2ecc71);
	border-radius: 10px;
	transition: width 0.15s ease-out;
}
.loading-text {
	font-size: 13px;
	font-weight: bold;
	color: #4eba6f;
	margin-top: 10px;
}

/* 动态背景 */
.background {
	height: 100vh;
	width: 100vw;
	background: #ffffff url('images/background-frogs.webp') repeat;
	background-size: 240px auto;
	will-change: transform;
}

/* 障碍物容器（硬件加速层） */
.pipe-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	pointer-events: none;
	overflow: hidden;
	z-index: 50;
}

/* 玩家小鸟 */
.bird {
	height: 13vh;
	width: auto;
	object-fit: contain;
	position: fixed;
	top: 40vh;
	left: 30vw;
	z-index: 100;
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
	will-change: transform, top;
}

/* 障碍物柱子（对象池复用，GPU Transform 驱动） */
.pipe_sprite {
	position: absolute;
	top: 0;
	left: 0;
	width: 6vh;
	display: none;
	flex-direction: column;
	background: transparent;
	border: none;
	box-shadow: none;
	pointer-events: none;
	will-change: transform;
}
.stack-frog {
	width: 6vh;
	height: 6vh;
	display: block;
	object-fit: cover;
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
}

/* 消息提示框 */
.message {
	position: absolute;
	z-index: 1000;
	color: #1a2f1e;
	top: 35%;
	left: 50%;
	font-size: 3.2em;
	transform: translate(-50%, -50%);
	text-align: center;
	cursor: pointer;
}
.messageStyle {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(8px);
	padding: 28px 44px;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
	border-radius: 20px;
	border: 4px solid #4eba6f;
	line-height: 1.6;
}
.message p {
	font-size: 0.5em;
	color: #555;
	margin-top: 10px;
}

/* 得分面板 */
.score {
	position: fixed;
	z-index: 100;
	height: 10vh;
	font-size: 8vh;
	font-weight: bold;
	color: #333333;
	-webkit-text-stroke-width: 1.5px;
	-webkit-text-stroke-color: #1b4327;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	top: 0;
	left: 0;
	margin: 15px 20px;
}
.score_val {
	color: #f39c12;
	font-weight: bold;
}

@media only screen and (max-width: 1080px) {
	.message {
		font-size: 40px;
		top: 50%;
		white-space: nowrap;
	}
	.score {
		font-size: 8vh;
	}
	.bird {
		height: 13vh;
		width: auto;
	}
}
@media only screen and (max-width: 768px) {
	.message {
		font-size: 26px;
		padding: 20px 24px;
		top: 45%;
		white-space: normal;
		max-width: 88vw;
	}
	.score {
		font-size: 6vh;
		margin: 10px;
	}
	.bird {
		height: 13vh;
		width: auto;
		left: 20vw;
	}
}