/* ============================================
   情侣网站 - ILYMSY 样式 v2
   ============================================ */

/* ---- 全局重置 & 变量 ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --pink-light:   #ffe4f0;
  --pink:         #ff7eb3;
  --pink-deep:    #e91e8c;
  --rose:         #ff4d6d;
  --purple-light: #f3e8ff;
  --purple:       #c084fc;
  --purple-deep:  #7c3aed;
  --gold:         #f59e0b;
  --white:        #ffffff;
  --text:         #3b1c3b;
  --text-light:   #7c5c7c;
  --bg:           #fff5f9;
  --shadow:       rgba(233,30,140,0.18);
  --font-serif:   'Noto Serif SC', serif;
  --font-script:  'Dancing Script', cursive;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-serif);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* ---- 漂浮爱心背景 ---- */
.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  bottom: -60px;
  font-size: 1.2rem;
  opacity: 0;
  animation: floatUp linear infinite;
  user-select: none;
}

@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0.7; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    linear-gradient(160deg, #ff9ac1 0%, #c084fc 50%, #7c3aed 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,255,255,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.12) 0%, transparent 50%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(60, 0, 60, 0.25);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
}

.hero-subtitle {
  font-size: 1rem;
  letter-spacing: .2em;
  color: rgba(255,255,255,0.88);
  margin-bottom: 1rem;
  animation: fadeDown .8s ease both;
}

.hero-title {
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 8vw, 6rem);
  color: var(--white);
  line-height: 1.15;
  text-shadow: 0 4px 24px rgba(0,0,0,0.3);
  animation: fadeDown .9s .1s ease both;
}

.hero-title span {
  color: #ffe4f0;
  font-size: clamp(2rem, 5vw, 3.8rem);
  display: block;
  margin-top: .3rem;
}

.couple-date {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 2rem;
  padding: .7rem 2rem;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50px;
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  animation: fadeUp 1s .3s ease both;
}

.since-text {
  color: rgba(255,255,255,0.85);
  margin-top: .5rem;
  font-size: .95rem;
  animation: fadeUp 1s .4s ease both;
}

.heart-icon { font-size: 1.1rem; animation: heartbeat 1.2s infinite; }

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.3); }
}

.btn-explore {
  display: inline-block;
  margin-top: 2.5rem;
  padding: .85rem 2.4rem;
  background: rgba(255,255,255,0.95);
  color: var(--pink-deep);
  font-weight: 700;
  font-size: .95rem;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  transition: transform .25s, box-shadow .25s;
  animation: fadeUp 1s .5s ease both;
}

.btn-explore:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Section 通用 ---- */
section {
  position: relative;
  z-index: 1;
  padding: 6rem 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--pink-deep);
  margin-bottom: .5rem;
}

.section-desc {
  color: var(--text-light);
  font-size: .95rem;
}

/* ---- 我们的故事 ---- */
.our-story {
  background: linear-gradient(135deg, var(--pink-light) 0%, var(--purple-light) 100%);
}

.profiles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
}

.profile-card {
  background: var(--white);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 12px 40px var(--shadow);
  width: 280px;
  transition: transform .3s, box-shadow .3s;
}

.profile-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px var(--shadow);
}

.profile-img-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 1.2rem;
}

.profile-img-wrap img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--pink);
  position: relative;
  z-index: 1;
}

.profile-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  opacity: 0.35;
  filter: blur(10px);
  z-index: 0;
}

.profile-card h3 {
  font-size: 1.5rem;
  color: var(--pink-deep);
  margin-bottom: .4rem;
}

.profile-card p {
  color: var(--text-light);
  font-size: .9rem;
  font-style: italic;
  margin-bottom: 1rem;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: center;
}

.profile-tags span {
  background: var(--pink-light);
  color: var(--pink-deep);
  border-radius: 20px;
  padding: .3rem .85rem;
  font-size: .82rem;
  font-style: normal;
}

.heart-center {
  text-align: center;
  flex-shrink: 0;
}

.big-heart {
  font-size: 3.5rem;
  animation: heartbeat 1s infinite;
  filter: drop-shadow(0 4px 12px rgba(233,30,140,0.4));
}

.heart-center p {
  color: var(--pink-deep);
  font-weight: 600;
  margin-top: .4rem;
}

/* ---- 相册 ---- */
.gallery {
  background: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
  max-width: 960px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  cursor: pointer;
}

.gallery-item.featured {
  grid-row: 1 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s;
  min-height: 220px;
}

.gallery-item.featured img { min-height: 460px; }

