* {
  image-rendering: pixelated;
}

body {
  margin: 0;
  overflow: hidden;
  font-family: Arial, sans-serif;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: url('./assets/desert.png') repeat-x;
  background-size: 800px 100%; /* Match the image width exactly */
  animation: scrollBackground 3s linear infinite;
}

@keyframes scrollBackground {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -800px 0;
  }
}

#dog {
  position: absolute;
  bottom: 12vh; /* now matching your JS base dogBottom */
  left: 20vw;
  width: 15vw;
  height: 15vw;
  background: url('./assets/dog.gif') no-repeat;
  background-size: contain;
  background-position: center;
  z-index: 10;
}

.cactus {
  position: absolute;
  bottom: 10vh; /* Ensure same bottom level as the dog */
  width: 10vw;
  height: 20vw;
  background: url('./assets/cactus.png') no-repeat;
  background-size: contain;
  background-position: center;
  /* Change duration from 3s to 4s */
  animation: moveCactus 4s linear forwards;
  z-index: 20;
}

@keyframes moveCactus {
  from {
    left: 110vw;
  }
  to {
    left: -10vw;
  }
}

#score {
  position: absolute;
  top: 5%;
  left: 5%;
  font-size: 5vw;
  color: white;
}

#game-over {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  font-size: 6vw;
}

#restart-button {
  margin-top: 20px;
  padding: 2vw 4vw;
  font-size: 4vw;
  cursor: pointer;
}