* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: "LXGW";
  font-style: normal;
  src: url('LXGW.ttf');
}
/* Los controles de formulario usan otras fuentes. Hay que forzar la herencia*/
  button,
  input,
  select,
  textarea {
      font-family: 'LXGW', 'Segoe UI', system-ui, -apple-system, sans-serif;;
}


html, body {
  width: 100%;
  height: 100%;
  background-color: #0d0d0d;
  color: #ffffff;
  font-family: 'LXGW';  /* , 'Segoe UI Emoji' ,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;*/
  overflow: hidden;
}

/* Clases de Visibilidad / Transiciones */
.hidden {
  display: none !important;
}

/* ==========================================
   MENÚ 1: SIDEBAR
   ========================================== */
.sidebar{
  position: absolute;
  top: 0;
  left: 0;
  padding-right: 10px;
  width: 300px;
  max-width: 100vw;
  height: 100%;
  z-index: 60;
  background-color: rgba(18, 18, 18, 0.95);
  border-right: 1px solid #2a2a2a;
  box-sizing: border-box;
  /* Flexbox Vertical para fijar cabecera y hacer scroll solo en carpetas */
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Evita que el sidebar completo haga scroll */
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
  
/* Clases para desplazar/ocultar los menús fuera de la pantalla */
.sidebar-closed {
  transform: translateX(-100%);
}

/* ZONA FIJA (Header) */
.sidebar-header {
  flex-shrink: 0; /* Impide que la cabecera se reduzca */
  background-color: #1a1a1a;
  border-bottom: 1px solid #333;
  padding: 10px;
}

.sidebar-row-1,
.sidebar-row-2 {
  display: flex;
  align-items: center;
  gap: 5px; /* o space-between según tu diseño */
  margin-bottom: 8px;
}

.sidebar-row-2 {
  margin-bottom: 0;
}

.row-search input {
  flex: 1;
  background-color: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  padding: 8px 10px;
  border-radius: 4px;
  outline: none;
  font-size: 20px;
}

.row-search input:focus {
  border-color: #007acc;
}

.row-search button, .row-header button {
  background: #252525;
  border: 1px solid #333;
  color: #fff;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 20px;
}

.row-search button:hover, .row-header button:hover {
  background: #333;
}

/* Línea 2: Header */
.row-header {
  justify-content: space-between;
  font-size: 20px;
}

.title-app {
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 20px;
  color: #e0e0e0;
  color:#3498db;
}



/* ZONA CON SCROLL (Lista de Carpetas) */
.contenedor-carpetas {
  flex: 1; /* Toma todo el espacio vertical restante */
  overflow-y: auto; /* El scroll se limita únicamente a esta zona */
  -webkit-overflow-scrolling: touch;
  padding: 10px 0;
  box-sizing: border-box;

  /* Ocultar barra de scroll en Smart TV / WebKit */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar-folders::-webkit-scrollbar {
  display: none;
}

.title-app {
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 20px;
  color: #e0e0e0;
  color:#3498db;
}

/* Línea 3: Carpetas y Subcarpetas */
.folder {
  flex: 1;
  overflow-y: hidden; /* Control manual de enfoque */
  /* Forzar que las carpetas tengan su color y el icono se vea */
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  padding: 8px 5px; 
  color: #f1c40f; 
  border-bottom: 1px solid #222; 
  font-weight: bold;
  font-size: 2rem;
  overflow: hidden;
}

/* El icono del primer nivel se verá más grande y con su color */
.folder i.fas {
  min-width: 25px;
  margin-right: 10px;
  text-align: center;
}

/* Estilo para el indicador de subniveles (la flechita) */
.fa-angle-right {
  color: #ccc;
}

.folder-active {
  background: #1a252f !important; 
  color: #3498db !important;
  border-left: 4px solid #3498db;
  transition: background 0.3s;
}

.fa-folder-video { color: #e74c3c !important; } /* Rojo */
.fa-folder-audio { color: #2ecc71 !important; } /* Verde */
.fa-folder-open  { color: #3498db !important; } /* Azul */
.fa-folder       { color: #f1c40f !important; } /* Amarillo */

.sub { display: none; padding-left: 20px; border-left: 1px dotted #444; }
.open { display: block; }


/* Estilos de los elementos carpeta dinámicos */
.item-folder {
  padding: 12px 15px;
  color: #fff;
  cursor: pointer;
  border-bottom: 1px solid #222;
}

.item-folder.focused,
.item-folder.activa {
  background-color: #007bff;
  color: #fff;
  outline: none;
}



/* ==========================================
   MENÚ 2: FOOTER-STRIP (CARRUSEL VERTICAL)
   ========================================== */
 .footer-strip {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 100vw;
    height: 100%;
    background-color: rgba(12, 12, 12, 0.98);
    border-right: 1px solid #2a2a2a;
    z-index: 30;
    /* Scroll nativo */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    
    /* Espaciado uniforme vertical para evitar huecos gigantes */
    padding: 10px 0px;
    box-sizing: border-box;
    /* Ocultar barra de scroll */
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .footer-strip::-webkit-scrollbar {
    display: none;
  }

  .footer-strip-closed {
    transform: translateX(-100%);
  }

  /* MINIATURAS */
  /* El contenedor DEBE ser el marco de referencia para offsetTop */
  #footer-strip, .footer-strip {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 10px 0;
  }


  .thumb {
    width: 300px;
    height: 200px;
    background: #1a1a1a;
    border: 5px solid #333;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    position: relative;
    margin: 0 auto 10px auto;
    overflow: hidden;
    display: block;
  }

  .thumb.focused,
  .thumb.activa,
  .thumb:focus {
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
    outline: none;
  }

  .thumb.activa {
    background-color: #007bff;
    border-color: #00d2ff;
    box-shadow: 0 0 20px #007bff;
  }

  .imagen-fondo-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  .emoji-thumb {
    position: absolute;
    right: 0%;
    top: 0%;
    font-size: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
    color: #bf9b30;
    z-index: 40;
  }

  /* Aplicamos las reglas de íconos/divs únicamente si NO son la imagen de fondo */
  .thumb i { 
    font-size: 60px;
    color: #3498db;
    margin-bottom: 10px;
    display: block;
  }

/* ==========================================
   PANTALLA COMPLETA: PLAYER
   ========================================== */

.player{
    position:fixed;
    background:#000;
    
     /* 🔥 MANTENEMOS EL MODO FLEX */
    display: flex;
    flex-direction: column; 
    
    z-index: 10;
    overflow: auto;
    resize: both;
    width: 100%;
    height: 100%;
    left: 0px;
    top:0;
}

 .player-closed{
    transform: translateX(-100%);
  }


/* --- CABECERA --- */
.player-header {
    position: relative; 
    width: 100%;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 5px;
    display: flex;
    flex-direction: column; 
    justify-content: space-between;
    align-items: center;
    z-index: 20;
    opacity: 1; 
    cursor: move;
}
button {
    background: #444;
    color: white;
    border: none;
    padding: 5px 14px;    /* Más grandes que antes */
    margin-left: 5px;    /* Más separación entre ellos */
    cursor: pointer;
    border-radius: 6px;
    font-size: 18px;      /* Iconos más legibles */
    transition: background .2s, transform .2s;
}
button:hover {
    background: #666;
}

.player .player-header {
    opacity: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 70;
}

.player.show-controls .player-header {
    opacity: 1;
    pointer-events: auto;
}

/* Efecto al pasar el ratón en pantalla completa */
.player .player-header button:hover {
    background: #cc0000;   /* Se vuelven rojos al pasar el ratón para resaltar */
    transform: scale(1); /* Se agrandan un poquito al apuntarles */
}


#diapositivas.show-controls{
  background: #888;  
}

/* Y que en pantalla completa el video mande sobre todo */
.player #contenidoPlayer {
    display: flex !important;
    width: 100%;
    height: 100%;
}

/* 1. Asegurar que el contenedor de medios se estire */
#contenidoPlayer {
    display: flex;
    flex:1;
    width: 100%;;      /* Ocupa todo el ancho */
    height:100%;
    overflow: hidden;
    background: #000;
    position:relative;
    justify-content: center;
}


#contenidoPlayer {
    pointer-events: none; /* Ignora clics, scroll y hover */
    opacity: 1;        /* Opcional: poner 0.5 para dar pistas visuales de que está desactivado */
}
/* 2. Forzar al VIDEO, IFRAME o IMG a cubrir todo el área */
#contenidoPlayer video, contenidoPlayer iframe, 
#contenidoPlayer img {
    width: 100% !important;
    height: 100% !important; 
    display: block;
    object-fit: contain; /* Mantiene la proporción sin deformar */
    /* border: 2px solid yellow ; */
}
/* 3. Ajuste para AUDIO (que no debe estirarse a pantalla completa) */
#contenidoPlayer audio {
    width: 90%;
    height: auto !important; /* El audio no necesita cubrir el alto */
}
/* Chrome, Edge, Safari */
video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}
#seek-bar {
  opacity: 1;
  transition: opacity 0.5s ease; /* Desvanecimiento suave */
  height: 20px;
  z-index: 20;
}

