* {
  margin: 0;
  box-sizing: border-box;
}
html {
  font-size: clamp(14px, 1.2vw, 16px);
}
html,
body {
  width: 100%;
  height: 100vh;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  font-family: "Alkatra", system-ui;
  display: flex;
  flex-direction: column;
  background-color: #000000;
  z-index: -99;
}

h3 {
  font-size: clamp(1.3rem, 1.5vw, 1.8rem);
}
header {
  display: flex;
  margin: 0;
  text-align: center;
  position: relative;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #ffffff;
  transition: background-color 0.3s;
  backdrop-filter: blur(2px);
  width: 100%;
  height: auto;
  min-height: 50px;
  max-height: 90px;
}
.left-header {
  width: 30%;
  display: flex;
  justify-content: center;
  text-align: center;
  align-items: center;
}
header .logo {
  text-decoration: none;
  height: 13vh;
  width: 100%;
  color: white;
  display: flex;
  justify-content: center;
  text-align: center;
  align-items: center;
}

.search-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
  margin: 0.7rem 100px;
  position: relative;
  z-index: 1000;
  width: 40%;
  border-radius: 8px;
}
.search-bar {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  max-width: 600px;
}
#city-search {
  flex-grow: 1;
  padding: 10px 30px;
  border: none;
  font-size: clamp(1rem, 1vw, 1.2rem);
  outline: none;
  background-color: transparent;
  background-color: #ffffff34;
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 8px 0 rgba(0, 0, 0, 0.37);
  border-radius: 50px;
  width: 100%;
  height: 4vh;
  text-align: center;
  justify-content: center;
  box-sizing: border-box;
  align-items: center;
}
#search-btn {
  background-color: #ffffffc2;
  border: none;
  color: #333;
  cursor: pointer;
  transition: background-color 0.3s;
  display: flex;
  position: absolute;
  align-items: center;
  border-radius: 50px;
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 8px 0 rgba(0, 0, 0, 0.37);
  height: 4vh;
  right: 0;
  width: fit-content;
  cursor: pointer;
}

#search-btn:hover {
  background-color: #e5c30077;
}

#search-results {
  display: none;
  position: absolute;
  align-items: center;
  justify-content: center;
  top: calc(100% + 5px);
  width: 40%;
  max-width: 600px;
  background-color: #ffffff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  border-top: 1px solid #eee;
  z-index: 2000;
  max-height: 400px;
  overflow-y: auto;
  left: 0;
  right: 0;
  margin: auto;
}
::placeholder {
  color: rgb(0, 0, 0);
  opacity: 1;
}

.city-result {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid #eee;
  z-index: 999;
}

.city-result:last-child {
  border-bottom: none;
}

.city-result:hover {
  background-color: #f0f0f0;
}

.city-result strong {
  font-size: clamp(1rem, 1vw, 1.2rem);
  color: #333;
}

.city-result span {
  font-size: clamp(1rem, 1vw, 1.2rem);
  color: #666;
  margin-top: 2px;
}

.right-header {
  width: 30%;
}
.weather-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -99;
}
.weather-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#loading-overlay {
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 9999;
}
.overlay-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.overlay-container h2,
.overlay-container #dotlottie-wc {
  color: white;
  font-size: clamp(1.5rem, 2vw, 2rem);
  text-shadow: 1px 1px #333;
  text-align: center;
}
#overlay {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  z-index: -1;
}

.hidden-loading-overlay {
  opacity: 0;
  pointer-events: none;
}
input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: transparent;
  border: none;
  outline: none;
}
button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: transparent;
  border: none;
  outline: none;
}

.weather-content {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 60vh;
  padding: 1.5% 5%;
  box-sizing: border-box;
}

.prayer,
.hourly-weather {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  width: 25%;
  height: 95%;
  margin-top: 1%;
  background-color: transparent;
  background-color: #00000010;
  backdrop-filter: blur(8px);
  border: solid 0.1px #ffffff41;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border-radius: 35px;
  padding: 1% 1.5%;
  color: white;
  font-size: clamp(1.3rem, 1.7vw, 1.5rem);
  box-sizing: border-box;
}
.row {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  white-space: nowrap;
}
.weather-content .row {
  gap: 5%;
  justify-content: space-between;
}
.weather-display {
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  width: 60%;
  height: 100%;
  color: white;
  padding: 1%;
}
.time,
.city,
.weather-temp,
.apparent-temperature {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.city,
.time,
#temperature,
.apparent-temperature,
.weather-details {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.192), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.weather-temp {
  flex-direction: column;
}

.current-weather-icon {
  display: block;
  margin: 0 auto;
  width: 32%;
  height: auto;
  margin-top: 20px;
}
.city {
  color: white;
}
.temp {
  display: flex;
  flex-direction: row;
  text-align: center;
  justify-content: center;
}
#temperature {
  width: 100%;
  text-align: center;
}

.daily-weather .icon {
  width: 45%;
  margin-top: 10px;
}
.hourly-weather .icon {
  width: 32%;
  max-height: 40px;
}
.hourly-weather .row canvas {
  max-width: 88px;
  text-align: right;
}
.hourly-weather .row div:nth-of-type(1) {
  min-width: 70px;
  text-align: right;
}
.hourly-weather .row div:nth-of-type(2) {
  min-width: 90px;
  text-align: right;
}
.time {
  gap: 10px;
  color: white;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
}
.weather-details {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  color: white;
  padding: 1% 10%;
}

