* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0b131e;
  color: #fff;
  padding: 20px;
  font-family: Poppins, sans-serif;
  min-height: 100vh;
}

main {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto;
}

.search {
  display: flex;
  border-radius: 15px;
}

.search-bar {
  margin: 0;
  border: none;
  border-radius: 15px 0 0 15px;
  width: 85%;
  padding: 13px;
  float: left;
  font-size: 16px;
  outline: none;
  background-color: #202c3c;
  color: #fff;
}

.search-btn {
  background-color: #008cb9;
  border-radius: 0 15px 15px 0;
  padding: 10px;
  width: 15%;
  color: #fff;
  float: left;
  text-align: center;
  font-size: 16px;
  cursor: pointer;
}

.search-btn:hover {
  background: #008bb9a7;
}

.logo {
  width: 80px;
}

.nav {
  background-color: #202c3c;
  border-radius: 15px;
  padding: 20px;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-grow: 1;
  max-width: 650px;
  min-width: 300px;
}

.city {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.city-left {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.cname {
  display: inline-block;
}

.cname p {
  margin-top: 2px;
  font-size: small;
  color: #838a9a;
}

.ctemp {
  font-size: 3rem;
  font-weight: 900;
}

.today-forecast {
  background-color: #202c3c;
  padding: 20px;
  border-radius: 15px;
}

.today-forecast h2 {
  font-size: 12px;
  margin-bottom: 12px;
  color: #838a9a;
}

.tf-cards {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  width: 100%;
  overflow-x: scroll;
}

.tf-cards::-webkit-scrollbar-track {
  box-shadow: inset 0 0 6px #0000004d;
  background-color: #2c2c2a;
}

.tf-cards::-webkit-scrollbar {
  height: 8px;
  background-color: #2c2c2a;
}

.tf-cards::-webkit-scrollbar-thumb {
  border-radius: 50px;
  background-color: #6c6a6a;
}

.tf-cards img,
.fc-container img {
  width: 38px;
}

.card {
  padding: 15px;
  text-align: center;
  border-radius: 5px;
  background: #ffffff1a;
  box-shadow: 0 4px 30px #0000001a;
  /* backdrop-filter: blur(5.8px); */
  min-width: 80px;
}

.time {
  font-size: 12px;
  font-weight: 900;
}

.ttemp {
  font-size: 1rem;
  font-weight: 900;
}

.air-conditions {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-color: #202c3c;
  padding: 20px;
  border-radius: 15px;
}

.air-conditions h2 {
  font-size: 12px;
  color: #838a9a;
}

.ac-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.ac-col-1,
.ac-col-2 {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 50%;
}

.ac-card {
  display: flex;
  gap: 10px;
  padding: 15px;
  border-radius: 5px;
  background: #ffffff1a;
  box-shadow: 0 4px 30px #0000001a;
  /* backdrop-filter: blur(5.8px); */
}

.ac-card p:first-child {
  color: #838a9a;
}

.ac-card p:last-child {
  color: #ebf0f2;
}

.actemp,
.acrain,
.acwind,
.uvindex {
  font-size: 1.5rem;
  font-weight: bolder;
}

.forecast {
  width: 300px;
  background: #202c3c;
  padding: 20px;
  border-radius: 15px;
  min-width: 280px;
}

.forecast h2 {
  font-size: 12px;
  margin-bottom: 1rem;
  color: #838a9a;
}

.fc-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fc-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  text-align: center;
  border-radius: 5px;
  background: #ffffff1a;
  box-shadow: 0 4px 30px #0000001a;
  /* backdrop-filter: blur(5.8px); */
}

.fc-condition {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font-size: 12px;
}

.fctemp {
  font-size: 12px;
  font-weight: 500;
}

.day {
  color: #ebf0f2;
}

/* --- MEDIA QUERIES --- */

/* Tablet and Smaller Desktop Screens (<= 1024px) */
@media (max-width: 1024px) {
  .main {
    max-width: 100%;
    width: 100%;
  }

  .forecast {
    width: 100%;
  }

  .city-left {
    gap: 2rem;
  }

  .ctemp {
    font-size: 4rem;
  }
}

/* Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  .main {
    max-width: 100%;
    width: 100%;
  }

  body {
    padding: 10px;
  }

  .search-bar {
    width: 80%;
  }
  .search-btn {
    width: 20%;
  }

  .city-left {
    gap: 1rem;
  }

  .ctemp {
    font-size: 4.5rem;
  }

  .ac-container {
    flex-direction: column;
    gap: 15px;
  }

  .ac-col-1,
  .ac-col-2 {
    width: 100%;
    gap: 15px;
  }

  .actemp,
  .acrain,
  .acwind,
  .uvindex {
    font-size: 1.8rem;
  }
}

/* Extra Small Mobile (<= 480px) */
@media (max-width: 480px) {
  .ctemp {
    font-size: 3.5rem;
  }

  .logo {
    width: 60px;
  }
}
