/* Login/cadastro (estilo Netflix), seletor de avatar, logo e splash */

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; }
.logo img { height: 30px; width: auto; display: block; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .6)); }
.brand-corner { position: fixed; top: 1.2rem; left: var(--pad); height: 34px; width: auto; z-index: 10; }

/* ---------- avatares (foto, galeria ou emoji) ---------- */
.av-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.p-av { overflow: hidden; }
.p-av .av-img { border-radius: 0; }
.nav-avatar { overflow: hidden; padding: 0; }
.pm-av { overflow: hidden; }

/* ---------- login ---------- */
body[data-view="login"] { background: #000; }
.view-auth { position: relative; min-height: 100vh; min-height: 100dvh; display: block; padding: 0; }
.auth-bg { position: fixed; inset: 0; overflow: hidden; background: #000; z-index: 0; }
.auth-wall {
  position: absolute; inset: -35% -25%; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
  transform: rotate(-9deg) scale(1.1); opacity: .95; animation: wall-drift 90s linear infinite alternate; will-change: transform;
}
@keyframes wall-drift { from { transform: rotate(-9deg) scale(1.1) translate3d(0, 0, 0); } to { transform: rotate(-9deg) scale(1.1) translate3d(-3%, -4%, 0); } }
.wall-tile { position: relative; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; }
.wt-ghost { position: absolute; right: 8px; top: 6px; font-family: var(--font-display); font-size: 3.4rem; color: rgba(255, 255, 255, .16); line-height: 1; }
.wt-name { position: absolute; left: 10px; bottom: 10px; right: 10px; font-weight: 700; font-size: .95rem; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.auth-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .85) 0, rgba(0, 0, 0, .3) 28%, rgba(0, 0, 0, .4) 62%, rgba(0, 0, 0, .92) 100%),
    radial-gradient(70% 60% at 50% 50%, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6));
}
.auth-top { position: relative; z-index: 2; padding: 1.4rem var(--pad); }
.auth-top .brand { height: clamp(34px, 5vw, 46px); width: auto; display: block; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .7)); }
.auth-main { position: relative; z-index: 2; display: grid; place-items: start center; padding: .5rem 1rem 4rem; }
.auth-card {
  width: min(450px, 100%); background: rgba(0, 0, 0, .74); border-radius: 8px; padding: clamp(1.6rem, 5vw, 3.6rem) clamp(1.4rem, 5vw, 4rem) clamp(2rem, 5vw, 4rem);
  display: grid; gap: 1rem; backdrop-filter: blur(3px); animation: card-in .5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.auth-card h1 { font-size: 2rem; font-weight: 700; margin-bottom: .4rem; }
.step-kicker { color: var(--muted); font-size: .75rem; letter-spacing: .14em; font-weight: 700; }
.perks { list-style: none; display: grid; gap: .5rem; margin: -.2rem 0 .4rem; }
.perks li { display: flex; gap: .6rem; align-items: flex-start; color: #d6d6d6; font-size: .92rem; line-height: 1.35; }
.perks svg { color: var(--accent-2); font-size: 1.25rem; margin-top: .05rem; }

.fl { position: relative; display: block; }
.fl-input {
  width: 100%; height: 56px; padding: 1.5rem 4.4rem .45rem 1rem; background: rgba(22, 22, 22, .72); color: #fff;
  border: 1px solid #8c8c8c; border-radius: 4px; font-size: 1rem; transition: border-color .15s, background .15s;
}
.fl-input:hover { border-color: #b3b3b3; }
.fl-input:focus { outline: none; border-color: #fff; background: rgba(32, 32, 32, .9); }
.fl span { position: absolute; left: 1rem; top: 1.05rem; color: #9a9a9a; font-size: 1rem; pointer-events: none; transition: all .15s ease; }
.fl-input:focus + span, .fl-input:not(:placeholder-shown) + span { top: .48rem; font-size: .72rem; }
.fl-eye { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); padding: .5rem .7rem; color: #b3b3b3; font-size: .82rem; }
.fl-eye:hover { color: #fff; }
.hint { margin-top: -.4rem; }
.btn-netflix {
  height: 48px; border-radius: 4px; background: var(--accent); color: #fff; font-weight: 700; font-size: 1rem; margin-top: .6rem;
  transition: background .15s, transform .1s;
}
.btn-netflix:hover { background: #c11119; }
.btn-netflix:active { transform: scale(.985); }
.btn-netflix:disabled { opacity: .6; cursor: progress; }
.auth-switch { margin-top: 1rem; font-size: .95rem; }
.link-btn.strong { color: #fff; font-weight: 700; display: inline; }

@media (max-width: 740px) {
  .auth-wall { opacity: .4; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .auth-card { background: rgba(0, 0, 0, .55); backdrop-filter: none; padding-inline: 1.2rem; }
  .auth-main { padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .auth-wall { animation: none; } .auth-card { animation: none; } }

/* ---------- seletor de avatar (foto + galeria) ---------- */
.ap { display: grid; gap: .9rem; }
.ap-top { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.ap-preview {
  width: 112px; height: 112px; border-radius: 10px; overflow: hidden; flex: none; display: grid; place-items: center; font-size: 3.4rem;
  background: linear-gradient(135deg, #e4202c, #7b0b12); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); border: 2px solid rgba(255, 255, 255, .85);
}
.ap-actions { display: grid; gap: .45rem; justify-items: start; }
.ap-upload { padding: .55rem 1.1rem; font-size: .95rem; }
.ap-upload svg { font-size: 1.3em; margin-left: -.2rem; }
.ap-or { color: var(--muted); font-size: .85rem; }
.ap-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; }
.ap-item { aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 3px solid transparent; transition: transform .12s, border-color .12s; padding: 0; }
.ap-item:hover { transform: scale(1.06); }
.ap-item.on { border-color: #fff; transform: scale(1.04); }
@media (max-width: 480px) { .ap-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- splash (tela de abertura) ---------- */
#splash {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; justify-items: center; gap: 1.8rem;
  background: radial-gradient(60% 55% at 50% 42%, #2a0c18 0%, #0a0612 55%, #04030a 100%); transition: opacity .55s ease, visibility .55s;
}
#splash.out { opacity: 0; visibility: hidden; }
#splash img { width: min(62vw, 330px); height: auto; animation: splash-in .9s cubic-bezier(.2, .8, .2, 1) both, splash-pulse 2.4s ease-in-out .9s infinite; }
.splash-bar { width: min(46vw, 190px); height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 40%; border-radius: 3px; background: var(--accent, #e4202c); animation: splash-bar 1.2s ease-in-out infinite; }
@keyframes splash-in { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
@keyframes splash-pulse { 0%, 100% { filter: drop-shadow(0 0 18px rgba(255, 90, 40, .25)); } 50% { filter: drop-shadow(0 0 34px rgba(255, 90, 40, .55)); } }
@keyframes splash-bar { 0% { transform: translateX(-110%); } 100% { transform: translateX(270%); } }
@media (prefers-reduced-motion: reduce) { #splash img, .splash-bar i { animation: none; } }
