:root {
  --background-color-headerfooter-custom: #fde68a;
  --background-color-content-custom: #fffbeb;
  --background-color-button-custom: #fcd34d;
  --border-style: 2px solid black;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@font-face {
  font-family: 'Sans Comic Sans';
  src: url(static/SansComicSansRegular-X6gd.ttf);
}

html,
body {
  height: 100vh;
  margin: 0;
}

body {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 100px 1fr 100px;
  gap: 5px;
  font-family: 'Sans Comic Sans', sans-serif;
  font-weight: bold;
  font-size: 2.5rem;
}

/* HEADER */
div.header * {
  padding: 0 5px;
}

div.header {
  background-color: var(--background-color-headerfooter-custom);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  justify-content: space-between;
  align-items: center;
}

div.left,
div.right>a {
  display: grid;
  grid-template-columns: min-content auto;
  align-items: center;
}

div.right>a {
  justify-content: end;
  text-decoration: none;
}

div.right>a:link,
div.right>a:visited {
  color: inherit;
}

img.logo,
img.icon {
  width: 80px;
  height: 80px;
}

img.icon:hover {
  animation-name: spin;
  animation-duration: 500ms;
}

/* CONTENT */
div.content {
  /* background-color: var(--background-color-content-custom); */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto min-content min-content;
  grid-template-areas:
    'announcement announcement announcement'
    'player1 gameboard player2'
    'player1 controls player2';
  align-items: center;
  justify-content: center;
  gap: 10px;
}

div.announcement {
  grid-area: announcement;
  text-align: center;
}

div.announcement>h2 {
  margin: 0;
}

div.player-score {
  align-self: flex-start;
  justify-self: center;
}

div.player-score>p {
  text-align: center;
}

div.player-score:first-of-type {
  grid-area: player1;
}

div.player-score:last-of-type {
  grid-area: player2;
}

div.controls {
  grid-area: controls;
  display: grid;
}

div.controls button {
  height: 80px;
  width: 200px;
  border: 1px solid black;
  background-color: var(--background-color-button-custom);
  font-weight: bold;
  font-size: 1.4rem;
  border-radius: 15px;
  align-self: flex-start;
  justify-self: center;
}

div.gameboard {
  grid-area: gameboard;
  background-color: white;
  height: 500px;
  width: 500px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  grid-auto-rows: 0;
  justify-self: center;
  align-self: flex-start;
}

div.gameboard div.field {
  display: grid;
}

div.field:first-child {
  border-right: var(--border-style);
  border-bottom: var(--border-style);
}

div.field:nth-child(2) {
  border-bottom: var(--border-style);
  border-left: var(--border-style);
  border-right: var(--border-style);
}

div.field:nth-child(3) {
  border-left: var(--border-style);
  border-bottom: var(--border-style);
}

div.field:nth-child(4) {
  border-bottom: var(--border-style);
  border-top: var(--border-style);
  border-right: var(--border-style);
}

div.field:nth-child(5) {
  border: var(--border-style);
}

div.field:nth-child(6) {
  border-bottom: var(--border-style);
  border-left: var(--border-style);
  border-top: var(--border-style);
}

div.field:nth-child(7) {
  border-right: var(--border-style);
  border-top: var(--border-style);
}

div.field:nth-child(8) {
  border-top: var(--border-style);
  border-left: var(--border-style);
  border-right: var(--border-style);
}

div.field:last-child {
  border-top: var(--border-style);
  border-left: var(--border-style);
}

div.field:hover {
  cursor: pointer;
  background-color: #e8e7e6;
}


img.item {
  object-fit: contain;
  max-height: 162px;
}

/* FOOTER */
div.footer {
  background-color: var(--background-color-headerfooter-custom);
  display: grid;
  align-items: center;
  justify-content: center;
}