/* -------------------------------------------------------------
   SISTEMA DE DISEÑO BIBLIOCAT - ESTILO GLIDE GLOW PREMIUM
   ------------------------------------------------------------- */
:root {
  /* Paleta de Colores Extraída de las Capturas del Usuario */
  --bg-main: #1D1F28;        /* Fondo oscuro azul pizarra místico */
  --bg-card: #222938;        /* Azul pizarra de tarjetas Glide */
  --bg-chat-bot: #202635;    /* Burbuja Bibliocat */
  --bg-chat-user: #1b202e;   /* Burbuja Usuario */
  
  --accent-light: #a5c1dc;   /* Azul hielo / Blanco acero de los bordes destacados */
  --accent-blue: #5e81ac;    /* Azul acero litúrgico */
  --accent-glow: rgba(165, 193, 220, 0.15);
  
  --text-primary: #ffffff;   /* Blanco puro para alta legibilidad */
  --text-secondary: #8f98aa; /* Gris azulado suave para subtítulos y metadatos */
  
  --border-card: rgba(255, 255, 255, 0.05);
  --border-accent: #a5c1dc;
  
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-title: 'Outfit', sans-serif;
  --font-sans: 'Inter', sans-serif;
}

/* -------------------------------------------------------------
   COMPATIBILIDAD CON TAILWIND CSS PREFLIGHT RESETS
   ------------------------------------------------------------- */
input, textarea, select, button {
  border-style: none;
  font-family: inherit;
  font-size: inherit;
  margin: 0;
}
button {
  background: none;
  cursor: pointer;
}
img {
  display: inline-block;
  vertical-align: middle;
}

/* -------------------------------------------------------------
   PALETA MODO CLARO PREMIUM (LIGHT MODE OVERRIDES)
   ------------------------------------------------------------- */
.light-theme {
  --bg-main: #f4f6f9;        /* Fondo claro grisáceo-azul suave */
  --bg-card: #ffffff;        /* Tarjetas blancas puras */
  --bg-chat-bot: #ffffff;    /* Burbuja del asistente blanca */
  --bg-chat-user: #e2e8f0;   /* Burbuja del usuario en gris azulado */
  
  --accent-light: #334155;   /* Destacados oscuros para textos secundarios */
  --accent-blue: #1e40af;    /* Azul real premium de alto contraste */
  --accent-glow: rgba(30, 64, 175, 0.05);
  
  --text-primary: #0f172a;   /* Texto principal gris pizarra oscuro */
  --text-secondary: #475569; /* Subtítulos legibles */
  
  --border-card: rgba(0, 0, 0, 0.07);
  --border-accent: #1e40af;
}

.light-theme .app-container {
  border-left-color: rgba(0, 0, 0, 0.06);
  border-right-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}

.light-theme .app-header,
.light-theme .app-header-chat {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.light-theme blockquote {
  background: rgba(0, 0, 0, 0.03);
}

.light-theme .chat-form {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

.light-theme .chat-form:focus-within {
  border-color: var(--accent-blue);
  background: #ffffff;
  box-shadow: 0 0 15px rgba(30, 64, 175, 0.08);
}

.light-theme .chat-form input {
  color: #0f172a;
}

.light-theme .chat-form input::placeholder {
  color: #64748b;
}

.light-theme .back-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

.light-theme .back-btn:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
}

.light-theme .category-header {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.light-theme .circle-btn {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.light-theme .circle-btn-wrapper:hover .circle-btn {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08), 0 0 15px rgba(30, 64, 175, 0.08);
}

.light-theme .highlighted-tool .circle-btn {
  border-color: var(--accent-blue);
  background: rgba(30, 64, 175, 0.08);
  color: var(--accent-blue);
  box-shadow: 0 0 12px rgba(30, 64, 175, 0.12);
  animation: pulse-glow-light 2.5s infinite;
}

@keyframes pulse-glow-light {
  0% { box-shadow: 0 0 8px rgba(30, 64, 175, 0.12); }
  50% { box-shadow: 0 0 18px rgba(30, 64, 175, 0.25); }
  100% { box-shadow: 0 0 8px rgba(30, 64, 175, 0.12); }
}

.light-theme .hover-glow:hover {
  border-color: rgba(30, 64, 175, 0.15);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06), 0 0 15px rgba(30, 64, 175, 0.04);
}

.light-theme .message-avatar {
  background: #e2e8f0;
  border-color: rgba(0, 0, 0, 0.08);
  color: #334155;
}

.light-theme .user-message .message-avatar {
  background: #cbd5e1;
  color: #0f172a;
}

.light-theme .scroll-bottom-btn {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.light-theme .scroll-bottom-btn:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
}

/* Overrides de modo claro para el Chat e IA */
.light-theme .prompt-chip {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--accent-blue);
}

.light-theme .prompt-chip:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
}

.light-theme .message-sources {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.light-theme .accordion-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .accordion-item:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
}

.light-theme .accordion-content {
  background: rgba(0, 0, 0, 0.02);
}

.light-theme .user-message .message-content {
  border-right: 4px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* -------------------------------------------------------------
   ESTILOS GENERALES Y RESET
   ------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-container {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: 1200px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
}

/* -------------------------------------------------------------
   HEADER DINÁMICO GLIDE GLOW PREMIUM
   ------------------------------------------------------------- */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background: rgba(19, 25, 36, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(15px);
  z-index: 100;
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-header.header-hidden {
  transform: translateY(-100%);
}

.header-container {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

/* Avatar Circular con Borde Dorado */
.header-avatar-wrapper {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background-color: #f5f5f5; /* Fondo blanquecino exacto como en la imagen */
  border: 2px solid #D4AF37; /* Borde dorado pulido */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 10px rgba(212, 175, 55, 0.25);
  overflow: hidden;
}

.header-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0; /* Elimina la separación para maximizar el tamaño */
  transform: scale(1.6); /* Agranda el dibujo interno a casi el doble de tamaño */
  transform-origin: center;
}

/* Información del Header */
.header-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
  min-width: 0;  /* critical: allows flex children to shrink & truncate */
  overflow: hidden;
}

.header-greeting {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  line-height: 1.15;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-date {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin-bottom: 3px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-saint {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  transition: var(--transition-smooth);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* -------------------------------------------------------------
   CUERPO PRINCIPAL & CHAT
   ------------------------------------------------------------- */
.app-body {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-main);
}

.chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
  z-index: 2;
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
.chat-messages-container::-webkit-scrollbar {
  width: 5px;
}

.chat-messages-container::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.chat-messages-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent-light);
}

.message {
  display: flex;
  gap: 14px;
  width: 100%;
  animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
  transform: translateY(12px);
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilo de Avatar Circular Glide */
.message-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 15px;
  flex-shrink: 0;
  background: #222a3d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent-light);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Mensaje Bibliocat (Sistema / Bot) */
.system-message {
  align-self: flex-start;
}

.system-message .message-content {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--border-accent); /* Borde destacado izquierdo exacto de Glide */
  border-radius: 16px;
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Mensaje Usuario */
.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.user-message .message-avatar {
  background: #2b354e;
  color: #ffffff;
}

.user-message .message-content {
  background: var(--bg-chat-user);
  border: 1px solid var(--border-card);
  border-right: 4px solid rgba(255, 255, 255, 0.4); /* Destacado sutil derecho para el usuario */
  border-radius: 16px;
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.message-content {
  flex: 1;
  padding: 16px 18px;
  line-height: 1.6;
  font-size: 14.5px;
  letter-spacing: 0.2px;
}

.message-content p {
  margin-bottom: 10px;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.message-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Chips de Sugerencia */
.suggested-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.prompt-chip {
  background: #222938;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent-light);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.prompt-chip:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-light);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(94, 129, 172, 0.25);
}

/* Fuentes y Referencias (RAG) */
.message-sources {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.sources-title {
  font-family: var(--font-title);
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
  font-size: 12px;
}

.accordion-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.accordion-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.accordion-item:hover {
  border-color: rgba(165, 193, 220, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.accordion-header {
  width: 100%;
  background: none;
  border: none;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--accent-light);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  gap: 10px;
  outline: none;
}

.accordion-header-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.source-score {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 4px;
}

.accordion-arrow {
  font-size: 10px;
  color: var(--text-secondary);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(0, 0, 0, 0.15);
}

.accordion-text {
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  white-space: pre-line;
}


/* Indicador de Escritura IA */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-light);
  border-radius: 50%;
  animation: wave 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes wave {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* -------------------------------------------------------------
   ÁREA DE ENTRADA DEL CHAT
   ------------------------------------------------------------- */
.chat-input-wrapper {
  padding: 16px 20px 24px 20px;
  background: linear-gradient(180deg, transparent 0%, var(--bg-main) 30%);
  flex-shrink: 0;
}

.chat-form {
  display: flex;
  background: #1f2535;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 5px 6px 5px 18px;
  align-items: center;
  transition: var(--transition-smooth);
}

.chat-form:focus-within {
  border-color: var(--accent-light);
  background: #252c3e;
  box-shadow: 0 0 15px rgba(165, 193, 220, 0.1);
}

.chat-form input {
  flex: 1;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 14.5px;
  padding: 10px 0;
  font-family: var(--font-sans);
}

.chat-form input::placeholder {
  color: var(--text-secondary);
}

.chat-form input:focus {
  outline: none;
}

.send-btn {
  background: var(--accent-blue);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-smooth);
}

.send-btn:hover {
  background: var(--accent-light);
  color: var(--bg-main);
  transform: scale(1.03);
}

/* -------------------------------------------------------------
   RESPONSIVIDAD Y FLUIDEZ DE PANTALLA
   ------------------------------------------------------------- */
@media (max-width: 600px) {
  .app-container {
    border-left: none;
    border-right: none;
    box-shadow: none;
  }

  .app-header {
    padding: 10px 14px;
  }

  .header-avatar-wrapper {
    width: 54px;
    height: 54px;
  }

  .header-greeting {
    font-size: 16px;
  }
  
  .logo-title {
    font-size: 16px;
    letter-spacing: 1px;
  }
  
  .chat-messages-container {
    padding: 16px 14px;
    gap: 16px;
  }
  
  .message {
    width: 100%;
  }
  
  .message-avatar {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }
  
  .message-content {
    padding: 14px 16px;
    font-size: 13.5px;
  }
  
  .chat-input-wrapper {
    padding: 10px 14px 16px 14px;
  }
  
  .chat-form {
    padding: 3px 4px 3px 14px;
  }
  
  .chat-form input {
    font-size: 13.5px;
  }
  
  .send-btn {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .featured-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .grid-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .grid-card {
    padding: 14px;
  }

  .dashboard-body {
    padding: 100px 14px 16px 14px;
    gap: 20px;
  }
}

/* Bloque de citas teológicas/bíblicas (> Texto) */
blockquote {
  margin: 12px 0;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--border-accent);
  border-radius: 4px;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 13.5px;
  line-height: 1.55;
}

/* Botón flotante para scroll inteligente */
.scroll-bottom-btn {
  position: absolute;
  bottom: 96px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent-light);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-bottom-btn:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-light);
  transform: translateY(0) scale(1.05);
}

.scroll-bottom-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* -------------------------------------------------------------
   MODO DASHBOARD (LANDING PAGE PRINCIPAL)
   ------------------------------------------------------------- */
.dashboard-mode {
  height: 100vh;
  height: 100dvh;
  max-height: 100%;
  overflow: hidden;
}

.dashboard-body {
  padding: 115px 24px 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  box-sizing: border-box;
}

/* Custom Scrollbar para el Dashboard */
.dashboard-body::-webkit-scrollbar {
  width: 6px;
}
.dashboard-body::-webkit-scrollbar-track {
  background: transparent;
}
.dashboard-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}
.dashboard-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-light);
}

/* 1. FILA PRINCIPAL (TARJETAS DESTACADAS HORIZONTALES) */
.featured-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
  flex-shrink: 0;
}

.featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.hover-glow:hover {
  transform: translateY(-3px);
  border-color: rgba(165, 193, 220, 0.25);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35), 0 0 15px rgba(165, 193, 220, 0.08);
}

.card-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.03);
}

/* Iconos de Fila Principal con colores litúrgicos */
.liturgia-icon,
.evangelio-icon,
.santo-icon {
  background: rgba(165, 193, 220, 0.12);
  color: #a5c1dc;
  border: 1px solid rgba(165, 193, 220, 0.2);
}

.light-theme .liturgia-icon,
.light-theme .evangelio-icon,
.light-theme .santo-icon {
  background: rgba(30, 64, 175, 0.05);
  border-color: rgba(30, 64, 175, 0.12);
  color: var(--accent-blue);
}

.santo-icon {
  transition: var(--transition-smooth);
}

.santo-icon svg,
.liturgia-icon svg {
  width: 26px;
  height: 26px;
}

