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

:root {
  --primaria: #34a8eb;
  --secundaria: #34c9eb;
}

header {
  display: flex;
  align-items: center;
  padding: 1rem;
}

nav {
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

body {
  background-image: linear-gradient(to bottom, var(--primaria), #ffffff);
  background-repeat: no-repeat;
  min-height: 100vh;

  font:
    400 1rem "Inter",
    sans-serif;
}

.titulo {
  color: #ffffff;
}

.titulo span {
  color: var(--secundaria);
}

#home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: 4rem 1rem 1.5rem 1rem; 

  font-weight: 600;
  font-size: 2rem;
  color: #ffffff;
  text-align: center;
}

#clima {
  display: flex;

  flex-direction: column; 
  justify-content: center;
  align-items: center;
  
  margin-top: 0.5rem; 
  padding: 0 1rem 2rem 1rem;
}

#clima form {
  display: flex;
  flex-direction: column;
  gap: 15px;

  background-color: var(--secundaria);

  padding: 30px;
  border-radius: 12px;
  width: 100%;
  max-width: 350px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

#clima input,
#clima button {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 16px;
  box-sizing: border-box;
}

#clima button {
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
}

#resultado-clima {
  display: none; /* JS muda para 'flex' */
  flex-direction: column;
  text-align: center;
  align-items: center;
  justify-content: center;

  background-color: var(--secundaria);
  color: #ffffff;
  border-radius: 12px;
  
  /* Diminuímos o padding vertical e aproximamos o card do form */
  padding: 16px 24px; 
  gap: 8px;
  
  /* MARGEM AQUI: 1rem no topo aproxima o card do formulário */
  margin: 1rem auto 0 auto; 
  
  width: 100%;
  max-width: 350px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); 
}