/* 重置与基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --chinese-red: #9f2029;
  --dark-red: #9c2a2a;
  --light-red: #e8b4b4;
  --gold: #fbb829;
  --dark-gold: #b8941f;
  --cream: #fff9f3;
  --dark-brown: #3d3028;
  --light-cream: #fef8f0;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  --transition: all 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Noto Serif SC", serif;
  color: var(--dark-brown);
  background-color: var(--cream);
  line-height: 1.6;
}

/* 主Swiper容器 */
.main-swiper {
  width: 100%;
  height: 100vh;
}

.main-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-content {
  width: 100%;
  height: 100%;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* 音乐控制 */
.music-control {
  position: fixed;
  bottom: 38px;
  right: 30px;
  z-index: 1000;
}

#music-toggle {
  background-color: var(--chinese-red);
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
  font-size: 1.2rem;
  z-index: 1001;
}

#music-toggle.playing {
  background-color: var(--gold);
  color: var(--dark-brown);
}

#music-toggle:hover {
  transform: scale(1.1);
}

#music-toggle:hover:not(.playing) {
  background-color: var(--dark-red);
}

/* 加载动画 */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--chinese-red);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition:
    opacity 0.8s ease,
    visibility 0.8s ease;
}

.loader-content {
  text-align: center;
  color: white;
}

.title-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 0 auto;
}

.double-happiness {
  font-family: "Ma Shan Zheng", cursive;
  color: var(--gold);
  font-size: 7rem;
  margin-bottom: 1.5rem;
  animation: pulse 2s infinite;
}

.loading-text {
  font-size: 1rem;
  letter-spacing: 2px;
  color: var(--gold);
}

/* 页面指示器 */
.page-indicator {
  position: fixed;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.indicator-dots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.dot.active {
  background-color: var(--gold);
  border-color: var(--gold);
  transform: scale(1.3);
}

/* ===========================================
   第一页：封面（简化版）
   =========================================== */
.page-cover {
  background: linear-gradient(135deg, var(--chinese-red), var(--dark-red));
  color: white;
  position: relative;
}

/* 边框装饰 */
.border-decoration {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  border: 2px solid var(--gold);
  pointer-events: none;
}

.border-decoration span {
  position: absolute;
  background-image: url("../images/yuansu.png");
  background-position: left left;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: inline-block;
  width: 38px;
  height: 38px;
}

.border-decoration span:nth-child(1) {
  left: 0;
  top: 0;
}

.border-decoration span:nth-child(2) {
  right: 0;
  top: 0;
  transform: rotateZ(90deg);
}

.border-decoration span:nth-child(3) {
  left: 0;
  bottom: 0;
  transform: rotateZ(-90deg);
}

.border-decoration span:nth-child(4) {
  right: 0;
  bottom: 0;
  transform: rotateZ(180deg);
}

/* 烫金喜帖 */
.golden-invitation {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  z-index: 2;
}

.happiness-character {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 6rem;
  color: var(--gold);
  margin-bottom: 20px;
  text-shadow:
    0 0 20px rgba(212, 175, 55, 0.5),
    0 0 40px rgba(212, 175, 55, 0.3);
  animation:
    pulse 2s infinite,
    glow 3s infinite alternate;
}

.wedding-title {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 7rem !important;
  color: var(--gold);
  position: relative;
  padding-bottom: 15px;
  white-space: wrap;
  word-break: break-all;
  width: 5rem;
  margin-right: 32px;
}

/* 底部小字文案和提示 */
.cover-footer {
  position: absolute;
  bottom: 40px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 2;
}

.footer-text {
  margin-bottom: 20px;
}

.footer-text p {
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(255, 255, 255, 0.8);
  animation: bounce 2s infinite;
}

.scroll-hint i {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.scroll-hint p {
  font-size: 0.8rem;
  letter-spacing: 1px;
}

/* ===========================================
   第二页：新人介绍（静态左右排列）
   =========================================== */
.page-intro {
  background-color: var(--cream);
}

.intro-content {
  width: 100%;
  max-width: 1200px;
  padding: 10px;
}

/* 新人静态容器 */
.couple-static-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

@media (min-width: 768px) {
  .couple-static-container {
    flex-direction: row;
    gap: 40px;
    align-items: center;
  }
}

/* 新郎新娘静态区域 */
.couple-static-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  max-width: 350px;
}

@media (min-width: 768px) {
  .couple-static-section {
    width: 40%;
  }
}

.couple-name {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 2.2rem;
  color: var(--dark-brown);
  margin-bottom: 20px;
  text-align: center;
  position: relative;
  padding-bottom: 10px;
}

.couple-role {
  font-family: "Noto Serif SC", serif;
  font-size: 1.2rem;
  color: var(--chinese-red);
  margin-left: 10px;
  font-weight: normal;
}

/* 静态图片容器 */
.static-image-container {
  width: 100%;
  max-width: 300px;
  height: 400px;
  position: relative;
}

.static-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.image-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  border-radius: 12px;
}