.featured-card.santo-card {
  border-left: 4px solid var(--liturgical-color, #5e81ac);
  transition: var(--transition-smooth), border-left-color 0.4s ease;
}

.featured-card.liturgia-card {
  border-left: 4px solid var(--liturgical-color, #5e81ac);
  transition: var(--transition-smooth), border-left-color 0.4s ease;
}

.card-text-wrapper {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  line-height: 1.2;
}

.card-subtitle {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.card-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* 2. CUADRÍCULA INTERMEDIA (RAPID GRID MODULES) */
.grid-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2x2 grid always */
  gap: 16px;
  width: 100%;
}

.grid-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  min-height: 108px;
}

.card-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  width: 100%;
}

.card-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(165, 193, 220, 0.08); /* Fondo circular sutil */
  border: 1px solid rgba(165, 193, 220, 0.15);
  color: var(--accent-light);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(165, 193, 220, 0.1));
}

.light-theme .card-header-icon {
  background: rgba(30, 64, 175, 0.05);
  border: 1px solid rgba(30, 64, 175, 0.12);
  color: var(--accent-blue);
}

.grid-title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

.grid-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
  text-align: left;
}

.grid-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* 3. CARROUSELES DE CATEGORÍAS (CIRCULAR BUTTONS) */
.navigation-categories {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}

.category-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.category-header {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
}

.circular-buttons-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 4px 0 12px 0;
  width: 100%;
  overflow-x: hidden; /* Evita cualquier scroll horizontal */
}

/* Hide scrollbar for circular row */
.circular-buttons-row::-webkit-scrollbar {
  display: none;
}

.circle-btn-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
  width: 72px;
}

.circle-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  color: var(--text-primary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);
}

.circle-btn-wrapper:hover .circle-btn {
  transform: scale(1.08);
  border-color: var(--accent-light);
  color: var(--accent-light);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 15px rgba(165, 193, 220, 0.15);
}

/* Botón Destacado de BiblioCat IA (Con brillo de latido místico) */
.highlighted-tool .circle-btn {
  border: 1.5px solid var(--accent-light);
  background: rgba(94, 129, 172, 0.15);
  color: var(--accent-light);
  box-shadow: 0 0 12px rgba(165, 193, 220, 0.25);
  animation: pulse-glow 2.5s infinite;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 8px rgba(165, 193, 220, 0.25);
  }
  50% {
    box-shadow: 0 0 18px rgba(165, 193, 220, 0.5);
  }
  100% {
    box-shadow: 0 0 8px rgba(165, 193, 220, 0.25);
  }
}

.circle-btn-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.circle-btn-wrapper:hover .circle-btn-label {
  color: var(--text-primary);
}

/* 4. CHAT PAGE SPECIFIC HEADER */
.app-header-chat {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: rgba(19, 25, 36, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(15px);
  z-index: 10;
  flex-shrink: 0;
  width: 100%;
  gap: 16px;
}

.back-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--accent-light);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.back-btn:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-light);
  transform: scale(1.05);
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
}

/* Botón de Alternancia de Tema */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--accent-light);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  outline: none;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-light);
  transform: scale(1.05);
}

.light-theme .theme-toggle-btn {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

.light-theme .theme-toggle-btn:hover {
  background: var(--accent-blue);
  color: #ffffff;
}

/* =============================================================
   ESTILOS PREMIUM DEL EVANGELIO Y AUDIO PLAYER CUSTOM
   ============================================================= */

/* Borde izquierdo dinámico para la tarjeta del Evangelio en el Dashboard */
.featured-card.gospel-card {
  border-left: 4px solid var(--liturgical-color, var(--accent-light));
  transition: var(--transition-smooth);
}

.light-theme .featured-card.gospel-card {
  border-left-width: 5px;
}

/* Insignia dorada del libro si el color es neutro */
#card-evangelio-icon-wrapper {
  transition: var(--transition-smooth);
}

/* Contenedor del Overlay Deslizante */
.overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-main);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.overlay-container.open {
  transform: translateY(0);
}

/* Vista individual del Overlay */
.overlay-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  opacity: 0;
  pointer-events: none;
  transform: translateX(30px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

#gospel-detail-view {
  overflow: hidden; /* Fijo para soportar player flotante */
}

.overlay-view.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

/* Banner de la Cruz Litúrgica en la vista de lista */
.gospel-banner {
  width: 100%;
  height: 160px;
  background: linear-gradient(180deg, #1b202c 0%, #151924 100%);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.light-theme .gospel-banner {
  background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Cruz Litúrgica Minimalista del Banner */
.liturgical-cross {
  font-size: 70px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.04);
  user-select: none;
  transform: translateY(-10px);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.light-theme .liturgical-cross {
  color: rgba(0, 0, 0, 0.03);
  text-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

/* Insignia dorada flotante de la Biblia */
.bible-floating-badge {
  position: absolute;
  bottom: -24px;
  left: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #222938;
  border: 2px solid #D4AF37;
  color: #D4AF37;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 10px rgba(212, 175, 55, 0.15);
  z-index: 10;
}

.light-theme .bible-floating-badge {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 0 8px rgba(212, 175, 55, 0.1);
}

/* Header de las Vistas del Overlay */
.gospel-view-header {
  padding: 40px 24px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-main);
  position: relative;
  z-index: 110;
}

.gospel-view-header .circle-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--accent-light);
  flex-shrink: 0;
  box-shadow: none;
}

.light-theme .gospel-view-header .circle-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--accent-light);
  box-shadow: none;
}


.gospel-view-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.overlay-close-btn {
  background: none;
  border: none;
  color: var(--accent-light);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  transition: var(--transition-smooth);
}

.overlay-close-btn:hover {
  color: var(--text-primary);
  transform: translateX(-2px);
}

.gospel-view-title {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.gospel-view-date {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

/* Indicador de Liturgia y Santos */
.liturgical-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.liturgical-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--liturgical-color, var(--accent-blue));
  display: inline-block;
  box-shadow: 0 0 8px var(--liturgical-color, var(--accent-glow));
  border: 1px solid rgba(255, 255, 255, 0.35); /* Visible en fondo oscuro */
  transition: var(--transition-smooth);
}

.light-theme .liturgical-color-dot {
  border: 1px solid rgba(0, 0, 0, 0.2); /* Visible en fondo claro */
}

.liturgical-season {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.liturgical-saint {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Divisor y Decoración */
.gospel-divider {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 4px 24px 16px 24px;
}

.light-theme .gospel-divider {
  background: rgba(0, 0, 0, 0.06);
}

/* Lista de Tarjetas de Lecturas */
.gospel-readings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 24px 24px 24px;
}

/* Tarjeta de Lectura Individual */
.reading-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.reading-card:hover {
  transform: translateY(-2px);
  border-color: rgba(165, 193, 220, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.reading-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex-grow: 1;
}

.reading-card-type {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.reading-card-citation {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--text-secondary);
}

.reading-card-chevron {
  color: var(--text-secondary);
  font-size: 14px;
  margin-left: 12px;
  transition: var(--transition-smooth);
}

.reading-card:hover .reading-card-chevron {
  color: var(--text-primary);
  transform: translateX(3px);
}

/* VISTA DE DETALLE: Caja Glassmorphic de la Lectura */
.gospel-detail-content-wrapper {
  padding: 0 24px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  overflow-y: auto; /* Permite scroll del texto de la lectura */
  padding-bottom: 160px; /* Evita que el reproductor flotante tape el texto final */
}

.gospel-detail-title {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
}

.gospel-detail-subtitle {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.4;
}

.reading-glass-card {
  background: rgba(34, 41, 56, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.light-theme .reading-glass-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.reading-text {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  text-align: justify;
}

.reading-text p {
  margin-bottom: 12px;
}

.reading-text p:last-child {
  margin-bottom: 0;
}

.reading-source-footer {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  margin-top: 8px;
  font-style: italic;
}

/* Botones de acción: Copiar y Compartir */
.reading-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 4px 4px 0 0;
}

.reading-action-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--accent-light); /* Accented icon color */
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 15px;
}

.reading-action-btn:hover {
  background: rgba(165, 193, 220, 0.1);
  border-color: rgba(165, 193, 220, 0.25);
  color: #ffffff;
  transform: scale(1.05);
}

.light-theme .reading-action-btn {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--accent-blue);
}

.light-theme .reading-action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--accent-blue);
}

/* Latin Footer de la Lectura */
.latin-footer {
  font-family: var(--font-title);
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  opacity: 0.5;
  letter-spacing: 0.5px;
  margin: 12px 0 20px 0;
}

/* PLAYER DE AUDIO CUSTOM PREMIUM (Flotante Fijo al Fondo y Alineado a la Derecha) */
.custom-audio-player-container {
  position: absolute;
  bottom: 96px; /* Ajustado para que no quede tapado por el menú inferior (.bottom-nav) */
  right: 24px;
  left: auto;
  width: auto;
  padding: 0;
  background: none;
  display: flex;
  justify-content: flex-end; /* Alineado a la derecha */
  align-items: center;
  flex-shrink: 0;
  box-sizing: border-box;
  z-index: 100;
  pointer-events: none; /* Deja pasar clicks al fondo fuera del reproductor */
}

.custom-audio-player {
  display: flex;
  align-items: center;
  background: #1e2535;
  border: 1px solid rgba(165, 193, 220, 0.15); /* Ice blue accent border */
  border-radius: 30px;
  padding: 8px 16px;
  gap: 12px;
  width: auto;
  max-width: 130px; /* Ultra-minimalist y compacto */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 15px rgba(165, 193, 220, 0.05); /* subtle glow shadow */
  box-sizing: border-box;
  pointer-events: auto; /* Reactivar eventos del mouse en el reproductor */
}

.light-theme .custom-audio-player {
  background: #e2e8f0;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.player-btn {
  background: none;
  border: none;
  color: var(--accent-light); /* Accented icon color by default in dark theme */
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-smooth);
}

.light-theme .player-btn {
  color: #334155;
}

.play-pause-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(165, 193, 220, 0.12); /* Accented background in dark mode */
  border: 1px solid rgba(165, 193, 220, 0.2);
  font-size: 12px;
}

.light-theme .play-pause-btn {
  background: rgba(0, 0, 0, 0.04);
  border: none;
}

.play-pause-btn:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 0 10px rgba(94, 129, 172, 0.5); /* Accent blue glow */
}

/* Indicador de tiempo transcurrido / total */
.player-time-display {
  display: flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.light-theme .player-time-display {
  color: #475569;
}

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

/* Contenedor de la línea de tiempo */
.player-progress-container {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 60px;
}

/* Estilo para los range sliders */
.player-progress-bar,
.player-volume-bar {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
}

.light-theme .player-progress-bar,
.light-theme .player-volume-bar {
  background: rgba(0, 0, 0, 0.1);
}

.player-progress-bar::-webkit-slider-thumb,
.player-volume-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 8px rgba(165, 193, 220, 0.6), 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s ease;
}

.light-theme .player-progress-bar::-webkit-slider-thumb,
.light-theme .player-volume-bar::-webkit-slider-thumb {
  background: var(--accent-blue);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.player-progress-bar::-webkit-slider-thumb:hover,
.player-volume-bar::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Control de volumen */
.player-volume-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.player-volume-container {
  width: 0;
  overflow: hidden;
  transition: width 0.25s ease, opacity 0.25s ease;
  opacity: 0;
  display: flex;
  align-items: center;
}

/* Animación para expandir el slider de volumen al pasar el mouse por encima */
.player-volume-wrapper:hover .player-volume-container {
  width: 50px;
  opacity: 1;
}

.player-volume-bar {
  width: 50px;
}

.volume-btn {
  font-size: 13px;
  width: 24px;
  height: 24px;
}

/* Responsividad para Móviles de las Vistas del Overlay */
@media (max-width: 600px) {
  .overlay-view {
    padding-bottom: 84px;
  }
  
  .gospel-banner {
    height: 130px;
  }
  
  .liturgical-cross {
    font-size: 55px;
  }
  
  .bible-floating-badge {
    width: 50px;
    height: 50px;
    font-size: 18px;
    bottom: -20px;
    left: 18px;
  }

  .gospel-view-header {
    padding: 30px 18px 12px 18px;
  }
  
  .gospel-view-title {
    font-size: 22px;
  }
  
  .gospel-readings-list {
    padding: 0 18px 18px 18px;
    gap: 10px;
  }
  
  .reading-card {
    padding: 14px 16px;
    border-radius: 14px;
  }
  
  .gospel-detail-content-wrapper {
    padding: 0 18px 160px 18px;
  }
  
  .reading-glass-card {
    padding: 18px;
    border-radius: 16px;
  }
  
  .reading-text {
    font-size: 14px;
    line-height: 1.6;
  }
  
  .custom-audio-player-container {
    padding: 10px 16px;
    bottom: 96px; /* Asegura posicionamiento arriba del menú inferior en móvil */
  }
  
  .custom-audio-player {
    padding: 6px 12px;
    gap: 10px;
    border-radius: 24px;
  }
}

/* =============================================================
   ESTILOS PREMIUM DE AUTORES Y BUSCADORES DE LIBROS
   ============================================================= */

/* Contenedor del Buscador (Glide Search Style) */
.search-bar-container {
  padding: 8px 24px;
  width: 100%;
  box-sizing: border-box;
}

.search-bar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0 14px;
  height: 44px;
  transition: var(--transition-smooth);
}

