html, body, div#react-root {
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
}

div#react-root {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 100vw;
  height: 100vh;
  color: #888;
}

div.overlap-container {
  position: relative;
}

/* header and footer styles */
.header, .footer {
  padding: 2px;
  opacity: 0.6;
  width: 100vw;
  text-align: center;
  transition: opacity 0.35s ease;
}

.header {
  padding-right: 0.5vw;
  text-align: right;
  background-color: #f8f8ff;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  border-bottom: 1px solid #ddf;
  color: #779;
}

.header * {
  margin: 0 0.3vw;
}

select {
  border-radius: 6px;
  border: 1px solid #558;
  color: #448;
  padding-left: 4px;
  box-shadow: -1px -2px 2px rgba(0, 0, 0, 0.25) inset, 1px 2px 2px rgba(255, 255, 255, 0.5) inset;
  background-color: #ddf;
}

.footer {
  background-color: #888;
  color: white;
}

.header:hover, .footer:hover {
  opacity: 1;
}

a {
  color: inherit;
}

/* prompt row */
#prompt-placeholder {
  opacity: 0;
}

#prompt {
  position: absolute;
  left: 0px;
  top: 0px;
}

/* input row */
.row {
  display: flex;
  flex-direction: row;
}

#input-container {
  font-family: "Arial";
}

#solution-preview-placeholder {
  opacity: 0;
}

#solution-preview {
  position: absolute;
  left: 0px;
  top: 0px;
  width: 100%;
}

.next-word {
  text-decoration: underline;
}

.hidden {
  opacity: 0;
}

input:not([type='checkbox']) {
  position: absolute;
  left: 0px;
  top: 0px;
  width: 100%;
  padding: 0px;
  border: none;
  font-family: "Arial";
  color: #666;
  background-color: #f8f8f8;
}

input:focus {
  outline: none;
  background-color: #ddf;
  box-shadow: 0px 0px 2px 2px #ddf;
  color: #668;
}

input.correct {
  background-color: #dfd;
  color: #484;
}

input.incorrect {
  background-color: #fdd;
  color: #844;
  text-decoration: line-through;
}

button {
  margin-left: 4px;
  font-size: 40px;
  cursor: pointer;
}

/* Solution row */
div#solution {
  font-family: "Arial";
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  div#react-root {
    background-color: #111;
    color: #aaa;
  }

  /* header and footer styles */
  .header {
    background-color: #112;
    border-bottom: 1px solid #224;
    color: #99b;
  }
  select {
    background-color: #001;
    color: #88b;
    border: 1px solid #558;
    box-shadow: -1px -2px 2px rgba(0, 0, 0, 0.5) inset, 1px 2px 2px rgba(255, 255, 255, 0.25) inset;
  }
  .footer {
    background-color: #444;
  }

  /* input row */
  input:not([type='checkbox']) {
    background-color: #080808;
    color: #888;
  }
  input:focus {
    background-color: #002;
    box-shadow: 0px 0px 2px 2px #002;
    color: #88a;
  }
  input.correct {
    background-color: #030;
    color: #9b9;
  }
  input.incorrect {
    background-color: #200;
    color: #a88;
  }
  button {
    background-color: #112;
    color: #224;
    text-shadow: -1px -1px 3px rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    box-shadow: -1px -2px 2px rgba(0, 0, 0, 0.5) inset, 1px 2px 2px rgba(255, 255, 255, 0.25) inset;
    border: none;
  }
  button:hover, button:focus {
    color: #ff8;
    text-shadow: 0px 0px 3px #ff8;
  }
  button:hover:focus {
    text-shadow: 0px 0px 3px #ff8, 0px 0px 6px #ff8;
  }
}
