*,
*::after,
*::before {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  outline: none;
  border: 0;
}

html {
  font-size: small;
  font-family: sans-serif;
}

body {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: #8291a8;
  padding: 2rem 0;
}

label {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* NAV */
.navbar {
  display: flex;
  justify-content: center;
  max-width: 30rem;
  padding: 1.5rem;
}

/* CONTROLS */

.controls {
  display: flex;
  flex-wrap: wrap;
  background: rgb(215, 215, 215);
  padding: 0.5rem;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 1rem;
}

.controls-item {
  flex-grow: 1;
  background: #fff;
  padding: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  text-align: center;
  box-shadow: 1px 1px 5px rgb(102, 102, 102);
}

.controls-item:hover {
  background: #abaaaa87;
  cursor: pointer;
}

.file {
  width: 0;
}

/* STATS */

.stats {
  display: flex;
  background: rgb(215, 215, 215);
  padding: 0.5rem;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 1rem;
  flex-wrap: wrap;
}

.stats-item {
  flex-grow: 1;
  display: flex;
  justify-content: space-between;
  background: #fff;
  padding: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  box-shadow: 1px 1px 5px rgb(102, 102, 102);
}

/* KEYBOARD */

.keyboard {
  display: flex;
  flex-direction: column;
  background: rgb(215, 215, 215);
  padding: 0.5rem;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 1rem;
}

.keyboard-row {
  display: flex;
  gap: 0.5rem;
}

.keyboard-input {
  flex-grow: 1;
  background: #fff;
  padding: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  text-align: center;
  box-shadow: 1px 1px 5px rgb(102, 102, 102);
}

.active {
  background: #abaaaa87;
}

@media screen and (max-width: 768px) {
  .keyboard {
    padding: 0.25rem;
    gap: 0.25rem;
  }
  .keyboard-row {
    gap: 0.25rem;
  }

  .keyboard-input {
    border-radius: 0.5rem;
    padding: 0.4rem 0.5rem;
  }
}

/* SLIDER */
.slider {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.slider-btn {
  background: #fff;
  padding: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  text-align: center;
  box-shadow: 2px 2px 10px rgb(102, 102, 102);
  cursor: pointer;
}

.slider-btn:hover {
  background: #abaaaa87;
}

.slider-left {
  clip-path: polygon(
    40% 0%,
    40% 20%,
    100% 20%,
    100% 80%,
    40% 80%,
    40% 100%,
    0% 50%
  );
}

.slider-right {
  clip-path: polygon(
    0% 20%,
    60% 20%,
    60% 0%,
    100% 50%,
    60% 100%,
    60% 80%,
    0% 80%
  );
}

.slider-count {
  color: white;
}

/* TEXTBOX */

.textbox {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-height: 30vh;
  user-select: none;
  caret-color: transparent;
  color: #000;
  text-wrap: wrap;
}

.textbox::before {
  position: absolute;
  display: block;
  content: "Click to view";
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  visibility: hidden;
}

.textbox::after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.556);
  width: 100%;
  height: 100%;
  backdrop-filter: blur(2px);
  visibility: hidden;
}

.textbox:not(:focus)::after,
.textbox:not(:focus)::before {
  visibility: visible;
}

.textbox-line {
  display: flex;
  gap: 0.2rem;
  flex-wrap: wrap;
  padding: 0.5rem;
}

.next {
  border-left: 1px solid black;
}

.correct {
  color: #0000007e;
}

.incorrect {
  color: rgb(243, 59, 59);
}
