body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Cinzel', serif;
    overflow-x: hidden;
    overflow-y: hidden;
    -webkit-font-smoothing: antialiased; 
    -webkit-tap-highlight-color: rgba(0,0,0,0);

  }

  .leaflet-container {
    background-image: url(img/wallpaper.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  
  #map {
    height: 100vh;
    width: 100%;
    transition: filter 0.5s ease;
  }

  
  #map.blurred {
    filter: blur(2px) brightness(0.7);
    pointer-events: none;
}

.custom-icon img {
  border-radius: 50%; /* Bordes redondeados para los iconos */
  box-shadow: 0 4px 10px rgba(78, 78, 78, 0.041); /* Sombra para los iconos */
  transition: transform 0.3s ease; /* Efecto de transformación suave */
}

.custom-icon img:hover {
  transform: scale(1.1); 
}
  
#info-panel {
  position: absolute;
  top: 0;
  right: -350mm; /* Oculto fuera de la pantalla */
  width: 350px;
  height: 100%;
  background: rgba(20, 20, 20, 0.95);
  color: #f5f5f5;
  padding: 30px 20px;
  overflow-y: auto;
  z-index: 999;
  transition: right 0.4s ease-in-out; /* Transición suave */
  transform: translateX(100%);
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.8);
  border-left: 2px solid #6b5e4e;
  scrollbar-width: thin;
  scrollbar-color: #6b5e4e #1a1a1a;
  pointer-events: auto;
}

  #info-panel::-webkit-scrollbar {
    width: 8px;
}

#info-panel::-webkit-scrollbar-thumb {
    background-color: #6b5e4e;
    border-radius: 4px;
}

#info-panel::-webkit-scrollbar-track {
    background-color: #1a1a1a;
}
  
#info-panel.active {
    right: 0;
    transform: translateX(0);
}

#info-panel.active ~ #map {
  pointer-events: none;
}
  
  #info-panel h2 {
    color: #f5c86f;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px #000;
    border-bottom: 1px solid #6b5e4e;
    padding-bottom: 0.5rem;
}

#info-panel p {
    line-height: 1.6;
    font-size: 1rem;
    color: #e0dccc;
    text-align: justify;
}
  
  #close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
  }

  #navbar {
    position: fixed;
    left: -55px; /* Mostrar solo un borde cuando está contraído */
    top: 50%;
    transform: translateY(-50%) !important;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px 10px 20px 20px;
    background: rgba(1, 10, 19, 0.9);
    border-radius: 0 15px 15px 0;
    border: 2px solid #6b5e4e;
    border-left: none;
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.7);
    will-change: left; /* Optimización de rendimiento */
}

#navbar:hover {
    left: 0;
}

.navbar-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-icon {
  display: inline-block;
  padding: 10px;
  margin: 5px;
  font-size: 18px;
  color: #e0dccc;
  background: rgba(50, 50, 50, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, background 0.3s ease;
  cursor: pointer;
}
.nav-icon:hover {
  background: rgba(100, 100, 100, 0.8); /* Cambio de color al pasar el cursor */
  transform: scale(1.1); /* Efecto de zoom */
}
  
.nav-icon:active {
  transform: scale(0.9); /* Efecto de clic */
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5); /* Sombra interna */
}

/* Responsividad */
@media (max-width: 768px) {
  #info-panel {
      width: 100%;
      right: -100%;
      border-left: none;
      box-shadow: none;
  }

  .nav-icon {
      font-size: 16px;
      padding: 8px;
  }
}

@media (max-width: 480px) {
  #info-panel {
      padding: 20px 10px;
  }

  .nav-icon {
      font-size: 14px;
      padding: 6px;
  }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.nav-icon.active {
    transform: scale(1.2) rotate(360deg);
    transition: all 0.3s ease;
}

.nav-icon.unlocked {
    background-color: #4CAF50 !important;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.7);
}

#unlock-all.unlocked::after {
    content: "✓";
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #fff;
    color: #4CAF50;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #4CAF50;
   
}

.divider {
  border: none;
  height: 1px;
  background: #444;
  margin: 40px 0;
}

.seccion-titulo {
  color: #f5c86f;
  font-size: 1.2rem;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
}

