/* Corre, Gemalino! — visual próprio do jogo (o comum está em base.css).
   Menu: os 5 caminhos lado a lado, cada um com as cores do seu cenário. Corrida: o canvas ocupa o
   palco e os dois botões ficam por cima, nos cantos de baixo, meio transparentes. Nada pisca. */
:root {
  --tema: #e5484d;
  --tema-escuro: #b8282e;
  --cg-gap: 10px;
}

/* ---------- menu ---------- */
.cg-menu { align-items: center; justify-content: center; }
.cg-caminhos {
  display: flex; gap: var(--cg-gap); align-items: stretch; justify-content: center;
  width: 100%; max-width: 1000px; height: min(100%, 300px);
}
.cg-caminho {
  position: relative; flex: 1 1 0; min-width: var(--alvo); min-height: var(--alvo); padding: 8px 4px;
  border: 4px solid var(--branco); border-radius: 20px; box-shadow: var(--sombra);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px;
  color: var(--azul); line-height: 1.1; overflow: hidden;
}
.cg-caminho:active { transform: translateY(2px); }
.cg-caminho-numero {
  display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%;
  background: rgba(255, 253, 247, 0.92); font-size: clamp(22px, 3.4vw, 36px);
}
.cg-caminho-nome {
  padding: 2px 8px; border-radius: 10px; background: rgba(255, 253, 247, 0.92);
  font-size: clamp(13px, 1.8vw, 19px); font-weight: bold; text-align: center;
}
.cg-caminho-feito {
  position: absolute; top: 6px; right: 8px; font-size: clamp(16px, 2vw, 22px); font-weight: bold; color: #2e7d32;
}
/* o cenário de cada caminho: céu em cima, chão embaixo */
.cg-cenario-fazenda { background: linear-gradient(#8fd3ff 0 55%, #7cc35a 55% 68%, #c9935a 68%); }
.cg-cenario-horta { background: linear-gradient(#a8e0ff 0 55%, #8bcf5f 55% 68%, #b9824e 68%); }
.cg-cenario-floresta { background: linear-gradient(#7cc6a8 0 30%, #3f7d3c 30% 68%, #8e6239 68%); }
.cg-cenario-chuva { background: repeating-linear-gradient(100deg, transparent 0 14px, rgba(255, 255, 255, 0.35) 14px 16px), linear-gradient(#8a9bb0 0 55%, #679a57 55% 68%, #8f6a49 68%); }
.cg-cenario-porDoSol { background: radial-gradient(circle at 70% 52%, #ffec9f 0 13%, transparent 14%), linear-gradient(#ff8a3d 0 55%, #7f9a45 55% 68%, #8a5a35 68%); }

/* ---------- a corrida ---------- */
.cg-corrida { align-items: stretch; }
.cg-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);
}
.cg-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.cg-controles { position: absolute; inset: auto 8px 8px 8px; display: flex; justify-content: space-between; pointer-events: none; }
.cg-corrida:not([data-estado="correndo"]):not([data-estado="pronto"]) .cg-controles { display: none; }
.cg-controle {
  position: relative; pointer-events: auto; width: var(--alvo); height: var(--alvo); border-radius: 50%;
  border: 3px solid rgba(31, 78, 140, 0.55); background: rgba(255, 253, 247, 0.45); color: var(--azul);
  font-size: 38px; font-weight: bold; touch-action: none; -webkit-tap-highlight-color: transparent;
}
.cg-pular { background: rgba(255, 213, 79, 0.5); }
.cg-controle.apertado { background: rgba(255, 213, 79, 0.95); }
/* a tecla escrita pequena embaixo de cada botão: só em aparelho com mouse (onde há teclado) */
.cg-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) {
  .cg-controles { bottom: 26px; }
  .cg-tecla { display: block; }
}
.cg-correr {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  min-width: 160px; min-height: var(--alvo); font-size: clamp(22px, 3vw, 30px);
}

/* ---------- a festa ---------- */
.cg-festa-botoes {
  position: absolute; left: 0; right: 0; bottom: 8px; width: fit-content; margin: 0 auto; z-index: 1;
  display: flex; gap: 12px; padding: 6px 10px; border-radius: 22px; background: rgba(255, 253, 247, 0.8);
  animation: entra 0.35s ease-out;
}
