/* A Cobrinha de Moisés — visual fofo/colorido, tema do deserto do Êxodo,
   paleta e padrões inspirados no site Santo Antônio Kids (botões grandes,
   cores pastel quentes, Inter + Playfair Display, alvos de toque generosos).
   A arte "3D" (cobra, maná, pedras, deserto) é toda desenhada dentro do
   <canvas> pelo game.js — este CSS cuida só do chrome ao redor. */

:root {
  --blue: #8ecae6;
  --gold: #ffd98a;
  --gold-strong: #c08a3e;
  --pink: #f59ac0;
  --brown: #5b3a2e;
  --brown-2: #6e4329;
  --dark: #2a1a12;
  --cream: #fff7e8;
  --paper: #fbf6ef;
  --card: #ffffff;
  --text: #2b211d;
  --muted: #7a6a5f;
  --line: #ece0d3;
  --green: #4c9b4f;
  --radius: 20px;
  --shadow: 0 18px 45px rgba(90, 55, 30, 0.16);
}

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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue) 0%, var(--gold) 50%, var(--pink) 100%);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  padding: 16px;
}

#wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 560px;
}

#topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#voltarKids {
  flex: none;
  font-weight: 800;
  font-size: 13px;
  color: var(--brown);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 9px 14px;
  box-shadow: var(--shadow);
  white-space: nowrap;
}

h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(20px, 4.6vw, 28px);
  color: var(--dark);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.5);
  text-align: center;
}

h1 span {
  color: var(--gold-strong);
}

.som-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
  flex: none;
}

.som-btn:hover {
  background: var(--gold);
}

#hud {
  width: 100%;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.hud-chip {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 8px 16px;
  font-weight: 800;
  font-size: 15px;
  color: var(--brown);
  box-shadow: 0 6px 16px rgba(90, 55, 30, 0.08);
}

.hud-chip b {
  color: var(--gold-strong);
}

#stage {
  position: relative;
  width: 100%;
  max-width: 512px;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  background: var(--cream);
  border: 4px solid var(--gold-strong);
  border-radius: 24px;
  box-shadow: var(--shadow);
  touch-action: none;
}

.pad-wrap {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 2px;
}

.pad-row {
  display: flex;
  gap: 46px;
}

.pad-btn {
  width: 56px;
  height: 56px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--brown);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(90, 55, 30, 0.1);
}

.pad-btn:active {
  background: var(--gold);
  transform: scale(0.95);
}

#hint {
  font-size: 14px;
  color: var(--brown);
  text-align: center;
  font-weight: 600;
  opacity: 0.85;
}

.hidden {
  display: none !important;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(42, 22, 14, 0.5);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.overlay-box {
  text-align: center;
  padding: 28px 26px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
  max-width: 340px;
}

.overlay-box h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
  color: var(--brown);
  margin-bottom: 8px;
}

.overlay-box p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 22px;
  border-radius: 14px;
  border: none;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-big {
  background: var(--gold-strong);
  color: #fff8ec;
  box-shadow: 0 10px 22px rgba(192, 138, 62, 0.4);
  width: 100%;
}

.btn-big:hover {
  background: #a97731;
}

/* tela de abertura (vídeo assets/abertura.mp4, só aparece se o arquivo existir) */
#introOverlay {
  background: #1a0f08;
  padding: 0;
  flex-direction: column;
}

#introVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
}

.btn-skip {
  position: absolute;
  right: 16px;
  bottom: 16px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 30px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff8ec;
  backdrop-filter: blur(2px);
}

.btn-skip:hover {
  background: rgba(0, 0, 0, 0.65);
}

/* tela mínima antes do vídeo — o toque aqui é o que libera o autoplay com
   som do vídeo logo em seguida (regra do navegador: precisa de 1 interação
   real do usuário antes de tocar áudio sozinho) */
.watch-char {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin: 0 auto 10px;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(90, 55, 30, 0.25));
}
