/**
 * 💒 婚礼电子请柬 - 100% 像素级复刻设计系统 style.css
 */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400;1,600&family=Great+Vibes&family=Ma+Shan+Zheng&family=Long+Cang&family=Noto+Serif+SC:wght@300;400;600;700&display=swap');

:root {
  --bg-main: #ece8e4;
  --bg-card: #f5f2ee;
  --text-main: #2b2b2b;
  --text-light: #6e6763;
  --text-muted: #8c837d;
  --primary-red: #c82528;
  --primary-dark-red: #8c2328;
  --primary-gold: #c5a059;
  --primary-gold-light: #e5c98d;
  --font-serif: 'Cormorant Garamond', 'Cinzel', serif;
  --font-cursive: 'Great Vibes', cursive;
  --font-brush: 'Ma Shan Zheng', 'Long Cang', 'Noto Serif SC', cursive, serif;
  --font-cn-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  width: 100%;
  height: 100%;
  background-color: #1a1617;
  font-family: var(--font-cn-serif);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* ========================================================
   PC 端展示外框容器
   ======================================================== */
.app-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: radial-gradient(circle at center, #2e2629 0%, #161214 100%);
  overflow: hidden;
}

.pc-background-decor {
  display: none;
}

@media (min-width: 860px) {
  .pc-background-decor {
    display: block;
    position: absolute;
    left: 8%;
    top: 50%;
    transform: translateY(-50%);
    color: #f5ede6;
    max-width: 360px;
    z-index: 10;
  }

  .pc-background-decor h1 {
    font-family: var(--font-serif);
    font-size: 32px;
    letter-spacing: 4px;
    color: var(--primary-gold-light);
    margin-bottom: 8px;
  }

  .pc-background-decor .pc-couple-names {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 2px;
  }

  .pc-background-decor .pc-quote {
    font-size: 15px;
    line-height: 1.8;
    color: #bfaea7;
    margin-bottom: 30px;
    border-left: 3px solid var(--primary-gold);
    padding-left: 12px;
  }

  .pc-qr-box {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 16px;
    padding: 20px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  }

  .pc-qr-box #pc-qrcode {
    width: 140px;
    height: 140px;
    background: #fff;
    padding: 6px;
    border-radius: 8px;
  }

  .pc-qr-box p {
    font-size: 13px;
    margin-top: 10px;
    color: #e0d5cf;
    letter-spacing: 1px;
  }
}

/* 移动端视口容器 (手机机身) */
.mobile-device-container {
  width: 100%;
  height: 100%;
  max-width: 440px;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-main);
  display: flex;
  flex-direction: column;
}

@media (min-width: 860px) {
  .mobile-device-container {
    width: 414px;
    height: 896px;
    max-height: 94vh;
    border-radius: 46px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 0 10px #2a2426, 0 0 0 12px rgba(197, 160, 89, 0.4);
  }
}

/* ========================================================
   长滚动页面主内容区域
   ======================================================== */
.invitation-scroll-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
  padding-bottom: calc(75px + var(--safe-bottom));
}

/* 隐藏滚动条 */
.invitation-scroll-container::-webkit-scrollbar {
  display: none;
}

/* 悬浮背景音乐按钮 */
.music-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.music-btn svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
}

.music-btn.playing svg {
  animation: rotateRecord 4s linear infinite;
}

/* ========================================================
   底部固定悬浮交互栏 (Floating Bottom Bar)
   ======================================================== */
