/* ===== 情侣网站 V3 - 单屏响应式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #ff4757;
  --primary-dark: #e84142;
  --primary-light: #ff6b81;
  --accent: #ffa502;
  --card-bg: rgba(255,255,255,0.88);
  --text: #2d3436;
  --text-light: #636e72;
  --border: rgba(200,180,180,0.15);
  --shadow: 0 4px 20px rgba(255, 71, 87, 0.08);
  --shadow-hover: 0 8px 30px rgba(255, 71, 87, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Noto Serif SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', serif;
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg, #fef9f9);
  color: var(--text);
}

body.no-scroll {
  overflow: hidden;
}

/* ===== 背景层 ===== */
.bg-layer {
  position: fixed; inset: 0; z-index: 0;
  transition: all 0.8s;
}
.bg-layer.has-image::after {
  content: ''; position: absolute; inset: 0;
  background: inherit; background-size: cover; background-position: center;
  filter: blur(var(--bg-blur, 0px)); transform: scale(1.1);
}


/* ===== 粒子画布 ===== */
#particleCanvas {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
}

/* ===== 音乐按钮 ===== */
.music-control {
  position: fixed; bottom: 16px; right: 16px; z-index: 999;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 3px 12px rgba(0,0,0,0.08);
  color: var(--primary); font-size: 0.9rem;
  transition: var(--transition);
}
.music-control:hover { transform: scale(1.1); }

/* ===== 页面容器 ===== */
/* 子页面可滚动容器 */
.subpage-root {
  position: fixed; inset: 0;
  z-index: 2;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(254,249,249,0.1);
}

/* ===== 页面容器 ===== */
.page-container {
  position: fixed; inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 10px 16px 8px;
}

.center-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 10px;
  min-height: 0;
}

