:root {
  --color-black: #121213;
  --color-white: #fff;
  --color-green: #538d4e;
  --color-yellow: #b59f3b;
  --color-gray-dark: #3a3a3c;
  --color-gray-light: #818384;
}

html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  background: var(--color-black);
  color: var(--color-white);

  font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;

  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

header {
  border-bottom: 1px solid var(--color-gray-dark);
  display: flex;
  justify-content: center;
  flex-direction: row;
  align-items: center;
}

h1 {
  font-family: "DM Serif Text";
  width: 100%;
  margin: 5px 8px 5px 88px;
  padding: 0;
  text-align: center;
}

.menu-buttons {
  height: 75%;
  display: flex;
  justify-content: center;
  flex-direction: row;
  align-items: center;
}

#modal-wordlist {
  list-style: none;
  column-count: 3;
  gap: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  font-size: 3.25vw;
}

#settings,
#wordlist {
  filter: invert(100%);
  border: none;
  width: 32px;
  height: 32px;
  margin-right: 8px;
}

/* The Modal (background) */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  /* Enable scroll if needed */
  background-color: rgba(0, 0, 0, 0.5);
}

/* Modal Content/Box */
.modal-content {
  background-color: var(--color-black);
  margin: 15% auto;
  /* padding: 5px 15px 50px 5px; */
  padding: 1% 3% 5% 3%;
  border: 3px solid var(--color-gray-dark);
  border-radius: 5px;
  width: 80%;
}

/* The Close Button */
.wordlist-close,
.settings-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 10rem;
}

#countdown {
  font-size: min(12vw, 128px);
  color: white;
}

main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* padding: 4%; */
}

#shake,
#stop {
  background-color: var(--color-black);
  font-size: 2.5vh;
  border-radius: 10px;
  width: 22%;
  max-width: 125px;
  margin: 4%;
  padding: 1%;
}

#shake {
  /* background-color: #2bc831; */
  border: 4px solid #2bc831;
  color: #2bc831;
}

#stop {
  /* background-color: #f44336; */
  border: 4px solid #f44336;
  color: #f44336;
}

fieldset {
  display: flex;
  margin: auto;
  justify-content: center;
  align-items: center;
  gap: 1.5vw;
  font-size: 5vw;
}

input[type=radio] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid #999;
  transition: 0.2s all linear;
}

input[type=radio]:checked {
  border: 6px solid white;
}

footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* force keyboard to bottom of page */
  /* position: absolute;
  bottom: 5;
  width: 100%; */
}

input[type=text] {
  height: 6vh;
  width: 80%;
  max-width: 600px;
  margin: 1.5vh;
  border-radius: 12px;
  text-align: center;
  font-size: min(8vw, 3rem);
}

input:disabled {
  background-color: white;
  border-color: black;
}

#board,
#keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#board ul,
#keyboard ul {
  display: flex;
  list-style: none;
  gap: 6px;
  /* Between each cell */
  padding: 0;
  margin: 0;
}

[data-status],
[data-key] {
  border: .5vw solid white;
  font-weight: 500;
  font-size: min(9vw, 3.3rem);
  line-height: 2rem;
  border-radius: 2vh;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 15vw;
  width: 15vw;
  max-height: 7rem;
  max-width: 7rem;

  user-select: none;
}

#keyboard {
  gap: 8px;
  padding-bottom: 10px;
}

#keyboard ul {
  justify-content: center;
}

[data-key] {
  background: var(--color-gray-light);
  border: none;
  border-radius: 4px;

  font-size: 1rem;

  height: 12vw;
  max-height: 3.8rem;
  width: 8.3vw;
  max-width: 4rem;

  cursor: pointer;

  /* transition: all .3s ease-in-out; */
}

[data-key='Enter'] {
  width: 3.25rem;
}

[data-key='Backspace'] {
  background-image: url(./backspace.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 2rem;
  text-indent: -9999px;
  width: 3rem;
}

[data-animation="shake"] {
  animation: shake 1s;
}

@keyframes shake {
  0% {
    transform: translate(2px, 2px) rotate(0deg);
  }

  10% {
    transform: translate(-2px, -4px) rotate(-6deg);
  }

  20% {
    transform: translate(-6px, 0px) rotate(1deg);
  }

  30% {
    transform: translate(6px, 4px) rotate(0deg);
  }

  40% {
    transform: translate(2px, -2px) rotate(1deg);
  }

  50% {
    transform: translate(-2px, 4px) rotate(-6deg);
  }

  60% {
    transform: translate(-6px, 2px) rotate(0deg);
  }

  70% {
    transform: translate(6px, 2px) rotate(-6deg);
  }

  80% {
    transform: translate(-2px, -2px) rotate(1deg);
  }

  90% {
    transform: translate(2px, 4px) rotate(0deg);
  }

  100% {
    transform: translate(2px, -4px) rotate(-6deg);
  }
}