@import url("https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600;700&display=swap");

/* =========================================================
   VemBB — visual baseado no Figma
   Cores medidas dos protótipos: nav #482856 · card #d8d8d8 ·
   moldura #c5c5c5 · coração #f43550 · alerta #f14854 ·
   balão enviado #513383 · recebido #2d2c30 · chat #1a191e
   ========================================================= */
:root {
  --vembb-bg: #000000;
  --vembb-panel: #121014;
  --vembb-card: #18141f;
  --vembb-card-2: #221530;
  --vembb-pink: #ff1f6d;
  --vembb-purple: #7b2ff7;
  --vembb-text-dim: #b3aebd;

  --nav: #482856;
  --post: #d8d8d8;
  --post-frame: #c5c5c5;
  --post-ink: #4a2362;
  --heart: #f43550;
  --alert: #f14854;
  --bubble-mine: #513383;
  --bubble-theirs: #2d2c30;
  --chat-bg: #1a191e;
  --info-box: #212121;
  --lilac: #b69cff;
  --online: #22c55e;

  --font-title: "Anton", "Bebas Neue", Impact, "Arial Narrow", sans-serif;
}

* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }

a { color: inherit; text-decoration: none; }

body {
  background: var(--vembb-bg);
  color: #fff;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  margin: 0;
}

.title-font { font-family: var(--font-title); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 400; }