/* 照片框 — vw 响应式 */
.lover-photos {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(12px, 3vw, 36px);
  margin-bottom: clamp(2px, 0.5vh, 8px);
}
.photo-frame-inner {
  width: clamp(56px, 11vw, 130px);
  height: clamp(56px, 11vw, 130px);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 clamp(3px, 0.5vw, 8px) clamp(10px, 2vw, 30px) rgba(255,71,87,0.15);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.photo-frame-inner img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame-inner .default-icon { font-size: clamp(20px, 5vw, 60px); color: #ddd; }
.lover-heart {
  font-size: clamp(16px, 2.5vw, 32px);
  color: var(--primary);
  animation: pulseHeart 1.5s infinite;
}
@keyframes pulseHeart {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* 名字 */
.hero-names {
  font-size: clamp(16px, 3vw, 36px);
  font-weight: 900;
  margin: clamp(3px, 0.6vh, 10px) 0 0;
  letter-spacing: clamp(1px, 0.3vw, 4px);
  line-height: 1.2;
}
.name1 { color: var(--primary); }
.heart-emoji {
  color: var(--primary);
  margin: 0 clamp(4px, 1vw, 12px);
  display: inline-block;
  animation: pulseHeart 1.5s infinite;
}
.name2 { color: #e84393; }

/* 自定义消息 — 加粗加大 */
.custom-message {
  font-size: clamp(14px, 2.2vw, 30px);
  color: #2d3436;
  margin: clamp(4px, 0.8vh, 12px) 0;
  font-weight: 900;
  letter-spacing: clamp(2px, 0.5vw, 6px);
}

/* 计时器 — 全部 ×1.3 */
.timer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, 0.5vw, 8px);
  flex-wrap: wrap;
}
.timer-unit { text-align: center; }
.timer-unit .timer-num {
  display: block;
  font-size: clamp(24px, 5vw, 64px);
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  font-family: Arial, sans-serif;
  text-shadow: 0 clamp(1px, 0.2vw, 4px) clamp(4px, 1vw, 16px) rgba(255,71,87,0.15);
}
.timer-unit .timer-label {
  display: block;
  font-size: clamp(9px, 1.1vw, 16px);
  color: #666;
  margin-top: clamp(1px, 0.2vh, 4px);
}
.timer-unit-sm { text-align: center; }
.timer-unit-sm .timer-num-sm {
  display: block;
  font-size: clamp(13px, 2vw, 28px);
  font-weight: 700;
  color: #888;
  line-height: 1;
  font-family: Arial, sans-serif;
}
.timer-unit-sm .timer-label-sm {
  display: block;
  font-size: clamp(8px, 0.9vw, 14px);
  color: #999;
  margin-top: clamp(1px, 0.2vh, 4px);
}
.sec-unit .timer-num-sm { color: var(--primary); }
.timer-sep {
  color: #ddd;
  font-size: clamp(14px, 2vw, 28px);
  margin: 0 clamp(1px, 0.3vw, 4px);
  align-self: flex-start;
  margin-top: clamp(4px, 1vh, 12px);
}
.timer-sep-h { display: none; }
.timer-footer {
  font-size: clamp(10px, 1.2vw, 18px);
  color: #999;
  margin-top: clamp(2px, 0.5vh, 8px);
}

/* ===== 底部一排泡泡 ===== */
.bubble-row {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  gap: clamp(6px, 1.2vw, 16px);
  padding: 0 clamp(4px, 1vw, 20px) clamp(6px, 1.2vh, 16px);
}
.bubble {
  width: clamp(60px, 13vw, 130px);
  height: clamp(60px, 13vw, 130px);
  border-radius: 50%;
  background: rgba(255,255,255,var(--bubble-opacity, 0.88));
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: bubbleFloat 4s ease-in-out infinite;
}
.bubble:nth-child(1) { animation-delay: 0s; }
.bubble:nth-child(2) { animation-delay: 0.8s; }
.bubble:nth-child(3) { animation-delay: 1.6s; }
.bubble:nth-child(4) { animation-delay: 2.4s; }
.bubble:hover {
  transform: scale(1.12);
  box-shadow: 0 10px 40px rgba(255,71,87,0.15);
}
.bubble:active {
  transform: scale(0.93);
}

@keyframes bubbleFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* 方形图标 */
.bubble-icon {
  width: 38%;
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 6%;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  font-size: clamp(12px, 2.2vw, 24px);
}
.bubble-title {
  font-size: clamp(9px, 1.6vw, 18px);
  font-weight: 700;
  white-space: nowrap;
}
.bubble-count {
  font-size: clamp(7px, 1.1vw, 13px);
  color: #999;
  white-space: nowrap;
}
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.85rem;
  transition: var(--transition);
}


/* ===== Footer ===== */
.footer-mini {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 3;
  text-align: center;
  padding: 6px 16px 8px;
  background: linear-gradient(transparent, rgba(26,26,46,0.04));
  font-size: 0.65rem;
  color: var(--text-light);
}
.footer-mini .footer-hearts { font-size: 0.7rem; margin-bottom: 2px; }
.footer-mini .footer-hearts i { margin: 0 2px; color: var(--primary); }
.footer-mini .footer-love a { color: rgba(0,0,0,0.12); text-decoration: none; }
.footer-mini .footer-love a:hover { color: var(--primary); }

/* ===== 子页面通用样式 ===== */
/* subpage-body is now subpage-root in the HTML */
.page-banner {
  padding: 100px 20px 40px;
  text-align: center;
  position: relative;
}
.page-banner-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #fff5f5, #ffe8e8);
  z-index: -1;
}
.page-banner h1 { font-size: clamp(1.6rem, 3vw, 2.6rem); }
.page-banner h1 i { color: var(--primary); }
.page-banner p { font-size: clamp(1rem, 1.6vw, 1.3rem); color: var(--text-light); }
.back-home {
  display: inline-block; margin-top: 14px;
  color: var(--primary); text-decoration: none;
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
}

.subpage-content {
  padding: 20px 5%;
  max-width: 1400px;
  margin: 0 auto;
  padding-bottom: 50px;
}

/* 子页面时间线 */
.timeline { position: relative; padding: 10px 0; }
.timeline::before {
  content: ''; position: absolute; left: 30px;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
}
.tl-item {
  position: relative; margin-bottom: 24px;
  padding-left: 70px;
}
.tl-dot {
  position: absolute; left: 13px; top: 14px;
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  box-shadow: 0 4px 15px rgba(255,71,87,0.25);
  z-index: 2;
}
.tl-card {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 20px 24px;
  border: 1px solid var(--border);
}
.tl-date { font-size: clamp(0.85rem, 1.2vw, 1rem); color: var(--primary); margin-bottom: 6px; font-weight: 600; }
.tl-card h3 { font-size: clamp(1.1rem, 1.8vw, 1.5rem); margin-bottom: 6px; }
.tl-card p { font-size: clamp(0.95rem, 1.4vw, 1.15rem); color: var(--text-light); }