.light-theme .search-bar-wrapper {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.search-bar-wrapper:focus-within {
  border-color: var(--accent-light);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px rgba(165, 193, 220, 0.08);
}

.light-theme .search-bar-wrapper:focus-within {
  border-color: var(--accent-blue);
  background: #ffffff;
  box-shadow: 0 0 10px rgba(30, 64, 175, 0.05);
}

.search-icon {
  color: var(--text-secondary);
  font-size: 14px;
  margin-right: 10px;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-secondary);
}

/* Lista Grid/Fila de Autores */
.authors-grid-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 24px 24px 24px;
}

.author-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.author-item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(165, 193, 220, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.author-avatar-img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.light-theme .author-avatar-img {
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.author-item-name {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  flex-grow: 1;
}

/* Banner de Perfil de Autor (Vista 2) */
.author-profile-banner {
  width: 100%;
  padding: 48px 24px 24px 24px;
  background: linear-gradient(180deg, #1b202c 0%, #151924 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  box-sizing: border-box;
}

.light-theme .author-profile-banner {
  background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.author-profile-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.15) 100%);
  pointer-events: none;
}

.back-button-absolute {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 10;
}

.author-floating-profile {
  width: 78px;
  height: 78px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-card);
}

.light-theme .author-floating-profile {
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.author-profile-large-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-profile-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex-grow: 1;
  min-width: 0;
}

.author-profile-name {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

/* Lista de libros por autor */
.author-books-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 24px 24px 24px;
}

.book-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.book-item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(165, 193, 220, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.book-cover-thumbnail {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  transition: opacity 0.3s ease-in-out;
}

.light-theme .book-cover-thumbnail {
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.book-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex-grow: 1;
}

.book-card-title {
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.book-card-author {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
}

/* Vista de Detalle de Libro (View 3) */
#book-detail-view {
  overflow: hidden;
}

.book-detail-scroll-content {
  padding: 5px 24px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
  overflow-y: auto;
}

.book-detail-author-tag {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.book-detail-title-main {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

/* Portada Gigante Centrada */
.book-cover-large-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 10px 0;
}

.book-cover-large-shadow {
  width: 100%;
  max-width: 180px;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity 0.3s ease-in-out;
}

.light-theme .book-cover-large-shadow {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.movie-cover-large-shadow {
  width: 100%;
  max-width: 180px;
  height: 270px; /* Relación 2:3 para portada de película */
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity 0.3s ease-in-out;
}

.light-theme .movie-cover-large-shadow {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Barra de botones de acción de Libros */
.book-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.book-action-btn-primary {
  background: var(--accent-blue);
  border: none;
  color: #ffffff;
  padding: 0 24px;
  height: 44px;
  border-radius: 22px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
  flex-grow: 1;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.book-action-btn-primary:hover {
  background: var(--accent-light);
  color: var(--bg-main);
  transform: translateY(-1px);
}

.light-theme .book-action-btn-primary {
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
}

.light-theme .book-action-btn-primary:hover {
  background: var(--accent-light);
  color: #ffffff;
}

.book-action-circle-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--accent-light);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.book-action-circle-btn:hover {
  background: rgba(165, 193, 220, 0.1);
  border-color: rgba(165, 193, 220, 0.25);
  color: #ffffff;
  transform: scale(1.05);
}

.light-theme .book-action-circle-btn {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--accent-blue);
}

.light-theme .book-action-circle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--accent-blue);
}

/* Favorito activo */
.book-action-circle-btn.favorite-active {
  background: #ff3838;
  color: #ffffff;
  border-color: #ff3838;
  box-shadow: 0 0 10px rgba(255, 56, 56, 0.3);
}

/* Sinopsis Glassmorphic Card */
.book-synopsis-glass-card {
  background: rgba(34, 41, 56, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.light-theme .book-synopsis-glass-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.synopsis-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.synopsis-text {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: justify;
}

/* Metadatos técnicos */
.book-metadata-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  margin-top: 8px;
}

.metadata-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.metadata-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metadata-value {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Responsividad para Autores */
@media (max-width: 600px) {
  .authors-grid-list,
  .author-books-list {
    padding: 0 18px 18px 18px;
  }
  
  .book-detail-scroll-content {
    padding: 5px 18px 18px 18px;
  }
  
  .author-item-card,
  .book-item-card {
    padding: 10px 14px;
    border-radius: 14px;
  }
  
  .author-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
  }
  
  .book-cover-thumbnail {
    width: 44px;
    height: 44px;
    border-radius: 7px;
  }

  .author-profile-banner {
    padding: 40px 18px 18px 18px;
    gap: 16px;
  }
  
  .author-floating-profile {
    width: 68px;
    height: 68px;
    border-radius: 12px;
  }
  
  .author-profile-name {
    font-size: 20px;
  }

  .book-cover-large-shadow {
    max-width: 150px;
    height: 210px;
  }

  .movie-cover-large-shadow {
    max-width: 150px;
    height: 225px;
  }
  
  .book-action-btn-primary {
    font-size: 13.5px;
    padding: 0 16px;
  }
  
  .book-action-circle-btn {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  
  .book-synopsis-glass-card {
    padding: 16px;
    border-radius: 16px;
  }
}

/* Estilos para el visor de PDF integrado */
.pdf-iframe-container {
  flex: 1;
  width: 100%;
  height: 100%;
  background: #191e29;
  position: relative;
  overflow: hidden;
}

.light-theme .pdf-iframe-container {
  background: #f1f5f9;
}

/* =============================================================
   ESTILOS PREMIUM DEL SANTORAL (PWA STYLE)
   ============================================================= */

.saints-filter-section {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  width: 100%;
}

.saints-date-input-wrapper {
  margin: 8px 24px 0 24px;
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0 14px;
  height: 44px;
  transition: var(--transition-smooth);
}

.light-theme .saints-date-input-wrapper {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.saints-date-input-wrapper:focus-within {
  border-color: var(--accent-light);
  background: rgba(255, 255, 255, 0.08);
}

.light-theme .saints-date-input-wrapper:focus-within {
  border-color: var(--accent-blue);
  background: #ffffff;
}

.saints-date-picker-display {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.clear-date-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 10px;
  transition: var(--transition-smooth);
}

.clear-date-btn:hover {
  color: #ff3838;
}

.saints-day-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 14px;
  width: 100%;
}

.day-nav-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent-light);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.light-theme .day-nav-btn {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--accent-blue);
}

.day-nav-btn:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-light);
  transform: scale(1.05);
}

.day-nav-current {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-light);
  cursor: pointer;
  transition: var(--transition-smooth);
  border-bottom: 1.5px dashed var(--accent-light);
  padding-bottom: 2px;
}

.light-theme .day-nav-current {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.day-nav-current:hover {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}

.saints-list-date-label {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 12px 24px 8px 24px;
  text-align: left;
}

.saints-grid-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 24px 24px 24px;
}

.saint-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.saint-item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(165, 193, 220, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.saint-item-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex-grow: 1;
}

.saint-item-title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.saint-item-subtitle {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
}

.other-saint-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.light-theme .other-saint-badge {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.other-saint-badge:hover {
  background: rgba(165, 193, 220, 0.12);
  border-color: var(--accent-light);
  transform: translateY(-2px);
}

.light-theme .other-saint-badge:hover {
  background: rgba(30, 64, 175, 0.06);
  border-color: var(--accent-blue);
}

/* Custom styling overrides for Liturgia de las Horas template */
.liturgia-content-wrapper > div {
  background-color: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: var(--text-primary) !important;
}

.liturgia-content-wrapper h2,
.liturgia-content-wrapper h3,
.liturgia-content-wrapper h4 {
  color: var(--text-primary) !important;
  font-family: var(--font-title) !important;
  font-weight: 700 !important;
  text-align: center !important;
  margin-top: 24px !important;
  margin-bottom: 12px !important;
}

.liturgia-content-wrapper h2 {
  font-size: 24px !important;
  margin-top: 0 !important;
  margin-bottom: 20px !important;
}

.liturgia-content-wrapper h3 {
  font-size: 17px !important;
  color: var(--accent-light) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding-bottom: 8px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
}

.light-theme .liturgia-content-wrapper h3 {
  color: var(--accent-blue) !important;
}

.liturgia-content-wrapper h4 {
  font-size: 13.5px !important;
  font-style: italic !important;
  color: var(--text-secondary) !important;
  font-weight: 500 !important;
}

.liturgia-content-wrapper b {
  color: var(--accent-light) !important;
}

.light-theme .liturgia-content-wrapper b {
  color: var(--accent-blue) !important;
}

.liturgia-content-wrapper div {
  color: var(--text-primary) !important;
  line-height: 1.65 !important;
}

/* Glassmorphism styling blocks for antífonas and prayers */
.liturgia-content-wrapper > div > div {
  margin-bottom: 30px !important;
  padding-bottom: 20px !important;
}

/* Estandarización de las tarjetas en la pantalla Liturgia según la paleta de la app */

/* Tipo 1: Contenedor principal del CSV (transparente para heredar la tarjeta original) */
.liturgia-content-wrapper > div {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Tipo 2: Subtarjetas de antífonas (borde izquierdo de color azul litúrgico) */
.liturgia-content-wrapper div[style*="border-left"] {
  background: rgba(255, 255, 255, 0.03) !important;
  border-left: 4px solid var(--accent-blue) !important;
  border-color: var(--accent-blue) !important;
  border-radius: 8px !important;
}
.light-theme .liturgia-content-wrapper div[style*="border-left"] {
  background: rgba(0, 0, 0, 0.03) !important;
  border-left-color: var(--accent-blue) !important;
}

/* Tipo 3: Otras tarjetas y bloques (Lectura Breve, Oración Final, etc. con borde sutil de tarjeta) */
.liturgia-content-wrapper div[style*="border: 1px solid"],
.liturgia-content-wrapper div[style*="border:1px solid"],
.liturgia-content-wrapper div[style*="border-radius: 10px"],
.liturgia-content-wrapper div[style*="border-radius:10px"] {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid var(--border-card) !important;
  border-radius: 12px !important;
}
.light-theme .liturgia-content-wrapper div[style*="border: 1px solid"],
.light-theme .liturgia-content-wrapper div[style*="border:1px solid"],
.light-theme .liturgia-content-wrapper div[style*="border-radius: 10px"],
.light-theme .liturgia-content-wrapper div[style*="border-radius:10px"] {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: var(--border-card) !important;
}

/* Forzar que todos los textos internos hereden el color primario del tema */
.liturgia-content-wrapper p,
.liturgia-content-wrapper span,
.liturgia-content-wrapper li {
  color: var(--text-primary) !important;
}

.light-theme .liturgia-content-wrapper p,
.light-theme .liturgia-content-wrapper span,
.light-theme .liturgia-content-wrapper li {
  color: var(--text-primary) !important;
}

/* Light theme overrides for liturgy */
.light-theme .liturgia-content-wrapper h3 {
  border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

/* Custom styling overrides for Vía Crucis inline styled templates */
#viacrucis-station-content div,
#viacrucis-prayer-content div {
  color: var(--text-primary) !important;
  max-width: 600px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

#viacrucis-station-content div[style*="background"],
#viacrucis-prayer-content div[style*="background"] {
  background: transparent !important;
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: var(--text-primary) !important;
  width: auto !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

div.viacrucis-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-card) !important;
  border-radius: 16px !important;
  padding: 24px !important;
  margin-bottom: 16px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
  text-align: left !important;
}

#viacrucis-station-content h2,
#viacrucis-station-content h3,
#viacrucis-station-content h4,
#viacrucis-station-content p,
#viacrucis-station-content b,
#viacrucis-station-content span,
#viacrucis-prayer-content h2,
#viacrucis-prayer-content h3,
#viacrucis-prayer-content h4,
#viacrucis-prayer-content p,
#viacrucis-prayer-content b,
#viacrucis-prayer-content span {
  color: var(--text-primary) !important;
}

/* Sobrescribir para tema claro en Vía Crucis (Modo Light) */
.light-theme #viacrucis-station-content div[style*="background"],
.light-theme #viacrucis-prayer-content div[style*="background"] {
  background: transparent !important;
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: var(--text-primary) !important;
  width: auto !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.light-theme #viacrucis-station-content h2,
