/* =========================================================
   我们的故事 · 星夜玫瑰主题
   ========================================================= */

:root {
  --bg-0: #0a0618;
  --bg-1: #150a28;
  --bg-2: #241038;
  --rose: #ff6b9d;
  --rose-light: #ff8fb3;
  --rose-pale: #ffb3c6;
  --gold: #f2d18a;
  --text: #fdf0f4;
  --text-muted: #cbb4c6;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.10);
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 20% -10%, var(--bg-2) 0%, transparent 60%),
    radial-gradient(1000px 700px at 100% 10%, #2a1038 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-0) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* 背景画布 */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* 所有内容层叠在画布之上 */
.nav, .hero, .quote-section, .timeline-section, .gallery-section,
.letter-section, .footer { position: relative; z-index: 1; }

/* ---------------- 导航 ---------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  z-index: 50;
  background: linear-gradient(180deg, rgba(10,6,24,0.85), transparent);
  transition: background 0.4s ease, padding 0.4s ease;
}
.nav.scrolled {
  background: rgba(10,6,24,0.9);
  backdrop-filter: blur(10px);
  padding: 12px 40px;
  box-shadow: 0 2px 30px rgba(0,0,0,0.4);
}
.nav-brand {
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--rose-light);
}
.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 2px;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--rose-light); }
.nav-add {
  background: linear-gradient(135deg, var(--rose), #ff4d88);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 30px;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 1px;
  box-shadow: 0 4px 20px rgba(255,107,157,0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}
.nav-add:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,107,157,0.6); }

/* ---------------- Hero ---------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 60px;
}
.hero-inner { max-width: 900px; }

.hero-eyebrow {
  font-size: 16px;
  letter-spacing: 6px;
  color: var(--gold);
  margin-bottom: 28px;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 7vw, 68px);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-title .name {
  background: linear-gradient(135deg, var(--rose-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-title .heart {
  color: var(--rose);
  -webkit-text-fill-color: initial;
  animation: heartbeat 1.6s ease-in-out infinite;
  display: inline-block;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.18); }
  40% { transform: scale(1); }
  55% { transform: scale(1.12); }
}
.hero-sub {
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 40px;
}
.hero-sub .em { color: var(--rose-light); font-weight: 600; }

/* 计时器 */
.counter {
  display: inline-block;
  padding: 26px 46px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 50px rgba(255,107,157,0.12);
}
.counter-label {
  font-size: 15px;
  letter-spacing: 4px;
  color: var(--gold);
  margin-bottom: 8px;
}
.counter-main { font-family: var(--font-serif); }
.counter-num {
  font-size: clamp(56px, 10vw, 96px);
  font-weight: 700;
  background: linear-gradient(180deg, #fff, var(--rose-pale));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.counter-unit {
  font-size: 24px;
  color: var(--rose-light);
  margin-left: 8px;
}
.counter-sub {
  margin-top: 10px;
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.hero-qixi {
  margin-top: 40px;
  font-family: var(--font-serif);
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: 4px;
  color: var(--gold);
}

/* 渐变发光爱心（放大跳动） */
.glow-heart {
  display: inline-block;
  font-size: 1.5em;
  background: linear-gradient(135deg, #ff6b9d, #ff4d88, #f2d18a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: heartGlow 1.5s ease-in-out infinite;
}
@keyframes heartGlow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(255,107,157,0.9)); }
  50% { transform: scale(1.35); filter: drop-shadow(0 0 18px rgba(255,77,136,1)); }
}

.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--text-muted);
  animation: float 2.4s ease-in-out infinite;
}
.scroll-hint span { display: block; font-size: 22px; margin-top: 4px; color: var(--rose-light); }
@keyframes float { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -10px); } }

