body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: rgb(37, 52, 37);
}

header {
  width: 100%;
  background-color: forestgreen;
  color: white;
  text-align: center;
  padding: 1px 0;
}

nav {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1;
}

nav ul {
  list-style: none;
  padding: 0;
  background-color: rgb(65, 87, 65);
  margin: 0;
}

nav ul li {
  display: inline;
  margin-right: 10px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  display: inline-block;
}

nav ul li a:hover {
  background-color: rgb(94, 124, 94);
}

main {
  padding: 30px 2vw;
}

/*switch*/
.switch-container {
  display: flex;
  align-items: center;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgb(65, 87, 65);
  transition: 0.2s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.switchLabel {
  margin: 0px 15px;
  color: white;
}

/*buttons*/
.button-container {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  height: 52vw;
}

.button-title {
  margin: 3vw;
  text-align: center;
  padding: 1.5vw;
  border-radius: 1vw;
  font-size: 3vw;
}

.button-title.consonants {
  color: darkcyan;
  background-color: lightskyblue;
}

.button-title.vowels {
  color: firebrick;
  background-color: coral;
}

.button-title.tones {
  color: forestgreen;
  background-color: yellowgreen;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.9vw;
  justify-content: center;
}

#consonants {
  width: 46%;
}

#vowels {
  width: 54%;
}

#tones {
  display: flex;
  flex-direction: column;
  height: 10vw;
  align-items: center;
  align-content: center;
  row-gap: 1vw;
  column-gap: 5vw;
}

.button {
  position: relative;
  width: 6vw;
  height: 6vw;
  border: 0.3vw outset;
  border-radius: 1vw;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0.5vw 1vw rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  cursor: pointer;
}

.button:hover {
  transform: scale(1.05);
}

.consonant {
  background-color: lightskyblue;
  border-color: lightskyblue;
}

.consonant:active {
  background-color: rgb(162, 218, 252);
  border-color: rgb(162, 218, 252);
}

.vowel {
  background-color: coral;
  border-color: coral;
}

.vowel:active {
  background-color: rgb(249, 158, 125);
  border-color: rgb(249, 158, 125);
}

.tone {
  background-color: yellowgreen;
  border-color: yellowgreen;
  width: 10vw;
}

.tone:active {
  background-color: rgb(188, 230, 103);
  border-color: rgb(188, 230, 103);
}

.tone-term {
  color: white;
  font-size: 1.5vw;
  height: 2vw;
  margin: 0;
}

.empty {
  position: relative;
  width: 6vw;
  height: 6vw;
  background-color: rgba(0, 0, 0, 0);
  border-color: rgba(0, 0, 0, 0);
}

.big-letter {
  font-size: 2.5vw;
  font-weight: bold;
  color: #3c3c3c;
  padding-bottom: 1vw;
}

.small-letter {
  position: absolute;
  bottom: 0.2vw;
  right: 0.4vw;
  font-size: 1.3vw;
  color: darkcyan;
}

.consonant .small-letter {
  color: darkcyan;
}

.vowel .small-letter {
  color: firebrick;
}

.tone .small-letter {
  color: forestgreen;
}

.info {
  color: white;
  text-align: right;
  font-size: 1.3vw;
}

.info.href {
  text-decoration: underline;
  cursor: pointer;
}

.description-title {
  color: white;
  border-radius: 10px;
  font-size: 32px;
  margin-left: 10px;
}

.description-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.description-box {
  background-color: rgb(65, 87, 65);
  padding: 1.5vw;
  border-radius: 10px;
  margin: 10px 0;
}

.description-box.small {
  width: 15%;
}

.description-box.large {
  width: 35%;
}

.description-box.medium {
  width: 28.5%;
}

.description-box dt {
  font-size: 28px;
  color: white;
  font-weight: bold;
  text-align: center;
  padding-bottom: 10px;
}

.description-box dd {
  margin: 0;
  font-size: 20px;
  color: white;
  line-height: 1.8;
  display: none;
}

.description-box dd b {
  color: rgb(80, 211, 80);
}

.description-box dd ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.description-box dd .example {
  display: inline-block;
}

.fa-solid {
  cursor: pointer;
  color: rgb(80, 211, 80);
}

footer {
  font-size: 1.5vw;
  text-align: center;
  padding: 0.5em 0;
  background-color: rgb(65, 87, 65);
  color: white;
  width: 100%;
  bottom: 0;
}

@media (max-width: 700px) {
  .button-container {
    flex-direction: column;
    height: 170vw;
  }
  .button-title {
    font-size: 5vw;
  }
  .buttons {
    gap: 2.1vw;
  }
  #consonants {
    width: 80%;
    padding-left: 3.5vw;
  }
  #vowels {
    width: 100%;
  }
  #tones {
    height: 18vw;
    gap: 1.5vw;
  }
  .tone-term {
    font-size: 2.3vw;
    height: 3vw;
  }
  .button {
    width: 12vw;
    height: 12vw;
    border-width: 0.5vw;
    border-radius: 2vw;
  }
  .tone {
    width: 17vw;
  }
  .empty {
    width: 12vw;
    height: 12vw;
  }
  .big-letter {
    font-size: 5vw;
    padding-bottom: 2vw;
  }
  .small-letter {
    bottom: 0.5vw;
    right: 1vw;
    font-size: 2.5vw;
  }
  .tone .big-letter {
    font-size: 4.5vw;
  }
  .info {
    font-size: 3vw;
  }
  .description-title {
    font-size: 28px;
  }
  .description-container {
    flex-direction: column;
    align-content: center;
  }
  .description-box.large, .description-box.small, .description-box.medium {
    width: 80%;
    padding: 20px;
  }
  .description-box dt {
    font-size: 24px;
  }
  .description-box dd {
    font-size: 18px;
  }
  footer {
    font-size: 3vw;
  }
}