/* 现代化弹窗组件样式 */
/* 弹窗遮罩层 */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.custom-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* 弹窗背景模糊效果 */
.custom-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* 弹窗容器 */
.custom-modal-container {
  position: fixed;
  width: 956px;
  height: 440px;
  background: #F7F9FA;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  opacity: 1;
  transform: rotate(0deg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 40px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

/* 确保弹窗容器有相对定位，用于整体滑动动画 */
.custom-modal-container {
  position: relative;
}

/* 弹窗内容 */
.custom-modal-content {
  width: 956px;
  height: 360px;
  /* padding: 0 6px; */
  transform: rotate(0deg);
  opacity: 1;
  gap: 16px;
  border-radius: 8px;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: row;
  will-change: transform, opacity;
}

/* 内容滑动容器 */
.custom-modal-content-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

/* 内容滑动轨道 */
.custom-modal-content-track {
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* 单个页面内容 */
.custom-modal-page {
  width: 956px;
  height: 360px;
  flex-shrink: 0;
  display: flex;
  gap: 16px;
  /* padding: 0 6px; */
  opacity: 1;
  transition: opacity 0.3s ease;
}

.custom-modal-page.fade-out {
  opacity: 0;
}

/* 弹窗关闭按钮 */
.custom-modal-close {
  position: absolute;
  top: 4px;
  right: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.custom-modal-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

/* 弹窗主体左侧 - 页面滑动容器 */
.custom-modal-body-left {
  width: 956px;
  height: 360px;
  transform: rotate(0deg);
  opacity: 1;
  gap: 0;
  padding: 0;
  margin: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
}

/* 弹窗主体右侧 */
.custom-modal-body-right {
  width: 640px;
  height: 360px;
  transform: rotate(0deg);
  opacity: 1;
  margin-left: auto;
  padding: 0;
}

/* 视频轮播样式 */
.video-carousel {
  width: 100%;
  height: 100%;
  position: relative;
}

.video-container {
  position: relative;
  width: 100%;
  height: 100%;
  /* background: #000; */
  overflow: hidden;
  will-change: transform;
}

/* 视频加载状态样式 */
.video-container[data-loading="true"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 5;
}

.video-container[data-loading="true"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 6;
  transform: translate(-50%, -50%);
}

.video-container.video-loaded video {
  opacity: 1;
}

.video-container:not(.video-loaded) video {
  opacity: 0.7;
}

/* 加载指示器样式 - 使用CSS伪元素实现，移除原始样式 */

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* background: #000; */
  will-change: transform, opacity;
  /* 优化视频渲染性能 */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  /* 确保视频在移动端正常播放 */
  -webkit-playsinline: true;
  playsinline: true;
  /* 减少重绘和回流 */
  contain: layout style paint;
  /* 网络优化 */
  -webkit-media-playback-requires-user-gesture: none;
  media-playback-requires-user-gesture: none;
}

.video-container #currentVideo {
  position: relative;
  z-index: 2;
  opacity: 1;
  transition: transform 0.5s ease, opacity 0.5s ease;
  background: #000;
  will-change: transform, opacity;
}

.video-container #nextVideo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
  background: #000;
  will-change: transform, opacity;
}

/* 向左切页按钮样式 */
.prev-page-btn {
  position: absolute;
  right: 90px;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 40px;
  transform: translateY(-50%) rotate(0deg);
  opacity: 1;
  border-radius: 20px;
  background: linear-gradient(white, white) padding-box,
    linear-gradient(90deg, #0055CD 0%, #BF00FF 100%) border-box;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 15;
}

.prev-page-btn svg path {
  stroke: url(#gradient);
}

.prev-page-btn:hover {
  background: linear-gradient(90deg, #E6EEFA 0%, #F8E6FF 100%) padding-box,
    linear-gradient(90deg, #0055CD 0%, #BF00FF 100%) border-box;
  transform: translateY(-50%) scale(1.05);
}



.prev-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: translateY(-50%);
}

/* 页面内容滑动容器 */
.custom-modal-body-left {
  position: relative;
  overflow: hidden;
}

/* 页面切换动画 - 水平滑动效果 */
.page-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 956px;
  height: 360px;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
  transform-origin: center center;
  max-height: 360px;
  overflow: hidden;
  box-sizing: border-box;
  opacity: 1;
  will-change: transform, opacity;
  display: flex;
  flex-direction: row;
  gap: 16px;
  /* padding: 0 6px; */
}

/* 页面内容在容器内水平移动 */
.page-content.slide-out-left {
  transform: translateX(-956px);
  /* 向左移动906px (956px - 50px) */
  opacity: 0;
}

.page-content.slide-out-right {
  transform: translateX(956px);
  /* 向右移动906px (956px - 50px) */
  opacity: 0;
}

.page-content.slide-in-left {
  transform: translateX(0);
  opacity: 1;
}

.page-content.slide-in-right {
  transform: translateX(0);
  opacity: 1;
}

/* 页面左侧文字内容 */
.page-left-content {
  width: 300px;
  height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  margin: 0;
}

/* 页面右侧视频内容 */
.page-right-content {
  width: 640px;
  height: 360px;
  /* padding-left: 30px; */
  margin: 0;
}

/* 第5页CTA按钮样式 */
.page-cta-button {
  display: inline-block;
  width: 238px;
  height: 40px;
  opacity: 1;
  border-radius: 20px;
  background: linear-gradient(90deg, #0055CD 0%, #BF00FF 100%);
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: white;
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0%;
  text-align: center;
  transition: all 0.2s ease;
  margin-top: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-cta-button:hover {
  background: linear-gradient(90deg, #0000F1 0%, #D900C3 100%);
  transform: scale(1.02);
  color: #ffffff;
  z-index: 1;
  position: relative;
}

/* 向右切页按钮样式 */
.next-page-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 40px;
  transform: translateY(-50%) rotate(0deg);
  opacity: 1;
  border-radius: 20px;
  background: linear-gradient(90deg, #0055CD 0%, #BF00FF 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 15;
  color: white;
}

.next-page-btn:hover {
  background: linear-gradient(90deg, #0000F1 0%, #D900C3 100%);
  transform: translateY(-50%) scale(1.05);
}

.next-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: translateY(-50%);
}

/* Got It按钮样式 */
.got-it-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 40px;
  transform: translateY(-50%) rotate(0deg);
  opacity: 1;
  border-radius: 20px;
  background: linear-gradient(90deg, #0055CD 0%, #BF00FF 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 15;
  color: white;
  font-size: 14px;
  font-weight: 500;
}

.got-it-btn:hover {
  background: linear-gradient(90deg, #0044b3 0%, #9900cc 100%);
  transform: translateY(-50%) scale(1.05);
}

/* 横条分页器样式 */
.pagination-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-right: auto;
  z-index: 15;
  position: relative;
}

.pagination-dot {
  width: 24px;
  height: 6px;
  transform: rotate(0deg);
  opacity: 1;
  border-radius: 3px;
  background: #C1C6CF;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-dot.active {
  background: linear-gradient(90deg, #0055CD 0%, #BF00FF 100%);
}

.pagination-dot:hover {
  background: #999;
}

.pagination-dot.active:hover {
  background: linear-gradient(90deg, #0044b3 0%, #9900cc 100%);
}

/* 弹窗段落 */
.custom-modal-section {
  margin-bottom: 32px;
}

.custom-modal-section:last-child {
  margin-bottom: 0;
}

.custom-modal-section p {
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0px;
  margin: 16px 0 0 0;
  color: #6A6B6D;
}

/* 弹窗副标题 */
.custom-modal-subtitle {
  font-weight: 700;
  font-style: normal;
  font-size: 24px;
  line-height: 1.5;
  letter-spacing: 0px;
  background: linear-gradient(90deg, #0055CD 0%, #BF00FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  display: flex;
  align-items: center;
}

/* 弹窗底部 */
.custom-modal-footer {
  width: 956px;
  height: 40px;
  transform: rotate(0deg);
  opacity: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0;
  border-top: none;
  background: transparent;
}

/* 弹窗按钮 */
.custom-modal-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
}

.custom-modal-btn.secondary {
  background: white;
  color: #666;
  border: 1px solid #ddd;
}

.custom-modal-btn.secondary:hover {
  background: #f5f5f5;
  border-color: #999;
}

.custom-modal-btn.primary {
  background: linear-gradient(135deg, #0055CD 0%, #0044B3 100%);
  color: white;
  text-decoration: none;
}

.custom-modal-btn.primary:hover {
  background: linear-gradient(135deg, #0044B3 0%, #003393 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 85, 205, 0.3);
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .custom-modal-container {
    width: 90%;
    max-width: 1036px;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  .custom-modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: none;
    height: auto;
    max-height: 90vh;
    padding: 20px;
    gap: 20px;
  }

  .custom-modal-content {
    gap: 20px;
  }

  .custom-modal-footer {
    flex-direction: column;
  }

  .custom-modal-btn {
    width: 100%;
    order: 2;
  }

  .custom-modal-btn.primary {
    order: 1;
  }
}

@media (max-width: 480px) {
  .custom-modal-container {
    width: 98%;
    padding: 16px;
    gap: 16px;
  }

  .custom-modal-content {
    gap: 16px;
  }

  .custom-modal-section {
    margin-bottom: 16px;
  }
}

/* 为支持更老的浏览器添加的备用样式 */
.no-backdrop-filter .custom-modal-backdrop {
  background: rgba(0, 0, 0, 0.7);
}