/* 入场动画 */
.fade-up {
  opacity: 0;
  animation: fadeUp 1s ease forwards;
}
.fade-up:nth-child(1) { animation-delay: 0.2s; }
.fade-up:nth-child(2) { animation-delay: 0.5s; }
.fade-up:nth-child(3) { animation-delay: 0.8s; }
.fade-up:nth-child(4) { animation-delay: 1.1s; }
.fade-up:nth-child(5) { animation-delay: 1.4s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- 告白 ---------------- */
.quote-section {
  padding: 120px 20px;
  text-align: center;
}
.quote {
  font-family: var(--font-serif);
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.6;
  letter-spacing: 3px;
  color: var(--text);
}
.quote em {
  font-style: normal;
  color: var(--rose-light);
  background: linear-gradient(135deg, var(--rose-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

/* ---------------- 通用 section 标题 ---------------- */
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 46px);
  letter-spacing: 4px;
  text-align: center;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff, var(--rose-pale));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  letter-spacing: 3px;
  margin-bottom: 60px;
}

/* 滚动显现动画 */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------------- 时间轴 ---------------- */
.timeline-section { padding: 80px 20px; }
.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 0;
}
/* 中线 */
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--rose) 10%, var(--rose) 90%, transparent);
  opacity: 0.35;
}
.tl-item {
  position: relative;
  width: 50%;
  padding: 20px 40px 20px 20px;
}
.tl-item:nth-child(odd) { left: 0; text-align: right; padding: 20px 40px 20px 20px; }
.tl-item:nth-child(even) { left: 50%; text-align: left; padding: 20px 20px 20px 40px; }

/* 节点圆点 */
.tl-item::before {
  content: "❤";
  position: absolute;
  top: 32px;
  right: -12px;
  font-size: 18px;
  color: var(--rose);
  text-shadow: 0 0 12px rgba(255,107,157,0.9);
}
.tl-item:nth-child(even)::before { right: auto; left: -11px; }

.tl-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 22px;
  backdrop-filter: blur(8px);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s;
  cursor: pointer;
}
.tl-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,107,157,0.5);
  box-shadow: 0 12px 40px rgba(255,107,157,0.25);
}
.tl-date {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 8px;
}
.tl-title {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--rose-light);
  margin-bottom: 8px;
}
.tl-desc { font-size: 15px; color: var(--text-muted); }
.tl-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-top: 14px;
  display: block;
}

/* 移动端适配 */
@media (max-width: 640px) {
  .timeline::before { left: 20px; }
  .tl-item, .tl-item:nth-child(odd), .tl-item:nth-child(even) {
    width: 100%;
    left: 0;
    text-align: left;
    padding: 16px 0 16px 50px;
  }
  .tl-item::before, .tl-item:nth-child(even)::before { left: 11px; right: auto; }
}

/* ---------------- 相册 ---------------- */
.gallery-section { padding: 80px 20px; }
.gallery {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.g-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  aspect-ratio: 1 / 1;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.g-item:hover { transform: scale(1.04); box-shadow: 0 14px 40px rgba(255,107,157,0.3); }
.g-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-item .g-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10,6,24,0.85));
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}
.g-item:hover .g-overlay { opacity: 1; }
.g-overlay .g-title { font-size: 16px; color: var(--rose-light); font-family: var(--font-serif); }
.g-overlay .g-desc { font-size: 13px; color: var(--text-muted); }

/* 空相册提示 */
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  letter-spacing: 2px;
  padding: 40px;
}

/* ---------------- 情书 ---------------- */
.letter-section { padding: 100px 20px; }
.letter-paper {
  max-width: 680px;
  margin: 0 auto;
  background: linear-gradient(160deg, rgba(255,235,240,0.08), rgba(255,107,157,0.06));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 50px 40px;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
}
.letter-greeting {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--rose-light);
  margin-bottom: 28px;
  letter-spacing: 2px;
}
.letter-body {
  font-size: 18px;
  line-height: 2.2;
  color: var(--text);
  letter-spacing: 1px;
  min-height: 200px;
  white-space: pre-wrap;
  text-align: justify;
}
.letter-body::first-letter {
  font-size: 1.6em;
  color: var(--rose-light);
}
.letter-body .cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--rose-light);
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.letter-sign {
  margin-top: 36px;
  text-align: right;
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--gold);
  letter-spacing: 2px;
}

