* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilos generales */
html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(
        rgba(0, 0, 0, 0.7), 
        rgba(0, 0, 0, 0.7)
    ),     url("images/fondo.923fd6d562be.webp");
    background-size: cover; /* Asegura que la imagen cubra toda la pantalla */
    background-repeat: no-repeat;
    background-attachment: fixed; /* Permite que la imagen se quede fija al hacer scroll */
    background-position: center center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
}


  .demography {
    position: absolute;
    top: 197px;
    left: 50%;
    width: 50%;
    height: 26px;
    overflow: hidden;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    padding: 5px 10px;
}

.aviso {
  text-align: center; /* Centrar texto horizontalmente */
  margin: 20px auto; /* Espaciado superior e inferior */
  padding: 10px; /* Espaciado interno */
  max-width: 800px; /* Limitar el ancho para mejorar legibilidad */
  background-color: #2a2a2a; /* Fondo oscuro (ajustable según diseño) */
  border-radius: 8px; /* Bordes redondeados */
  color: #ffffff; /* Color del texto */
  line-height: 1.6; /* Altura de línea para mejor legibilidad */
  font-size: 1rem; /* Tamaño del texto */
}


/* Colores específicos para la demografía */
.demography.shounen {
    background-color: rgba(255, 165, 0, 0.8); /* Naranja */
}

.demography.shoujo {
    background-color: rgba(255, 105, 180, 0.8); /* Rosa */
}

.demography.seinen {
    background-color: rgba(255, 0, 0, 0.8); /* Rojo */
}

