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

body {
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.weather-container {
  width: 100%;
  max-width: 500px;
  background: white;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.header {
  background: #0d3b66;
  color: white;
  padding: 20px;
}

.search-box {
  display: flex;
  gap: 10px;
  padding: 15px;
}

.search-box input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 16px;
}

.search-box button {
  background: #2f89b8;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
}

.loader {
  width: 50px;
  height: 50px;
  border: 6px solid #dddddd;
  border-top-color: #0d3b66;
  border-radius: 100%;
  animation: spin 1s linear infinite;
  margin: auto;
  margin-top: 5rem;
  margin-bottom: 8rem;
  display: none;
}

.error {
  margin-top: 5rem;
  margin-bottom: 8rem;
  text-align: center;
  color: red;
  display: none;
}

@keyframes spin {
  0% {
    transform: rotate(0deg); /* Starting position */
  }
  100% {
    transform: rotate(360deg); /* One complete full turn */
  }
}

.weather-card {
  margin: 15px;
  background: #2f89b8;
  color: white;
  text-align: center;
  padding: 30px 20px;
  border-radius: 20px;
  display: none;
}

.weather-card .icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.weather-card h2 {
  margin-bottom: 10px;
}

.weather-card h1 {
  font-size: 60px;
  margin-bottom: 10px;
}

.weather-card p {
  color: #e7e7e7;
}

.stats {
  margin: 15px;
  background: white;
  border: 1px solid #eee;
  border-radius: 18px;
  display: flex;
  justify-content: space-around;
  padding: 20px;
  display: none;
}

.stats div {
  text-align: center;
}

.stats p {
  color: gray;
  margin-bottom: 8px;
}

.stats h3 {
  color: #0d3b66;
}

.forecast-title {
  padding: 0 20px;
  margin-bottom: 15px;
  color: #555;
  display: none;
}

.forecast-item {
  margin: 12px 15px;
  background: white;
  border: 1px solid #eee;
  border-radius: 15px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
}

.forecast-item strong {
  color: #0d3b66;
}
