body {
	margin: 0;
	padding: 0;
	background: linear-gradient(to bottom, #E6F3FF 0%, #F0F8FF 30%, #F8FCFF 60%, #FDFEFF 100%);
	font-size: 14px;
	font-family: '微软雅黑', '宋体', sans-serif;
	color: #FF6B9D;
	overflow: auto
}

a {
	color: #FF69B4;
	font-size: 14px;
}

#main {
	width: 100%;
}

#wrap {
	position: relative;
	margin: 0 auto;
	width: 1100px;
	height: 900px;
	margin-top: 10px;
	z-index: 1;
}

#text {
	width: auto;
	max-width: 90%;
	height: auto;
	left: 25%;
	top: 5%;
	transform: translateX(-50%);
	position: absolute;
	text-align: left;
	white-space: nowrap;
	z-index: 100;
}

#code {
	display: none;
	font-size: 18px;
	color: #FF69B4;
	line-height: 1.8;
}

#clock-box {
	position: absolute;
	left: 30%;
	top: 800px;
	transform: translateX(-50%);
	display: none;
	text-align: center;
	z-index: 10;
}

#clock {
	font-size: 24px;
	color: #FF6B9D;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 12px;
	line-height: 1;
	white-space: nowrap;
}

.time-label {
	font-size: 24px;
	margin-right: 10px;
	line-height: 70px;
	white-space: nowrap;
	color: #ffdf42;
}

.time-unit {
	font-size: 24px;
	color: #ffdf42;
	line-height: 70px;
	white-space: nowrap;
}

.days-wrapper {
	display: inline-flex;
	align-items: center;
	height: 70px;
}

.days {
	font-size: 56px;
	font-weight: bold;
	color: #FF69B4;
	display: inline-block;
	line-height: 1;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.days.changing {
	animation: fadeSlide 0.5s ease;
}

@keyframes fadeSlide {
	0% {
		opacity: 1;
		transform: translateY(0);
	}
	50% {
		opacity: 0;
		transform: translateY(-10px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

.flip-wrapper {
	display: inline-flex;
	align-items: center;
	perspective: 300px;
	height: 70px;
}

.flip-card {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 70px;
	height: 70px;
	font-size: 56px;
	font-weight: bold;
	color: #FF6B9D;
	background: rgba(255, 182, 193, 0.3);
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(255, 105, 180, 0.2);
	transition: transform 0.6s ease;
}

.flip-card.flipping {
	animation: flipScale 0.6s ease;
}

@keyframes flipScale {
	0% {
		transform: rotateY(0deg) scale(1);
	}
	50% {
		transform: rotateY(90deg) scale(0.8);
	}
	100% {
		transform: rotateY(0deg) scale(1);
	}
}

.seconds-wrapper {
	display: inline-flex;
	align-items: center;
	height: 70px;
}

.seconds {
	font-size: 56px;
	font-weight: bold;
	color: #FFB347;
	display: inline-block;
	line-height: 1;
	animation: bounce 1s ease infinite;
}

@keyframes bounce {
	0%, 100% {
		transform: translateY(0) scale(1);
	}
	50% {
		transform: translateY(-8px) scale(1.05);
	}
}

#canvas {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 1100px;
	height: 900px;
	z-index: 1;
}

#error {
	margin: 0 auto;
	text-align: center;
	margin-top: 60px;
	display: none;
}

.hand {
	cursor: pointer;
}

.say {
	margin-left: 5px;
}

.space {
	margin-right: 150px;
}

@media screen and (max-width: 768px) {
	#wrap {
		width: 1100px;
		height: 900px;
		margin-top: 0;
		transform: scale(0.9);
		transform-origin: center center;
		position: fixed;
		top: 50%;
		left: 50%;
		margin-left: -550px;
		margin-top: -450px;
		transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
		            margin-left 0.6s cubic-bezier(0.4, 0, 0.2, 1),
		            margin-top 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	}

	#wrap.focus-left {
		transform: scale(1.8);
		margin-left: -350px;
		margin-top: -250px;
	}

	#canvas {
		width: 1100px;
		height: 900px;
	}

	#text {
		width: auto;
		max-width: 95%;
		left: 50%;
		top: 3%;
		transform: translateX(-50%);
		white-space: nowrap;
	}

	#code {
		font-size: 12px;
	}

	#clock-box {
		left: 30%;
		top: 800px;
		transform: translateX(-50%);
	}

	#clock {
		font-size: 20px;
		gap: 10px;
	}

	.time-label {
		font-size: 33px;
		line-height: 60px;
	}

	.time-unit {
		font-size: 25px;
		line-height: 60px;
	}

	.days-wrapper {
		height: 60px;
	}

	.days {
		font-size: 48px;
	}

	.flip-wrapper {
		height: 60px;
	}

	.flip-card {
		width: 60px;
		height: 60px;
		font-size: 48px;
	}

	.seconds-wrapper {
		height: 60px;
	}

	.seconds {
		font-size: 48px;
	}
}

@media screen and (max-width: 480px) {
	#wrap {
		transform: scale(0.35);
		margin-left: -550px;
		margin-top: -450px;
		transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
		            margin-left 0.6s cubic-bezier(0.4, 0, 0.2, 1),
		            margin-top 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	}

	#wrap.focus-left {
		transform: scale(0.8);
		margin-left: -320px;
		margin-top: -280px;
	}

	#canvas {
		width: 1100px;
		height: 900px;
	}
}

@media screen and (orientation: landscape) and (max-height: 600px) {
	#clock-box {
		bottom: 8%;
	}

	#clock {
		font-size: 12px;
		gap: 4px;
	}

	.time-label, .time-unit {
		font-size: 12px;
		line-height: 30px;
	}

	.days-wrapper, .flip-wrapper, .seconds-wrapper {
		height: 30px;
	}

	.days, .seconds {
		font-size: 24px;
	}

	.flip-card {
		width: 30px;
		height: 30px;
		font-size: 24px;
	}
}