/* ==========================================================================
   VARIABLES Y CONFIGURACIÓN GLOBAL (NEGRO, GRIS Y ROJO) - BOOK.PHP
   ========================================================================== */
:root {
  --bg-main: #0a0a0c;
  --bg-surface: #121216;
  --bg-card: #18181f;
  --bg-card-hover: #1f1f28;
  --border-color: #2a2a35;
  --border-glow: rgba(229, 9, 20, 0.4);
  
  --primary: #e50914;
  --primary-hover: #ff1e2b;
  --primary-glow: rgba(229, 9, 20, 0.25);
  
  --text-main: #f1f1f3;
  --text-muted: #9ba1a6;
  --text-subtle: #6c7278;
  
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --container-max: 1280px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==========================================================================
   BARRA DE NAVEGACIÓN SUPERIOR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.navbar {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand span {
  color: var(--primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.reader-name {
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 500;
}

.creditos-badge {
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid var(--border-glow);
  color: #ff4d4d;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.button-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.button-nav:hover {
  border-color: var(--primary);
  background-color: rgba(229, 9, 20, 0.08);
  color: var(--primary-hover);
}

/* ==========================================================================
   CONTENEDOR PRINCIPAL Y CABECERA DE LA HISTORIA
   ========================================================================== */
.main-container {
  width: 80%;
  max-width: var(--container-max);
  margin: 3rem auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.story-header-center {
  text-align: center;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.story-title {
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.story-saga-tag {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  background: var(--bg-card);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  display: inline-block;
}

/* ==========================================================================
   GRID SUPERIOR (PORTADA, AUTOR, BOTONES Y SINOPSIS)
   ========================================================================== */
.story-top-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3.5rem;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.book-cover {
  width: 100%;
  height: 380px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.btn-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.btn-author:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 15px var(--primary-glow);
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nav-buttons-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav-btn:hover {
  border-color: var(--primary);
  background-color: rgba(229, 9, 20, 0.1);
  color: var(--primary-hover);
}

.synopsis-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--radius-md);
}

.synopsis-section h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  border-left: 3px solid var(--primary);
  padding-left: 0.6rem;
}

.synopsis-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ==========================================================================
   SECCIONES Y TÍTULOS
   ========================================================================== */
.content-section {
  margin-top: 3.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2.5rem;
}

.section-title {
  font-size: 1.5rem;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.btn-view-all {
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.btn-view-all:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.no-data {
  color: var(--text-subtle);
  font-style: italic;
  font-size: 0.95rem;
}

/* ==========================================================================
   CUADRÍCULA DE CAPÍTULOS (ESTILO TARJETAS)
   ========================================================================== */
.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--border-color);
}

.chapters-grid::-webkit-scrollbar {
  width: 6px;
}
.chapters-grid::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.chapter-card-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
}

.chapter-card-item:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

.chapter-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.chapter-card-title {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Estados de lectura adaptados a la tarjeta */
.chapter-card-item.chapter-read {
  background-color: rgba(34, 197, 94, 0.06);
  border-color: rgba(34, 197, 94, 0.2);
}
.chapter-card-item.chapter-read .chapter-card-title {
  color: #4ade80;
}

.chapter-card-item.chapter-unread {
  background-color: rgba(229, 9, 20, 0.06);
  border-color: rgba(229, 9, 20, 0.2);
}
.chapter-card-item.chapter-unread .chapter-card-title {
  color: #ff5252;
}

/* ==========================================================================
   CORRECCIÓN DEL CARRUSEL Y TARJETAS DE PERSONAJES
   ========================================================================== */

/* Asegura que el carrusel mantenga las tarjetas en una sola fila horizontal */
.carousel-container {
  display: flex;
  flex-direction: row; /* Fuerza la fila horizontal */
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--border-color);
  width: 100%;
}

/* Tarjeta individual de personaje en carrusel */
.character-flip-card {
  background-color: transparent;
  width: 160px;
  height: 220px;
  perspective: 1000px;
  flex: 0 0 160px; /* Evita que se encojan o salten a otra línea */
}

.character-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.character-flip-card:hover .character-card-inner {
  transform: rotateY(180deg);
}

.character-card-front, .character-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.character-card-front {
  background-color: var(--bg-card);
}

.character-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-card-back {
  background-color: var(--bg-surface);
  color: var(--text-main);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  gap: 0.75rem;
  text-align: center;
  border-color: var(--primary);
}

.character-card-back strong {
  font-size: 0.95rem;
  color: var(--text-main);
  word-break: break-word;
}

.character-card-back small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Cuadrícula del Modal ("Ver todos") al estilo de los capítulos pero más grande */
.characters-modal-grid {
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  padding-bottom: 2rem;
}

/* Ajuste de tamaño para las tarjetas dentro del modal */
.characters-modal-grid .character-flip-card {
  width: 100%;
  height: 260px;
  flex: none;
}

/* ==========================================================================
   MODAL DE PANTALLA COMPLETA ("VER TODOS")
   ========================================================================== */
.characters-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 4000;
  background-color: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(8px);
  padding: 3rem 2rem;
  overflow-y: auto;
}

.characters-modal.is-open {
  display: flex;
  flex-direction: column;
}

.characters-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto 2.5rem auto;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.characters-modal-header h2 {
  font-size: 2rem;
  color: var(--text-main);
}

.characters-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition);
}

.characters-modal-close:hover {
  color: var(--primary);
}

.characters-modal-grid {
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
}

/* Versión más grande de las tarjetas para el modal */
.characters-modal-grid .character-flip-card {
  width: 100%;
  height: 280px;
  flex: none;
}

/* ==========================================================================
   ÁRBOLES Y LÍNEAS DE TIEMPO (LISTAS)
   ========================================================================== */
.sub-heading {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.custom-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.custom-list-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.custom-list-item:hover {
  border-color: var(--primary);
  background-color: var(--bg-card-hover);
}

.custom-list-item a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
}

.custom-list-item a:hover {
  color: var(--primary-hover);
}

.item-meta {
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-style: italic;
}

/* ==========================================================================
   COLECCIONABLES: TARJETAS CON IMAGEN DE FONDO COMPLETA Y MODAL 70%
   ========================================================================== */
.collectibles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.collectible-card-full {
  position: relative;
  height: 240px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.75rem;
  transition: var(--transition);
}

.collectible-card-full:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* Imagen ocupando toda la tarjeta como fondo absoluto */
.collectible-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.collectible-bg-img.blurred {
  filter: blur(10px);
  transform: scale(1.1);
}

/* Gradiente para que el texto destaque sobre la imagen */
.collectible-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 40%, rgba(0,0,0,0.85) 80%);
  z-index: 2;
}