.detail-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 0;
}

.detail-label {
  color: rgb(238, 238, 238);
  font-size: clamp(1.1rem, 1.5vw, 1.5rem);
  font-weight: 400;
}

#wind-value,
#humidity-value,
#pressure-value,
#visibility-value {
  color: white;
  font-weight: 600;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
}

.daily-weather {
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 90%;
  flex-grow: 1;
  align-self: stretch;
  margin: 0 5%;
  box-sizing: border-box;
  bottom: 0;
  flex: 1;
  background-color: transparent;
  background-color: #00000010;
  backdrop-filter: blur(8px);
  border: solid 0.1px #ffffff41;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border-radius: 35px 35px 0 0;
}
.daily-weather .col {
  flex-direction: column;
  display: flex;
  justify-content: space-between;
  text-align: center;
  align-items: center;
  color: white;
  font-size: clamp(1rem, 1.4vw, 1.4rem);
  flex-grow: 1;
  flex-basis: 0;
  padding: 1rem;
  border-bottom: 0;
}

.daily-weather .col .date {
  font-size: clamp(0.9rem, 1.2vw, 1.2rem);
  color: #ebebeb;
}

#today {
  padding: 0.2rem 0 1rem 0;
}
.today-line {
  border: 0;
  height: 1.2px;
  width: 100%;
  background: #ffd700;
  background-image: linear-gradient(to right, #00000088, #ffd700, #00000088);
}
.today {
  color: #e9c70a;
  font-size: clamp(1rem, 1.3vw, 1.3rem);
}
.col .day,
.col .date {
  font-size: clamp(1.2rem, 1.6vw, 1.6rem);
}

.transition-animation {
  transition: opacity 0.2s ease-in-out;
}

.fade-out {
  opacity: 0;
}

@media (max-width: 1000px) {
  body {
    height: auto;
    overflow-y: scroll;
  }

  .weather-content {
    flex-wrap: wrap;
    height: auto;
    min-height: 100vh;
  }

  .weather-display {
    order: 1;
    width: 100%;
    height: auto;
    min-height: 50vh;
  }

  .prayer,
  .hourly-weather {
    max-height: 400px;
  }

  .prayer {
    order: 2;
    width: 38%;
    margin-right: 2%;
  }

  .hourly-weather {
    order: 3;
    width: 60%;
  }

  header .logo {
    font-size: 1.8rem;
    padding: 0 10%;
  }

  header {
    flex-direction: column;
    min-height: 120px;
    position: sticky;
  }

  .right-header {
    width: 0;
  }

  .search-container {
    margin: 1rem;
    width: 90%;
  }

  header .logo {
    height: auto;
    margin-top: 5%;
  }

  .search-bar {
    width: 100%;
    min-width: 400px;
  }

  .daily-weather {
    margin-top: 5%;
  }
}

@media (max-width: 500px) {
  html {
    font-size: 14px;
  }

  html,
  body {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
  }

  .search-container {
    margin: 0.5rem;
    width: 95%;
  }

  .search-bar {
    min-width: 300px;
  }

  #city-search {
    font-size: 14px;
    padding: 8px 20px;
  }

  .weather-content {
    padding: 2% 3%;
    height: auto;
    min-height: 80vh;
  }

  .weather-display {
    height: auto;
    min-height: 40vh;
  }

  .prayer,
  .hourly-weather {
    font-size: 1.1rem;
    padding: 3%;
    height: auto;
    min-height: 350px;
  }

  .prayer {
    width: 100%;
    order: 2;
    margin-right: 0;
    margin-bottom: 10px;
  }

  .hourly-weather {
    width: 100%;
    order: 3;
    margin-bottom: 10px;
  }

  .weather-details {
    padding: 2% 5%;
    flex-wrap: wrap;
  }

  .detail-item {
    flex: 1 1 45%;
    margin: 5px 0;
  }

  .daily-weather {
    width: 95%;
    margin: 10px 2.5% 20px 2.5%;
    height: auto;
    min-height: 250px;
    border-radius: 35px;
    flex-direction: column;
  }

  .daily-weather .col {
    min-width: 110px;
    padding: 0.8rem 0.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .daily-weather .col .day,
  .daily-weather .col .date {
    width: 50%;
  }
  .daily-weather .col .row {
    width: auto;
    margin: 1% 5%;
  }
  .daily-weather .col .temp,
  .daily-weather .col .icon {
    margin: 1% 5% !important;
  }

  .daily-weather .col .icon {
    width: 25%;
    margin-top: 10px;
  }
  .daily-weather .col #weather-icon3 {
    width: 30% !important;
    margin-top: 10px;
    margin: 1% 3% !important;
  }
  .daily-weather .col #second-line {
    display: flex !important;
  }
  #today {
    padding: 0.2rem 0 1rem 0;
    font-size: clamp(1.1rem, 1.5vw, 1.6rem);
  }
}
