/**
 * shell.css — estilos comuns dos shells HTML que embutem o Apps Script.
 *
 * Todos os arquivos docs/*.html (index, lista, inscricao, obrigado)
 * consomem isso. Mudou aqui, mudou em todos.
 */

:root {
  --red:         #8B2E2E;
  --red-deep:    #5A1616;
  --yellow:      #E8B84E;
  --yellow-soft: #F4D06F;
  --beige:       #F5E6D3;
  --cream:       #FFF8EA;
}

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

/* Respeita usuários com preferência por menos movimento. Zera animações
 * infinitas do splash (bounce/pulse) e encurta transições de opacidade. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--beige);
  color: var(--red-deep);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── iframe do Apps Script ── */
#app-frame {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--beige);
  opacity: 0;
  transition: opacity 0.35s ease;
}
#app-frame.ready { opacity: 1; }

/* ── Splash de carregamento ── */
#splash {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  background:
    radial-gradient(circle at 20% 30%, rgba(232, 184, 78, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(91, 22, 22, 0.30) 0%, transparent 45%),
    linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  color: var(--cream);
  text-align: center;
  padding: 1.5rem;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
#splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
/* Personagens dançando — sem moldura redonda, apenas sombra + animação
   "dance" que combina sway lateral (rotate ±3deg) com pequeno pulinho
   vertical, simulando o movimento de forró. */
.splash-logo {
  width: 180px;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.45));
  animation: dance 1.6s ease-in-out infinite;
  transform-origin: 50% 90%;  /* gira ao redor da base — fica natural */
}
@keyframes dance {
  0%, 100% { transform: translateY(0)    rotate(-3deg); }
  25%      { transform: translateY(-6px) rotate(0deg); }
  50%      { transform: translateY(0)    rotate(3deg); }
  75%      { transform: translateY(-6px) rotate(0deg); }
}
.splash-title {
  font-family: 'Amatic SC', cursive;
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3rem);
  color: var(--yellow);
  letter-spacing: 2px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  line-height: 1;
}
.splash-sub {
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  color: var(--yellow-soft);
  opacity: 0.95;
}
.splash-dots {
  display: inline-flex;
  gap: 0.45rem;
  margin-top: 0.5rem;
}
.splash-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--yellow);
  opacity: 0.35;
  animation: pulse 1.1s ease-in-out infinite;
}
.splash-dots span:nth-child(2) { animation-delay: 0.2s; }
.splash-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.25); }
}

/* ── Erro de configuração ── */
#error-box {
  display: none;
  max-width: 520px;
  background: var(--cream);
  color: var(--red-deep);
  border: 2px dashed var(--yellow);
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.2rem;
  text-align: left;
  line-height: 1.55;
}
#error-box h2 {
  font-family: 'Amatic SC', cursive;
  font-size: 1.8rem;
  color: var(--red);
  margin-bottom: 0.4rem;
}
#error-box code {
  display: inline-block;
  background: rgba(91, 22, 22, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
}
