/* Animações extras: vida no fundo do mar, parallax, faíscas, títulos letra por letra, cards 3D e mais. */

/* ---------- barra de progresso da rolagem ---------- */
.fa-progresso { position: fixed; left: 0; top: 0; z-index: 100; height: 4px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, #ffe066, #ffc21f 40%, #1ea6ff); box-shadow: 0 0 12px rgba(255, 194, 31, .7); pointer-events: none; }

/* ---------- raios de luz no fundo do mar ---------- */
.fa-raios { position: absolute; left: -40%; right: -40%; pointer-events: none; overflow: hidden; mix-blend-mode: screen; }
@media (min-width: 1200px) { .fa-raios { top: calc(860 * 100cqw / 2002); height: calc(1500 * 100cqw / 2002); } }
@media (max-width: 1199.98px) { .fa-raios { left: 0; right: 0; top: 520px; height: 1300px; } }
.fa-raios i { position: absolute; top: -10%; left: var(--x); width: var(--l); height: 120%; transform-origin: 50% 0; rotate: var(--r);
  background: linear-gradient(180deg, rgba(160, 225, 255, .26), rgba(120, 200, 255, .08) 55%, transparent);
  filter: blur(6px); animation: fa-raio var(--d) ease-in-out var(--a) infinite alternate; }
@keyframes fa-raio { from { rotate: calc(var(--r) - 4deg); opacity: .35; } to { rotate: calc(var(--r) + 4deg); opacity: .9; } }

/* ---------- peixes e águas-vivas ---------- */
.fa-cardume { position: absolute; left: -40%; right: -40%; pointer-events: none; overflow: hidden; }
@media (min-width: 1200px) { .fa-cardume { top: calc(950 * 100cqw / 2002); height: calc(3050 * 100cqw / 2002); } }
@media (max-width: 1199.98px) { .fa-cardume { left: 0; right: 0; top: 540px; bottom: 0; } }
.fa-peixe { position: absolute; top: var(--y); left: -12%; width: var(--w); animation: fa-nada var(--d) linear var(--a) infinite; }
.fa-peixe.volta { animation-direction: reverse; }
.fa-peixe img { display: block; width: 100%; height: auto; animation: fa-balanca 1.6s ease-in-out infinite alternate; image-rendering: pixelated; }
.fa-peixe.volta img { scale: -1 1; }
@keyframes fa-nada { from { left: -12%; } to { left: 108%; } }
@keyframes fa-balanca { from { translate: 0 -6px; rotate: -3deg; } to { translate: 0 6px; rotate: 3deg; } }
.fa-agua-viva { position: absolute; top: var(--y); left: var(--x); width: var(--w); animation: fa-sobe-desce var(--d) ease-in-out var(--a) infinite alternate; opacity: .9; }
.fa-agua-viva img { display: block; width: 100%; animation: fa-pulsa 2.2s ease-in-out infinite; transform-origin: 50% 30%; image-rendering: pixelated; }
@keyframes fa-sobe-desce { from { translate: 0 30px; } to { translate: 12px -60px; } }
@keyframes fa-pulsa { 0%, 100% { scale: 1 1; } 50% { scale: 1.08 .9; } }

/* ---------- faíscas (logo, coroa, Diamante) ---------- */
.fa-faisca { position: absolute; width: var(--t); height: var(--t); pointer-events: none; z-index: 5; translate: -50% -50%;
  background: radial-gradient(circle, #fff 0 18%, transparent 20%),
              conic-gradient(from 0deg, transparent 0 40deg, #fff6c2 45deg, transparent 50deg 130deg, #fff6c2 135deg, transparent 140deg 220deg, #fff6c2 225deg, transparent 230deg 310deg, #fff6c2 315deg, transparent 320deg);
  border-radius: 50%; filter: drop-shadow(0 0 6px rgba(255, 220, 90, .9)); animation: fa-pisca 1.3s ease-out forwards; }
@keyframes fa-pisca { 0% { opacity: 0; scale: 0; rotate: 0deg; } 35% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: .2; rotate: 140deg; } }

/* ---------- explosão de partículas ao clicar ---------- */
.fa-estouro { position: fixed; z-index: 120; width: var(--t); height: var(--t); border-radius: 2px; pointer-events: none; background: var(--c);
  box-shadow: 0 0 8px var(--c); animation: fa-estoura .75s cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes fa-estoura { 0% { translate: -50% -50%; opacity: 1; rotate: 0deg; }
  100% { translate: calc(-50% + var(--dx)) calc(-50% + var(--dy)); opacity: 0; rotate: var(--rot); scale: .3; } }

/* ---------- títulos letra por letra, com uma onda de vez em quando ---------- */
.anim .letras span { display: inline-block; opacity: 0; translate: 0 .55em; rotate: -10deg; white-space: pre; }
.anim .rev.vis .letras span { animation: fa-letra .55s cubic-bezier(.2, .9, .3, 1.35) calc(var(--l) * 45ms + .15s) both,
                                         fa-onda 7s ease-in-out calc(var(--l) * 60ms + 3s) infinite; }
@keyframes fa-letra { from { opacity: 0; translate: 0 .55em; rotate: -10deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes fa-onda { 0%, 88%, 100% { translate: 0 0; } 92% { translate: 0 -.16em; } 96% { translate: 0 .04em; } }
.anim .rev.vis .letras span { opacity: 1; }

/* ---------- botão "Jogar agora" respirando + reação ao mouse ---------- */
@keyframes fa-respira { 0%, 100% { scale: 1; } 50% { scale: 1.035; } }
.anim .btn-jogar .btn-img { animation: fa-respira 2.8s ease-in-out 1.4s infinite; }
.btn-jogar:hover .btn-img { animation: fa-chacoalha .45s ease; }
@keyframes fa-chacoalha { 0%, 100% { rotate: 0deg; } 25% { rotate: -2deg; } 75% { rotate: 2deg; } }

/* ---------- Discord: flutua e recebe um brilho ---------- */
.anim .discord-img { animation: fa-flutua 6s ease-in-out infinite; }
a.discord::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .45) 50%, transparent 60%) 160% 0 / 250% 100% no-repeat;
  -webkit-mask: url("/img/fg/discord.webp?v=2") center / 100% 100% no-repeat; mask: url("/img/fg/discord.webp?v=2") center / 100% 100% no-repeat;
  animation: fa-brilho 5s ease-in-out 2.5s infinite; }

/* ---------- cards dos jogos: 3D com o mouse + brilho ---------- */
.s-jogos { perspective: 1200px; }
button.jogo { transform-style: preserve-3d; will-change: transform; }
button.jogo.inclinando { transition: transform .08s linear, filter .25s ease; }
button.jogo::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 89.5%; border-radius: 6.3%; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .35), transparent 45%); opacity: 0; transition: opacity .25s ease; }
button.jogo:hover::after { opacity: 1; }
.anim .jogo-tag, .anim .jogo-nome { transition: translate .25s ease; }
button.jogo:hover .jogo-tag, button.jogo:hover .jogo-nome { translate: 0 -4px; }

