:root {
  --max-width: 540px;
  user-select: none;
}
html {
  --bg-normal: #121213;
  --text-color-normal: #fff;
  --text-color-secondary: #121213;
  --line-color-normal: #616a6e;
  --bg-keyboard-normal: #818384;
  --bg-keyboard-incorrect: #3a3a3c;
  --bg-keyboard-wrong: #b59f3b;
  --bg-keyboard-correct: #538d4e;
}

html[data-theme="light"] {
  --text-color-normal: #121213;
  --text-color-secondary: #fff;
  --bg-normal: #fff;
  --bg-keyboard-normal: #d3d6da;
  --bg-keyboard-incorrect: #787c7e;
  --bg-keyboard-wrong: #c9b458;
  --bg-keyboard-correct: #6aaa64;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
}
html,
body {
  background-color: var(--bg-normal);
  color: var(--text-color-normal);
}

body {
  position: relative;
}
.navbar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  position: relative;
  text-align: center;
  padding: 8px;
  font-size: 32px;
  background-color: var(--bg-normal);
  color: var(--text-color-normal);
  border-bottom: 1px solid var(--line-color-normal);
}

.navbar h3 {
  font-size: 32px;
  font-weight: normal;
}
.navbar svg {
  color: var(--text-color-normal);
  fill: var(--text-color-normal);
  cursor: pointer;
}
main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 1em auto 0px;
  max-width: var(--max-width);
  width: 100%;
  height: calc(100vh - 52px - 64px - 3px);
  background-color: var(--bg-normal);
  color: var(--text-color-normal);
  /* border: 1px solid var(--line-color-normal); */
}
.row {
  display: flex;
  width: 100%;
  justify-content: center;
}
.input_column {
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 24px;
  width: 50px;
  height: 50px;
  margin: 4px;
  color: var(--text-color-normal);
  border: 1px solid var(--line-color-normal);
  transition: transform 300ms ease-in-out;
}

.input_column.flip {
  transform: rotateX(90deg);
}
.shake {
  animation: shake 100ms ease 0ms 2;
}
@keyframes shake {
  0% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(4px);
  }
  100% {
    transform: translateX(0px);
  }
}

.keyboard_container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 515px);
  width: 100%;
  padding: 8px;
  margin-bottom: 8px;
  /* border: 1px solid var(--line-color-normal); */
}

.keyboard-key {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  width: 30px;
  height: 60px;
  margin: 2px;
  cursor: pointer;
  background: var(--bg-keyboard-normal);
}
.keyboard_container .row:nth-child(3) .keyboard-key:first-child,
.keyboard_container .row:nth-child(3) .keyboard-key:last-child {
  width: fit-content;
}

.incorrect {
  background: var(--bg-keyboard-incorrect);
  color: #fff;
  border: none;
}
.wrong-position {
  background: var(--bg-keyboard-wrong);
  color: #fff;
  border: none;
}
.correct {
  background: var(--bg-keyboard-correct);
  color: #fff;
  border: none;
}

.instruction_container {
  display: flex;
  opacity: 0;
  height: 0px;
  z-index: -1;
  transform: translateY(50px);
  flex-direction: column;
  align-items: center;
  width: 100vw;
  padding: 0 24px;
  background: var(--bg-normal);
  position: absolute;
  transition: all 100ms ease;
}
.instruction_container header {
  color: var(--text-color-normal);
  position: relative;
  display: flex;
  justify-content: center;
  border: none;
  margin-top: 24px;
  width: 100vw;
  max-width: var(--max-width);
}
.instruction_container header h1 {
  font-size: 1.5em;
}

.instruction_container svg {
  color: var(--text-color-normal);
  fill: var(--text-color-normal);
  cursor: pointer;
  position: absolute;
  right: 24;
}
.instruction_container section {
  margin-top: 20px;
  max-width: var(--max-width);
}
.instruction_container p {
  margin: 8px 0;
}

.instruction_container .examples {
  margin: 20px 0;
  border-bottom: 1px solid var(--line-color-normal);
  border-top: 1px solid var(--line-color-normal);
}

.instruction_container .examples .example .row {
  justify-content: flex-start;
}

.settings_container {
  display: flex;
  opacity: 0;
  height: 0px;
  z-index: -1;
  transform: translateY(50px);
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100vw;
  padding: 0 24px;
  color: var(--text-color-normal);
  background: var(--bg-normal);
  position: absolute;
  transition: all 100ms ease;
}
.settings_container header {
  color: var(--text-color-normal);
  position: relative;
  display: flex;
  justify-content: center;
  border: none;
  margin-top: 24px;
  width: 100vw;
  max-width: var(--max-width);
}
.settings_container header h1 {
  font-size: 1.5em;
}

.settings_container svg {
  fill: var(--text-color-normal);
  cursor: pointer;
  position: absolute;
  right: 24;
}
.settings_container section {
  display: flex;
  max-width: var(--max-width);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.settings_container p {
  margin: 8px 0;
}

.social_media {
  display: flex;
  margin: 12px;
  gap: 20px;
}

.option_container {
  display: flex;
  justify-content: center;
  align-items: center;
}
.option_container p {
  margin: 8px;
}

.portfolio_link,
.portfolio_link:visited {
  color: var(--text-color-normal);
}
.modal_overlay {
  position: absolute;
  width: 100%;
  top: 0;
  height: 100%;
  background-color: var(--text-color-normal);
  opacity: 0.6;
  z-index: 3;
}
.modal_container {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--bg-normal);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 300px;
  padding: 8px 16px;
  z-index: 4;
}

.modal_heading {
  text-align: center;
  padding: 16px;
}

.modal_message {
  width: 100%;
  text-align: center;
  padding: 16px;
}

.modal_button {
  color: #fff;
  background-color: var(--bg-keyboard-correct);
  margin: 24px 0;
  padding: 8px 16px;
  outline: none;
  border: none;
}

.slideIn {
  opacity: 1;
  transform: translateY(0);
  height: 100%;
  z-index: 1;
}
