/* =========================================================
   STAR — filtro discreto do feed + vídeos estilo reels
   (carregado depois de style.css; só acrescenta regras)
   ========================================================= */

/* ---------- Filtro do feed: só um ícone no topo; o menu abre sob demanda ---------- */
.feed-filter { position: relative; }
.feed-top .menu-panel {
  min-width: 190px; padding: 6px;
  background: #0f1628; color: #e9edf8;
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.feed-top .menu-panel .menu-title {
  display: block; padding: 6px 12px 4px; font-size: .7rem; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255, 255, 255, .5);
}
.feed-top .menu-panel a { color: inherit; }
.feed-top .menu-panel a:hover { background: rgba(255, 255, 255, .08); }
.feed-top .menu-panel a.is-current { color: #fff; font-weight: 500; }
.feed-top .menu-panel .tick { margin-left: auto; width: 18px; height: 18px; color: #4d8dff; }

/* ---------- Vídeo no feed ---------- */
.slide-video { background: #000; cursor: pointer; }
.slide-media.is-video::after {
  content: ""; position: absolute; top: 50%; left: 50%; z-index: 2;
  width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: rgba(8, 12, 24, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5.5v13l11-6.5z'/%3E%3C/svg%3E") center / 28px no-repeat;
  opacity: 0; transition: opacity .15s; pointer-events: none;
}
.slide-media.is-video.is-paused::after { opacity: 1; }

.video-sound {
  position: absolute; right: 12px; bottom: 12px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: rgba(8, 12, 24, .55); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: .85;
}
.video-sound .icon { width: 20px; height: 20px; }
.video-sound .on { display: none; }
.video-sound.is-on .on { display: block; }
.video-sound.is-on .off { display: none; }

/* ---------- Vídeo nos cartões (perfil, pesquisa, página da publicação) e na pré-visualização ---------- */
.post-video video { display: block; width: 100%; max-height: 560px; background: #000; }
video.upload-preview { display: block; width: 100%; max-height: 260px; background: #000; }

/* Atalho para abrir a publicação a partir do vídeo (tocar/pausar fica no resto da área) */
.video-open {
  position: absolute; left: 12px; bottom: 12px; z-index: 3;
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px;
  border-radius: 999px; color: #fff; font-size: .85rem; font-weight: 500;
  background: rgba(8, 12, 24, .55); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.video-open .icon { width: 18px; height: 18px; }
.video-open:hover { background: rgba(8, 12, 24, .78); }

/* ---------- Fim do feed: aviso discreto antes de repetir o conteúdo ---------- */
.feed-fim {
  height: 100%; box-sizing: border-box; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: var(--feed-top) 36px calc(var(--nav-h) + env(safe-area-inset-bottom));
  color: rgba(255, 255, 255, .6); background: #000;
}
.feed-fim-box { display: flex; flex-direction: column; align-items: center; gap: 8px; animation: fade .4s ease-out; }
.feed-fim-linha { width: 28px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .25); margin-bottom: 6px; }
.feed-fim p { font-size: .95rem; font-weight: 400; color: rgba(255, 255, 255, .78); }
.feed-fim small { font-size: .78rem; color: rgba(255, 255, 255, .45); }
