/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background: linear-gradient(to right, #a8edea, #fed6e3);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Container principal */
.container {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 420px;
  width: 100%;
  text-align: center;
}

/* Header */
header h1 {
  font-size: 28px;
  margin-bottom: 8px;
  color: #333;
}

header h1 span {
  color: #00796b;
}

header p {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
}

/* Formulário */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

label {
  text-align: left;
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

input,
select,
button {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

button {
  background-color: #00796b;
  color: white;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background-color: #004d40;
}
/* Garante espaço para o loading/resultado, evitando saltos de layout */
#resultado {
  min-height: 90px;
}
#resultado {
  margin-top: 20px;
  padding: 20px;
  background: #fff;             /* fundo branco */
  border: 1px solid #ddd;       /* borda cinza leve */
  border-radius: 10px;          /* cantos arredondados */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* sombra leve */
  text-align: left;
  white-space: pre-line;        /* mantém quebras de linha */
  overflow-wrap: break-word;    /* quebra palavras longas */
}

#resultado h3 {
  margin-bottom: 12px;
  color: #00796b;
  font-size: 18px;
}

/* Estado de erro no mesmo cartão */
.resultado-card.erro {
  border-color: #f3b1b1;
  background: #fff5f5;
}

/* Loading (spinner + texto) dentro do #resultado */
.loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  color: #333;
  font-weight: 500;
}

/* O spinner circular */
.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #e0e0e0;
  border-top-color: #00796b;   /* cor do destaque */
  border-radius: 50%;
  animation: spin .9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsividade */
@media (max-width: 480px) {
  .container {
    max-width: 95%;
    padding: 20px;
  }

  header h1 {
    font-size: 22px;
  }

  input,
  select,
  button {
    font-size: 13px;
  }
}
