/* Compra (02/11): botão com luz girando em volta e pulsando, no estilo dos botões da tela inicial.
   Só aparência. */

.glow-buy { position: relative; isolation: isolate; overflow: visible; }
/* Moldura com a luz girando: recortada no formato do botão, para a coroa poder sair para fora */
.glow-ring { position: absolute; inset: 0; z-index: -1; border-radius: inherit; overflow: hidden; pointer-events: none; }
/* Luz que gira em volta do botão */
.glow-ring::before {
  content: ""; position: absolute; z-index: 0; left: 50%; top: 50%; width: 260%; aspect-ratio: 1;
  background: conic-gradient(from 0deg, transparent 0 62%, rgba(255, 255, 255, .95) 72%, #fde047 78%, #ff9d1c 84%, transparent 94%);
  animation: bpSpin 2.2s linear infinite;
}
/* Miolo dourado com estrelinhas, por cima da luz (sobra uma borda de 3px) */
.glow-ring::after {
  content: ""; position: absolute; z-index: 1; inset: 3px; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(1.5px 1.5px at 14% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 22%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 88% 72%, #fff, transparent), radial-gradient(1px 1px at 38% 80%, #fff, transparent),
    linear-gradient(180deg, rgba(255, 255, 255, .28), transparent 55%),
    linear-gradient(180deg, #ffe066, #ff9d1c 60%, #ff7a1c);
}
@keyframes bpSpin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }

/* Botão amarelo que fica sobre a barra de menu: mais alto e com cara de painel de nave */
#buy-pulse.buy-pulse {
  position: fixed; bottom: calc(92px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; padding: 12px 22px 12px 14px;
  border: 0; border-radius: 999px 26px 999px 26px; background: #b45309;
  color: #3b1d00; font: 900 1rem var(--fun, inherit); letter-spacing: .3px; text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: 0 5px 0 #a64b00, 0 8px 18px rgba(5, 2, 25, .45);
  animation: bpPulse 1.6s ease-in-out infinite;
}
#buy-pulse.buy-pulse[hidden] { display: none; }
#buy-pulse .bp-txt { position: relative; z-index: 1; }
#buy-pulse .bp-ico {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin: -6px 0; border-radius: 50%;
  font-style: normal; font-size: 19px; line-height: 1;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .7), rgba(255, 255, 255, .2) 60%), rgba(120, 50, 0, .25);
  border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 0 12px rgba(255, 216, 77, .9);
  animation: bpCrown 1.4s ease-in-out infinite;
}
#buy-pulse .bp-trail { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
#buy-pulse .bp-trail::before { content: ""; position: absolute; top: -20%; bottom: -20%; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent); animation: bpShine 2.6s ease-in-out infinite; }
#buy-pulse:active { animation: none; transform: translateX(-50%) translateY(4px) scale(.98); }
body.has-buy main { padding-bottom: 110px; }

@keyframes bpPulse {
  0%, 100% { transform: translateX(-50%) scale(1); filter: drop-shadow(0 0 3px rgba(255, 210, 60, .55)); }
  50% { transform: translateX(-50%) scale(1.06); filter: drop-shadow(0 0 16px rgba(255, 210, 60, .95)); }
}
@keyframes bpCrown { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-3px) rotate(8deg); } }
@keyframes bpShine { 0%, 55% { left: -60%; } 100% { left: 130%; } }

/* Tela de assinatura: letras maiores, mais benefícios, botão de compra que brilha */
#paywall h2 { font-size: 1.5rem !important; line-height: 1.2 !important; margin: 4px 0 6px !important; }
#paywall #pay-text { font-size: 1rem !important; line-height: 1.4 !important; }
#paywall .pay-body { display: flex; flex-direction: column; }
.pay-gets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.pay-gets[hidden] { display: none; }
.pay-gets > div {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 16px 8px 16px 8px;
  background: linear-gradient(135deg, rgba(255, 224, 102, .16), rgba(168, 85, 247, .14)); border: 1px solid rgba(255, 224, 102, .35);
}
.pay-gets i { flex: none; font-style: normal; font-size: 1.45rem; line-height: 1; }
.pay-gets b { font-size: .95rem; line-height: 1.2; }
#paywall .pay-why li { font-size: .98rem !important; line-height: 1.35 !important; padding: 7px 10px !important; }

