html,
body {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;

  height: 100dvh;
  box-sizing: border-box;

  font-family: Arial, Helvetica, sans-serif;
  color: white;

  background-color: #2c3e50;
}

#instructions {
  padding: 1rem;
  width: 300px;
}

#countDown1,
#countDown2 {
  display: none;
  position: absolute;
  top: 25%;
  left: 35%;
  z-index: 10;

  font-size: 10rem;
  font-weight: bold;
  text-align: center;

  animation: show 1s ease-in-out forwards;
}

@keyframes show {
  0% {
    opacity: 0;
    transform: scale(0) translate(15%, 10%);
  }
  100% {
    opacity: 1;
    transform: scale(1) translate(15%, 10%);
  }
}

.button {
  height: 55px;
  width: 100px;
  padding: 1rem;
  border-radius: 0.5rem;
  border: none;
  border-bottom: 4px solid #0a5a4a;
  background-color: #16a085;
  align-content: center;

  text-transform: uppercase;
  color: rgb(236, 240, 241);
  font-weight: bold;
  font-size: 1.2rem;
  transition: all 0.2s ease-in-out;

  &:hover {
    background-color: #39a690;
    cursor: pointer;
  }
  &:active {
    border-bottom: 0px solid #0a5a4a;
    box-shadow: inset 0px 5px 5px #92f6e2;
  }

  &:disabled {
    border-bottom: 0px solid #0a5a4a;
    box-shadow: inset 0 0 10px #0a5a4a;
    background-color: #215d51;
    color: rgb(118, 150, 172);
    cursor: not-allowed;
    pointer-events: none;
  }
}

.arrow {
  width: 90px;
  height: 90px;

  &:active {
    border-bottom: 0px solid #0a5a4a;
    box-shadow: inset 0px 5px 5px #92f6e2;
    transition: all 0.1s;
  }
}

.large {
  width: 100%;
  margin: 1rem;
}

.retry {
  background-color: #f9a825;
  border-bottom: 4px solid #b57c21;

  margin-block: 2rem 0rem;

  &:hover {
    background-color: #f9b343;
    cursor: pointer;
  }
  &:active {
    border-bottom: 0px;
    box-shadow: inset 0 5px 5px #fddaa3;
  }
}

#boardInfo {
  display: flex;
  align-items: flex-end;

  width: 100%;
  justify-content: space-evenly;

  padding-bottom: 1rem;
  gap: 1rem;

  font-weight: bold;
}

#board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(10, 1fr);

  min-width: 300px;
  min-height: 300px;

  border-radius: 1rem;
  border: 3px solid #ecf0f1;

  overflow: hidden;
}

#controls {
  display: flex;
  flex-direction: row;
  align-items: center;

  div {
    padding: 1rem;
  }
}

#upDown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#gameOver {
  width: 80%;
  height: 90%;

  display: none;
  position: absolute;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  z-index: 1;

  backdrop-filter: blur(5px);

  background-color: rgb(52, 73, 94, 0.9);
  color: rgb(231, 76, 60);
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  padding: 2rem;
  border-radius: 1rem;

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

    width: 100%;
    padding: 1rem;
    margin-block: 2rem;
    box-sizing: border-box;
    border-radius: 0.5rem;

    background-color: #2980b933;
    text-transform: uppercase;
    color: #ecf0f1;
    font-size: 1.3rem;
    gap: 0.5rem;
  }

  #highScore {
    text-transform: uppercase;
    font-size: 1.5rem;
    text-align: center;
    color: #ecf0f1;

    padding-bottom: 0.5rem;
  }

  #totalGames {
    padding: 0.3rem;
    background-color: #2980b933;
    color: #ecf0f1;
    border-radius: 0.2rem;

    font-size: 0.9rem;
    font-weight: 100;
    text-align: center;
    text-transform: uppercase;
  }
}

.scoreBoard {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  align-content: center;

  border-radius: 0.5rem;
  background-color: rgb(41, 128, 185, 0.5);

  height: 51px;
  width: 100px;

  border: none;
  border-bottom: 4px solid #34495e;
}

.food {
  width: 100%;
  height: 100%;

  background-color: #ecf0f1;
  mask-image: url('./rat.png');
  -webkit-mask-image: url('./rat.png');
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  transform: rotate(45deg);
}

.empty {
  background-color: rgb(44, 62, 80);
}

.snake {
  background-color: #f9a825;
}

.horizontal-body {
  clip-path: path('M -2 10 L 32 10 L 32 20 L -2 20 Z');
}

.vertical-body {
  clip-path: path('M -2 10 L 32 10 L 32 20 L -2 20 Z');
  transform: rotate(90deg);
}

.snake-head {
  background: radial-gradient(ellipse at center, #ecf0f1 50%, #f9a825 55%);
}

.round-left {
  clip-path: path('M 10 0 Q 2 10 8 20 Q 15 45 22 20 Q 28 8 20 0 Z');
  transform: rotate(90deg);
}

.round-right {
  clip-path: path('M 10 0 Q 2 10 8 20 Q 15 45 22 20 Q 28 8 20 0 Z');
  transform: rotate(270deg);
}

.round-top {
  clip-path: path('M 10 0 Q 2 10 8 20 Q 15 45 22 20 Q 28 8 20 0 Z');
  transform: rotate(180deg);
}

.round-bottom {
  clip-path: path('M 10 0 Q 2 10 8 20 Q 15 45 22 20 Q 28 8 20 0 Z');
}

.round-left-top {
  clip-path: path('M 10 -2 L 20 -2 Q 20 10 32 10 L 32 20 Q 10 20 10 -2 Z');
  transform: rotate(90deg);
}

.round-right-top {
  clip-path: path('M 10 -2 L 20 -2 Q 20 10 32 10 L 32 20 Q 10 20 10 -2 Z');
  transform: rotate(180deg);
}

.round-left-bottom {
  clip-path: path('M 10 -2 L 20 -2 Q 20 10 32 10 L 32 20 Q 10 20 10 -2 Z');
}

.round-right-bottom {
  clip-path: path('M 10 -2 L 20 -2 Q 20 10 32 10 L 32 20 Q 10 20 10 -2 Z');
  transform: rotate(270deg);
}

.tailToBottom {
  clip-path: path('M 32 10 L 32 20 L 8 17 Q 0 15 8 13 Z');
  transform: rotate(-90deg);
}

.tailToTop {
  clip-path: path('M 32 10 L 32 20 L 8 17 Q 0 15 8 13 Z');
  transform: rotate(90deg);
}

.tailToRight {
  clip-path: path('M 32 10 L 32 20 L 8 17 Q 0 15 8 13 Z');
  transform: rotate(180deg);
}

.tailToLeft {
  clip-path: path('M 32 10 L 32 20 L 8 17 Q 0 15 8 13 Z');
}
