@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

body {
  font-family: 'Poppins', sans-serif;
  background-image: url("img/bg1.jpg");
  min-height: 100vh;
  overflow: auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.app-main {
  width: 400px;
  max-width: 95%;
  margin: 0 auto;
  padding: 30px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(0);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.header h4 {
  color: #4361ee;
  font-weight: 700;
  font-size: 2.2rem;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.header h4::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, #4361ee, #3a0ca3);
  border-radius: 10px;
}

.app-main > * {
  margin-bottom: 25px;
}

.searchInputBox {
  position: relative;
}

.input-box {
  width: 100%;
  background: #f8f9fa;
  color: #333;
  font-weight: 500;
  border: 2px solid transparent;
  font-size: 1.2rem;
  border-radius: 50px;
  padding: 15px 20px;
  text-align: center;
  outline: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.input-box:focus {
  border-color: #4361ee;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.2);
}

.input-box::placeholder {
  color: #adb5bd;
}

.weather-body {
  color: #fff;
  padding: 30px;
  line-height: 1.5;
  border-radius: 20px;
  display: none;
  background: linear-gradient(135deg, #4361ee, #3a0ca3);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.weather-body.active {
  transform: scale(1);
  opacity: 1;
}

.location-deatils {
  margin-bottom: 20px;
}

.city {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 5px;
  animation: fadeIn 1s ease-in;
}

.date {
  font-size: 0.9rem;
  opacity: 0.8;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.weather-status {
  padding: 20px 0;
}

.temp {
  font-size: 4rem;
  font-weight: 700;
  text-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
  animation: scaleIn 0.7s ease-out;
  display: inline-block;
}

@keyframes scaleIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.weather {
  margin-top: 15px;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.weather i {
  font-size: 2rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.min-max {
  font-size: 1rem;
  opacity: 0.8;
  margin: 15px 0;
  font-weight: 500;
}

#updated_on {
  font-size: 0.8rem;
  opacity: 0.7;
  font-style: italic;
  margin-top: 10px;
}

hr {
  border: none;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.2);
  margin: 15px 0;
}

.day-details {
  background-color: rgba(255, 255, 255, 0.15);
  padding: 15px;
  border-radius: 15px;
  margin-top: 10px;
}

.basic {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Loading Animation */
.loader {
  display: none;
  width: 50px;
  height: 50px;
  border: 5px solid rgba(67, 97, 238, 0.2);
  border-radius: 50%;
  border-top: 5px solid #4361ee;
  margin: 15px auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Media Queries */
@media screen and (max-width: 600px) {
  .app-main {
    padding: 20px;
  }
  
  .header h4 {
    font-size: 1.8rem;
  }
  
  .temp {
    font-size: 3.5rem;
  }
  
  .weather {
    font-size: 1.5rem;
  }
}