.light-theme #viacrucis-station-content h3,
.light-theme #viacrucis-station-content h4,
.light-theme #viacrucis-station-content p,
.light-theme #viacrucis-station-content b,
.light-theme #viacrucis-station-content span,
.light-theme #viacrucis-prayer-content h2,
.light-theme #viacrucis-prayer-content h3,
.light-theme #viacrucis-prayer-content h4,
.light-theme #viacrucis-prayer-content p,
.light-theme #viacrucis-prayer-content b,
.light-theme #viacrucis-prayer-content span {
  color: var(--text-primary) !important;
}

/* =============================================================
   ESTILOS PREMIUM BIBLIA 365
   ============================================================= */

.bible365-days-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 24px 24px 24px;
}

.bible365-day-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.bible365-day-card:hover {
  transform: translateY(-2px);
  border-color: rgba(165, 193, 220, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.bible365-day-thumbnail {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.light-theme .bible365-day-thumbnail {
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.bible365-day-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex-grow: 1;
}

.bible365-day-title {
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.bible365-day-subtitle {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
}

/* Ficha Detallada del Día */
.bible365-detail-header-card {
  display: flex;
  gap: 20px;
  align-items: center;
  background: rgba(34, 41, 56, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  text-align: left;
}

.light-theme .bible365-detail-header-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.bible365-detail-thumbnail {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  transition: opacity 0.3s ease-in-out;
}

.light-theme .bible365-detail-thumbnail {
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bible365-detail-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.bible365-detail-day-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.light-theme .bible365-detail-day-label {
  color: var(--accent-blue);
}

.bible365-detail-title {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

.bible365-detail-speaker {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-secondary);
}

/* Reproductor de Audio Custom Chrome-style Pill */
.chrome-audio-player-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.chrome-audio-player {
  display: flex;
  align-items: center;
  background: #1e2535;
  border-radius: 30px;
  padding: 8px 16px;
  width: 100%;
  max-width: 500px;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25), 0 0 10px rgba(165, 193, 220, 0.03);
  border: 1px solid rgba(165, 193, 220, 0.12);
}

.light-theme .chrome-audio-player {
  background: #e2e8f0;
  border-color: rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.chrome-player-btn {
  color: var(--accent-light);
  font-size: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  border-radius: 50%;
  background: none;
  border: none;
}

.chrome-player-btn:hover {
  background: rgba(165, 193, 220, 0.1);
  color: #ffffff;
}

.light-theme .chrome-player-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #334155;
}

.chrome-player-time {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
}

.chrome-player-progress-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
}

.chrome-player-progress-bar {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
}

.light-theme .chrome-player-progress-bar {
  background: rgba(0, 0, 0, 0.15);
}

.chrome-player-progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 6px rgba(165, 193, 220, 0.4);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.light-theme .chrome-player-progress-bar::-webkit-slider-thumb {
  background: var(--accent-blue);
  box-shadow: none;
}

.chrome-player-progress-bar::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  background: #ffffff;
  box-shadow: 0 0 10px rgba(165, 193, 220, 0.8);
}

/* Sección de Lecturas */
.bible365-readings-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  text-align: left;
}

.bible365-readings-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.bible365-readings-box {
  border-left: 4px solid var(--accent-light);
  padding: 4px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  align-self: flex-start;
}

.light-theme .bible365-readings-box {
  border-left-color: var(--accent-blue);
}

.bible365-reading-item {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-primary);
  font-weight: 500;
}

@media (max-width: 600px) {
  .bible365-days-list {
    padding: 0 18px 18px 18px;
  }
  .bible365-day-card {
    padding: 10px 14px;
    border-radius: 14px;
  }
  .bible365-detail-header-card {
    padding: 16px;
    border-radius: 16px;
    gap: 14px;
  }
  .bible365-detail-thumbnail {
    width: 70px;
    height: 70px;
    border-radius: 10px;
  }
  .bible365-detail-title {
    font-size: 17px;
  }
  .chrome-audio-player {
    padding: 6px 12px;
    gap: 8px;
  }
  .chrome-player-time {
    font-size: 11px;
  }
}

/* =============================================================
   ESTILOS PREMIUM ORACIONES (PRAYERS)
   ============================================================= */

.prayers-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(15px);
  z-index: 10;
  flex-shrink: 0;
  width: 100%;
}

.light-theme .prayers-view-header {
  background: var(--bg-main);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.prayers-header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.prayers-view-title {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 8px;
}

.prayers-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prayers-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0 12px;
  height: 38px;
  width: 150px;
  transition: var(--transition-smooth);
}

.prayers-search-wrapper:focus-within {
  width: 190px;
  border-color: var(--accent-light);
  background: rgba(255, 255, 255, 0.08);
}

.light-theme .prayers-search-wrapper {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .prayers-search-wrapper:focus-within {
  background: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(30, 64, 175, 0.05);
}

.prayers-search-input {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  outline: none;
  margin-left: 8px;
}

.prayers-search-input::placeholder {
  color: var(--text-secondary);
}

.prayers-filter-dropdown-wrapper {
  position: relative;
}

.prayers-filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 0 16px;
  height: 38px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.prayers-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-light);
}

.light-theme .prayers-filter-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .prayers-filter-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: var(--accent-blue);
}

.prayers-filter-dropdown {
  position: absolute;
  top: 46px;
  right: 0;
  background: #252e3f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  width: 220px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 280px;
  overflow-y: auto;
}

.prayers-filter-dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.light-theme .prayers-filter-dropdown {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.prayers-filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  text-align: left;
}

.prayers-filter-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.light-theme .prayers-filter-item {
  border-bottom-color: rgba(0, 0, 0, 0.03);
}

.light-theme .prayers-filter-item:hover {
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-primary);
}

.prayers-filter-item.active {
  color: var(--text-primary);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
}

.light-theme .prayers-filter-item.active {
  color: var(--accent-blue);
  background: rgba(0, 0, 0, 0.02);
}

/* Lista Agrupada */
.prayers-grouped-list {
  padding: 0 24px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.prayers-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prayers-group-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: left;
  margin-bottom: 4px;
}

.prayers-group-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prayer-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.prayer-item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(165, 193, 220, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.prayer-item-title {
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Pestañas de idioma (Español / Latín) */
.prayer-lang-tabs-container {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  padding: 12px 24px 8px 24px;
}

.prayer-lang-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 3px;
  gap: 4px;
}

.light-theme .prayer-lang-tabs {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

.prayer-lang-tab {
  padding: 6px 16px;
  border-radius: 17px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.prayer-lang-tab:hover {
  color: var(--text-primary);
}

.prayer-lang-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.light-theme .prayer-lang-tab.active {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Oraciones Content overrides para Light Mode */
.prayer-sheet-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  align-items: center;
}

.prayer-sheet-container > div {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  width: 100% !important;
}

.light-theme .prayer-sheet-container > div {
  background-color: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.light-theme .prayer-sheet-container h2 {
  color: #0f172a !important;
}

.light-theme .prayer-sheet-container b {
  color: #0f172a !important;
}

.light-theme .prayer-sheet-container div {
  color: #334155 !important;
}

.light-theme .prayer-sheet-container p {
  color: #334155 !important;
}

@media (max-width: 600px) {
  .prayers-view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
  }
  
  .prayers-header-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .prayers-search-wrapper {
    flex: 1;
    width: auto;
  }
  .prayers-search-wrapper:focus-within {
    width: auto;
    flex: 1.2;
  }
  
  .prayers-grouped-list {
    padding: 0 16px 16px 16px;
  }
  
  .prayer-item-card {
    padding: 12px 14px;
    border-radius: 14px;
  }
}

/* =============================================================
   ESTILOS PREMIUM BOTTOM NAVIGATION BAR & NEW OVERLAYS
   ============================================================= */

/* Floating Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 500px;
  height: 66px;
  background: rgba(19, 25, 36, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  z-index: 1005;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-theme .bottom-nav {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* Individual Navigation Items */
.nav-item {
  background: none;
  border: none;
  outline: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-secondary);
  opacity: 0.65;
  cursor: pointer;
  width: 70px;
  height: 52px;
  border-radius: 12px;
  font-family: var(--font-sans);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item i {
  font-size: 19px;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Hover State */
.nav-item:hover {
  opacity: 0.9;
  color: var(--text-primary);
}

.nav-item:hover i {
  transform: translateY(-2px);
}

/* Active State */
.nav-item.active {
  color: var(--accent-light);
  opacity: 1;
  font-weight: 700;
  position: relative;
}

.light-theme .nav-item.active {
  color: var(--accent-blue);
}

.nav-item.active i {
  transform: translateY(-2px) scale(1.05);
  text-shadow: 0 0 10px rgba(165, 193, 220, 0.3);
}

.light-theme .nav-item.active i {
  text-shadow: 0 0 10px rgba(30, 64, 175, 0.2);
}

/* Small indicator dot below active tab */
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0px;
  width: 4px;
  height: 4px;
  background-color: var(--accent-light);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-light);
}

.light-theme .nav-item.active::after {
  background-color: var(--accent-blue);
  box-shadow: 0 0 6px var(--accent-blue);
}

/* Safe Area Paddings to prevent content blocking */
.app-body.dashboard-body {
  padding-bottom: 96px !important;
}

.book-detail-scroll-content, 
.favorites-list-container,
.prayers-grouped-list-container,
.authors-grid-list,
.santos-grid-list,
.categories-grid-container,
.category-books-list-container,
.bible365-readings-box,
.movies-grid-list-container,
#movie-detail-scroll-content {
  padding-bottom: 96px !important;
}

#viacrucis-scroll-content {
  padding-bottom: 160px !important; /* Margen para no ser tapado por el reproductor flotante */
}

/* About Card Styling */
.about-card {
  padding: 8px 0;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.about-feature-box {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.light-theme .about-feature-box {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

/* =============================================================
   ESTILOS PREMIUM CONFIGURATION MODAL & FONT SCALING
   ============================================================= */

/* Modal overlay background (glassmorphic blur) */
.config-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.config-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Content Card (Mockup style) */
.config-modal-content {
  background: #1e1e1e; /* Dark charcoal */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  width: calc(100% - 32px);
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #ffffff;
}

.config-modal-overlay.open .config-modal-content {
  transform: scale(1);
}

/* Light Theme overrides for modal content */
.light-theme .config-modal-content {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  color: #0f172a;
}

/* Header Configuración */
.config-modal-title {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 24px;
  text-align: left;
}

/* Close button (X) */
.config-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.config-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(90deg);
}

.light-theme .config-modal-close {
  background: rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

.light-theme .config-modal-close:hover {
  background: rgba(0, 0, 0, 0.08);
}

/* Configuration Sections */
.config-section {
  margin-bottom: 28px;
  text-align: left;
}

.config-section:last-child {
  margin-bottom: 0;
}

.config-section-title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  color: #a5c1dc;
  margin-top: 0;
  margin-bottom: 12px;
}

.light-theme .config-section-title {
  color: #1e40af;
}

/* Text Size Slider Wrapper */
.config-slider-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.config-slider-label-min,
.config-slider-label-max {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-secondary);
  user-select: none;
}

/* Slider Track custom style (orange handle) */
.config-font-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #333333;
  border-radius: 3px;
  outline: none;
  transition: background 0.3s;
}

.light-theme .config-font-slider {
  background: #e2e8f0;
}

/* Slider Knob (Thumb) */
.config-font-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f59e0b; /* Vibrant Orange/Yellow */
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  cursor: pointer;
  transition: transform 0.15s, background-color 0.25s;
}

.config-font-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  background: #d97706;
}

.config-font-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  cursor: pointer;
  transition: transform 0.15s, background-color 0.25s;
}

.config-font-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  background: #d97706;
}

/* Text example preview container */
.config-font-preview {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  transition: font-size 0.15s ease;
}

.light-theme .config-font-preview {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

/* Visualization mode pill selector */
.config-mode-pill-container {
  display: flex;
  background: #2a2a2a;
  border-radius: 16px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.light-theme .config-mode-pill-container {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.04);
}

.config-mode-btn {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-secondary);
  padding: 12px 0;
  font-size: 18px;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.config-mode-btn:hover {
  color: #ffffff;
}

.light-theme .config-mode-btn:hover {
  color: #0f172a;
}

/* Active mode card styling (vibrant yellow/orange on dark) */
.config-mode-btn.active {
  background: #111111;
  color: #f59e0b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.light-theme .config-mode-btn.active {
  background: #ffffff;
  color: #2563eb; /* Blue accent for light theme */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.config-mode-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.8;
  margin: 4px 0 0 4px;
}

/* =============================================================
   DETAIL SCREENS FONT SCALING RULES
   ============================================================= */

/* Base container default scale custom property */
body {
  --detail-font-scale: 1.0;
  --reading-font-family: var(--font-sans);
  --reading-line-height: 1.6;
  --reading-text-align: left;
}

/* Base headers scaling for detailed views */
#gospel-detail-view h2,
#liturgia-content h2,
#saint-detail-view h2,
#bible365-detail-view h2,
#prayers-detail-view h2,
#book-detail-view h2 {
  font-size: calc(23px * var(--detail-font-scale, 1.0)) !important;
  line-height: 1.3 !important;
  font-family: var(--reading-font-family) !important;
}