.gallery-item:hover img { transform: scale(1.07); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(60,0,60,0.6) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 1.2rem 1.4rem;
  opacity: 0;
  transition: opacity .3s;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay span {
  color: #fff;
  font-size: .9rem;
  letter-spacing: .05em;
}

/* ---- 爱的留言 ---- */
.love-letter {
  background: linear-gradient(135deg, #7c3aed 0%, #e91e8c 100%);
  text-align: center;
}

.letter-container {
  max-width: 680px;
  margin: 0 auto;
}

.letter-decoration {
  font-size: 4rem;
  animation: floatBob 3s ease-in-out infinite;
  display: block;
  margin-bottom: 1.2rem;
}

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

.love-letter h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #fff;
  margin-bottom: 2rem;
}

.letter-content {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 24px;
  padding: 2.5rem;
  text-align: left;
}

.letter-content p {
  color: rgba(255,255,255,0.92);
  font-size: 1.05rem;
  line-height: 2;
  margin-bottom: 1.2rem;
}

.letter-sign {
  text-align: right;
  font-style: italic;
  font-size: 1.1rem !important;
  color: #ffe4f0 !important;
}

/* ---- 时间线 ---- */
.timeline {
  background: linear-gradient(135deg, var(--purple-light), var(--pink-light));
}

.timeline-list {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--pink), var(--purple));
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  position: relative;
}

.timeline-dot {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 20px var(--shadow);
  z-index: 1;
}

.timeline-content {
  background: var(--white);
  border-radius: 16px;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  flex: 1;
}

.timeline-content h3 {
  color: var(--pink-deep);
  font-size: 1.15rem;
  margin-bottom: .2rem;
}

.tl-date {
  color: var(--purple);
  font-size: .82rem;
  margin-bottom: .5rem;
  font-style: italic;
}

.timeline-content p {
  color: var(--text-light);
  font-size: .92rem;
  line-height: 1.7;
}

/* ---- 心愿墙 ---- */
.wishes {
  background: var(--white);
}

.wishes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.2rem;
  max-width: 900px;
  margin: 0 auto;
}

.wish-card {
  background: linear-gradient(135deg, var(--pink-light), var(--purple-light));
  border-radius: 20px;
  padding: 1.8rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.wish-card:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 14px 40px var(--shadow);
}

.wish-card.done {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border-color: var(--pink-deep);
}

.wish-card.done p { color: #fff; }
.wish-card.done .wish-icon { filter: none; }

.wish-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: .7rem;
  transition: transform .3s;
}

.wish-card:hover .wish-icon { transform: scale(1.2) rotate(-5deg); }

.wish-card p {
  font-size: .9rem;
  color: var(--text);
  font-weight: 600;
}

.wish-check {
  position: absolute;
  top: .7rem;
  right: .8rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--pink);
  background: transparent;
  transition: background .2s, border-color .2s;
}

.wish-card.done .wish-check {
  background: #fff;
  border-color: #fff;
}

.wish-card.done .wish-check::after {
  content: '✓';
  display: block;
  text-align: center;
  line-height: 18px;
  font-size: .75rem;
  color: var(--pink-deep);
  font-weight: 700;
}

/* ---- 页脚 ---- */
.footer {
  background: linear-gradient(135deg, #3b1c3b, #7c3aed);
  text-align: center;
  padding: 3rem 1rem;
}

.footer-hearts {
  font-size: 1.5rem;
  margin-bottom: .8rem;
  animation: heartbeat 1.2s infinite;
  letter-spacing: .3rem;
}

.footer-text {
  color: rgba(255,255,255,0.7);
  font-size: .9rem;
  margin-bottom: .4rem;
}

.footer-copy {
  color: var(--pink-light);
  font-family: var(--font-script);
  font-size: 1.3rem;
}

/* ============================================
   ★ 以下为 v2 新增样式
   ============================================ */

/* ---- 导航栏 ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: .8rem 2rem;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  transition: background .3s;
}

.navbar.scrolled {
  background: rgba(255,245,249,0.95);
  border-bottom-color: var(--pink-light);
  box-shadow: 0 2px 16px rgba(233,30,140,0.1);
}

.navbar.scrolled .nav-logo,
.navbar.scrolled .nav-links a { color: var(--pink-deep); }

.nav-logo {
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: #fff;
  margin-right: auto;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.6rem;
}

.nav-links a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  transition: color .2s;
}

.nav-links a:hover { color: var(--pink-light); }

.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: 1rem;
}

/* ---- Hero v3: 背景轮播 + 头像连线 ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

/* 背景轮播容器 */
.hero-bg-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease;
  transform: scale(1.05);
  transition: opacity 1.5s ease, transform 8s ease;
}

