@import url('https://fonts.googleapis.com/css2?family=Atomic+Age&family=Baumans&family=Gugi&family=Offside&family=Orbitron:wght@400..900&display=swap');

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

body {
  background:#1b485d;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Offside', sans-serif;
}

.header-container {
    background-color: #1b485d; 
    padding: 10px;
    text-align: right;
    font-family: "Gugi", sans-serif;
    font-size: 20px;
    color:#ffffff;
    text-shadow: 0 0 15px #66c3ff;
    letter-spacing: 1px; 
}

.SecondContainer {
    display: flex;
    flex-wrap: wrap;
    background-color: #2b6e8f;
    box-shadow: 0 0 10px #66c3ff; 
    padding: 0%;
}

.description-container {
  position: relative; 
  flex: 1;
  max-width: 100%;
  max-height: 400px;
  padding: 20px;
  margin: 0px; 
  background-image: url(assets/img/SFD.png); 
  background-size: cover;
  box-shadow: 0 0 10px #66c3ff;
  overflow: hidden; 
}

.description-container::before {
  content: ""; 
  position: absolute; 
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 245, 245, 0.3); 
  z-index: 1; 
}

h2, h3 {
  position: relative;
  z-index: 2; 
  color: #000000;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 16px;
}

label {
    display: none;
}

.button-container {
    display: flex;
    justify-content: center; 
    align-items: center; 
    height: 14vh; 
    flex-wrap: wrap;

}

#buttonClear {
    justify-content: center;
    align-items: center;
    display: inline-flex;
    background-color: #EB455F;
    color: #FCFFE7;
    font-family: "Gugi", sans-serif;
    font-size: 70%;
    padding: 6px 10px;
    margin: 2px 20px 15px 10px;
    border: 0;
    border-radius: 15px;
    width: 20%; 
    height: 35px;
    text-align: center;
    overflow: hidden;
  }

  #ChatGrupal{
    justify-content: center;
    align-items: center;
    display: none; /*esconder el botón para continuar desarrollo a futuro*/
    background-color:#FCFFE7;
    color: #EB455F;
    font-family: "Gugi", sans-serif;
    font-size: 70%;
    padding: 6px 10px;
    margin: 2px 20px 15px 10px;
    border: 0;
    border-radius: 15px;
    width: 20%;
    height: 35px;
    text-align: center;
  }

  #buttonStats {
    justify-content: center;
    align-items: center;
    display: inline-flex;
    background-color: #FCFFE7;
    color: #EB455F;
    font-family: "Gugi", sans-serif;
    font-size: 70%;
    padding: 6px 10px;
    margin: 2px 20px 15px 10px;
    border: 0;
    border-radius: 15px;
    width: 20%;
    height: 35px;
    text-align: center;
  }

#buttonClear:hover {
  background-color: #fff;
  border: 2px solid #EB455F;
  color: #EB455F;
  cursor: pointer;
}

#buttonStats:hover,
#ChatGrupal:hover {
  background-color: #fff;
  border: 2px solid #EB455F;
  color: #1b485d;
  cursor: pointer;
}

ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px; 
    list-style-type: none;
    padding: 0;
    text-align: center;
    margin: 5px; 
  }

li {
    margin: 10px;
    padding: 10px;
    border: 1px solid #2b6e8f;
    box-shadow: 0 4px 8px #66c3ff;
    background-color: #ffffff;
    width: 100%;
    max-width: 250px; 
    text-align: center;
    transition: transform 0.2s;
}

.item-style:hover {
    transform: scale(1.05); 
  }

.item-style img {
    width: 100%;
    height: auto; 
    max-height: 250px; 
    margin-bottom: 0px;
    box-shadow: 0 4px 8px #68b0e0;
  }

.item-style h3, .item-style h4, .item-style p {
    margin: 10px;
    text-align: left;
  }

.item-style h3, .item-style h4 {
    font-family: "Gugi", sans-serif;
  }

.item-style h3 {
    color: #333;
    font-size: 18px;
  }

.item-style p {
    color: #666;
    font-family: "Offside", sans-serif;
    font-size: 12px;
  }

.item-style h4 {
    color: #EB455F;
    font-size: 14px;
}

