* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #020814;
  font-family: Arial, Helvetica, sans-serif;
  color: white;
  touch-action: manipulation;
}

#app {
  width: 100vw;
  height: 100vh;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: #000;
}

.tela {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
}

.tela.ativa {
  display: block;
}

.menu-screen {
  background-image: url("imagens/fundoMenu.png");
  background-size: cover;
  background-position: center;
}

.menu-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 0 8%;
}

.menu-btn {
  width: 88%;
  max-width: 430px;
  cursor: pointer;
  filter: drop-shadow(0 0 12px rgba(0, 225, 255, 0.7));
}

.menu-btn:active {
  transform: scale(0.96);
}

.top-icon {
  position: absolute;
  top: 26px;
  left: 26px;
  width: 70px;
  height: 70px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: white;
  font-size: 34px;
  z-index: 20;
}

.top-icon.second {
  left: 112px;
  font-size: 30px;
}

.game-screen {
  background: #000;
}

#gameCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hud {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.small-btn {
  pointer-events: auto;
  border: 2px solid #00cfff;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.62);
  color: white;
  padding: 11px 16px;
  font-size: 22px;
  font-weight: bold;
}

.score-box {
  min-width: 160px;
  border: 2px solid rgba(0, 207, 255, 0.8);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.58);
  padding: 12px 16px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  font-size: 26px;
  font-weight: bold;
}

.controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 190px;
  background: linear-gradient(to bottom, rgba(0, 5, 20, 0.1), rgba(2, 6, 21, 0.92));
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 18px 16px 24px;
  z-index: 15;
}

.control-btn {
  border: 7px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(#4bdcff, #0074b9);
  color: white;
  font-weight: bold;
  box-shadow:
    0 14px 0 rgba(0, 0, 0, 0.55),
    0 0 25px rgba(0, 210, 255, 0.9) inset,
    0 0 20px rgba(0, 210, 255, 0.7);
}

.control-btn:active {
  transform: translateY(7px);
  box-shadow:
    0 7px 0 rgba(0, 0, 0, 0.55),
    0 0 25px rgba(0, 210, 255, 0.9) inset;
}

.control-btn.side {
  width: 118px;
  height: 118px;
  border-radius: 28px;
  font-size: 54px;
}

.control-btn.shoot {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  font-size: 25px;
}

.store-screen,
.record-screen {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.85)),
    url("imagens/fundoMenu.png");
  background-size: cover;
  background-position: center;
  overflow-y: auto;
  padding: 70px 22px 28px;
}

.store-back {
  position: fixed;
  top: 18px;
  left: calc(50% - 238px);
  z-index: 10;
}

@media (max-width: 520px) {
  .store-back {
    left: 18px;
  }
}

.store-screen h1 {
  color: #00d9ff;
  text-align: center;
  font-size: 42px;
  margin-bottom: 20px;
}

.store-screen p,
.store-screen h2 {
  text-align: center;
  font-size: 23px;
  margin: 12px 0;
}

.store-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 30px;
}

.fundo-card {
  border: 3px solid #00cfff;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.68);
  padding: 14px;
  text-align: center;
  overflow: hidden;
}

.fundo-preview {
  width: 100%;
  height: 130px;
  background-size: cover;
  background-position: center;
  border-radius: 14px;
  opacity: 0.92;
}

.fundo-card h3 {
  margin-top: 12px;
  font-size: 23px;
}

.fundo-card p {
  font-size: 22px;
}

.fundo-card button {
  width: 100%;
  margin-top: 12px;
  border: none;
  border-radius: 13px;
  padding: 14px 6px;
  font-size: 18px;
  font-weight: bold;
  color: white;
  background: #008bd6;
}

.fundo-card button.selecionado {
  background: #17b24e;
}

.fundo-card button.bloqueado {
  background: #555;
}

.record-card {
  width: 90%;
  margin: 160px auto 0;
  padding: 35px 20px;
  border: 3px solid #00cfff;
  border-radius: 26px;
  background: rgba(0, 0, 0, 0.7);
  text-align: center;
}

.record-card h1 {
  color: #00d9ff;
  font-size: 48px;
}

.record-card p {
  margin-top: 24px;
  font-size: 25px;
}

.record-card h2 {
  margin-top: 20px;
  font-size: 60px;
}

.game-over {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 25px;
}

.game-over.ativo {
  display: flex;
}

.game-over-card {
  width: 100%;
  max-width: 430px;
  border: 3px solid #00cfff;
  border-radius: 25px;
  background: rgba(0, 8, 20, 0.96);
  padding: 26px;
  text-align: center;
  box-shadow: 0 0 35px rgba(0, 207, 255, 0.7);
}

.game-over-card h1 {
  color: #00d9ff;
  font-size: 42px;
  margin-bottom: 16px;
}

.game-over-card p {
  font-size: 22px;
  line-height: 1.4;
  margin: 14px 0;
}

.game-over-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
}

.game-over-actions button {
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 22px;
  font-weight: bold;
  color: white;
  background: #008bd6;
}