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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(45deg, #1a1a3a 0%, #3a3a6a 50%, #5a5a9a 100%);
  overflow: hidden;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 30% 20%,
    rgba(255, 255, 255, 0.1),
    transparent 70%
  );
  z-index: -2;
}

.container {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95),
    rgba(240, 240, 255, 0.85)
  );
  border-radius: 25px;
  padding: 35px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
    inset 0 2px 2px rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease;
}

.container:hover {
  transform: translateY(-5px);
}

.manga-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  background: url("https://images.unsplash.com/photo-1618477461853-c0c721d80d95")
    no-repeat center/cover;
  z-index: -1;
  filter: grayscale(20%);
}

.search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
}

.search-box input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 30px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.9),
    rgba(230, 230, 255, 0.7)
  );
  font-size: 16px;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.search-box input:focus {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 1),
    rgba(240, 240, 255, 0.9)
  );
  box-shadow: 0 0 10px rgba(255, 100, 100, 0.3);
}

.search-box button {
  padding: 14px 25px;
  border: none;
  border-radius: 30px;
  background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
  color: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  transition: all 0.3s ease;
}

.search-box button:hover {
  background: linear-gradient(45deg, #ff8e8e, #ffaaaa);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.weather-info {
  text-align: center;
  animation: fadeIn 0.5s ease-in;
}

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

.city {
  font-family: "Shojumaru", cursive;
  font-size: 32px;
  color: #2a2a4a;
  margin-bottom: 15px;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
}

.temperature {
  font-size: 56px;
  color: #1e1e2f;
  margin: 15px 0;
  font-weight: 600;
  text-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.description {
  font-size: 20px;
  color: #4a4a6a;
  text-transform: capitalize;
  margin-bottom: 25px;
  font-style: italic;
}

.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.8),
    rgba(230, 230, 255, 0.6)
  );
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.details div {
  text-align: center;
  transition: transform 0.3s ease;
}

.details div:hover {
  transform: scale(1.05);
}

.details span {
  display: block;
  font-size: 15px;
  color: #777;
  margin-bottom: 5px;
}

.details p {
  font-size: 18px;
  color: #2a2a4a;
  font-weight: 600;
}

.error {
  color: #ff6b6b;
  text-align: center;
  display: none;
  font-size: 16px;
  background: rgba(255, 107, 107, 0.1);
  padding: 10px;
  border-radius: 10px;
}

.weather-icon {
  width: 120px;
  margin: 10px auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
}

.weather-icon:hover {
  transform: rotate(5deg) scale(1.1);
}

@media (max-width: 420px) {
  .container {
    margin: 15px;
    padding: 25px;
  }

  .city {
    font-size: 28px;
  }

  .temperature {
    font-size: 48px;
  }

  .search-box input,
  .search-box button {
    padding: 12px 15px;
  }
}
