/* Shared Custom HTML5 Video Player Stylesheet */

.video-wrapper {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  aspect-ratio: 16 / 9;
  user-select: none;
}
.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
  padding: 14px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity 0.3s ease;
  opacity: 1;
  z-index: 10;
}
.video-wrapper.user-idle .player-controls { opacity: 0; pointer-events: none; }

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  transition: height 0.2s ease;
}
.progress-bar-container:hover { height: 10px; }

.progress-bar-fill {
  height: 100%;
  background: var(--accent-red, #ef4444);
  border-radius: 3px;
  width: 0%;
  position: relative;
}
.progress-bar-handle {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.progress-bar-container:hover .progress-bar-handle { opacity: 1; }

.seek-tooltip {
  position: absolute;
  top: -30px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: var(--accent-cyan, #38bdf8);
  border: 1px solid var(--accent-cyan, #38bdf8);
  font-size: 0.75rem;
  font-family: monospace;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  display: none;
  white-space: nowrap;
}

.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  font-size: 0.85rem;
}
.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ctrl-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.2s ease, transform 0.1s ease;
}
.ctrl-btn:hover { background: rgba(255, 255, 255, 0.15); transform: scale(1.08); }

.volume-container { display: flex; align-items: center; gap: 4px; }
.volume-slider {
  width: 60px;
  accent-color: var(--accent-cyan, #38bdf8);
  cursor: pointer;
}

.time-display { font-size: 0.8rem; font-weight: 600; color: var(--text-muted, #94a3b8); font-family: monospace; }

.speed-select {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}

.play-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.8rem;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s ease;
}
.play-pulse.active {
  transform: translate(-50%, -50%) scale(1.1);
  opacity: 1;
}

.video-shortcuts {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -14px;
  padding: 0 4px;
}
kbd { background: rgba(255, 255, 255, 0.1); padding: 1px 5px; border-radius: 3px; font-family: monospace; }