.demography.josei {
    background-color: rgba(128, 0, 128, 0.8); /* Púrpura */
}
   
  /* Contenedor para centrar los ítems */
  
  .manga-degradado {
    display: flex;
    justify-content: center; /* Centrar horizontalmente */
    align-items: center; /* Centrar verticalmente */
    flex-direction: column; /* Asegurar que los elementos estén en una columna */
    height: 100%; /* Garantiza que ocupe todo el alto del contenedor */
    width: 100%; /* Ocupa todo el ancho disponible */
    min-height: 467px;
  }
  
  .section-title {
    font-weight: bold;
    letter-spacing: 0.2px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 1.5), 4px 4px 10px rgba(0, 0, 0, 2.5);
    font-family: 'Poppins', sans-serif;
    color: #fff;
    margin-top: 20px;
    line-height: 1.5;
    word-break: break-word;
    text-align: center; /* Centrar el texto dentro del título */
    padding: 10px 30%;
  }
  /* Cuadrícula de mangas */
  .manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    justify-items: center;
    max-width: 1200px;
    width: 75%;
      background-color: rgba(0, 0, 0, 0.5); /* Fondo oscuro transparente */
  }
  
  /* Ítem de manga */
  .manga-item {
    background-color: rgba(29, 31, 39, 0.8); /* Fondo oscuro transparente */
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    width: 100%;
    max-width: 200px;
    transition: transform 0.3s ease; /* Animación suave */
  }
  
  /* Efecto hover para la animación */
  .manga-item:hover {
    transform: scale(1.05);
  }
  
  /* Imagen del manga */
  .manga-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
  }
  
  /* Información del manga */
  .manga-info {
    padding: 16px;
  }
  
  .manga-info h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 5px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }
  
  .manga-info p {
    color: #bbb;
    font-size: 0.9rem;
    margin-top: 8px;
  }
  
  .manga-image-container {
      position: relative;
      width: 100%;
  }
  
  .manga-image-container img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
  }
  
  .manga-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7); /* Fondo semitransparente */
    color: white;
    font-size: 0.8rem;
    padding: 10px 10px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  
  
  /* Botón del capítulo */
  .chapter-button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 12px;
    background-color: rgb(29, 31, 60);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: background-color 0.3s ease; /* Animación suave */
  }
  
  .chapter-button:hover {
    background-color: #0056b3;
  }

  .chapter-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .4rem;              /* separa el texto del círculo  */
    font-size: .9rem;
    line-height: 1;
  }
  
  /* Punto verde */
  .novelty-circle-inline {
    --size: 9px;             /* cambia aquí si lo quieres más grande */
    width:  var(--size);
    height: var(--size);
    border-radius: 50%;
    background: #25c04e;     /* tono un poco más vibrante */
    box-shadow: 0 0 4px 1px rgba(37, 192, 78, .6);
    flex-shrink: 0;          /* evita que se deforme si falta espacio */
  
    /* Animación de “latido” muy sutil */
    animation: pulse 2.4s ease-out infinite;
  }
  
  /* Estado “visitado/limpio” (por si lo necesitas) */
  .novelty-circle-inline.is-read {
    animation: none;
    background: #7dbd89;     /* tono más apagado */
    box-shadow: none;
    opacity: .5;
  }
  
  /* Keyframes del latido */
  @keyframes pulse {
    0%   { transform: scale(.95); }
    50%  { transform: scale(1.25); }
    100% { transform: scale(.95); }
  }
  
  /* Mejora de accesibilidad para usuarios que prefieren menos movimiento */
  @media (prefers-reduced-motion: reduce) {
    .novelty-circle-inline {
      animation: none;
    }
  }
  /* Media Queries para adaptar a móviles */
  @media (max-width: 850px) {
  
    .section-title{
      padding: 10px 50px; 
    }

    .manga-info h3 {
      font-size: 0.9rem;
      -webkit-line-clamp: 4;
    }
  
  
    .manga-grid {
      grid-template-columns: repeat(3, 1fr);
      gap: 15px;
      width: 100%;
    }

  
.section-title {
    width: 100%;
    text-align: center;
    
  }
  
    .manga-info {
      padding: 12px;
    }

    .dialog-box {
      min-width: 90vw;
    }
  }
  
  @media (max-width: 480px) {
    .manga-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;

    }
  
    .manga-info h3 {
      font-size: 0.85rem;
      -webkit-line-clamp: 5;
    }
  
    .manga-info {
      padding: 8px;
    }
  
    .chapter-button {
      font-size: 0.75rem;
      padding: 6px 10px;
    }
  }
  
  /* Paginación */
  .pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
  }
  
  .pagination button {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.2s ease; /* Animación suave */
  }
  
  .pagination button:hover {
    background-color: #555;
  }
  
  .pagination button.active {
    background-color: #0056b3;
  }
  
  .manga-type {
    position: absolute;
    top: 10px; /* Ajusta la posición vertical */
    left: 10px; /* Ajusta la posición horizontal */
    background-color: rgba(0, 0, 0, 0.7); /* Fondo oscuro con transparencia */
    color: #fff; /* Texto blanco */
    font-weight: bold;
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 2;
    pointer-events: none; /* Evita que interfiera con los clics */
  }
  
  .manga-item {
    position: relative; /* Importante para posicionar elementos hijos */
    background-color: rgba(29, 31, 39, 0.8);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    width: 100%;
    max-width: 200px;
    transition: transform 0.3s ease; /* Animación suave */
  }
  
  /* Colores para los tipos */
  .manga-type.manhwa {
    background-color: #3cb371; /* Verde claro */
    color: #fff;
  }
  
  .manga-type.manga {
    background-color: #4169e1; /* Azul */
    color: #fff;
  }
  
  .manga-type.manhua {
    background-color: #8b0000; /* Rojo oscuro */
    color: #fff;
  }
  
  /* Colores para los géneros */
  .manga-genre.shounen {
    background-color: #ffd700; /* Amarillo */
    color: #000;
  }
  
  .manga-genre.seinen {
    background-color: #ff4500; /* Rojo */
    color: #fff;
  }
  
/* DESDE AQUÍ EMPIEZA EL CSS PARA LÑAS LISTAS */


/* Contenedor de selección de listas */
.listas-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px auto;
  padding: 10px;
  border-radius: 8px;
  max-width: 800px;
}

/* Etiqueta del selector */
.listas-container label {
  color: #fff;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
}

/* Selector de listas */
.listas-container select {
  padding: 8px 12px;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-family: 'Poppins', sans-serif;
}

/* Botón para crear nueva lista */
.listas-container button {
  background-color: #0056b3;
  color: #fff;
  border: none;
  padding: 8px 12px;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.listas-container button:hover {
  background-color: #004494;
}


/* Formulario de nueva lista */
#nueva-lista-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px auto;
  max-width: 800px;
}

