/* ============================================================
   layout.css —— 各功能区块的布局样式
   ============================================================ */

/* ---------- 1. 首屏 Hero 区 ---------- */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 5vw;
}
.hero-title {
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  background: linear-gradient(135deg, #ff6ec7 0%, #ffd700 50%, #9b6dff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(255, 110, 199, 0.5);
  filter: drop-shadow(0 4px 20px rgba(255, 215, 0, 0.3));
  margin-bottom: 20px;
  line-height: 1.2;
}
.type-cursor {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  background: var(--gold);
  margin-left: 4px;
  animation: blink 0.8s steps(2) infinite;
  vertical-align: text-bottom;
}
.hero-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: var(--purple-deep);
  letter-spacing: 6px;
  margin-bottom: 50px;
  opacity: 0;
  animation: fade-up 1s ease 2.5s forwards;
  font-weight: 600;
}
.balloons {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}
.balloon {
  font-size: 3rem;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 10px rgba(255, 110, 199, 0.4));
}
.balloon:nth-child(2) { animation-delay: 0.5s; animation-duration: 3.5s; }
.balloon:nth-child(3) { animation-delay: 1s; animation-duration: 2.8s; }
.hero-cake {
  font-size: 8rem;
  animation: cake-bounce 2s ease-in-out infinite;
  filter: drop-shadow(0 8px 30px rgba(255, 215, 0, 0.5));
  cursor: pointer;
}
.scroll-hint {
  position: absolute;
  bottom: 30px;
  font-size: 1.5rem;
  animation: scroll-bounce 2s ease-in-out infinite;
  opacity: 0.7;
}

/* ---------- 2. 生日倒计时 ---------- */
#countdown .glass-card { text-align: center; }
.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.countdown-box {
  min-width: 100px;
  padding: 24px 16px;
  background: linear-gradient(135deg, rgba(255, 107, 165, 0.15), rgba(176, 124, 216, 0.15));
  border: 2px solid var(--glass-border);
  border-radius: 20px;
}
.countdown-num {
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink), var(--purple-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.countdown-label {
  font-size: 0.95rem;
  color: var(--purple-deep);
  margin-top: 6px;
  letter-spacing: 2px;
  font-weight: 600;
}
.today-celebration {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  animation: pulse-gold 1.5s ease-in-out infinite;
}

/* ---------- 4. 祝福语轮播 ---------- */
.carousel-container {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  min-height: 180px;
}
.carousel-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s;
  transform: translateY(20px);
  text-align: center;
}
.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.blessing-text {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  line-height: 1.8;
  color: var(--text-main);
  padding: 0 20px;
  font-weight: 600;
}
.blessing-author {
  display: block;
  margin-top: 16px;
  font-size: 1rem;
  color: var(--purple-deep);
  letter-spacing: 2px;
  font-weight: 600;
}
.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 30px;
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(176, 124, 216, 0.3);
  cursor: pointer;
  transition: all 0.3s;
}
.dot.active {
  background: var(--gold);
  width: 28px;
  border-radius: 5px;
}

/* ---------- 8. 蛋糕互动区 ---------- */
.cake-interact { text-align: center; }
.cake-stage {
  font-size: 7rem;
  cursor: pointer;
  display: inline-block;
  transition: transform 0.3s;
  filter: drop-shadow(0 8px 25px rgba(255, 215, 0, 0.4));
  position: relative;
}
.cake-stage:hover { transform: scale(1.1); }

/* ---------- 5. 互动许愿 ---------- */
.wish-section { text-align: center; }
.wish-result {
  margin-top: 30px;
  min-height: 60px;
  font-size: 1.3rem;
  color: var(--purple-deep);
  opacity: 0;
  transition: opacity 0.5s;
  font-weight: 700;
}
.wish-result.show { opacity: 1; }

/* ---------- 愿望成真层（大蛋糕） ---------- */
.wish-come-true {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 200;
  pointer-events: none;
  opacity: 0;
}
.wish-come-true.show { animation: wish-burst 2.5s ease-out forwards; }
.big-cake-celebrate {
  text-align: center;
  filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.5));
}
.big-cake-celebrate svg {
  max-width: 80vw;
  height: auto;
}

/* ---------- 响应式（布局相关） ---------- */
@media (max-width: 768px) {
  .countdown-grid { gap: 10px; }
  .countdown-box { min-width: 75px; padding: 16px 10px; }
  .countdown-num { font-size: 2rem; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 2.5rem; }
  .balloons { gap: 12px; }
  .balloon { font-size: 2rem; }
  .carousel-btn { width: 40px; height: 40px; }
}
