/* =====================================================================
   AURA+ | Estilo principal  —  neon roxo / azul / rosa
   ===================================================================== */
:root{
  --bg:#07060d;
  --bg-soft:#0d0b18;
  --surface:#14111f;
  --surface-2:#1c1830;
  --text:#f3f0ff;
  --muted:#9b93b8;
  --purple:#b14bff;
  --blue:#4d7cff;
  --pink:#ff4fd8;
  --aura:linear-gradient(120deg,var(--purple),var(--blue),var(--pink));
  --aura-soft:linear-gradient(120deg,#b14bff33,#4d7cff33,#ff4fd833);
  --nav-h:64px;
  --radius:18px;
  --shadow-glow:0 0 22px #7a5cff55;
  font-family:'Poppins','Segoe UI',system-ui,sans-serif;
}

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{
  background:var(--bg);color:var(--text);
  overflow:hidden;overscroll-behavior:none;
  -webkit-font-smoothing:antialiased;
}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}
a{color:inherit;text-decoration:none}

/* ---- Fundo neon animado (suave) ----------------------------------- */
.aura-bg{position:fixed;inset:0;z-index:-1;overflow:hidden;background:var(--bg)}
.aura-bg span{
  position:absolute;border-radius:50%;filter:blur(70px);opacity:.40;
  animation:drift 22s ease-in-out infinite alternate;
}
.aura-bg span:nth-child(1){width:48vw;height:48vw;background:var(--purple);top:-10%;left:-8%}
.aura-bg span:nth-child(2){width:42vw;height:42vw;background:var(--blue);bottom:-12%;right:-6%;animation-delay:-7s}
.aura-bg span:nth-child(3){width:38vw;height:38vw;background:var(--pink);top:35%;left:40%;animation-delay:-13s}
@keyframes drift{
  0%{transform:translate(0,0) scale(1)}
  50%{transform:translate(6%,-5%) scale(1.12)}
  100%{transform:translate(-5%,7%) scale(.96)}
}
@media (prefers-reduced-motion: reduce){
  .aura-bg span{animation:none}
}

/* ---- App shell ----------------------------------------------------- */
#app{height:100dvh;display:flex;flex-direction:column;max-width:520px;margin:0 auto;position:relative}

