.hero-video {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 包装容器 - 接收布局控制面板的CSS变量 */
.hero-video__wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  /* 移除硬编码，使用布局控制面板的CSS变量 */
  padding: var(--s-padding-top, 0px) var(--s-padding-right, 20px) var(--s-padding-bottom, 0px) var(--s-padding-left, 20px);
  box-sizing: border-box;
}

/* 背景图片 */
.hero-video__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-video__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 遮罩层 */
.hero-video__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, calc(var(--hero-video-overlay-opacity, 30) / 100));
  z-index: 0;
}

/* 内容区域 */
.hero-video__content {
  position: absolute;
  z-index: 0;
  color: white;
  /* 移除硬编码的padding，改为小的固定值避免内容贴边 */
  padding: 10px;
  max-width: 80%;
}

/* 内容位置控制 */
.hero-video__content--top-left { top: 0; left: 0; }
.hero-video__content--top-center { top: 0; left: 50%; transform: translateX(-50%); }
.hero-video__content--top-right { top: 0; right: 0; }
.hero-video__content--center-left { top: 50%; left: 0; transform: translateY(-50%); }
.hero-video__content--center-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.hero-video__content--center-right { top: 50%; right: 0; transform: translateY(-50%); }
.hero-video__content--bottom-left { bottom: 0; left: 0; }
.hero-video__content--bottom-center { bottom: 0; left: 50%; transform: translateX(-50%); }
.hero-video__content--bottom-right { bottom: 0; right: 0; }

/* 内容对齐 */
.hero-video__content--left { text-align: left; }
.hero-video__content--center { text-align: center; }
.hero-video__content--right { text-align: right; }

/* 播放按钮 */
.hero-video__play-button {
  width: 60px;
  height: 60px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  margin: 20px auto 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-video__play-button:hover {
  transform: scale(1.1);
}

.hero-video__play-button--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hero-video__play-button--disabled:hover {
  transform: none;
}

.hero-video__play-icon {
  width: 20px;
  height: 20px;
  color: #333;
  margin-left: 2px;
}

/* 视频播放器 - 在容器内播放 */
.hero-video__player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  background: black;
  z-index: 3;
}

.hero-video__video,
.hero-video__iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 播放时隐藏内容和背景 */
.hero-video[data-playing="true"] .hero-video__content {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hero-video[data-playing="true"] .hero-video__background {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-video[data-playing="true"] .hero-video__overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* 视频暂停时完全显示封面，隐藏视频 */
.hero-video[data-paused="true"] .hero-video__content {
  opacity: 1;
  pointer-events: all;
  transition: opacity 0.3s ease;
}

.hero-video[data-paused="true"] .hero-video__background {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.hero-video[data-paused="true"] .hero-video__overlay {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.hero-video[data-paused="true"] .hero-video__player {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* 响应式设计 */
@media (min-width: 768px) {
  .hero-video__play-button {
    width: 80px;
    height: 80px;
  }

  .hero-video__play-icon {
    width: 28px;
    height: 28px;
    margin-left: 3px;
  }

  .hero-video__content {
    max-width: 70%;
  }
}

@media (max-width: 768px) {
  .hero-video__content {
    /* 移除硬编码的padding，保持统一的小边距 */
    padding: 8px;
    max-width: 90%;
  }
  
  /* 移动端wrapper的响应式处理 */
  .hero-video__wrapper {
    padding: var(--s-padding-top, 0px) var(--s-padding-right, 16px) var(--s-padding-bottom, 0px) var(--s-padding-left, 16px);
  }
}