 * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  width: 100%;
  height: 100vh;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #131416;
}
.container {
  width: 60%;
  min-width:360px;
  max-width: 900px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.container .header {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.header #typeSpeed, .header #typePerWord {
  width: 50%;
  min-height: 100px;
  background-color: #2c2d3a;
  margin: 5px 0;
  border: 1px solid #131416;
}
.header #typeSpeed .title, .header #typePerWord .title {
  width: 100%;
  text-align: center;
  padding: 10px 0;
  font-size: 18px;
  color: orange;
  font-family: "JetBrains Mono"
}
#mistakes, #perWord {
  width: 100%;
  text-align: center;
  font-size: 30px;
  font-family: "JetBrains Mono";
  color: white
}
.container .typer {
  width: 100%;
  height: 0%;
  max-height: 400px;
  overflow: hidden;
  background-color: #303136;
  cursor: text;
  transition: height 0.4s ease-in-out;
}
.container .typer.show {
  height: 50%;
  min-height: 100px;
}
.container .typerWrapper {
  width: 100%;
  height: max-content;
  position: relative;
  transition: translate 0.6s;
}
.container .footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.footer .timerWrapper {
  width: 100%;
  height: max-content;
  display: flex;
  align-items: center;
  justify-content: center;
}
.timerWrapper #timer {
  width: 100%;
  background-color: #5f5d5d;
  height: max-content;
  position: sticky;
  bottom: 0px;
  z-index: 3
}
.timerWrapper #timer #value {
  height: 10px;
  width: 0%;
  background-color: #ff9f1a;
}
.footer #start {
  width: 100px;
  padding: 10px;
  margin: 20px 0;
  background: #ea891a;
  border: none;
  color: #e3e3e3;
  font-size: 12px;
  font-family: "Cascadia Code";
  cursor: pointer;
}
#input, #output {
  display: block;
  width: 100%;
  height: 100%;
  font-family: "Anonymous Pro";
  padding: 10px;
  line-height: 1.4;
  font-size: 25px;
  white-space: word-wrap;
  word-break: break-all;
  color: #5c5c5c;
  overflow: hidden;
}

#input {
  position: absolute;
  z-index: 1;
  color: transparent;
  width: calc(100% - 2px);
  top: 0;
  left: 0;
}
#input:focus { outline: none }
.error {
  background-color: #f93c1a;
  color: white;
}
.correct {
  color: #fffcfa;
}
#caret {
    position: absolute;
    z-index: 2;
     display: block;
    width: 3px;
    height: 30px;
  background-color: #413f39;
  top: 12px;
  left: 3px;
  transition: all 0.2s;
}
#caret.active {
   background-color: orange;
}
.difficulties {
  width: 100%;
  height: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.6s;
}
.difficulties.show {
  height: 60px;
}
.difficulties button {
  width: 33.33%;
  padding: 10px;
  font-family: "JetBrains Mono";
  background-color: #23262a;
  margin: 0 5px;
  margin-top: 20px;
  border: none;
  font-size: 18px;
  color: white;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.difficulties button span {
  position: relative;
  z-index: 1;
}
.difficulties button:before {
  content: "";
  position: absolute;
  bottom: 0px;
  display: block;
  height: 100%;
  width: 0%;
  background-color: #3b3a3a;
  opacity: 0;
  transition: width 0.3s ease-in, opacity 1s ease-in; 
  z-index: 0;
}
.difficulties button.active:before {
  width: 100%;
  opacity: 1;
  background-color: #19c262;
}
.difficulties button:hover:before {
  width: 100%;
  opacity: 1
}
