html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
html {
	-webkit-text-size-adjust: 100%;	
}
html, body {
	height: 100%;
}
body {
	line-height: 1;
}
.message {
	transform: translate(-50%, -50%);
	-webkit-transform: translate(-50%, -50%);
	position: absolute;
  	left: 50%;
  	top: 50%;
	width: 800px;
	text-align: center;
}
h1 {
	font-size: 60px;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;	
	line-height: 1.2em;
	font-weight: bold;
	color: #fff;
	text-transform: uppercase;
}
.overlay {
	width: 100%;
	height: 100%;
	position: absolute;
}
#theemoji {
	width: 32px;
	height: 32px;	
	background-size: 32px 32px;
	position: absolute;
	transition: all 0.5s ease;
	z-index: 2000;
}
#theemoji:hover {
	width: 160px;
	height: 160px;	
	background-size: 160px 160px;
	margin: -64px;
}
img {
	width: 32px;
	height: 32px;	
	-webkit-user-select: none; 
	-moz-user-select: none; 
	-ms-user-select: none; 
	-o-user-select: none;
	user-select: none;   
}
a.info {
    border-radius: 50%;
    width: 24px;
	height: 24px;
    position: fixed;
    left: 10px;
    top: 10px;
    border: 2px solid white;
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 16px;
    text-decoration: none;
    font-weight: bold;
    line-height: 24px;
	background-color: rgba(0, 0, 0, 0.7);
	color: white;
	z-index: 2000;
	cursor: pointer;
	transition: all 0.3s ease;
}

a.info:hover {
	background-color: rgba(0, 0, 0, 0.9);
	transform: scale(1.1);
}

.game-rules h3 {
	margin-bottom: 10px;
	color: #fff;
	font-size: 16px;
}

.game-rules p {
	margin: 8px 0;
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
}

.game-rules .credits {
	margin-top: 12px;
	font-size: 12px;
	color: #ccc;
}

a.camera {
	width: 32px;
	height: 32px;	
	position: absolute;
	bottom: 10px;
	right: 10px;
}
a.camera:hover {
	width: 32px;
	height: 32px;	
	position: absolute;
	bottom: 10px;
	right: 10px;
	background: url(../images/emojis/camera.png) no-repeat center center;
	background-size: 32px 32px;
}
.adsbygoogle {
	position: absolute;
 	bottom: 0;
}

/* 游戏规则弹窗 */
.rules-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
	z-index: 9999;
	display: flex;
	justify-content: center;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	backdrop-filter: blur(8px);
}

.rules-modal.show {
	opacity: 1;
	visibility: visible;
}

.rules-modal-content {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 24px;
	padding: 35px;
	max-width: 520px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	box-shadow: 0 25px 50px rgba(102, 126, 234, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.15);
	transform: scale(0.9);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	text-align: center;
	color: white;
	backdrop-filter: blur(20px);
}

.rules-modal.show .rules-modal-content {
	transform: scale(1);
	box-shadow: 0 30px 60px rgba(102, 126, 234, 0.35);
}

.rules-modal h2 {
	font-size: 36px;
	margin-bottom: 25px;
	color: #ffffff;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	font-weight: 700;
	letter-spacing: -0.5px;
}

.rules-modal h3 {
	font-size: 26px;
	margin-bottom: 18px;
	color: #f0f4ff;
	margin-top: 25px;
	font-weight: 600;
	letter-spacing: -0.3px;
}

/* 通关页面样式 */
.winner-container {
	position: relative;
	width: 100%;
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	z-index: 100;
}

