* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: 0.2s ease;
}

body {
  width: 100%;
  height: 100vh;
  background: #00a6f4;
  color: white;
}

button {
  cursor: pointer;
}

.container {
  width: 98%;
  max-width: 800px;
  margin: 0 auto;
}

/* 첫번째 */
#one {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 70px 0;
  gap: 10px;
}

.one_top {
  display: flex;
  align-items: center;
  svg {
    width: 33px;
    height: 33px;
    margin-right: 10px;
  }
}

.one_bottom {
  p {
    font-size: 18px;
    color: #dfdfdf;
  }
}

/* 두번째 */
#two {
  width: 100%;
  .container {
    display: flex;
    flex-direction: column;
    background: #00aef6;
    border: 1px solid #52bff8;
    border-radius: 20px;
  }
  .search_div {
    width: 100%;
    display: flex;
    padding: 20px;
    gap: 10px;
    .input_box {
      width: 100%;
      max-width: 650px;
      display: flex;
      padding: 0 20px;
      align-items: center;
      border: 1px solid #8bd3fa;
      background: #52bff8;
      border-radius: 10px;
      gap: 15px;
      justify-content: center;
      input {
        width: 90%;
        font-size: 18px;
        height: 100%;
        background: 0;
        border: none;
        outline: none;
        color: white;
        &::placeholder {
          color: #d4f1ff;
        }
      }
    }
    .search_box {
      button {
        width: 100px;
        height: 64px;
        border-radius: 10px;
        border: none;
        background: white;
        color: oklch(0.546 0.245 262.881);
      }
    }
  }
  .popular_city {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 10px;
    .popular_city_top {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .buttons {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      button {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #52bff8;
        border: 1px solid #79ccf9;
        color: white;
        padding: 10px 20px;
        border-radius: 20px;
        gap: 5px;
      }
    }
  }
}

/* 세번째 */
#three {
  width: 100%;
  margin-top: 30px;
  display: none;
  .container {
    display: flex;
    flex-direction: column;
    background: #99a1af;
    border: none;
    border-radius: 20px;
    padding: 20px;
  }
  .location {
    display: flex;
    align-items: center;
    gap: 10px;
    h1 {
      font-size: 24px;
    }
  }
  .weather_main {
    display: flex;
    justify-content: space-between;
    margin: 40px;
    align-items: center;
  }
  .weather_main_top {
    display: flex;
    align-items: center;
    gap: 10px;
    svg {
      width: 100px;
      height: 100px;
    }
  }
  .temp {
    display: flex;
    flex-direction: column;
    align-items: center;
    h2 {
      font-size: 72px;
    }
    p {
      font-size: 18px;
    }
  }
  .weather_main_bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    h2 {
      font-size: 30px;
    }
    p {
      font-size: 16px;
    }
  }
  .weather_sub {
    display: flex;
    justify-content: space-between;
    .sub_info {
      display: flex;
      align-items: center;
      gap: 10px;
      p {
        color: #b4bdc2;
      }
    }
  }
  #date {
    font-size: 16px;
  }
}

/* 네번째 */
#four {
  width: 100%;
  margin-top: 30px;
  display: none;
  .container {
    display: flex;
    flex-direction: column;
    background: white;
    color: black;
    padding: 20px;
    border-radius: 20px;
    border: none;
  }
  .four_title {
    h1 {
      font-size: 20px;
    }
  }
  .time_forecast {
    display: flex;
    gap: 10px;
    margin-top: 30px;
  }
  .time_forecast_box {
    background: #f9fafb;
    border: 1px solid #e6e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 13px 20px;
    gap: 10px;
    border-radius: 20px;
    p {
      color: #939a9e;
    }
    span {
      color: black;
    }
    svg {
      width: 40px;
      height: 40px;
    }
  }
}

/* 다섯번째 */
#five {
  width: 100%;
  margin-top: 30px;
  display: none;
  .container {
    display: flex;
    flex-direction: column;
    background: white;
    color: black;
    padding: 20px;
    border-radius: 20px;
    border: none;
  }
  .five_title {
    h1 {
      font-size: 20px;
    }
  }
  .week_forecast {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 30px;
  }
  .week_forecast_box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e6e7eb;
    border-radius: 20px;
    padding: 13px 20px;
  }
  .week_forecast_box_icon {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .week_forecast_box_temp {
    span:nth-child(2) {
      color: #939a9e;
    }
  }
}

@media (max-width: 700px) {
  .input_box {
    height: 62px;
  }
  .search_div {
    flex-direction: column;
    .search_box {
      button {
        width: 100% !important;
      }
    }
  }
  #location {
    font-size: 20px !important;
  }
  #temp {
    font-size: 50px !important;
  }
  .weather_main_top svg {
    width: 80px !important;
    height: 80px !important;
  }
  #feelslike {
    font-size: 18px !important;
  }
  #status {
    font-size: 20px !important;
  }
  #higlow {
    font-size: 16px !important;
  }
  #wind {
    font-size: 18px !important;
  }
  #humidity {
    font-size: 18px !important;
  }
  #vis {
    font-size: 18px !important;
  }
  #pressure {
    font-size: 18px !important;
  }
  .sub_info p {
    font-size: 16px !important;
  }
  #date {
    font-size: 14px !important;
  }
}

@media (max-width: 550px) {
  .weather_main {
    margin: 20px !important;
  }
  #location {
    font-size: 18px !important;
  }
  #temp {
    font-size: 30px !important;
  }
  .weather_main_top svg {
    width: 60px !important;
    height: 60px !important;
  }
  #feelslike {
    font-size: 14px !important;
  }
  #status {
    font-size: 18px !important;
  }
  #higlow {
    font-size: 14px !important;
  }
  #wind {
    font-size: 16px !important;
  }
  #humidity {
    font-size: 16px !important;
  }
  #vis {
    font-size: 16px !important;
  }
  #pressure {
    font-size: 16px !important;
  }
  .sub_info p {
    font-size: 14px !important;
  }
  .input_box {
    height: 50px !important;
  }
  .search_box button {
    height: 50px !important;
  }
  .buttons button {
    padding: 8px 10px !important;
    font-size: 12px !important;
  }
  #one {
    padding: 30px 0 !important;
  }
  #date {
    font-size: 12px !important;
  }
}

@media (max-width: 450px) {
  #location {
    font-size: 14px !important;
  }
  #temp {
    font-size: 20px !important;
  }
  .weather_main_top svg {
    width: 40px !important;
    height: 40px !important;
  }
  #feelslike {
    font-size: 12px !important;
  }
  #status {
    font-size: 14px !important;
  }
  #higlow {
    font-size: 12px !important;
  }
  #wind {
    font-size: 12px !important;
  }
  #humidity {
    font-size: 12px !important;
  }
  #vis {
    font-size: 12px !important;
  }
  #pressure {
    font-size: 12px !important;
  }
  .sub_info p {
    font-size: 12px !important;
  }
  .one_top {
    svg {
      width: 25px !important;
      height: 25px !important;
    }
    h1 {
      font-size: 18px !important;
    }
  }
  .one_bottom p {
    font-size: 14px !important;
  }
  .input_box {
    svg {
      width: 20px !important;
      height: 20px !important;
    }
    #input {
      font-size: 14px !important;
    }
  }
  #date {
    font-size: 10px !important;
  }
}

@media (max-width: 380px) {
  .weather_sub {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .weather_sub .sub_info {
    width: calc(50% - 5px); /* two per row with gap compensation */
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .weather_sub .sub_info p {
    font-size: 12px !important;
  }

  .weather_main {
    margin: 20px 0 !important;
  }
}