.groom-overlay {
  background: linear-gradient(135deg, rgba(159, 32, 41, 0.1), transparent 30%);
}

.bride-overlay {
  background: linear-gradient(135deg, rgba(251, 184, 41, 0.1), transparent 30%);
}

.intro-text {
  text-align: center;
  font-size: 1.1rem;
  color: var(--dark-brown);
  line-height: 1.8;
  max-width: 500px;
  margin: 30px auto 0;
  padding: 0 10px;
  opacity: 1 !important;
  visibility: visible !important;
  order: 3;
  width: 100%;
}

@media (min-width: 768px) {
  .intro-text {
    order: 2;
    margin: 0;
    width: 20%;
  }

  .groom-static {
    order: 1;
  }

  .bride-static {
    order: 3;
  }
}

.intro-text p {
  margin-bottom: 8px;
}

/* ===========================================
   第三、四、五页：三生三世主题 - Swiper 3D轮播图
   =========================================== */

/* 通用时代页面样式 */
.era-page {
  position: relative;
  overflow: hidden;
  background: var(--light-cream);
}

.era-container {
  width: 100%;
  max-width: 900px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 25px;
  padding: 20px 15px;
  position: relative;
}

.era-header {
  text-align: center;
  width: 100%;
  padding: 0 10px;
}

.era-number {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 1.5rem;
  color: var(--chinese-red);
  margin-bottom: 8px;
  letter-spacing: 3px;
}

.era-title {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 2rem;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
  color: var(--dark-brown);
}

.era-subtitle {
  font-size: 1.1rem;
  color: var(--dark-brown);
  opacity: 0.8;
  letter-spacing: 1px;
  line-height: 1.5;
}

.era-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

/* Swiper 3D轮播图容器 */
.swiper-3d {
  width: 100%;
  max-width: 700px;
  height: 160px;
  position: relative;
  margin: 0 auto;
}

.swiper-3d .swiper-wrapper {
  perspective: 1200px;
}

.swiper-3d .swiper-slide {
  width: 80%;
  height: 100%;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-content {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.image-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.era-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.1), transparent 30%);
  z-index: 1;
  pointer-events: none;
}

.ancient-overlay {
  background: linear-gradient(135deg, rgba(184, 134, 11, 0.1), transparent 30%);
}

.republican-overlay {
  background: linear-gradient(135deg, rgba(65, 105, 225, 0.1), transparent 30%);
}

.modern-overlay {
  background: linear-gradient(135deg, rgba(231, 84, 128, 0.1), transparent 30%);
}

/* Swiper分页器样式 */
.swiper-pagination {
  position: absolute;
  bottom: -30px !important;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 10;
}

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background-color: rgba(197, 48, 48, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.swiper-pagination-bullet-active {
  background-color: var(--chinese-red);
  transform: scale(1.2);
  border-color: var(--gold);
}

/* 时代描述 */
.era-description {
  text-align: center;
  font-size: 1.1rem;
  color: var(--dark-brown);
  line-height: 1.8;
  max-width: 500px;
  padding: 15px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  backdrop-filter: blur(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-top: 40px;
  opacity: 1 !important;
  visibility: visible !important;
}

.era-description p {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.era-description i {
  color: var(--chinese-red);
  font-size: 0.9rem;
  opacity: 0.7;
}

/* 第六页：视频展示 */
.page-video {
  background-color: #000;
  padding: 0;
}

.video-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.video-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

#wedding-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #000;
}

/* 视频控制条样式 */
#wedding-video::-webkit-media-controls-panel {
  background-color: rgba(0, 0, 0, 0.7);
}

#wedding-video::-webkit-media-controls-play-button {
  color: var(--gold);
}

#wedding-video::-webkit-media-controls-current-time-display,
#wedding-video::-webkit-media-controls-time-remaining-display {
  color: white;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
  pointer-events: none;
}

.video-content {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: white;
  z-index: 5;
  width: 90%;
  max-width: 700px;
  padding: 0 15px;
}

