/* =====================================================
   AUDIOBOOKS — Hoja de estilos unificada
   Solo contiene lo que Bootstrap 5 NO cubre.
   ===================================================== */

/* ---- Accesibilidad ---- */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}
.skip-link {
  position: absolute !important;
  top: -100px !important;
  left: 0;
  background: #1a73e8;
  color: white;
  padding: 8px 16px;
  z-index: 9999;
  border-radius: 0 0 4px 0;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 0 !important; }

/* ---- Hover card de libro (visualizacion.php) ---- */
.card-libro-hover {
  transition: transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
}
.card-libro-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.15) !important;
}

/* ---- Cropper ---- */
.cropper-wrapper {
  max-width: 100%;
  max-height: 70vh;
  margin: 0 auto;
  overflow: hidden;
  background-color: #f7f7f7;
}
#image-to-crop {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---- Reproductor inmersivo (reproducir.php) ---- */
.contenedor-inmersivo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: pointer;
  background: #000;
}
.wrapper-imagen {
  position: relative;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ilustracion-full {
  height: 100dvh;
  width: auto;
  max-width: 100vw;
  object-fit: contain;
  display: block;
}
.capa-texto-inmersiva {
  position: absolute;
  box-sizing: border-box;
  min-height: 14%;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  color: #fff;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  z-index: 10;
  font-family: 'Open-Dyslexic', sans-serif !important;
  font-size: clamp(12px, 3vmin, 30px);
  line-height: 1.2;
  pointer-events: none;
  text-align: center;
}

/* Controles de navegación del reproductor */
.nav-control {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.4);
  color: white;
  border: none;
  cursor: pointer;
  transition: background .2s ease;
  z-index: 10001;
  backdrop-filter: blur(4px);
  text-decoration: none;
}
.nav-prev {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 120px;
  border-radius: 0 20px 20px 0;
  font-size: 40px;
}
.nav-next {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 120px;
  border-radius: 20px 0 0 20px;
  font-size: 40px;
}
.nav-close {
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
}
.status-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 80px;
  color: white;
  opacity: 0;
  pointer-events: none;
  z-index: 10005;
  transition: opacity .3s ease;
}
.status-icon.visible { opacity: 1; }

/* Overlay de inicio del reproductor */
.overlay-reproductor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: rgba(0,0,0,.85);
  z-index: 20000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: white;
}
.play-icon {
  border: 3px solid #fff;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 40px;
  margin-bottom: 15px;
}

/* ---- Mensaje de orientación (reproducir.php) ---- */
#landscape-message {
  background: radial-gradient(circle at center, rgba(17, 24, 39, 0.96) 0%, rgba(8, 10, 15, 0.99) 100%) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: system-ui, -apple-system, sans-serif;
}
#landscape-message .message-content {
  text-align: center;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#landscape-message .icon-rotate {
  font-size: 0 !important;
  position: relative;
  width: 44px;
  height: 84px;
  border: 2.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  margin-bottom: 35px;
  animation: cinematicRotate 2.6s cubic-bezier(0.77, 0, 0.175, 1) infinite;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
  display: flex;
  padding: 6px;
}
#landscape-message .icon-rotate::before {
  content: '';
  flex-grow: 1;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 4px;
  border: 1px dashed rgba(59, 130, 246, 0.5);
}
#landscape-message .icon-rotate::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 50%;
  filter: blur(20px);
  transform: translate(-50%, -50%);
  z-index: -1;
  animation: pulseGlow 2.6s ease-in-out infinite;
}
#landscape-message h2 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin: 0 0 14px 0 !important;
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
#landscape-message h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #3b82f6, transparent);
  margin: 12px auto 0 auto;
}
#landscape-message p {
  font-size: 0.85rem !important;
  font-weight: 300 !important;
  color: #9ca3af !important;
  max-width: 290px;
  margin: 0 !important;
  line-height: 1.6 !important;
  letter-spacing: 0.5px;
}
@media screen and (max-width: 991px) and (orientation: portrait) {
  #landscape-message { display: flex !important; }
  body { overflow: hidden !important; }
}
@keyframes cinematicRotate {
  0%   { transform: rotate(0deg); }
  40%  { transform: rotate(-90deg); }
  60%  { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%, -50%) scale(1.2); }
}

/* ---- Footer del panel de administración (footer.php) ---- */
.main-footer {
  background: #fff;
  border-top: 1px solid #dee2e6;
  text-align: center;
  padding: .75rem 1rem;
  font-size: .85rem;
  color: #6c757d;
}
.main-footer .footer-content p,
.main-footer .footer-content small {
  margin: 0;
  display: block;
}

/* ---- Vídeo (ver_video.php) ---- */
.video-container-full {
  background: #000;
  min-height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.video-player {
  width: 100%;
  max-width: 1000px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  outline: none;
}
.video-header {
  width: 100%;
  max-width: 1000px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  color: white;
}
.btn-back-video {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 6px;
  padding: .4rem .9rem;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s ease;
}
.btn-back-video:hover {
  background: rgba(255,255,255,.2);
  color: #fff;
}

/* ---- Sortable drag handles (gestionar_capitulos.php) ---- */
.handle {
  cursor: grab;
  color: #ccc;
  font-size: 1.8rem;
  padding-right: 10px;
}
.handle:active { cursor: grabbing; }
.sortable-ghost  { opacity: .4; background-color: #e2eafc !important; }
.sortable-chosen { background-color: #f8f9fa; }
.capitulo-row    { transition: background .15s; }