footer {
    font-family: "Atomic Age", system-ui;
    font-weight: 400;
    font-size: 0.8em;
    color: #FCFFE7;
    padding: 20px 30px;
    border: 1px solid #1f5a75;
    box-shadow: #2b6e8f;
    margin-top: auto;  
    position: static; 
    width: 100%;
    text-align: center;
}

select {
    font-family: "Gugi", sans-serif;
    font-size: 16px; 
    padding: 10px; 
    font-size: 12px; 
    border-radius: 5px; 
    border: 2px solid #52a5dd;
    justify-items: center;
    align-items: center;
    margin : 5% 0 5% 10%;
    width: 75%;
    
  }

.API {
  margin : 5% 0 5% 40%;
  overflow: hidden;
}

#results {
  text-align: center;
  padding: 20px;
}

.highlight {
  font-size: 32px;
  font-weight: bold; 
  color: #EB455F;
}

.sizing {
  font-size: 10px;
  padding-right: 0.5em;
  text-align: left;
}

.star {
  margin-left: 20px; 
}

.other-facts { /*estilo para facts que no estaban alinéandose bien*/
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* Alinea todos los elementos al final de la línea, es decir, a la derecha */
  padding-left: 4%;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
}

.modal-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); 
  padding: 20px;
  background: #f5f5f5;
  border: 2px solid #ccc;
  border-radius: 8px;
  z-index: 1000;
}

#modal-input {
  width: 100%; 
  padding: 10px;
  margin: 10px 0;
  font-size: 16px;
  border-radius: 2%;
  border: 2px solid #636363; /*NO ME ESTA FUCNIONANDO ESSTE BORDE*/
}

.button-modal {
  width: 100%; 
  padding: 15px;
  font-size: 16px;
  margin: 10px 0;
  cursor: pointer;
  background-color: #eb455f;
  border: 2px solid #EB455F;
  border-radius: 5px;
  color: white;
}

.modal-container.success, .modal-container.error {
  padding: 40px 30px 30px;
}

.modal-content {
  margin: 10px 0;
}

.close-modal {
  position: fixed;
  top: 5px; 
  right: 5px;
  background: #636363;
  padding: 5px;
  cursor: pointer;
  border-radius: 50%; 
}

#modal-section {
  z-index: 500; 
  padding-top: 40px;
}

h1[itemprop="title modal"] {
  color: blue;
  font-size: 18px;
  text-align: center;
  margin-bottom: 20px;
}
h2[itemprop="title2 modal"] {
  color: rgb(102, 102, 102);
  font-size: 12px;
  text-align: center;
  margin-bottom: 20px;
}