.personajes-relacionados {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 15px 0;
}

.personajes-relacionados img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 2px solid #999;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.personajes-relacionados img:hover {
  transform: scale(1.1);
  border-color: #f5c86f;
}

.destacados-contenedor {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.destacado-item {
  display: flex;
  flex-direction: column;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.destacado-item:hover {
  background: #2a2a2a;
  transform: scale(1.02);
}

.destacado-item img {
  width: 100%;
  height: auto;
  display: block;
}

.destacado-item .info {
  padding: 10px 15px;
}

.destacado-item .info .titulo {
  font-size: 1rem;
  color: #f5c86f;
  font-weight: bold;
}

.destacado-item .info .subtitulo {
  font-size: 0.85rem;
  color: #ccc;
}

/* Modal Styles */

.modal-destacado,
.modal-personaje {
  display: none; 
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8); 
  opacity: 0; 
  z-index: 1000;
  background: linear-gradient(135deg, #222, #444); 
  padding: 30px;
  border-radius: 15px; 
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7); 
  transition: transform 0.4s ease, opacity 0.4s ease; 
  max-height: 90%; 
  overflow-y: auto; 
  scrollbar-width: none;
  -ms-overflow-style: none; /* Para navegadores IE y Edge */
}



.modal-destacado.active,
.modal-personaje.active {
  display: block; 
  opacity: 1; 
  transform: translate(-50%, -50%) scale(1); 
}

.modal-contenido {
  background: rgba(0, 0, 0, 0.85); /* Fondo semitransparente */
  max-width: 800px; /* Tamaño más compacto */
  width: 100%;
  display: flex;
  flex-direction: column; /* Cambiar a columna para mejor diseño */
  overflow: hidden;
  border: 2px solid #555; /* Bordes más visibles */
  border-radius: 15px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8); /* Sombra más intensa */
  position: relative;
}

.modal-personaje .modal-imagen-portada {
  width: 100%;
  height: 300px; /* Altura fija para la imagen de portada */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-bottom: 2px solid #555; /* Separador entre la portada y el texto */
  background-color: #000;
}

.modal-personaje .modal-imagen-portada img {
  max-width: 100%; 
  max-height: 100%; 
  object-fit: contain; 
  display: block;
}

/* Texto Modal*/

.modal-texto {
  padding: 20px;
  color: #eee;
  text-align: justify; /* Justificar el texto para un estilo más profesional */
  overflow-y: auto; /* Habilitar scroll si el contenido excede la altura */
  flex-grow: 1; /* Permitir que el texto ocupe el espacio restante */
}

.modal-texto h4 {
  font-size: 2rem; /* Título más grande */
  color: #f5c86f; /* Color dorado para destacar */
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1.5px; /* Espaciado entre letras */
}

.modal-texto p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 15px; /* Espaciado entre párrafos */
}

.modal-texto img {
  max-width: 100%; /* Ajustar el ancho de las imágenes */
  max-height: 300px; /* Limitar la altura máxima de las imágenes */
  object-fit: contain; /* Ajustar la imagen dentro del contenedor sin recortar */
  border-radius: 10px; /* Bordes redondeados */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Sombra para las imágenes */
  margin: 20px 0; /* Espaciado entre la imagen y el texto */
}

.modal-cerrar {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #f5c86f; /* Color dorado para el botón de cerrar */
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-cerrar:hover {
  color: #fff; /* Cambiar a blanco al pasar el mouse */
}

/* Responsive  */

@media (max-width: 768px) {
  .modal-contenido {
    max-width: 90%; /* Ajustar el ancho en pantallas pequeñas */
    padding: 20px;
  }

  .modal-texto h4 {
    font-size: 1.5rem; /* Reducir el tamaño del título */
  }

  .modal-texto p {
    font-size: 0.9rem; /* Reducir el tamaño del texto */
  }
}

@media (max-width: 480px) {
  .modal-contenido {
    padding: 15px;
  }

  .modal-texto h4 {
    font-size: 1.2rem; /* Reducir aún más el tamaño del título */
  }

  .modal-texto p {
    font-size: 0.8rem; /* Reducir el tamaño del texto */
  }
}