.hero-bg-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 50%);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 0, 50, 0.45);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 860px;
}

.hero-subtitle {
  font-size: .95rem;
  letter-spacing: .2em;
  color: rgba(255,255,255,0.88);
  margin-bottom: .8rem;
  animation: fadeDown .8s ease both;
}

.hero-title {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  color: var(--white);
  line-height: 1.15;
  text-shadow: 0 4px 24px rgba(0,0,0,0.4);
  animation: fadeDown .9s .1s ease both;
  margin-bottom: 2rem;
}

.hero-title span {
  color: #ffe4f0;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  display: block;
  margin-top: .2rem;
}

/* 头像行 */
.couple-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 auto 2rem;
  max-width: 680px;
  animation: fadeUp .9s .2s ease both;
}

.couple-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}

.couple-avatar-wrap {
  position: relative;
  width: 120px;
  height: 120px;
}

.couple-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 4px solid rgba(255,255,255,0.9);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  position: relative;
  z-index: 1;
  transition: transform .3s;
}

.couple-avatar:hover { transform: scale(1.07); }

.couple-avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(var(--pink), var(--purple), var(--pink));
  opacity: .6;
  filter: blur(8px);
  z-index: 0;
  animation: ringRotate 4s linear infinite;
}

@keyframes ringRotate {
  to { transform: rotate(360deg); }
}

.couple-name {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
  letter-spacing: .05em;
}

/* 绳子连接区 */
.couple-connector {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 60px;
}

.rope-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.center-heart {
  position: relative;
  z-index: 2;
  font-size: 2.2rem;
  animation: heartbeat 1.1s infinite;
  filter: drop-shadow(0 4px 14px rgba(233,30,140,0.7));
  cursor: default;
  user-select: none;
}

/* 天数 */
.couple-date {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .3rem;
  padding: .6rem 1.8rem;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  animation: fadeUp .9s .4s ease both;
}

.since-text {
  color: rgba(255,255,255,0.8);
  font-size: .88rem;
  margin-bottom: 1.8rem;
  animation: fadeUp .9s .45s ease both;
}

.hero-nav-btns {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  justify-content: center;
  animation: fadeUp .9s .55s ease both;
}

.btn-hero {
  padding: .55rem 1.3rem;
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 50px;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
  transition: background .2s, transform .2s;
}

.btn-hero:hover {
  background: rgba(255,255,255,0.35);
  transform: translateY(-2px);
}

/* ---- Section 通用 v2 ---- */
.section {
  padding: 5rem 1.5rem;
  position: relative;
  z-index: 1;
}

.section-alt {
  background: linear-gradient(135deg, var(--pink-light) 0%, var(--purple-light) 100%);
}

/* ---- Card ---- */
.card {
  background: var(--white);
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: 0 8px 32px var(--shadow);
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

/* ---- 上传区 ---- */
.upload-zone {
  text-align: center;
}

.upload-info {
  margin-bottom: 1.2rem;
}

.upload-icon-big {
  font-size: 2.8rem;
  display: block;
  margin-bottom: .4rem;
}

.upload-info p {
  color: var(--text-light);
  font-size: .88rem;
}

.btn-upload {
  display: inline-block;
  padding: .75rem 2.2rem;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 1rem;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 20px var(--shadow);
}

.btn-upload:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--shadow);
}

.btn-upload:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

/* ---- 通用表单元素 ---- */
.form-input {
  width: 100%;
  padding: .65rem 1rem;
  border: 1.5px solid var(--pink-light);
  border-radius: 12px;
  font-family: var(--font-serif);
  font-size: .9rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
  margin-bottom: .8rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255,126,179,.15);
}

.icon-input { width: 90px; }

.form-select {
  padding: .65rem 1rem;
  border: 1.5px solid var(--pink-light);
  border-radius: 12px;
  font-family: var(--font-serif);
  font-size: .9rem;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  margin-bottom: .8rem;
}

.form-textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--pink-light);
  border-radius: 12px;
  font-family: var(--font-serif);
  font-size: .9rem;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  transition: border-color .2s;
  margin-bottom: .8rem;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255,126,179,.15);
}

.form-row {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
}

.form-row .form-input { flex: 1; }

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.char-count {
  font-size: .8rem;
  color: var(--text-light);
}

.btn-primary {
  padding: .65rem 1.8rem;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 16px var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}

.btn-primary:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.file-pick-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: .8rem;
}

