/* ==========================================================================
   专属贺卡 V1 · 翻卡
   依赖：theme.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1 · 舞台
   -------------------------------------------------------------------------- */
body.home {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.stage {
	position: relative;
	z-index: 1;
	flex: 1 1 auto;
	display: grid;
	place-items: center;
	padding: clamp(28px, 6vh, 70px) 20px clamp(112px, 15vh, 148px);
}

/* --------------------------------------------------------------------------
   2 · 卡片容器与翻转
   -------------------------------------------------------------------------- */
.card-container {
	width: min(92vw, 640px, calc(62vh * 1.5));
	aspect-ratio: 3 / 2;
	perspective: 1600px;
}

.card {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: var(--r-xl);
	transform-style: preserve-3d;
	transition: transform 1s var(--ease);
	cursor: pointer;
}

.card:hover,
.card.is-flipped {
	transform: rotateY(180deg);
}

.card-front,
.card-back {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: clamp(20px, 3.2vw, 40px);
	border-radius: var(--r-xl);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

/* --------------------------------------------------------------------------
   3 · 卡片正面（夜色井场）
   -------------------------------------------------------------------------- */
.card-front {
	color: var(--text);
	border: 1px solid var(--hair-2);
	background-image:
		radial-gradient(120% 82% at 50% -18%, rgba(233, 180, 92, 0.20), transparent 62%),
		radial-gradient(92% 62% at 50% 122%, rgba(184, 52, 31, 0.18), transparent 66%),
		linear-gradient(160deg, #0d1b28 0%, #091420 48%, #060d15 100%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.07),
		inset 0 0 70px rgba(0, 0, 0, 0.55),
		var(--shadow-xl),
		var(--shadow-glow);
}

/* 内侧细框 */
.card-front::before {
	content: "";
	position: absolute;
	inset: clamp(9px, 1.4vw, 14px);
	border: 1px solid rgba(233, 180, 92, 0.12);
	border-radius: calc(var(--r-xl) - 9px);
	pointer-events: none;
}

/* 顶部灯带高光 */
.card-front::after {
	content: "";
	position: absolute;
	top: 0;
	left: 12%;
	right: 12%;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(243, 213, 154, 0.6), transparent);
	pointer-events: none;
}

/* 粒子画布 */
.particles {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	transition: transform 0.7s var(--ease);
}

/* 抽油机 */
.oil-rig {
	width: clamp(58px, 10.5vw, 92px);
	height: auto;
	color: var(--gold-400);
	fill: currentColor;
	margin-bottom: clamp(8px, 1.8vh, 18px);
	filter: drop-shadow(0 8px 24px rgba(233, 180, 92, 0.38));
	position: relative;
}

/* 主标题 */
.card-title {
	position: relative;
	margin: 0 0 0.55em;
	color: var(--gold-300);
	font-size: clamp(25px, 4.4vw, 42px);
	font-weight: 800;
	letter-spacing: 0.16em;
	text-indent: 0.16em;
	line-height: 1.15;
	text-shadow: 0 10px 40px rgba(233, 180, 92, 0.25);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	.card-title {
		background-image: linear-gradient(180deg, var(--gold-200) 0%, var(--gold-400) 52%, var(--gold-600) 100%);
		-webkit-background-clip: text;
		background-clip: text;
		-webkit-text-fill-color: transparent;
		text-shadow: none;
		filter: drop-shadow(0 8px 26px rgba(233, 180, 92, 0.22));
	}
}

.card-front p {
	position: relative;
	color: var(--text-dim);
	font-size: clamp(12.5px, 1.5vw, 15.5px);
	letter-spacing: 0.18em;
	text-indent: 0.18em;
	line-height: 2.05;
	text-align: center;
}

/* 署名（正面） */
.signature {
	position: absolute;
	right: clamp(16px, 3vw, 30px);
	bottom: clamp(12px, 2.4vh, 22px);
	color: rgba(233, 180, 92, 0.66);
	font-family: var(--font-serif);
	font-size: 12.5px;
	font-style: italic;
	letter-spacing: 0.06em;
}

/* 探索提示 */
.hint {
	position: absolute;
	left: 0;
	right: 0;
	bottom: clamp(12px, 2.4vh, 22px);
	width: max-content;
	margin-inline: auto;
	display: flex;
	align-items: center;
	gap: 8px;
	color: rgba(233, 180, 92, 0.85);
	font-size: 12.5px;
	letter-spacing: 0.2em;
	opacity: 0;
	pointer-events: none;
	animation: hintFade 2.6s ease-in-out infinite;
}

.hint .arrow {
	width: 17px;
	height: 17px;
	fill: currentColor;
	opacity: 0.9;
	animation: float 1.8s ease-in-out infinite;
}

@keyframes hintFade {
	0%,
	100% {
		opacity: 0;
		transform: translateY(0);
	}

	50% {
		opacity: 1;
		transform: translateY(-5px);
	}
}

@keyframes float {
	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-7px);
	}
}