/* Cuando el contenedor tenga esta clase, mostramos la barra */
.mostrar-controles #seek-bar {
  opacity: 1;
}




.audio-card {
    background: #282828;
    padding: 10px;
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    width: 100%;
    height: 100%;
    color: white;
}

.cover-wrapper {
    position: relative;
    width: 100%;
    height: 80%;
    margin: 0 auto 20px;
}

.audio-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* object-position: 50% 50%; */
    border-radius: 0%; /* Forma circular de vinilo */
    border: 5px solid #333;
    /*transition: transform 0.3s ease */;
}



/* Animación de rotación */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotating {
    animation: spin 10s linear infinite;
}

h2 { font-size: 1.2rem; margin: 10px 0 5px; }
p { font-size: 0.9rem; color: #b3b3b3; margin-bottom: 20px; }

audio {
    width: 100%;
    filter: invert(100%); /* Hace el reproductor nativo más visible en fondo oscuro */
}



.control-volumen {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size:18px;
  cursor: pointer;
  
}

#btn-mutear {
  background: #444;
  color: white;
  border: none;
  padding: 5px 14px;
  margin-left: 5px;    /* Más separación entre ellos */
  cursor: pointer;
  border-radius: 6px;
  font-size: 18px;
  transition: background 0.2s;
  
}
#btn-mutear:hover {
  background: #666;
}

