* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

body {
  height: 100vh;
  background: linear-gradient(#87ceeb, #f7fced);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

#container {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 25px 30px;
  width: 90%;
  max-width: 700px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 1;
  transition: box-shadow 0.3s ease;
  max-height: 95vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#container:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

header {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

#searchbar {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 15px;
  font-size: 15px;
  outline: none;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(15px);
  color: #2c3e50;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

#searchbar::placeholder {
  color: rgba(44, 62, 80, 0.6);
}

#searchbtn {
  background: #4990a17f;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#searchbtn:hover {
  background: #4981a1c7;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

main {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}

#topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

#day {
  font-size: 16px;
  color: rgba(44, 62, 80, 0.8);
  font-weight: 500;
  margin: 0;
  display: block;
}

#date {
  font-size: 16px;
  color: rgba(44, 62, 80, 0.8);
  font-weight: 500;
  margin: 0;
  display: block;
}

#weather-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  margin: 0 0 20px 0;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  border-radius: 0;
  border: none;
  box-shadow: none;
  flex-shrink: 0;
  position: relative;
  flex-wrap: wrap;
}

#icon {
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.2));
  margin: 0;
  display: block;
  flex-shrink: 0;
}

#temperature {
  font-size: 64px;
  font-weight: 700;
  color: #2c3e50;
  text-shadow: none;
  margin: 0;
  letter-spacing: 0;
  display: block;
  line-height: 1;
  flex-shrink: 0;
}
#feelsLike {
  font-size: 18px;
  font-weight: 500;
  color: rgba(44, 62, 80, 0.7);
  margin: 8px 0 0 0;
  display: block;
  flex-shrink: 0;
}

#weather-main #city {
  font-size: 32px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  text-shadow: none;
  letter-spacing: 0;
  display: block;
  flex: 1;
  text-align: right;
  min-width: 150px;
}

#weathercondition {
  font-size: 16px;
  color: rgba(44, 62, 80, 0.7);
  font-weight: 500;
  margin: 5px 0 0 450px;
  text-transform: capitalize;
  text-align: center;
  display: block;
  width: 100%;
}

#mainweather {
  font-size: 14px;
  color: rgba(44, 62, 80, 0.6);
  font-weight: 400;
  margin: 2px 0 0 450px;
  text-transform: capitalize;
  text-align: center;
  display: block;
  width: 100%;
}

#details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 10px 0 0 0;
  padding: 0;
  flex-shrink: 0;
  width: 100%;
}

.detail-box {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(15px);
  padding: 15px;
  border-radius: 15px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  cursor: default;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.detail-box:hover {
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.detail-box .icon {
  font-size: 24px;
  margin: 0;
  display: inline-block;
}

.detail-box p {
  color: rgba(44, 62, 80, 0.9);
  font-weight: 600;
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
  display: inline-block;
}

#extras {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin: 20px 0 0 0;
  padding: 15px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

#sun-info,
#coord-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

#sunrise,
#sunset,
#longitude,
#latitude {
  font-size: 14px;
  color: rgba(44, 62, 80, 0.8);
  font-weight: 500;
  margin: 0;
  display: block;
}

footer {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  display: block;
}

footer p {
  font-size: 11px;
  color: rgba(44, 62, 80, 0.7);
  text-align: center;
  margin: 0;
}

#footer-link {
  color: #2c3e50;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

#footer-link:hover {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  text-decoration: underline;
}

/* For Mobile Responsive */
@media screen and (max-width: 768px) {

  html,
  body {
    margin: 0;
    padding: 0;
    height: 100%;
  }

  #container {
    width: 95%;
    padding: 12px 10px;
    border-radius: 15px;
  }

  #searchbar,
  #searchbtn {
    border-radius: 10px;
  }

  #weather-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }

  #weather-main #city {
    text-align: center;
  }

  #weathercondition {
    font-size: 16px;
    color: rgba(44, 62, 80, 0.7);
    font-weight: 500;
    margin: 5px 0 0 0;
    text-transform: capitalize;
    text-align: center;
    display: block;
    width: 100%;
  }
  
  #mainweather {
    font-size: 14px;
    color: rgba(44, 62, 80, 0.6);
    font-weight: 400;
    margin: 2px 0 0 0;
    text-transform: capitalize;
    text-align: center;
    display: block;
    width: 100%;
  }

  #temperature {
    font-size: 48px;
  }

  #details {
    align-items: flex-start;
    gap: 8px;
  }
}