.video-background-section {
  --video-background-height: 700px;
}

/* 高度设置 */
.video-background-section.small {
  --video-background-height: 500px;
}

.video-background-section.medium {
  --video-background-height: 700px;
}

.video-background-section.large {
  --video-background-height: 900px;
}

/* 移动端高度 */
@media (max-width: 959px) {
  .video-background-section {
    --video-background-height: 500px;
  }

  .video-background-section.small {
    --video-background-height: 400px;
  }

  .video-background-section.medium {
    --video-background-height: 500px;
  }

  .video-background-section.large {
    --video-background-height: 650px;
  }
}

/* 主容器 */
.video-background-section {
  position: relative;
  width: 100%;
  height: var(--video-background-height);
  overflow: hidden;
}

/* 媒体区域 */
.video-background__media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgb(var(--color-image-background));
}

/* 封面图片 */
.video-background__cover {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.video-background__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* 视频 */
.video-background__video {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* 桌面端视频：在移动端隐藏 */
.video-background__video--desktop {
  display: block;
}

@media (max-width: 959px) {
  .video-background__video--desktop {
    display: none;
  }
}

/* 移动端视频：在桌面端隐藏 */
.video-background__video--mobile {
  display: none;
}

@media (max-width: 959px) {
  .video-background__video--mobile {
    display: block;
  }
}

/* 当有封面图片时，视频初始透明 */
.video-background__media.has-cover .video-background__video {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

/* 视频播放时显示 */
.video-background__media.has-cover .video-background__video.playing {
  opacity: 1;
}

/* 播放按钮 */
.video-background__play-button {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  z-index: 5;
  transform: translate(-50%, -50%);
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 600;
  color: rgb(255, 255, 255);
  background-color: rgba(0, 0, 0, 0.7);
  border: 2px solid rgb(255, 255, 255);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-background__play-button:hover {
  background-color: rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.05);
}

/* 占位图标 */
.video-background__placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgb(var(--color-image-background));
}

.video-background__placeholder svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 内容区域 */
.video-background__content {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* 容器占满全宽 */
.video-background__container {
  display: flex;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 透明标头模式 */
.video-background-section.transparent-header {
  margin-block-start: calc(-1 * var(--header-height, 80px));
  padding-block-start: var(--header-height, 80px);
}

/* 文字颜色 - 覆盖在视频上时为白色 */
.video-background-section .video-background__subtitle,
.video-background-section .video-background__title,
.video-background-section .video-background__description {
  color: rgb(255, 255, 255);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 按钮样式 */
.video-background-section .video-background__button-wrapper {
  --color-button-secondary-border: 255, 255, 255;
  --color-button-secondary-background: 255, 255, 255, 0;
  --color-button-secondary-text: 255, 255, 255;
  --color-button-background: 255, 255, 255;
  --color-button-text: 0, 0, 0;
}

