/**
 * ====================================================================
 * ESTILOS DO PLAYER DE VÍDEO CUSTOMIZADO (PLAYER.CSS)
 * ====================================================================
 */

.player-wrapper {
  position: relative;
  width: 100%;
  background-color: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  aspect-ratio: 16 / 9;
  user-select: none;
}

.player-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background-color: #000;
  cursor: pointer;
}

/* Botão Central de Play */
.center-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.player-wrapper.is-paused .center-play-overlay {
  opacity: 1;
  pointer-events: auto;
}

.center-play-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.9);
  border: 3px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.6);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s;
}

.center-play-btn:hover {
  transform: scale(1.1);
  background: #1d4ed8;
}

.center-play-btn svg {
  margin-left: 4px;
}

/* Spinner de Carregamento */
.player-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 12;
  display: none;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--primary, #3b82f6);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Barra de Controles Inferior */
.player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  padding: 10px 16px 14px 16px;
  z-index: 15;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-wrapper.hide-controls .player-controls {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* Barra de Progresso (Timeline) */
.timeline-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: height 0.15s ease;
}

.timeline-container:hover {
  height: 9px;
}

.timeline-filled {
  height: 100%;
  width: 0%;
  background: var(--primary, #3b82f6);
  border-radius: 4px;
  position: relative;
}

.timeline-thumb {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 13px;
  height: 13px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}

.timeline-container:hover .timeline-thumb {
  transform: translateY(-50%) scale(1);
}

/* Linha de Botões e Controles */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.controls-left,
.controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: #f1f5f9;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.ctrl-btn:active {
  transform: scale(0.95);
}

/* Indicador de Tempo */
.time-display {
  font-size: 0.85rem;
  font-weight: 500;
  color: #e2e8f0;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

.time-separator {
  margin: 0 4px;
  opacity: 0.6;
}

/* Grupo de Volume */
.volume-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: opacity 0.2s, width 0.2s;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
}

/* Seletor de Velocidade */
.speed-select {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  transition: background 0.2s;
}

.speed-select:hover {
  background: rgba(255, 255, 255, 0.25);
}

.speed-select option {
  background-color: #1e293b;
  color: #fff;
}