/* Contenido de la tarjeta posicionado por encima del overlay */
.collectible-card-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.collectible-top-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collectible-bottom-status {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ddd;
}

/* ==========================================================================
   MODAL AMPLIADO (85-90%) Y BOTÓN DE CIERRE MEJORADO
   ========================================================================== */
/* Contenedor general del modal */
.collectible-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.collectible-modal.is-active {
    display: flex;
    opacity: 1;
}


/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 900px) {
  .main-container {
    width: 95%;
    padding: 1.5rem;
  }
  .story-top-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .book-cover {
    max-height: 320px;
  }
}

/* =====================================================================
 Modal de capítulo a pantalla completa 
 =======================================================================*/
.chapter-fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    color: #1e293b;
    z-index: 10000;
    overflow-y: auto;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Modo oscuro para el lector */
.chapter-fullscreen-modal.dark-mode {
    background-color: #0f172a;
    color: #f1f5f9;
}

.chapter-modal-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Cabecera flotante o fija superior dentro del modal */
.chapter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 15px;
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 10;
}

.chapter-fullscreen-modal.dark-mode .chapter-modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.chapter-modal-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.chapter-modal-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Botones de control en extremos */
.theme-toggle-btn, .chapter-close-btn {
    background: #e2e8f0;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.chapter-fullscreen-modal.dark-mode .theme-toggle-btn,
.chapter-fullscreen-modal.dark-mode .chapter-close-btn {
    background: #334155;
}

.theme-toggle-btn:hover, .chapter-close-btn:hover {
    opacity: 0.85;
}

.chapter-text-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.chapter-card-item {
    cursor: pointer;
}

/* ----------------------------------------------------
/* OBJETOS
/*_____________________________________________________
/* Contenedor general */
.col-main-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 15px;
}

