* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  min-height: 100vh;
  background: #050816;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px;
}

.background {
  position: fixed;
  inset: 0;
  z-index: -1;
  transition: 0.5s ease;
}

.glow-clear {
  background: radial-gradient(circle at center, rgba(255, 0, 85, 0.18), #02030a 65%);
}

.glow-clouds {
  background: radial-gradient(circle at center, rgba(140, 140, 180, 0.18), #02030a 65%);
}

.glow-rain {
  background: radial-gradient(circle at center, rgba(0, 140, 255, 0.18), #02030a 65%);
}

.glow-fog {
  background: radial-gradient(circle at center, rgba(180, 180, 200, 0.14), #02030a 65%);
}

.glow-storm {
  background: radial-gradient(circle at center, rgba(120, 70, 255, 0.2), #02030a 65%);
}

.glow-snow {
  background: radial-gradient(circle at center, rgba(220, 240, 255, 0.18), #02030a 65%);
}

.container {
  width: 100%;
  max-width: 460px;
}

.card {
  background: rgba(10, 12, 28, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: 0 0 40px rgba(255, 0, 85, 0.12);
}

h1 {
  text-align: center;
  color: #ff4d79;
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.subtitle {
  text-align: center;
  color: #b9b9c9;
  margin-bottom: 24px;
}

.search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.search-box input {
  flex: 1;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  outline: none;
  padding: 0 16px;
  background: #111428;
  color: white;
  font-size: 1rem;
}

.search-box input::placeholder {
  color: #8c8fa3;
}

.search-box button {
  border: none;
  border-radius: 14px;
  padding: 0 20px;
  background: linear-gradient(135deg, #ff1f5a, #ff4d79);
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.25s ease;
}

.search-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 31, 90, 0.3);
}

.message {
  min-height: 24px;
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: #ff7f9f;
}

.loading {
  text-align: center;
  background: #101426;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
  color: #d9d9e5;
}

.hidden {
  display: none;
}

.weather-box {
  margin-top: 12px;
}

.main-weather {
  background: linear-gradient(145deg, #14182e, #101325);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}

.main-weather h2 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.weather-description {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d1d1dc;
  font-size: 1.05rem;
}

#weatherIcon {
  font-size: 1.6rem;
}

.temperature {
  font-size: 3rem;
  color: #ff4d79;
  font-weight: bold;
  white-space: nowrap;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.info-card {
  background: linear-gradient(145deg, #14182e, #101325);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 18px;
}

.info-card span {
  display: block;
  color: #a6a8ba;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.info-card strong {
  font-size: 1.6rem;
  color: white;
}

@media (max-width: 520px) {
  .card {
    padding: 24px 18px;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    height: 52px;
  }

  .main-weather {
    flex-direction: column;
    align-items: flex-start;
  }

  .temperature {
    font-size: 2.6rem;
  }

  .main-weather h2 {
    font-size: 1.6rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}
