* {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  background-color: rgb(0, 124, 196);
  background-size: 500%;
  padding: 1rem;
}

.card-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 6rem;
  padding-bottom: 1rem;
}

.card {
  background-color: #334155;
  display: flex;
  flex-direction: column;
  border-radius: 0.5rem;
  width: 100%;
  box-shadow: 3px 10px 23px -4px rgba(0, 0, 0, 0.38);
  -webkit-box-shadow: 3px 10px 23px -4px rgba(0, 0, 0, 0.38);
  -moz-box-shadow: 3px 10px 23px -4px rgba(0, 0, 0, 0.38);
}

.card h1 {
  text-align: center;
  letter-spacing: -1px;
  line-height: 1;
  color: white;
  font-size: 1.4rem;
  padding-top: 1.8rem;
  position: relative;
}

.search {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 1rem;
  gap: 0.8rem;
  padding-bottom: 1rem;
}

.search input {
  border: 0;
  outline: 0;
  background: #ebfffc;
  color: #555;
  padding: 0.5rem;
  border-radius: 10px;
  font-size: 0.8rem;
}

.search button {
  border: 0;
  outline: 0;
  padding: 0.5rem;
  background: #ebfffc;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.search button svg {
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  stroke: #334155;
}

.search button:hover {
  transform: scale(1.05);
}

#error p {
  padding-left: 2.5rem;
  font-size: 0.8rem;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
  color: rgb(179, 41, 41);
  display: none;
}

.information {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  display: none;
}

.countries-info h1 {
  font-size: 2.5rem;
  padding-bottom: 1rem;
}

.countries-info img {
  width: 50%;
  margin-left: 5rem;
  border-radius: 10px;
}

#details {
  padding: 1rem;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  gap: 0.1rem;
}

#details p span {
  font-weight: bold;
}

.weather {
  padding: 1rem;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  color: white;
}

.clima {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.clima img {
  width: 15%;
}

#img-png {
  padding-top: 3rem;
  width: 100%;
  display: block;
}

.alert-msg {
  color: white;
  font-size: 15px;
  padding-top: 2rem;
  text-align: center;
  display: none;
}

.country-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin: 5px 0;
  background-color: #f5f5f5;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: background 0.2s ease;
  cursor: default;
}

.country-item:hover {
  background-color: #e0e0e0;
}

.country-item img {
  width: 32px;
  height: 20px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.country-item span {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

@media (min-width: 375px) {
  .countries-info img {
    margin-left: 5.5rem;
  }
}

@media (min-width: 425px) {
  .countries-info img {
    margin-left: 6.5rem;
  }
}

@media (min-width: 640px) {
  .card {
    max-width: 1000px;
  }
}

@media (min-width: 768px) {
  .card h1 {
    font-size: 2.5rem;
  }

  #img-png {
    width: 50%;
  }

  .countries-info img {
    margin-left: 11.5rem;
  }
}

@media (min-width: 1024px) {
  .search input {
    width: 300px;
    height: 40px;
  }

  .information img {
    width: 30%;
  }

  .clima img {
    width: 5%;
  }

  #img-png {
    width: 30%;
  }

  .countries-info img {
    margin-left: 22rem;
  }
}
