/* 本地背景视频样式 */
@charset "UTF-8";

/* 背景视频容器 */
.mbr-background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

/* 视频元素样式 */
.mbr-background-video video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: -1;
}

/* 确保视频在移动端也能正常显示 */
@media (max-width: 768px) {
  .mbr-background-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* 视频加载时的占位符 */
.mbr-background-video::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  z-index: -2;
}

/* 视频播放时的优化 */
.mbr-background-video video::-webkit-media-controls {
  display: none !important;
}

.mbr-background-video video::-webkit-media-controls-panel {
  display: none !important;
}

/* 确保内容在视频之上 */
.mbr-section-title,
.mbr-text,
.mbr-section-btn {
  position: relative;
  z-index: 2;
}

/* 视频加载失败时的备用样式 */
.mbr-background-video img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

/* 性能优化 */
.mbr-background-video video {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* 全屏section的视频适配 */
.mbr-fullscreen .mbr-background-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

/* 视频加载状态指示 */
.mbr-background-video.loading::after {
  content: '视频加载中...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.2rem;
  z-index: 1;
}