#gospel-detail-view h3,
#liturgia-content h3,
#saint-detail-view h3,
#bible365-detail-view h3,
#prayers-detail-view h3,
#book-detail-view h3 {
  font-size: calc(18px * var(--detail-font-scale, 1.0)) !important;
  line-height: 1.4 !important;
  font-family: var(--reading-font-family) !important;
}

/* Base detailed text block scaling */
#gospel-detail-text,
#gospel-detail-text p,
#gospel-detail-text span,
#gospel-detail-footer,
#liturgia-content div,
#liturgia-content p,
#liturgia-content span,
#saint-detail-history,
#saint-detail-history p,
#saint-detail-biography,
#saint-detail-biography p,
#saint-detail-legacy,
#saint-detail-legacy p,
#bible365-detail-readings,
#bible365-detail-readings div,
#bible365-detail-readings p,
#prayer-detail-content,
#prayer-detail-content div,
#prayer-detail-content p,
#prayer-detail-content span,
#book-synopsis-text,
#book-synopsis-text p {
  font-size: calc(14.5px * var(--detail-font-scale, 1.0)) !important;
  font-family: var(--reading-font-family) !important;
  line-height: var(--reading-line-height, 1.6) !important;
  text-align: var(--reading-text-align, left) !important;
}

/* Style the button groups and buttons in the config modal */
.config-btn-group {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.config-option-btn {
  flex: 1;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.config-option-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.config-option-btn.active {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: #111827; /* Dark text for contrast against white/silver active button */
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.08);
}

.light-theme .config-option-btn {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.07);
  color: var(--text-secondary);
}

.light-theme .config-option-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
  border-color: rgba(0, 0, 0, 0.12);
}

.light-theme .config-option-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.15);
}

/* Styling for Reminder switches and selects */
.config-reminder-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.config-reminder-select:hover,
.config-reminder-select:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.light-theme .config-reminder-select {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

.light-theme .config-reminder-select:hover,
.light-theme .config-reminder-select:focus {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
}

/* Custom switch slider styling */
.config-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.config-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.config-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-card);
  transition: .3s;
  border-radius: 24px;
}

.config-switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .3s;
  border-radius: 50%;
}

.config-switch input:checked + .config-switch-slider {
  background-color: var(--accent-light);
  border-color: var(--accent-light);
}

.config-switch input:checked + .config-switch-slider:before {
  transform: translateX(20px);
  background-color: #111827;
}

.light-theme .config-switch-slider {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .config-switch-slider:before {
  background-color: var(--text-secondary);
}

.light-theme .config-switch input:checked + .config-switch-slider {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.light-theme .config-switch input:checked + .config-switch-slider:before {
  background-color: #ffffff;
}

/* =============================================================
   ESTILOS PREMIUM LOGIN OVERLAY & LOGOUT BUTTON
   ============================================================= */

.login-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 15, 24, 0.7);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.login-modal-content {
  background: #111827; /* Dark slate */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  width: calc(100% - 32px);
  max-width: 380px;
  padding: 40px 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  text-align: center;
  color: #ffffff;
  transform: scale(0.92);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.login-modal-overlay.open .login-modal-content {
  transform: scale(1);
}

/* Light theme overrides for login modal */
.light-theme .login-modal-content {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
  color: #0f172a;
}

/* Logo Area */
.login-logo-wrapper {
  margin-bottom: 32px;
}

.login-logo-img {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  margin: 0 auto 16px auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.login-title {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.5px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 0 0;
  opacity: 0.8;
}

/* Inputs Form */
.login-input-group {
  margin-bottom: 24px;
  text-align: left;
}

.login-input-label {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  color: #a5c1dc;
  display: block;
  margin-bottom: 8px;
}

.light-theme .login-input-label {
  color: #1e40af;
}

.login-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-secondary);
  font-size: 16px;
  opacity: 0.6;
}

.login-input-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 14px 14px 44px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: all 0.25s ease;
}

.login-input-field:focus {
  border-color: #f59e0b;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.light-theme .login-input-field {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

.light-theme .login-input-field:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.1);
}

/* Submit Button */
.login-submit-btn {
  width: 100%;
  background: #f59e0b;
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 14px 0;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.login-submit-btn:hover {
  background: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

.light-theme .login-submit-btn {
  background: #2563eb;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.2);
}

.light-theme .login-submit-btn:hover {
  background: #1d4ed8;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

/* Step Instruction & Back Link */
.login-step-instruction {
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: center;
}

.login-back-link {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.login-back-link:hover {
  color: #fb923c;
}

.light-theme .login-back-link {
  color: #3b82f6;
}

.light-theme .login-back-link:hover {
  color: #2563eb;
}

/* Logout Button inside configuration panel */
.config-logout-section {
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding-top: 20px;
}

.light-theme .config-logout-section {
  border-top-color: rgba(0, 0, 0, 0.06) !important;
}

.config-logout-btn {
  width: 100%;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-radius: 12px;
  padding: 12px 0;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.config-logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.light-theme .config-logout-btn {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.light-theme .config-logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #b91c1c;
}

/* VÍA CRUCIS DROPDOWN STYLES */
.viacrucis-dropdown-item {
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-align: left;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
}

.viacrucis-dropdown-item:last-child {
  border-bottom: none;
}

.viacrucis-dropdown-item:hover {
  background: rgba(165, 193, 220, 0.08);
  color: var(--text-primary);
}

.viacrucis-dropdown-item.active {
  background: rgba(94, 129, 172, 0.15);
  color: var(--accent-light);
  font-weight: 600;
}

.light-theme .viacrucis-dropdown-menu {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.light-theme .viacrucis-dropdown-item {
  color: #334155;
  border-bottom-color: rgba(0, 0, 0, 0.04);
}

.light-theme .viacrucis-dropdown-item:hover {
  background: rgba(30, 64, 175, 0.04);
  color: #0f172a;
}

.light-theme .viacrucis-dropdown-item.active {
  background: rgba(30, 64, 175, 0.08);
  color: var(--accent-blue);
}

/* ========================================== */
/* BIBLIOTECA OVERLAY STYLES                  */
/* ========================================== */

.biblioteca-header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding: 0 16px;
}

.biblioteca-badge {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.biblioteca-badge:hover {
  transform: scale(1.05) rotate(-3deg);
  border-color: var(--accent-light);
}

.light-theme .biblioteca-badge {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .biblioteca-badge:hover {
  border-color: var(--accent-blue);
}

.biblioteca-header-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 24px;
  color: var(--text-primary);
}

.biblioteca-header-subtitle {
  margin: 4px 0 0 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.biblioteca-controls-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding: 0 16px;
}

.biblioteca-search-container input:focus {
  border-color: var(--accent-light);
  background: rgba(255, 255, 255, 0.04);
}

.light-theme .biblioteca-search-container input:focus {
  border-color: var(--accent-blue);
  background: #ffffff;
}

.biblioteca-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.biblioteca-dropdown-btn:hover {
  border-color: var(--accent-light);
}

.light-theme .biblioteca-dropdown-btn:hover {
  border-color: var(--accent-blue);
}

.biblioteca-category-section {
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 24px;
}

.light-theme .biblioteca-category-section {
  border-bottom-color: rgba(0, 0, 0, 0.04);
}

.biblioteca-category-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.biblioteca-category-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 16px 0;
  letter-spacing: -0.3px;
}

.biblioteca-books-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.biblioteca-mini-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px;
  color: var(--text-secondary);
  font-size: 13.5px;
}

/* PAGINATOR DESIGN */
.biblioteca-paginator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  user-select: none;
}

.pag-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
}

.pag-btn:hover:not(:disabled) {
  border-color: var(--accent-light);
  transform: translateY(-1px);
}

.light-theme .pag-btn:hover:not(:disabled) {
  border-color: var(--accent-blue);
}

.pag-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pag-pill {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
}

.pag-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.light-theme .pag-pill:hover {
  background: rgba(0, 0, 0, 0.03);
}

.pag-pill.active {
  background: #2b2d3c;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.light-theme .pag-pill.active {
  background: #e2e8f0;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.04);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.pag-ellipsis {
  width: 30px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

/* =============================================================
   PANTALLA DE CATEGORÍAS (GLIDE PREMIUM GRID)
   ============================================================= */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  justify-content: center;
  max-width: 430px;
  width: 90%;
  margin: 0 auto;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.25s ease, 
              border-color 0.25s ease;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-light);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 0 10px rgba(99, 102, 241, 0.15);
}

.category-card-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              border-color 0.25s ease, 
              background-color 0.25s ease,
              box-shadow 0.25s ease;
}

.category-card:hover .category-card-icon-wrapper {
  transform: scale(1.08);
  border-color: var(--accent-light);
  background: rgba(94, 129, 172, 0.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 15px rgba(165, 193, 220, 0.15);
}

.category-card-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 0 3px rgba(255, 255, 255, 0.1));
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover .category-card-icon {
  transform: scale(1.05);
}

.category-card-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  word-break: break-word;
}

.category-detail-badge {
  background: var(--bg-card);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-card);
}

.category-detail-badge img {
  filter: brightness(0) invert(1); /* Ensure it renders white in circular badge too */
}

/* Light Theme support */
.light-theme .category-card-icon-wrapper {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.light-theme .category-card:hover .category-card-icon-wrapper {
  border-color: var(--accent-blue);
  background: rgba(30, 64, 175, 0.04);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1), 0 0 12px rgba(30, 64, 175, 0.1);
}

.light-theme .category-card-icon,
.light-theme .category-detail-badge img {
  filter: brightness(0) invert(0) opacity(0.85); /* Render dark in light mode */
}


/* =============================================================
   DEVOCIONARIO PREMIUM — THUMBNAIL GRID
   ============================================================= */

/* Grupo de categoría */
.devoc-category-group {
  margin-bottom: 32px;
}

.devoc-category-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 14px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  letter-spacing: -0.2px;
}

.light-theme .devoc-category-title {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

/* Grid de thumbnails — 3 columnas por defecto */
.devoc-thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* Tarjeta thumbnail individual */
.devoc-thumb-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.22s ease,
              border-color 0.22s ease;
  display: flex;
  flex-direction: column;
}

.devoc-thumb-card:hover,
.devoc-thumb-card:active {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.18), 0 2px 8px rgba(0, 0, 0, 0.3);
  border-color: rgba(212, 175, 55, 0.35);
}

/* Imagen del thumbnail */
.devoc-thumb-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(30, 40, 60, 0.6));
  flex-shrink: 0;
}

.devoc-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.devoc-thumb-card:hover .devoc-thumb-img {
  transform: scale(1.04);
}

/* Placeholder cuando no hay imagen */
.devoc-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.07), rgba(30, 40, 60, 0.5));
  color: rgba(212, 175, 55, 0.5);
  font-size: 36px;
}

/* Área de texto debajo de la imagen */
.devoc-thumb-info {
  padding: 10px 10px 12px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.devoc-thumb-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

/* Estado vacío del devocionario */
.devoc-empty-state {
  text-align: center;
  padding: 60px 40px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px dashed var(--border-card);
}

.devoc-empty-state i {
  font-size: 32px;
  margin-bottom: 14px;
  color: rgba(212, 175, 55, 0.4);
}

/* Items del dropdown de filtro del devocionario */
.devoc-filter-item {
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
  margin: 2px 6px;
}

.devoc-filter-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.devoc-filter-item.active {
  background: rgba(212, 175, 55, 0.15);
  color: #D4AF37;
  font-weight: 600;
}

.light-theme .devoc-filter-item.active {
  background: rgba(212, 175, 55, 0.12);
  color: #8B6914;
}

/* Safe area padding for devocionario scroll container */
#devocionario-scroll-content {
  padding-bottom: 110px !important;
}

/* Responsive — 2 columnas en móvil */
@media (max-width: 600px) {
  .devoc-thumbnail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .devoc-thumb-title {
    font-size: 11px;
  }

  .devoc-category-title {
    font-size: 16px;
  }
}

/* =============================================================
   ESTILOS PREMIUM SECCIÓN PELÍCULAS
   ============================================================= */

/* Grilla de películas */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
  padding: 8px 0 24px 0;
}

/* Tarjeta individual de película */
.movie-card {
  position: relative;
  display: block;
  line-height: 0;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transform: scale(1);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.movie-card:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: rgba(165, 193, 220, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 15px rgba(165, 193, 220, 0.15);
}

.light-theme .movie-card {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.06);
}

