body {
  font-family: Arial, sans-serif;
  color: white;
  text-align: center;
  margin: 0;
  padding: 0;
  overflow: hidden;
  min-height: 100vh;
  background: linear-gradient(135deg, #2b0000 0%, #5c0000 50%, #8b0000 100%);
  background-attachment: fixed;
}

}

h1 {
  margin-top: 10px;
}

#game {
  position: relative;
  width: 90%;
  max-width: 700px;
  height: 240px;
  margin: 10px auto;
  border: 3px solid #fff;
  overflow: hidden;
  background-image: url(fundo.png);
  background-size: cover;
  border-radius: 10px;
}

#scoreBoard {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 18px;
}

#dino {
  position: absolute;
  left: 40px;
  width: 150px;
  height: 150px;
  background: url('borboleta.png') no-repeat center / contain;
  bottom: -30px; /* 🔥 encosta na linha de baixo */
  transition: transform 0.2s ease, bottom 0.2s ease;
}

/* animação de pulo */
@keyframes jump {
  0% { bottom: -30px; }
  40% { bottom: 190px; }
  60% { bottom: 190px; }
  100% { bottom: -30px; }
}

.duck {
  transform: scaleY(0.5);
  transform-origin: bottom;
  bottom: -30px; /* mantém encostado no chão */
}

#cactus {
  position: absolute;
  bottom: 0;
  right: -100px;
  width: 80px;
  height: 80px;
  background: url('arvore.png') no-repeat center / contain;
}

button {
  margin: 10px;
  padding: 10px 20px;
  font-size: 16px;
  background: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

button:hover {
  color: #fff;
  background: rgb(71, 0, 0);
}

footer {
  margin-top: 10px;
  font-size: 14px;
  opacity: 0.8;
}

@media (max-width: 600px) {
  #game {
    height: 220px;
  }
  #dino {
    width: 100px;
    height: 100px;
  }
  #cactus {
    width: 70px;
    height: 70px;
  }
}
