/* Futebol do Tobias — o visual próprio (prefixo ft-). O comum vem de base.css. */

/* ---------- menu ---------- */
.palco.ft-menu { display: grid; grid-template-columns: repeat(2, auto); gap: clamp(12px, 3vmin, 28px); align-content: center; justify-content: center; }
.ft-modo {
  width: clamp(170px, 30vw, 320px); height: clamp(var(--alvo), 26vh, 210px); min-height: var(--alvo);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 28px; background: var(--branco); box-shadow: var(--sombra), inset 0 -8px 0 #b9e3a8; color: var(--azul);
}
.ft-modo-icone { font-size: clamp(40px, 9vmin, 84px); line-height: 1; }
.ft-modo-nome { font-size: clamp(16px, 2.4vmin, 24px); font-weight: bold; }

/* ---------- campinho ---------- */
.palco.ft-palco { align-items: stretch; }
.ft-campo {
  position: relative; flex: 1; overflow: hidden; border-radius: 24px; margin: 4px;
  background:
    radial-gradient(circle at 50% 108%, transparent 0 18%, rgba(255, 255, 255, 0.55) 18.4% 19%, transparent 19.4%),
    repeating-linear-gradient(90deg, #7cc95a 0 60px, #6fbe4d 60px 120px);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.5);
}
.ft-gol {
  position: absolute; top: 3%; left: 50%; transform: translateX(-50%);
  width: min(64%, 620px); height: clamp(104px, 36%, 270px);
  border: 8px solid #fff; border-bottom: 0; border-radius: 8px 8px 0 0;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
}
.ft-rede {
  position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.55) 0 2px, transparent 2px 14px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.55) 0 2px, transparent 2px 14px),
    rgba(31, 47, 74, 0.12);
}
.ft-gol.balancando .ft-rede { animation: ft-rede 0.7s ease-out; }
@keyframes ft-rede { 30% { transform: scale(1.04, 1.1) translateY(-4%); } 60% { transform: scale(0.98, 0.96); } }
.ft-gol.ft-gol-chamando { box-shadow: 0 0 0 6px var(--amarelo), 0 4px 0 rgba(0, 0, 0, 0.12); animation: ft-chamar 1.2s ease-in-out infinite; cursor: pointer; }
@keyframes ft-chamar { 50% { box-shadow: 0 0 0 12px rgba(255, 213, 79, 0.6), 0 4px 0 rgba(0, 0, 0, 0.12); } }

.ft-goleiro { position: absolute; bottom: 0; left: 50%; height: 82%; transform: translateX(-50%); transition: left 0.45s ease-out, transform 0.45s ease-out; pointer-events: none; }
.ft-goleiro img { height: 100%; width: auto; display: block; }
.ft-goleiro[data-zona="-1"] { left: 20%; transform: translateX(-50%) rotate(-14deg); }
.ft-goleiro[data-zona="1"] { left: 80%; transform: translateX(-50%) rotate(14deg); }
.ft-goleiro.sentado { transform: translateX(-50%) rotate(-24deg) translateY(12%); }

.ft-bola {
  position: absolute; left: 50%; bottom: 5%; width: var(--alvo); height: var(--alvo); margin-left: calc(var(--alvo) / -2);
  z-index: 3; touch-action: none; cursor: grab; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
  filter: drop-shadow(0 6px 4px rgba(0, 0, 0, 0.25));
}
.ft-bola svg { width: 100%; height: 100%; display: block; }
.ft-modo-chute .ft-bola { animation: ft-quica 1.8s ease-in-out infinite; }
@keyframes ft-quica { 50% { margin-bottom: 6px; } }

.ft-tobias { position: absolute; left: 22%; bottom: 3%; height: min(30%, 190px); transform-origin: 50% 100%; pointer-events: none; transition: transform 0.25s; }
.ft-tobias img { height: 100%; width: auto; display: block; }
.ft-tobias.chutando { transform: rotate(14deg) translateX(10%); }
.comemorando { animation: ft-pulo 0.6s ease-out 2; }
@keyframes ft-pulo { 40% { transform: translateY(-18%); } 70% { transform: translateY(0) scale(1.05, 0.95); } }

