/* Reset de Estilos Gerais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #222;
  transition: background 1s ease, color 1s ease;
}

/* Navbar e Cabeçalho */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid #0077ff; 
  transition: background 1s ease, color 1s ease, border-color 1s ease;
}

.logo {
  font-size: 1.4rem;
  font-weight: bold;
  color: inherit;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.menu-links a {
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  transition: color 0.2s ease, transform 0.3s ease;
}

.menu-links a:hover {
  color: #0077ff;
  transform: scale(1.05);
}

/* Ícones Sociais */
.social-icons,
.rodape-icones {
  display: flex;
  gap: 18px;
}

.social-icons .icone,
.rodape-icones .icone {
  width: 28px;
  height: 28px;
  transition: transform 0.2s ease, filter 0.3s ease;
  filter: brightness(0);
}

/* Ícones no modo noturno */
body.night .social-icons .icone,
body.night .rodape-icones .icone,
body.madrugada .social-icons .icone,
body.madrugada .rodape-icones .icone {
  filter: brightness(1) invert(1);
}

.social-icons a:hover .icone,
.rodape-icones a:hover .icone {
  filter: invert(28%) sepia(91%) saturate(3153%) hue-rotate(201deg) brightness(98%) contrast(98%);
  transform: scale(1.05);
}

/* Links de GitHub no Footer */
.github-link {
  color: inherit;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.github-link:hover {
  color: #0077ff;
}

.github-link img {
  width: 28px;
  height: 28px;
  transition: filter 0.3s ease;
  cursor: pointer;
}

.github-link img:hover {
  filter: invert(45%) sepia(85%) saturate(400%) hue-rotate(190deg) brightness(95%) contrast(90%);
}

/* Modo Noturno / Madrugada */
body.night,
body.madrugada {
  color: #fff;
}

body.night .navbar,
body.madrugada .navbar {
  color: #fff;
}

body.night .menu-links a,
body.madrugada .menu-links a {
  color: #fff;
}

/* Main e Layout Principal */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 15px;
}

/* Cards e Estilização Geral */
.card {
  width: 100%;
  max-width: 360px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(12px);
  border-radius: 22px;
  padding: 18px 20px;
  text-align: center;
  box-shadow: 0 18px 35px rgba(0,0,0,0.08);
  transition: background 1s ease, color 1s ease;
  color: inherit;
}

/* FORMULÁRIO DE PESQUISA */
form {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.85);
  border-radius: 30px;
  padding: 6px 13px;
  margin-bottom: 22px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s ease;
}

form:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

form input {
  border: none;
  outline: none;
  flex: 1;
  padding: 10px;
  font-size: 15px;
  background: transparent;
  color: inherit;
}

form input::placeholder {
  color: #888;
}

form button {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}

form button:hover {
  transform: scale(1.1);
}

/* Ícones dentro do formulário */
.local, .lupa {
  font-size: 1.3rem;
  color: #0077ff;
}

/* Clima / Ícones e Temperatura */
.clima-icon {
  width: 140px;
  margin: 19px 0;
  transition: transform 0.3s;
}

.clima-icon:hover {
  transform: scale(1.05);
}

.temp {
  font-size: 62px;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.15);
}

.cidade {
  font-size: 26px;
  font-weight: 400;
  margin-top: -6px;
}

/* Detalhes do Clima */
.detalhes {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.3);
  border-radius: 16px;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 12px rgba(0,0,0,0.03);
}

.col {
  display: flex;
  align-items: center;
  gap: 14px;
}

.col img.icon {
  width: 36px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.12));
}

.col p {
  font-size: 20px;
  font-weight: 600;
}

.col span {
  font-size: 13px;
  color: inherit;
}

/* Footer */
.footer {
  text-align: center;
  padding: 8px 6px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  font-size: 14px;
  color: inherit;
  transition: background 0.8s ease, color 0.8s ease;
  border-top: 2px solid #0077ff;
}

/* Responsividade */
@media (min-width: 1024px){
  .menu-links a {
    font-size: 15px;
  }

  .clima-icon {
    width: 120px;
  }

  .temp {
    font-size: 66px;
  }

  .cidade {
    font-size: 28px;
  }

  .detalhes {
    flex-direction: column;
    gap: 18px;
    align-items: center;
  }

  .col {
    justify-content: center;
  }

  .col p {
    font-size: 22px;
  }
}

@media (max-width: 767px) {
  .logo {
    font-size: 1.2rem;
  }

  .menu-links a {
    font-size: 14px;
  }

  form {
    padding: 5px 12px;
  }

  form input {
    font-size: 14px;
  }

  #nome-cidade {
    font-size: 14px;
  }

  .suggestions-list li {
    padding: 8px 12px;
    font-size: 13px;
  }

  .local, .lupa {
    font-size: 1.1rem;
  }

  .clima-icon {
    width: 100px;
  }

  .temp {
    font-size: 44px;
  }

  .cidade {
    font-size: 20px;
  }

  .detalhes {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .col {
    justify-content: center;
  }

  .col img.icon {
    width: 28px;
  }

  .col p {
    font-size: 18px;
  }

  .col span {
    font-size: 12px;
  }

  .footer {
    font-size: 12px;
    padding: 10px 12px;
  }
}

@media (max-width: 479px) {
  .card {
    padding: 20px 18px;
  }

  form input {
    font-size: 13px;
  }

  #nome-cidade {
    font-size: 13px;
  }

  .suggestions-list li {
    padding: 6px 10px;
    font-size: 12px;
  }

  .temp {
    font-size: 38px;
  }

  .cidade {
    font-size: 18px;
  }

  .clima-icon {
    width: 90px;
  }

  .col p {
    font-size: 16px;
  }

  .col span {
    font-size: 11px;
  }

  .footer {
    font-size: 11px;
    padding: 8px 10px;
  }
}