:root {
  --primary-color: #0077ff;
  --primary-hover-color: #005fcc;
  --background-gradient-start: #c2e9fb;
  --background-gradient-end: #a1c4fd;
  --text-color: #333;
  --container-bg: white;
  --border-color: #ccc;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(to right, var(--background-gradient-start), var(--background-gradient-end));
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  background: var(--container-bg);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 400px;
  text-align: center;
}

#weatherForm {
  display: flex;
  flex-direction: column;
  align-items: center;
}

input {
  width: 90%;
  padding: 0.6rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
}

button {
  padding: 0.6rem 1.2rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
  width: 95%;
}

button:hover {
  background: var(--primary-hover-color);
}

.weather-info {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-color);
}


.weather-visual-container {
  width: 100%;
  height: 150px; /* Adjusted height for the icon */
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.weather-visual {
  width: 150px;  /* Set a fixed width */
  height: 150px; /* Set a fixed height */
  object-fit: contain; /* Use 'contain' to ensure the whole icon is visible */
  border-radius: 0; /* Icons don't need a radius */
  box-shadow: none;   /* Icons don't need a shadow */
}



#cityName {
    font-size: 2rem;
    font-weight: bold;
}

.weather-info p {
  transition: all 0.3s ease;
  margin: 0.5rem 0;
}

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 1rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-message {
    color: red;
    margin-top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}