/* Botão de compra da tela de assinatura */
#pay-anual.pay-plan {
  border: 0; border-radius: 26px 12px 26px 12px; background: #b45309; color: #3b1d00; text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
  padding: 14px 18px !important; margin: 10px 2px 6px !important; box-shadow: 0 5px 0 #a64b00, 0 8px 18px rgba(5, 2, 25, .45); animation: bpPulseIn 1.6s ease-in-out infinite;
}
#pay-anual.pay-plan b { font-size: 1.35rem !important; color: #3b1d00; white-space: nowrap; }
#pay-anual.pay-plan .pay-val { color: #3b1d00; font-size: 1.45rem !important; white-space: nowrap; }
#pay-anual.pay-plan small { color: rgba(59, 29, 0, .85); font-weight: 800; font-size: .9rem !important; }
body.fit #paywall #pay-anual.pay-plan { grid-template-columns: 1fr; text-align: center; padding: 10px 14px !important; }
body.fit #paywall #pay-anual.pay-plan .pay-val { grid-column: 1; grid-row: auto; text-align: center; font-size: 1.5rem !important; }
body.fit #paywall #pay-anual.pay-plan small { grid-column: 1; }
#pay-anual:active { animation: none; transform: translateY(4px) scale(.98); }
@keyframes bpPulseIn {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 3px rgba(255, 210, 60, .5)); }
  50% { transform: scale(1.03); filter: drop-shadow(0 0 14px rgba(255, 210, 60, .9)); }
}

@media (max-width: 380px) {
  #pay-anual.pay-plan b { font-size: 1.12rem !important; }
  #buy-pulse.buy-pulse { font-size: .9rem; padding: 11px 16px 11px 12px; }
}
@media (max-height: 600px) { #paywall #pay-text { display: none; } }

/* Celular baixinho: benefícios em uma linha só para o botão nunca sair da tela */
@media (max-height: 700px) {
  .pay-gets { gap: 6px; }
  .pay-gets > div { padding: 6px 8px; }
  .pay-gets b { font-size: .85rem; }
  #paywall h2 { font-size: 1.3rem !important; }
}

@media (prefers-reduced-motion: reduce) {
  .glow-ring::before, .coroa3d, #buy-pulse.buy-pulse, #buy-pulse .bp-ico, #buy-pulse .bp-trail::before, #pay-anual.pay-plan { animation: none; }
}
#mic-fix-reload[hidden] { display: none !important; }

/* Coroa 3D girando (02/11): maior, saindo um pouco para fora do botão */
.coroa3d { display: block; animation: coroaGira 3.2s linear infinite; filter: drop-shadow(0 4px 6px rgba(120, 40, 0, .5)) drop-shadow(0 0 10px rgba(255, 220, 90, .8)); }
@keyframes coroaGira {
  0% { transform: perspective(300px) translateY(0) rotateY(0deg); }
  50% { transform: perspective(300px) translateY(-4px) rotateY(180deg); }
  100% { transform: perspective(300px) translateY(0) rotateY(360deg); }
}
#buy-pulse .bp-ico { width: 46px; height: 46px; margin: -26px -2px -10px -6px; background: none; border: 0; box-shadow: none; animation: none; overflow: visible; }
#buy-pulse .bp-ico .coroa3d { width: 64px; height: 64px; margin: -9px; }
#buy-pulse.buy-pulse { padding-left: 16px; }
#pay-anual.pay-plan b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pay-coroa { width: 62px; height: 62px; margin: -26px -2px -12px -10px; }

/* Botão "Liberar o plano anual" da tela inicial com a coroa 3D */
#menu-buy { display: flex; align-items: center; justify-content: center; gap: 8px; overflow: visible; }
#menu-buy[hidden] { display: none; }
.menu-coroa { width: 52px; height: 52px; margin: -18px -4px -14px -8px; flex: none; }

/* Barra de baixo com ícones 3D (02/11) */
.tabs button i:has(.tab3d) { background: none !important; border: 0 !important; box-shadow: none !important; overflow: visible; width: 38px; height: 34px; }
.tab3d { width: 44px; height: 44px; margin-top: -8px; filter: drop-shadow(0 3px 4px rgba(5, 2, 25, .55)); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), filter .2s; }
.tabs button:not(.active) .tab3d { opacity: .82; transform: scale(.9); }
.tabs button.active .tab3d { transform: scale(1.18); filter: drop-shadow(0 0 10px rgba(253, 224, 71, .85)) drop-shadow(0 3px 4px rgba(5, 2, 25, .55)); }
@media (prefers-reduced-motion: reduce) { .tab3d { transition: none; } }

/* Excluir conta: só um texto discreto no fim da tela "Eu" (exigido pela LGPD, sem chamar atenção) */
.del-wrap { margin: 28px 0 8px; text-align: center; }
.del-text { background: none; border: 0; padding: 4px; font: inherit; font-size: .78rem; color: var(--muted); opacity: .6; text-decoration: underline; cursor: pointer; }

