/* ============================================================
   我们的恋爱小窝 · 清新温馨风
   ============================================================ */

:root {
  --bg: #faf1e4;
  --bg-soft: #fdf8f0;
  --card: #ffffff;
  --pink: #f7a8b8;
  --pink-deep: #f0768f;
  --pink-light: #fce4ea;
  --peach: #ffe3d5;
  --cream: #fff0e6;
  --text: #6e4b4b;
  --text-soft: #a98787;
  --line: #f4dede;
  --heart: #f76c8a;
  --shadow: 0 10px 30px rgba(240, 118, 143, 0.12);
  --radius: 20px;
  --serif: "Kaiti SC", "STKaiti", "KaiTi", "DFKai-SB", "STSong", "SimSun", serif;
  --sans: -apple-system, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --heart-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cpath d='M70 110 C40 85 25 70 25 50 C25 35 35 25 48 25 C57 25 65 30 70 38 C75 30 83 25 92 25 C105 25 115 35 115 50 C115 70 100 85 70 110 Z' fill='%23f7a8b8' fill-opacity='0.14'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background-color: var(--bg);
  background-image: var(--heart-pattern);
  background-size: 140px 140px;
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 241, 228, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--pink-deep);
  text-decoration: none;
  letter-spacing: 1px;
}
.nav-links { display: flex; gap: 22px; }
.nav-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--pink-deep); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 90px 20px 60px;
  background-color: #faf1e4;
  background-image: var(--heart-pattern), linear-gradient(160deg, #fdf6ea 0%, #fbe7d7 45%, #f7d7c2 100%);
  background-size: 140px 140px, auto;
  background-position: 0 0, 0 0;
  background-repeat: repeat, no-repeat;
  overflow: hidden;
}
.hearts-bg { position: absolute; inset: 0; pointer-events: none; }
.heart-float {
  position: absolute;
  bottom: -40px;
  color: rgba(247, 108, 138, 0.28);
  font-size: 22px;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

.hero-inner { position: relative; z-index: 2; max-width: 720px; }
.hero-kicker {
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--text-soft);
  margin-bottom: 16px;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(34px, 7vw, 60px);
  color: var(--text);
  font-weight: 700;
  margin-bottom: 22px;
}
.hero-names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.name-badge {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  padding: 10px 26px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.heart-beat {
  font-size: 30px;
  color: var(--heart);
  animation: beat 1.2s ease-in-out infinite;
}
@keyframes beat {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.25); }
  40% { transform: scale(1); }
  60% { transform: scale(1.18); }
}

.counter-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid #fff;
  border-radius: 28px;
  padding: 34px 40px;
  box-shadow: var(--shadow);
  display: inline-block;
}
.counter-label { color: var(--text-soft); font-size: 15px; margin-bottom: 6px; }
.counter-days {
  font-family: var(--serif);
  color: var(--pink-deep);
  font-weight: 700;
  line-height: 1;
}
.counter-days #days-num { font-size: 74px; }
.counter-unit { font-size: 26px; margin-left: 6px; }
.counter-sub { color: var(--text-soft); font-size: 14px; margin-top: 10px; }

.hero-scroll {
  display: inline-block;
  margin-top: 34px;
  color: var(--pink-deep);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 1px;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------- 通用 section ---------- */
.section { padding: 84px 20px; }
.container { max-width: 1080px; margin: 0 auto; }
.section-title {
  font-family: var(--serif);
  font-size: clamp(26px, 4.5vw, 38px);
  text-align: center;
  color: var(--text);
  font-weight: 700;
}
.section-sub {
  text-align: center;
  color: var(--text-soft);
  font-size: 15px;
  margin: 12px 0 46px;
}

/* ---------- 相识到相恋 ---------- */
.story-stage {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 46px;
}
.story-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 34px;
  text-align: center;
  flex: 1 1 220px;
  max-width: 270px;
}
.story-emoji { font-size: 46px; margin-bottom: 8px; }
.story-tag {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--pink-deep);
}
.story-date {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  margin: 10px 0 6px;
}
.story-text { color: var(--text-soft); font-size: 14px; }