.btn-pick-file {
  padding: .5rem 1.2rem;
  background: var(--purple-light);
  color: var(--purple-deep);
  border: 1.5px solid var(--purple);
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}

.btn-pick-file:hover { background: #e9d5ff; }

.file-name-hint {
  font-size: .82rem;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

/* ---- 相册网格 v2 ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 960px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  aspect-ratio: 1;
  background: var(--pink-light);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}

.gallery-item:hover img { transform: scale(1.07); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(60,0,60,0.65) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: .9rem 1rem;
  opacity: 0;
  transition: opacity .3s;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay span {
  color: #fff;
  font-size: .82rem;
}

.gallery-delete-btn {
  background: rgba(255,77,109,.85);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
}

.gallery-delete-btn:hover { background: var(--rose); }

/* ---- 留言列表 ---- */
.message-form { margin-bottom: 2rem; }

.message-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message-card {
  background: var(--white);
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  position: relative;
}

.message-card.author-GNX { border-left: 4px solid var(--pink); }
.message-card.author-MSY { border-left: 4px solid var(--purple); }

.msg-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}

.msg-author {
  font-weight: 700;
  color: var(--pink-deep);
  font-size: .9rem;
}

.message-card.author-MSY .msg-author { color: var(--purple-deep); }

.msg-title {
  font-size: .82rem;
  color: var(--text-light);
  font-style: italic;
}

.msg-time {
  margin-left: auto;
  font-size: .75rem;
  color: #bbb;
}

.msg-body {
  font-size: .92rem;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-wrap;
}

.msg-delete-btn {
  position: absolute;
  top: .7rem;
  right: .8rem;
  background: none;
  border: none;
  color: #ddd;
  font-size: .95rem;
  cursor: pointer;
  transition: color .2s;
}

.msg-delete-btn:hover { color: var(--rose); }

/* ---- 音乐列表 ---- */
.music-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.music-item {
  background: var(--white);
  border-radius: 16px;
  padding: 1rem 1.2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.07);
}

.music-item-header {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: .7rem;
}

.music-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.music-info { flex: 1; min-width: 0; }

.music-name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-artist {
  font-size: .8rem;
  color: var(--text-light);
}

.music-delete-btn {
  background: none;
  border: none;
  color: #ddd;
  font-size: 1rem;
  cursor: pointer;
  transition: color .2s;
  flex-shrink: 0;
}

.music-delete-btn:hover { color: var(--rose); }

.music-item audio {
  width: 100%;
  height: 36px;
  border-radius: 8px;
}

/* ---- 心愿墙 v2 ---- */
.wish-form {
  display: flex;
  align-items: flex-end;
  gap: .8rem;
  flex-wrap: wrap;
}

.wish-form .form-row { flex: 1; margin-bottom: 0; }
.wish-form .form-input { margin-bottom: 0; }

.wishes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.wish-card {
  background: linear-gradient(135deg, var(--pink-light), var(--purple-light));
  border-radius: 18px;
  padding: 1.6rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
  position: relative;
  border: 2px solid transparent;
}

.wish-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px var(--shadow);
}

.wish-card.done {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border-color: var(--pink-deep);
}

.wish-card.done .wish-card-text { color: #fff; }

.wish-card-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: .6rem;
  transition: transform .3s;
}

.wish-card:hover .wish-card-icon { transform: scale(1.2) rotate(-5deg); }

.wish-card-text {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
}

.wish-done-badge {
  position: absolute;
  top: .5rem;
  right: .6rem;
  font-size: .75rem;
  color: #fff;
  background: var(--pink-deep);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
}

.wish-card.done .wish-done-badge { display: flex; }

.wish-delete-btn {
  position: absolute;
  bottom: .5rem;
  right: .6rem;
  background: none;
  border: none;
  font-size: .8rem;
  color: rgba(0,0,0,.2);
  cursor: pointer;
  transition: color .2s;
}

.wish-delete-btn:hover { color: var(--rose); }

/* ---- 大事记 v2 ---- */
.timeline-form { margin-bottom: 2.5rem; }

.timeline-list {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--pink), var(--purple));
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.timeline-dot {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 18px var(--shadow);
  z-index: 1;
}

.timeline-content {
  background: var(--white);
  border-radius: 14px;
  padding: 1.1rem 1.3rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.07);
  flex: 1;
  position: relative;
}

.timeline-content h3 {
  color: var(--pink-deep);
  font-size: 1.05rem;
  margin-bottom: .2rem;
}

.tl-date {
  color: var(--purple);
  font-size: .8rem;
  font-style: italic;
  margin-bottom: .4rem;
}