.winner-emoji {
	font-size: 120px;
	margin-bottom: 30px;
	animation: bounce 2s infinite, rotate 4s linear infinite;
	text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.winner-container .message {
	position: relative;
	transform: none;
	left: auto;
	top: auto;
	width: auto;
	background: rgba(255, 255, 255, 0.95);
	padding: 40px 60px;
	border-radius: 25px;
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
	border: 2px solid rgba(255, 255, 255, 0.6);
	animation: slideIn 0.8s ease-out;
	backdrop-filter: blur(10px);
}

.winner-container h1 {
	font-size: 48px;
	color: #333;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
	margin-bottom: 15px;
	animation: glow 2s ease-in-out infinite alternate;
}

.winner-container h2 {
	font-size: 24px;
	color: #666;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
	margin-bottom: 30px;
	opacity: 0.9;
}

.winner-stats {
	display: flex;
	justify-content: space-around;
	margin: 30px 0;
	gap: 20px;
}

.stat-item {
	text-align: center;
	padding: 15px;
	background: rgba(255, 255, 255, 0.8);
	border-radius: 15px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease;
	border: 1px solid rgba(255, 255, 255, 0.5);
}

.stat-item:hover {
	transform: translateY(-5px);
}

.stat-number {
	display: block;
	font-size: 36px;
	margin-bottom: 8px;
	animation: pulse 1.5s ease-in-out infinite;
}

.stat-label {
	display: block;
	font-size: 14px;
	color: #555;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
	font-weight: bold;
}

.winner-actions {
	text-align: center;
	margin-top: 30px;
}

.play-again-btn {
	display: inline-block;
	padding: 15px 30px;
	background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
	color: white;
	text-decoration: none;
	border-radius: 25px;
	font-size: 18px;
	font-weight: bold;
	margin-bottom: 15px;
	transition: all 0.3s ease;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.play-again-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
	background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
}

.share-text {
	font-size: 14px;
	color: #777;
	opacity: 0.8;
	font-style: italic;
}

.floating-emojis {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 50;
}

.float-emoji {
	position: absolute;
	font-size: 30px;
	animation: float 6s ease-in-out infinite;
	opacity: 0.7;
}

.float-emoji:nth-child(1) {
	left: 10%;
	top: 20%;
	animation-delay: 0s;
}

.float-emoji:nth-child(2) {
	right: 15%;
	top: 30%;
	animation-delay: 1s;
}

.float-emoji:nth-child(3) {
	left: 20%;
	bottom: 25%;
	animation-delay: 2s;
}

.float-emoji:nth-child(4) {
	right: 25%;
	bottom: 35%;
	animation-delay: 3s;
}

.float-emoji:nth-child(5) {
	left: 50%;
	top: 10%;
	animation-delay: 4s;
}

/* 动画效果 */
@keyframes bounce {
	0%, 20%, 50%, 80%, 100% {
		transform: translateY(0);
	}
	40% {
		transform: translateY(-20px);
	}
	60% {
		transform: translateY(-10px);
	}
}

@keyframes rotate {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-50px) scale(0.8);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes glow {
	from {
		text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1), 0 0 10px rgba(255, 215, 0, 0.3);
	}
	to {
		text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1), 0 0 20px rgba(255, 215, 0, 0.6);
	}
}

@keyframes pulse {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.1);
	}
}

@keyframes float {
	0%, 100% {
		transform: translateY(0px) rotate(0deg);
	}
	33% {
		transform: translateY(-20px) rotate(5deg);
	}
	66% {
		transform: translateY(10px) rotate(-5deg);
	}
}

/* 响应式设计 */
@media (max-width: 768px) {
	.winner-container .message {
		padding: 30px 40px;
		margin: 20px;
	}
	
	.winner-container h1 {
		font-size: 36px;
	}
	
	.winner-container h2 {
		font-size: 18px;
	}
	
	.winner-stats {
		flex-direction: column;
		gap: 15px;
	}
	
	.winner-emoji {
		font-size: 80px;
	}

	/* 移动端规则弹窗优化 */
	.rules-modal-content {
		padding: 20px;
		max-width: 95%;
		margin: 20px;
	}

	.rules-modal h2 {
		font-size: 24px;
	}

	.rules-modal h3 {
		font-size: 20px;
	}

	.rules-modal p {
		font-size: 14px;
	}

	.rules-modal .rule-number {
		font-size: 20px;
	}

	.rules-modal .close-btn {
		padding: 12px 30px;
		font-size: 16px;
	}
}

@media only screen
and (max-width: 768px) {
	.rules-modal-content {
		padding: 28px;
		max-width: 90%;
		border-radius: 22px;
	}

	.rules-modal h2 {
		font-size: 32px;
		margin-bottom: 22px;
	}

	.rules-modal h3 {
		font-size: 24px;
		margin-bottom: 16px;
	}

	.rules-modal p {
		font-size: 16px;
		margin-bottom: 16px;
	}

	.rules-modal .rule-item {
		padding: 18px;
		margin-bottom: 16px;
	}

	.rules-modal .rule-number {
		font-size: 26px;
	}

	.rules-modal .close-btn {
		padding: 15px 40px;
		font-size: 18px;
		border-radius: 28px;
		margin-top: 22px;
	}
}

/* 闪烁星星效果 */
.sparkles {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 60;
}

.sparkle {
	position: absolute;
	width: 4px;
	height: 4px;
	background: #FFD700;
	border-radius: 50%;
	animation: twinkle 2s ease-in-out infinite;
}

