/* ============================================================
   节日贺卡共享样式
   每个节日页通过 body 的 theme-xxx 类切换配色主题
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  overflow: hidden;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== 各节日主题背景 ===== */
body.theme-entry      { background: linear-gradient(160deg, #1a2a6c 0%, #7b2d8b 55%, #fdbb2d 100%); }
body.theme-midautumn  { background: linear-gradient(160deg, #0f1b3d 0%, #2c3e7a 55%, #f0c75e 100%); }
body.theme-national   { background: linear-gradient(160deg, #6d0a0a 0%, #c62828 55%, #ffce00 100%); }
body.theme-ninth      { background: linear-gradient(160deg, #5c3a1e 0%, #a9622c 55%, #e8b25e 100%); }
body.theme-christmas  { background: linear-gradient(160deg, #0b2e1f 0%, #14532d 55%, #b91c1c 100%); }
body.theme-newyear    { background: linear-gradient(160deg, #1e1145 0%, #5b2a86 55%, #e8a0bf 100%); }

/* ===== 飘落粒子 ===== */
.particle {
  position: fixed;
  top: -10vh;
  pointer-events: none;
  opacity: 0;
  animation: fall linear forwards;
}
@keyframes fall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.9; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(115vh) rotate(720deg); opacity: 0; }
}

/* 彩带 */
.confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 14px;
  pointer-events: none;
}

/* ===== 贺卡主体 ===== */
.card {
  width: min(92vw, 640px);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  padding: 40px 34px 34px;
  text-align: center;
  color: #2b2b2b;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  cursor: default;
  user-select: none;
  position: relative;
}
.card.deck { transform-style: preserve-3d; }
.card.deck:hover  { background: rgba(255,255,255,0.78); }
.card.deck:active { background: rgba(255,255,255,0.7); }

.deck-hint {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 12px;
  color: #aaa;
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.3; } }

/* 顶部装饰条（随主题变色） */
.ribbon {
  width: 90px;
  height: 10px;
  margin: 0 auto 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #b21f1f, #fdbb2d);
}
body.theme-midautumn .ribbon { background: linear-gradient(90deg, #2c3e7a, #f0c75e); }
body.theme-national  .ribbon { background: linear-gradient(90deg, #c62828, #ffce00); }
body.theme-ninth     .ribbon { background: linear-gradient(90deg, #a9622c, #e8b25e); }
body.theme-christmas .ribbon { background: linear-gradient(90deg, #14532d, #b91c1c); }
body.theme-newyear   .ribbon { background: linear-gradient(90deg, #5b2a86, #e8a0bf); }

.big {
  font-size: 74px;
  line-height: 1;
  margin-bottom: 6px;
}
.title {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 6px;
  background: linear-gradient(90deg, #b21f1f, #d35400);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}
body.theme-midautumn .title { background: linear-gradient(90deg, #2c3e7a, #b8860b); -webkit-background-clip: text; background-clip: text; }
body.theme-national  .title { background: linear-gradient(90deg, #c62828, #e08c00); -webkit-background-clip: text; background-clip: text; }
body.theme-ninth     .title { background: linear-gradient(90deg, #a9622c, #8a8f3c); -webkit-background-clip: text; background-clip: text; }
body.theme-christmas .title { background: linear-gradient(90deg, #14532d, #b91c1c); -webkit-background-clip: text; background-clip: text; }
body.theme-newyear   .title { background: linear-gradient(90deg, #5b2a86, #c2426e); -webkit-background-clip: text; background-clip: text; }

.subtitle {
  font-size: 16px;
  color: #777;
  letter-spacing: 2px;
  margin-bottom: 26px;
}

.message {
  font-size: 18px;
  line-height: 1.9;
  color: #444;
  margin-bottom: 22px;
  letter-spacing: 0.5px;
}
.message p { margin-bottom: 10px; }

/* 签名 */
.sign {
  font-family: "KaiTi", "STKaiti", "楷体", serif;
  font-size: 20px;
  color: #d35400;
  margin-bottom: 10px;
}

/* 卡片入场动画 */
.card-enter { animation: cardIn 0.9s cubic-bezier(.22,1.2,.36,1) both; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(60px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ===== 封面 + 倒计时遮罩 ===== */
.countdown {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  letter-spacing: 2px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.countdown .num { font-size: 120px; line-height: 1; animation: pop 0.5s ease; }
@keyframes pop { 0% { transform: scale(2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.countdown .txt { font-size: 20px; margin-top: 8px; }
.hidden { display: none; }

/* ===== 意境图 ===== */
/* 封面全屏背景图（压暗，衬托文字） */
.cover-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  filter: brightness(0.72) saturate(1.05);
}
#cover, #countWrap { position: relative; }

/* 卡片顶部的通栏出血图 */
.scene {
  display: block;
  width: calc(100% + 68px);
  margin: -40px -34px 18px;
  border-radius: 24px 24px 0 0;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

/* 倒数层文字居中（不能用 flex，否则会压过 .hidden） */
#countWrap { text-align: center; }

/* 封面 */
#cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
#cover .big { animation: float 2.5s ease-in-out infinite; }
@keyframes float {
  50% { transform: translateY(-12px); }
}
.cover-title {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: 6px;
}
.cover-sub {
  font-size: 18px;
  letter-spacing: 1px;
  color: #fff;
}
.open-btn {
  margin-top: 12px;
  background: #fff;
  color: #b21f1f;
  border: none;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 14px 46px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}
.open-btn:hover  { transform: translateY(-3px) scale(1.03); }
.open-btn:active { transform: scale(0.96); }
body.theme-midautumn .open-btn { color: #2c3e7a; }
body.theme-national  .open-btn { color: #c62828; }
body.theme-ninth     .open-btn { color: #a9622c; }
body.theme-christmas .open-btn { color: #14532d; }
body.theme-newyear   .open-btn { color: #5b2a86; }

/* ===== 入口页（节日列表） ===== */
.hub {
  width: min(92vw, 720px);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 24px;
  padding: 44px 36px 36px;
  text-align: center;
  color: #2b2b2b;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}
.hub .big { font-size: 60px; }
.hub-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 4px;
  background: linear-gradient(90deg, #7b2d8b, #d35400);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}
.hub-sub {
  font-size: 15px;
  color: #777;
  letter-spacing: 2px;
  margin-bottom: 28px;
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
}
.hub-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 10px 16px;
  border-radius: 16px;
  background: #faf7f2;
  border: 1px solid #f0e6d8;
  text-decoration: none;
  color: #333;
  transition: transform 0.15s, box-shadow 0.15s;
}
.hub-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}
.hub-emoji { font-size: 34px; line-height: 1; }
.hub-name { font-size: 17px; font-weight: 700; letter-spacing: 2px; }
.hub-date { font-size: 12px; color: #999; letter-spacing: 1px; }
.hub-foot {
  margin-top: 24px;
  font-family: "KaiTi", "STKaiti", "楷体", serif;
  font-size: 15px;
  color: #b0885a;
}