/* ---------------- Footer ---------------- */
.footer {
  padding: 100px 20px 60px;
  text-align: center;
}
.heart-burst-btn {
  font-size: 20px;
  letter-spacing: 3px;
  padding: 16px 40px;
  border-radius: 40px;
  border: 1px solid rgba(255,107,157,0.5);
  background: linear-gradient(135deg, rgba(255,107,157,0.15), rgba(242,209,138,0.12));
  color: var(--rose-light);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}
.heart-burst-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(255,107,157,0.4);
}
.footer-text {
  margin-top: 30px;
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 4px;
  color: var(--text-muted);
}
.footer-small { margin-top: 12px; font-size: 13px; color: rgba(203,180,198,0.5); letter-spacing: 1px; }

/* ---------------- 灯箱 ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5,3,12,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}
.lightbox-caption { margin-top: 18px; color: var(--rose-light); font-family: var(--font-serif); font-size: 18px; }
.lightbox-close {
  position: absolute;
  top: 24px; right: 30px;
  font-size: 40px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s;
}
.lightbox-close:hover { color: var(--rose-light); }

/* ---------------- 弹窗 ---------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(5,3,12,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: linear-gradient(160deg, #1c0f2e, #12081f);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 36px;
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-box h3 { font-family: var(--font-serif); color: var(--rose-light); letter-spacing: 2px; margin-bottom: 24px; }
.modal-close {
  position: absolute;
  top: 14px; right: 20px;
  font-size: 30px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}
.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-size: 13px; color: var(--gold); letter-spacing: 1px; margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-sans);
}
.field textarea { min-height: 80px; resize: vertical; }
.field input[type="file"] { padding: 10px; color: var(--text-muted); }
.preview img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 10px;
}
.submit-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--rose), #ff4d88);
  color: #fff;
  font-size: 16px;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(255,107,157,0.4);
  transition: transform 0.3s;
}
.submit-btn:hover { transform: translateY(-2px); }
.modal-tip { margin-top: 16px; font-size: 12px; color: rgba(203,180,198,0.6); line-height: 1.6; }

/* 响应式 */
@media (max-width: 640px) {
  .nav { padding: 14px 18px; }
  .nav.scrolled { padding: 10px 18px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; letter-spacing: 1px; }
  .nav-add { padding: 8px 14px; font-size: 12px; }
  .counter { padding: 20px 30px; }
  .letter-paper { padding: 32px 22px; }
}

/* =========================================================
   新增：极光 / 鼠标光晕 / 照片爱心 / 细节提升
   ========================================================= */

/* 极光光晕背景 */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.b1 { width: 45vw; height: 45vw; left: -10vw; top: -12vw; background: radial-gradient(circle, rgba(255,107,157,0.5), transparent 70%); animation: drift 18s ease-in-out infinite; }
.b2 { width: 42vw; height: 42vw; right: -10vw; top: 28vh; background: radial-gradient(circle, rgba(130,60,190,0.5), transparent 70%); animation: drift 22s ease-in-out infinite reverse; }
.b3 { width: 36vw; height: 36vw; left: 28vw; bottom: -14vw; background: radial-gradient(circle, rgba(242,209,138,0.32), transparent 70%); animation: drift 26s ease-in-out infinite; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(4vw, 3vh) scale(1.1); }
  66% { transform: translate(-3vw, -2vh) scale(0.95); }
}

/* 暗角，增加纵深高级感 */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 120% at 50% 50%, transparent 55%, rgba(5,3,12,0.5) 100%);
}

/* 鼠标光晕轨迹 */
#cursor-canvas { position: fixed; inset: 0; z-index: 300; pointer-events: none; }

