* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
}

#checkMenu {
  display: none;
}

.navbar {
  background-color: gold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
}

.menu {
  list-style: none;
  display: flex;
  gap: 1rem;
  font-weight: bold;
}

.navbar label:first-of-type span {
  border: 1px solid rgb(102, 89, 14);
  border-radius: 10px;
  padding: 2px 5px;
  cursor: pointer;
  user-select: none;
}

/* media query */

@media only screen and (min-width: 800px) {
  .navbar label:first-of-type {
    display: none;
  }

  .mobileMenu {
    display: none;
  }
}

@media only screen and (max-width: 800px) {
  .menu {
    display: none;
  }
}

/* mobileMenu */

.mobileMenu {
  background-color: rgb(148, 127, 10);
  list-style: none;
  height: 0;
  overflow: hidden;
  transition: all 0.5s;
}

.mobileMenu li {
  padding: 10px 40px;
  font-weight: bold;
}

/* menu click */

.close {
  display: none;
}

#checkMenu:checked ~ .mobileMenu {
  padding: 20px 0;
  height: 150px;
}

#checkMenu:checked + .navbar label:first-of-type span {
  background-color: rgb(155, 130, 7);
}

#checkMenu:checked + .navbar label:first-of-type .open {
  display: none;
}

#checkMenu:checked + .navbar label:first-of-type .close {
  display: inline-block;
}

/* lightDark */
.lightDark input {
  display: none;
}

.lightDark span {
  display: block;
  width: 55px;
  height: 20px;
  border: 1px solid black;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.5s;
}

.lightDark span::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: black;
  position: relative;
  top: 1px;
  left: 2px;
  transition: all 0.5s;
}

.lightDark input:checked + span {
  background-color: rgb(234, 226, 17);
}

.lightDark input:checked + span::before {
  background-color: rgb(0, 0, 0);
  left: 36px;
}
