/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* Background */
body {
  min-height: 100vh;
  /* background: linear-gradient(135deg, #5C6BC0, #512DA8); */
   background: url('images/bg.png') no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

/* Shared Card Style */
.card {
  background: linear-gradient(
      135deg,
      rgba(255, 183, 77, 0.3),  /* warm sunset orange */
      rgba(33, 150, 243, 0.3)   /* cool sky blue */
  );
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35),
              0 0 15px rgba(255, 255, 255, 0.1) inset;
  animation: fadeIn 0.8s ease-in-out;
  color: white;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4),
              0 0 20px rgba(255, 255, 255, 0.15) inset;
}



/* Initial View - Only Search Bar */
.card.minimal {
  padding: 40px 30px;
}

/* Expanded View for Weather */
.card.expanded {
  max-width: 500px;
  padding: 40px;
}

/* Search Bar */
.search {
  display: flex;
  gap: 10px;
}

.search input {
  flex: 1;
  padding: 12px 18px;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.8);
}

.search button {
  background: white;
  border: none;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.search button:hover {
  transform: scale(1.1);
}

.search img {
  width: 18px;
}

/* Error */
.error {
  display: none;
  color: #ff4d4d;
  font-weight: bold;
  margin-top: 10px;
}

/* Weather Info */
.weather {
  margin-top: 20px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s ease;
}

.weather.show {
  opacity: 1;
  max-height: 500px;
}

/* Weather Icon */
.weather-icon {
  width: 100px;
  animation: float 3s ease-in-out infinite;
}

.temp {
  font-size: 48px;
  font-weight: bold;
  margin-top: 10px;
}

.city {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 15px;
}

/* Details */
#details {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
}

.details {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.25);
  padding: 10px 15px;
  border-radius: 15px;
  transition: 0.3s ease;
}

.details:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.35);
}

.details img {
  width: 30px;
}

.details p {
  font-size: 14px;
}

.humidity, .wind {
  font-weight: bold;
  font-size: 16px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* Mobile */
@media (max-width: 480px) {
  .temp { font-size: 36px; }
  .city { font-size: 22px; }
  #details { flex-direction: column; gap: 10px; }
}