.story-bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  gap: 4px;
}
.bridge-line {
  width: 2px;
  flex: 1;
  min-height: 26px;
  background: linear-gradient(var(--pink-light), var(--pink));
}
.bridge-heart { font-size: 30px; color: var(--heart); animation: beat 1.6s infinite; }
.bridge-days {
  font-size: 13px;
  color: var(--pink-deep);
  white-space: nowrap;
  background: var(--pink-light);
  padding: 4px 12px;
  border-radius: 999px;
}

.anniversary {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.ann-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 22px;
  text-align: center;
  min-width: 150px;
  box-shadow: var(--shadow);
}
.ann-name { font-size: 14px; color: var(--text-soft); }
.ann-date { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--text); }
.ann-countdown { font-size: 13px; color: var(--pink-deep); margin-top: 2px; }

/* ---------- 时光轴 ---------- */
.timeline-list {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding-left: 30px;
}
.timeline-list::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--pink), var(--peach));
}
.tl-item {
  position: relative;
  margin-bottom: 34px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.tl-item.show { opacity: 1; transform: translateY(0); }
.tl-dot {
  position: absolute;
  left: -29px;
  top: 6px;
  width: 20px;
  height: 20px;
  background: #fff;
  border: 3px solid var(--pink);
  border-radius: 50%;
}
.tl-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 26px;
}
.tl-head { display: flex; align-items: center; gap: 10px; }
.tl-emoji { font-size: 26px; }
.tl-title { font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--text); }
.tl-date {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-soft);
  background: var(--cream);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.tl-text { margin-top: 8px; color: #7d5d5d; font-size: 15px; }
.tl-photo-btn {
  margin-top: 12px;
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.tl-photo-btn:hover { opacity: 0.88; transform: translateY(-1px); }

/* ---------- 相册 ---------- */
.album-cat { margin-bottom: 34px; }
.album-cat-title {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.photo-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  background: var(--cream);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.photo-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(240, 118, 143, 0.22); }
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
}
.photo-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 30px 14px 12px;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
}

/* ---------- 想说的话 ---------- */
.quote-card {
  max-width: 680px;
  margin: 0 auto 46px;
  text-align: center;
  padding: 8px 24px;
}
.quote-mark { font-size: 46px; color: var(--pink); line-height: 1; font-family: var(--serif); }
.quote-text {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--text);
  margin-top: 2px;
}
.letters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  margin-bottom: 56px;
}
.letter-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  position: relative;
}
.letter-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.letter-emoji { font-size: 26px; }
.letter-title { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--text); }
.letter-date { font-size: 13px; color: var(--text-soft); }
.letter-text { color: #7d5d5d; font-size: 15px; white-space: pre-wrap; }

/* ---------- 底部 ---------- */
.footer {
  text-align: center;
  padding: 50px 20px 60px;
  background: linear-gradient(180deg, var(--bg), #f7d7c2);
  color: var(--text);
}
.footer p { font-family: var(--serif); font-size: 18px; }
.footer-sub { font-family: var(--sans) !important; font-size: 13px !important; color: var(--text-soft); margin-top: 8px; }
.footer-icp { font-family: var(--sans) !important; font-size: 13px !important; margin-top: 14px; }
.footer-icp a { color: var(--text-soft); text-decoration: none; }
.footer-icp a:hover { color: var(--heart); }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(40, 20, 22, 0.86);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 30px;
}
.lightbox.show { display: flex; }
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  text-align: center;
}
.lightbox-media { display: flex; align-items: center; justify-content: center; }
.lightbox-inner img {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-ph {
  display: none;
  width: min(80vw, 420px);
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  font-size: 120px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-caption { color: #fff; margin-top: 14px; font-size: 15px; }
.lightbox-close {
  position: absolute;
  top: -14px; right: -14px;
  width: 40px; height: 40px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13px; }
  .counter-card { padding: 26px 24px; }
  .counter-days #days-num { font-size: 58px; }
  .story-bridge { flex-direction: row; padding: 14px 0; }
  .bridge-line { width: 26px; height: 2px; min-height: 0; }
}
