:root {
  --primary-color: #cc1144;
  --secondary-color: #013334;
  --board-size: calc(80vw / 2 - 150px);
  --cell-size: calc(var(--board-size) / 17);
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 10px;
}

body {
  font-size: 1.6rem;
  font-family: "Roboto";
  font-weight: 400;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  height: 40px;
  width: 100vw;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}

header h1 {
  margin-left: 24px;
  font-weight: 700;
}

header nav {
  margin-right: 24px;
}

header nav ul {
  display: flex;
  flex-direction: row;
  list-style: none;
}
header nav ul li {
  margin-left: 16px;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 40px;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  background: #fff;
}

footer p {
  margin-right: 24px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}
a:hover {
  text-decoration: underline;
}

.btn {
  background: var(--primary-color);
  border-radius: 8px;
  -moz-border-radius: 8px;
  -webkit-border-radius: 8px;
  padding: 8px 16px;
  color: white;
  font-size: 1.4rem;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.btn.lg {
  font-size: 2rem;
  padding: 16px 32px;
}

.btn:hover {
  text-decoration: none;
}

.main .btn-play {
  width: 100%;
  height: 80%;
  position: absolute;
  top: 10%;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.play {
  display: none;
  flex-direction: row;
  width: 100vw;
  margin-top: 100px;
}

.play article,
.play aside {
  width: 50vw;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.play article .game {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid #000;
}

.play article .game thead th {
  height: 28px;
  border: 1px solid #000;
}

.play article .game td:nth-child(1) {
  width: 10%;
  text-align: right;
}
.play article .game td:nth-child(2) {
  width: 25%;
}
.play article .game td:nth-child(3) {
  width: 25%;
}
.play article .game td:nth-child(4) {
  width: 10%;
}
.play article .game td:nth-child(5) {
  width: 15%;
  text-align: right;
}
.play article .game td:nth-child(6) {
  width: 15%;
  text-align: right;
}

.play article .game td {
  height: 24px;
  border: 1px solid #000;
  padding: 0 4px;
  font-family: "Roboto Mono";
}

.play article .btn-wrapper {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  padding: 4px 0;
}

.play aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.play aside .board {
  width: var(--board-size);
  height: var(--board-size);
  background: #fff;
  border-collapse: collapse;
  border: 2px solid #000;
}

.play aside .board td {
  width: var(--cell-size);
  height: var(--cell-size);
  border: 1px solid #000;
  text-align: center;
  box-sizing: border-box;
}

.play aside .board td.info {
  border: none;
  vertical-align: middle;
  text-align: center;
}
.play aside .board td.cell1 {
  background: cyan;
}
.play aside .board td.cell2 {
  background: blue;
}
.play aside .board td.cell3 {
  background: pink;
}
.play aside .board td.cell4 {
  background: red;
}

.tile {
  border-radius: 3px;
  -moz-border-radius: 3px;
  -webkit-border-radius: 3px;
  background: #ffeba4;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.letter {
  width: calc(var(--cell-size) - 1px);
  height: calc(var(--cell-size) - 1px);
  line-height: var(--cell-size);
  font-size: 16px;
  font-weight: bold;
  font-family: "Roboto Mono";
}

.points {
  position: absolute;
  display: block;
  bottom: 2px;
  right: 2px;
  font-size: 8px;
}

.current .tile {
  background: purple;
  color: white;
}

.rack {
  margin-bottom: 30px;
  height: calc(var(--cell-size) - 1px);
  display: flex;
  justify-content: center;
  text-align: center;
  list-style: none;
}

.rack li {
  width: calc(var(--cell-size) - 1px);
  margin: 0 2px;
}

.rack li.tile {
  height: calc(var(--cell-size) + 3px);
  width: calc(var(--cell-size) + 3px);
}

#btn-print {
  display: none;
}

.end-game {
  margin-bottom: 30px;
  height: calc(var(--cell-size) - 1px);
  justify-content: center;
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  display: none;
}

.loader {
  display: none;
  position: relative;
  width: 200px;
  height: 200px;
  margin: auto;
}
.loader div {
  position: absolute;
  border: 4px solid var(--primary-color);
  opacity: 1;
  border-radius: 50%;
  animation: loader 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.loader div:nth-child(2) {
  animation-delay: -0.5s;
}
@keyframes loader {
  0% {
    top: 96px;
    left: 96px;
    width: 0;
    height: 0;
    opacity: 0;
  }
  4.9% {
    top: 96px;
    left: 96px;
    width: 0;
    height: 0;
    opacity: 0;
  }
  5% {
    top: 96px;
    left: 96px;
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    top: 0px;
    left: 0px;
    width: 192px;
    height: 192px;
    opacity: 0;
  }
}

.contact {
  margin-top: 60px;
  padding: 0 40px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.contact section,
.contact aside {
  width: calc(50vw - 60px);
}

.contact aside {
  display: flex;
  justify-content: center;
}

.contact section div {
  margin-bottom: 20px;
}

.contact section .action {
  display: flex;
  justify-content: center;
}

.contact section label {
  line-height: 30px;
}

.contact section input,
.contact section textarea {
  display: block;
  width: 100%;
  resize: none;
  height: 36px;
  padding: 0 10px;
  outline: none;
  border: 1px solid #888;
  border-radius: 6px;
  -moz-border-radius: 6px;
  -webkit-border-radius: 6px;
  font-family: "Roboto", sans-serif;
}

.contact section input:focus,
.contact section textarea:focus {
  border-color: var(--primary-color);
}

.contact section textarea {
  height: 200px;
  line-height: 20px;
}

.contact img {
  width: calc(40vw);
  height: calc(30vw);
}

.flash {
  height: 40px;
  line-height: 40px;
  border-radius: 6px;
  -moz-border-radius: 6px;
  -webkit-border-radius: 6px;
  padding: 0 10px;
}

.flash.success {
  background: #080;
  color: white;
}

.flash.error {
  background: #a00;
  color: white;
}

@media screen and (max-width: 1024px) {
  body {
    font-size: 1rem;
  }
  .play {
    flex-direction: column;
    margin-top: 60px;
  }

  .play article,
  .play aside {
    width: calc(100vw - 40px);
  }

  .play article {
    flex-direction: column-reverse;
  }

  .play article .btn {
    margin-top: 16px;
    margin-bottom: 30px;
  }

  .play aside {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  .contact section {
    width: 100%;
  }
  .contact aside {
    display: none;
  }
}
