* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: linear-gradient(135deg, #74ebd5, #9face6);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  transition: background 0.5s ease;
}

.container {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.95);
  padding: 30px;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  text-align: center;
}

h1 {
  margin-bottom: 20px;
  color: #333;
  font-size: 48px;
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-box input {
  flex: 1;
  padding: 12px;
  border: 2px solid #d8d8d8;
  border-radius: 10px;
  outline: none;
  font-size: 18px;
}

.search-box button {
  padding: 12px 18px;
  border: none;
  background: #4a90e2;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  transition: 0.3s;
}

.search-box button:hover {
  background: #357abd;
}

.weather-card {
  margin-top: 20px;
  padding: 20px;
  border-radius: 14px;
  background: #f5f7fa;
}

.weather-card h2 {
  margin-bottom: 10px;
  color: #222;
}

.weather-card img {
  width: 100px;
  height: 100px;
}

.weather-card p {
  margin: 10px 0;
  font-size: 18px;
  color: #444;
}

.error {
  color: red;
  margin-top: 12px;
  font-size: 18px;
  font-weight: bold;
}

.hidden {
  display: none;
}

.loading {
  margin-top: 20px;
}

.spinner {
  width: 45px;
  height: 45px;
  border: 5px solid #ddd;
  border-top: 5px solid #4a90e2;
  border-radius: 50%;
  margin: 0 auto 10px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.recent-box {
  margin-top: 25px;
  text-align: left;
}

.recent-box h3 {
  margin-bottom: 12px;
  color: #333;
  font-size: 20px;
}

.recent-box ul {
  list-style: none;
}

.recent-box li {
  background: #eef2f7;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 16px;
}

.recent-box li:hover {
  background: #dce6f2;
}

@media (max-width: 500px) {
  .container {
    padding: 20px;
  }

  h1 {
    font-size: 36px;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box input,
  .search-box button {
    width: 100%;
  }

  .weather-card p {
    font-size: 16px;
  }
}
