* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: #fff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
  animation: fadeIn 1s ease;
}

/* Header */
.title {
  font-size: 1.8rem;
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.subtitle {
  font-size: 0.9rem;
  color: #e0e0e0;
  margin-bottom: 15px;
}

/* Search Bar */
.search {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.search input {
  padding: 10px;
  border: none;
  border-radius: 10px;
  width: 70%;
  outline: none;
  font-size: 1rem;
}

.search button {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  color: #fff;
  transition: 0.3s;
}

.search button:hover {
  background: rgba(255,255,255,0.4);
  transform: scale(1.05);
}

/* Weather Card */
.weather-card {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 6px 30px rgba(0,0,0,0.15);
  animation: slideUp 0.8s ease;
}

.weather-card.hidden {
  display: none;
}

.weather-card img {
  width: 100px;
  height: 100px;
  animation: floaty 4s ease-in-out infinite;
}

#temperature {
  font-size: 2.4rem;
  font-weight: 700;
  margin-top: 10px;
}

#description {
  text-transform: capitalize;
  color: #f0f0f0;
  margin: 8px 0;
}

.extra {
  display: flex;
  justify-content: space-around;
  font-size: 0.9rem;
  color: #e3e3e3;
  margin-top: 10px;
}

/* Forecast */
.forecast {
  margin-top: 25px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.forecast-day {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  width: 90px;
  transition: transform 0.3s ease;
}

.forecast-day:hover {
  transform: translateY(-6px);
}

.forecast-day img {
  width: 50px;
  height: 50px;
}

/* Footer */
footer {
  margin-top: 20px;
  font-size: 0.85rem;
}

footer a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px dotted #fff;
}

footer a:hover {
  color: #ffeb3b;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Scrollbar for forecast */
.forecast::-webkit-scrollbar {
  height: 6px;
}
.forecast::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 10px;
}
