/* FUENTE DE ICONOS - Carga sincrónica para evitar layout shift */
@font-face {
  font-family: 'player-icons';
  src: url('/embed/assets/icomoon-6eac142d.eot?6xu9rp');
  src: url('/embed/assets/icomoon-6eac142d.eot?6xu9rp#iefix') format('embedded-opentype'),
    url('/embed/assets/icomoon-44d639e3.ttf?6xu9rp') format('truetype'),
    url('/embed/assets/icomoon-6673c854.woff?6xu9rp') format('woff'),
    url('/embed/assets/icomoon-eefa0501.svg?6xu9rp#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
  /* CRÍTICO: block asegura que la fuente se muestre inmediatamente */
  font-display: block;
}

/* Estilos base para iconos del reproductor */
.vjs-icon-font {
  font-family: 'player-icons' !important;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/**
 * @file index.css
 * @description Entry point CSS del reproductor StreamingHD
 * 
 * Este archivo importa todos los estilos base y componentes en el orden correcto.
 * Los estilos de modos específicos (lowlatency, vod, webrtc) se cargan
 * condicionalmente según el tipo de reproductor.
 * 
 * ORDEN DE CARGA (crítico para evitar conflictos):
 * 1. Variables CSS (--color-primary, --control-height, etc.)
 * 2. Reset y estilos globales
 * 3. Control bar base
 * 4. Responsive design
 * 5. Componentes (spinner, quality-selector, logo, etc.)
 * 6. Modo live (estilos de streaming en vivo)
 * 
 * @version 6.1.0
 * @since 2026-02-02
 */

/* ============================================
   1. BASE - Variables y Reset
   ============================================ */

/**
 * @file variables.css
 * @description Variables CSS globales del reproductor StreamingHD
 * 
 * Este archivo contiene todas las variables CSS (custom properties) 
 * que se usan a lo largo de la aplicación para mantener consistencia.
 * 
 * @version 6.1.0
 * @since 2026-02-02
 */

:root {
  /* ============================================
     COLORES
     ============================================ */
  --color-primary: #ff2b76;
  --color-black: #000000;
  --color-white: #ffffff;
  --color-black-transparent-70: rgba(0, 0, 0, 0.7);
  --color-black-transparent-80: rgba(0, 0, 0, 0.8);
  --color-black-transparent-40: rgba(0, 0, 0, 0.4);
  --color-black-transparent-20: rgba(0, 0, 0, 0.2);
  --color-white-transparent-10: rgba(255, 255, 255, 0.1);
  --color-white-transparent-16: rgba(255, 255, 255, 0.16);
  --color-grey: #73859f;
  --color-grey-dark: rgb(70, 70, 70);
  --color-grey-light: rgb(144, 144, 144, 0.5);

  /* ============================================
     TIPOGRAFÍA
     ============================================ */
  --font-family-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;

  /* ============================================
     TRANSICIONES
     ============================================ */
  --transition-normal: 0.3s;
  --transition-fast: 0.1s;
  --transition-slow: 0.5s;
  --transition-very-slow: 1s;

  /* ============================================
     BORDES Y SOMBRAS
     ============================================ */
  --border-radius-normal: 5px;
  --border-radius-large: 20px;
  --shadow-normal: 0 4px 15px rgba(0, 0, 0, 0.2);
  --shadow-large: 0 8px 32px 0 rgb(31 31 31 / 31%);

  /* ============================================
     CONTROL BAR - Valores base
     ============================================ */
  --control-bar-padding: 30px;
  --volume-bar-height: 6px;
  --gradient-dark-135: linear-gradient(
    135deg,
    var(--color-black-transparent-40) 0%,
    var(--color-black-transparent-20) 100%
  );

  /* Tamaños de controles (ajusta aquí para agrandar/empequeñecer) */
  --control-icon-size: 3em;
  --control-gap: 5px;
  --control-height: 30px;
  --control-width: 4.2em;

  /* ============================================
     ANIMACIONES
     ============================================ */
  --animation-pulse: pulse 1.5s infinite;
  --animation-pulse2: pulse2 2s infinite;
  --animation-spinner: none;

  /* ============================================
     iOS Safari Safe Area
     Para evitar que la barra flotante tape los controles
     ============================================ */
  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
}

/**
 * @file reset.css
 * @description Reset CSS y estilos base globales
 * 
 * Este archivo contiene:
 * - Reset de márgenes y padding
 * - Estilos base para html, body, #root
 * - Fixes para iOS Safari viewport
 * - Accesibilidad (focus-visible, skip-link)
 * 
 * @version 6.1.0
 * @since 2026-02-02
 */

/* ============================================
   RESET Y ESTILOS BASE
   ============================================ */

* {
  box-sizing: border-box;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: normal;
  text-rendering: optimizeLegibility;
}

body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

/* ============================================
   iOS Safari Viewport Fix
   ============================================
   El problema: 100vh en iOS Safari incluye la barra de navegación,
   causando que el contenido se extienda más allá del viewport visible.
   
   La solución: Usar -webkit-fill-available y dvh (dynamic viewport height)
   con fallbacks para máxima compatibilidad.
*/

/* Contenedor principal del reproductor - FIX para iOS Safari */

.embed-player-container {
  /* Fallback para navegadores antiguos */
  height: 100vh;
  /* iOS Safari fix - usa el espacio disponible real */
  height: -webkit-fill-available;
  /* Modern browsers - dynamic viewport height */
  height: 100dvh;
}

/* Asegurar que html y body también usen el viewport correcto */

html {
  /* Fallback */
  height: 100%;
  /* iOS Safari */
  height: -webkit-fill-available;
}

body {
  /* Fallback */
  min-height: 100%;
  min-height: -webkit-fill-available;
  min-height: 100dvh;
}

#root {
  /* Heredar altura del body */
  height: 100%;
  min-height: -webkit-fill-available;
  min-height: 100dvh;
}

/* ============================================
   ACCESIBILIDAD - Focus Visible (WCAG 2.1 AA)
   ============================================
   Restauramos el focus visible con estilo personalizado
   para usuarios de teclado. Cumple WCAG 2.1 AA.
*/

:focus-visible {
  outline: 2px solid var(--color-primary) !important;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Focus personalizado para botones del player */

.video-js .vjs-control:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 43, 118, 0.3);
  border-radius: 4px;
}

/* Focus en la barra de progreso */

.video-js .vjs-progress-holder:focus-visible {
  outline: 2px solid var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary);
}

/* Focus en el selector de calidad */

.video-js .vjs-quality-selector:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Focus en items del menú */

.video-js .vjs-menu-item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
  background-color: var(--color-primary);
}

/* Skip link para accesibilidad de teclado */

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  padding: 12px 24px;
  background: var(--color-primary);
  color: white;
  font-family: var(--font-family-system);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  z-index: 100000;
  border-radius: 0 0 8px 0;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid white;
  outline-offset: 2px;
}

/* ============================================
   VIDEO.JS BASE STYLES
   ============================================ */

.video-js .vjs-control:focus,
.video-js .vjs-control:active,
.video-js .vjs-button:focus,
.video-js .vjs-button:active {
  text-shadow: none !important;
}

/* iOS Safari Safe Area Support para controlbar */

.video-js {
  line-height: 0;
}

#my-video {
  width: 100%;
  height: 100%;
}