/* 计时器渐变描边 */
.counter { position: relative; }
.counter::before {
  content: ""; position: absolute; inset: -2px; border-radius: 22px; padding: 1px;
  background: linear-gradient(135deg, rgba(255,107,157,0.7), rgba(242,209,138,0.4), rgba(255,107,157,0.12));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

/* 标题下装饰线 */
.section-title::after {
  content: ""; display: block; width: 64px; height: 2px; margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
}

/* 满屏照片爱心 */
.photoheart {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5,3,12,0.94);
  backdrop-filter: blur(12px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity 0.4s;
}
.photoheart.open { opacity: 1; pointer-events: auto; }
.photoheart-close {
  position: absolute; top: 18px; right: 28px; z-index: 2;
  font-size: 44px; line-height: 1; color: var(--text-muted);
  background: none; border: none; cursor: pointer; transition: color 0.3s;
}
.photoheart-close:hover { color: var(--rose-light); }
.photoheart-title {
  font-family: var(--font-serif); font-size: clamp(24px, 4.5vw, 38px);
  letter-spacing: 3px; color: var(--rose-light); margin-bottom: 8px;
}
.photoheart-sub { color: var(--text-muted); letter-spacing: 3px; font-size: 14px; margin-bottom: 8px; }
.photoheart-stage { position: relative; }
.photoheart-stage.beat { animation: phBeat 1.5s ease-in-out infinite; }
@keyframes phBeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
.ph-item {
  position: absolute;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 9px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.4);
  box-shadow: 0 4px 18px rgba(255,107,157,0.5), 0 0 22px rgba(255,107,157,0.3);
  opacity: 0;
  animation: phIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes phIn {
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.ph-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 手机端相册两列 */
@media (max-width: 640px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* 视频样式 */
.g-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.tl-video {
  width: 100%;
  max-height: 340px;
  border-radius: 12px;
  margin-top: 14px;
  display: block;
  background: #000;
}

/* 上传进度 */
.upload-progress {
  margin: 12px 0;
  font-size: 14px;
  color: var(--rose-light);
  letter-spacing: 1px;
  word-break: break-all;
}

/* ===== 时间轴（中间线 + 心形节点 + 左右交错 + 照片扇形堆） ===== */
.timeline { position: relative; max-width: 900px; margin: 0 auto; padding: 20px 0; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; transform: translateX(-50%); background: linear-gradient(180deg, transparent, #ff6b9d 4%, #ff4d88 22%, #f2d18a 48%, #c084fc 74%, #ff6b9d 90%, transparent); border-radius: 3px; box-shadow: 0 0 10px rgba(255,107,157,0.7), 0 0 24px rgba(255,77,136,0.35); opacity: 0.85; }

.tl-node { position: relative; width: 50%; padding: 0 46px 42px 0; text-align: right; }
.tl-node:nth-child(even) { left: 50%; text-align: left; padding: 0 0 42px 46px; }
.tl-node::before { content: "❤"; position: absolute; top: 16px; right: -15px; font-size: 20px; color: #ff6b9d; text-shadow: 0 0 12px rgba(255,107,157,0.9); z-index: 2; animation: nodeBeat 1.6s ease-in-out infinite; }
.tl-node:nth-child(4n+1)::before { color: #ff6b9d; text-shadow: 0 0 12px #ff6b9d; }
.tl-node:nth-child(4n+2)::before { color: #f2d18a; text-shadow: 0 0 12px #f2d18a; }
.tl-node:nth-child(4n+3)::before { color: #c084fc; text-shadow: 0 0 12px #c084fc; }
.tl-node:nth-child(4n)::before { color: #ff4d88; text-shadow: 0 0 12px #ff4d88; }
@keyframes nodeBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.35); }
}
.tl-node:nth-child(even)::before { right: auto; left: -15px; }

.tl-card { display: inline-block; max-width: 430px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 18px; padding: 16px; backdrop-filter: blur(8px); transition: transform 0.4s, box-shadow 0.4s; }
.tl-card:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(255,107,157,0.22); }

.tl-date { font-size: 13px; letter-spacing: 2px; color: var(--gold); margin-bottom: 4px; }
.tl-title { font-family: var(--font-serif); font-size: 18px; color: var(--rose-light); margin-bottom: 6px; }
.tl-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }

/* 照片扇形堆（悬停散开） */
.tl-stack { position: relative; width: 210px; height: 210px; margin: 6px auto 0; }
.tl-photo { position: absolute; top: 15px; left: 15px; width: 180px; height: 180px; border-radius: 12px; overflow: hidden; border: 3px solid rgba(255,255,255,0.28); box-shadow: 0 8px 22px rgba(0,0,0,0.45); background: #000; transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1); cursor: pointer; }
.tl-photo img, .tl-photo video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-photo:nth-child(1) { transform: rotate(-8deg) translate(-14px, 8px); z-index: 1; }
.tl-photo:nth-child(2) { transform: rotate(6deg) translate(12px, 4px); z-index: 2; }
.tl-photo:nth-child(3) { transform: rotate(0deg); z-index: 3; }
.tl-stack:hover .tl-photo:nth-child(1) { transform: rotate(-16deg) translate(-54px, 12px); }
.tl-stack:hover .tl-photo:nth-child(2) { transform: rotate(12deg) translate(54px, 10px); }
.tl-stack:hover .tl-photo:nth-child(3) { transform: rotate(0deg) translate(0, -16px); }
.tl-count { position: absolute; right: -6px; bottom: -6px; padding: 3px 10px; border-radius: 14px; background: rgba(255,107,157,0.92); color: #fff; font-size: 12px; z-index: 4; }

/* 展开查看全部 */
.tl-expand { margin-top: 10px; padding: 6px 14px; border-radius: 16px; border: 1px solid rgba(255,107,157,0.4); background: rgba(255,107,157,0.1); color: var(--rose-light); font-size: 13px; cursor: pointer; }
.tl-grid { display: none; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; text-align: left; }
.tl-grid.open { display: grid; }
.tl-media { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--glass-border); background: #000; }
.tl-media img, .tl-media video { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #000; }
.tl-media-edit { position: absolute; right: 3px; bottom: 3px; width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(242,209,138,0.92); color: #3a2508; font-size: 11px; line-height: 1; cursor: pointer; }
.tl-media-del { position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(255,77,136,0.92); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; }
.tl-media[draggable="true"] { cursor: grab; }
.tl-media.dragging { opacity: 0.45; }
.tl-media.drag-over { outline: 2px solid var(--rose); outline-offset: -2px; }

/* 卡片编辑按钮 */
.tl-edit {
  padding: 5px 14px;
  border-radius: 14px;
  border: 1px solid rgba(242, 209, 138, 0.5);
  background: rgba(242, 209, 138, 0.12);
  color: var(--gold);
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 8px;
}
.tl-edit:hover { background: rgba(242, 209, 138, 0.25); }

/* 视频上方的事件/描述标注 */
.video-caption {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  font-size: 12px;
  line-height: 1.4;
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,0.8), rgba(0,0,0,0));
  pointer-events: none;
  z-index: 2;
}

/* 照片旋转/镜像按钮 */
.tl-rotate-bar {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 5;
}
.tl-rot, .tl-flip {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(10,6,24,0.85);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.tl-rot:hover, .tl-flip:hover { background: rgba(255,107,157,0.85); }

@media (max-width: 640px) {
  .tl-node { width: 100%; left: 0 !important; text-align: left !important; padding: 0 0 30px 44px !important; }
  .tl-node::before { right: auto !important; left: -15px; }
  .tl-card { max-width: 100%; }
  .tl-stack { width: 170px; height: 170px; }
  .tl-photo { width: 144px; height: 144px; top: 12px; left: 12px; }
}

/* 导航按钮组 */
.nav-actions { display: flex; gap: 10px; }

/* 开场解锁屏 */
.splash { position: fixed; inset: 0; z-index: 1000; background: linear-gradient(160deg, #0a0618, #241038); display: flex; align-items: center; justify-content: center; text-align: center; transition: opacity 0.6s, visibility 0.6s; }
.splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-inner h1 { font-family: var(--font-serif); font-size: clamp(32px, 6vw, 54px); color: var(--rose-light); margin-bottom: 16px; }
.splash-inner p { color: var(--text-muted); letter-spacing: 2px; margin-bottom: 32px; }
#splash-btn { padding: 16px 44px; font-size: 18px; letter-spacing: 3px; border: none; border-radius: 40px; background: linear-gradient(135deg, var(--rose), #ff4d88); color: #fff; cursor: pointer; box-shadow: 0 8px 30px rgba(255,107,157,0.5); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

@media (max-width: 640px) {
  .timeline { padding-left: 34px; }
  .tl-items { grid-template-columns: repeat(2, 1fr); }
}

/* 手机端：直线移到左边（单列布局） */
@media (max-width: 640px) {
  .timeline::before { left: 24px; transform: none; width: 3px; }
}

/* ===== 时间段侧边导航 ===== */
.date-nav-toggle {
  position: fixed;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 107, 157, 0.5);
  background: rgba(10, 6, 24, 0.92);
  color: var(--rose-light);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.date-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 210px;
  z-index: 88;
  background: rgba(12, 6, 26, 0.97);
  border-right: 1px solid var(--glass-border);
  padding: 76px 14px 24px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
}
.date-sidebar.open { transform: translateX(0); }
.date-year { margin-bottom: 14px; }
.date-year-title {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 1px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.2s;
  user-select: none;
}
.date-year-title:hover { background: rgba(255, 107, 157, 0.1); }
.date-year-title::before { content: "▸ "; color: var(--rose-light); }
.date-year-title.open::before { content: "▾ "; }
.date-year-items {
  display: none;
  padding-left: 14px;
  margin-top: 4px;
  flex-direction: column;
  gap: 4px;
}
.date-year-items.open { display: flex; }
.date-side-item {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--rose-light);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.2s, color 0.2s;
}
.date-side-item:hover {
  background: rgba(255, 107, 157, 0.18);
  color: #fff;
}

/* ===== 手机端排版优化（呼吸感） ===== */
@media (max-width: 640px) {
  /* 导航：紧凑但可读 */
  .nav { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .nav-brand { font-size: 16px; letter-spacing: 1px; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 12px; letter-spacing: 0.5px; }
  .nav-actions { gap: 6px; }
  .nav-add { padding: 6px 9px; font-size: 11px; letter-spacing: 0; }

  /* 首屏：更多留白、文字不挤 */
  .hero { padding: 110px 18px 50px; }
  .hero-eyebrow { font-size: 13px; letter-spacing: 2px; line-height: 1.9; margin-bottom: 22px; word-break: break-word; }
  .hero-title { font-size: 30px; margin-bottom: 16px; gap: 2px; }
  .hero-sub { font-size: 15px; letter-spacing: 1px; line-height: 1.8; margin-bottom: 28px; }
  .counter { padding: 16px 22px; border-radius: 16px; }
  .counter-num { font-size: 52px; }
  .counter-sub { font-size: 14px; letter-spacing: 1px; }
  .hero-qixi { font-size: 19px; margin-top: 28px; letter-spacing: 2px; line-height: 1.7; }
  .scroll-hint { bottom: 14px; font-size: 12px; }

  /* 时间轴：卡片留白 */
  .timeline { padding: 10px 12px 10px 40px; }
  .tl-card { padding: 16px; }
  .tl-date { font-size: 12px; }
  .tl-title { font-size: 17px; line-height: 1.4; }
  .tl-desc { font-size: 13px; line-height: 1.7; }
  .tl-stack { width: 150px; height: 150px; }
  .tl-photo { width: 126px; height: 126px; top: 10px; left: 10px; }
  .tl-expand { font-size: 12px; padding: 6px 12px; }

  /* 情书：舒适留白 */
  .letter-paper { padding: 28px 18px; border-radius: 16px; }
  .letter-greeting { font-size: 22px; margin-bottom: 22px; }
  .letter-body { font-size: 16px; line-height: 2; }
  .letter-sign { font-size: 17px; margin-top: 28px; }

  /* 开场屏 */
  .splash-inner h1 { font-size: 30px; }
  .splash-inner p { font-size: 14px; letter-spacing: 1px; margin-bottom: 26px; }
  #splash-btn { padding: 14px 34px; font-size: 16px; }
}