/* 子页面留言板 */
.gb-layout { display: flex; flex-direction: column; gap: 20px; }
.gb-form-card {
  background: rgba(255,255,255,0.88);
  border-radius: var(--radius); padding: 24px;
  border: 1px solid var(--border);
}
.gb-form-card h3 { font-size: clamp(1rem, 1.6vw, 1.3rem); margin-bottom: 16px; }
.gb-form input, .gb-form textarea {
  width: 100%; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: clamp(0.9rem, 1.2vw, 1.1rem); font-family: inherit;
}
.gb-form .form-group { margin-bottom: 14px; }
.msg-card {
  background: rgba(255,255,255,0.88);
  border-radius: var(--radius-sm); padding: 18px 20px;
  margin-bottom: 12px; border: 1px solid var(--border);
}
.msg-card.pinned { border-color: var(--accent); }
.msg-pin { font-size: clamp(0.8rem, 1vw, 0.95rem); color: var(--accent); margin-bottom: 6px; }
.msg-hdr { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: clamp(0.9rem, 1.2vw, 1.1rem); }
.msg-avatar i { font-size: clamp(1.4rem, 2vw, 1.8rem); color: var(--primary-light); }
.msg-user { flex: 1; }
.msg-name { font-weight: 600; }
.msg-region { font-size: clamp(0.75rem, 1vw, 0.9rem); color: var(--accent); }
.msg-time { font-size: clamp(0.7rem, 0.9vw, 0.85rem); color: #bbb; white-space: nowrap; }
.msg-body { font-size: clamp(0.95rem, 1.3vw, 1.1rem); }

/* 子页面相册 */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(120px, 20vw, 280px), 1fr)); gap: 12px; }
.photo-item { border-radius: 10px; overflow: hidden; display: block; aspect-ratio: 1; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.photo-item:hover img { transform: scale(1.06); }

/* 子页面关于 */
.about-card {
  background: rgba(255,255,255,0.88);
  border-radius: var(--radius); padding: 32px 28px;
  text-align: center; border: 1px solid var(--border);
  margin-bottom: 24px;
}
.about-card h2 { font-size: clamp(1.3rem, 2vw, 1.8rem); margin-bottom: 14px; }
.about-intro { font-size: clamp(0.88rem, 1.3vw, 1.1rem); color: var(--text-light); }
.about-persons { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 14px 0; }
.about-avatar { width: clamp(50px, 8vw, 80px); height: clamp(50px, 8vw, 80px); border-radius: 50%; background: #fff5f5; display: flex; align-items: center; justify-content: center; font-size: clamp(1.5rem, 3vw, 2.5rem); color: var(--primary); margin: 0 auto 6px; }
.about-heart-big { font-size: clamp(1.5rem, 2.5vw, 2.2rem); color: var(--primary); animation: pulseHeart 1.5s infinite; }
.about-date { font-size: clamp(0.85rem, 1.2vw, 1rem); color: var(--text-light); }
.about-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(200px, 30vw, 400px), 1fr)); gap: 16px; }
.about-section-card {
  background: rgba(255,255,255,0.88);
  border-radius: var(--radius-sm); padding: 24px 20px;
  text-align: center; border: 1px solid var(--border);
}
.about-section-icon { width: clamp(36px, 5vw, 52px); height: clamp(36px, 5vw, 52px); border-radius: 50%; background: linear-gradient(135deg, var(--primary),var(--primary-light)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: clamp(0.9rem, 1.4vw, 1.2rem); margin: 0 auto 10px; }
.about-section-card h3 { font-size: clamp(0.95rem, 1.5vw, 1.25rem); margin-bottom: 8px; }
.about-section-card p { font-size: clamp(0.88rem, 1.2vw, 1rem); color: var(--text-light); }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 30px; color: var(--text-light); }
.empty-state i { font-size: 2rem; color: #ddd; margin-bottom: 10px; display: block; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 20px; border-radius: 50px;
  font-size: 0.85rem; font-weight: 500;
  cursor: pointer; transition: var(--transition);
  border: 1px solid var(--border);
  background: #fff; color: var(--text);
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border: none;
}
.btn-block { width: 100%; justify-content: center; }

/* ===== Alert ===== */
.alert { padding: 8px 12px; border-radius: 8px; margin-bottom: 10px; font-size: 0.85rem; }
.alert-success { background: #e8f5e9; color: #2e7d32; }
.alert-error { background: #ffebee; color: #c62828; }

/* ===== 灯箱 ===== */
.lightbox { display: none; position: fixed; z-index: 9999; inset: 0; background: rgba(0,0,0,0.92); align-items: center; justify-content: center; }
.lightbox.active { display: flex; }
.lightbox-close { position: absolute; top: 16px; right: 20px; font-size: 2rem; color: #fff; cursor: pointer; }
.lightbox-img { max-width: 90vw; max-height: 85vh; object-fit: contain; }
.lightbox-caption { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 0.85rem; }

/* ===== 响应式调整 ===== */
@media (max-width: 420px) {
  .lover-photos { gap: 12px; }
}
