@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;600&display=swap");
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    background-image: url('icons/back.jpg'); 
    background-size: cover;       
    background-position: center;  
    background-repeat: no-repeat; 
    
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-direction: column;
}

input {
    padding: 1rem;
    border-radius: 25px;
    border: none;
    background-color: #fff;
    font-family: inherit;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    min-width: 300px;
    font-size: 1rem;
}
input:focus {
    outline: none;
}
.weather {
    text-align: center;
    font-size: 2rem;
    background-color: silver;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.weather h2 {
    margin-bottom: 0;
    display: flex;
    align-items: center;

}

/* --- Background Animation --- */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;600&display=swap");
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    background-color: burlywood;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-direction: column;
}
input {
    padding: 1rem;
    border-radius: 25px;
    border: none;
    background-color: #fff;
    font-family: inherit;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    min-width: 300px;
    font-size: 1rem;
}
input:focus {
    outline: none;
}
.weather {
    text-align: center;
    font-size: 2rem;
    background-color: silver;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.weather h2 {
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

/* --- Animated Weather Backgrounds --- */

.weather-animation {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  pointer-events: none;
  margin-top: 1rem;
}

/* Sun */
.sun {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 80px;
  height: 80px;
  animation: floatSun 6s ease-in-out infinite, pulse 2s infinite;
  display: none;
}

.sun img {
  width: 100%;
  height: 100%;
}

/* Clouds */
.clouds {
  position: absolute;
  top: 50px;
  left: 0;
  width: 100%;
  display: flex;
  gap: 20px;
  opacity: 0.8;
  pointer-events: none;
  display: none;
  animation: floatCloud 30s linear infinite;
}

.clouds img {
  width: 120px;
  height: auto;
}

/* Rain */
.rain {
  position: absolute;
  top: 100px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
  display: none;
  animation: rainDrop 1.5s linear infinite;
}

.rain img {
  width: 40px;
  height: auto;
  opacity: 0.7;
}

/* Snow */
.snow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  pointer-events: none;
  display: none;
  animation: fallSnow 8s linear infinite;
}

.snow img {
  width: 50px;
  height: auto;
  margin-right: 10px;
}

/* Animations */
@keyframes floatSun {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes pulse {
  0%, 100% { filter: drop-shadow(0 0 5px #ffde17); }
  50% { filter: drop-shadow(0 0 15px #ffde17); }
}

@keyframes floatCloud {
  0% { transform: translateX(-150px); }
  100% { transform: translateX(110vw); }
}

@keyframes rainDrop {
  0% { transform: translateY(0); opacity: 0.7; }
  100% { transform: translateY(40px); opacity: 0; }
}

@keyframes fallSnow {
  0% { transform: translateY(0) translateX(0); opacity: 0.8; }
  100% { transform: translateY(200px) translateX(30px); opacity: 0; }
}

/* Clear (similar to sun, but maybe a subtle glow or no animation) */
.clear {
  position: absolute;
  top: 20px;
  left: 120px;
  width: 80px;
  height: 80px;
  display: none;
  animation: pulse 2s infinite;
}

.clear img {
  width: 100%;
  height: 100%;
}

/* Thunderstorm */
.thunderstorm {
  position: absolute;
  top: 100px;
  left: 50%;
  width: 80px;
  height: 80px;
  display: none;
  animation: flashThunder 1.5s infinite;
  transform: translateX(-50%);
}

.thunderstorm img {
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

/* Partially Cloudy */
.partially-cloudy {
  position: absolute;
  top: 50px;
  left: 0;
  width: 100%;
  display: flex;
  gap: 20px;
  opacity: 0.7;
  pointer-events: none;
  display: none;
  animation: floatCloud 30s linear infinite;
}

.partially-cloudy img {
  width: 120px;
  height: auto;
}

/* Thunderstorm flash animation */
@keyframes flashThunder {
  0%, 100% { opacity: 0.8; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(2); }
}



