html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Roboto', 'Orbitron', Arial, sans-serif;
  color: #f4f4f4;
  background-image: url('Image/Estrellas.png');
  background-size: cover;
  background-repeat: no-repeat;
}

#contenido-principal {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  min-height: 0;
}

main {
  flex: 1 1 auto;
  overflow-y: auto;
  text-align: center;
  padding: 20px 0 60px 0; /* padding inferior para dejar espacio al footer */
  
}

footer a{
  text-decoration: none;
  color: #3cefff;
}

/* MODAL */
.modal-instrucciones {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(22,29,48,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-contenido {
  background: rgba(36,47,70,0.92);
  padding: 30px;
  border: 3px solid #3cefff;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  color: #f4f4f4;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.modal-contenido h2 { text-align:center; margin-bottom:16px; color:#3cefff; }
.modal-contenido ol { margin:16px 0; padding-left:20px; line-height:1.4; }
.modal-contenido button {
  display:block;
  margin:20px auto 0;
  padding:10px 24px;
  background-color:#3cefff;
  color:#232f46;
  border:none;
  border-radius:6px;
  cursor:pointer;
  font-weight: bold;
}
.modal-contenido button:hover { background-color:#f4c542; color:#161d30; }

/* Galeria e imágenes */
.galeria { display:flex; justify-content:center; align-items:flex-end; gap:70px; }
#Mano { width:auto; height:300px; margin-bottom: 100px; }
#Pluma { width:auto; height:200px; margin-bottom: 130px;}
#modelo-container { width:400px; height:535px; margin:auto; }

/* Chat container */
#chat-container {
  width:600px;
  max-height:520px;
  background:#232f46;
  border:1px solid #3cefff;
  display:flex;
  flex-direction:column;
  padding:10px;
  border-radius: 14px;
  color: #f4f4f4;
  box-shadow: 0 0 28px #161d3080;
  margin-bottom: 72px; /* MÁS alto que el footer */

}
#chat-history { flex:1; overflow-y:auto; margin-bottom:10px; }
.msg { margin:20px 10px; font-size:0.9em; }
.msg.user { text-align:right; }
.msg.bot { text-align:left; }
#spinner {
  display: none;
  text-align: center;
  margin: 10px 0;
}
#start-btn:hover { background:#3cefff; color:#161d30; }

h1, h2, .header-content h1 {
  text-shadow: 0 0 24px #3cefff, 0 0 4px #fff;
}




/* ---------- RESPONSIVO PARA MOBILE Y TABLET ---------- */
@media (max-width: 1024px) {
  .galeria {
    gap: 32px;
  }
  #chat-container {
    width: 90vw;
    max-width: 400px;
  }
  #modelo-container {
    width: 95vw;
    max-width: 280px;
    height: 390px;
  }
  #Mano, #Pluma {
    height: 170px;
    max-width: 40vw;
  }
}

@media (max-width: 768px) {
  main {
    padding: 8px;
  }
  .galeria {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  #chat-container {
    width: 96vw;
    max-width: 340px;
    padding: 7px;
    margin-bottom: 90px;

  }
  #modelo-container {
    width: 86vw;
    max-width: 220px;
    height: 300px;
  }
  #Mano, #Pluma {
    height: 100px;
    max-width: 60vw;
  }
}
  footer {
    min-height: 24px;
    font-size: 0.72em;
  }

@media (max-width: 480px) {
  .modal-contenido {
    padding: 10px;
    max-width: 96vw;
  }
  .header-content h1 {
    font-size: 1.4em;
  }
  nav ul {
    gap: 7px;
    font-size: 0.92em;
    padding: 0 5px;
  }
  #chat-container,
  #modelo-container {
    min-width: 0;
    width: 97vw;
    max-width: 99vw;
    padding: 4px;
    height: auto;
  }
  main {
    padding: 4px;
  }
  .galeria {
    gap: 7px;
  }
}
