@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

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

body {
  font-family: 'Poppins', sans-serif;
  display: grid;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  background-image: url('weather-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* background: rgba(0, 0, 0, 0.3); */
  z-index: -1;
}

#weather-container {
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  /* max-width: 500px; */
  width: 500px;
  animation: fadeIn 0.6s ease-out;
}

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

#location-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

label {
  color: #ffffff;
  font-weight: 500;
  font-size: 1.1rem;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input {
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

input:focus {
  outline: none;
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

button {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: linear-gradient(45deg, #5a67d8, #6b46c1);
}

button:active {
  transform: translateY(0);
}

p {
  text-align: center;
  margin: 1rem 0;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.2rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
#weather-data {
  display: grid;
  gap: 1rem;
  grid-template-areas:
    "city-info"
    "weather-info"
    "temp-info"
    "other-info";
  animation: slideUp 0.6s ease-out 0.3s both;
}

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

#weather-data > * {
  /* visibility: hidden; */
  display: none;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 1rem;
  transition: all 0.3s ease;
}

#weather-data > *:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.city-info {
  grid-area: city-info;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  text-align: center;
}

.city-info div {
  color: #ffffff;
  font-weight: 500;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.weather-info {
  grid-area: weather-info;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
}

.weather-info div {
  color: #ffffff;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.weather-info div:first-child {
  font-size: 1.2rem;
  font-weight: 600;
}

.weather-info img {
  /* width: 80px;
  height: 80px; */
  border: 1px solid grey;
  border-radius: 50%;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.weather-info img:hover {
  transform: scale(1.1);
}

.temp-info {
  grid-area: temp-info;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  text-align: center;
}

.temp-info div {
  color: #ffffff;
  font-weight: 500;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: background 0.3s ease;
}

.temp-info div:hover {
  background: rgba(255, 255, 255, 0.1);
}

.other-info {
  grid-area: other-info;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  text-align: center;
}

.other-info div {
  color: #ffffff;
  font-weight: 500;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: background 0.3s ease;
}

.other-info div:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 780px) {
  #weather-container {
    padding: 1.5rem;
    margin: 1rem;
    width: fit-content;
  }
  
  .temp-info {
    grid-template-columns: 1fr;
  }
  
  label {
    font-size: 1rem;
  }
  
  input, button {
    font-size: 0.9rem;
  }
}
