/* Reset e base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to right, #1f4037, #99f2c8);
  color: #fff;
  line-height: 1.6;
}

/* Estrutura principal */
header, main, footer {
  padding: 20px;
}
.container {
  width: 100%;
  max-width: 500px;
  margin: auto;
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Títulos */
h1, h2 {
  text-align: center;
  font-size: clamp(1.5rem, 2vw + 1rem, 2.5rem);
  margin-bottom: 10px;
}

/* Formulários */
label {
  display: block;
  margin-top: 10px;
}
input, select, button {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
}
button {
  background-color: #28a745;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}
button:hover {
  background-color: #218838;
}

/* Resultados */
#resultado,
#medidasSalvas,
#tmbResultado,
#macroResultado {
  margin-top: 15px;
  font-weight: bold;
  text-align: center;
}

/* Gráfico */
canvas {
  margin-top: 20px;
  width: 100% !important;
  height: auto !important;
}

/* Botão voltar ao topo */
#topoBtn {
  display: none;
  position: fixed;
  bottom: 15px;
  right: 15px;
  z-index: 99;
  font-size: 14px;
  border: none;
  outline: none;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}
#topoBtn:hover {
  background-color: #0056b3;
}

/* Rodapé */
footer {
  text-align: center;
  font-size: 14px;
  margin-top: 40px;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 10px;
  color: #ffffff;
}

/* Responsividade extra */
@media (max-width: 600px) {
  .container {
    padding: 15px;
  }
  input, select, button {
    font-size: 0.95rem;
  }
  h1, h2 {
    font-size: 1.5rem;
  }
}