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

body {
  font-family: "DM Sans", sans-serif;
  background-color: #0c0c2d;
  color: #fff;
  line-height: 1.5;
  padding: 10px;
}
/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  background-color: #0c0c2d;
  align-items: center;
  max-width: 1200px;
  margin: auto;
  position: sticky;
    top: 0;
    padding: 10px 0px;
}
hr{
  opacity: 0.2;
}
.dropdown-down{
  display: none;
  background-color: #1e1e3f;
  padding: 3px 5px;
  border-radius: 10px;
  min-width: 250px;
}
.dropdown-header{
  cursor: pointer;
  display: flex;
  gap : 10px;
  background-color: #2b2b50;
  padding: 5px 10px;
  border-radius: 6px;
  margin: 10px 0px;
}
.dropdown-down span{
  opacity: 0.5;
}
.option{
  cursor: pointer;
  padding: 3px 20px;
}
.option:hover{
  background-color: #333354;
  border-radius: 6px;
}
.select img{
  display: none;
}
.selected{
    display: flex;
    justify-content: space-between;
    background-color: #2b2b50;
    border-radius: 6px;
}
.selected img{
  display: block;
  width: 20px;
    height: 20px;
}
.select{
  padding: 5px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo span {
  font-weight: 700;
  font-size: 20px;
}

.unit-btn {
  background-color: #1e1e3f;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  cursor: pointer;
}
.show{
  display: block;
  position: absolute;
  right: 0px;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

h1 {
  font-size: 55px;
  margin-top: 20px;
}

/* Search */
.search-bar {
  display: flex;
  justify-content: center;
  gap: 15px;
}
.hide{
  display: none;
}
.search-bar input {
  background-image: url("./assets/images/icon-search.svg");
  background-repeat: no-repeat;
  background-position: 14px 12px; 
  background-size: 18px;
  width: 45%;
  padding: 12px 39px;
  border-radius: 10px;
  border: none;
  background-color: #1c1c3d;
  color: white;
  font-size: 16px;
  outline: none;
}

.search-bar input::placeholder {
  color: #bbb;
}
.city-list {
  text-align: left;
  width: 45%;
  background-color: #1e1e3f;
  border-radius: 10px;
  padding: 5px;
  position: absolute;
  top: 51px;
  left: 46%;
  transform: translateX(-50%);
  z-index: 9999;
}

.loading{
  padding: 3px 10px;
    display: flex;
    gap: 8px;
}
.city{
  padding: 5px 10px;
  text-align: left;
  cursor: pointer;
}
.city:hover{
  background-color: #2b2b50;
  border-radius: 10px;
}
.search-bar button {
  padding: 12px 25px;
  background-color: #4b5fff;
  border: none;
  border-radius: 10px;
  color: white;
  cursor: pointer;
}

/* Layout */
.weather-section {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  flex-wrap: wrap;
  gap: 30px;
}

.left {
  flex: 5;
}

.right {
  flex: 2;
  background-color: #1e1e3f;
  border-radius: 12px;
  padding: 10px 20px;
}

/* Main Card */
.main-card {
  background-color: #2b2b50;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 16px;
  padding: 25px;
  text-align: left;
  height: 291px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.location {
  font-size: 20px;
  font-weight: 700;
}

.date {
  color: #ddd;
  font-size: 14px;
}

.temp-info {
  display: flex;
  align-items: center;
  margin-top: 15px;
  gap : 55px;
}

.temp-info img {
  width: 90px;
}

.temp {
  font-size: 75px;
  font-weight: bold;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 25px;
}

.card {
  background-color: #1e1e3f;
  padding: 20px;
  border-radius: 10px;
  text-align: left;
  height: 120px;
}

.card span {
  margin-bottom: 10px;
  font-size: 18px;
  display: block;
  color: #aaa;
}

.card p {
  font-size: 30px;
  font-weight: 700;
}

/* Daily */
.daily {
  margin-top: 25px;
  text-align: left;
}

.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-top: 15px;
  overflow-x: auto;
}

.day {
  background-color: #1e1e3f;
  border-radius: 10px;
  padding: 10px;
  min-width: 80px;
  text-align: center;
  height: 130px;
}

.day img {
  width: 50px;
    margin-top: 6px;
}

/* Hourly */
.hourly-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.hourly {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hour {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #2b2b50;
  border-radius: 10px;
  padding: 5px 15px;
  height: 47px;
}

.hour img {
  width: 35px;
  padding-bottom: 3px;
}
.each_h{
  display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

select {
  appearance: base-select;
  outline: none;
  background-color: #2b2b50;
  color: white;
  border: none;
  padding: 8px 15px;
  padding-right: 25px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  width: 110px;
}
::picker-icon {
  display: none;
}
/* Selected option color */
select option:checked {
  background-color: #2b2b50;
}
::checkmark{
  display: none;
}
/* Unselected option styling */
::picker(select) {
  padding: 10px;
  border: none;
  appearance: base-select;
  color: white;
  background-color: #1e1e3f;
  border-radius: 6px;
}
.hourly-header img{
  right: 110px;
    position: absolute;
}
option{
  padding: 5px;
  border-radius: 6px;
}
.daily-temp{
  display: flex;
  justify-content: space-between;
  padding: 0px 5px;
}
.error{
  margin: 50px auto;
  width: 422px;
}
.errorh2{
  font-size: 35px;
}
.errorp{
  font-size: 15px;
  opacity: 0.5;
  margin: 10px;
}
.errorbutton{
    color: white;
    cursor: pointer;
    border: none;
    background-color: #2b2b50;
    padding: 5px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 3px;
    margin: 10px auto;
}
@media only screen and (max-width: 720px) {
  .navbar{
    padding: 0px;
  }
  .search-bar{
    flex-direction: column;
    padding: 0px;
  }
  .search-bar input {
    width: 100%;
  }
  .weather-section{
    flex-direction: column;
  }
  .stats{
    grid-template-columns: repeat(2, 1fr);
  }
  .days{
    grid-template-columns: repeat(3, 1fr);
  }
  .city-list {
    width: 100%;
    left : 50%;
  }
}