.video-player-container {
  width: 100%;
  position: relative;
}

.player-wrapper {
  width: 100%;
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.video-js {
  width: 100%;
  height: 100%;
  min-height: 300px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .video-js {
    min-height: 200px;
  }
  
  .vjs-big-play-button {
    transform: scale(0.8);
  }
}

/* 错误消息样式 */
.player-error-message {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 10;
  border-radius: 8px;
}

.error-content {
  max-width: 80%;
}

.error-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 10px;
}

.retry-button {
  margin-top: 15px;
  background-color: #4CAF50;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.retry-button:hover {
  background-color: #45a049;
}

/* 音量控制样式优化 */
:deep(.video-js .vjs-volume-panel) {
  transition: none !important;
  margin-right: 0.8em;
  width: 3em;
}

:deep(.video-js .vjs-volume-panel.vjs-hover) {
  width: 3em !important;
}

:deep(.video-js .vjs-volume-panel .vjs-mute-control) {
  width: 3em;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

/* 默认隐藏音量控制条 */
:deep(.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical) {
  visibility: hidden !important;
  opacity: 0 !important;
  width: 3em !important;
  height: 10em !important;
  margin: 0 !important;
  position: absolute !important;
  bottom: 40px !important;
  left: 0 !important;
  transform: none !important;
  z-index: 10 !important;
  background-color: rgba(43, 51, 63, 0.9) !important;
  border-radius: 5px !important;
  padding: 5px !important;
  pointer-events: none !important;
  display: block !important;
  transition: none !important;
}

/* 悬停或活动状态时显示音量控制条 */
:deep(.video-js .vjs-volume-panel:hover .vjs-volume-control.vjs-volume-vertical),
:deep(.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical),
:deep(.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical),
:deep(.video-js .vjs-volume-panel.vjs-volume-panel-active .vjs-volume-control.vjs-volume-vertical) {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transition: none !important;
}

/* 音量滑块样式 */
:deep(.video-js .vjs-volume-panel .vjs-volume-bar.vjs-slider-vertical) {
  margin: 1.35em auto 0;
  width: 0.4em;
  height: 7em;
  transition: none !important;
}

:deep(.video-js .vjs-volume-panel .vjs-volume-level) {
  background-color: #4CAF50;
  width: 0.4em;
  transition: none !important;
}

/* 禁用所有音量相关元素的过渡效果 */
:deep(.video-js .vjs-volume-panel *),
:deep(.video-js .vjs-volume-control *),
:deep(.video-js .vjs-volume-bar *),
:deep(.video-js .vjs-volume-level) {
  transition: none !important;
}

/* 提示信息样式 */
:deep(.video-js .vjs-tip-message) {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(43, 51, 63, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 100;
  display: none;
  font-family: Arial, sans-serif;
  text-align: center;
  max-width: 80%;
  white-space: nowrap;
}

/* 倍速菜单样式优化 */
:deep(.video-js .vjs-playback-rate) {
  width: 4em !important;
  font-size: 1em;
  order: 3;
  margin-right: 0.8em;
}

:deep(.video-js .vjs-playback-rate .vjs-playback-rate-value) {
  font-size: 1.2em;
  line-height: 2.4;
  font-weight: bold;
  color: #ffffff;
  width: 100%;
  text-align: center;
  padding: 0 0.2em;
}

:deep(.video-js .vjs-menu-button-popup .vjs-menu) {
  left: -1em;
}

:deep(.video-js .vjs-playback-rate .vjs-menu) {
  width: 6em;
  left: -1.5em;
}

:deep(.video-js .vjs-menu-content) {
  padding: 0.4em 0;
}

:deep(.video-js .vjs-menu li) {
  padding: 0.3em 0.5em;
  font-size: 1.1em;
  text-align: center;
}

:deep(.video-js .vjs-menu li.vjs-selected) {
  background-color: rgba(216, 231, 216, 0.8);
}

:deep(.video-js .vjs-menu li:hover) {
  background-color: rgba(172, 181, 173, 0.5);
}

/* 控制栏元素间距优化 */
:deep(.video-js .vjs-control) {
  width: 3em;
}

:deep(.video-js .vjs-fullscreen-control) {
  width: 3.2em;
}

/* 确保控制栏有足够的空间 */
:deep(.video-js .vjs-control-bar) {
  padding: 0 0.5em;
  display: flex;
  justify-content: space-between;
}

/* 进度条与其他控制元素的间距 */
:deep(.video-js .vjs-progress-control) {
  margin-right: 0.5em;
}

/* 优化控制栏整体布局 */
:deep(.video-js .vjs-control-bar .vjs-control) {
  margin: 0 0.1em;
}

/* 时间进度显示样式 */
.time-progress-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* 允许点击穿透到视频播放器 */
  z-index: 5;
}

.time-progress-content {
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 10px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.time-display {
  color: white;
  font-size: 18px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .time-display {
    font-size: 16px;
  }
  
  .time-progress-content {
    padding: 8px 16px;
  }
}
