body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

/* 设置整个页面的背景 */
body {
    background-image: url('img/BG.jpg'); /* 背景图片路径 */
    background-size: cover; /* 根据屏幕大小自动调整图片大小，保持图片比例 */
    background-position: center; /* 居中显示背景图片 */
    background-repeat: repeat; /* 平铺背景图片 */
}

/* 固定嘉宾邀请语 - 毛玻璃悬浮 */
.guest-fixed-text {
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 1000;
  font-family: 'HanYiQuanTangShi', 'LXGW WenKai', 'STKaiti', serif;
  font-size: 1.8em;
  color: #ffd700;
  text-shadow:
    0 1px 5px rgba(0, 0, 0, 0.85),
    0 0 8px rgba(255, 215, 0, 0.6);
  padding: 8px 16px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.guest-fixed-text.show {
  opacity: 1;
  transform: translateY(0);
}

/* 小屏适配 */
@media (max-width: 768px) {
  .guest-fixed-text {
    top: 12px;
    font-size: 1.4em;
    padding: 6px 12px;
  }
}

.container {
    position: relative;
    width: 88%; /* 100% - (6% * 2) */
    height: 80%; /* 100% - (10% * 2) */
    top: 5%;
    left: 6%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s, transform 0.5s;
    transform: rotateY(-90deg);
}

.carousel-item.active {
    opacity: 1;
    transform: rotateY(0deg);
}

/* ============== 字体加载 ============== */
@font-face {
  font-family: 'HanYiQuanTangShi';
  src: url('fonts/汉仪全唐诗.ttf') format('truetype');
}
@font-face {
  font-family: 'LXGWenKai';
  src: url('fonts/霞鹜文楷.ttf') format('truetype');
}
@font-face {
  font-family: 'OPPOSans';
  src: url('fonts/OPPOSans-R.ttf') format('truetype');
}

/* ============== 全局文字容器 ============== */
.carousel-content {
  top: 30%;
  position: relative;
  text-align: center;
  padding: 20px;
  max-width: 85%;
  z-index: 10;
  /* 毛玻璃背景，增强可读性 */
  background: rgba(0, 0, 0, 0.245);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ============== 标题 h2 ============== */
.carousel-content h2 {
  font-family: 'HanYiQuanTangShi', 'LXGWenKai', 'OPPOSans', serif;
  font-size: 2.0em;
  line-height: 1.35;
  margin: 0 0 16px;
  color: #fff;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.8),
    0 0 8px rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
}

/* ============== 段落 p ============== */
.carousel-content p {
  font-family: 'LXGWenKai', 'HanYiQuanTangShi', 'OPPOSans', serif;
  font-size: 1.3em;
  line-height: 1.5;
  margin: 0;
  color: #fff;
  text-shadow:
    0 1px 5px rgba(0, 0, 0, 0.85),
    0 0 6px rgba(255, 255, 255, 0.3);
}

/* ============== 特殊强调 ============== */
.highlight {
  color: #ffd700; /* 金色，突出地点 */
  text-shadow:
    0 1px 5px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(255, 215, 0, 0.6);
}

.warm-invite {
  font-size: 1.4em;
  margin-top: 12px;
  text-align: center;
}

.warm-invite strong {
  color: #ff6f91;
  text-shadow:
    0 1px 5px rgba(0, 0, 0, 0.8),
    0 0 12px rgba(255, 111, 145, 0.7);
}

.signature {
  font-size: 1.1em;
  margin-top: 20px;
  opacity: 0.95;
  font-style: italic;
}

/* ============== 对齐工具类（如需）============== */
.align-left  { text-align: left;  padding-left: 10%; }
.align-right { text-align: right; padding-right: 10%; }
.align-center { text-align: center; }

audio {
    display: none; /* 隐藏默认控件 */
}

.pagination {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
}

.dot {
    width: 16px;
    height: 16px;
    margin: 0 5px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.5;
}

.dot.active {
    opacity: 1;
}
/* 新拟态 - 地图图标 */
/* 容器居中 */
#content {
  width: 100%;
  text-align: center;
  padding: 15px 0;
}

/* 新拟态风格的 box */
.box {
  display: inline-block;
  margin: 20px;
  animation: fadeInDown 1s;
}

.box a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.carousel {
  cursor: grab;
  user-select: none;       /* 禁止选中文字 */
  -webkit-user-select: none;
  touch-action: pan-y;     /* 允许垂直滚动，禁止水平默认行为 */
}

.carousel img {
  -webkit-user-drag: none; /* 禁止图片拖拽 */
}

/* 图标容器 - 放大一倍 + 半透明背景 */
.box .img {
  width: 100px; /* 放大一倍 */
  height: 100px;
  border-radius: 10px;
  background-color: rgba(239, 238, 238, 0.3); /* 半透明：0.5 在 0.3~0.6 范围内 */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    18px 18px 30px rgba(0, 0, 0, 0.1),
    -18px -18px 30px rgba(255, 255, 255, 1);
  transition: box-shadow 0.2s ease-out;
  position: relative;
  z-index: 0;
}

.box .img img.icon {
  width: 80px; /* 图标也按比例放大 */
  height: auto;
  transition: width 0.2s ease-out;
}

/* 文字区域：不限长度，自动换行 */
.box .text {
  width: 260px; /* 与图标同宽 */
  min-height: 28px;
  line-height: 1.4;
  font-size: 14px;
  color: #232323;
  text-align: center;
  white-space: normal; /* 允许换行 */
  word-wrap: break-word; /* 长单词自动断行 */
  padding: 8px;
  box-sizing: border-box;
  border-radius: 20px;
  background-color: rgba(239, 238, 238, 0.5); /* 同样半透明 */
  box-shadow:
    18px 18px 30px rgba(0, 0, 0, 0.1),
    -18px -18px 30px rgba(255, 255, 255, 1);
  margin-top: 8px;
  transition: box-shadow 0.2s ease-out;
}

/* 悬停效果 - 按下感 */
.box a:hover .img {
  box-shadow:
    0 0 0 rgba(0, 0, 0, 0.2),
    0 0 0 rgba(255, 255, 255, 0.4),
    inset 18px 18px 30px rgba(0, 0, 0, 0.1),
    inset -18px -18px 30px rgba(255, 255, 255, 1);
}

.box a:hover .img img.icon {
  width: 100px;
}

/* 动画保留 */
@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* 懒加载 - 添加淡入动画 */
.carousel-item {
  transition: opacity 0.5s ease-in-out;
  opacity: 0; /* 初始隐藏 */
}

.carousel-item.bg-loaded,
.carousel-item.active {
  opacity: 1; /* 加载后或激活时显示 */
}