/****estilo base chat individual utilizando Mobile First****/
.view { 
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.HomeContainer {
  display: flex;
  gap: 0;
  background-color: #1b485d; 
  padding: 10px;
  font-family: "Gugi", sans-serif;
  font-size: 20px;
  color:#ffffff;
  text-shadow: 0 0 15px #66c3ff;
  letter-spacing: 1px; 
  border: 2px solid rgba(102, 195, 255, 0.5);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 100%;
}

.HomeContainer button{
  background-color: transparent; 
  border: 2px solid transparent; 
  color: #fff; 
  font-size: 20px; 
  cursor: pointer; 
}

.DescriptionChat {
  display: flex;
  max-width: 100%;
  width: 100%;
  background-color: #ffffff;
  max-height: 45vh;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.imagenCard {
  padding: 0 2%;
  max-width: 100%;
  height: auto; 
  max-height: 20vh; /*reduce altura en móviles*/
  margin-top: 2%;
}

.chat-window {
  display: flex;
  flex-direction: column;
  max-height: 50vh;
  min-height: 40vh;
  margin-top: 1%; /*ajuste para evitar que tape el header*/
  border: 1px solid #ddd; /*agregar un borde alrededor del chat*/
}

.HeaderChat {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  max-width: 100%;
  background-color: rgb(238, 233, 228);
  flex-direction: row; /*mantiene los elementos en fila*/
  padding: 10px;
}

.ImagenChat {
  width: 20%; /* ajuste para pantallas móviles */
  height: 50px;
  border-radius: 50%;
  margin-right: 10px;
  /* margin-top: 1%;
  margin-left: 3%; */
  object-fit: cover; /* ajusta la imagen para que se mantenga dentro del contenedor */
}

.chat-info {
  display: flex;
  flex-direction: column; /*pone a .PersonajeChat y .status uno debajo del otro */
  justify-content: center; /*slinea verticalmente ambos elementos en el centro */
}

.PersonajeChat, .status {
  margin: 0; /*elimina márgenes para que no afecten la disposición */
  font-weight: bold;
  font-size: 14px;
}

.status{
  margin-top: 1%;
  text-align: left;
  font-size: 12px;
  color: #666; /*color más claro para diferenciar del nombre */
}

.message-container {
  flex-grow: 1; /*permite que este contenedor ocupe el espacio disponible */
  padding: 10px;
  overflow-y: auto; /*permite desplazamiento si hay muchos mensajes */
  background-color: #66c3ff; /*fondo para el área de mensajes */
}

.SendChat {
  display: flex;
  flex-direction: row; /* para que los elementos estén en línea */
  align-items: center;
  padding: 10px;
  background-color: #66c3ff;/* #fff;*/
  border-top: 1px solid #ddd; /* separador superior */
}

.SendChat input[type="text"] {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-right: 10px;
  font-size: 12px; 
}

.SendChat input[type="submit"] {
  padding: 10px;
  border: none;
  background-color: #fafafa; /*#007bff;*/
  color: rgb(131, 123, 123);
  border-radius: 5px;
  cursor: pointer;
}

.SendChat input[type="submit"]:hover {
  background-color: #0056b3;
}

.chat-message.user-message {
  background-color: #ffffff;
  align-self: flex-end;
  text-align: left;
  border-radius: 8px;
  max-width: 80%;
  margin-bottom: 10px;
  padding: 10px;
  margin-left: auto;
}

.chat-message.ai-message {
  background-color: #d8d8d8;
  align-self: flex-start;
  text-align: left;
  border-radius: 8px;
  max-width: 80%;
  margin-bottom: 10px;
  padding: 10px;
  margin-right: auto;
}

section p[itemprop="description"]  {
 width: 100%; 
 font-size: 0.8rem; 
 color: #000000; 
 line-height: 1.6; 
 padding: 0 5%;
 text-align: justify;
 margin-top: 5%;
 margin-bottom: 5%;
}

section p[itemprop="containsSeason"], p[itemprop="year"], p[itemprop="rating"] {
 display: none;
 margin-bottom: 3%;
}

/* Media queries para tablets y desktop */
@media (min-width: 768px) {
  .HomeContainer {
    flex-direction: row; /* Cambia a dos columnas */
    width: 100%;
    justify-content: flex-start; /* Mantiene los elementos a la izquierda */
    align-items: center; /* Alinea verticalmente los elementos */
  }

  .HomeContainer p {
    margin-left: 10px; /*mantiene un espacio entre el botón y el texto */
  }

  .DescriptionChat {
    width: 50%; /* Ocupa la mitad del ancho disponible */
    min-height: 85vh;
  }

  .imagenCard {
    max-height: 40vh; /*aumento altura en móviles*/
    margin-top: 4%;
  }

  .chat-window {
    margin-top: 10px; /* Espacio para evitar que tape HomeContainer */
    width: 50%; /* Ocupa la otra mitad del ancho disponible */
    margin-left: 50%; /* Desplaza el chat a la derecha */
    position: absolute;
    margin-top: 108px; /* Alinea la ventana de chat en la parte superior */
    min-height: 85vh;
  }

  .HeaderChat {
    padding: 15px;
  }

  .ImagenChat {
    width: 10%; /* Ajuste para pantallas más grandes */
    max-height: 70px;
  }

  .PersonajeChat {
    font-size: 18px;
  }

  .status {
    font-size: 14px;
  }

  .SendChat {
    flex-direction: row;
    justify-content: space-between;
  }

  section p[itemprop="containsSeason"], p[itemprop="year"], p[itemprop="rating"] {
    display: flex;
    width: 100%; 
    font-size: 0.8rem; 
    color: #000000; 
    line-height: 1.6; 
    padding: 0 5%;
    text-align: justify;
   }
}