/* 2026-10-20 • /app igual ao login do app Android:
   fundo cósmico + arte do personagem + botão "Entrar como administrador" elétrico + EQUIPE no topo.
   Medidas da arte em % (mesmas do LoginScreen.kt): arte 1059x1642. */
body.hero-login {
  display: block;
  padding: 0;
  background: #050814;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ---------- Fundo ---------- */
.hero-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #050814 url("/img/login/login_cosmos.jpg") center / cover no-repeat;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 35%, transparent 40%, rgba(2, 4, 12, .55) 100%);
}
#heroStars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }

/* ---------- Arte (tamanho/posição calculados pelo auth-hero.js) ---------- */
.hero-stage {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: var(--hero-top, 0px);
  width: var(--hero-w, min(100vw, 520px));
  height: var(--hero-h, auto);
  transform: translateX(-50%);
  animation: heroIn .6s ease-out both;
}
@keyframes heroIn { from { opacity: 0; transform: translateX(-50%) scale(.985); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
.hero-art {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
#heroFx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Área de toque exatamente sobre "Entrar como administrador" da arte. */
.hero-admin-hit {
  position: absolute;
  left: 10.8%;
  top: 69.67%;
  width: 78.1%;
  height: 13.83%;
  border: 0;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
  transition: background .15s ease;
}
.hero-admin-hit:hover { background: rgba(251, 216, 93, .06); }
.hero-admin-hit:active { background: rgba(251, 216, 93, .16); }
.hero-admin-hit:focus-visible { outline: 3px solid #fbd85d; outline-offset: 3px; }

/* ---------- EQUIPE no topo ---------- */
.equipe-top {
  position: fixed;
  z-index: 5;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background:
    linear-gradient(rgba(11, 18, 32, .86), rgba(11, 18, 32, .86)) padding-box,
    linear-gradient(110deg, #6366f1, #38bdf8, #ffffff, #6366f1, #38bdf8) border-box;
  background-size: 100% 100%, 300% 100%;
  color: #fff;
  font: 900 .9rem 'Outfit', sans-serif;
  letter-spacing: .14em;
  cursor: pointer;
  animation: equipeSweep 2.6s linear infinite, equipeHalo 2.2s ease-in-out infinite;
  transition: transform .12s ease;
}
.equipe-top i { color: #a5b4fc; font-size: 1rem; }
.equipe-top:active { transform: scale(.94); }
.equipe-top:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 3px; }
@keyframes equipeSweep { from { background-position: 0 0, 0% 0; } to { background-position: 0 0, 300% 0; } }
@keyframes equipeHalo {
  0%, 100% { box-shadow: 0 0 0 4px rgba(99, 102, 241, .14), 0 8px 24px rgba(0, 0, 0, .4); }
  50% { box-shadow: 0 0 0 7px rgba(99, 102, 241, .32), 0 8px 24px rgba(0, 0, 0, .4); }
}

/* ---------- Etapa "administrador": card por cima do card da arte ---------- */
body[data-stage="choice"] .hero-stage .auth-card { display: none; }
body:not([data-stage="choice"]) .hero-admin-hit,
body:not([data-stage="choice"]) #heroFx { display: none; }

.hero-stage .auth-card {
  position: absolute;
  left: 5.5%;
  top: 49.03%;
  width: 88.8%;
  max-width: none;
  min-height: 40.01%;
  max-height: none;
  overflow: visible;
  padding: 18px;
  border-radius: 26px;
  border: 1.2px solid transparent;
  background:
    linear-gradient(#0b1220, #0b1220) padding-box,
    linear-gradient(135deg, #38bdf8, #6366f1, #fbd85d) border-box;
  box-shadow: 0 0 38px rgba(56, 189, 248, .28), 0 24px 60px rgba(0, 0, 0, .5);
  animation: cardIn .28s ease-out both;
}
@keyframes cardIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.hero-stage .auth-card .flow-header { margin-bottom: 14px; }
.hero-stage .auth-card .stage-pill { min-height: 28px; margin-bottom: 10px; font-size: .66rem; }
.hero-stage .auth-card .flow-header h2 { font-size: clamp(1.25rem, 5.4vw, 1.55rem); }
.hero-stage .auth-card .flow-header h2::before {
  content: "♛ ";
  color: #fbd85d;
  animation: crownGlow 1.6s ease-in-out infinite;
}
@keyframes crownGlow { 0%, 100% { opacity: .72; } 50% { opacity: 1; text-shadow: 0 0 12px rgba(251, 216, 93, .7); } }
.hero-stage .auth-card .flow-header p { font-size: .8rem; }
.hero-stage .auth-card .btn-primary { box-shadow: 0 10px 26px rgba(59, 130, 246, .35); }

/* ---------- Aviso de erro e tutorial iPhone ---------- */
body.hero-login .error-box {
  position: fixed;
  z-index: 6;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  transform: translateX(-50%);
  width: min(92vw, 420px);
  margin: 0;
  background: rgba(40, 10, 14, .92);
  backdrop-filter: blur(8px);
}
body.hero-login .ios-install-entry {
  position: fixed;
  z-index: 4;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  transform: translateX(-50%);
  background: rgba(11, 18, 32, .82);
  backdrop-filter: blur(8px);
}
body.hero-login:not([data-stage="choice"]) .ios-install-entry { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .hero-stage, .equipe-top, .hero-stage .auth-card, .hero-stage .auth-card .flow-header h2::before { animation: none; }
}
