@import url("https://fonts.googleapis.com/css2?family=Hind:wght@300;400;500;600;700&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

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

/* ----- BODY BACKGROUND ----- */
body {
  background: url("assets/bg.jpg");
  width: 100%;
  height: 100dvh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
body::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(15px);
  z-index: 0;
}

/* ----- MAIN CONTAINER ----- */
.main-container {
  width: 500px;
  height: 800px;
  z-index: 1;
  background: linear-gradient(
    145deg,
    rgba(0, 0, 0, 0.2),
    rgba(255, 255, 255, 0.1)
  );
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  backdrop-filter: blur(100px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3),
    inset 0 0 40px rgba(255, 255, 255, 0.05);
  padding: 20px;
  overflow: visible;
}

/* ----- HEADER INPUT ----- */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.input-container {
  position: relative;
  width: 100%;
}
.city-input {
  width: 100%;
  padding: 10px 16px;
  border-radius: 99px;
  border: 3px solid transparent;
  background: rgba(0, 0, 0, 0.15);
  outline: none;
  font-weight: 500;
  transition: 0.25s border;
  padding-right: 45px;
  font-size: 15px;
}
.city-input:focus {
  border: 3px solid rgba(255, 255, 255, 0.3);
}
.city-input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}
.input-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  display: flex;
  border: none;
  cursor: pointer;
}
.input-btn span {
  color: #fff;
  opacity: 0.8;
  font-size: 22px;
  transition: 0.3s;
}
.input-btn:hover span {
  opacity: 1;
}
.pin-container {
  border-radius: 99px;
  border: 2px solid transparent;
  background: rgba(0, 0, 0, 0.15);
  padding: 10px 10px 5px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.pin-container {
  position: relative;
  display: inline-block;
}

.pin-container:hover {
  border: 2px solid rgba(255, 255, 255, 0.226);
}

.header-pin {
  width: 24px;
  height: 24px;
  display: block;
}

.pin-container:hover::after {
  content: "Use my location";
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #5b719b;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.5;
  color: white;
  font-size: 12px;
  font-weight: 300;
  opacity: 0.9;
  pointer-events: none;
  z-index: 10;
}

/* ----- TEXT CLASSES ----- */
.regular-txt {
  font-weight: 400;
  font-family: "Roboto", sans-serif;
}
.country-txt {
  font-size: 18px;
  color: #fff;
  background: linear-gradient(90deg, #a6e1ff, #ffc3a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.temp-txt {
  font-size: 32px;
  color: #fff;
  background: linear-gradient(90deg, #ffdf91, #ff9d76);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.condition-txt {
  font-size: 18px;
  color: #ccc;
}
.feels-like-txt {
  font-size: 14px;
  color: #e0e0e0;
  margin-top: 5px;
  line-height: 1.2;
}

/* ----- WEATHER INFO SECTION ----- */
.weather-info {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.location-date-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.location {
  display: flex;
  align-items: center;
  gap: 6px;
}

.weather-summary-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.weather-summary-img {
  width: 120px;
  height: 120px;
}
.weather-summary-info {
  text-align: end;
}

/* ----- CONDITIONS (humidity, wind) ----- */
.weather-conditions-container,
.sun-info {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px 15px;
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.05);
}

.condition-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.condition-item span {
  font-size: 30px;
}

.humidity-value-txt,
.wind-value-txt,
.visibility-value-txt {
  font-weight: 500;
  color: #81cfff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* ----- SUNRISE / SUNSET ----- */
.sun-info {
  display: flex;
  justify-content: space-around;
}
.sun-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.sunrise-txt,
.sunset-txt {
  color: #81cfff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  font-weight: 500;
  font-size: 14px;
}

/* ----- FORECAST ----- */
.forecast-items-container {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px;
  max-width: 360px;
  margin: 0 auto;
}

.forecast-items-container::-webkit-scrollbar {
  height: 8px;
}
.forecast-items-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 99px;
}
.forecast-items-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 99px;
}

.forecast-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding: 10px;
  min-width: 100px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: 0.3s background, 0.3s transform;
}
.forecast-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px) scale(1.03);
}
.forecast-item-img {
  width: 35px;
  height: 35px;
}

/* ----- SECTION MESSAGE ----- */
.section-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 15px;
  position: absolute;
  top: 33%;
  right: 20%;
}
.section-message img {
  height: 180px;
  width: fit-content;
}
/* ---- WEATHER TIPS ----- */
.weather-tips {
  margin-top: 10px;
  padding: 15px;
  border-radius: 12px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.05)
  );
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 15px;
  font-size: 0.95rem;
  animation: slideUp 0.5s ease-in-out;
}

.weather-tips h4 {
  font-size: 18px;
  line-height: 1.2;
}

.tip-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tip-text {
  font-weight: 500;
  color: #81cfff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.tip-text strong {
  color: #ffffff;
  font-weight: 700;
}

.tip-container img {
  width: 36px;
  height: 36px;
  animation: iconPulse 2.5s infinite ease-in-out;
}

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

@keyframes iconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

/* ANIMATIONS */
@keyframes fadeSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-slide-child {
  opacity: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