/* ---------- família flutuando ---------- */
.anim .familia.vis { animation: fa-flutua 6.5s ease-in-out 1s infinite; }

/* ---------- coins: bolinha brilhando, setas reagindo ---------- */
@keyframes fa-brilha-bola { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 210, 60, 0)); } 50% { filter: drop-shadow(0 0 10px rgba(255, 210, 60, .95)); } }
.anim .bolinha { animation: fa-brilha-bola 2.2s ease-in-out infinite; }
.seta { transition: background .2s ease, transform .1s ease; }
.seta:hover { background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%); }
.seta:active { transform: scale(.92); }
.anim .qtd b { display: inline-block; }
.qtd.pop b { animation: fa-pop .35s ease; }
@keyframes fa-pop { 50% { scale: 1.18; color: #fff6c2; } }

/* ---------- VIPs: itens entram um a um, Diamante brilha, preço conta ---------- */
.anim .vcard .v-lista li { opacity: 0; translate: -14px 0; }
.anim .vcard.vis .v-lista li { animation: fa-item .45s ease calc(var(--li) * 70ms + .35s) both; }
@keyframes fa-item { to { opacity: 1; translate: 0 0; } }
@keyframes fa-borda { 0%, 100% { box-shadow: inset 0 calc(4 * var(--u)) calc(30 * var(--u)) #4bbbfd, 0 0 0 rgba(0, 188, 255, 0); }
  50% { box-shadow: inset 0 calc(4 * var(--u)) calc(30 * var(--u)) #4bbbfd, 0 0 calc(34 * var(--u)) rgba(0, 188, 255, .75); } }
.anim .vcard.top .v-fundo { animation: fa-borda 2.6s ease-in-out infinite; }
.anim .vcard .v-ic { animation: fa-balanca-ic 4s ease-in-out infinite; }
.anim .vcard:nth-child(2) .v-ic { animation-delay: -.8s; } .anim .vcard:nth-child(3) .v-ic { animation-delay: -1.6s; }
.anim .vcard:nth-child(4) .v-ic { animation-delay: -2.4s; } .anim .vcard:nth-child(5) .v-ic { animation-delay: -3.2s; }
@keyframes fa-balanca-ic { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }
.vcard:hover .v-ic { animation: fa-pula .6s cubic-bezier(.3, 1.6, .5, 1); }
.v-preco b { display: inline-block; }

/* ---------- rodapé aparece ---------- */
.anim .f-rodape .f-wrap { opacity: 0; translate: 0 30px; transition: opacity .8s ease, translate .8s ease; }
.anim .f-rodape.vis .f-wrap { opacity: 1; translate: 0 0; }