#nueva-lista-form input {
  padding: 8px 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 70%;
  font-family: 'Poppins', sans-serif;
}

#nueva-lista-form button {
  background-color: #28a745;
  color: #fff;
  border: none;
  padding: 8px 12px;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

#nueva-lista-form button:hover {
  background-color: #218838;
}

/* Botón "Agregar Historias" */
#agregar-historias-btn {
  display: inline-block;
  background-color: #ff9800;  /* Un tono naranja vibrante */
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Poppins', sans-serif;
  margin: 15px auto;
}

#agregar-historias-btn:hover {
  background-color: #e68900;
}



  /* Botón de eliminación sobre la miniatura */
.delete-manga-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgb(20 19 19 / 80%);
    border: none;
    color: #fff;
    padding: 2px 5px;
    font-size: 17px;
    cursor: pointer;
    border-radius: 3px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Estilos para el modal */
.dialog-overlay {
  position: fixed;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background: rgba(0, 0, 0, 0.7); /* Fondo oscuro para resaltar el modal */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.dialog-box {
  background: rgba(31, 31, 31, 0.95);  /* Un tono oscuro acorde al fondo general */
  color: #fff;
  padding: 20px;
  border-radius: 8px;
  max-height: 80vh;
  overflow-y: auto;
  max-width: 90vw;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  font-family: 'Poppins', sans-serif;
}

.dialog-box h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
}

/* Estilos para la lista vertical de mangas en el modal */
.manga-list-modal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0;
}

.manga-item-select {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  background-color: #2a2a2a;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.manga-item-select:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.manga-item-select img.manga-thumbnail {
  width: 50px;
  height: auto;
  margin-right: 10px;
  border-radius: 3px;
}

.manga-item-select p {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}

.dialog-box::-webkit-scrollbar {
    width: 10px;
}

.dialog-box::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.dialog-box::-webkit-scrollbar-thumb {
    background: #ff5e57;
    border-radius: 10px;
}

.dialog-box::-webkit-scrollbar-thumb:hover {
    background: #ff2f2f;
}

/* Reutiliza estilos para el modal de crear lista */
#create-list-overlay.dialog-overlay {
  position: fixed;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background: rgba(0, 0, 0, 0.7); 
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

#create-list-overlay .dialog-box {
  background: #1d1f27; 
  color: #fff;
  padding: 20px;
  border-radius: 8px;
  max-height: 80vh;
  overflow-y: auto;
  max-width: 90vw;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  font-family: 'Poppins', sans-serif;
}

#create-list-overlay h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
}

#create-list-overlay input#lista-nombre-modal {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
}

.list-title{}

#create-list-overlay button {
  background-color: #28a745;
  color: #fff;
  border: none;
  padding: 8px 12px;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 10px;
  margin-top: 10px;
}

#create-list-overlay button:hover {
  background-color: #218838;
}

/* Contenedor del título y la X */
.seleccionar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Botón para cerrar modal con una X */
.close-modal-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem; /* Ajusta el tamaño de la X */
  cursor: pointer;
  color: #fff;       /* Ajusta según tu tema */
  font-weight: bold;
  margin-left: 10px; /* Espacio a la izquierda si lo deseas */
}

.close-modal-btn:hover {
  color: #ff5e57;    /* Efecto hover, por ejemplo */
}



.menu-opciones-container {
  position: relative;
  display: inline-block;
  margin-right: 10px;
}

/* Botón de tres puntos (⋮) */
.vertical-dots {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: #fff; /* Ajusta según tu tema */
  cursor: pointer;
  padding: 5px;
}

.vertical-dots:hover {
  color: #ccc;
}

/* Menú desplegable */
.dropdown-menu {
  position: absolute;
  top: 37px; /* Ajusta la posición vertical */
  left: 0;  /* Alinear al lado derecho del contenedor */
  background: #1d1f27; /* Fondo oscuro minimalista */
  border: 1px solid #333;
  border-radius: 4px;
  min-width: 140px;
  z-index: 9999;
  display: none; /* Oculto por defecto */
}

/* Opciones dentro del menú */
.dropdown-menu button {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  text-align: left;
  padding: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

.dropdown-menu button:hover {
  background: rgba(255, 255, 255, 0.1);
}
