/* ============================================================
   Happy Birthday to Ms. Zhang — Shared Stylesheet
   Used by: index.html + all years/YYYY.html pages
   ============================================================ */

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Georgia", "Noto Serif SC", "STSong", "SimSun", serif;
  background: linear-gradient(170deg, #fef7f2 0%, #fce4d6 30%, #fdf0e8 60%, #faf0e6 100%);
  color: #4a3728;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== Floating Petals ===== */
.petals-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.petal {
  position: absolute;
  top: -10%;
  opacity: 0;
  animation: fall linear infinite;
  font-size: 24px;
}
@keyframes fall {
  0%   { transform: translateY(0) rotate(0deg) scale(0.6); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(110vh) rotate(720deg) scale(1); opacity: 0; }
}

/* ===== Wrapper ===== */
.wrapper { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  padding: 80px 0 50px;
  animation: fadeInUp 1.2s ease-out;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-block;
  background: #e8b4b8;
  color: #fff;
  padding: 6px 24px;
  border-radius: 20px;
  font-size: 14px;
  letter-spacing: 3px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(40px, 8vw, 72px);
  font-weight: normal;
  color: #c97b84;
  line-height: 1.3;
  margin-bottom: 12px;
}
.hero h1 .name {
  display: block;
  font-size: clamp(28px, 5vw, 42px);
  color: #6b4c3b;
  margin-top: 4px;
}

.hero .candle-line {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 20px;
  font-size: 28px;
}
.hero .candle-line span {
  animation: flicker 1.5s ease-in-out infinite;
}
.hero .candle-line span:nth-child(2) { animation-delay: 0.2s; }
.hero .candle-line span:nth-child(3) { animation-delay: 0.4s; }
.hero .candle-line span:nth-child(4) { animation-delay: 0.6s; }
.hero .candle-line span:nth-child(5) { animation-delay: 0.8s; }
@keyframes flicker {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

.hero .subtitle {
  font-size: 18px;
  color: #a0806c;
  max-width: 500px;
  margin: 0 auto;
  font-style: italic;
}

/* ===== Divider ===== */
.divider {
  text-align: center;
  padding: 20px 0 40px;
  font-size: 20px;
  color: #d4a89a;
  letter-spacing: 8px;
}

/* ===== Gallery Section ===== */
.gallery-section {
  padding-bottom: 40px;
  animation: fadeInUp 1.2s ease-out 0.3s both;
}
.gallery-section h2 {
  text-align: center;
  font-weight: normal;
  font-size: 24px;
  color: #8b6958;
  margin-bottom: 10px;
}
.gallery-section .hint {
  text-align: center;
  font-size: 14px;
  color: #b89b8a;
  margin-bottom: 30px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.gallery .card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  cursor: pointer;
  aspect-ratio: 4 / 3;
}
.gallery .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}
.gallery .card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.gallery .card:hover img { transform: scale(1.05); }
.gallery .card .caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  color: #fff;
  padding: 30px 14px 10px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery .card:hover .caption { opacity: 1; }

/* ===== Message Section ===== */
.message-section {
  text-align: center;
  padding: 50px 20px 40px;
  animation: fadeInUp 1.2s ease-out 0.6s both;
}
.message-section blockquote {
  font-size: 20px;
  color: #8b6958;
  max-width: 580px;
  margin: 0 auto;
  font-style: italic;
  line-height: 2;
  border-left: 3px solid #e8b4b8;
  padding-left: 20px;
  text-align: left;
}
.message-section .signature {
  margin-top: 16px;
  color: #b89b8a;
  font-size: 15px;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 40px 0 60px;
  font-size: 13px;
  color: #c4a89a;
}
.footer .heart { color: #e8b4b8; }

/* ===== Footer Navigation (Previous Years) ===== */
.footer-nav {
  text-align: center;
  padding: 30px 20px 20px;
  border-top: 1px solid #f0d8cc;
  margin-top: 20px;
}
.footer-nav .nav-label {
  font-size: 14px;
  color: #b89b8a;
  margin-bottom: 16px;
  letter-spacing: 2px;
}
.footer-nav .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.footer-nav .year-link {
  display: inline-block;
  padding: 8px 22px;
  border: 1.5px solid #e8b4b8;
  border-radius: 24px;
  color: #c97b84;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  background: transparent;
}
.footer-nav .year-link:hover {
  background: #e8b4b8;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(232, 180, 184, 0.35);
}
.footer-nav .nav-empty {
  font-size: 13px;
  color: #c4a89a;
  font-style: italic;
}

/* ===== Lightbox ===== */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 999;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.25s ease;
}
.lightbox.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
  animation: zoomIn 0.3s ease;
}
@keyframes zoomIn { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.lightbox-close {
  position: absolute;
  top: 20px; right: 30px;
  font-size: 36px;
  color: #fff;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }
.lightbox .caption {
  position: absolute;
  bottom: 30px;
  color: #fff;
  font-size: 15px;
  text-align: center;
  width: 100%;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .hero { padding: 50px 0 30px; }
  .hero h1 { font-size: 36px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .message-section blockquote { font-size: 16px; }
  .footer-nav .nav-links { gap: 8px; }
  .footer-nav .year-link { padding: 6px 16px; font-size: 13px; }
}

/* ===== Photo Placeholder Styling ===== */
.gallery .placeholder-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fef0f2, #fde8e8, #fef0f2);
  border: 2px dashed #e8c4c8;
}
.gallery .placeholder-card .icon {
  font-size: 40px;
  margin-bottom: 8px;
  opacity: 0.6;
}
.gallery .placeholder-card .text {
  font-size: 12px;
  color: #c49a9a;
  text-align: center;
  line-height: 1.6;
  padding: 0 12px;
}