/* Ocultar controles nativos del navegador */

#my-video::-webkit-media-controls-panel {
  display: none !important;
  -webkit-appearance: none;
}

#my-video::-webkit-media-controls-play-button {
  display: none !important;
  -webkit-appearance: none;
}

#my-video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

/* ============================================
   2. BASE - Control Bar
   ============================================ */

/**
 * @file control-bar.css
 * @description Estilos base de la barra de control de VideoJS
 * 
 * Este archivo contiene:
 * - Estructura y layout de la control bar
 * - Posicionamiento (bottom: 15px + safe-area)
 * - Transiciones de visibilidad
 * - Estilos de botones y controles
 * - Responsive design
 * 
 * IMPORTANTE: Este archivo define la posición correcta de la barra de control.
 * NO sobrescribir 'bottom' en otros archivos CSS de modos.
 * 
 * @version 6.1.0
 * @since 2026-02-02
 */

/* ============================================
   SOMBRAS SUPERIORES E INFERIORES DEL PLAYER
   ============================================ */

.video-js::before {
  content: "";
  position: absolute;
  top: 0%;
  width: 100%;
  height: 80px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(255, 255, 255, 0) 100%
  ) !important;
  opacity: 0 !important;
  transition: opacity var(--transition-slow);
}

.video-js.vjs-user-active:before {
  opacity: 1 !important;
}

.video-js::after {
  content: "";
  position: absolute;
  bottom: 0%;
  width: 100%;
  height: 80px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.81) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0 !important;
  transition: opacity var(--transition-slow);
}

.video-js.vjs-user-active:after {
  opacity: 1 !important;
}

/* Ocultar sombras cuando está inactivo (reproduciendo) */

.video-js.vjs-user-inactive:not(.vjs-paused):not(.vjs-ended)::after {
  opacity: 0 !important;
}

.video-js.vjs-user-inactive:not(.vjs-paused):not(.vjs-ended)::before {
  opacity: 0 !important;
}

/* Sombras siempre visibles cuando el video está pausado */

.video-js.vjs-paused::before {
  opacity: 1 !important;
}

.video-js.vjs-paused::after {
  opacity: 1 !important;
}

/* Sombras siempre visibles cuando el video ha terminado */

.video-js.vjs-ended::before {
  opacity: 1 !important;
}

.video-js.vjs-ended::after {
  opacity: 1 !important;
}

/* ============================================
   CONTROL BAR - Estructura Principal
   ============================================ */

.video-js .vjs-control-bar {
  opacity: 1;
  transition: opacity var(--transition-slow);
  position: absolute;
  width: 100%;
  background-color: var(--color-black-transparent-70);
  pointer-events: auto;
  /* CRÍTICO: Posición de la barra con safe-area para iOS */
  bottom: calc(15px + var(--safe-area-inset-bottom));
}

