* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
  color: #333;
}

a {
  text-decoration: none;
  color: #2e7d32;
}

ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.weather-container {
  max-width: 400px;
  padding: 20px;
  margin: 50px auto;
  background-color: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.js-weather-form {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.js-weather-form__label {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 600;
}

input {
  font-family: inherit;
  font-size: 16px;
  margin-top: 5px;
  padding: 8px;
  border: 1px solid #ccc;   
  border-radius: 4px;
}

.button {
  align-self: flex-end;
  padding: 8px 16px;
  background-color: #2e7d32;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 200ms ease;
}

.button:hover {
  background-color: #1b5e20;
}

.card {
  display: grid;
  grid-template-areas:
    "title title"
    "status desc";
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-title {
  grid-area: title;
  font-size: 20px;
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 5px;
}

.card-status-block {
  grid-area: status;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: #f1f8e9;
  padding: 15px;
  border-radius: 8px;
}

.card-icon {
  width: 64px;
  height: 64px;
}

.card-text {
  font-size: 14px;
  text-align: center;
  color: #555;
  font-weight: normal;
}

.card-desc {
  grid-area: desc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  line-height: 1.5;
  background-color: #e3f2fd;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.card-desc p {
  margin: 0;
}

@media (max-width: 400px) {
  .card {
    grid-template-areas:
      "title"
      "status"
      "desc";
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .card-status-block,
  .card-desc {
    width: 100%;
  }

  .card-title {
    font-size: 18px;
  }
}

.error-message {
  background-color: #ffebee;
  color: #c62828;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.4s ease-in-out;
}
