* {
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 900;
  font-size: 30px;
}

#cenario {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  background-image: url(/img//backgraund.gif);
  background-position: center;
  background-repeat: repeat;
  background-size: cover;
  overflow: hidden;
}

#menu {
  width: 80vw;
  display: flex;
  color: #fff;
  justify-content: space-between;
  padding-top: 1rem;
}

#nave {
  position: absolute;
  width: 150px;
  height: 150px;
  background-image: url(/img/nav-unscreen.gif); /*BACKGRAUND IMG*/
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  bottom: 0;
}

#titulo {
  position: absolute;
  width: 500px;
  height: 500px;
  /*   background-image: url(/img/logo.png);  */
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.transparente {
  display: none;
}

#iniciar {
  position: absolute;
  color: blueviolet;
  background-color: #fff;
  font-size: 16px;
  padding: 0.2rem;
  border-radius: 0.3rem;
  cursor: pointer;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: piscar 1s infinite;
}

@keyframes piscar {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.text-animation {
  position: absolute;
  top: 45%;
  left: 22%;
  transform: translate(-50%, -50%);
}

.text-animation p.line {
  font-size: 0.6rem;
  margin: 10px 0;
  opacity: 0;
  animation: appear 1.5s ease forwards;
  color: #fff;
}

@keyframes appear {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.text-animation p.line:nth-child(1) {
  animation-delay: 0.5s;
}
.text-animation p.line:nth-child(2) {
  animation-delay: 2s;
}
.text-animation p.line:nth-child(3) {
  animation-delay: 3.5s;
}
.text-animation p.line:nth-child(4) {
  animation-delay: 5s;
}
.text-animation p.line:nth-child(5) {
  animation-delay: 6.5s;
}
.text-animation p.line:nth-child(6) {
  animation-delay: 8s;
}
.text-animation p.line:nth-child(7) {
  animation-delay: 9.5s;
}

@keyframes animarCenario {
  from {
    background-position-y: 100%;
  }
  to {
    background-position-y: 0%;
  }
}

@keyframes animarCenarioMobile {
  from {
    background-position-y: 100%;
  }
  to {
    background-position-y: 0%;
  }
}

/* Controles Móveis */
.controles-mobile {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 1000;
  pointer-events: none;
}

.controle-esquerda,
.controle-direita,
.controle-disparo {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.8);
  border: 3px solid #333;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  transition: all 0.1s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.controle-esquerda:active,
.controle-direita:active,
.controle-disparo:active {
  transform: scale(0.95);
  background: rgba(200, 200, 200, 0.9);
}

.controle-disparo {
  background: rgba(255, 100, 100, 0.8);
  border-color: #ff4444;
  color: white;
}

.controle-disparo:active {
  background: rgba(255, 50, 50, 0.9);
}

/* Esconder controles em desktop */
@media screen and (min-width: 426px) {
  .controles-mobile {
    display: none;
  }
}

@media screen and (max-width: 425px) {
  .text-animation {
    display: none;
  }

  .vida {
    font-size: 17px;
  }

  #pontos {
    font-size: 17px;
  }

  #cenario {
    animation: animarCenarioMobile 10s infinite linear;
  }

  #titulo {
    width: 10rem;
    height: 10rem;
    margin-top: 3rem;
  }

  #iniciar {
    margin-top: 3rem;
  }

  /* Ajustar controles para telas muito pequenas */
  .controle-esquerda,
  .controle-direita,
  .controle-disparo {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  /* Melhorar espaçamento dos controles em mobile */
  .controles-mobile {
    bottom: 10px;
    padding: 0 15px;
  }
}
