:root {
  --bg-dark: hsl(240 9% 13%);
  --shadow: hsl(240 9% 5%);
  --text: hsl(240 10% 94%);
  --bg-light: hsl(240 9% 26%);
  --text-muted: hsl(240 10% 35%);
  --primary: hsl(224 38% 55%);
  --secondary: hsl(224 38% 70%);
  --danger: hsl(0 75% 60%);
  --warning: hsl(23 100% 63%);
  --success: hsl(98 42% 42%);
}

* {
  margin: 0px;
  padding: 0px; 
  border: 0px;
  font-size: 100%;
  font-family: "Fira Code", monospace;
  font-weight: 400;
  font-style: normal;
  box-sizing: border-box;
  color: inherit;
  background-color: inherit;
}

body {
  background-color: var(--bg-dark);
  color: var(--text);
}

.viewport {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
}

#header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 64px;
}

.nav a {
  text-decoration: none;
  font-size: 24px;
  margin: 0 24px;
  color: var(--text-muted);
}

.nav a:hover {
  color: var(--text);
}

.title, .body, .images, .score, .results {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.body, .results {
  flex-direction: column;
}

#playerScore, #computerScore {
  font-size: 48px;
}

.score {
  margin: 24px 0;
}

.home, .away {
  display: flex;
  flex-direction: column;
  text-align: center;
  margin: 0 10vw;
  font-size: 24px;
}

.home p, .away p {
  color: var(--primary);
}

.results {
  background-image: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-dark) 4%);
  border: 2px solid var(--bg-light);
  border-radius: 10px;
  background-color: transparent;
  padding: 48px 12px;
  box-shadow: 0px 8px 12px var(--shadow);
}

#endMessage {
  font-size: 24px;
  font-weight: 800;
}

#playAgain {
  border: 2px solid var(--secondary);
  border-radius: 24px;
  background-color: var(--bg-dark);
  padding: 12px;
}

#playAgain:hover {
  background-color: var(--success);
}

.word {
  display: flex;
  margin: 16px;
}

.ascii {
  display: flex;
  flex-direction: column;
  white-space: pre;
  font-size: 10px;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.ascii p {
  font-weight: 900;
}

.body {
  margin: auto 0;
}

.ascii.button {
  font-size: 8px;
  color: var(--text-muted);
  margin: 64px;
}

.ascii.button:hover {
  color: var(--text);
  text-shadow: 4px 4px 2px var(--shadow);
}

.ascii.selected {
  color: var(--success);
}

.ascii.computer {
  color: var(--danger);
}

.selected.computer {
  color: var(--warning);
}

#message {
  color: var(--secondary);
  font-size: 24px;
  text-align: center;
}

#footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  justify-content: flex-end;
  text-align: center;
  margin-top: 64px;
  font-size: 14px;
  padding: 8px;
  width: 100vw;
}

#footer p {
  margin: 4px 0;
}

.license {
  grid-column: 1;
}

.info {
  grid-column: 2;
}

.contact {
  grid-column: 3;
}

.license, .info, .contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  grid-row: 1;
}

.icon {
  margin: 1rem;
  height: 2rem;
  width: auto;
}

.hidden {
  display: none;
}

@media (max-width: 540px) {
  .ascii {
    font-size: 6px;
  }

  .ascii.button {
    font-size: 4px;
    margin: 32px;
  }

  #footer {
    display: flex;
    flex-direction: column;
  }

  .license, .info, .contact {
    margin-bottom: 24px;
  }

  .nav {
    flex-wrap: wrap;
  }

  .nav a {
    font-size: 16px;
    margin: 0 18px;
  }
}