.bottom-floating-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 10px 14px calc(10px + var(--safe-bottom)) 14px;
  background: rgba(35, 30, 32, 0.75);
  backdrop-filter: blur(12px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-msg-input {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  color: #fff;
  padding: 7px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-quick-tag {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  color: #fff;
  padding: 7px 10px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3px;
}

.action-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.action-icon-btn:active {
  transform: scale(1.2);
}

/* 弹幕浮动层 */
.danmu-layer {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  height: 140px;
  pointer-events: none;
  z-index: 80;
  overflow: hidden;
}

.danmu-bubble {
  position: absolute;
  white-space: nowrap;
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  color: #fff;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: danmuFly linear both;
}

/* ========================================================
   Section 1: 封面 Hero 区域
   ======================================================== */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 16px 36px 16px;
  background: #dedede;
  overflow: hidden;
}

.hero-top-nav {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 3px;
  color: #555;
  text-transform: uppercase;
  z-index: 5;
}

.hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.hero-content-overlay {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: auto;
  padding-bottom: 20px;
}

/* 手写倾斜日期 */
.hero-date-top {
  font-family: var(--font-serif);
  font-size: 28px;
  font-style: italic;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  letter-spacing: 2px;
  margin-bottom: -10px;
}

/* 主标题：我们的婚礼 + Our Wedding + 红线贯穿 */
.hero-title-group {
  position: relative;
  margin: 14px 0 10px 0;
  display: inline-block;
}

.hero-title-cn {
  font-family: var(--font-brush);
  font-size: 48px;
  color: #ffffff;
  letter-spacing: 4px;
  text-shadow: 0 3px 12px rgba(0,0,0,0.6);
  position: relative;
  z-index: 2;
}

.hero-title-en {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  font-family: var(--font-cursive);
  font-size: 44px;
  color: var(--primary-gold);
  opacity: 0.9;
  z-index: 3;
  white-space: nowrap;
  pointer-events: none;
}

.hero-ribbon-line {
  position: absolute;
  top: 60%;
  left: -20%;
  width: 140%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
  transform: rotate(-8deg);
  z-index: 1;
}

/* 新人名字与双喜 */
.hero-names-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 12px 0;
}

