:root {
  --rose: #e6a4a4;
  --rose-deep: #b5697a;
  --blush: #f7d9d5;
  --cream: #fbf1ee;
  --cream-2: #f6e2dc;
  --ink: #6b5450;
  --ink-soft: #8a726d;
  --gold: #c9a86a;
  --gold-lite: #e3cd9e;
  --shadow: rgba(150, 90, 90, 0.18);
  --glass: rgba(255, 255, 255, 0.55);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Serif SC", "Songti SC", serif;
  color: var(--ink);
  background: #e8cfc8;
  overflow-x: hidden;
  line-height: 2;
}

/* 手机版容器：桌面端居中成手机宽度 */
.phone {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--cream);
  box-shadow: 0 0 60px rgba(120, 70, 70, 0.25);
  overflow: hidden;
}
/* 兼容未包裹 .phone 时也居中 */
body > section { max-width: 480px; margin-left: auto; margin-right: auto; }

/* ---------- 通用屏 ---------- */
.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px 30px;
  position: relative;
  overflow: hidden;
}

/* 柔光氛围球 */
.screen::before,
.screen::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.screen::before {
  width: 240px; height: 240px;
  background: radial-gradient(circle, var(--blush), transparent 70%);
  top: -60px; left: -70px;
  animation: floatGlow 9s ease-in-out infinite;
}
.screen::after {
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--gold-lite), transparent 70%);
  bottom: -50px; right: -60px;
  animation: floatGlow 11s ease-in-out infinite reverse;
}
@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.12); }
}
.screen > * { position: relative; z-index: 1; }

.invite-en {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 6px;
  font-size: 13px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-style: italic;
}

.section-title {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 4px;
  margin-bottom: 30px;
  color: var(--rose-deep);
  position: relative;
}
.section-title::after {
  content: "❦";
  display: block;
  font-size: 16px;
  color: var(--gold);
  margin-top: 12px;
  opacity: 0.8;
}

/* ---------- 进场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.2,.7,.3,1);
  width: 100%;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- 封面 ---------- */