.vjs-control-bar {
  width: 100% !important;
  padding: 0 var(--control-bar-padding) !important;
  background: transparent !important;
  z-index: 5;
  display: flex !important;
  gap: var(--control-gap) !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

/* Ocultar controles solo cuando está reproduciendo Y el usuario está inactivo */

.video-js.vjs-playing.vjs-user-inactive .vjs-control-bar {
  opacity: 0;
}

.video-js.vjs-user-active .vjs-control-bar {
  opacity: 1;
}

/* Control bar siempre visible cuando el video está pausado */

.video-js.vjs-paused .vjs-control-bar {
  opacity: 1 !important;
}

/* Control bar visible durante los primeros segundos o cuando NO ha empezado */

.video-js:not(.vjs-has-started) .vjs-control-bar {
  opacity: 1 !important;
}

/* ============================================
   CONTROLES INDIVIDUALES
   ============================================ */

.video-js .vjs-control {
  width: var(--control-width);
  height: var(--control-height) !important;
}

/* Transiciones para botones */

.vjs-control-bar button.vjs-button:not(.vjs-chromecast-button) {
  transition: var(--transition-normal);
}

.vjs-control-bar button.vjs-button:hover,
.vjs-menu-button.vjs-menu-button-popup.vjs-control.vjs-button.vjs-quality-selector:hover,
.vjs-menu-button.vjs-menu-button-popup.vjs-control.vjs-button.vjs-quality-selector.hd-selected:hover,
button.vjs-cast:hover,
.vjs-control-bar button.vjs-button:not(.vjs-custom-logo):hover {
  transform: scale(1.3);
}

/* ============================================
   ICONOS USANDO FUENTE
   Carga instantánea sin layout shift
   ============================================ */

.vjs-control-bar span.vjs-icon-placeholder::before {
  font-family: 'player-icons' !important;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  color: #fff !important;
  font-size: var(--control-icon-size) !important;
  text-shadow: none !important;
}

/* ============================================
   PLAY/PAUSE - Animación estilo YouTube
   ============================================ */

@keyframes playPauseTransform {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.vjs-play-control span.vjs-icon-placeholder::before {
  content: "\e910";
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-js.vjs-playing .vjs-play-control span.vjs-icon-placeholder::before {
  content: "\e912";
}

.video-js.vjs-paused .vjs-play-control span.vjs-icon-placeholder::before {
  content: "\e910";
}

.vjs-play-control.play-pause-animating span.vjs-icon-placeholder::before {
  animation: playPauseTransform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-js.vjs-ended .vjs-play-control span.vjs-icon-placeholder::before {
  content: "\e901" !important;
}

/* ============================================
   VOLUMEN
   ============================================ */

.video-js .vjs-mute-control .vjs-icon-placeholder::before { content: "\e902"; }

.video-js .vjs-mute-control.vjs-vol-3 .vjs-icon-placeholder::before { content: "\e902"; }

.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder::before { content: "\e903"; }

.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder::before { content: "\e904"; }

.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder::before { content: "\e905"; }

.vjs-volume-control {
  width: auto !important;
}

.vjs-volume-control .vjs-volume-bar {
  background-color: rgba(78, 78, 78, 0.9);
  width: 50px;
  height: var(--volume-bar-height);
  transition: var(--transition-normal);
}

.vjs-volume-control .vjs-volume-bar .vjs-volume-level {
  background-color: var(--color-primary) !important;
  height: 100%;
  border-radius: 5px;
  transition: width 180ms ease-in-out;
  will-change: width;
}

.vjs-volume-control .vjs-volume-bar .vjs-volume-level::before {
  content: "";
}

/* Cuando el player está muteado, la barra debe mostrarse vacía */

.video-js.vjs-muted .vjs-volume-control .vjs-volume-level {
  width: 0 !important;
}

.video-js.vjs-vol-0 .vjs-volume-control .vjs-volume-level { width: 0 !important; }

.video-js .vjs-volume-panel.vjs-vol-0 .vjs-volume-level { width: 0 !important; }

.video-js .vjs-mute-control.vjs-vol-0 ~ .vjs-volume-control .vjs-volume-level { width: 0 !important; }

/* Panel horizontal de volumen */

.vjs-volume-panel-horizontal {
  display: flex !important;
  align-items: center !important;
  gap: 5px;
}

.vjs-volume-panel-horizontal .vjs-volume-bar {
  align-self: center;
  margin: 0 0 0 5px;
}

/* ============================================
   FULLSCREEN
   ============================================ */

.video-js:not(.vjs-fullscreen) .vjs-fullscreen-control .vjs-icon-placeholder::before {
  content: "\e915";
}

.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder::before {
  content: "\e913";
}

.video-js.vjs-fullscreen .vjs-control-bar {
  transition: opacity 0.3s ease-out;
}

.video-js.vjs-fullscreen:hover .vjs-control-bar {
  opacity: 1 !important;
  transition: opacity 0.1s ease-in;
}

.video-js.vjs-fullscreen.vjs-user-inactive.vjs-playing .vjs-control-bar {
  opacity: 0 !important;
  transition: opacity 0.3s ease-out;
}

.vjs-has-started.vjs-user-inactive.vjs-playing.vjs-fullscreen .vjs-fullscreen-control {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ============================================
   PICTURE-IN-PICTURE
   ============================================ */

.vjs-control-bar button[title="Picture-in-Picture"] span.vjs-icon-placeholder::before {
  content: "\e911";
}

.vjs-control-bar button[title="Exit Picture-in-Picture"] span.vjs-icon-placeholder::before {
  content: "\e916";
}

/* ============================================
   BARRA DE PROGRESO
   ============================================ */

.video-js .vjs-progress-control {
  margin-left: 30px;
  margin-right: 30px;
  padding-top: 3px;
}

.video-js .vjs-slider {
  background-color: var(--color-grey-light) !important;
  border-radius: var(--border-radius-normal) !important;
  height: 5px;
}

.video-js .vjs-slider:focus {
  text-shadow: 0em 0em 1em #ffffff00 !important;
  box-shadow: 0 0 1em #fff0 !important;
}

.video-js .vjs-play-progress {
  background-color: var(--color-primary) !important;
}

.video-js .vjs-play-progress:before {
  font-size: 1.2em !important;
}

.video-js .vjs-load-progress {
  background: var(--color-primary) !important;
}

.video-js .vjs-progress-holder .vjs-play-progress,
.video-js .vjs-progress-holder .vjs-load-progress,
.video-js .vjs-progress-holder .vjs-load-progress div {
  border-radius: var(--border-radius-normal);
}

/* ============================================
   TIEMPO
   ============================================ */

.video-js .vjs-time-control {
  flex: none;
  font-size: 15px;
  min-width: 0px;
  width: auto;
  padding-right: 0px;
  font-family: var(--font-family-system);
  place-content: center;
  line-height: 2.2em;
}

.vjs-time-control.vjs-time-divider,
.vjs-current-time.vjs-time-control.vjs-control,
.vjs-duration.vjs-time-control.vjs-control {
  padding-left: 0px;
}

.vjs-current-time.vjs-time-control.vjs-control {
  margin-left: 20px;
  margin-right: 5px;
}

.vjs-duration.vjs-time-control.vjs-control {
  margin-right: 0px;
  margin-left: 5px;
}

/* ============================================
   BIG PLAY BUTTON
   ============================================ */

.video-js .vjs-big-play-button {
  font-size: 15em;
  border: unset;
  background-color: unset;
}

/* Ocultar big-play-button inicialmente cuando autoplay está habilitado */

video[autoplay] + .video-js .vjs-big-play-button,
.video-js[autoplay] .vjs-big-play-button,
video.video-js[autoplay] .vjs-big-play-button,
#my-video[autoplay] .vjs-big-play-button,
#ll-video[autoplay] .vjs-big-play-button {
  display: none !important;
}

/* Mostrar big-play-button SOLO al inicio (antes de empezar) */

.video-js.vjs-paused:not(.vjs-has-started):not([autoplay]) .vjs-big-play-button {
  display: block !important;
}

/* Ocultar big-play-button cuando ya ha empezado (incluso si está pausado) */

.video-js.vjs-has-started .vjs-big-play-button {
  display: none !important;
}

.video-js:hover .vjs-big-play-button,
.video-js .vjs-big-play-button:focus {
  border-color: #fff;
  background-color: unset;
  transition: all 0s;
}

.video-js.vjs-playing .vjs-tech {
  pointer-events: none;
}

/* ============================================
   MENÚ POPUP (Calidad, etc.)
   ============================================ */

.vjs-menu-button-popup .vjs-menu .vjs-menu-content {
  background-color: #2b333f;
  background-color: var(--color-black-transparent-70);
  position: absolute;
  width: 100%;
  bottom: 1.5em;
  max-height: 15em;
  border-radius: var(--border-radius-normal);
  margin-bottom: 5px;
}

.vjs-menu li.vjs-menu-item:focus,
.vjs-menu li.vjs-menu-item:hover,
.js-focus-visible .vjs-menu li.vjs-menu-item:hover {
  background-color: #73859f;
  background-color: var(--color-grey-dark);
}

.vjs-menu li.vjs-selected,
.vjs-menu li.vjs-selected:focus,
.vjs-menu li.vjs-selected:hover,
.js-focus-visible .vjs-menu li.vjs-selected:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* ============================================
   ERRORES
   ============================================ */

.vjs-error-display p.vjs-control-text {
  display: none;
}

.vjs-error .vjs-error-display:before {
  content: "";
}

.vjs-error-display .vjs-modal-dialog-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

.vjs-error-display .vjs-modal-dialog-content div {
  display: flex;
  flex-direction: column;
  align-items: start;
}

.vjs-error-display .vjs-modal-dialog-content p {
  padding: 0 5px;
  background: #fe004f;
  margin: 2px 0;
  font-size: 2rem;
  font-weight: 900;
  text-align: left;
}

.vjs-error .vjs-error-display {
  background-color: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

/* Ocultar botón de reload central (al final del video) */

.video-js .vjs-reload-button {
  display: none !important;
}

.video-js.vjs-ended .vjs-reload-button {
  display: none !important;
}

/* ============================================
   3. BASE - Responsive Design
   ============================================ */

/**
 * @file responsive.css
 * @description Estilos responsive de la barra de control
 * 
 * Este archivo contiene todos los breakpoints para adaptar
 * la barra de control a diferentes tamaños de pantalla.
 * 
 * Breakpoints:
 * - 765px: Tablet
 * - 670px: Móviles grandes
 * - 520px: Móviles medianos
 * - 420px: Móviles pequeños
 * - 375px: Móviles extra pequeños
 * - 340px: Pantallas muy pequeñas
 * - 315px: Pantallas ultra pequeñas
 * - 285px: Pantallas micro
 * - 247px: Pantallas nano
 * 
 * @version 6.1.0
 * @since 2026-02-02
 */

/* ============================================
   TABLET Y PANTALLAS MEDIANAS (768px - 670px)
   ============================================ */

@media screen and (max-width: 765px) {
  :root {
    --control-icon-size: 2.6em;
    --control-gap: 3px;
    --control-height: 28px;
    --control-width: 3.5em;
  }
  
  .vjs-progress-holder {
    margin-left: 0;
    margin-right: 0;
  }
  
  .vjs-current-time.vjs-time-control.vjs-control {
    margin-left: 6px;
    margin-right: 3px;
  }
  
  .vjs-duration.vjs-time-control.vjs-control {
    margin-right: 6px;
    margin-left: 3px;
  }
  
  .video-js .vjs-control-bar {
    bottom: calc(15px + var(--safe-area-inset-bottom));
  }
}

/* ============================================
   MÓVILES GRANDES (670px - 520px)
   ============================================ */

@media screen and (max-width: 670px) {
  :root {
    --control-icon-size: 2.4em;
    --control-gap: 3px;
    --control-height: 27px;
    --control-width: 3.3em;
  }
  
  .vjs-control-bar button.vjs-button:not(.vjs-chromecast-button) {
    transition: var(--transition-normal);
  }
  
  .vjs-volume-control .vjs-volume-bar {
    display: none;
  }
  
  .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,
  .video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active,
  .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active {
    display: contents;
    width: auto;
    transition: none;
  }
  
  .vjs-volume-panel .vjs-control .vjs-volume-panel-horizontal .vjs-hover {
    display: none;
  }
  
  .vjs-control-bar {
    width: 100% !important;
    padding: 0 20px !important;
  }
  
  .video-js .vjs-progress-control {
    width: 100%;
  }
  
  .vjs-current-time.vjs-time-control.vjs-control {
    margin-left: 6px;
    margin-right: 3px;
  }
  
  .vjs-duration.vjs-time-control.vjs-control {
    margin-right: 6px;
    margin-left: 3px;
  }
  
  .video-js .vjs-control-bar {
    bottom: calc(15px + var(--safe-area-inset-bottom));
  }
}

/* ============================================
   MÓVILES MEDIANOS (520px - 420px)
   ============================================ */

@media screen and (max-width: 520px) {
  :root {
    --control-icon-size: 2em;
    --control-gap: 3px;
    --control-bar-padding: 10px;
    --control-height: 26px;
    --control-width: clamp(2.5em, 5vw, 3.2em);
  }
  
  .video-js .vjs-control {
    min-width: 26px;
    width: 3.2em;
    height: 25px !important;
  }
  
  .vjs-control-bar {
    padding: 0 var(--control-bar-padding) !important;
  }
  
  .video-js .vjs-control-bar {
    bottom: calc(5px + var(--safe-area-inset-bottom));
  }
  
  .video-js .vjs-time-control {
    line-height: 2em;
    font-size: clamp(11px, 2.5vw, 14px);
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
  }
  
  .vjs-current-time.vjs-time-control.vjs-control {
    width: auto !important;
    margin-left: 5px;
    margin-right: 3px;
  }
  
  .vjs-duration.vjs-time-control.vjs-control {
    width: auto !important;
    margin-right: 5px;
    margin-left: 3px;
  }
  
  .vjs-time-control.vjs-time-divider {
    width: auto !important;
    padding: 0 2px;
  }
}

/* ============================================
   MÓVILES PEQUEÑOS (420px - 375px)
   ============================================ */

@media screen and (max-width: 420px) {
  :root {
    --control-icon-size: 1.8em;
    --control-gap: 2px;
    --control-bar-padding: 8px;
    --control-height: 24px;
    --control-width: clamp(2.2em, 4.5vw, 2.7em);
  }
  
  .video-js .vjs-control {
    min-width: 24px;
    width: 2.7em;
    height: 23px !important;
  }
  
  .vjs-control-bar {
    padding: 0 var(--control-bar-padding) !important;
  }
  
  .video-js .vjs-control-bar {
    bottom: calc(5px + var(--safe-area-inset-bottom));
  }
  
  .video-js .vjs-time-control {
    line-height: 1.9em;
    font-size: clamp(10px, 2.3vw, 13px);
  }
  
  .vjs-current-time.vjs-time-control.vjs-control,
  .vjs-duration.vjs-time-control.vjs-control {
    margin-left: 2px;
    margin-right: 2px;
  }
}

/* ============================================
   MÓVILES EXTRA PEQUEÑOS (375px - 340px)
   ============================================ */

@media screen and (max-width: 375px) {
  :root {
    --control-icon-size: 1.6em;
    --control-gap: 2px;
    --control-bar-padding: 6px;
    --control-height: 22px;
    --control-width: clamp(2em, 4vw, 2.5em);
  }
  
  .video-js .vjs-control {
    min-width: 22px;
  }
  
  .video-js .vjs-control-bar {
    bottom: calc(5px + var(--safe-area-inset-bottom));
  }
  
  .video-js .vjs-time-control {
    font-size: clamp(9px, 2vw, 12px);
    line-height: 1.8em;
  }
}

/* ============================================
   PANTALLAS MUY PEQUEÑAS (340px - 315px)
   ============================================ */

@media screen and (max-width: 340px) {
  :root {
    --control-icon-size: 1.5em;
    --control-gap: 2px;
    --control-bar-padding: 5px;
    --control-height: 20px;
    --control-width: clamp(1.8em, 3.8vw, 2.3em);
  }
  
  .video-js .vjs-control {
    min-width: 20px;
    width: 3em;
    height: 24px !important;
  }
  
  .video-js .vjs-control-bar {
    bottom: calc(5px + var(--safe-area-inset-bottom));
  }
  
  .vjs-control-bar {
    padding: 0 2px !important;
  }
  
  .video-js .vjs-duration {
    margin-right: 0px;
    margin-left: 0px;
  }
  
  .vjs-menu-button-popup .vjs-menu .vjs-menu-content {
    width: 18vw;
    bottom: 2em;
    max-height: 10em;
    font-size: 2.2vw;
    margin-left: 15px;
  }
  
  .vjs-vod .vjs-current-time,
  .vjs-vod .vjs-duration,
  .vjs-vod .vjs-time-divider {
    display: none !important;
  }
  
  .video-js .vjs-time-control {
    font-size: clamp(8px, 1.8vw, 11px);
  }
}

/* ============================================
   PANTALLAS ULTRA PEQUEÑAS (315px - 285px)
   ============================================ */

@media screen and (max-width: 315px) {
  :root {
    --control-icon-size: 1.4em;
    --control-gap: 1px;
    --control-bar-padding: 4px;
    --control-height: 18px;
    --control-width: clamp(1.6em, 3.5vw, 2em);
  }
  
  .video-js .vjs-control {
    min-width: 18px;
    width: 2.2em;
    height: 20px !important;
  }
  
  .vjs-control-bar {
    padding: 0 var(--control-bar-padding) !important;
  }
  
  .video-js .vjs-control-bar {
    bottom: calc(5px + var(--safe-area-inset-bottom));
  }
  
  .video-js .vjs-time-control {
    line-height: 1.7em;
    font-size: clamp(8px, 1.6vw, 10px);
  }
  
  .vjs-current-time.vjs-time-control.vjs-control {
    margin-left: 2px;
    margin-right: 1px;
  }
  
  .vjs-duration.vjs-time-control.vjs-control {
    margin-right: 2px;
    margin-left: 1px;
  }
}

/* ============================================
   PANTALLAS MICRO (285px - 247px)
   ============================================ */

@media screen and (max-width: 285px) {
  :root {
    --control-icon-size: 1.2em;
    --control-gap: 1px;
    --control-bar-padding: 3px;
    --control-height: 16px;
    --control-width: clamp(1.5em, 3.2vw, 1.8em);
  }
  
  .video-js .vjs-control {
    min-width: 16px;
    width: 2em;
    height: 15px !important;
  }
  
  .video-js .vjs-duration {
    margin-right: 10px;
    margin-left: 0px;
  }
  
  .vjs-menu-button-popup .vjs-menu .vjs-menu-content {
    width: 20vw;
    bottom: 2em;
    max-height: 9em;
    font-size: 2.5vw;
    margin-left: 18px;
    margin-bottom: -5px;
  }
  
  .video-js .vjs-control-bar {
    bottom: calc(0px + var(--safe-area-inset-bottom));
  }
  
  .video-js .vjs-time-control {
    font-size: clamp(7px, 1.5vw, 9px);
  }
}

/* ============================================
   PANTALLAS NANO (247px y menores)
   ============================================ */

@media screen and (max-width: 247px) {
  :root {
    --control-icon-size: 1.1em;
    --control-gap: 1px;
    --control-bar-padding: 2px;
    --control-height: 15px;
    --control-width: clamp(1.4em, 3vw, 1.7em);
  }
  
  .video-js .vjs-control {
    min-width: 15px;
    width: 2em;
    height: 18px !important;
  }
  
  .vjs-control-bar {
    padding: 0 var(--control-bar-padding) !important;
  }
  
  .video-js .vjs-control-bar {
    bottom: calc(0px + var(--safe-area-inset-bottom));
  }
  
  .video-js .vjs-time-control {
    line-height: 1.6em;
    font-size: clamp(7px, 1.4vw, 9px);
  }
  
  .vjs-current-time.vjs-time-control.vjs-control {
    margin-left: 2px;
    margin-right: 1px;
  }
  
  .vjs-duration.vjs-time-control.vjs-control {
    margin-right: 2px;
    margin-left: 1px;
  }
}

/* ============================================
   4. COMPONENTES
   ============================================ */

/**
 * @file spinner.css
 * @description Estilos del spinner de carga unificado
 * 
 * Este archivo contiene:
 * - Spinner unificado (.unified-spinner)
 * - Spinner de VideoJS (.vjs-loading-spinner)
 * - Animaciones de rotación
 * 
 * @version 6.1.0
 * @since 2026-02-02
 */

/* ============================================
   SPINNER UNIFICADO
   Diseño centralizado para toda la aplicación
   ============================================ */

.unified-spinner {
  width: 120px;
  height: 120px;
  position: relative;
  display: inline-block;
}

.unified-spinner::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: #676767;
  border-radius: 50%;
  animation: unified-spinner-spin 1s linear infinite;
  top: 0;
  left: 0;
  z-index: 2;
}

/* Animación del spinner unificado */

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

/* ============================================
   SPINNER DE VIDEO.JS
   SIN FONDO, COMPLETAMENTE TRANSPARENTE
   ============================================ */

.vjs-loading-spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  place-items: center;
  border: none;
  border-radius: 0%;
}

.vjs-loading-spinner::after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: #676767;
  border-radius: 50%;
  animation: unified-spinner-spin 1s linear infinite;
  top: 0;
  left: 0;
}

/* Estados de carga */

.vjs-seeking .vjs-loading-spinner,
.vjs-waiting .vjs-loading-spinner,
.vjs-loading .vjs-loading-spinner,
.video-js.vjs-show-spinner .vjs-loading-spinner {
  display: flex !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: -webkit-fill-available !important;
  height: 100dvh !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 9999 !important;
  transform: none !important;
  animation: vjs-spinner-show 0s linear 0s forwards;
}

/* SIN fondo animado - solo spinner circular */

.vjs-seeking .vjs-loading-spinner::before,
.vjs-waiting .vjs-loading-spinner::before,
.vjs-loading .vjs-loading-spinner::before,
.video-js.vjs-show-spinner .vjs-loading-spinner::before {
  display: none !important;
}

/* Spinner circular para Video.js - SIN fondo transparente */

.vjs-seeking .vjs-loading-spinner::after,
.vjs-waiting .vjs-loading-spinner::after,
.vjs-loading .vjs-loading-spinner::after,
.video-js.vjs-show-spinner .vjs-loading-spinner::after {
  content: "" !important;
  position: relative !important;
  width: 120px !important;
  height: 120px !important;
  border: 3px solid transparent !important;
  border-top-color: #676767 !important;
  border-radius: 50% !important;
  animation: unified-spinner-spin 1s linear infinite !important;
  display: block !important;
}

/* PRIORIDAD MÁXIMA: Cuando hay error, NUNCA mostrar spinner */

.vjs-error .vjs-loading-spinner,
.vjs-error.vjs-seeking .vjs-loading-spinner,
.vjs-error.vjs-waiting .vjs-loading-spinner {
  display: none !important;
  visibility: hidden !important;
}

/* FIX: Ocultar spinner durante la sesión de Chromecast */

.video-js.vjs-chromecast-active .vjs-loading-spinner,
.video-js.vjs-casting .vjs-loading-spinner {
  display: none !important;
}

.video-is-offline .vjs-loading-spinner.is-init-video {
  display: block !important;
  visibility: visible !important;
}

/* Animación para mostrar el spinner */

@keyframes vjs-spinner-show {
  to {
    visibility: visible;
  }
}

/**
 * @file quality-selector.css
 * @description Estilos del selector de calidad de video
 * 
 * Este archivo contiene:
 * - Botón de calidad (.vjs-quality-selector)
 * - Icono HD con capas (.icon-quality-hd)
 * - Dropdown de calidades
 * 
 * @version 6.1.0
 * @since 2026-02-02
 */

/* ============================================
   BOTÓN DE CALIDAD
   ============================================ */

.vjs-menu-button.vjs-menu-button-popup.vjs-control.vjs-button.vjs-quality-selector {
  cursor: pointer;
  transition: var(--transition-normal);
  z-index: 10;
  position: relative;
}

.vjs-menu-button.vjs-menu-button-popup.vjs-control.vjs-button.vjs-quality-selector::before {
  font-family: 'player-icons' !important;
  content: "\e90c"; /* quality icon */
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  color: #fff !important;
  font-size: var(--control-icon-size) !important;
  text-shadow: none !important;
}

/* ============================================
   ESTADO HD SELECCIONADO
   ============================================ */

.vjs-menu-button.vjs-menu-button-popup.vjs-control.vjs-button.vjs-quality-selector.hd-selected {
  transition: var(--transition-normal);
  z-index: 11;
}

.vjs-menu-button.vjs-menu-button-popup.vjs-control.vjs-button.vjs-quality-selector.hd-selected::before {
  content: "" !important; /* Oculta engranaje; el icono HD se dibuja por capas */
}

/* ============================================
   ICONO HD POR CAPAS
   (según documentación de la fuente icomoon)
   ============================================ */

.vjs-menu-button.vjs-menu-button-popup.vjs-control.vjs-button.vjs-quality-selector .icon-quality-hd {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100%;
  height: 100%;
  font-family: 'player-icons' !important;
  font-size: var(--control-icon-size) !important;
  pointer-events: none;
}

.vjs-menu-button.vjs-menu-button-popup.vjs-control.vjs-button.vjs-quality-selector.hd-selected .icon-quality-hd {
  display: flex;
}

.vjs-menu-button.vjs-menu-button-popup.vjs-control.vjs-button.vjs-quality-selector .icon-quality-hd .path1::before {
  content: "\e90d";
  color: #fff;
}

.vjs-menu-button.vjs-menu-button-popup.vjs-control.vjs-button.vjs-quality-selector .icon-quality-hd .path2::before {
  content: "\e90e";
  color: #c40000;
  margin-left: -1.1865234375em;
}

.vjs-menu-button.vjs-menu-button-popup.vjs-control.vjs-button.vjs-quality-selector .icon-quality-hd .path3::before {
  content: "\e90f";
  color: #fff;
  margin-left: -1.1865234375em;
}

/* ============================================
   DROPDOWN DE CALIDADES
   ============================================ */

.vjs-quality-dropdown {
  position: absolute;
  bottom: calc(var(--control-height) + var(--control-gap));
  right: 0;
  background: #0000009d;
  border-radius: 7px;
  overflow: hidden;
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--color-white-transparent-16);
  text-shadow: 0 1px 3px rgb(0 0 0 / 87%);
  box-shadow: var(--shadow-normal);
}

.vjs-quality-item {
  padding: 10px 10px;
  color: #fff;
  cursor: pointer;
  font-size: 10px;
  border-radius: 3px;
  font-family: var(--font-family-system);
}

.vjs-quality-item:hover {
  background-color: var(--color-white-transparent-10);
}

.vjs-quality-item.vjs-selected {
  background-color: var(--color-primary);
  border-radius: 3px;
}

/* ============================================
   PLACEHOLDER INTERNO (oculto)
   ============================================ */

.video-js .vjs-quality-selector {
  cursor: pointer;
}

.video-js .vjs-quality-selector .vjs-menu-button {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

.video-js .vjs-quality-selector .vjs-icon-placeholder {
  font-family: "VideoJS";
  font-weight: normal;
  font-style: normal;
}

.video-js .vjs-quality-selector .vjs-icon-placeholder:before {
  content: "" !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

.video-js .vjs-quality-selector.hd-selected .vjs-icon-placeholder:before {
  color: inherit;
}

/**
 * @file logo.css
 * @description Estilos del logo personalizado en la barra de control
 * 
 * Este archivo contiene:
 * - Botón de logo (.vjs-custom-logo)
 * - Estilos responsive
 * 
 * @version 6.1.0
 * @since 2026-02-02
 */

/* ============================================
   LOGO PERSONALIZADO
   Se ajusta dinámicamente vía JS
   La altura coincide con los demás controles
   ============================================ */

.vjs-custom-logo {
  height: var(--control-height) !important;
  min-width: 30px;
  margin-left: auto; /* Empuja el logo a la derecha sin Spacer */
  margin-right: 0;
  flex: 0 0 auto;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform .2s ease;
  aspect-ratio: 1/1;
}

.vjs-custom-logo:hover {
  transform: none !important;
}

/* Responsive para lowlatency */

@media screen and (max-width: 768px) {
  .video-js .vjs-custom-logo {
    height: 25px !important;
    min-width: 25px;
  }
}

@media screen and (max-width: 520px) {
  .video-js .vjs-custom-logo {
    height: 25px !important;
    min-width: 25px;
  }
}

@media screen and (max-width: 420px) {
  .video-js .vjs-custom-logo {
    height: 23px !important;
    min-width: 23px;
  }
}

@media screen and (max-width: 340px) {
  .video-js .vjs-custom-logo {
    height: 24px !important;
    min-width: 18px;
    width: auto;
    margin-right: 2px;
  }
}

@media screen and (max-width: 315px) {
  .video-js .vjs-custom-logo {
    height: 20px !important;
    min-width: 15px;
    width: auto;
    margin-right: 2px;
  }
}

@media screen and (max-width: 285px) {
  .video-js .vjs-custom-logo {
    height: 15px !important;
    min-width: 12px;
    width: auto;
    margin-right: 2px;
  }
}

@media screen and (max-width: 247px) {
  .video-js .vjs-custom-logo {
    height: 18px !important;
    min-width: 14px;
    width: auto;
    margin-right: 2px;
  }
}

/**
 * @file sound-button.css
 * @description Estilos del botón "Activar Sonido"
 * 
 * Este archivo contiene:
 * - Botón flotante para activar sonido (.btn-new.active-sound)
 * - Animaciones de aparición/desaparición
 * - Estilos responsive
 * 
 * @version 6.1.0
 * @since 2026-02-02
 */

/* ============================================
   BOTÓN ACTIVAR SONIDO
   ============================================ */

button.btn-new.active-sound {
  position: absolute;
  background: #0000004d;
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-white-transparent-16);
  display: flex;
  align-items: center;
  top: 0;
  left: 0;
  padding: 1px 14px 1px 14px;
  border-radius: 50px;
  font-weight: 600;
  color: var(--color-white);
  margin: 20px 40px 0 30px;
  z-index: 10;
  cursor: pointer;
  line-height: 35px;
  box-shadow: var(--shadow-large);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  font-family: var(--font-family-system);
  
  /* Estados de transición - oculto por defecto */
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.25s;
  will-change: opacity, transform;
}

button.btn-new.active-sound.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  animation: var(--animation-pulse2);
  box-shadow: 0 10px 40px 0 rgba(31, 38, 135, 0.25);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s;
}

.text-sound-buttom {
  margin-left: 8px;
  font-size: 14px;
}

.fa-volume-up {
  font-size: 16px;
}

.btn-new {
  position: absolute;
  top: 10px;
  left: 10px;
  display: none;
}

.emoji-icon {
  font-size: 24px;
  vertical-align: middle;
}

/* ============================================
   RESPONSIVE - Botón Activar Sonido
   ============================================ */

@media screen and (max-width: 500px) {
  .btn-new.active-sound {
    margin: 15px 20px;
    padding: 0px 12px;
  }

  .btn-new.active-sound .text-sound-buttom {
    font-size: 11px;
  }

  .btn-new.active-sound .fa-volume-up {
    font-size: 15px;
  }
}

@media screen and (max-width: 340px) {
  .btn-new.active-sound {
    margin: 12px 15px;
    padding: 1px 8px;
  }

  .btn-new.active-sound .text-sound-buttom {
    font-size: 10px;
  }

  .btn-new.active-sound .fa-volume-up {
    font-size: 14px;
  }
}

@media screen and (max-width: 230px) {
  .btn-new.active-sound {
    padding: 1px 5px 1px 5px;
    display: flex;
    align-items: center;
    white-space: nowrap;
  }
  
  .btn-new.active-sound .text-sound-buttom {
    margin-left: 4px;
    font-size: 10px;
  }
  
  .btn-new.active-sound .fa-volume-up {
    font-size: 13px;
  }
}

@media screen and (max-width: 200px) {
  .btn-new.active-sound {
    margin: 8px 10px;
    padding: 1px 4px;
  }

  .btn-new.active-sound .text-sound-buttom {
    font-size: 9px;
    margin-left: 3px;
  }

  .btn-new.active-sound .fa-volume-up {
    font-size: 12px;
  }
}

/**
 * @file live-display.css
 * @description Estilos del indicador "EN VIVO"
 * 
 * Este archivo contiene:
 * - Badge de live (.vjs-live-display)
 * - Animación pulse del punto rojo
 * - Estilos responsive
 * 
 * @version 6.1.0
 * @since 2026-02-02
 */

/* ============================================
   INDICADOR EN VIVO
   ============================================ */

.vjs-live-display {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-dark-135);
  padding: 3px 14px 3px 14px;
  margin: 22px 35px;
  border-radius: var(--border-radius-large);
  font-family: var(--font-family-system);
  color: var(--color-white);
  border: 1px solid var(--color-white-transparent-10);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  box-shadow: var(--shadow-normal);
  backdrop-filter: blur(2px);
  
  /* Transición con fade puro y delay cuando aparece */
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.15s,
              visibility 0s 0.15s;
  will-change: opacity;
}

