body {
  background-color: #121212;
  color: #6b6;
  font-family: Arial, Helvetica, sans-serif;
}

#grid {
  position: relative;
  display: grid;
  justify-content: center;

  width: fit-content;
}

#game {
  display: flex;
  justify-content: center;
}

#points {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: transparent;
  color: #6b6;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.5rem;
  z-index: 2000;
}
/* -------------------Start skærm/ game over styling------------------------------------- */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
}

.screen-content {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  max-width: 400px;
}

.screen h1 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.screen p {
  color: #666;
  margin-bottom: 1.5rem;
}

.screen button {
  background: #4caf50;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.3s;
}

.screen button:hover {
  background: #45a049;
}

/* ---------------------------------------------------------------------------------------*/

.cell {
  width: 32px;
  aspect-ratio: 1 / 1;
  background-size: 736px 928px;
  background-image: url("./assets/32x32.png");
  background-position: -32px -64px;
  filter: saturate(0.5);
}

.path {
  background-image: url("./assets/32x32.png");
  background-position: calc(-1 * 32px) calc(-2 * 32px);
 
}

.wall {
  background-image: url("./assets/32x32.png"), url("./assets/32x32.png");
  background-position: calc(-2 * 32px) calc(-10 * 32px), -32px -64px;
  filter: saturate(1);
}

.point {
  background-image: url("./assets/coin_gold.png"), url("./assets/32x32.png");
  background-position: calc(-1 * 32px) calc(-1 * 32px), -32px -64px;
  background-size: 256px 32px, 736px 928px;
  animation-name: coinSpin;
  animation-duration: 3s;
  animation-iteration-count: infinite;
  animation-timing-function: steps(7);
}

.enemy {
  background-color: rgb(184, 10, 13);
}

#character {
  background-image: url("./assets/strawberry.png");
  background-size: 400% 400%;
  z-index: 3;
  transition: transform 0.2s linear;
}

#enemy1,
#enemy2 {
  z-index: 2;
  background-image: url("./assets/character_base_16x16.png");
  background-size: 400% 400%;
  transition: transform 50ms linear;
}

#enemy1 {
  filter: saturate(2.5);
 
}

#character,
#enemy1,
#enemy2 {
  position: absolute;
  width: 30px;
  height: 30px;
  pointer-events: none;
}

.peopleMoveright,
.berryMoveleft {
  background-position: 0 -200%;
  animation-name: people-right-berry-left;
  animation-duration: 1s;
  animation-iteration-count: infinite;
  animation-timing-function: steps(3);
}
.peopleMoveleft,
.berryMoveup {
  background-position: 0% -300%;
  animation-name: people-left-berry-up;
  animation-duration: 1s;
  animation-iteration-count: infinite;
  animation-timing-function: steps(3);
}

.peopleMoveup,
.berryMoveright {
  background-position: 0% -100%;
  animation-name: people-up-berry-right;
  animation-duration: 1s;
  animation-iteration-count: infinite;
  animation-timing-function: steps(3);
}

.peopleMovedown,
.berryMovedown {
  background-position: 0% 0%;
  animation-name: down;
  animation-duration: 1s;
  animation-iteration-count: infinite;
  animation-timing-function: steps(3);
}

@keyframes people-right-berry-left {
  0% {
    background-position: 0% -200%;
  }
  25% {
    background-position: -100% -200%;
  }
  50% {
    background-position: -200% -200%;
  }

  75% {
    background-position: -300% -200%;
  }
}

@keyframes people-left-berry-up {
  0% {
    background-position: 0% -300%;
  }
  25% {
    background-position: -100% -300%;
  }
  50% {
    background-position: -200% -300%;
  }

  75% {
    background-position: -300% -300%;
  }
}

@keyframes people-up-berry-right {
  0% {
    background-position: 0% -100%;
  }
  25% {
    background-position: -100% -100%;
  }
  50% {
    background-position: -200% -100%;
  }

  75% {
    background-position: -300% -100%;
  }
}

@keyframes down {
  0% {
    background-position: 0% 0%;
  }
  25% {
    background-position: -100% 0%;
  }
  50% {
    background-position: -200% 0%;
  }

  75% {
    background-position: -300% 0%;
  }
}
@keyframes coinSpin {
  0% {
    background-position: 0% 0%, -32px -64px;
  }
  12.5% {
    background-position: -100% 0%, -32px -64px;
  }
  25% {
    background-position: -200% 0%, -32px -64px;
  }
  37.5% {
    background-position: -300% 0%, -32px -64px;
  }
  50% {
    background-position: -400% 0%, -32px -64px;
  }
  62.5% {
    background-position: -500% 0%, -32px -64px;
  }
  75% {
    background-position: -600% 0%, -32px -64px;
  }
  87.5% {
    background-position: -700% 0%, -32px -64px;
  }
  100% {
    background-position: -0% 0%, -32px -64px;
  }
}