.cover {
  background:
    radial-gradient(circle at 50% 22%, #fff8f4 0%, rgba(255,248,244,0) 55%),
    linear-gradient(170deg, #fbeae4 0%, #f3d3cd 45%, #e9bfc0 100%);
}
.cover-sub {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 7px; font-size: 12px; color: var(--gold);
  margin-bottom: 26px; font-style: italic;
}
.cover-names {
  font-size: 44px;
  font-weight: 600;
  letter-spacing: 3px;
  line-height: 1.35;
  background: linear-gradient(120deg, #b5697a 0%, #c9a86a 50%, #b5697a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
  background-size: 200% auto;
}
@keyframes shimmer { to { background-position: 200% center; } }
.cover-names .amp {
  font-family: "Great Vibes", cursive;
  -webkit-text-fill-color: var(--gold);
  font-size: 46px; margin: 0 8px; font-weight: 400;
}
.cover-line { width: 70px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 24px auto; }
.cover-date {
  font-family: "Cormorant Garamond", serif;
  font-size: 26px; letter-spacing: 5px; color: var(--ink); font-weight: 600;
}
.cover-city { font-size: 14px; letter-spacing: 4px; color: var(--rose-deep); margin-top: 10px; }

.scroll-hint {
  position: absolute; bottom: 36px; z-index: 2;
  font-size: 11px; color: var(--rose-deep); letter-spacing: 3px;
}
.mouse {
  width: 22px; height: 34px; border: 1.5px solid var(--rose-deep);
  border-radius: 12px; margin: 10px auto 0; position: relative; opacity: 0.7;
}
.mouse span {
  position: absolute; top: 6px; left: 50%; width: 3px; height: 6px; margin-left: -1.5px;
  background: var(--rose-deep); border-radius: 2px; animation: scrollDot 1.6s infinite;
}
@keyframes scrollDot { 0%{opacity:1;top:6px} 100%{opacity:0;top:16px} }

/* ---------- 邀请语 ---------- */
.invite { background: linear-gradient(180deg, #fbeae4 0%, var(--cream) 100%); }
.invite-text {
  font-size: 16px; letter-spacing: 1.5px; color: var(--ink-soft); font-weight: 300;
  max-width: 340px; margin: 0 auto;
}

/* ---------- 相册 ---------- */
.gallery { background: linear-gradient(180deg, var(--cream) 0%, #f3d8d2 100%); }
.carousel {
  position: relative; width: 100%; max-width: 340px; margin: 22px auto 0;
  border-radius: 18px; overflow: hidden; aspect-ratio: 3 / 4; background: #fff;
  box-shadow: 0 18px 40px var(--shadow);
  border: 6px solid #fff;
}
.slides { display: flex; height: 100%; transition: transform 0.7s cubic-bezier(.4,0,.2,1); }
.slides .slide { min-width: 100%; height: 100%; background-size: cover; background-position: center; }
.nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.65); color: var(--rose-deep);
  font-size: 24px; line-height: 1; cursor: pointer; backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.nav.prev { left: 8px; } .nav.next { right: 8px; }
.dots { position: absolute; bottom: 12px; width: 100%; display: flex; justify-content: center; gap: 7px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.6); display: block; transition: .3s; }
.dots i.active { background: #fff; width: 18px; border-radius: 4px; }

/* ---------- 倒计时 ---------- */
.countdown { background: linear-gradient(180deg, #f3d8d2 0%, #eec6c4 100%); }
.count-grid { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.count-item {
  background: var(--glass); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 16px; padding: 18px 12px; min-width: 68px;
  box-shadow: 0 10px 24px var(--shadow);
}
.count-item span {
  display: block; font-family: "Cormorant Garamond", serif;
  font-size: 34px; font-weight: 600; color: var(--rose-deep); line-height: 1;
}
.count-item small { font-size: 12px; color: var(--gold); letter-spacing: 1px; margin-top: 6px; display: block; }

/* ---------- 婚礼信息 ---------- */
.details { background: linear-gradient(180deg, #eec6c4 0%, var(--cream) 100%); }
.detail-card {
  background: var(--glass); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 18px; padding: 24px 22px; text-align: left; max-width: 360px; margin: 0 auto;
  box-shadow: 0 14px 32px var(--shadow);
}
.detail-row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px dashed rgba(201,168,106,.4); font-size: 15px; }
.detail-row:last-child { border-bottom: none; }
.detail-row .label { color: var(--gold); min-width: 40px; font-weight: 600; }
.map-btn {
  display: inline-block; margin-top: 24px; padding: 13px 32px;
  background: linear-gradient(120deg, var(--rose-deep), var(--rose));
  color: #fff; text-decoration: none; border-radius: 30px;
  font-size: 15px; letter-spacing: 2px;
  box-shadow: 0 10px 22px rgba(181,105,122,.4);
}

/* ---------- 祝福 ---------- */
.blessing { background: linear-gradient(180deg, var(--cream) 0%, #f3d8d2 100%); }
.bless-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; max-width: 360px; margin-left: auto; margin-right: auto; }
.bless-form input, .bless-form textarea {
  border: 1px solid rgba(230,164,164,.5); border-radius: 12px; padding: 13px 16px;
  font-size: 15px; font-family: inherit; background: rgba(255,255,255,.8); color: var(--ink); resize: none;
}
.bless-form textarea { min-height: 84px; }
.bless-form input:focus, .bless-form textarea:focus { outline: none; border-color: var(--rose-deep); }
.bless-form button {
  background: linear-gradient(120deg, var(--rose-deep), var(--rose));
  color: #fff; border: none; border-radius: 30px; padding: 13px;
  font-size: 16px; letter-spacing: 3px; cursor: pointer;
  box-shadow: 0 10px 22px rgba(181,105,122,.4);
}
.bless-list { list-style: none; margin: 24px auto 0; max-width: 360px; display: flex; flex-direction: column; gap: 10px; }
.bless-list li {
  background: rgba(255,255,255,.8); border-radius: 14px; padding: 13px 16px; text-align: left;
  box-shadow: 0 8px 18px var(--shadow); font-size: 14px; animation: pop .4s ease; font-weight: 300;
}
.bless-list li b { color: var(--rose-deep); font-weight: 600; }
@keyframes pop { from { opacity: 0; transform: scale(.9);} to { opacity: 1; transform: none;} }

/* ---------- 结尾 ---------- */
.ending {
  background: radial-gradient(circle at 50% 40%, #fff8f4 0%, #f0c8c8 60%, #e3b0b8 100%);
}
.ending-names {
  font-family: "Great Vibes", cursive; font-size: 46px; color: var(--rose-deep);
  letter-spacing: 1px; margin-bottom: 18px; font-weight: 400;
}
.ending-text { font-size: 18px; color: var(--rose-deep); }
.ending-en {
  font-family: "Cormorant Garamond", serif; letter-spacing: 6px;
  font-size: 12px; color: var(--gold); margin-top: 22px; font-style: italic;
}

/* ---------- 音乐按钮 ---------- */
.music-toggle {
  position: fixed; top: 16px; right: 16px; z-index: 100;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.6);
  background: var(--glass); color: var(--rose-deep); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 6px 16px var(--shadow);
}
.music-toggle.playing svg { animation: spin 4s linear infinite; }
.music-toggle.paused { opacity: .55; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 花瓣/心 ---------- */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.petal { position: absolute; top: -30px; animation: fall linear infinite; }
@keyframes fall {
  0% { transform: translateY(-30px) rotate(0deg); opacity: 0; }
  10% { opacity: .85; }
  100% { transform: translateY(105vh) rotate(360deg); opacity: 0; }
}

@media (min-width: 481px) {
  body { padding: 0; }
}