.col-group-heading {
    font-size: 1.2rem;
    color: #e2e8f0;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.col-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.col-item-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    aspect-ratio: 3/4;
    display: flex;
    flex-direction: column;
}

.col-item-clickable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.col-item-clickable:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(74, 222, 128, 0.4);
}

.col-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.col-card-shadow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.3) 50%, rgba(15, 23, 42, 0.9) 100%);
    z-index: 2;
}

.col-item-inner {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 12px;
    box-sizing: border-box;
}

.col-item-title-top {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f8fafc;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.col-item-status {
    font-size: 0.75rem;
    text-align: center;
}

.col-item-unseen {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px dashed #4ade80;
}

.col-item-locked {
    opacity: 0.7;
}

/* ÚNICO MODAL GLOBAL */
.uni-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.uni-modal-overlay.is-active {
    display: flex !important;
}

.uni-modal-box {
    background: #1e293b;
    border-radius: 12px;
    max-width: 650px;
    width: 100%;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.uni-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.uni-modal-close:hover {
    background: rgba(239, 68, 68, 0.9);
}

.uni-modal-content-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 30px;
    max-height: 85vh;
    overflow-y: auto;
}

.uni-modal-img-container {
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    border-radius: 8px;
    padding: 10px;
}

.uni-modal-image {
    max-width: 100%;
    max-height: 55vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

.uni-modal-info {
    flex: 1.2;
    min-width: 240px;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.uni-modal-info h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.4rem;
}


/*--------------------------------------
MODAL COMPARTIR (Estilo Oscuro & Detalles Rojos)
---------------------------------------*/
.modal-compartir-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px); /* Efecto difuminado moderno de fondo */
    z-index: 1000;
    display: none; /* Asegura que inicie oculto por defecto */
    justify-content: center;
    align-items: center;
}

.modal-compartir-content {
    background: #18181b; /* Fondo oscuro elegante estilo tarjeta */
    color: #f4f4f5;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid #27272a; /* Borde sutil oscuro */
    animation: modalScaleIn 0.2s ease-out;
}

.modal-compartir-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #27272a;
    padding-bottom: 12px;
}

.modal-compartir-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fafafa;
    margin: 0;
}

.modal-cerrar-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #a1a1aa;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-cerrar-btn:hover {
    color: #ef4444; /* Detalle rojo al pasar el mouse por la X */
}

.modal-opcion-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid #27272a;
    border-radius: 8px;
    background: #202023; /* Fondo de botones secundario */
    cursor: pointer;
    text-decoration: none;
    color: #e4e4e7;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.modal-opcion-btn i {
    color: #ef4444; /* Iconos con detalle rojo característico */
    font-size: 1.1rem;
}

.modal-opcion-btn:hover {
    background: #27272a;
    border-color: #ef4444; /* Borde sutil rojo al hacer hover */
    color: #ffffff;
}

/* Botón especial de Facebook (mantiene su identidad azul corporativa pero adaptada al contenedor) */
.facebook-btn {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
    margin-bottom: 0; /* Quita margen inferior si es el último */
}

.facebook-btn i {
    color: white !important; /* El icono de Facebook se mantiene blanco por contraste */
}

.facebook-btn:hover {
    background: #1465d3;
    border-color: #1465d3;
}

/* Animación sutil de aparición */
@keyframes modalScaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}