.ft-mira {
  position: absolute; height: 0; border-top: 7px dotted var(--amarelo); transform-origin: 0 50%;
  pointer-events: none; z-index: 2; filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

/* ---------- gol dos números ---------- */
.ft-alvos { position: absolute; inset: 6px; display: flex; align-items: center; justify-content: space-evenly; gap: 6px; }
.ft-alvo {
  width: var(--alvo); height: var(--alvo); border-radius: 50%; border: 5px solid #fff;
  font-size: calc(var(--alvo) * 0.5); font-weight: bold; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  box-shadow: var(--sombra); flex: 0 0 auto;
}
.ft-alvo.cor-vermelho { background: #e53935; }
.ft-alvo.cor-azul { background: #1e88e5; }
.ft-alvo.cor-amarelo { background: #fdd835; color: var(--azul); text-shadow: none; }
.ft-alvo.cor-verde { background: #2e7d32; }
.ft-alvo.cor-roxo { background: #8e24aa; }
.ft-alvo.acertado { box-shadow: 0 0 0 8px #fff, 0 0 0 14px var(--amarelo); animation: ft-pulo 0.6s ease-out; }

/* ---------- tabelinha ---------- */
.ft-amigo {
  position: absolute; bottom: 3%; width: calc(var(--alvo) * 1.3); height: min(32%, calc(var(--alvo) * 1.7)); min-height: var(--alvo);
  border: 0; padding: 4px; border-radius: 22px; background: rgba(255, 255, 255, 0.45); box-shadow: var(--sombra);
  display: grid; place-items: end center;
}
.ft-amigo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ft-amigo-bia { left: 3%; }
.ft-amigo-gemalino { right: 20%; }
.ft-amigo-saltitao { right: 3%; }
.ft-modo-tabelinha .ft-tobias { left: calc(50% - var(--alvo) * 2.1); }
.ft-amigo.ft-recebeu { animation: ft-pulo 0.6s ease-out; background: rgba(255, 213, 79, 0.85); }
.ft-amigo.ft-balanca { animation: ft-balanca 0.5s ease-in-out; }
@keyframes ft-balanca { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }

/* ---------- goleiro ---------- */
.ft-zonas { position: absolute; inset: 0; display: flex; }
.ft-zona { flex: 1; min-width: var(--alvo); min-height: var(--alvo); border: 0; background: transparent; border-right: 3px dashed rgba(255, 255, 255, 0.7); }
.ft-zona:last-child { border-right: 0; }
.ft-zona:active { background: rgba(255, 213, 79, 0.35); }
.ft-zona-seta { font-size: clamp(28px, 6vmin, 52px); opacity: 0.75; }
.ft-luvas { position: absolute; bottom: 6%; left: 50%; transform: translateX(-50%); font-size: clamp(48px, 11vmin, 96px); transition: left 0.3s ease-out; pointer-events: none; z-index: 2; }
.ft-luvas[data-zona="-1"] { left: 17%; }
.ft-luvas[data-zona="1"] { left: 83%; }
.ft-luvas.pegou { animation: ft-pulo 0.6s ease-out; }
.ft-seta {
  position: absolute; left: 50%; bottom: calc(5% + var(--alvo) + 6px); transform: translateX(-50%);
  font-size: clamp(56px, 13vmin, 110px); line-height: 1; pointer-events: none; z-index: 2;
  animation: ft-quica 1s ease-in-out infinite;
}
.ft-seta[data-lado="-1"]::after { content: "⬅️"; }
.ft-seta[data-lado="0"]::after { content: "⬆️"; }
.ft-seta[data-lado="1"]::after { content: "➡️"; }
.ft-seta[hidden] { display: none; }

/* ---------- fim ---------- */
.palco.ft-fim { flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.ft-tobias-grande { height: min(48vh, 340px); }
.ft-tobias-grande img { height: 100%; width: auto; display: block; }
.ft-mao {
  width: calc(var(--alvo) * 1.3); height: calc(var(--alvo) * 1.3); border-radius: 50%; border: 0;
  background: var(--amarelo); font-size: calc(var(--alvo) * 0.7); box-shadow: var(--sombra);
  animation: ft-chamar 1.2s ease-in-out infinite;
}
.ft-mao.bateu { animation: ft-pulo 0.6s ease-out; }
.ft-fim-botoes { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.ft-fim-botoes[hidden] { display: none; }

/* dica das teclas: só com mouse (computador) */
.ft-teclas { display: none; position: absolute; right: 12px; bottom: 8px; margin: 0; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); font-size: 15px; color: var(--azul); pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .ft-teclas { display: block; } }

/* ---------- telas baixas (celular deitado) ---------- */
@media (max-height: 500px) {
  .ft-gol { height: clamp(96px, 40%, 200px); width: min(70%, 620px); }
  .ft-tobias { height: 34%; }
  .ft-amigo { height: 40%; }
  .ft-tobias-grande { height: 38vh; }
  .palco.ft-fim { flex-direction: row; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .ft-bola, .ft-goleiro, .ft-luvas { transition-duration: 0.01ms; }
  .ft-modo-chute .ft-bola, .ft-seta, .ft-mao, .ft-gol.ft-gol-chamando { animation: none; }
}