/* ---- Top bar ------------------------------------------------------- */
.topbar{
  position:absolute;top:0;left:0;right:0;z-index:30;
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 16px;
  background:linear-gradient(180deg,#000000aa,transparent);
}
.topbar .logo{height:30px}
.tabs{display:flex;gap:18px;font-weight:600;font-size:15px}
.tabs button{color:var(--muted);position:relative;padding:4px 2px}
.tabs button.active{color:#fff}
.tabs button.active::after{
  content:"";position:absolute;left:0;right:0;bottom:-4px;height:3px;border-radius:3px;
  background:var(--aura);box-shadow:var(--shadow-glow);
}

/* ---- Feed vertical estilo TikTok ---------------------------------- */
.feed{
  flex:1;overflow-y:scroll;scroll-snap-type:y mandatory;
  scrollbar-width:none;
}
.feed::-webkit-scrollbar{display:none}
.slide{
  height:100dvh;scroll-snap-align:start;scroll-snap-stop:always;
  position:relative;display:flex;align-items:center;justify-content:center;
  background:var(--bg-soft);
}
.slide video{width:100%;height:100%;object-fit:cover;background:#000}

/* overlay de info do vídeo */
.slide .meta{
  position:absolute;left:16px;right:80px;bottom:calc(var(--nav-h) + 18px);z-index:5;
  text-shadow:0 1px 8px #000a;
}
.slide .meta .author{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.slide .meta .author img{width:42px;height:42px;border-radius:50%;border:2px solid #fff;object-fit:cover}
.slide .meta .author b{font-size:15px}
.slide .meta p{font-size:14px;color:#e8e3ff;line-height:1.35}

/* ações laterais (curtir, comentar, compartilhar) */
.actions{
  position:absolute;right:12px;bottom:calc(var(--nav-h) + 26px);z-index:6;
  display:flex;flex-direction:column;gap:20px;align-items:center;
}
.actions button{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:12px;color:#fff}
.actions .ico{
  width:48px;height:48px;border-radius:50%;display:grid;place-items:center;
  background:#ffffff14;backdrop-filter:blur(6px);font-size:22px;transition:transform .15s;
}
.actions button:active .ico{transform:scale(.85)}
.actions .liked .ico{background:var(--aura);box-shadow:var(--shadow-glow)}

/* badge de campeonato / aura */
.champ-badge{
  position:absolute;top:64px;left:16px;z-index:6;
  background:var(--aura-soft);border:1px solid #ffffff30;backdrop-filter:blur(8px);
  padding:6px 12px;border-radius:999px;font-size:12px;font-weight:600;
  display:flex;align-items:center;gap:6px;
}

/* ---- Bottom nav com + central ------------------------------------- */
.bottomnav{
  position:absolute;left:0;right:0;bottom:0;z-index:40;height:var(--nav-h);
  display:flex;align-items:center;justify-content:space-around;
  background:#0a0814ee;backdrop-filter:blur(14px);
  border-top:1px solid #ffffff10;
}
.bottomnav button{
  display:flex;flex-direction:column;align-items:center;gap:3px;
  font-size:10px;color:var(--muted);flex:1;height:100%;justify-content:center;
}
.bottomnav button.active{color:#fff}
.bottomnav .nav-ico{font-size:21px}
.bottomnav .plus{
  flex:0 0 auto;width:56px;height:42px;border-radius:14px;
  background:var(--aura);background-size:200% 200%;animation:shift 6s ease infinite;
  display:grid;place-items:center;font-size:28px;color:#fff;font-weight:300;
  box-shadow:var(--shadow-glow);transform:translateY(-6px);
}
@keyframes shift{0%{background-position:0 50%}50%{background-position:100% 50%}100%{background-position:0 50%}}

/* ---- Telas (perfil, chat, ranking, campeonatos) ------------------- */
.screen{
  position:absolute;inset:0;z-index:35;background:var(--bg);
  overflow-y:auto;padding:70px 18px calc(var(--nav-h) + 24px);
  display:none;
}
.screen.show{display:block;animation:fade .25s ease}
@keyframes fade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.screen h2{font-size:22px;margin-bottom:16px}
.screen h2 .grad{background:var(--aura);-webkit-background-clip:text;background-clip:text;color:transparent}

/* grids e cards */
.video-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.video-grid .cell{aspect-ratio:9/16;border-radius:10px;overflow:hidden;position:relative;background:var(--surface)}
.video-grid .cell video,.video-grid .cell img{width:100%;height:100%;object-fit:cover}
.video-grid .cell .lk{position:absolute;left:6px;bottom:6px;font-size:11px;text-shadow:0 1px 4px #000}

.card{background:var(--surface);border:1px solid #ffffff0d;border-radius:var(--radius);padding:16px;margin-bottom:12px}
.champ-card .cover{height:120px;border-radius:12px;background:var(--aura-soft);margin-bottom:12px;display:grid;place-items:center;font-size:34px}
.champ-card .prize{color:var(--pink);font-weight:600;font-size:13px}
.timer{font-size:12px;color:var(--muted)}

/* ranking */
.rank-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #ffffff0d}
.rank-row .pos{width:34px;font-weight:700;text-align:center;font-size:16px}
.rank-row .pos.top{background:var(--aura);-webkit-background-clip:text;background-clip:text;color:transparent}
.rank-row img{width:44px;height:44px;border-radius:50%;object-fit:cover}
.rank-row .lk{margin-left:auto;font-weight:600;color:var(--pink)}

/* perfil */
.profile-head{text-align:center;margin-bottom:18px}
.profile-head img{width:90px;height:90px;border-radius:50%;border:3px solid transparent;
  background:var(--aura) border-box;object-fit:cover}
.profile-head .ava-ring{display:inline-grid;place-items:center;padding:3px;border-radius:50%;background:var(--aura)}
.profile-head .ava-ring img{border:3px solid var(--bg)}
.aura-pill{display:inline-flex;gap:6px;align-items:center;margin-top:8px;
  padding:6px 14px;border-radius:999px;background:var(--aura-soft);border:1px solid #ffffff20;font-weight:600}
.stat-row{display:flex;justify-content:center;gap:26px;margin-top:14px}
.stat-row .s b{display:block;font-size:18px}.stat-row .s span{font-size:11px;color:var(--muted)}

/* chat */
.chat-item{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #ffffff0d}
.chat-item img{width:46px;height:46px;border-radius:50%;object-fit:cover}
.chat-item .last{font-size:12px;color:var(--muted)}
.chat-thread{position:absolute;inset:0;background:var(--bg);z-index:50;display:none;flex-direction:column}
.chat-thread.show{display:flex}
.chat-thread .msgs{flex:1;overflow-y:auto;padding:70px 14px 14px;display:flex;flex-direction:column;gap:8px}
.bubble{max-width:75%;padding:9px 13px;border-radius:16px;font-size:14px;line-height:1.3}
.bubble.me{align-self:flex-end;background:var(--aura);color:#fff;border-bottom-right-radius:4px}
.bubble.them{align-self:flex-start;background:var(--surface-2);border-bottom-left-radius:4px}
.chat-input{display:flex;gap:8px;padding:10px;border-top:1px solid #ffffff10;background:var(--bg-soft)}
.chat-input input{flex:1}

/* ---- Inputs / botões ---------------------------------------------- */
input,textarea,select{
  width:100%;background:var(--surface-2);border:1px solid #ffffff14;border-radius:12px;
  padding:13px 14px;color:var(--text);font-size:15px;outline:none;
}
input:focus,textarea:focus{border-color:var(--purple);box-shadow:0 0 0 3px #b14bff33}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;
  padding:14px;border-radius:14px;font-weight:600;font-size:15px;
  background:var(--aura);background-size:200% 200%;animation:shift 6s ease infinite;color:#fff;
  box-shadow:var(--shadow-glow);
}
.btn:active{transform:translateY(1px)}
.btn.ghost{background:none;border:1px solid #ffffff22;box-shadow:none;animation:none}
.field{margin-bottom:12px}
.field label{display:block;font-size:13px;color:var(--muted);margin-bottom:6px}

/* ---- Modais -------------------------------------------------------- */
.modal-backdrop{
  position:fixed;inset:0;z-index:100;background:#000b;backdrop-filter:blur(4px);
  display:none;align-items:flex-end;justify-content:center;
}
.modal-backdrop.show{display:flex}
.modal{
  width:100%;max-width:520px;background:var(--surface);
  border-radius:24px 24px 0 0;padding:24px 20px calc(24px + env(safe-area-inset-bottom));
  border-top:1px solid #ffffff14;animation:up .3s cubic-bezier(.2,.8,.2,1);
  max-height:88dvh;overflow-y:auto;
}
@keyframes up{from{transform:translateY(100%)}to{transform:none}}
.modal h3{font-size:20px;margin-bottom:6px}
.modal .sub{color:var(--muted);font-size:14px;margin-bottom:18px}
.modal .logo-c{display:grid;place-items:center;margin-bottom:14px}
.modal .logo-c img{height:46px}
.switch-link{text-align:center;margin-top:14px;color:var(--muted);font-size:14px}
.switch-link b{color:var(--purple)}
.seg{display:flex;background:var(--surface-2);border-radius:12px;padding:4px;margin-bottom:14px}
.seg button{flex:1;padding:9px;border-radius:9px;font-size:13px;color:var(--muted);font-weight:600}
.seg button.active{background:var(--aura);color:#fff}

/* gate pop-up destaque */
.gate .ring{width:74px;height:74px;border-radius:50%;margin:0 auto 14px;
  background:var(--aura);display:grid;place-items:center;font-size:34px;box-shadow:var(--shadow-glow)}

/* comentários */
.comment{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid #ffffff0d}
.comment img{width:36px;height:36px;border-radius:50%;object-fit:cover}
.comment .b{font-size:13px}.comment .b b{font-size:13px}
.comment .t{font-size:14px;color:#e8e3ff;margin-top:2px}

/* anúncio overlay */
.ad-overlay{position:absolute;inset:0;z-index:60;background:#000;display:none;flex-direction:column}
.ad-overlay.show{display:flex}
.ad-overlay video,.ad-overlay img{flex:1;width:100%;object-fit:contain}
.ad-overlay .ad-bar{display:flex;align-items:center;justify-content:space-between;padding:12px 16px}
.ad-tag{font-size:11px;background:#ffffff22;padding:3px 8px;border-radius:6px}
.ad-skip{font-size:13px;color:var(--muted)}

.toast{position:fixed;bottom:calc(var(--nav-h) + 16px);left:50%;transform:translateX(-50%);
  background:var(--surface-2);border:1px solid #ffffff20;padding:11px 18px;border-radius:12px;
  font-size:14px;z-index:200;opacity:0;transition:opacity .2s;pointer-events:none}
.toast.show{opacity:1}

.empty{text-align:center;color:var(--muted);padding:50px 20px}
.empty .ico{font-size:42px;margin-bottom:10px;opacity:.6}
.loading{text-align:center;padding:40px;color:var(--muted)}
