* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  height: 100vh;
  font-family: Arial, sans-serif;
  background-image: url('wall.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #000;

/* cada sección ocupa el mismo ancho en vertical */
.seccion {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
  padding: 20px;
  background: transparent;
  color: #000;
}

/* estilos del formulario SOLO dentro de la sección blanca */
.formulario {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: #f2f2f2;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 300px;
  font-size: 1rem;
  font-weight: normal;
  color: black;
}

.formulario h2 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: bold;
}

.formulario label {
  font-weight: bold;
  font-size: 0.9rem;
}

.formulario input {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

.formulario button {
  padding: 10px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
}

.formulario button:hover {
  background-color: #45a049;
}

/* cajita donde mostramos el IMC debajo del botón */
.resultado-imc {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px;
  font-size: 0.9rem;
  color: #000;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
  min-height: 40px;
}
/* recuadro de la recomendación (columna azul) */
.recuadro-recomendacion {
  background-color: rgb(106, 99, 99);
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 10px;
  padding: 20px;
  width: 85%;
  font-size: 1rem;
  font-weight: normal;
  color: #fff;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 90%; /* mantiene proporción vertical visible */
}

/* título del estado */
.recuadro-recomendacion h2 {
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  flex-shrink: 0;
}

/* texto que puede hacer scroll */
.texto-recomendacion {
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: normal;
  white-space: pre-wrap;
  overflow-y: auto;      /* <-- permite scroll vertical */
  flex-grow: 1;          /* ocupa el espacio sobrante */
  padding-right: 10px;   /* un poco de margen para el scroll */
}

/* ------- GRAFICA ZONA ROJA ------- */

.grafica-wrapper {
  background-color: rgba(106, 99, 99);
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
  padding: 10px 15px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 85%;
  max-width: 95%;
}

.titulo-grafica {
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 10px;
  text-align: center;
}

#graficoIMC {
  background-color: #ffffff;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
}

.leyenda-imc {
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: normal;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(0,0,0,0.2);
  border-radius: 5px;
  padding: 4px 6px;
  font-weight: bold;
  font-size: 0.8rem;
  line-height: 1;
  color: #fff;
}
.badge-bajo::before {
  content: "●";
  color: #99c9ff; /* azul claro */
}
.badge-salud::before {
  content: "●";
  color: #6ad171; /* verde */
}
.badge-sobre::before {
  content: "●";
  color: #f4e266; /* amarillo */
}
.badge-obes::before {
  content: "●";
  color: #e15b5b; /* rojo */
}
