body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background-image: url("https://windowscustomization.com/wp-content/uploads/2019/06/Dark-Alley.gif");
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Press Start 2P', monospace;
}
h1 {
    font-size: 3rem;
}
#gameWrapper {
  overflow-x: auto;
  width: 100%;
  padding: 20px;
}

.row {
    height: 100vh;
    display: flex;
    align-items: center;
    gap: 100px;
    flex-wrap: wrap;
    justify-content: center;
}
@media only screen and (max-width: 720px) {
  .row {
    gap: 0px!important;
  }
  #game { transform: scale(0.8);}
}
/* Game container */
#game {
  position: relative;
  width: 800px;
  height: 500px;
  background: #fff;
  overflow: hidden;
  border: 15px solid #333;
  margin-top: 10px;
}

/* Background container */
#background {
  position: absolute;
  width: 1600px;
  height: 500px;
  display: flex;
  z-index: 0;
}

.bg-img {
  width: 800px;
  height: 500px;
  object-fit: cover;
  animation: moveBg 20s linear infinite;
}

@keyframes moveBg {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-800px); }
}

/* Overlays (start + game over) */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 800px;
  height: 500px;
  background: #141414;
  background-image: url("https://i.gifer.com/7U5Q.gif");
  background-size: cover;
  color: #b05a43;
  font-family: 'Courier New', monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
#logo {
    width: 200px;
    border-radius: 40px;
}
.overlay h1 {
  font-size: 36px;
  margin-bottom: 30px;
}

.overlay button {
  padding: 15px 30px;
  font-size: 25px;
  background: #b05a43;
  color: black;
  border: none;
  cursor: pointer;
  border-radius: 15px;
  transition: transform .4s;
}
button:hover {
    transform: scale(1.15);
}
#gameOverScreen {
  display: none;
}

/* Dino */
#dino {
  position: absolute;
  width: 70px;
  height: 70px;
  bottom: 0;
  left: 50px;
  background-image: url('images/dino.png') !important;
  background-size: cover;
  transition: bottom 0.05s;
  margin-bottom: 10px;
  z-index: 1;
}

/* Obstacle */
#obstacle {
  position: absolute;
  bottom: -30px;
  left: 800px;
  width: 140px;
  height: 140px;
  background-image: url('images/car.gif');
  background-size: cover;
  z-index: 1;
}

/* Coin */
#coin {
  position: absolute;
  width: 55px;
  height: 55px;
  background-size: cover;
  z-index: 1;
}

#coin.serce {
  background-image: url('images/heart.gif');
}
#coin.moneta {
  background-image: url('images/coin.gif');
}
#coin.hamburger {
  background-image: url('images/hamburger.gif');
}

#hantel {
  position: absolute;
  width: 50px;
  height: 50px;
  background-image: url('images/hantel.png');
  background-size: cover;
  z-index: 1;
}
/* Score panel */
#score {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  padding-top: 40px;
  padding-left: 20px;
  font-size: 1.8em;
  width: 180px;
  color: white;
  font-family: 'Courier New', monospace;
  font-weight: bold;
}

#score::after {
  content: "";
  position: absolute;
  top: -15px;
  left: 0;
  width: 180px;
  height: 140px;
  background-image: url("images/woodsign.png");
  background-size: cover;
  z-index: -1;
  display: block;
  filter: brightness(0.4);
}
