html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #111;
}

#game {
  width: 100vw;
  height: 100vh;
  display: block;
  touch-action: none;
}

#overlay{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 44px Arial;
  color: #fff;
  background: rgba(0,0,0,0.25);
  user-select: none;
}

#overlay.hidden{ display:none; }

#overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  z-index: 10;
}

#overlay.hidden { display: none; }

#overlay .card{
  width: min(420px, 85vw);
  padding: 22px 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  text-align: center;
  color: #fff;
}

#overlayTitle{
  font: 900 40px Arial;
  margin-bottom: 18px;
  letter-spacing: 2px;
}

.btn{
  width: 100%;
  padding: 14px 16px;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  font: 900 22px Arial;
  cursor: pointer;
}

.btn.hidden { display:none; }
#overlay .card{
  transform: scale(0.95);
  opacity: 0;
  transition: 220ms ease;
}

#overlay:not(.hidden) .card{
  transform: scale(1);
  opacity: 1;
}

