* {
  box-sizing: border-box;
  font-family: monospace;
  text-transform: lowercase;
}

body {
  max-width: 1000px;
  margin: auto;
  padding: 0 20px 20px 20px;
}

.exemplos button,
#resultado,
input[type="text"] {
  text-transform: none;
}

h2 {
  margin: 20px 0 10px 5px;
}

.legendas p {
  margin: 5px;
}

#red,
#yellow {
  width: 5px;
  height: 5px;
  display: inline-block;
  margin-right: 5px;
}

#red {
  background: #cc1f1f;
}

#yellow {
  background: #c7b302;
}

.res {
  text-align: center;
}

#resultado {
  border: 1px solid black;
  display: inline-block;
  padding: 10px;
  margin: 20px;
  word-break: break-word;
}

button {
  border: 2px solid black;
  background: white;
  padding: 10px;
  margin: 5px;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  border: 2px dashed black;
}

input[type="text"] {
  padding: 4px 5px 2px 5px;
  margin: 5px;
}

input[type="text"]:focus,
button:focus {
  outline: none;
}

.input {
  border: 1px solid black;
  background: white;
  cursor: pointer;
  padding: 1px 5px;
  margin: 5px;
}
.input:hover {
  border: 1px dashed black;
}

.alert {
  border: 2px solid #c7b302;
}
.alert:hover {
  border: 2px dashed #c7b302;
}

.fail {
  border: 2px solid #cc1f1f;
}

.fail:hover {
  border: 2px dashed #cc1f1f;
}

.exercicios .content {
  display: flex;
  flex-wrap: wrap;
}

.exercicios button {
  flex: auto;
}

.dark {
  display: none;
}

.dark img {
  width: 10px;
  margin-right: 5px;
  position: relative;
  bottom: -1px;
}

@media (prefers-color-scheme: dark) {
  * {
    color: white;
  }
  body {
    background: black;
  }
  button {
    background: black;
    border: 2px solid white;
  }
  button:hover {
    border: 2px dashed white;
  }
  #resultado {
    border: 1px solid white;
  }
  .input {
    background: black;
    border: 1px solid white;
  }
  .input:hover {
    border: 1px dashed white;
  }
  input[type="text"] {
    background: black;
    border: 1px solid white;
  }
  .dark {
    display: inline-block;
    position: fixed;
    margin: 0;
    right: 10px;
    bottom: 10px;
  }
}
