.weather-widget {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(5px);
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr 1fr;
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
}

.weather-icon {
  grid-row: 1;
  grid-column: 1;
  font-size: 24px;
  line-height: 1;
  justify-self: start;
}

.weather-city {
  grid-row: 1 / 3;
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(18px, 4.5vw, 22px);
  font-weight: 700;
  color: #333;
  line-height: 1.1;
  text-align: center;
}

.weather-temp {
  grid-row: 1;
  grid-column: 3;
  font-size: 16px;
  font-weight: 700;
  color: #333;
  justify-self: center;
  text-align: center;
}

.weather-wind,
.weather-desc,
.weather-time {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  white-space: nowrap;
}

.weather-wind {
  grid-row: 1;
  grid-column: 4;
  justify-self: center;
  text-align: center;
}

.weather-desc {
  grid-row: 2;
  grid-column: 1;
  justify-self: start;
}

.weather-humidity {
  grid-row: 2;
  grid-column: 3;
  font-size: 16px;
  font-weight: 700;
  color: #333;
  justify-self: center;
  text-align: center;
}

.weather-time {
  grid-row: 2;
  grid-column: 4;
  justify-self: center;
  text-align: center;
}

.weather-loading,
.weather-error {
  grid-row: 1 / 3;
  grid-column: 1 / -1;
  justify-self: center;
}

.weather-loading {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #666;
}

.weather-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.weather-error {
  font-size: 12px;
  color: #d32f2f;
}