.vjs-live-display.hide {
  opacity: 0;
  visibility: hidden;
  /* Cuando desaparece, sin delay */
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s 0.25s;
}

/* Punto rojo pulsante */

.vjs-live-display::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #ff0000;
  border-radius: 50%;
  display: inline-block;
  animation: var(--animation-pulse);
}

/* ============================================
   ANIMACIONES PULSE
   ============================================ */

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 #ff0000;
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(255, 43, 118, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 43, 118, 0);
  }
}

@keyframes pulse2 {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 #4a4a4a;
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(255, 43, 118, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 43, 118, 0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media screen and (max-width: 500px) {
  .vjs-live-display {
    margin: 15px 20px;
    padding: 0px 12px 0px 12px;
    font-size: 11px;
    gap: 6px;
  }
}

@media screen and (max-width: 340px) {
  .vjs-live-display {
    margin: 12px 15px;
    padding: 1px 8px 1px 8px;
    font-size: 10px;
    gap: 5px;
  }
}

@media screen and (max-width: 230px) {
  .vjs-live-display {
    margin: 10px 12px;
    padding: 1px 6px 1px 6px;
    font-size: 9px;
    gap: 4px;
  }
  .vjs-live-display::before {
    width: 4px;
    height: 4px;
  }
}

/* ============================================
   5. MODOS DE REPRODUCCIÓN
   ============================================ */

/**
 * @file live.css
 * @description Estilos ESPECÍFICOS para streaming en vivo
 * 
 * Este archivo contiene SOLO estilos que son específicos de live streaming
 * y que NO aplican a otros modos (VOD, WebRTC, etc.)
 * 
 * Incluye:
 * - Ocultar controles de duración y progreso
 * - Estilos para DVR
 * - Toggle "En Vivo"
 * 
 * @version 6.1.0
 * @since 2026-02-02
 */

/* ============================================
   OCULTAR CONTROLES DE DURACIÓN EN LIVE
   ============================================ */

.video-js.vjs-live .vjs-current-time,
.video-js.vjs-live .vjs-time-divider, 
.video-js.vjs-live .vjs-duration,
.video-js.vjs-live .vjs-progress-control,
/* Estado previo a la detección, forzado desde markup para evitar parpadeo */
.video-js.vjs-live-expected .vjs-current-time,
.video-js.vjs-live-expected .vjs-time-divider,
.video-js.vjs-live-expected .vjs-duration,
.video-js.vjs-live-expected .vjs-progress-control {
  display: none !important;
}

.vjs-live .vjs-time-control {
  display: none;
}

/* ============================================
   DVR - Mostrar barra de progreso cuando está habilitado
   ============================================ */

.video-js.vjs-dvr-enabled .vjs-progress-control {
  display: flex !important;
}

.video-js.vjs-dvr-enabled .vjs-current-time,
.video-js.vjs-dvr-enabled .vjs-duration,
.video-js.vjs-dvr-enabled .vjs-time-divider {
  display: none !important;
}

/* ============================================
   BOTÓN TOGGLE EN VIVO
   ============================================ */

.video-js .vjs-live-toggle {
  color: var(--color-white);
  font-family: var(--font-family-system);
  font-size: 14px;
  align-items: center;
  display: flex;
  cursor: pointer;
}

.video-js .vjs-live-toggle[disabled] {
  opacity: 0.7;
  cursor: default;
}

/* ============================================
   COLOR PRIMARIO UNIFICADO
   ============================================ */

.video-js .vjs-progress-control .vjs-progress-holder .vjs-play-progress,
.video-js .vjs-volume-level,
.video-js .vjs-progress-control .vjs-progress-holder .vjs-load-progress {
  background-color: var(--color-primary);
}

/* Live streaming (por defecto) */

/**
 * @file vod.css
 * @description Estilos ESPECÍFICOS para modo VOD (Video On Demand)
 * 
 * Este archivo contiene:
 * - Controles de tiempo y progreso para VOD
 * - Animaciones de play/pause (ripple effect)
 * - Indicadores de seek (avance/retroceso con teclado)
 * - Indicador de volumen
 * - Controles de click/teclado
 * 
 * @version 6.1.0
 * @since 2026-02-02
 */

/* ============================================
   VOD - Mostrar controles de tiempo
   ============================================ */

.vjs-vod .vjs-current-time,
.vjs-vod .vjs-duration,
.vjs-vod .vjs-time-divider {
  display: block !important;
}

/* ============================================
   VOD - Habilitar pointer-events para clicks
   ============================================ */

.video-js.vjs-vod {
  pointer-events: auto !important;
  cursor: pointer;
}

.video-js.vjs-vod.vjs-playing .vjs-tech {
  pointer-events: auto !important;
  cursor: pointer;
}

.video-js.vjs-vod .vjs-tech {
  pointer-events: auto !important;
  cursor: pointer;
}

.video-js.vjs-vod video {
  pointer-events: auto !important;
  cursor: pointer;
}

/* ============================================
   VOD - Estilos de barra de progreso
   ============================================ */

.video-js .vjs-remaining-time {
  flex-grow: 1;
  padding: 0;
  visibility: hidden;
  min-width: 0;
  font-size: 1px;
}

.video-js .vjs-progress-control {
  position: absolute;
  top: auto;
  left: 0;
  margin: 0;
  width: 100%;
  height: 1.333em;
  transform: translate(0, -100%);
  margin-top: -10px;
  z-index: 5;
}

.video-js .vjs-progress-control .vjs-progress-holder {
  margin: 0 40px;
}

.video-js .vjs-current-time {
  display: block;
  padding-right: 0;
  padding-left: 0.382em;
  color: #eee;
}

.video-js .vjs-time-divider {
  display: block;
  padding-right: 0.238em;
  padding-left: 0.238em;
  min-width: 0;
  color: #ddd;
}

.video-js .vjs-duration {
  display: block;
  padding-left: 0;
  color: #ddd;
}

.vjs-live .vjs-time-control {
  display: none;
}

.video-js .vjs-remaining-time-display {
  display: none;
}

/* ============================================
   Indicador de Volumen (estilo YouTube)
   ============================================ */

.vod-volume-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 12px 20px;
  border-radius: 8px;
  z-index: 1000;
  pointer-events: none;
  animation: vod-volume-fadein 0.15s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@keyframes vod-volume-fadein {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes vod-volume-fadeout {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.vod-volume-indicator.vod-volume-closing {
  animation: vod-volume-fadeout 0.2s ease-in forwards;
}

.vod-volume-icon {
  font-family: 'player-icons' !important;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 24px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  position: relative;
}

.vod-volume-icon::before {
  font-family: 'player-icons' !important;
  display: block;
}

/* Iconos de volumen usando las mismas clases que la control bar */

.vod-volume-icon.vod-vol-3::before { content: "\e902"; }

/* vol-3 (alto) */

.vod-volume-icon.vod-vol-2::before { content: "\e903"; }

/* vol-2 (medio) */

.vod-volume-icon.vod-vol-1::before { content: "\e904"; }

/* vol-1 (bajo) */

.vod-volume-icon.vod-vol-0::before { content: "\e905"; }

/* vol-0 (muteado) */

.vod-volume-icon svg {
  display: none; /* Ya no usamos SVG */
}

.vod-volume-muted {
  color: #ff4444;
}

.vod-volume-bar-container {
  display: flex;
  align-items: center;
  min-width: 100px;
}

.vod-volume-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.vod-volume-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary, #ff0000) 0%, var(--color-primary, #ff0000) 100%);
  border-radius: 3px;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

.vod-volume-text {
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 16px;
  font-weight: bold;
  min-width: 42px;
  text-align: right;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
}

/* Responsive para pantallas pequeñas */

@media (max-width: 768px) {
  .vod-volume-indicator {
    padding: 10px 16px;
    gap: 10px;
  }
  
  .vod-volume-bar-container {
    min-width: 80px;
  }
  
  .vod-volume-icon svg {
    width: 20px;
    height: 20px;
  }
  
  .vod-volume-text {
    font-size: 14px;
    min-width: 36px;
  }
}

/* ============================================
   Superficie de clic para VOD
   Cubre el área del video pero NO los controles
   ============================================ */

.video-js.vjs-vod .vod-click-surface {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% - 60px);
  pointer-events: auto !important;
  z-index: 4;
  background: transparent;
}

@media screen and (max-width: 520px) {
  .video-js.vjs-vod .vod-click-surface {
    height: calc(100% - 50px);
  }
}

/* ============================================
   Animación de Play/Pause con Touch Ripple
   Estilo YouTube
   ============================================ */

.vod-play-pause-animation {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  pointer-events: none;
}

/* Un solo círculo que se agranda y desvanece */

.vod-ripple-circle {
  position: relative;
  width: 120px;
  height: 120px;
  background-color: rgba(0, 0, 0, 0.65);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: vod-ripple-grow-fade 0.7s ease-out forwards;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Ícono de Play */

.vod-icon-play {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 20px 0 20px 34px;
  border-color: transparent transparent transparent #ffffff;
  margin-left: 5px;
}

/* Ícono de Pause */

.vod-icon-pause {
  width: 28px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vod-icon-pause::before,
.vod-icon-pause::after {
  content: '';
  width: 9px;
  height: 40px;
  background-color: #ffffff;
  border-radius: 2px;
}

/* Efecto: un solo círculo crece y desvanece */

@keyframes vod-ripple-grow-fade {
  0% {
    transform: scale(0.75);
    opacity: 1;
  }
  70% {
    transform: scale(1.15);
    opacity: 1;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* ============================================
   Indicador de avance/retroceso (flechas de teclado)
   ============================================ */

.vod-seek-indicator {
  position: absolute;
  top: 50%;
  z-index: 100;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Posiciones laterales */

.vod-seek-indicator.vod-right {
  right: 20px;
  transform: translateY(-50%);
  animation: vod-seek-fade-right 0.6s ease-out forwards;
}

.vod-seek-indicator.vod-left {
  left: 20px;
  transform: translateY(-50%);
  animation: vod-seek-fade-left 0.6s ease-out forwards;
}

.vod-seek-text {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  font-family: var(--font-family-system);
}

/* Iconos de play usando fuente oficial */

.vod-seek-icons {
  display: flex;
  align-items: center;
  gap: 0;
}

/* Superponer el segundo icono ligeramente para que queden pegados */

.vod-seek-icon + .vod-seek-icon {
  margin-left: -6px;
}

.vod-seek-icon {
  font-family: 'player-icons' !important;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #ffffff;
  font-size: 24px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  display: inline-block;
}

.vod-seek-icon::before {
  content: "\e910"; /* play icon */
}

.vod-left .vod-seek-icon {
  transform: scaleX(-1);
}

/* Animación para indicador izquierdo (retroceso) */

@keyframes vod-seek-fade-left {
  0% {
    opacity: 1;
    transform: translateY(-50%) scale(0.9);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) scale(1.1);
  }
}

/* Animación para indicador derecho (adelanto) */

@keyframes vod-seek-fade-right {
  0% {
    opacity: 1;
    transform: translateY(-50%) scale(0.9);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) scale(1.1);
  }
}

/* ============================================
   Responsive: ajustar tamaños en pantallas pequeñas
   ============================================ */

@media screen and (max-width: 520px) {
  .vod-ripple-circle {
    width: 90px;
    height: 90px;
  }
  .vod-icon-play {
    border-width: 14px 0 14px 24px;
    margin-left: 4px;
  }
  .vod-icon-pause {
    width: 22px;
    height: 30px;
  }
  .vod-icon-pause::before,
  .vod-icon-pause::after {
    width: 7px;
    height: 30px;
  }
  .vod-seek-text {
    font-size: 18px;
  }
  .vod-seek-icon {
    font-size: 20px;
  }
}

@media screen and (max-width: 340px) {
  .vod-ripple-circle {
    width: 75px;
    height: 75px;
  }
  .vod-icon-play {
    border-width: 11px 0 11px 18px;
    margin-left: 3px;
  }
  .vod-icon-pause {
    width: 18px;
    height: 24px;
  }
  .vod-icon-pause::before,
  .vod-icon-pause::after {
    width: 5px;
    height: 24px;
  }
  .vod-seek-text {
    font-size: 16px;
  }
  .vod-seek-icon {
    font-size: 18px;
  }
}

/* Video On Demand (animaciones play/pause, seek) */

/* NOTA: lowlatency.css se carga condicionalmente en usePlayerScripts
   porque tiene estilos que pueden conflictuar con el modo normal */
.vjs-chromecast-button:hover {
  cursor: pointer;
}
.vjs-chromecast-button.vjs-chromecast-button-lg:not(.vjs-hidden) {
  display: flex;
  align-items: center;
  width: auto;
  padding: 0 4px;
}
.vjs-chromecast-button.vjs-chromecast-button-lg:not(.vjs-hidden)
  .vjs-chromecast-button-label {
  flex-grow: 1;
  margin-left: 4px;
}
.vjs-chromecast-button.vjs-chromecast-button-lg:not(.vjs-hidden)
  .vjs-icon-placeholder {
  flex-grow: 1;
}
.vjs-tech-chromecast {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.vjs-tech-chromecast .vjs-tech-chromecast-poster::after {
  content: " ";
  display: block;
  height: 2px;
  width: 100px;
  background-color: #ccc;
  position: absolute;
  left: calc(50% - 50px);
  margin-top: 5px;
}
.vjs-tech-chromecast .vjs-tech-chromecast-poster-img {
  max-height: 180px;
  width: auto;
  border: 2px solid #ccc;
}
.vjs-tech-chromecast
  .vjs-tech-chromecast-poster-img.vjs-tech-chromecast-poster-img-empty {
  width: 160px;
  height: 90px;
}
.vjs-tech-chromecast .vjs-tech-chromecast-title-container {
  position: absolute;
  bottom: 50%;
  margin-bottom: 100px;
  color: #ccc;
  text-align: center;
}
.vjs-tech-chromecast .vjs-tech-chromecast-title {
  font-size: 22px;
}
.vjs-tech-chromecast
  .vjs-tech-chromecast-title.vjs-tech-chromecast-title-empty {
  display: none;
}
.vjs-tech-chromecast .vjs-tech-chromecast-subtitle {
  font-size: 18px;
  padding-top: 0.5em;
}
.vjs-tech-chromecast
  .vjs-tech-chromecast-subtitle.vjs-tech-chromecast-subtitle-empty {
  display: none;
}