.light-theme .movie-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12), 0 0 12px rgba(30, 64, 175, 0.1);
}

.movie-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.movie-card:hover img {
  transform: scale(1.06);
}

.movie-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.75));
  pointer-events: none;
  opacity: 0.8;
  transition: opacity var(--transition-smooth);
}

.movie-card:hover .movie-card-overlay {
  opacity: 1;
}

/* Ajustes responsivos para grilla */
@media (max-width: 600px) {
  .movies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* =============================================================
   ESTILOS PREMIUM SECCIÓN VIDEOS
   ============================================================= */

/* Ocultar barra de desplazamiento de los chips */
.videos-categories-chips::-webkit-scrollbar {
  display: none;
}

.category-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.category-chip:hover {
  background: rgba(165, 193, 220, 0.08);
  color: var(--text-primary);
  border-color: rgba(165, 193, 220, 0.2);
}

.category-chip.active {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-light);
  box-shadow: 0 4px 12px rgba(94, 129, 172, 0.25);
}

.light-theme .category-chip.active {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

/* Grilla de tarjetas de Video */
.video-grid-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-grid-card:hover {
  transform: translateY(-3px);
  border-color: rgba(165, 193, 220, 0.25);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35), 0 0 15px rgba(165, 193, 220, 0.08);
}

.light-theme .video-grid-card:hover {
  border-color: rgba(30, 64, 175, 0.15);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06), 0 0 15px rgba(30, 64, 175, 0.04);
}

.video-thumbnail-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
  overflow: hidden;
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-grid-card:hover .video-thumbnail {
  transform: scale(1.05);
}

.video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition-smooth);
}

.video-grid-card:hover .video-play-overlay {
  opacity: 1;
}

.video-play-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transform: scale(0.85);
  transition: var(--transition-smooth);
}

.video-grid-card:hover .video-play-icon {
  transform: scale(1);
}

.video-info-container {
  padding: 10px 12px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.video-grid-title {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.video-grid-meta {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =============================================================
   ESTILOS PREMIUM SECCIÓN SERIES (GLIDEAPP CAROUSEL)
   ============================================================= */

.series-row-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.series-row-title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
  margin: 0;
  text-transform: capitalize;
}

.series-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 12px 4px;
  margin: 0 -4px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}

.series-carousel::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.series-card {
  width: 140px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              border-color 0.25s ease, 
              box-shadow 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.series-card:hover {
  transform: translateY(-4px);
  border-color: rgba(165, 193, 220, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 15px rgba(165, 193, 220, 0.05);
}

.light-theme .series-card:hover {
  border-color: rgba(30, 64, 175, 0.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05), 0 0 12px rgba(30, 64, 175, 0.03);
}

.series-card-thumbnail-container {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  position: relative;
  background: #000;
}

.series-card-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.series-card:hover .series-card-thumbnail {
  transform: scale(1.05);
}

.series-card-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}

.series-card:hover .series-card-play-overlay {
  opacity: 1;
}

.series-card-play-icon {
  width: 36px;
  height: 36px;
  background: #ffffff;
  color: #000000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.series-card:hover .series-card-play-icon {
  transform: scale(1);
}

.series-card-info {
  padding: 8px 10px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.series-card-meta {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.series-card-title {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  min-height: 34px;
}

/* =============================================================
   12. ESTILOS DEL MÓDULO DE AUDIOS (PWA PREMIUM)
   ============================================================= */

.audio-group-container {
  margin-bottom: 32px;
  text-align: left;
}

.audio-group-title {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 16px 0;
  border-left: 3px solid var(--accent-light);
  padding-left: 10px;
}

.audios-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audio-row {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  cursor: pointer;
  transition: transform var(--transition-smooth), background-color var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.audio-row:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(165, 193, 220, 0.2);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.light-theme .audio-row {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.06);
}

.light-theme .audio-row:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.audio-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
  margin-right: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: var(--transition-smooth);
}

.light-theme .audio-icon-wrapper {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.03);
  transition: var(--transition-smooth);
}

.audio-row:hover .audio-icon-wrapper {
  background: rgba(165, 193, 220, 0.12);
  border-color: rgba(165, 193, 220, 0.25);
  color: var(--accent-light);
}

.light-theme .audio-row:hover .audio-icon-wrapper {
  background: rgba(30, 64, 175, 0.08);
  border-color: rgba(30, 64, 175, 0.15);
  color: var(--accent-blue);
}

.audio-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.audio-row-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-row-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-arrow-wrapper {
  color: var(--text-secondary);
  font-size: 12px;
  margin-left: 12px;
  opacity: 0.6;
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.audio-row:hover .audio-arrow-wrapper {
  opacity: 0.95;
  transform: translateX(2px);
}

/* Paginación de Audios */
.audio-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.audio-pag-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.audio-pag-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-light);
  color: var(--accent-light);
}

.audio-pag-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
}

.audio-pag-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.light-theme .audio-pag-btn {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

.light-theme .audio-pag-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.06);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.light-theme .audio-pag-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
}

/* Reproductor de Audio Detalle */
.audio-player-controls {
  background: rgba(30, 37, 53, 0.4) !important;
  border: 1px solid rgba(165, 193, 220, 0.12) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 15px rgba(165, 193, 220, 0.04) !important;
}

.audio-player-controls input[type="range"] {
  background: rgba(255, 255, 255, 0.1);
  accent-color: var(--accent-light);
}

.light-theme .audio-player-controls {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06) !important;
}

.light-theme .audio-player-controls input[type="range"] {
  background: rgba(0, 0, 0, 0.08);
  accent-color: var(--accent-blue);
}

/* Carruseles de Audios */
.audio-carousel-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.audio-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 12px 4px;
  margin: 0 -4px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.audio-carousel::-webkit-scrollbar {
  display: none;
}

.audio-card {
  width: 135px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.audio-card:hover {
  transform: translateY(-4px);
  border-color: rgba(165, 193, 220, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 15px rgba(165, 193, 220, 0.05);
}

.light-theme .audio-card {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.06);
}

.light-theme .audio-card:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(30, 64, 175, 0.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05), 0 0 12px rgba(30, 64, 175, 0.03);
}

.audio-card-cover-container {
  width: 100%;
  aspect-ratio: 1/1;
  position: relative;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.light-theme .audio-card-cover-container {
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.9), rgba(226, 232, 240, 0.9));
  border-bottom-color: rgba(0, 0, 0, 0.04);
}

.audio-card-cover-icon {
  font-size: 36px;
  color: var(--accent-light);
  opacity: 0.8;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.light-theme .audio-card-cover-icon {
  color: var(--accent-blue);
}

.audio-card:hover .audio-card-cover-icon {
  transform: scale(1.1);
  opacity: 1;
}

.audio-card-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.audio-card:hover .audio-card-play-overlay {
  opacity: 1;
}

.audio-card-play-icon {
  width: 38px;
  height: 38px;
  background: var(--accent-blue);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transform: scale(0.85);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.audio-card:hover .audio-card-play-icon {
  transform: scale(1);
}

.audio-card-info {
  padding: 6px 10px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.audio-card-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 32px;
}

.audio-card-meta {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
}

/* Carruseles de Videos */
.video-carousel-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.video-carousel-title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  padding: 0 4px;
}

.video-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 12px 4px;
  margin: 0 -4px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.video-carousel::-webkit-scrollbar {
  display: none;
}

/* Tarjeta de Video en Carrusel */
.video-carousel-card {
  width: 140px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.video-carousel-card:hover {
  transform: translateY(-4px);
  border-color: rgba(165, 193, 220, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 15px rgba(165, 193, 220, 0.05);
}

.light-theme .video-carousel-card {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.06);
}

.light-theme .video-carousel-card:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(30, 64, 175, 0.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05), 0 0 12px rgba(30, 64, 175, 0.03);
}

.video-carousel-thumbnail-container {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  background: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.video-carousel-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-carousel-card:hover .video-carousel-thumbnail {
  transform: scale(1.05);
}

.video-carousel-info {
  padding: 6px 10px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.video-carousel-card-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 32px;
}

.video-carousel-card-meta {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
}

/* Playlist del Reproductor de Video */
.video-playlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.video-playlist-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.05);
}

.video-playlist-item.active {
  background: rgba(165, 193, 220, 0.1);
  border-color: rgba(165, 193, 220, 0.2);
}

.light-theme .video-playlist-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.02);
}

.light-theme .video-playlist-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.light-theme .video-playlist-item.active {
  background: rgba(30, 64, 175, 0.08);
  border-color: rgba(30, 64, 175, 0.15);
}

.video-playlist-item-thumb {
  width: 60px;
  height: 34px;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  position: relative;
  flex-shrink: 0;
}

.video-playlist-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-playlist-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.video-playlist-item-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-playlist-item-meta {
  font-size: 10px;
  color: var(--text-secondary);
}

/* Reproductor Premium de Música */
.music-player-cover-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px 0 24px 0;
}

.music-player-cover {
  width: 140px;
  height: 140px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  transition: transform 0.3s ease;
}

.light-theme .music-player-cover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(241, 245, 249, 0.9));
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.music-player-cover i {
  font-size: 48px;
  color: var(--accent-light);
  transition: transform 0.3s ease;
}

.light-theme .music-player-cover i {
  color: var(--accent-blue);
}

.music-player-cover.playing i {
  animation: music-pulse 1.8s infinite ease-in-out;
}

@keyframes music-pulse {
  0% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 10px rgba(165, 193, 220, 0.5)); }
  100% { transform: scale(1); opacity: 0.85; }
}

.light-theme .music-player-cover.playing i {
  animation: music-pulse-light 1.8s infinite ease-in-out;
}

@keyframes music-pulse-light {
  0% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 10px rgba(30, 64, 175, 0.3)); }
  100% { transform: scale(1); opacity: 0.85; }
}

.music-player-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}

.music-control-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--accent-light); /* Accented icon color */
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 15px;
}

.music-control-btn:hover {
  background: rgba(165, 193, 220, 0.1);
  border-color: rgba(165, 193, 220, 0.25);
  color: #ffffff;
  transform: scale(1.05);
}

.light-theme .music-control-btn {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
  color: var(--accent-blue);
}

.light-theme .music-control-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--accent-blue);
}

.music-play-btn {
  background: var(--accent-blue) !important;
  border: none !important;
  width: 56px;
  height: 56px;
  color: white !important;
  font-size: 18px;
  box-shadow: 0 4px 15px rgba(94, 129, 172, 0.4) !important; /* Accented dark theme shadow */
}

.music-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(94, 129, 172, 0.6) !important;
}

.light-theme .music-play-btn {
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3) !important;
}

.light-theme .music-play-btn:hover {
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.45) !important;
}

/* Modificaciones para el panel deslizable de la Playlist */
#music-player-full-view {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.65s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 96px; /* Deja espacio para el encabezado de la playlist colapsada */
}

/* Fixed height for audio/video headers to match the 144px layout height calculation exactly */
#audio-detail-view .gospel-view-header,
#videos-player-view .gospel-view-header {
  height: 80px;
  padding: 40px 24px 0 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 130 !important;
}

#audio-detail-view.playlist-expanded #music-player-full-view {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
}

/* Barra del Mini-Reproductor Superior */
.music-player-mini-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(165, 193, 220, 0.12); /* Accented bottom border in dark mode */
  background: #111521;
  position: absolute;
  top: 80px; /* Justo debajo del botón Volver */
  left: 0;
  right: 0;
  z-index: 120; /* Raised z-index to stay above the playlist sheet (z-index: 100) */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.65s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.light-theme .music-player-mini-bar {
  background: #ffffff;
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

#audio-detail-view.playlist-expanded .music-player-mini-bar {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#audio-detail-overlay.open {
  z-index: 1100;
}

/* Panel Bottom Sheet / Playlist deslizable */
#music-playlist-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(100% - 144px); /* Deja libre el botón volver + la mini-barra superior */
  background: #181d2b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px 24px 0 0;
  transform: translateY(calc(100% - 64px)); /* En estado colapsado solo muestra el encabezado */
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
}

.light-theme #music-playlist-sheet {
  background: #ffffff;
  border-top-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.06);
}

#audio-detail-view.playlist-expanded #music-playlist-sheet {
  transform: translateY(0);
}

#video-player-full-view {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition: opacity 0.65s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.65s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.65s step-start;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 96px;
}

#videos-player-view.playlist-expanded #video-player-full-view {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  visibility: hidden;
  transition: opacity 0.65s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.65s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.65s step-end;
}

/* Evitar que el reproductor de video acelerado por hardware se superponga o traspase el overlay */
#videos-player-view.playlist-expanded #videos-html5-player {
  transform: scale(0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.65s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.65s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.65s step-end;
}