/* Estilo para la barra deslizante */
#barra-volumen {
  width: 80px; /* Tamaño compacto para la barra */
  height: 40px;
  cursor: pointer;
  /*accent-color: #ff0000; /* Pone el tirador en rojo (o el color de tu app) */
}

*:focus {
    border: 4px solid #ffffff !important;       /* Borde blanco grueso alrededor */
    box-shadow: 0 0 10px #ffffff, 0 0 30px #3b82f6 !important;
    /* transform: scale(1.08) !important;          /* Lo agrandamos un 8% (efecto Netflix) */
    z-index: 50;                                /* Lo ponemos por encima de los demás */
    outline: none ;
}
input:focus{
  outline: 4px solid #ffffff !important;;
}

@keyframes giro {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); } /* Gira hacia la izquierda como el icono */
}
.dialogo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0,0,0,.8);

    display: flex;
    justify-content: center;
    align-items: center;
    z-index:90;
}

.hidden{
    display:none;
}

.dialogo-contenido {
    width: 600px;
    max-width: 80%;
    background: #222;
    color: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
}

#epgInfoOverlay {
  position: absolute;
  top: 0px;
  left: 0%;
  right: 0%;
  background: rgba(15, 18, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-family: sans-serif;
  z-index: 10;
  box-sizing: border-box;
}

.epg-horas {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 30px;
  font-weight: 600;
  margin-right: 8px;
  color: #fff;
  vertical-align: middle;
}

/* Títulos */
.epg-titulo {
  font-size: 30px;
  margin: 4px 0 6px 0;
  color: #fff;
  white-space: wrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.epg-imagen{
  width: 25%; 
  height: auto; 
  object-fit: contain;
  background: #f0f0f0 url("data:image/svg+xml,%3Csvg xmlns='http://w3.org' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2' ry='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21'/%3E%3C/svg%3E") no-repeat center;
}

/* Descripciones */
.epg-desc {
  font-size: 30px;
  line-height: 1.4;
  color: #ccc;
  margin: 0 0 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


epgCreditos {
    font-size: 0.85em;
    font-style: italic;
    opacity: 0.9;
}


/* Barra de Progreso */
.epg-progress-bg {
  width: 95%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  margin-top: auto;
}
.epg-progress-bar {
    height: 95%;
    width: 0%;
    background: #ffd700;
    -webkit-transition: width 0.5s linear;
    transition: width 0.5s linear; /* Animación de avance suave */
}
.epg-progress-fill {
  height: 100%;
  background: #ffd200;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.epg-col-actual {
  margin-left:300px;
    width: calc(50% - 150px); /* Mismo tamaño que la derecha (100%-300px)/2 */
}

/* Columna Derecha: Programa Siguiente */
.epg-col-siguiente {
    width: calc(50% - 150px); /* Mismo tamaño que la izquierda */
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 20px;
    box-sizing: border-box; /* Asegura que el padding no engorde la columna */
}


/* Capa de Error asociada por ID */
#errorOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.90);
    /* backdrop-filter: blur(6px); */ 
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out;
}

#errorOverlay.active {
    opacity: 1;
    pointer-events: auto;
}

.error-card {
    text-align: center;
    padding: 24px 32px;
    width: 85%;
    max-width: 400px;
    background: #181818;
    border: 1px solid #2e2e2e;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
}

.error-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px auto;
    fill: #ff3b30;
}

.error-title {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 6px 0;
}

.error-subtitle {
    color: #a0a0a0;
    font-size: 0.9rem;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.btn-retry {
    background-color: #e50914;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
}

/* Ajuste fino responsivo para dispositivos con pantallas reducidas (< 300px) */
@media (max-width: 300px) {
  .sidebar, .footer-strip, .item-thumb {
    width: 100vw;
  }
}