.hero-name-text {
  font-size: 20px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 3px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero-xi-seal {
  font-size: 34px;
  color: var(--primary-red);
  font-family: var(--font-cn-serif);
  line-height: 1;
  text-shadow: 0 0 10px rgba(255,255,255,0.4);
}

.hero-bottom-story {
  font-family: var(--font-serif);
  font-size: 13px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 1.5px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

/* ========================================================
   Section 2: 邀请寄语 (Welcome)
   ======================================================== */
.welcome-section {
  padding: 50px 20px 40px 20px;
  text-align: center;
  background: var(--bg-main);
  position: relative;
}

.record-player-frame {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: #111;
  border: 4px solid #222;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25), inset 0 0 0 4px #333, inset 0 0 0 8px #1a1a1a;
  margin: 0 auto 30px auto;
  position: relative;
  overflow: hidden;
}

.record-inner-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  border: 2px solid #fff;
}

.welcome-title-brush {
  font-family: var(--font-brush);
  font-size: 32px;
  color: #1a1a1a;
  letter-spacing: 4px;
  margin-bottom: 4px;
}

.welcome-title-en {
  font-family: var(--font-cursive);
  font-size: 26px;
  color: #333;
  margin-bottom: 28px;
}

.poetry-text-block {
  font-size: 14px;
  line-height: 2.3;
  color: #444;
  letter-spacing: 1px;
  font-weight: 400;
}

/* ========================================================
   Section 3: 婚纱大片全景
   ======================================================== */
.full-photo-section {
  width: 100%;
  position: relative;
  margin: 20px 0;
}

.full-photo-section img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.caption-under-photo {
  text-align: center;
  padding: 16px 20px;
}

.caption-en-serif {
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
  color: #777;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.caption-cn-serif {
  font-size: 16px;
  color: #222;
  letter-spacing: 2px;
  font-weight: 500;
}

/* ========================================================
   Section 4: 新人介绍 (Groom & Bride)
   ======================================================== */
.profile-dual-section {
  padding: 30px 20px;
  text-align: center;
}

.profile-dual-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-avatar-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.heart-middle-icon {
  font-size: 20px;
  color: var(--primary-red);
}

.profile-labels-row {
  display: flex;
  justify-content: center;
  gap: 80px;
  font-size: 13px;
  color: #777;
  margin-bottom: 4px;
}

.profile-names-row {
  display: flex;
  justify-content: center;
  gap: 60px;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 2px;
  margin-bottom: 24px;
}

/* ========================================================
   Section 5: 不对称拼图相册
   ======================================================== */
.collage-grid-section {
  padding: 20px 16px;
}

.collage-two-col {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
  align-items: start;
  margin: 20px 0;
}

.collage-left-img {
  width: 100%;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.collage-right-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.collage-xi-mark {
  font-size: 40px;
  color: var(--primary-red);
  line-height: 1;
  text-align: center;
  margin: 10px 0;
}

.collage-right-img {
  width: 100%;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

/* ========================================================
   Section 6: 新中式正红大合照
   ======================================================== */
.red-tradition-section {
  padding: 20px 16px;
  text-align: center;
}

.red-arch-photo {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(200, 37, 40, 0.15);
  margin-bottom: 24px;
}

.red-arch-photo img {
  width: 100%;
  display: block;
}

.vertical-text-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.vertical-cn-text {
  writing-mode: vertical-rl;
  font-size: 16px;
  letter-spacing: 6px;
  color: #333;
  font-weight: 500;
}

.love-you-cursive {
  font-family: var(--font-cursive);
  font-size: 46px;
  color: #c98588;
  margin: 16px 0;
}

.ripped-photo-box {
  width: 90%;
  margin: 10px auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.ripped-photo-box img {
  width: 100%;
  display: block;
}

/* ========================================================
   Section 7: 倒计时与婚礼日历
   ======================================================== */
.countdown-section {
  padding: 40px 20px;
  text-align: center;
}

.countdown-digits-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 28px 0;
}

.cd-digit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cd-num {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-red);
  line-height: 1;
}

.cd-txt {
  font-size: 12px;
  color: #777;
  margin-top: 4px;
}

.calendar-arch-photo {
  width: 220px;
  height: 220px;
  border-radius: 50% 50% 0 0;
  overflow: hidden;
  margin: 20px auto;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

.calendar-arch-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 10月日历矩阵卡片 */
.calendar-card {
  width: 280px;
  margin: 0 auto 20px auto;
  text-align: center;
}

.calendar-month-head {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--primary-red);
  font-style: italic;
  margin-bottom: 12px;
}

.calendar-table {
  width: 100%;
  font-size: 12px;
  color: #555;
  border-collapse: collapse;
}

.calendar-table th {
  padding: 6px 0;
  color: var(--primary-red);
  font-weight: normal;
}

.calendar-table td {
  padding: 6px 0;
  text-align: center;
}

.calendar-table td.active-day span {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-red);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* ========================================================
   Section 8: 宴席地址与地图导航
   ======================================================== */
.venue-section {
  padding: 30px 16px;
  text-align: center;
}

.venue-map-card {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  margin: 16px 0;
  position: relative;
  cursor: pointer;
}

.venue-map-card img {
  width: 100%;
  display: block;
}

.venue-address-title {
  font-size: 15px;
  font-weight: 500;
  color: #222;
  margin: 12px 0 24px 0;
  letter-spacing: 1px;
}

/* ========================================================
   Section 9: 出席回执与拨号
   ======================================================== */
.rsvp-section {
  padding: 30px 20px 40px 20px;
  text-align: center;
}

.rsvp-form-box {
  width: 100%;
  max-width: 320px;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rsvp-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #c0b8b2;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  color: #222;
  outline: none;
}

.rsvp-btn-submit {
  width: 100%;
  padding: 12px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 2px;
  cursor: pointer;
  margin-top: 6px;
}

.contact-phones-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.btn-phone-call {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--primary-dark-red);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  border-radius: 4px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(140, 35, 40, 0.25);
}

/* 留言弹窗 Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
}

.modal-content-card {
  width: 100%;
  max-width: 340px;
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
  text-align: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 14px;
}

.modal-textarea {
  width: 100%;
  height: 90px;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  outline: none;
  margin-bottom: 16px;
  font-family: inherit;
}

.modal-btn-group {
  display: flex;
  gap: 10px;
}

.modal-btn-cancel, .modal-btn-confirm {
  flex: 1;
  padding: 10px 0;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  cursor: pointer;
}

.modal-btn-cancel {
  background: #f0f0f0;
  color: #666;
}

.modal-btn-confirm {
  background: var(--primary-red);
  color: #fff;
  font-weight: 500;
}