#videos-html5-player {
  transition: transform 0.65s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.65s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.65s step-start;
}

#videos-player-view.playlist-expanded .music-player-mini-bar {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#videos-overlay.player-open {
  z-index: 1100;
}

#video-playlist-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(100% - 144px);
  background: #181d2b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px 24px 0 0;
  transform: translateY(calc(100% - 64px));
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
}

.light-theme #video-playlist-sheet {
  background: #ffffff;
  border-top-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.06);
}

#videos-player-view.playlist-expanded #video-playlist-sheet {
  transform: translateY(0);
}

#videos-player-view.playlist-expanded #video-playlist-sheet .playlist-arrow-icon,
#audio-detail-view.playlist-expanded #music-playlist-sheet .playlist-arrow-icon {
  transform: rotate(180deg);
}

.playlist-drag-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  margin: 10px auto 2px auto;
  cursor: pointer;
  flex-shrink: 0;
}

.light-theme .playlist-drag-handle {
  background: rgba(0, 0, 0, 0.15);
}

.music-playlist-title {
  font-family: var(--font-title);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-playlist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  padding: 0 20px 80px 20px;
  -webkit-overflow-scrolling: touch;
}

.music-playlist-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.music-playlist-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.light-theme .music-playlist-item {
  background: rgba(0, 0, 0, 0.01);
  border-color: rgba(0, 0, 0, 0.04);
}

.light-theme .music-playlist-item:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.music-playlist-item.active {
  background: rgba(30, 64, 175, 0.15);
  border-color: rgba(30, 64, 175, 0.3);
}

.light-theme .music-playlist-item.active {
  background: rgba(30, 64, 175, 0.08);
  border-color: rgba(30, 64, 175, 0.2);
}

.music-playlist-item-icon {
  font-size: 13px;
  color: var(--text-secondary);
  margin-right: 12px;
  width: 16px;
  text-align: center;
}

.music-playlist-item.active .music-playlist-item-icon {
  color: var(--accent-light);
}

.light-theme .music-playlist-item.active .music-playlist-item-icon {
  color: var(--accent-blue);
}

.music-playlist-item-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.music-playlist-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-playlist-item.active .music-playlist-item-title {
  font-weight: 600;
  color: var(--accent-light);
}

.light-theme .music-playlist-item.active .music-playlist-item-title {
  color: var(--accent-blue);
}

.music-playlist-item-speaker {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =============================================================
   ESTILOS DE CARRUSEL DE LIBROS POR AUTOR
   ============================================================= */

.author-section-block {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  padding-bottom: 20px;
  margin-bottom: 20px;
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.author-section-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.light-theme .author-section-block {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.light-theme .author-section-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.author-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.author-avatar-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent-light);
  flex-shrink: 0;
  box-shadow: none;
}

.light-theme .author-avatar-small {
  border-color: var(--accent-blue);
  box-shadow: none;
}

.author-section-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.books-horizontal-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

/* Ocultar scrollbar para Chrome, Safari y Opera */
.books-horizontal-carousel::-webkit-scrollbar {
  display: none;
}

.carousel-book-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-book-card:hover {
  transform: translateY(-4px);
}

.carousel-book-cover {
  width: 100px;
  height: 140px;
  border-radius: 8px;
  object-fit: cover;
  border: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.02);
  transition: opacity 0.3s ease-in-out;
}

.light-theme .carousel-book-cover {
  border: none;
  box-shadow: none;
  background: rgba(0, 0, 0, 0.02);
}

.carousel-book-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-primary);
  line-height: 1.35;
  width: 100%;
}

/* -------------------------------------------------------------
   PANTALLA DE IGLESIAS & MAPAS (GLIDE GLOW PREMIUM)
   ------------------------------------------------------------- */

/* Contenedor de Chips de Radio de Búsqueda */
.radius-chips-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 12px 0;
  scrollbar-width: none; /* Firefox */
}
.radius-chips-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}
.radius-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}
.radius-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
.radius-chip.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Modificación de Tema Claro para Chips */
.light-theme .radius-chip {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text-secondary);
}
.light-theme .radius-chip:hover {
  background: rgba(0, 0, 0, 0.06);
}
.light-theme .radius-chip.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
}

/* ── Barra de filtro de tiempo de viaje ── */
.travel-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 10px 0;
  overflow: hidden;
}

/* Toggle de modo de transporte (pill con dos botones) */
.travel-mode-toggle {
  display: flex;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 3px;
  gap: 2px;
}
.travel-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 18px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.travel-mode-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}
.travel-mode-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* Divisor visual entre modo y chips de tiempo */
.travel-filter-divider {
  flex-shrink: 0;
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
}

/* Tema claro: toggle de modo */
.light-theme .travel-mode-toggle {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}
.light-theme .travel-mode-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}
.light-theme .travel-mode-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
}
.light-theme .travel-filter-divider {
  background: rgba(0, 0, 0, 0.1);
}

/* Badge de tiempo de viaje en el popup */
.popup-travel-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  white-space: nowrap;
}
.light-theme .popup-travel-badge {
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent-blue);
}


/* Contenedor del Mapa Leaflet */
#churches-map {
  width: 100%;
  height: 100%;
  background: #131924; /* Color de fondo mientras carga */
  z-index: 1;
}

/* Ajustes de Controles de Leaflet */
.leaflet-control-container .leaflet-routing-container,
.leaflet-control-container .leaflet-bar {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background-color: var(--bg-card) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
  border-radius: 8px !important;
  overflow: hidden;
}
.leaflet-bar a {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.leaflet-bar a:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
}
.leaflet-control-attribution {
  background: rgba(19, 25, 36, 0.7) !important;
  color: var(--text-secondary) !important;
  font-size: 9px !important;
  backdrop-filter: blur(4px);
}

/* Marcador Personalizado de Iglesia */
.custom-leaflet-marker {
  background: none !important;
  border: none !important;
}
.custom-church-marker {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  position: relative;
}
.custom-church-marker i {
  color: #ffffff;
  font-size: 14px;
  transform: rotate(45deg); /* Compensa la rotación del pin */
}
.marker-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: rgba(234, 88, 12, 0.4);
  transform: rotate(45deg);
  animation: marker-pulse-ring 1.8s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
  z-index: -1;
}
@keyframes marker-pulse-ring {
  0% {
    transform: scale(0.95) rotate(45deg);
    opacity: 0.8;
  }
  100% {
    transform: scale(3.2) rotate(45deg);
    opacity: 0;
  }
}

/* Marcador Personalizado de Usuario (GPS) */
.custom-leaflet-user-marker {
  background: none !important;
  border: none !important;
}
.custom-user-marker {
  width: 24px;
  height: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-marker-dot {
  width: 12px;
  height: 12px;
  background: #3b82f6;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 2;
}
.user-marker-pulse {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.4);
  animation: user-pulse-ring 2s infinite;
  z-index: 1;
}
@keyframes user-pulse-ring {
  0% {
    transform: scale(0.5);
    opacity: 0.9;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* Panel Deslizable de Detalle de Iglesia */
.sliding-popup-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(34, 41, 56, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px 24px 0 0;
  padding: 16px 24px 96px 24px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.sliding-popup-panel.open {
  transform: translateY(0);
}

/* Tema Claro para Panel Deslizable */
.light-theme .sliding-popup-panel {
  background: rgba(255, 255, 255, 0.95);
  border-top-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.1);
}

/* Tirador de Arrastre */
.popup-drag-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 0 auto 16px auto;
}
.light-theme .popup-drag-handle {
  background: rgba(0, 0, 0, 0.15);
}

/* Contenido del Panel */
.popup-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.popup-title {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.popup-address {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}
.popup-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.popup-distance-badge {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.light-theme .popup-distance-badge {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.15);
  color: #2563eb;
}
.popup-diocesis-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-family: var(--font-sans);
}
.light-theme .popup-diocesis-badge {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

/* Botón Navegar en Google Maps */
.popup-navigate-button {
  margin-top: 16px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border: none;
  border-radius: 14px;
  color: #ffffff;
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: var(--transition-smooth);
}
.popup-navigate-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}
.popup-navigate-button:active {
  transform: translateY(1px);
}

/* =============================================================
   ESTILOS PREMIUM SECCIÓN CALENDARIO (AGENDA LITÚRGICA)
   ============================================================= */
.calendar-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
  text-align: left;
}

.light-theme .calendar-item-card {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.calendar-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.light-theme .calendar-item-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.calendar-item-today {
  border-top-color: var(--accent-light) !important;
  border-right-color: var(--accent-light) !important;
  border-bottom-color: var(--accent-light) !important;
  box-shadow: 0 0 15px var(--accent-glow) !important;
}

.calendar-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding-right: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.light-theme .calendar-date-block {
  border-right-color: rgba(0, 0, 0, 0.06);
}

.calendar-date-num {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.calendar-date-day {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.calendar-details-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.calendar-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.calendar-item-notes {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.calendar-color-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.light-theme .calendar-color-pill {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.04);
}

.calendar-color-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.calendar-today-badge {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 9px;
  font-weight: 700;
  background: var(--accent-blue);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Estado deshabilitado para botones de navegación */
.overlay-close-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: default;
}

/* =============================================================
   ESTILOS PREMIUM DE ENLACES DE INTERÉS (PWA STYLE)
   ============================================================= */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 24px;
  width: 100%;
  padding: 16px 8px;
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  background: none;
  border: none;
  box-shadow: none;
  padding: 8px;
}

.link-card:hover {
  transform: translateY(-4px);
}

.link-logo-container {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
}

.light-theme .link-logo-container {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}

.link-card:hover .link-logo-container {
  border-color: var(--accent-light);
  box-shadow: 0 6px 18px rgba(165, 193, 220, 0.2), 0 0 10px rgba(165, 193, 220, 0.1);
}

.light-theme .link-card:hover .link-logo-container {
  border-color: var(--accent-blue);
  box-shadow: 0 6px 15px rgba(30, 64, 175, 0.08);
}

.link-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  margin-top: 4px;
}
/* =====================================================
   EN VIVO — Tabs
   ===================================================== */
.envivo-tabs {
  display: flex;
  gap: 4px;
  padding: 0 0 2px 0;
  border-bottom: none;
}
.envivo-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  letter-spacing: 0.2px;
}
.envivo-tab:hover {
  color: var(--text-primary);
}
.envivo-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-blue);
  font-weight: 700;
}
.light-theme .envivo-tab.active {
  color: var(--accent-blue);
}

/* =====================================================
   EN VIVO — Badge "EN VIVO" pulsante
   ===================================================== */
.envivo-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #f87171;
  text-transform: uppercase;
  margin-top: 2px;
}
.envivo-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #f87171;
  border-radius: 50%;
  animation: envivo-pulse 1.4s infinite;
}
@keyframes envivo-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

/* =====================================================
   EN VIVO — Tarjetas de Canal (video)
   ===================================================== */
.envivo-channel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  transition: var(--transition-smooth);
}
.envivo-channel-card:hover {
  border-color: rgba(165, 193, 220, 0.2);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}
.envivo-channel-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px 10px 16px;
}
.envivo-channel-avatar {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.envivo-channel-name {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

/* Wrapper 16:9 para iframe / video */
.envivo-video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}
.envivo-iframe,
.envivo-hls-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.envivo-hls-video {
  background: #000;
  object-fit: contain;
}

/* =====================================================
   EN VIVO — Tarjetas de Radio (audio)
   ===================================================== */
.envivo-radio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.envivo-radio-card:hover {
  border-color: rgba(165, 193, 220, 0.2);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}
.envivo-radio-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
  flex-shrink: 0;
}
.envivo-radio-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.envivo-radio-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Reproductor de audio en línea */
.envivo-radio-play-btn {
  flex-shrink: 0;
}

/* Responsividad para móviles pequeños */
@media (max-width: 480px) {
  .envivo-radio-card {
    padding: 10px 12px;
    gap: 10px;
  }
  .envivo-radio-header {
    gap: 10px;
  }
  .envivo-radio-avatar {
    width: 40px;
    height: 40px;
  }
  .envivo-channel-name {
    font-size: 14.5px;
  }
}

/* Tema claro */
.light-theme .envivo-channel-card,
.light-theme .envivo-radio-card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.07);
}
.light-theme .envivo-channel-card:hover,
.light-theme .envivo-radio-card:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   BIBLIA — Estilos
   ============================================================ */

/* Tab bar AT / NT */
.bible-tab-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  background: transparent;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bible-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  position: relative;
}

.bible-tab.active {
  background: transparent;
  color: var(--accent-light);
  font-weight: 700;
  box-shadow: none;
}

.bible-tab.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-light);
  border-radius: 2px;
}

/* Sección de categoría */
.bible-category-section {
  margin-bottom: 20px;
}

.bible-category-header {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px 0;
  letter-spacing: 0.01em;
}