/* Barra de baixo flutuante (02/11): bolha de vidro com cantos arredondados, solta das bordas do celular */
nav.tabs {
  left: 12px !important; right: 12px !important; bottom: calc(8px + env(safe-area-inset-bottom)) !important;
  max-width: 520px; margin: 0 auto; height: 66px !important; padding: 0 6px !important;
  justify-content: space-evenly; align-items: center !important;
  border-radius: 28px; border: 1px solid rgba(255, 255, 255, .22) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04) 45%), rgba(28, 16, 80, .78) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -2px 6px rgba(0, 0, 0, .25), 0 10px 28px rgba(5, 2, 25, .55), 0 0 0 1px rgba(124, 92, 255, .25);
}
nav.tabs button { flex: 1 1 0 !important; max-width: 120px; padding: 4px 2px !important; }
/* Telas travadas: a barra continua no fim da coluna, mas como bolha com margem */
body.fit > nav.tabs { left: auto !important; right: auto !important; bottom: auto !important; width: auto !important; margin: 0 12px calc(8px + env(safe-area-inset-bottom)) !important; align-self: stretch; }
@media (min-width: 560px) { body.fit > nav.tabs { width: 100% !important; max-width: 520px; align-self: center; } }
body { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
/* Botão amarelo um pouco mais alto, nunca encosta na bolha */
#buy-pulse.buy-pulse { bottom: calc(102px + env(safe-area-inset-bottom)); }
body.has-buy main { padding-bottom: 120px; }

/* Mascote novo (02/11): foto do aluno dentro do visor do capacete novo */
.astro-img[data-pose="idle"] { --fx: 45.1%; --fy: 26.3%; --fw: 40.5%; --fh: 32.3%; }
.astro-img[data-pose="win"] { --fx: 49.6%; --fy: 23.8%; --fw: 35.7%; --fh: 28.2%; }
.astro-img[data-pose="miss"] { --fx: 46.1%; --fy: 25%; --fw: 39.2%; --fh: 31.1%; }
.astro-img[data-pose="sing"] { --fx: 47.8%; --fy: 24.3%; --fw: 38.8%; --fh: 31.3%; }
/* 02/11 (Leonardo): o rosto preenche o visor inteiro, como se o aluno vestisse o capacete.
   A foto já vem recortada no rosto (js/facecrop.js) e estica para ocupar todo o vidro */
.astro-img:not(.old) .astro-face { background-size: 100% 100%; background-position: center; border-radius: 50%; }
.astro-img:not(.old) .astro-face::after { background: radial-gradient(ellipse 40% 22% at 30% 20%, rgba(255, 255, 255, .45), transparent 70%), radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(30, 0, 80, .55) 100%); }
/* Se o novo não carregar e cair no antigo, volta o visor do antigo */
.astro-img.old[data-pose="idle"] { --fx: 50%; --fy: 32.5%; --fw: 35%; --fh: 27%; }
.astro-img.old[data-pose="win"] { --fx: 51%; --fy: 34%; --fw: 34%; --fh: 26%; }
.astro-img.old[data-pose="miss"] { --fx: 50.5%; --fy: 34%; --fw: 33%; --fh: 25%; }
.astro-img.old[data-pose="sing"] { --fx: 38.5%; --fy: 32%; --fw: 34%; --fh: 27%; }
.astro-mini3d { display: block; width: 100%; height: 100%; object-fit: contain; }
.me .astro-mini3d { width: 88%; height: 88%; margin: 6% auto 0; }
#acc-plans { display: inline-flex; align-items: center; gap: 6px; overflow: visible; }
#acc-plans[hidden] { display: none; }
.gp-coroa { display: inline-block; vertical-align: middle; width: 26px; height: 26px; margin: -8px 2px -6px 0; }

