/* Weather-themed image background with overlay */
body {
  min-height: 100vh;
  margin: 0;
  font-family: 'Poppins', Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 48px;
  position: relative;
  background: #202a42 url("https://images.unsplash.com/photo-1465101046530-73398c7f28ca?auto=format&fit=crop&w=1350&q=80") no-repeat center center fixed;
  background-size: cover;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(120deg, rgba(40,48,87,0.45) 0%, rgba(74,119,190,0.65) 100%);
  backdrop-filter: blur(2.7px);
  z-index: 0;
  pointer-events: none;
}
.heading-blur {
  display: inline-block;
  padding: 10px 26px;
  border-radius: 18px;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(7px);
  margin-bottom: 26px;
}



/* Main content above overlay */
#weather, #city, #error, #cityInput, button {
  position: relative;
  z-index: 1;
}

/* Weather Card: fade-in, glass effect */
#weather {
  display : none;
  
  background: rgba(255,255,255,0.84);
  border-radius: 26px;
  box-shadow: 0 8px 46px 0 rgba(46,87,168,0.23);
  padding: 32px 30px 26px 30px;
  margin: 20px 0;
  max-width: 440px;
  width: 96vw;
  box-sizing: border-box;
  backdrop-filter: blur(10px) saturate(140%);
  border: 1.8px solid rgba(105,188,245,0.18);
  opacity: 0;
  transform: translateY(32px) scale(0.97);
  animation: fadeUpGlass 1.3s cubic-bezier(.42,.18,.42,1.09) 0.2s forwards;
}
@keyframes fadeUpGlass {
  to { opacity: 1; transform: translateY(0) scale(1);}
}

/* City Title: radiant glow, soft pulse */
#city {
  font-size: 1.58rem;
  font-weight: 700;
  color: #243566;
  margin-bottom: 17px;
  text-align: center;
  letter-spacing: 0.04em;
  text-shadow:
    0 0 14px #28a7fff7,
    0 6px 16px #5066a944,
    0 1px 1.5px #fff;
  animation: pulseGlow 2.2s infinite alternate;
}
@keyframes pulseGlow {
  0% { text-shadow: 0 0 12px #67daff77, 0 1px 1.5px #fff;}
  100% { text-shadow: 0 0 30px #18cdfa99, 0 8px 18px #4056b755;}
}

/* Button: tactile hover and ripple */
button {
  background: #218fe0;
  color: #fff;
  font-weight: 600;
  font-size: 1.04rem;
  padding: 13px 27px;
  border: none;
  border-radius: 13px;
  margin: 0 9px 27px 0;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 13px 0 rgba(89,168,235,0.19);
  overflow: hidden;
  transition: background 0.23s, transform 0.12s;
  position: relative;
}
button::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 1px; height: 1px;
  background: rgba(255,255,255,0.35);
  border-radius: 50%;
  transform: translate(-50%,-50%) scale(1);
  opacity: 0;
  transition: opacity 0.38s, transform 0.24s;
  pointer-events: none;
}
button:active::after {
  width: 160px; height: 160px;
  opacity: 0.30;
  transform: translate(-50%,-50%) scale(1.2);
  transition: 0s;
}
button:hover {
  background: #145a9d;
  transform: scale(1.042);
}

/* Inputs and error readable on image */
#cityInput {
  font-size: 1.14rem;
  padding: 14px 17px;
  border: none;
  border-radius: 13px;
  margin: 0 9px 27px 0;
  outline: none;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 2px 8px #44a6f844;
  backdrop-filter: blur(2px);
  transition: box-shadow 0.23s, background 0.22s;
}
#cityInput:focus {
  background: #f5faff;
  box-shadow: 0 0 0 3px #70c5f9cc;
}

#error {
  display: none; /* Hide error by default */
  color: #e55151;
  background: #ffeaeaee;
  border-radius: 10px;
  padding: 8px 17px;
  font-weight: 500;
  margin-bottom: 15px;
  letter-spacing: 0.013em;
  box-shadow: 0 1.2px 3.4px rgba(227,70,85,0.13);
}


/* Weather Description */
.weather_description {
  color: #205a84;
  font-size: 1.13rem;
  letter-spacing: 0.01em;
  line-height: 1.68;
  word-break: break-word;
}

/* Optional: Floating Animated Icon (requires .weather_icon on img/svg) */
.weather_icon {
  
  width: 78px;
  height: 78px;
  display: block;
  margin: 0 auto 14px auto;
  animation: floatIcon 2.7s infinite cubic-bezier(.56,.16,.51,1.03);
}
@keyframes floatIcon {
  0%,100% { transform: translateY(0);}
  62% { transform: translateY(-12px);}
}

/* Responsive for mobile devices */
@media (max-width: 540px) {
  body {padding-top: 11vw;}
  #weather {padding: 15px 6px 13px 6px;}
  #cityInput, button {width: 100%; margin: 0 0 13px 0;}
  #city{font-size: 1.03rem;}
}