.video-title {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 2.2rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.video-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 第七页：婚礼详情 */
.page-details {
  background-color: var(--cream);
}

.details-content {
  width: 90%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 10px;
}

.details-card {
  background-color: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--chinese-red);
  transition: var(--transition);
  opacity: 1 !important;
  visibility: visible !important;
}

.details-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.card-icon {
  font-size: 1.5rem;
  color: var(--chinese-red);
  margin-right: 12px;
}

.card-header h3 {
  font-size: 1.5rem;
  color: var(--dark-brown);
  font-family: "Ma Shan Zheng", cursive;
}

.card-body {
  margin-bottom: 15px;
}

.date-time {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.date-item {
  display: flex;
  align-items: center;
}

.date-label {
  width: 50px;
  font-weight: 600;
  color: var(--dark-brown);
  font-size: 0.95rem;
}

.date-value {
  flex: 1;
  font-size: 1.1rem;
  color: var(--chinese-red);
}

.location-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.venue-name {
  font-size: 1.3rem;
  color: var(--chinese-red);
  font-weight: 600;
}

.venue-address p {
  color: var(--dark-brown);
  margin-bottom: 5px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.card-footer {
  border-top: 1px solid #eee;
  padding-top: 12px;
}

.chinese-luck {
  color: var(--gold);
  font-style: italic;
  text-align: center;
  font-size: 0.95rem;
}

.map-btn {
  background-color: var(--chinese-red);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 8px 20px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 auto;
}

.map-btn:hover {
  background-color: var(--dark-red);
  transform: scale(1.05);
}

/* 第八页：RSVP表单 */
.page-rsvp {
  background-color: #f5f0e6;
}

.rsvp-content {
  width: 90%;
  max-width: 450px;
  background-color: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin: 0 10px;
}

.rsvp-intro {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1rem;
  color: var(--dark-brown);
  line-height: 1.5;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 1rem;
  color: var(--dark-brown);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group label i {
  margin-right: 6px;
  color: var(--chinese-red);
}

.form-group input[type="text"] {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0d5c0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: "Noto Serif SC", serif;
  transition: var(--transition);
}

.form-group input[type="text"]:focus {
  outline: none;
  border-color: var(--gold);
}

.guest-counter {
  display: flex;
  align-items: center;
  max-width: 180px;
  margin: 0 auto;
}

.counter-btn {
  background-color: var(--chinese-red);
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.counter-btn:hover {
  background-color: var(--dark-red);
  transform: scale(1.1);
}

#guest-count {
  flex: 1;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  border: none;
  background: none;
  color: var(--dark-brown);
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--chinese-red), var(--dark-red));
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: "Noto Serif SC", serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(197, 48, 48, 0.3);
}

.rsvp-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.closing-message {
  font-size: 1rem;
  color: var(--dark-brown);
  line-height: 1.6;
  margin-bottom: 12px;
  font-family: "Ma Shan Zheng", cursive;
}

.signature {
  font-size: 1.1rem;
  color: var(--chinese-red);
  font-weight: 600;
}

.signature p:first-child {
  margin-bottom: 5px;
}

/* 地图弹窗样式 */
.map-modal-content {
  width: 90%;
  max-width: 800px;
  padding: 0;
  overflow: hidden;
}

#amap-container {
  width: 100%;
  height: 400px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.map-address-info {
  padding: 15px;
  text-align: center;
  background-color: #f9f9f9;
  border-top: 1px solid #eee;
}

.map-address-info h4 {
  font-size: 1.3rem;
  color: var(--chinese-red);
  margin-bottom: 8px;
}

/* 确认弹窗 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-content {
  background-color: white;
  border-radius: 12px;
  width: 90%;
  max-width: 350px;
  padding: 20px;
  text-align: center;
  position: relative;
  animation: modalFadeIn 0.5s ease-out;
  border: 3px solid var(--gold);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--dark-brown);
  transition: var(--transition);
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  background-color: #f5f5f5;
}

.modal-body {
  padding: 10px 0;
}

.modal-icon {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 3rem;
  color: var(--chinese-red);
  margin-bottom: 15px;
}

.modal-title {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--dark-brown);
}

.modal-text {
  font-size: 1rem;
  margin-bottom: 20px;
  color: var(--dark-brown);
  line-height: 1.5;
}

.modal-btn {
  padding: 10px 35px;
  background-color: var(--chinese-red);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: "Noto Serif SC", serif;
  font-weight: 500;
}

.modal-btn:hover {
  background-color: var(--dark-red);
  transform: translateY(-2px);
}

/* ===========================================
   动画定义
   =========================================== */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

@keyframes glow {
  0% {
    text-shadow:
      0 0 20px rgba(212, 175, 55, 0.5),
      0 0 40px rgba(212, 175, 55, 0.3);
  }
  100% {
    text-shadow:
      0 0 30px rgba(212, 175, 55, 0.7),
      0 0 60px rgba(212, 175, 55, 0.5);
  }
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 响应式设计 */
@media (max-width: 992px) {
  .happiness-character {
    font-size: 5rem;
  }

  .wedding-title {
    font-size: 2.2rem;
  }

  .couple-name {
    font-size: 2rem;
  }

  .static-image-container {
    height: 350px;
  }
}

@media (max-width: 768px) {
  .happiness-character {
    font-size: 4rem;
  }

  .wedding-title {
    font-size: 1.8rem;
    letter-spacing: 6px;
  }

  .border-decoration {
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
  }

  .cover-footer {
    bottom: 30px;
  }

  .couple-name {
    font-size: 1.8rem;
  }

  .static-image-container {
    height: 300px;
  }

  .intro-text {
    font-size: 1rem;
  }

  .video-title {
    font-size: 1.8rem;
  }

  .video-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .happiness-character {
    font-size: 3.5rem;
  }

  .wedding-title {
    font-size: 1.6rem;
    letter-spacing: 5px;
  }

  .footer-text p {
    font-size: 0.8rem;
  }

  .scroll-hint p {
    font-size: 0.75rem;
  }

  .border-decoration {
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .couple-name {
    font-size: 1.6rem;
  }

  .couple-role {
    font-size: 1rem;
  }

  .static-image-container {
    height: 250px;
  }

  .video-title {
    font-size: 1.5rem;
  }

  .video-subtitle {
    font-size: 0.9rem;
  }
}

@media (max-width: 375px) {
  .happiness-character {
    font-size: 3rem;
  }

  .wedding-title {
    font-size: 1.4rem;
    letter-spacing: 4px;
  }

  .couple-name {
    font-size: 1.4rem;
  }

  .static-image-container {
    height: 220px;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .details-card:hover {
    transform: none;
  }

  .counter-btn:active,
  .video-btn:active,
  .modal-btn:active,
  .submit-btn:active,
  .map-btn:active {
    transform: scale(0.95);
  }

  .swiper-slide:hover .era-image {
    transform: none;
  }

  #music-toggle:active {
    transform: scale(0.95);
  }
}

.section-title {
  margin-bottom: 20px;
  text-align: center;
}

.section-title h2 {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 2.5rem;
  color: var(--dark-brown);
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .section-title h2 {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .section-title h2 {
    font-size: 1.8rem;
  }
}

/* ===========================================
   性能优化样式
   =========================================== */

/* 启用硬件加速 */
.page-content,
.swiper-slide,
.era-image,
.static-image,
.details-card,
.rsvp-content {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* 减少重绘区域 */
.swiper-slide {
  contain: content;
  will-change: transform;
}

/* 过渡时禁用某些动画 */
body.swiper-transitioning .animate__animated,
body.swiper-transitioning .era-image,
body.swiper-transitioning .details-card {
  animation: none !important;
  transition: none !important;
}

/* 优化3D变换性能 */
.swiper-3d .swiper-slide {
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* 优化图片渲染 */
.era-image,
.static-image {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* 优化阴影和渐变性能 */
.details-card,
.rsvp-content,
.static-image-container {
  transform: translateZ(0);
}

/* 减少GPU图层数量 */
.swiper-pagination-bullet,
.dot,
#music-toggle {
  transform: translateZ(0);
}

/* 视频页面优化 */
.page-video .video-container {
  transform: translateZ(0);
}

#wedding-video {
  transform: translateZ(0);
  will-change: transform;
}

/* 触摸反馈优化 */
@media (hover: none) and (pointer: coarse) {
  .swiper-slide {
    -webkit-overflow-scrolling: touch;
  }

  .main-swiper {
    overflow: hidden;
  }
}

/* 减少动画复杂度 */
@media (max-width: 768px) {
  .era-image,
  .static-image {
    transition: none;
  }

  .swiper-3d .swiper-slide {
    transform-style: flat;
  }
}

/* 低端设备优化 */
@media (max-width: 480px) {
  .animate__animated {
    animation-duration: 0.6s !important;
  }

  .era-description,
  .intro-text {
    background-color: transparent;
    backdrop-filter: none;
  }
}