/* --------------------------------------------------------------------------
   4 · 卡片背面（暖纸信笺）
   -------------------------------------------------------------------------- */
.card-back {
	color: var(--on-paper);
	border: 1px solid rgba(184, 52, 31, 0.18);
	transform: rotateY(180deg);
	background-image:
		radial-gradient(120% 72% at 50% -8%, rgba(255, 255, 255, 0.9), transparent 58%),
		linear-gradient(165deg, #faf5e9 0%, #f2e9d7 52%, #e9dcc4 100%);
	box-shadow:
		inset 0 1px 0 #fff,
		inset 0 0 60px rgba(138, 101, 38, 0.09),
		0 40px 90px -40px rgba(0, 0, 0, 0.95);
}

/* 背面抽油机水印 */
.rig-mark {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -16%;
	width: 68%;
	height: auto;
	margin-inline: auto;
	color: var(--oil-500);
	fill: currentColor;
	opacity: 0.045;
	pointer-events: none;
}

/* 内侧细框（与正面呼应） */
.card-back::before {
	content: "";
	position: absolute;
	inset: clamp(9px, 1.4vw, 14px);
	border: 1px solid rgba(184, 52, 31, 0.10);
	border-radius: calc(var(--r-xl) - 9px);
	pointer-events: none;
}

.card-back h2 {
	position: relative;
	margin: 0 0 0.7em;
	color: var(--oil-500);
	font-size: clamp(19px, 2.8vw, 27px);
	font-weight: 800;
	letter-spacing: 0.1em;
	text-indent: 0.1em;
}

.card-back p {
	position: relative;
	color: var(--on-paper-dim);
	font-family: var(--font-serif);
	font-size: clamp(12.5px, 1.45vw, 15.5px);
	letter-spacing: 0.1em;
	text-indent: 0.1em;
	line-height: 1.95;
	text-align: center;
}

.card-back .card-note {
	margin-top: 1.1em;
	color: var(--on-paper-mute);
	font-size: clamp(11.5px, 1.3vw, 13.5px);
}

.signature-one {
	position: absolute;
	right: clamp(16px, 3vw, 30px);
	bottom: clamp(12px, 2.4vh, 22px);
	color: var(--on-paper-mute);
	font-family: var(--font-serif);
	font-size: 12.5px;
	font-style: italic;
	letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   5 · 版本入口
   -------------------------------------------------------------------------- */
.actions {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: center;
	margin-top: clamp(24px, 4.4vh, 44px);
}

/* --------------------------------------------------------------------------
   6 · 彩蛋：隐形触发区 + 风图标
   -------------------------------------------------------------------------- */
.wind-trigger {
	position: fixed;
	top: 0;
	left: 0;
	width: 100px;
	height: 100px;
	z-index: 999;
	cursor: pointer;
}

.wind-icon {
	position: fixed;
	top: 15px;
	left: 15px;
	width: 50px;
	height: 50px;
	z-index: 1000;
	color: rgba(233, 180, 92, 0.72);
	fill: currentColor;
	cursor: pointer;
	filter: drop-shadow(0 6px 18px rgba(233, 180, 92, 0.42));
	transition: color 0.3s ease, transform 0.3s ease;
	animation: windFloat 2.6s ease-in-out infinite;
}

.wind-icon:hover {
	color: var(--gold-200);
	transform: rotate(25deg) scale(1.3);
}

@keyframes windFloat {
	0%,
	100% {
		translate: 0 0;
	}

	50% {
		translate: 0 -5px;
	}
}

/* --------------------------------------------------------------------------
   7 · 彩蛋弹窗
   -------------------------------------------------------------------------- */
.egg-panel {
	width: min(640px, 100%);
	max-height: min(80vh, 780px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: clamp(26px, 4vw, 44px);
}

.egg-panel:focus {
	outline: none;
}

.egg-panel p {
	margin: 16px 0;
	color: var(--on-paper-dim);
	font-family: var(--font-serif);
	font-size: 14.5px;
	line-height: 1.92;
	letter-spacing: 0.02em;
}

.egg-panel .timestamp {
	margin-top: 30px;
	padding-top: 18px;
	border-top: 1px dashed rgba(138, 122, 99, 0.32);
	color: var(--on-paper-mute);
	text-align: right;
	font-family: var(--font-serif);
	font-size: 13.5px;
	line-height: 2;
}

.egg-panel::-webkit-scrollbar-thumb {
	background: linear-gradient(180deg, #c9b28c, #a08e73);
	border-color: #f2e9d7;
}

.egg-panel::-webkit-scrollbar-track {
	background: transparent;
}

/* 更新日志入口 */
.foot-tail {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.log-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 11px 4px 9px;
	border: 1px solid var(--hair);
	border-radius: 999px;
	color: var(--text-mute);
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.02em;
	transition: color 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.log-btn:hover {
	color: var(--gold-300);
	border-color: var(--hair-2);
	background-color: rgba(233, 180, 92, 0.09);
}

.log-btn .ico {
	width: 13px;
	height: 13px;
}

/* --------------------------------------------------------------------------
   8 · 更新日志弹窗
   -------------------------------------------------------------------------- */
.log-panel {
	width: min(700px, 100%);
	max-height: min(86vh, 800px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: clamp(26px, 4vw, 42px);
}

.log-panel:focus {
	outline: none;
}

.log-panel::-webkit-scrollbar-thumb {
	background: linear-gradient(180deg, #c9b28c, #a08e73);
	border-color: #f2e9d7;
}

.log-panel::-webkit-scrollbar-track {
	background: transparent;
}

.log-title {
	color: var(--on-paper);
	font-size: clamp(20px, 2.6vw, 25px);
	font-weight: 800;
	letter-spacing: 0.14em;
	text-indent: 0.14em;
}

.log-meta {
	margin-top: 8px;
	color: var(--on-paper-mute);
	font-family: var(--font-mono);
	font-size: 12.5px;
	letter-spacing: 0.03em;
}

.log-lead {
	margin-top: 15px;
	padding-bottom: 4px;
	color: var(--on-paper-dim);
	font-family: var(--font-serif);
	font-size: 14.5px;
	line-height: 1.95;
}

.log-group {
	margin-top: 20px;
}

.log-group__name {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--oil-500);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-indent: 0.22em;
}

.log-group__name::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background-image: linear-gradient(90deg, rgba(184, 52, 31, 0.3), transparent);
}

.log-list {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.log-list li {
	position: relative;
	margin: 5px 0;
	padding-left: 16px;
	color: var(--on-paper-dim);
	font-family: var(--font-serif);
	font-size: 14px;
	line-height: 1.9;
}

.log-list li::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 0.74em;
	width: 5px;
	height: 5px;
	border: 1px solid rgba(184, 52, 31, 0.45);
	border-radius: 50%;
}

/* --------------------------------------------------------------------------
   9 · 底部固定栏
   -------------------------------------------------------------------------- */
.site-footer {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1000;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--hair);
	background-image: linear-gradient(180deg, rgba(7, 13, 20, 0.62), rgba(4, 8, 13, 0.94));
	-webkit-backdrop-filter: blur(16px) saturate(1.1);
	backdrop-filter: blur(16px) saturate(1.1);
	box-shadow: 0 -22px 50px -34px rgba(0, 0, 0, 0.95);
}

/* 音乐控制 */
.music-control {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px 6px 11px;
	border: 1px solid var(--hair);
	border-radius: 999px;
	color: var(--gold-300);
	background-color: rgba(233, 180, 92, 0.06);
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.music-control:hover {
	color: var(--gold-200);
	border-color: var(--hair-2);
	background-color: rgba(233, 180, 92, 0.13);
}

.music-icon {
	width: 18px;
	height: 18px;
	fill: currentColor;
	flex: none;
}

.music-text {
	font-size: 12.5px;
	letter-spacing: 0.08em;
}

.music-control.is-playing .music-icon {
	animation: musicPulse 1.8s ease-in-out infinite;
}

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

	50% {
		opacity: 1;
		transform: scale(1.1);
	}
}

/* --------------------------------------------------------------------------
   10 · 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 660px) {
	/* 署名与提示改为流内堆叠，避免在窄卡片上重叠 */
	.signature {
		position: static;
		order: 8;
		align-self: flex-end;
		margin-top: 1.6em;
		font-size: 11.5px;
	}

	.hint {
		position: static;
		order: 9;
		margin: 12px auto 0;
		font-size: 11.5px;
		letter-spacing: 0.16em;
	}

	.signature-one {
		position: static;
		order: 8;
		align-self: flex-end;
		margin-top: 1.2em;
		font-size: 11.5px;
	}
}

@media (max-width: 560px) and (min-height: 620px) {
	.card-container {
		width: min(86vw, 380px);
		aspect-ratio: 4 / 5;
	}
}

@media (max-width: 768px) {
	.music-text {
		display: none;
	}

	.music-control {
		padding: 7px;
	}

	.beian-container {
		gap: 8px 14px;
		padding: 0 14px;
	}

	.beian-logo {
		height: 16px;
	}

	.gongan-link,
	.icp-link {
		font-size: 12px;
	}
}
