/* ============================================================
   谭歆贻 · 11月24日生日倒计时
   配色与动效沿用原版风格：#ee9ca7 粉 + 白色方块气泡 + 半透明圆角卡片
   ============================================================ */

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

html,
body {
	width: 100%;
	height: 100%;
}

body {
	font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
	color: #fff;
	background: #ee9ca7;
	overflow: hidden;
	-webkit-tap-highlight-color: transparent;
}

/* ---------------- 气泡方块（原版同款） ---------------- */
.bg-bubbles {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	pointer-events: none;
}

.bg-bubbles li {
	position: absolute;
	list-style: none;
	display: block;
	width: 40px;
	height: 40px;
	background-color: rgba(255, 255, 255, .15);
	bottom: -160px;
	animation: square 30s infinite linear;
}

.bg-bubbles li:nth-child(1) { left: 10%; }

.bg-bubbles li:nth-child(2) {
	left: 20%;
	width: 80px;
	height: 80px;
	animation-delay: 2s;
	animation-duration: 17s;
}

.bg-bubbles li:nth-child(3) {
	left: 25%;
	animation-delay: 4s;
}

.bg-bubbles li:nth-child(4) {
	left: 40%;
	width: 60px;
	height: 60px;
	animation-duration: 22s;
	background-color: rgba(255, 255, 255, .25);
}

.bg-bubbles li:nth-child(5) { left: 70%; }

.bg-bubbles li:nth-child(6) {
	left: 80%;
	width: 120px;
	height: 120px;
	animation-delay: 3s;
	background-color: rgba(255, 255, 255, .2);
}

.bg-bubbles li:nth-child(7) {
	left: 32%;
	width: 160px;
	height: 160px;
	animation-delay: 7s;
}

.bg-bubbles li:nth-child(8) {
	left: 55%;
	width: 20px;
	height: 20px;
	animation-delay: 15s;
	animation-duration: 40s;
}

.bg-bubbles li:nth-child(9) {
	left: 25%;
	width: 10px;
	height: 10px;
	animation-delay: 2s;
	animation-duration: 40s;
	background-color: rgba(255, 255, 255, .3);
}

.bg-bubbles li:nth-child(10) {
	left: 90%;
	width: 160px;
	height: 160px;
	animation-delay: 11s;
}

@keyframes square {
	0% { transform: translateY(0) rotate(0deg); }
	100% { transform: translateY(-900px) rotate(600deg); }
}

/* ---------------- 主体舞台 ---------------- */
.stage {
	position: fixed;
	inset: 0;
	animation: stageIn .8s ease both;
}

@keyframes stageIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.bgcolor {
	position: absolute;
	inset: 0;
	background: #ee9ca7;
	background: linear-gradient(to bottom right, #ee9ca7 0%, #ee9ca7 100%);
	opacity: .9;
	z-index: 0;
}

.view {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	z-index: 3;
	opacity: 0;
	visibility: hidden;
	transition: opacity .7s ease, visibility .7s ease;
}

.view.on {
	opacity: 1;
	visibility: visible;
}

/* ---------------- 卡片 ---------------- */
.card {
	width: 100%;
	max-width: 620px;
	padding: 46px 34px 40px;
	text-align: center;
	background: rgba(255, 255, 255, .6);
	border: 1px solid rgba(255, 255, 255, .75);
	border-radius: 14px;
	box-shadow: 0 18px 50px rgba(190, 110, 120, .28);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	animation: cardIn .9s cubic-bezier(.2, .8, .3, 1) both;
}

@keyframes cardIn {
	from { opacity: 0; transform: translateY(26px) scale(.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.hi {
	font-size: 26px;
	letter-spacing: 3px;
	color: #8a4a56;
}

.date-line {
	margin-top: 10px;
	font-size: 15px;
	letter-spacing: 2px;
	color: #a9616e;
}

.date-line b {
	font-size: 26px;
	font-weight: 600;
	color: #b0566a;
	font-variant-numeric: tabular-nums;
	text-shadow: 0 1px 8px rgba(255, 255, 255, .6);
	letter-spacing: 1px;
}

/* ---------------- 倒计时数字 ---------------- */
.clock {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin: 28px 0 26px;
}

.unit {
	flex: 1 1 0;
	max-width: 128px;
	padding: 16px 6px 12px;
	border-radius: 12px;
	background: rgba(255, 255, 255, .55);
	border: 1px solid rgba(255, 255, 255, .85);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 6px 18px rgba(190, 110, 120, .16);
}

.unit b {
	display: block;
	font-size: 44px;
	font-weight: 600;
	line-height: 1.1;
	color: #b0566a;
	font-variant-numeric: tabular-nums;
	letter-spacing: 1px;
	text-shadow: 0 2px 10px rgba(255, 255, 255, .6);
}

.unit span {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	letter-spacing: 3px;
	color: #a9616e;
}

.unit.tick b {
	animation: tick .55s ease;
}

@keyframes tick {
	0% { transform: translateY(-6px); opacity: .35; }
	100% { transform: translateY(0); opacity: 1; }
}

/* ---------------- 进度条 ---------------- */
.progress {
	height: 8px;
	border-radius: 8px;
	background: rgba(255, 255, 255, .5);
	overflow: hidden;
	box-shadow: inset 0 1px 3px rgba(160, 90, 100, .18);
}

.progress-bar {
	width: 0;
	height: 100%;
	border-radius: 8px;
	background: linear-gradient(90deg, #f6b6be 0%, #e87e8e 100%);
	transition: width 1s ease;
}

.progress-txt {
	margin-top: 12px;
	font-size: 14px;
	letter-spacing: 1px;
	color: #a9616e;
}

.wish {
	margin-top: 30px;
	min-height: 34px;
	font-size: 20px;
	letter-spacing: 2px;
	color: #8a4a56;
	transition: opacity .6s ease;
}

.wish.fade {
	opacity: 0;
}

/* ---------------- 生日当天：原版蛋糕页 ---------------- */
.view-party {
	display: block;
	padding: 0;
}

#partyFrame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

/* ---------------- 音乐按钮 ---------------- */
.music-btn {
	position: absolute;
	right: 20px;
	bottom: 20px;
	z-index: 15;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .8);
	background: rgba(255, 255, 255, .45);
	color: #b0566a;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: all .3s;
}

.music-btn:hover {
	background: rgba(255, 255, 255, .8);
}

.music-btn.playing {
	animation: spin 4s linear infinite;
}

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

/* ---------------- 小屏适配 ---------------- */
@media (max-width: 600px) {
	.view-count { padding: 16px; }
	.card { padding: 32px 18px 28px; border-radius: 12px; }
	.hi { font-size: 21px; }
	.clock { gap: 7px; margin: 22px 0 20px; }
	.unit { padding: 12px 2px 9px; border-radius: 10px; }
	.unit b { font-size: 27px; }
	.unit span { font-size: 11px; letter-spacing: 1px; }
	.wish { font-size: 16px; min-height: 28px; margin-top: 22px; }
}