/* Tela inicial (02/11): afinador em marca d'água atrás do astronauta, a linha da voz chegando no centro verde */
.menu-stage { isolation: isolate; width: 100%; align-self: stretch; }
.menu-tuner { position: absolute; left: 0; top: 2%; width: 100%; height: 88%; z-index: 0; opacity: .6; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent), linear-gradient(180deg, transparent, #000 15%, #000 85%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent), linear-gradient(180deg, transparent, #000 15%, #000 85%, transparent); mask-composite: intersect; }
.menu-tuner .mt-grid line { stroke: rgba(255, 255, 255, .14); stroke-width: 1.5; stroke-dasharray: 6 8; }
.menu-tuner .mt-band { fill: rgba(52, 211, 153, .22); stroke: rgba(52, 211, 153, .55); stroke-width: 1.5; }
.menu-tuner .mt-center { stroke: #34d399; stroke-width: 2; opacity: .7; }
.menu-tuner .mt-notes text { fill: rgba(255, 255, 255, .35); font: 700 13px var(--fun, sans-serif); }
.menu-tuner .mt-pitch { fill: none; stroke: #7df9ff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(125, 249, 255, .9));
  stroke-dasharray: 100; stroke-dashoffset: 100; animation: mtDraw 4.5s linear infinite; }
.menu-tuner .mt-dot { fill: #fff; filter: drop-shadow(0 0 8px #7df9ff); }
@keyframes mtDraw { 0% { stroke-dashoffset: 100; opacity: 1; } 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.menu-astro, .menu-plat { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .menu-tuner .mt-pitch { animation: none; stroke-dashoffset: 0; } .menu-tuner .mt-dot { display: none; } }

/* 02/11: no iPhone a barra de baixo se soltava e ia para o meio da tela ao rolar a página.
   No app a página não rola mais: quem rola é o corpo, por dentro. A barra fica fixa no
   rodapé do aparelho e nunca sai do lugar (efeito de vidro mantido). */
html.app-scroll { height: 100%; overflow: hidden; }
html.app-scroll body:not(.fit) { height: 100%; box-sizing: border-box; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: none; }

/* Fim do teste grátis (03/11): tela de conquista com a nota real, lista curta e botão grande */
.pay-list { list-style: none; padding: 0; grid-template-columns: 1fr; gap: 6px; }
.pay-list li {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; font-weight: 700; font-size: .98rem; line-height: 1.25;
  background: linear-gradient(135deg, rgba(255, 224, 102, .14), rgba(168, 85, 247, .12)); border: 1px solid rgba(255, 224, 102, .3);
}
.pay-list li img { width: 22px; height: 22px; flex: none; }
body.pay-trial #paywall h2 { font-size: 1.6rem !important; background: linear-gradient(90deg, #fde68a, #fff 50%, #fde68a); -webkit-background-clip: text; background-clip: text; color: transparent; animation: payTitle 2.4s ease-in-out infinite; }
@keyframes payTitle { 50% { filter: drop-shadow(0 0 10px rgba(253, 224, 71, .7)); } }
body.pay-trial #pay-anual.pay-plan b { white-space: normal; font-size: 1.2rem !important; line-height: 1.2; }
body.pay-trial #pay-anual .pay-val, body.pay-trial #pay-anual small, body.pay-trial #pay-anual .pay-tag { display: none; }
.pay-terms { margin: 2px 0 4px; font-weight: 800; font-size: .95rem; color: #fde68a; }
.pay-terms[hidden] { display: none; }
.pay-later { display: block; margin: 2px auto 0; padding: 8px 18px; background: none; border: 0; color: var(--muted, #a5a3c8); font: inherit; font-size: .9rem; text-decoration: underline; cursor: pointer; }
.pay-later[hidden] { display: none; }
.pay-bonus { display: grid; gap: 2px; text-align: center; margin: 6px 0 0; padding: 8px 12px; border-radius: 14px; border: 1px dashed rgba(74, 222, 128, .6); background: rgba(74, 222, 128, .1); font-size: .9rem; }
.pay-bonus[hidden] { display: none; }
.pay-bonus time { font-weight: 900; font-variant-numeric: tabular-nums; color: #86efac; }
body.pay-trial #paywall .pay-check { background: none; border: 1px solid rgba(255, 255, 255, .18); font-size: .85rem; padding: 7px; }
@media (max-height: 700px) { .pay-list li { padding: 6px 10px; font-size: .9rem; } body.pay-trial #paywall h2 { font-size: 1.35rem !important; } }
@media (prefers-reduced-motion: reduce) { body.pay-trial #paywall h2 { animation: none; } }
/* Celular baixinho: o mascote sai para a lista e o botão caberem sem rolar */
@media (max-height: 760px) { body.pay-trial #pay-mascot { display: none; } }
@media (max-height: 680px) {
  .pay-list { gap: 4px; margin: 4px 0; }
  .pay-list li { padding: 4px 10px; font-size: .84rem; }
  body.pay-trial #paywall h2 { font-size: 1.2rem !important; }
  body.pay-trial #paywall #pay-text { font-size: .88rem !important; line-height: 1.3 !important; }
  body.pay-trial #pay-anual.pay-plan { margin: 6px 2px 4px !important; }
}