/* Grid 2 columnas de libros */
.bible-books-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bible-book-btn {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 10px;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
  font-family: inherit;
  line-height: 1.3;
}

.bible-book-btn:hover,
.bible-book-btn:active {
  background: rgba(255,255,255,0.1);
  transform: scale(0.98);
}

/* Grid 4 columnas de capítulos */
.bible-chapter-btn {
  aspect-ratio: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bible-chapter-btn:hover,
.bible-chapter-btn:active {
  background: var(--accent-primary, #e56a28);
  color: #fff;
  border-color: transparent;
  transform: scale(0.95);
}

/* Versículo */
.bible-verse {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: baseline;
  line-height: 1.7;
}

.bible-verse-number {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-light, #f97316);
  min-width: 20px;
  padding-top: 2px;
}

.bible-verse-text {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.75;
}

/* Búsqueda */
.bible-search-group {
  margin-bottom: 24px;
}

.bible-search-group-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.bible-search-book-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-light, #f97316);
}

.bible-search-count {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bible-search-result-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.18s;
}

.bible-search-result-card:hover {
  background: rgba(255,255,255,0.08);
}

.bible-search-verse-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-light, #f97316);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.bible-search-snippet {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.bible-search-highlight {
  background: #f5c542;
  color: #1a1a1a;
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 700;
}

/* Light theme */
.light-theme .bible-tab-bar {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
.light-theme .bible-tab {
  color: var(--text-secondary);
}
.light-theme .bible-tab.active {
  background: transparent;
  color: var(--accent-blue);
  box-shadow: none;
}
.light-theme .bible-tab.active::after {
  background: var(--accent-blue);
}
.light-theme .bible-book-btn,
.light-theme .bible-search-result-card {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
}
.light-theme .bible-chapter-btn {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.08);
}

/* Versículo resaltado al navegar desde búsqueda */
@keyframes bible-verse-flash {
  0%   { background: rgba(245, 197, 66, 0.25); border-left-color: #f5c542; }
  60%  { background: rgba(245, 197, 66, 0.15); border-left-color: #f97316; }
  100% { background: transparent; border-left-color: transparent; }
}

.bible-verse-highlight-active {
  border-left: 3px solid #f5c542;
  border-radius: 4px;
  padding-left: 10px;
  margin-left: -13px;
  animation: bible-verse-flash 2.5s ease-out forwards;
}

/* Versículos seleccionables */
.bible-verse-selectable {
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 8px;
  margin: 0 -8px 6px -8px;
  transition: background-color 0.2s;
}

.bible-verse-selected {
  background-color: rgba(59, 130, 246, 0.15) !important;
}

.light-theme .bible-verse-selected {
  background-color: rgba(37, 99, 235, 0.12) !important;
}

#bible-reader-overlay.open {
  z-index: 1100;
}

/* Barra flotante de selección */
.bible-selection-bar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  width: calc(100% - 32px);
  max-width: 440px;
  background: rgba(19, 25, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  z-index: 1010;
  opacity: 0;
  pointer-events: none;
}

.light-theme .bible-selection-bar {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.bible-selection-bar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.bible-selection-count {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.bible-selection-actions {
  display: flex;
  gap: 12px;
}

.bible-selection-btn {
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--text-primary);
  border-radius: 12px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.bible-selection-btn:hover {
  background: rgba(255,255,255,0.15);
}

.light-theme .bible-selection-btn {
  background: rgba(0,0,0,0.05);
}
.light-theme .bible-selection-btn:hover {
  background: rgba(0,0,0,0.08);
}

/* =============================================================
   ESTILOS PREMIUM BOTÓN CARGAR ANTERIORES - BIBLIA 365
   ============================================================= */
.bible365-load-prev-card {
  background: rgba(165, 193, 220, 0.04);
  border: 1px dashed rgba(165, 193, 220, 0.2);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  color: var(--accent-light);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.bible365-load-prev-card:hover {
  background: rgba(165, 193, 220, 0.08);
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.light-theme .bible365-load-prev-card {
  background: rgba(30, 64, 175, 0.03);
  border: 1px dashed rgba(30, 64, 175, 0.2);
  color: var(--accent-blue);
}

.light-theme .bible365-load-prev-card:hover {
  background: rgba(30, 64, 175, 0.06);
  border-color: var(--accent-blue);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.load-prev-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* =============================================================
   ESTILOS PREMIUM PARA LA PANTALLA DEL SANTO ROSARIO
   ============================================================= */

.rosario-bead-btn {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00b0ff 0%, #0070f3 100%);
  border: 4px solid #ffffff;
  box-shadow: 0 10px 30px rgba(0, 112, 243, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.25);
  color: #ffffff;
  cursor: pointer;
  outline: none;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.rosario-bead-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 14px 40px rgba(0, 112, 243, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.4);
}

.rosario-bead-btn:active:not(:disabled) {
  transform: scale(0.95);
  box-shadow: 0 5px 15px rgba(0, 112, 243, 0.3);
}

.rosario-bead-btn.pulse-active {
  transform: scale(0.92) !important;
  box-shadow: 0 4px 10px rgba(0, 112, 243, 0.2), inset 0 0 10px rgba(255,255,255,0.1) !important;
}

.rosario-bead-btn:disabled {
  background: linear-gradient(135deg, #5a6472 0%, #3d4653 100%) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
  color: rgba(255, 255, 255, 0.4) !important;
  cursor: not-allowed;
  filter: grayscale(80%) opacity(0.7);
}

.rosario-bead-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.rosario-bead-btn .bead-icon {
  animation: pulse-icon 3s infinite;
}

@keyframes pulse-icon {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.rosario-bead-btn .bead-text {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.rosario-mystery-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.rosario-mystery-item:hover {
  transform: translateY(-2px);
  border-color: rgba(165, 193, 220, 0.25);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.rosario-mystery-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rosario-mystery-thumb {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.rosario-mystery-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 3px;
}

.rosario-mystery-label {
  font-family: var(--font-title);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.rosario-mystery-title-text {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* -------------------------------------------------------------
   ESTILOS DEL MÓDULO DEL CATECISMO (GLIDE GLOW PREMIUM)
   ------------------------------------------------------------- */

.catecismo-part-title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-light);
  margin-top: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-left: 3px solid var(--accent-blue);
  padding-left: 10px;
}

.light-theme .catecismo-part-title {
  color: var(--accent-blue);
}

.catecismo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 18px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.catecismo-card:hover {
  transform: translateY(-2.5px);
  border-color: rgba(165, 193, 220, 0.25);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.catecismo-card-title {
  color: var(--text-primary);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
}

.catecismo-card-subtitle {
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.35;
}

.catecismo-badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.catecismo-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 10px;
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.light-theme .catecismo-badge {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

/* Lector de Párrafos */
.catecismo-chapter-header {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-light);
  margin: 20px 0 10px 0;
  text-align: center;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.light-theme .catecismo-chapter-header {
  border-bottom-color: rgba(0, 0, 0, 0.1);
  color: var(--accent-blue);
}

.catecismo-article-header {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 16px 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.catecismo-paragraph-card {
  background: rgba(34, 41, 56, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: left;
}

.light-theme .catecismo-paragraph-card {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.catecismo-paragraph-num {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-light);
  background: rgba(165, 193, 220, 0.12);
  padding: 3px 8px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 8px;
}

.light-theme .catecismo-paragraph-num {
  background: rgba(30, 64, 175, 0.08);
  color: var(--accent-blue);
}

.catecismo-paragraph-text {
  font-family: var(--reading-font-family, var(--font-sans)) !important;
  font-size: calc(14.5px * var(--detail-font-scale, 1.0)) !important;
  line-height: var(--reading-line-height, 1.65) !important;
  color: var(--text-primary);
  text-align: var(--reading-text-align, justify) !important;
}

/* =============================================================
   ROSARIO — Animación de Cuentas (Progreso)
   ============================================================= */
.rosario-beads-progress {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 340px;
  margin: 12px 0 4px 0;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  box-sizing: border-box;
}

.light-theme .rosario-beads-progress {
  background: rgba(0, 0, 0, 0.01);
  border-color: rgba(0, 0, 0, 0.04);
}

.rosario-beads-line {
  position: absolute;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  left: 20px;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.light-theme .rosario-beads-line {
  background: rgba(0, 0, 0, 0.08);
}

.rosario-beads-progress-line {
  position: absolute;
  height: 2px;
  background: var(--accent-light);
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-theme .rosario-beads-progress-line {
  background: var(--accent-blue);
}

.rosario-bead {
  border-radius: 50%;
  background: #111521;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  z-index: 2;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-sizing: border-box;
}

.light-theme .rosario-bead {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.3);
}

.rosario-bead.bead-father {
  width: 18px;
  height: 18px;
  margin-right: 24px;
}

.rosario-bead.bead-mother {
  width: 12px;
  height: 12px;
}

.rosario-bead.completed {
  background: var(--accent-light);
  border-color: var(--accent-light);
  box-shadow: 0 0 8px rgba(165, 193, 220, 0.4);
}

.light-theme .rosario-bead.completed {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  box-shadow: 0 0 8px rgba(30, 64, 175, 0.3);
}

.rosario-bead.active-bead {
  background: var(--accent-light);
  border-color: var(--accent-light);
  transform: scale(1.3);
  animation: bead-pulse 1.8s infinite ease-in-out;
  --rosario-glow-color: rgba(165, 193, 220, 0.6);
}

.light-theme .rosario-bead.active-bead {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  --rosario-glow-color: rgba(30, 64, 175, 0.5);
}

@keyframes bead-pulse {
  0% { box-shadow: 0 0 6px var(--rosario-glow-color); }
  50% { box-shadow: 0 0 16px var(--rosario-glow-color); }
  100% { box-shadow: 0 0 6px var(--rosario-glow-color); }
}

/* -------------------------------------------------------------
   ESTILOS PREMIUM PARA EL CONTADOR Y BLOQUEO DEL CHAT DIARIO
   ------------------------------------------------------------- */
.chat-counter-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.chat-counter-badge i {
  color: var(--accent-light);
  font-size: 14px;
}

/* Estado de advertencia del contador (<= 5 preguntas) */
.chat-counter-badge.warning {
  border-color: rgba(235, 172, 53, 0.4);
  background: rgba(235, 172, 53, 0.08);
  color: #ebac35;
}

.chat-counter-badge.warning i {
  color: #ebac35;
}

/* Estado de bloqueo del contador (= 0 preguntas o bloqueado) */
.chat-counter-badge.blocked {
  border-color: rgba(242, 116, 116, 0.4);
  background: rgba(242, 116, 116, 0.08);
  color: #f27474;
  animation: badgePulseBlocked 2s infinite ease-in-out;
}

.chat-counter-badge.blocked i {
  color: #f27474;
}

@keyframes badgePulseBlocked {
  0% { box-shadow: 0 0 4px rgba(242, 116, 116, 0.2); }
  50% { box-shadow: 0 0 12px rgba(242, 116, 116, 0.4); }
  100% { box-shadow: 0 0 4px rgba(242, 116, 116, 0.2); }
}

/* Banner de Límite de Chat Alcanzado */
.chat-blocked-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(242, 116, 116, 0.08);
  border: 1px solid rgba(242, 116, 116, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 12px 0;
  color: #f27474;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  animation: slideUp 0.3s ease;
}

.chat-blocked-banner i {
  font-size: 18px;
  flex-shrink: 0;
}

/* Deshabilitar botón de enviar al estar bloqueado */
.send-btn.disabled {
  background: rgba(255, 255, 255, 0.04) !important;
  color: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Ajustes de Modo Claro */
.light-theme .chat-counter-badge {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

.light-theme .chat-counter-badge i {
  color: var(--accent-blue);
}

.light-theme .chat-counter-badge.warning {
  border-color: rgba(217, 119, 6, 0.4);
  background: rgba(217, 119, 6, 0.06);
  color: #d97706;
}

.light-theme .chat-counter-badge.warning i {
  color: #d97706;
}

.light-theme .chat-counter-badge.blocked {
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(220, 38, 38, 0.06);
  color: #dc2626;
  animation: badgePulseBlockedLight 2s infinite ease-in-out;
}

.light-theme .chat-counter-badge.blocked i {
  color: #dc2626;
}

@keyframes badgePulseBlockedLight {
  0% { box-shadow: 0 0 4px rgba(220, 38, 38, 0.1); }
  50% { box-shadow: 0 0 12px rgba(220, 38, 38, 0.2); }
  100% { box-shadow: 0 0 4px rgba(220, 38, 38, 0.1); }
}

.light-theme .chat-blocked-banner {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.15);
  color: #b91c1c;
}

.light-theme .send-btn.disabled {
  background: rgba(0, 0, 0, 0.03) !important;
  color: rgba(0, 0, 0, 0.15) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
}





