* { box-sizing: border-box; margin: 0; padding: 0; }

/* Cor de fundo da tela (faixas fora do convite) – troque aqui se quiser outro azul */
:root { --fundo: #8fc4f0; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  position: fixed; inset: 0;
  background: var(--fundo);
  overscroll-behavior: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

body { display: flex; align-items: center; justify-content: center; }


/* Palco 9:16 que cabe inteiro em qualquer tela */
#stage {
  position: relative; z-index: 1;
  /* fallback caso o JS não rode */
  width: min(100vw, calc(100vh * 9 / 16));
  height: min(100vh, calc(100vw * 16 / 9));
  /* medidas reais da tela, calculadas pelo script.js */
  width: var(--sw, min(100vw, calc(100vh * 9 / 16)));
  height: var(--sh, min(100vh, calc(100vw * 16 / 9)));
  flex: none;
  overflow: hidden;
  background: #cfe3f7;
  box-shadow: 0 0 40px rgba(60, 80, 140, .35);
}

#stage video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  background: #cfe3f7;
}
#videoPrincipal { z-index: 1; }
#videoFundo     { z-index: 2; transition: opacity .4s ease; }
#videoFundo.oculto { opacity: 0; }

/* ALVO – mão esquerda da Elsa (valores em %) – invisível */
#alvo {
  position: absolute; z-index: 3;
  left: 28%; top: 28%;
  width: 24%; height: 20%;
  pointer-events: none;
}

/* OBJETO – bola de neve (posição inicial em %; o JS atualiza left/top em %) */
#bola {
  position: absolute; z-index: 4;
  left: 78%; top: 70.6%;
  width: 9.4%;                 /* tamanho em % da largura do palco */
  transform: translate(-50%, -50%);
  touch-action: none;          /* o dedo arrasta a bola, não rola a página */
  cursor: grab;
  -webkit-user-select: none; user-select: none;
}
#bola img {
  display: block; width: 100%; height: auto;
  pointer-events: none;        /* regra: imagem não recebe toque */
  -webkit-user-drag: none;
  filter: drop-shadow(0 0 2px #4f6fd0) drop-shadow(0 0 7px rgba(79,111,208,.85));
  animation: pulsa 1.6s ease-in-out infinite;
}
#bola.arrastando { cursor: grabbing; }
#bola.arrastando img { animation: none; transform: scale(1.12); }
#bola.some { opacity: 0; transition: opacity .35s ease; pointer-events: none; }

@keyframes pulsa {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}

/* Zonas clicáveis sobre os botões do vídeo (posição/tamanho em %) */
.zona {
  position: absolute; z-index: 5;
  display: block;
  pointer-events: none;        /* só ficam ativas a partir do segundo em que o botão aparece */
  -webkit-tap-highlight-color: transparent;
}
.zona.ativa { pointer-events: auto; cursor: pointer; }

/* Botões desenhados no vídeo (1080x1920): x/1080, y/1920 */
#btnLocal     { left: 23.33%; top: 89.27%; width: 27.5%; height: 2.92%; }
#btnConfirmar { left: 55.0%;  top: 89.27%; width: 27.5%; height: 2.92%; }
#btnSobre     { left: 36.2%;  top: 92.86%; width: 27.5%; height: 2.92%; }

/* Rede de segurança (só aparece se o vídeo for bloqueado) */
#toque {
  position: absolute; inset: 0; z-index: 6;
  display: none; align-items: center; justify-content: center;
  background: rgba(143, 196, 240, .55);
  cursor: pointer;
}
#toque.visivel { display: flex; }
#toque span {
  background: #fff; color: #5b4fa0;
  font: 700 18px/1.2 system-ui, sans-serif;
  padding: 14px 22px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
