/* A Grande Aventura do Gemalino — visual próprio do jogo (o comum está em base.css).
   Menu: os 5 mundos lado a lado. Fase: o canvas ocupa o palco e os controles ficam por cima, nos
   cantos de baixo, meio transparentes. Nada pisca. */
:root {
  --tema: #5bb8ec;
  --tema-escuro: #2f7fb5;
  --av-gap: 8px;
  --av-fase: max(var(--alvo), min(10vw, 15vh));
}

/* ---------- menu ---------- */
.av-menu { align-items: center; justify-content: center; }
.av-mundos { display: flex; gap: var(--av-gap); align-items: stretch; justify-content: center; max-width: 100%; max-height: 100%; }
.av-mundo {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px; border-radius: 18px;
  background: rgba(255, 253, 247, 0.82); box-shadow: var(--sombra);
}
.av-mundo h2 { margin: 0; font-size: clamp(13px, 1.8vw, 21px); color: var(--azul); }
.av-mundo-1 { border-bottom: 6px solid #7cc35a; }
.av-mundo-2 { border-bottom: 6px solid #e07b39; }
.av-mundo-3 { border-bottom: 6px solid #3f7d3c; }
.av-mundo-4 { border-bottom: 6px solid #4aa8e0; }
.av-mundo-5 { border-bottom: 6px solid #c7a6ff; }
.av-fase-botao {
  position: relative; width: var(--av-fase); height: var(--av-fase); padding: 0; border: 3px solid var(--azul);
  border-radius: 16px; background: var(--amarelo); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.av-fase-botao strong { font-size: clamp(26px, 3.4vw, 40px); color: var(--azul); }
.av-fase-sementes { font-size: clamp(13px, 1.5vw, 17px); font-weight: bold; color: #7a4a1d; margin-top: 4px; }
.av-fase-sementes::before { content: ""; display: inline-block; width: 0.55em; height: 0.85em; margin-right: 4px; border-radius: 50%; background: #5b5f66; vertical-align: -1px; }
.av-fase-botao.feita { background: #b8f08f; }
.av-fase-botao.fechada { filter: grayscale(0.7); opacity: 0.6; }
.av-fase-botao:active { transform: translateY(2px); }
.av-cadeado { font-size: 18px; margin-top: 4px; }

/* ---------- a fase ---------- */
.av-fase { align-items: stretch; }
.av-tela { position: relative; flex: 1; min-width: 0; min-height: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 4px var(--branco), 0 6px 0 4px rgba(0, 0, 0, 0.12); }
.av-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.av-controles { position: absolute; bottom: 8px; display: flex; gap: 10px; }
.av-controles-esq { left: 8px; }
.av-fase[data-estado="fim"] .av-controles { display: none; }
.av-controles-dir { right: 8px; }
.av-controle {
  width: var(--alvo); height: var(--alvo); border-radius: 50%; border: 3px solid rgba(31, 78, 140, 0.55);
  background: rgba(255, 253, 247, 0.55); color: var(--azul); font-size: 34px; font-weight: bold;
  touch-action: none; -webkit-tap-highlight-color: transparent;
}
.av-controle.apertado { background: rgba(255, 213, 79, 0.85); }
.av-pular { background: rgba(255, 213, 79, 0.6); }
.av-bolha { background: rgba(190, 230, 255, 0.65); font-size: 40px; }
/* a tecla escrita pequena embaixo de cada botão: só em aparelho com mouse (onde há teclado) */
.av-controle { position: relative; }
.av-tecla {
  display: none; position: absolute; left: 50%; bottom: -2px; transform: translate(-50%, 100%);
  padding: 1px 7px; border-radius: 8px; background: rgba(31, 78, 140, 0.85); color: #fff;
  font-size: 13px; font-weight: bold; line-height: 1.4; white-space: nowrap; pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .av-controles { bottom: 26px; }
  .av-tecla { display: block; }
}

/* ---------- o fim da fase ---------- */
.av-fim {
  position: absolute; inset: 0; margin: auto; width: min(94%, 520px); height: fit-content; max-height: 100%; overflow: auto;
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 14px;
  background: rgba(255, 253, 247, 0.95); border-radius: var(--raio); box-shadow: var(--sombra); animation: entra 0.35s ease-out;
}
.av-fim strong { font-size: clamp(20px, 3vw, 30px); color: var(--azul); }
.av-fim p { margin: 0; font-size: clamp(15px, 1.9vw, 19px); }
.av-flores { display: block; max-width: 100%; height: auto; }
.av-fim-botoes { display: flex; gap: 12px; }

@media (max-height: 460px) {
  .av-mundo { gap: 4px; padding: 4px; }
  .av-fim { gap: 2px; padding: 4px 10px; }
  .av-flores { max-height: 44px; width: auto !important; }
}