.tl-body {
  color: var(--text-light);
  font-size: .9rem;
  line-height: 1.65;
}

.tl-delete-btn {
  position: absolute;
  top: .6rem;
  right: .7rem;
  background: none;
  border: none;
  color: #ddd;
  font-size: .9rem;
  cursor: pointer;
  transition: color .2s;
}

.tl-delete-btn:hover { color: var(--rose); }

/* ---- 空状态 ---- */
.list-empty {
  text-align: center;
  color: var(--text-light);
  padding: 2.5rem 1rem;
  font-size: .9rem;
  font-style: italic;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(40,0,40,.9);
  color: #fff;
  padding: .7rem 1.6rem;
  border-radius: 50px;
  font-size: .9rem;
  z-index: 9999;
  pointer-events: none;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s;
  opacity: 0;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ---- 灯箱 ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.hidden { display: none; }

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.lightbox p {
  color: rgba(255,255,255,.8);
  margin-top: .8rem;
  font-size: .9rem;
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s;
}

.lightbox-close:hover { background: rgba(255,255,255,.3); }

/* ---- 滚动显现 ---- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- 响应式 ---- */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255,245,249,.97);
    padding: 1rem 2rem;
    gap: .8rem;
    border-bottom: 1px solid var(--pink-light);
  }
  .nav-links.open a { color: var(--pink-deep); }
  .navbar { position: relative; }

  /* 头像在小屏缩小 */
  .couple-avatar-wrap { width: 88px; height: 88px; }
  .couple-avatar      { width: 88px; height: 88px; }
  .couple-name        { font-size: 1.2rem; }
  .center-heart       { font-size: 1.7rem; }
  .couple-connector   { min-width: 70px; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .wishes-grid  { grid-template-columns: repeat(2, 1fr); }
  .form-row     { flex-direction: column; }
  .icon-input   { width: 100%; }
  .wish-form    { flex-direction: column; }

  .timeline-list::before { left: 22px; }
  .timeline-dot { width: 46px; height: 46px; font-size: 1.2rem; }
}

/* ════════════════════════════════════════
   锁屏遮罩
════════════════════════════════════════ */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(145deg, #ff9ac1 0%, #c084fc 50%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lock-screen.fade-out {
  animation: lockFadeOut .6s ease forwards;
}

@keyframes lockFadeOut {
  to { opacity: 0; pointer-events: none; transform: scale(1.04); }
}

.lock-box {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 28px;
  padding: 3rem 2.4rem 2.4rem;
  text-align: center;
  width: min(380px, 90vw);
  box-shadow: 0 24px 60px rgba(60,0,60,0.3);
  animation: lockBoxIn .6s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes lockBoxIn {
  from { opacity: 0; transform: translateY(40px) scale(.95); }
  to   { opacity: 1; transform: none; }
}

.lock-icon {
  font-size: 3.2rem;
  margin-bottom: .8rem;
  animation: heartbeat 1.4s infinite;
}

.lock-title {
  font-family: var(--font-script);
  font-size: 2rem;
  color: #fff;
  line-height: 1.25;
  margin-bottom: .4rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.2);
}

.lock-title span {
  font-size: 1.35rem;
  color: var(--pink-light);
  display: block;
}

.lock-hint {
  color: rgba(255,255,255,.75);
  font-size: .88rem;
  margin-bottom: 1.4rem;
}

.lock-input-wrap {
  display: flex;
  gap: .6rem;
}

.lock-input {
  flex: 1;
  padding: .7rem 1rem;
  border: 1.5px solid rgba(255,255,255,.5);
  border-radius: 50px;
  background: rgba(255,255,255,.25);
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-serif);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  text-align: center;
  letter-spacing: .15em;
}

.lock-input::placeholder { color: rgba(255,255,255,.55); letter-spacing: 0; }

.lock-input:focus {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.2);
}

.lock-input.shake {
  animation: inputShake .35s ease;
}

@keyframes inputShake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-8px); }
  40%     { transform: translateX(8px); }
  60%     { transform: translateX(-6px); }
  80%     { transform: translateX(6px); }
}

.lock-btn {
  padding: .7rem 1.4rem;
  background: rgba(255,255,255,.9);
  color: var(--pink-deep);
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .15s;
}

.lock-btn:hover {
  background: #fff;
  transform: scale(1.05);
}

.lock-error {
  color: #ffe4f0;
  font-size: .83rem;
  margin-top: .8rem;
  min-height: 1.2em;
  transition: opacity .2s;
}

/* 锁屏背景漂浮心 */
.lock-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
