/* Reset Default Space */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* For Body */
body {
  position: relative;
  height: 100vh;
  background: url("./assets/snow.png") no-repeat center center/cover;
}
body::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.021);
  z-index: -1;
}
/* For Container */
div.container {
  position: relative;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* For Front Card */
div.front-card {
  position: relative;
  z-index: 2;
  height: 32rem;
  width: 22rem;
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  color: white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: opacity 0.4s ease;
}

/* Hide Front Card(Make it transparent) */
/* Transparent ≠ Removed */
.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* For Heading */
div.front-card > h1 {
  font-family: "Onest", serif;
  font-size: 2em;
  margin-bottom: 1.3rem;
}

/* For Search Box */
div.search-box {
  width: 100%;
  display: flex;
  column-gap: 10px;
}
/* For Input Box */
.search-box input {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  font-size: 14px;
  font-family:
    "Roboto Slab",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: white;
  outline: none;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}
/* for input place-holder */
.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.678);
}
/* for input focus */
.search-box input:focus {
  border-color: #00c6ff;
  box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.25);
}

/* Icon Wrapper */
.inp-icon-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

/* Icon Position */
.inp-icon-wrap i {
  position: absolute;
  left: 10px;
  font-size: 16px;
  color: #1a2a3aea;
  pointer-events: none;
}

/* Push text so it doesn't hide under icon */
.inp-icon-wrap input {
  width: 100%;
  padding-left: 32px;
}

/* For Search Button */
div.search-box button {
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: #00c6ff;
  color: white;
  cursor: pointer;
  font-weight: 500;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  transition: all 0.3s ease;
}
/* Hover on Search Button */
.search-box button:hover {
  background: #0094cc;
  transform: scale(1.05);
}
/* For Back Card */
div.back-card {
  position: absolute;
  /*to place it underneath(behind) the front card */
  z-index: 1;
  top: 50%;
  left: 50%;
  height: 32rem;
  width: 22rem;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 35px;
  color: white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
}
.hidden {
  display: none;
}
.active {
  display: flex;
  animation: slide-in 2s ease forwards;
}

@keyframes slide-in {
  from {
    opacity: 0;
    /* start slightly left of center */
    transform: translate(-60%, -50%);
  }
  to {
    opacity: 1;
    /* settle exactly at center */
    transform: translate(-50%, -50%);
  }
}

/* For Weather Icon */
div.weather-icon {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

/* For Temperature */
div.temperature {
  width: 100%;
  display: flex;
  justify-content: flex-start;
}
div.temperature p#temp_c {
  font-size: 4.5rem;
  font-family:
    "DM Serif Display", Cambria, Cochin, Georgia, Times, "Times New Roman",
    serif;
  letter-spacing: 7px;
  color: rgba(0, 0, 0, 0.7);
}

div.temperature p#centigrade {
  /* nudge down to align with top of big number */
  margin-top: 17px;
  color: #1a2a3aa6;
  font-size: 1.8rem;
  font-family:
    "Onest", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
}
/* for Temperature Progress Bar */
.temp-bar-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar-min,
.bar-max {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.15); /* for dim track */
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #4fc3f7, #ff7043);
  transition: width 0.8s ease; /* for smooth animation */
}

/* For City */
div.city {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  margin: 10px 0px;
  color: rgba(61, 53, 53, 0.712);
}

/* for location icon */
div.location-icon i {
  font-size: 1.5rem;
}
/* for city-country */
div.city-country {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 0.3rem;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  letter-spacing: 1px;
}

/* for Condition Text */
div.condition-text {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  font-size: 0.9rem;
  font-family: "Roboto Slab", "Times New Roman", Times, serif;
  color: #1a2a3aa6;
}

div.condition-text p#conditionText {
  margin: 0px 0px 10px 30px;
}
/* For Weather Details & Weather Days Details */
div.weather-details,
div.weather-days-section {
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
/* for Weather Days Section */
div.weather-days-section {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  column-gap: 8px;
  margin-top: 10px;
}
/* for All the Divs belong to Weather Details & Weather Days Section class */
div.weather-details > div,
div.weather-days-section > div {
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
  align-items: center;
  background-color: #ffffff66;
  padding: 13px 15px;
  border: 1px solid black;
  border-radius: 15px;
  font-size: 1rem;
  font-family:
    "Onest", "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  transition: all 0.3s ease 0s;
}
div.weather-days-section > div {
  padding: 13px 20px;
}

div.weather-details > div:hover,
div.weather-days-section > div:hover {
  transform: translateY(-3px);
  background-color: #ebe5e548;
  cursor: pointer;
}

/* for icon */
div.weather-details > div p.icon {
  font-size: 1.2rem;
  margin-bottom: 4px;
}
/* For heading & for weather temperature*/
div.weather-details > div h3,
div.weather-days-section > div p.temp {
  font-size: 0.9rem;
  color: #1a2a3a;
}

/* for heading */
div.weather-details > div h3 {
  margin-bottom: 4px;
}
/* For weather Info & days info */
div.weather-details > div p.info,
div.weather-days-section > div p.day {
  font-size: 0.65rem;
  color: #1a2a3aa6;
}
/*for weather days */
div.weather-days-section > div p.day {
  margin-bottom: 4px;
}
/* For Weather icon */
div.weather-days-section > div img.icon {
  width: 1.6rem;
  height: 2rem;
  margin-bottom: 5px;
}
/* for weather temperature */
div.weather-days-section > div p.temp {
  font-size: 0.8rem;
  color: #1a2a3a;
}