.sparkle:nth-child(1) {
	top: 15%;
	left: 25%;
	animation-delay: 0s;
}

.sparkle:nth-child(2) {
	top: 35%;
	right: 20%;
	animation-delay: 0.3s;
}

.sparkle:nth-child(3) {
	bottom: 40%;
	left: 30%;
	animation-delay: 0.6s;
}

.sparkle:nth-child(4) {
	bottom: 20%;
	right: 35%;
	animation-delay: 0.9s;
}

.sparkle:nth-child(5) {
	top: 60%;
	left: 15%;
	animation-delay: 1.2s;
}

.sparkle:nth-child(6) {
	top: 25%;
	right: 40%;
	animation-delay: 1.5s;
}

@keyframes twinkle {
	0%, 100% {
		opacity: 0;
		transform: scale(0);
	}
	50% {
		opacity: 1;
		transform: scale(1);
	}
}

.rules-modal p {
	font-size: 17px;
	line-height: 1.7;
	margin-bottom: 18px;
	color: rgba(255, 255, 255, 0.95);
	font-weight: 400;
}

.rules-modal .rule-item {
	background: rgba(255, 255, 255, 0.12);
	border-radius: 16px;
	padding: 20px;
	margin-bottom: 18px;
	backdrop-filter: blur(15px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rules-modal .rule-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.rules-modal .rule-number {
	font-size: 28px;
	font-weight: 700;
	color: #ffffff;
	margin-bottom: 12px;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.rules-modal .close-btn {
	background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
	color: white;
	border: none;
	padding: 16px 45px;
	border-radius: 30px;
	font-size: 19px;
	font-weight: 600;
	cursor: pointer;
	margin-top: 25px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
	letter-spacing: 0.5px;
}

.rules-modal .close-btn:hover {
	background: linear-gradient(135deg, #ee5a24 0%, #ff6b6b 100%);
	transform: translateY(-3px);
	box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

.rules-modal .close-btn:active {
	transform: translateY(-1px);
	box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.bg-switcher {
	position: fixed;
	top: 10px;
	right: 10px;
	z-index: 2000;
}

.bg-switch-btn {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid white;
	background-color: rgba(0, 0, 0, 0.7);
	color: white;
	font-size: 16px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.bg-switch-btn:hover {
	background-color: rgba(0, 0, 0, 0.9);
	transform: scale(1.1);
}

.bg-options {
	display: none;
	position: absolute;
	top: 40px;
	right: 0;
	background-color: rgba(0, 0, 0, 0.8);
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	min-width: 120px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.bg-option {
	padding: 10px 15px;
	color: white;
	cursor: pointer;
	transition: background-color 0.3s ease;
	font-size: 14px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bg-option:last-child {
	border-bottom: none;
}

.bg-option:hover {
	background-color: rgba(255, 255, 255, 0.2);
}

.bg-option:first-child {
	border-radius: 8px 8px 0 0;
}

.bg-option:last-child {
	border-radius: 0 0 8px 8px;
}


@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
	#theemoji:hover {
		width: 32px;
		height: 32px;
		background-size: 32px 32px;
		margin: 0;
	}
	h1 {
		font-size: 36px;
	}
	.message {
		width: 300px;
	}

	/* 移动端规则弹窗优化 */
	.rules-modal-content {
		padding: 25px;
		max-width: 95%;
		margin: 15px;
		border-radius: 20px;
		box-shadow: 0 15px 35px rgba(102, 126, 234, 0.25);
	}

	.rules-modal h2 {
		font-size: 28px;
		margin-bottom: 20px;
	}

	.rules-modal h3 {
		font-size: 22px;
		margin-bottom: 15px;
	}

	.rules-modal p {
		font-size: 15px;
		line-height: 1.6;
		margin-bottom: 15px;
	}

	.rules-modal .rule-item {
		padding: 16px;
		margin-bottom: 15px;
		border-radius: 12px;
	}

	.rules-modal .rule-number {
		font-size: 24px;
		margin-bottom: 8px;
	}

	.rules-modal .close-btn {
		padding: 14px 35px;
		font-size: 17px;
		border-radius: 25px;
		margin-top: 20px;
	}
}

@media only screen
and (max-width: 768px) {
	.rules-modal-content {
		padding: 25px;
		max-width: 90%;
	}

	.rules-modal h2 {
		font-size: 28px;
	}

	.rules-modal .close-btn {
		padding: 14px 35px;
		font-size: 17px;
	}
}