* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}
/* Apply to body or a main container */
body {
  background: linear-gradient(135deg, #667eea, #764ba2); /* default (before search) */
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
  transition: background 1s ease;
  height: 90vh;
}

/* Smooth animation between gradient shades */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.card{
    width: 90%;
    max-width: 470px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    margin: 100px auto 0;
    border-radius: 20px;
    padding: 40px 35px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.search {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.search input {
    border: 0;
    outline: 0;
    background: #ebfffc;
    color: #555;
    padding: 10px 25px;
    height: 60px;
    border-radius: 30px;
    flex: 1;
    margin-right: 16px;
    font-size: 18px;
}
.search button {
    border: 0;
    outline: 0;
    background: #ebfffc;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
}
.search button img{
    width: 16px;
}
.weather-icon {
    width: 170px;
    margin-top: 30px;
}
.weather h1 {
    font-size: 80px;
    font-weight: 500;
}
.weather h2 {
    font-size: 45px;
    font-weight: 400;
    margin-top: -10px;
}
.details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    margin-top: 50px;
}
.col {
    display: flex;
    align-items: center;
    text-align: left;
}
.col img {
    width: 40px;
    margin-right: 10px;
}
.humidity, .wind {
    font-size: 28px;
    margin-top: -6px;
}
.weather {
    display: none;
}
.error {
    text-align: left;
    margin-left: 10px;
    font-size: 15px;
    margin-top: 10px;
    display: none;
    color: red;
}

/* =============================== */
/* 📱 Responsive Styling Section   */
/* =============================== */

/* For tablets and smaller devices */
@media (max-width: 768px) {
  .card {
    margin: 60px auto 0;
    padding: 30px 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }

  .search input {
    height: 50px;
    font-size: 16px;
    padding: 8px 20px;
    margin-right: 10px;
  }

  .search button {
    width: 50px;
    height: 50px;
  }

  .weather-icon {
    width: 140px;
    margin-top: 25px;
  }

  .weather h1 {
    font-size: 60px;
  }

  .weather h2 {
    font-size: 35px;
  }

  .details {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .col img {
    width: 35px;
  }

  .humidity, .wind {
    font-size: 22px;
  }
}

/* For small phones (≤480px) */
@media (max-width: 480px) {
  .card {
    margin: 40px auto 0;
    padding: 25px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }

  .search {
    flex-direction: column;
    gap: 15px;
  }

  .search input {
    width: 100%;
    margin-right: 0;
    font-size: 15px;
  }

  .search button {
    width: 100%;
    height: 50px;
    border-radius: 25px;
  }

  .weather-icon {
    width: 120px;
    margin-top: 20px;
  }

  .weather h1 {
    font-size: 50px;
  }

  .weather h2 {
    font-size: 28px;
  }

  .details {
    flex-direction: column;
    gap: 15px;
    margin-top: 40px;
  }

  .col {
    justify-content: center;
  }

  .col img {
    width: 30px;
  }

  .humidity, .wind {
    font-size: 20px;
  }

  .error {
    text-align: center;
    font-size: 14px;
    margin: 10px 0 0 0;
  }
}

/* ===== HEADER / INTRO SECTION ===== */
.me {
  background: linear-gradient(135deg, #4f46e5, #9333ea); /* Indigo to Purple */
  color: #fff;
  padding: 20px 40px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: inline-block;
  text-align: center;
  margin-top: 20px;
  transition: all 0.3s ease-in-out;
}

.me:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.me h2 {
  font-size: 1.8rem;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  letter-spacing: 1px;
  margin: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .me {
    padding: 15px 25px;
    border-radius: 12px;
  }

  .me h2 {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .me {
    width: 90%;
    padding: 12px 20px;
  }

  .me h2 {
    font-size: 1.1rem;
  }
}
