html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  cursor: pointer;
  overscroll-behavior: none;
  touch-action: manipulation;
  background: linear-gradient(180deg, #bbd691 0%, #fef1e1 100%);
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

#game {
  width: 100vw;
  height: 100vh;
  display: block;
}

#score {
  position: absolute;
  top: 28px;
  right: 24px;
  font-size: clamp(1.4rem, 4.2vw, 2rem);
  font-weight: 900;
  color: #101010;
  z-index: 20;
}

#introduction {
  width: min(260px, 75vw);
  min-height: 58px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  color: #1a1a1a;
  transition: opacity 0.6s;
  z-index: 18;
}

#restart {
  width: 124px;
  height: 124px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: #ffffff;
  background-color: #e11d48;
  border: none;
  font-weight: 800;
  font-size: 1.02rem;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  display: none;
  cursor: pointer;
  z-index: 30;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

#perfect {
  position: absolute;
  left: 50%;
  top: 92px;
  transform: translateX(-50%);
  font-weight: 800;
  color: #d4002f;
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 19;
}

.botao-voltar-jogos {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1;
  color: #e9f5ff;
  background: rgba(17, 26, 42, 0.78);
  border: 1px solid rgba(120, 210, 255, 0.45);
  backdrop-filter: blur(8px);
}

.botao-voltar-jogos .seta-voltar-jogos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  font-size: 1.08em;
  line-height: 1;
  transform: translateY(-0.02em);
}

.botao-voltar-jogos .texto-voltar-jogos {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

@media (max-width: 640px) {
  .botao-voltar-jogos {
    left: 50%;
    top: calc(env(safe-area-inset-top) + 10px);
    transform: translateX(-50%);
    padding: 11px 22px;
    font-size: 1.05rem;
  }

  #score {
    top: calc(env(safe-area-inset-top) + 58px);
    right: 16px;
  }
}
