/* Remove default margin and padding */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Makes sizing more intuitive */
}

/* Remove list styles */
ul,
ol {
  list-style: none;
}

/* Remove link styles */
a {
  text-decoration: none;
  color: inherit; /* inherit color from parent */
}

/* Remove default form styles */
button,
input,
select,
textarea {
  background: none;
  border: none;
  outline: none;
  font: inherit;
}

.roboto-regular {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

body {
  width: 90%;
  margin: 20px auto;
  background-color: #ffffff;
  font-family: "Regular", sans-serif;
}

header a {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon {
  width: 50px;
}

/* Keyboard */

#keyboard {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #3f3f3f;
  border-radius: 6px;
  box-shadow: 0px 1px rgb(0 0 0 / 25%);
}

.keyboard-row {
  width: 880px;
  display: flex;
  position: relative; /* makes it so keys don't clip to next layer */
}

.key-btn {
  width: 55px;
  height: 55px;
  border: 1px solid #3f3f3f;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.key-inner {
  font-size: 13px;
  width: 90%;
  height: 45px;
  /* border: 1px solid #bdbdbd; */
  border-radius: 6px;
  padding: 5px;
  box-shadow: 0px 1px rgb(0 0 0 / 25%);
  margin-top: -4px; /* move up slightly */
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: space-between;
  position: relative;
}

.spacebar {
  width: 97%;
}

.legend {
  position: absolute;
  bottom: 5px;
  right: 0px;
}

/* Prompt */
#prompt {
  display: flex;
  flex-wrap: wrap;
  position: relative;
  margin: 20px auto;
}

.word {
  display: flex;
  margin-bottom: 8px;
}

.letter {
  white-space: pre;
  font-size: 1.4em;
}

.correct {
  color: #99cc00;
}

.incorrect {
  background-color: #f0a3a3;
}

.activeLetter {
  text-decoration: underline;
  text-decoration-skip-ink: none;
}

#caret {
  animation: caretBlink 1s infinite;
  position: absolute;
  width: 2px;
  height: 1.4em;
  background: #000;
  border-radius: 4px;
  left: 0px;
  top: 4px;
  transition: transform 0.15s ease;
}

@keyframes caretBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

html,
body {
  /* height: 100%; */
  width: 100%;
  margin: 0;
}

body {
  display: grid;
  grid-template-rows: auto 1fr auto; /* header, main, footer */
  grid-template-areas:
    "header"
    "main"
    "footer";
  height: 100vh; /* make it fill the viewport */
}

main {
  display: flex;
  flex-direction: column;
  justify-content: start;
  margin-top: 25px;
  width: 910px;
  margin: 20px auto;
}

header {
  grid-area: header;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  /* background-color: #f5f5f5; */
}

#keyboard {
  /* background-color: #ccc; */
}

footer {
  grid-area: footer;
  text-align: center;
  padding: 12px;
  display: flex;
  justify-content: start;
  align-items: center;
  /* margin: 0px 50px; */
}

#github-link {
  display: flex;
  align-items: center;
  gap: 5px;
  color: gray;
}

#github-link img {
  width: 32px;
  height: 32px;
}

#switch-select {
  width: 200px;
}

#soundbutton {
  font-size: 2em;
}

#controls {
  display: flex;
  justify-content: space-between;
}

input[type="range"] {
  accent-color: black;
}

#switch-select {
  border: 1px solid black;
}

#wordInput {
  border: 1px solid black;
  padding: 4px 4px;
  margin: 18px 0px;
  font-size: 1.4em;
  color: gray;
  border-radius: 8px;
}

#wordInput:focus::placeholder {
  color: transparent;
}
