/**
 * 视频播放器样式
 */

.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 宽高比 */
  overflow: hidden;
  background-color: #000000;
  border-radius: 0;
}

.video-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.3s ease;
  z-index: 3; /* 确保在视频上方 */
  background-color: #000000; /* 纯黑背景 */
}

.thumbnail-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
  z-index: 1;
}

.video-thumbnail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2); /* 稍微减轻遮罩深度 */
  z-index: -1; /* 确保内容在遮罩上方 */
  transition: opacity 0.3s ease;
}

.video-thumbnail.playing {
  opacity: 0;
  pointer-events: none;
}

.中科天目-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #000;
  z-index: 2;
  filter: none !important; /* 保持视频原始色彩 */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.play-button {
  position: relative;
  z-index: 4;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  width: 80px;
  height: 50px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

.play-button:hover {
  width: 160px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 25px;
}

.play-button svg {
  margin-right: 8px;
  transition: all 0.3s ease-in-out;
}

.play-button span {
  color: #FAFAF9;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  margin-right: 10px;
}

.play-button:hover span {
  opacity: 1;
}

.video-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px; /* 更细的进度条 */
  background-color: rgba(255, 255, 255, 0.2);
  z-index: 4;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background-color: #FAFAF9;
  transition: width 0.1s linear;
}

/* 视频控制 - 悬停时才显示 */
.video-controls {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  padding: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent) !important;
  z-index: 999 !important;
  opacity: 0 !important; /* 默认隐藏 */
  transition: opacity 0.3s ease !important;
  pointer-events: auto !important;
}

.video-container:hover .video-controls {
  opacity: 1 !important; /* 悬停时显示 */
}

/* 播放/暂停按钮 */
.video-controls button {
  position: relative !important;
  z-index: 1000 !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 4px !important;
  transition: transform 0.2s ease !important;
}

.video-controls button:hover {
  transform: scale(1.1) !important;
}

/* 音量控制 */
.volume-control {
  display: flex !important;
  align-items: center !important;
  width: 110px !important;
  z-index: 1000 !important;
  pointer-events: auto !important;
}

.volume-slider {
  width: 70px !important;
  height: 2px !important;
  background-color: rgba(255, 255, 255, 0.3) !important;
  border-radius: 1px !important;
  margin-left: 8px !important;
  position: relative !important;
  cursor: pointer !important;
  z-index: 1000 !important;
  pointer-events: auto !important;
  transition: height 0.2s ease !important;
}

.volume-slider:hover {
  height: 4px !important;
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  background: #FAFAF9;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: #FAFAF9;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

/* 移动端适配 */
@media (max-width: 767px) {
  .play-button {
    width: 56px;
    height: 56px;
  }
  
  .play-button:hover {
    width: 140px;
  }
  
  .play-button svg {
    margin-left: 0;
  }
  
  .volume-control {
    display: none !important;
  }
  
  .video-controls {
    padding: 12px !important;
  }
} 

.hero-main-video {
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  transform: scale(var(--video-scale, 0.85));
} 