* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), #92cfff, #5d77ff);
  transition: background 0.1s ease;
  overflow: auto;
  position: relative;
}

/* Snake Canvas should always stay behind all content */
#snakeCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.Weather-container {
  position: relative;
  z-index: 1; /* stay on top of canvas */
  width: 100%;
  max-width: 400px;
  margin: 40px auto;
  padding: 30px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.header {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

#city {
  padding: 12px;
  border-radius: 10px;
  border: none;
  outline: none;
  flex: 1;
  min-width: 160px;
  background-color: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

#search {
  padding: 12px 18px;
  background-color: #5d77ff;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

#search:hover {
  background-color: #2c4eff;
  transform: scale(1.05);
}

.weather-body {
  display: none;
  margin-top: 20px;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.5s ease;
}

.weather-body img {
  width: 150px;
  height: auto;
  animation: float 3s ease-in-out infinite;
}

.temprature {
  font-size: 2.8rem;
  font-weight: bold;
  color: #ffffff;
  margin-top: 15px;
}

.description {
  font-size: 1.2rem;
  color: #f0f0f0;
  margin-bottom: 20px;
  text-transform: capitalize;
}

.weather-info,
.wind-box {
  display: none;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  color: #ffffff;
  flex-direction: column;
  gap: 10px;
}

.raindrop,
.wind {
  font-size: 40px;
  animation: rainDrop 1.2s infinite ease-in-out;
}

.wind {
  animation: windBlow 1.5s infinite linear;
}

.humidity,
.wind-speed {
  font-size: 1.1rem;
  font-weight: bold;
}

/* Not Found */
.location-not-found {
  display: none;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  color: #fff;
  animation: fadeIn 0.5s ease;
}

.location-not-found img {
  width: 100px;
  margin-top: 10px;
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes rainDrop {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(10px);
    opacity: 0.4;
  }
}

@keyframes windBlow {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(20px);
    opacity: 0.3;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive Design */
@media (max-width: 480px) {
  .Weather-container {
    padding: 25px 20px;
    margin: 20px auto;
  }

  .header {
    flex-direction: column;
    gap: 12px;
  }

  #city,
  #search {
    width: 100%;
  }

  .weather-info,
  .wind-box {
    flex-direction: column;
    gap: 15px;
  }

  .temprature {
    font-size: 2.2rem;
  }

  .description {
    font-size: 1rem;
  }
}