/* ---------- utilitários de marca ---------- */
.gradient-text {
  background: linear-gradient(90deg, var(--vembb-pink), var(--vembb-purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gradient-bg { background: linear-gradient(90deg, var(--vembb-pink), var(--vembb-purple)); }
.gradient-border {
  border: 1px solid transparent;
  background-image: linear-gradient(var(--vembb-card), var(--vembb-card)),
    linear-gradient(90deg, var(--vembb-pink), var(--vembb-purple));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* ---------- estrutura ---------- */
.app-shell {
  max-width: 430px; margin: 0 auto; min-height: 100vh; position: relative;
  background: var(--vembb-bg); display: flex; flex-direction: column;
}
.app-header {
  display: flex; align-items: center; justify-content: center;
  padding: 12px 16px 8px; gap: 8px; position: sticky; top: 0; z-index: 20;
  background: var(--vembb-bg);
}
.app-header img { height: 40px; display: block; }
.app-content { flex: 1; padding: 16px; padding-bottom: 110px; }

/* ---------- barra inferior (Figma) ---------- */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 430px; height: 76px; z-index: 40;
  display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center;
  background: var(--nav);
  border-top-left-radius: 28px; border-top-right-radius: 28px;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-item {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 100%; transition: transform .15s ease;
}
.nav-item:active { transform: scale(0.92); }
.nav-icon { position: relative; width: 46px; height: 46px; display: block; }
.nav-icon svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 5px rgba(0,0,0,.35)); }
.nav-item.active .nav-icon svg { filter: drop-shadow(0 0 9px rgba(182,156,255,.9)); }

.nav-avatar-wrap { display: flex; align-items: center; justify-content: center; }
.nav-avatar {
  width: 72px; height: 72px; border-radius: 50%; margin-top: -34px;
  background: linear-gradient(135deg, var(--vembb-pink), var(--vembb-purple));
  border: 4px solid #2a1634; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-size: 28px; color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.5);
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-item.active .nav-avatar { border-color: var(--lilac); }

/* bolinha de notificação (lilás, como no Figma) */
.nav-badge {
  position: absolute; top: -5px; right: -7px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: linear-gradient(135deg, #b69cff, #8450f5);
  color: #fff; font-size: 12px; font-weight: 700; line-height: 18px; text-align: center;
  border: 2px solid var(--nav); box-sizing: border-box;
  animation: badge-pop .25s ease-out;
}
@keyframes badge-pop { from { transform: scale(.4); } to { transform: scale(1); } }

/* ---------- botões e formulários ---------- */
.btn-primary {
  background: linear-gradient(90deg, var(--vembb-pink), var(--vembb-purple));
  color: #fff; font-weight: 600; border-radius: 14px; padding: 14px 18px; text-align: center;
  display: block; width: 100%; border: none; cursor: pointer;
  transition: transform .15s ease, opacity .15s ease; font-family: inherit; font-size: 15px;
}
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary:not(:disabled):active { transform: scale(.98); }
.btn-ghost {
  background: transparent; border: 1px solid #3a2a48; color: #fff; border-radius: 14px;
  padding: 12px 16px; width: 100%; cursor: pointer; font-family: inherit; font-size: 15px;
}
.field {
  width: 100%; background: var(--vembb-card); border: 1px solid #2c2038; color: #fff;
  border-radius: 12px; padding: 13px 14px; outline: none; font-size: 15px; font-family: inherit;
}
.field:focus { border-color: var(--vembb-pink); }
.field-label { font-size: 12px; color: var(--vembb-text-dim); margin-bottom: 6px; display: block; }
.pill {
  display: inline-block; font-size: 11px; background: var(--vembb-card-2); color: var(--vembb-text-dim);
  padding: 4px 10px; border-radius: 999px; margin-right: 6px;
}

/* =========================================================
   FEED (rolagem estilo Instagram, visual do Figma)
   ========================================================= */
.feed-list { padding: 0 4px; }

.post {
  position: relative; background: var(--post); color: var(--post-ink);
  border-radius: 30px; padding: 14px 14px 58px; margin: 50px 0 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.post:first-child { margin-top: 44px; }

.post-avatar {
  position: absolute; left: -6px; top: -30px; width: 76px; height: 76px; border-radius: 50%;
  overflow: hidden; border: 3px solid var(--post);
  background: linear-gradient(135deg, var(--vembb-pink), var(--vembb-purple));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-size: 30px; color: #fff; z-index: 2;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.post-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.post-title {
  display: flex; align-items: baseline; gap: 14px; min-height: 40px;
  padding: 2px 6px 0 74px; font-family: var(--font-title); font-size: 18px;
  letter-spacing: .5px; text-transform: uppercase; color: var(--post-ink);
}
.post-title .age { font-size: 16px; opacity: .85; white-space: nowrap; }
.post-title .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.post-frame { position: relative; background: var(--post-frame); border-radius: 10px; padding: 12px; margin-top: 6px; }
.post-img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block;
  border-radius: 4px; background: #9a9a9a;
}

.heart-btn {
  position: absolute; left: 50%; bottom: -33px; transform: translateX(-50%);   /* centro do coração na borda da foto (Figma) */
  width: 66px; height: 66px; border-radius: 50%; border: none; cursor: pointer;
  background: #f6f6f6; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .4); transition: transform .15s ease, background .2s ease;
  z-index: 2;
}
.heart-btn svg { width: 34px; height: 34px; fill: var(--heart); transition: fill .2s ease; }
.heart-btn:active { transform: translateX(-50%) scale(.9); }
.heart-btn.liked { background: var(--heart); cursor: default; }
.heart-btn.liked svg { fill: #fff; }
.heart-btn.pop { animation: heart-pop .45s ease; }
@keyframes heart-pop {
  0% { transform: translateX(-50%) scale(1); } 40% { transform: translateX(-50%) scale(1.28); }
  100% { transform: translateX(-50%) scale(1); }
}

/* botão vermelho "!" (denunciar / bloquear) — fixo no canto, como no Figma */
.fab-wrap {
  position: fixed; left: 0; right: 0; bottom: 94px; max-width: 430px; margin: 0 auto;
  height: 0; z-index: 35; pointer-events: none;
}
.fab-report {
  position: absolute; right: 14px; bottom: 0; width: 46px; height: 46px; border-radius: 50%;
  background: var(--alert); color: #fff; border: none; font-size: 26px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; cursor: pointer; pointer-events: auto;
  box-shadow: 0 6px 16px rgba(241, 72, 84, .45); font-family: inherit;
}

/* =========================================================
   PERFIL (Figma): avatar redondo + caixa escura com dados
   ========================================================= */
.profile-top { text-align: center; padding-top: 6px; }
.p-avatar {
  width: 168px; height: 168px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto;
  background: linear-gradient(135deg, var(--vembb-pink), var(--vembb-purple));
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
}
.p-avatar-fallback {
  width: 168px; height: 168px; border-radius: 50%; margin: 0 auto;
  background: linear-gradient(135deg, var(--vembb-pink), var(--vembb-purple));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-size: 72px;
}
.info-box { background: var(--info-box); border-radius: 30px; padding: 22px 24px; margin-top: 16px; text-align: left; }
.info-name { font-family: var(--font-title); font-size: 32px; text-transform: uppercase; line-height: 1.1; letter-spacing: .5px; word-break: break-word; }
.info-lines { font-family: var(--font-title); font-size: 19px; text-transform: uppercase; line-height: 1.55; margin-top: 14px; letter-spacing: .4px; }
.info-bio { font-size: 14px; line-height: 1.5; color: #d6d0dd; margin-top: 14px; white-space: pre-wrap; word-break: break-word; }
.info-online { font-size: 13px; margin-top: 8px; color: var(--vembb-text-dim); }
.info-online.on { color: var(--online); }
.profile-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; background: #120b19; display: block; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

/* =========================================================
   CONVERSAS (lista) — estilo WhatsApp com cores do Figma
   ========================================================= */
.chat-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px;
  background: #181620; margin-bottom: 8px; transition: background .15s ease;
}
.chat-row:active { background: #231f2e; }
.chat-row.unread { background: #2b1f45; }
.avatar-wrap { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.avatar-wrap .av {
  width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--vembb-pink), var(--vembb-purple));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-size: 22px;
}
.avatar-wrap .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.online-dot {
  position: absolute; right: 0; bottom: 0; width: 15px; height: 15px; border-radius: 50%;
  background: var(--online); border: 3px solid #181620;
}
.chat-row.unread .online-dot { border-color: #2b1f45; }
.chat-main { flex: 1; min-width: 0; }
.chat-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-time { font-size: 12px; color: #8d889a; flex-shrink: 0; }
.chat-row.unread .chat-time { color: var(--lilac); font-weight: 600; }
.chat-preview { font-size: 13.5px; color: #9b97a6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; min-width: 0; }
.chat-row.unread .chat-preview { color: #e7e2f1; font-weight: 500; }
.chat-preview .txt { overflow: hidden; text-overflow: ellipsis; }
.status-online { color: var(--online); }
.tick { color: #8d889a; font-size: 13px; letter-spacing: -3px; margin-right: 3px; flex-shrink: 0; }
.tick.read { color: #6ec1ff; }
.unread-badge {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #b69cff, #7c4dff); color: #fff; font-size: 12.5px; font-weight: 700;
  line-height: 24px; text-align: center;
}
.new-tag {
  flex-shrink: 0; padding: 0 10px; height: 24px; border-radius: 12px; line-height: 24px;
  background: linear-gradient(90deg, var(--vembb-pink), var(--vembb-purple)); font-size: 12px; font-weight: 700;
}

/* =========================================================
   CONVERSA (tela de chat) — estilo WhatsApp
   ========================================================= */
.chat-shell {
  max-width: 430px; margin: 0 auto; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; background: var(--chat-bg); position: relative;
}
.chat-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #17151c;
  border-bottom: 1px solid #25222d; flex-shrink: 0;
}
.chat-back { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: 24px; flex-shrink: 0; }
.back-badge {
  position: absolute; top: 0; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: linear-gradient(135deg, #b69cff, #7c4dff); font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
}
.head-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.head-user .avatar-wrap, .head-user .avatar-wrap .av { width: 42px; height: 42px; font-size: 18px; }
.head-user .online-dot { width: 12px; height: 12px; border-color: #17151c; }
.head-name { font-weight: 700; font-size: 16px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-status { font-size: 12px; color: #8d889a; line-height: 1.2; }
.head-status.on { color: var(--online); }
.chat-menu-btn { width: 40px; height: 40px; font-size: 22px; background: none; border: none; color: #fff; cursor: pointer; }

.chat-body {
  flex: 1; overflow-y: auto; padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 5px;
  background: var(--chat-bg); overscroll-behavior: contain;
}
.day-sep {
  align-self: center; font-size: 12px; background: #27242f; color: #b9b4c4;
  padding: 4px 12px; border-radius: 10px; margin: 10px 0 6px;
}
.msg {
  max-width: 80%; padding: 8px 12px 5px; border-radius: 16px; font-size: 14.5px; line-height: 1.38;
  word-break: break-word; white-space: pre-wrap; position: relative;
}
.msg.mine { align-self: flex-end; background: var(--bubble-mine); border-bottom-right-radius: 5px; }
.msg.theirs { align-self: flex-start; background: var(--bubble-theirs); border-bottom-left-radius: 5px; }
.msg-meta { display: flex; justify-content: flex-end; align-items: center; gap: 3px; margin-top: 2px; font-size: 10.5px; color: rgba(255,255,255,.55); line-height: 1; }
.msg-meta .tick { color: rgba(255,255,255,.55); margin-right: 0; font-size: 12px; }
.msg-meta .tick.read { color: #6ec1ff; }
.typing-bubble { align-self: flex-start; background: var(--bubble-theirs); border-radius: 16px; border-bottom-left-radius: 5px; padding: 11px 14px; display: flex; gap: 4px; }
.typing-bubble i { width: 7px; height: 7px; border-radius: 50%; background: #9b97a6; animation: typing 1.2s infinite; display: block; }
.typing-bubble i:nth-child(2) { animation-delay: .15s; } .typing-bubble i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.chat-input { display: flex; gap: 8px; padding: 10px 12px; background: #17151c; border-top: 1px solid #25222d; flex-shrink: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0)); }
.chat-input input { flex: 1; background: #1c1c20; border: 1px solid #2a2830; color: #fff; border-radius: 22px; padding: 12px 16px; font-size: 15px; outline: none; font-family: inherit; }
.chat-input input:focus { border-color: #5b3d9e; }
.chat-send {
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer; flex-shrink: 0;
  background: linear-gradient(135deg, var(--vembb-pink), var(--vembb-purple)); color: #fff; font-size: 18px;
}
.chat-menu { position: absolute; right: 10px; top: 58px; z-index: 50; background: #1f1c27; border: 1px solid #3a2a48; border-radius: 14px; overflow: hidden; }
.chat-menu button { display: block; width: 100%; text-align: left; padding: 13px 18px; font-size: 14px; background: none; border: none; color: #fff; cursor: pointer; font-family: inherit; }
.chat-menu button:active { background: rgba(255,255,255,.07); }

/* ---------- banner de notificações ---------- */
.push-banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px;
  background: linear-gradient(135deg, #3a2060, #54286e); margin-bottom: 14px;
}
.push-banner p { font-size: 13px; line-height: 1.35; flex: 1; }
.push-banner button { border: none; border-radius: 12px; padding: 9px 14px; font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; }
.push-banner .go { background: #fff; color: #482856; }
.push-banner .x { background: transparent; color: #cdbbf5; padding: 9px 6px; }

/* ---------- avisos, modais, overlays ---------- */
.toast {
  position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%);
  background: #1c1424; border: 1px solid #3a2a48; color: #fff; padding: 10px 16px;
  border-radius: 12px; font-size: 14px; z-index: 120; max-width: 90%; text-align: center;
}
.match-overlay {
  position: fixed; inset: 0; background: rgba(4, 2, 8, .94); display: flex; flex-direction: column;
  align-items: center; justify-content: center; z-index: 150; padding: 24px; text-align: center;
}
.match-overlay h1 {
  font-family: var(--font-title); font-weight: 400; font-size: 54px; letter-spacing: 1px; margin-bottom: 8px;
  background: linear-gradient(90deg, var(--vembb-pink), var(--vembb-purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); display: flex; align-items: flex-end; z-index: 140; }
.modal-sheet {
  width: 100%; max-width: 430px; margin: 0 auto; background: #18101f; padding: 20px;
  border-top-left-radius: 22px; border-top-right-radius: 22px;
}
.sheet-action { display: block; width: 100%; text-align: left; padding: 15px 4px; font-size: 16px; background: none; border: none; color: #fff; cursor: pointer; border-bottom: 1px solid #2a2234; font-family: inherit; }
.sheet-action.danger { color: #ff7a85; }

.spinner {
  width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2);
  border-top-color: var(--vembb-pink); animation: spin .8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
