/* Tela inicial do APP de celular (templates/app_inicio.html, rota /app). Feita para celular DEITADO
   (~640-900 x 320-430 px); funciona em pé e no PC. Escuro sempre (é a "porta" do jogo). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fontes/inter-latin-var.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fontes/chakra-petch-latin-700.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --texto: #fff4ea; --texto-2: #e3cdbf; --texto-3: #b8a197;
  --brand: #ff6a13; --brand-2: #ff9a1f; --brand-3: #f0442a;
  --vidro: rgba(16, 7, 5, .66); --borda: rgba(255, 178, 61, .32);
  --ok: #34d399; --erro: #f87171;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.app { background: #120806; color: var(--texto); overflow: hidden;
  font: 15px/1.4 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent; }

/* arte do jogo (já traz o logo NARUTO LEGAXY à esquerda) + escurecido para o cartão da direita ler bem */
.app-fundo { position: fixed; inset: 0; z-index: 0; }
.app-fundo img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 35%; display: block; }
.app-fundo::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(18, 8, 6, 0) 30%, rgba(18, 8, 6, .55) 62%, rgba(18, 8, 6, .85) 100%),
              linear-gradient(0deg, rgba(18, 8, 6, .85) 0%, rgba(18, 8, 6, 0) 26%); }

.app-palco { position: relative; z-index: 1; height: calc(100% - 44px); display: flex; flex-direction: column;
  align-items: flex-end; justify-content: center; gap: 10px;
  padding: max(12px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 6px max(18px, env(safe-area-inset-left)); }

.app-cartao, .app-novidades { width: min(360px, 46vw); background: var(--vidro); border: 1px solid var(--borda);
  border-radius: 18px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .8); }
.app-cartao { padding: 16px 18px 12px; display: grid; gap: 10px; }
.app-ola { margin: 0; color: var(--texto-2); font-size: 14.5px; }
.app-ola b { color: var(--texto); }
.app-cartao form { margin: 0; }

.app-jogar { display: flex; align-items: center; justify-content: center; width: 100%; height: 60px; border: 0;
  border-radius: 14px; cursor: pointer; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand) 55%, var(--brand-3));
  font: 700 24px/1 "Chakra Petch", "Inter", sans-serif; letter-spacing: .08em;
  box-shadow: 0 10px 26px -8px rgba(255, 106, 19, .75), inset 0 1px 0 rgba(255, 255, 255, .35);
  animation: app-pulso 2.6s ease-in-out infinite; }
.app-jogar:active { transform: scale(.97); }
@keyframes app-pulso { 0%, 100% { box-shadow: 0 10px 26px -8px rgba(255, 106, 19, .75), inset 0 1px 0 rgba(255,255,255,.35); }
  50% { box-shadow: 0 10px 34px -4px rgba(255, 140, 40, .95), inset 0 1px 0 rgba(255,255,255,.35); } }
@media (prefers-reduced-motion: reduce) { .app-jogar { animation: none; } }

.app-secundario { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 12px;
  text-decoration: none; color: var(--texto); border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .06); font: 700 15px/1 "Chakra Petch", "Inter", sans-serif; letter-spacing: .06em; }
.app-secundario:active { background: rgba(255, 255, 255, .14); }
.app-recarregar { border-color: rgba(255, 183, 3, .55); color: #ffd36b; background: rgba(255, 183, 3, .08); }

.app-link { background: none; border: 0; padding: 4px 0; color: var(--brand-2); font: inherit; font-size: 13.5px;
  cursor: pointer; text-decoration: none; }
.app-trocar { justify-self: center; }

.app-status { margin: 2px 0 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--texto-2); }
.app-status b { color: var(--texto); }
.app-ponto { width: 9px; height: 9px; border-radius: 50%; background: var(--texto-3); flex: none; }
.app-status-online .app-ponto { background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); }
.app-status-offline .app-ponto { background: var(--erro); }

.app-aviso { margin: 0; padding: 8px 10px; border-radius: 10px; font-size: 13px; color: #fde68a;
  background: rgba(251, 191, 36, .12); border: 1px solid rgba(251, 191, 36, .35); }
.app-versao { margin: -4px 0 0; font-size: 12.5px; color: var(--texto-3); }
.app-versao .app-link { font-size: 12.5px; padding: 6px 0; }
.app-novidades { padding: 10px 16px 8px; }
.app-novidades h2 { margin: 0 0 6px; font: 700 13px/1 "Chakra Petch", "Inter", sans-serif; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand-2); }
.app-novidades ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.app-novidades li { font-size: 13px; line-height: 1.3; color: var(--texto); display: -webkit-box;
  -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.app-tipo { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 6px; font-size: 10.5px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: rgba(255, 255, 255, .12); }
.app-tipo-correcao { background: rgba(52, 211, 153, .2); color: #a7f3d0; }
.app-tipo-novidade { background: rgba(255, 154, 31, .22); color: #fed7aa; }
.app-tipo-melhoria { background: rgba(56, 189, 248, .2); color: #bae6fd; }

.app-rodape { position: fixed; z-index: 1; left: 0; right: 0; bottom: 0; height: 44px; display: flex;
  align-items: center; justify-content: flex-end; gap: 20px;
  padding: 0 max(18px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(18px, env(safe-area-inset-left)); }
.app-rodape a { color: var(--texto-2); text-decoration: none; font-size: 13px; padding: 8px 0; }
.app-rodape a:active { color: var(--texto); }

a:focus-visible, button:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }

/* celular deitado BAIXO (ex.: 360 px de altura): esconde as novidades, o JOGAR continua grande */
@media (max-height: 380px) { .app-novidades { display: none; } }
/* em pé: cartão embaixo, largura toda */
@media (orientation: portrait) {
  .app-fundo img { object-fit: contain; object-position: 50% 6%; }
  .app-fundo::after { background: linear-gradient(0deg, rgba(18, 8, 6, 1) 0%, rgba(18, 8, 6, .4) 55%, rgba(18, 8, 6, 0) 75%); }
  .app-palco { justify-content: flex-start; align-items: stretch; padding-top: calc(6vh + 50vw); padding-bottom: 8px; }
  .app-cartao, .app-novidades { width: 100%; }
  .app-rodape { justify-content: center; }
}
