@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@300;400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;700&display=swap');

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

/* --- REGLAS CLAVE PARA VISIBILIDAD Y BODY --- */

.hidden {
  display: none !important;
}

.intro-body {
  background-color: #0f0f0f;
  font-family: 'Kanit', sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

/* Estilos para el body de la web principal */
body {
  background-color: #0f0f0f;
  color: #eaeaea;
  font-family: 'Barlow Condensed', sans-serif;
  line-height: 1.6;
  flex-direction: column;
  align-items: center;
  padding-bottom: 3rem;
}

/* ---------------------------------------------------- */
/* --- ESTILOS DEL CHAT INTRODUCTORIO --- */
/* ---------------------------------------------------- */

.chat-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

.chat-container {
  width: 90%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  margin-top: 0;
  padding-top: 0;
  height: 100%;
}

/* --- ESTILOS DEL ENCABEZADO Y AVATAR (Fijo arriba) --- */
.chat-header {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    background-color: #1a1a1a;
    border-bottom: 1px solid #282828;
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
}

.avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.8rem;
}

.header-info h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.0;
    font-family: 'Kanit', sans-serif;
}

.status-online {
    font-size: 0.75rem;
    color: #888888;
    margin-top: 0;
    line-height: 1;
    font-family: 'Kanit', sans-serif;
}

/* --- CONTENEDOR DE MENSAJES --- */
/* --- CONTENEDOR DE MENSAJES --- */
#chat-messages {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* CRÍTICO: Esto empuja el contenido hacia abajo */
    padding: 1.5rem 0.5rem 10px 0.5rem;
}
/* --- ESTILOS DE BURBUJAS --- */
.chat-bubble {
  background: #282828;
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 18px;
  max-width: fit-content;
  margin-top: 0rem; /* <-- Asegura que esté cerca de la burbuja */
  margin-bottom: 0.5em;
  font-size: 1rem;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  align-self: flex-start;
  animation: fadeIn 0.4s ease;
  border-top-left-radius: 4px;
}

.chat-bubble span {
    font-weight: bold;
    color: #cccccc;
}

/* --- BOTÓN FINAL "QUIERO VER MÁS" (POSICIÓN CORREGIDA) --- */
#final-button {
  display: flex;
  justify-content: flex-end; 
  
margin-top:0;
  margin-bottom:0;
  padding-right: 0.5rem; 
}
#final-button button {
  background: #505050;
  color: #fff;
  padding: 0.7rem 1.5rem;
  border-radius: 18px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Kanit', sans-serif;
  max-width: fit-content;
  width: auto;
  outline: none; 
  margin:0;
}
#final-button button:hover {
  background: #606060;
}

/* --- FOOTER DEL CHAT (CAMPO DE ENTRADA FIJO ABAJO) --- */
.chat-footer {
    /* CRÍTICO: Posicionamiento Fijo para pegarlo abajo */
    position: fixed; 
    bottom: 0;
    
    /* Centrado Horizontal (usando left/transform) */
    left: 50%;
    transform: translateX(-50%);

    /* Mantenemos el ancho del chat-container para que coincida */
    width: 90%;
    max-width: 420px; 
    
    background-color: #0f0f0f;
    
    /* CRÍTICO: Ajustamos el padding para reducir el espacio vacío */
    padding: 0.5rem 0.5rem 0.8rem 0.5rem;

    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.user-input {
  background-color: #3f3f3f;
  padding: 0.8rem;
  border-radius: 18px;
  max-width: 100%;
  margin-bottom: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  display: flex !important;
  align-items: center;
}

.user-input input {
  flex: 1; /* Esto hace que ocupe todo el espacio */
  padding: 0.6rem;
  /* ... (resto de estilos) ... */
  font-size: 16px !important;
}

/* Elimina el borde azul/outline al hacer foco en el input */
.user-input input:focus {
  outline: none;
  box-shadow: none; /* Esto asegura que no haya sombras por foco */
  border: none; /* Asegura que no haya bordes de foco */
}

.user-input button {
  padding: 0.6rem 1rem;
  margin-left: 0.5rem;
  background: #505050;
  color: #fff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  outline: none;
  font-family: 'Kanit', sans-serif;
  transition: background 0.2s;
}

/* --- ANIMACIONES --- */
@keyframes fadeIn {
  from {opacity: 0; transform: translateY(5px);}
  to {opacity: 1; transform: translateY(0);}
}

/* --- ESTILOS DEL CONTENIDO PRINCIPAL WEB --- */

.titulo {
  text-align: center;
  margin: 0.5rem 0 0.3rem;
  font-family: "Kanit", sans-serif;
}
.titulo h2 {
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: uppercase;
}

.poema {
  padding: 1.5rem;
  width: 90%;
  max-width: 600px;
  font-size: 0.85rem;
  line-height: 1.8;
  margin-bottom: 0.5rem;
  /* CRÍTICO: Alineación justificada */
  text-align: justify; 
  /* CRÍTICO: Asegura que la fuente se aplique correctamente */

}

.carrusel {
margin: 0.5rem auto;
  overflow: hidden;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
}

.carrusel-contenedor {
  display: flex;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.carrusel-contenedor img {
  flex: 0 0 100%;
  height: 400px;
  scroll-snap-align: center;
  border-radius: 12px;
  object-fit: cover;
  width: 100%;
}

.frase-final {
  text-align: center;
  margin: 2rem 0;
  font-family: "Kanit", sans-serif;
}

.frase-final h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: "Kanit", sans-serif;
}

footer {
  text-align: center;
  font-size: 1rem;
  opacity: 0.8;
  padding-top: 0.5rem;
  font-family: "Kanit", sans-serif;
}
footer a {
  color: #999;
  text-decoration: none;
  font-family: "Kanit", sans-serif;
  display: inline-block;
}
footer a.biblio {
    font-size: 1.2rem;
    font-weight: 700; /* Opcional: hacerlo negrita */
}