/* ============================================================
   VKPROJECT V39 — layout "VK SUBSOLO"
   Tema por cima do app.css: menu lateral, cabeçalho grunge, destaque em moldura neon,
   cards com borda vermelha, categorias em blocos com ícone.
   Fontes locais: Permanent Marker (títulos pincel) e Barlow Condensed (interface).
   ============================================================ */
@font-face { font-family: "VK Brush"; src: url("/assets/fonts/permanent-marker-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "VK Cond"; src: url("/assets/fonts/barlow-condensed-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "VK Cond"; src: url("/assets/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "VK Cond"; src: url("/assets/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "VK Cond"; src: url("/assets/fonts/barlow-condensed-latin-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --sx-red: #e8132f;
  --sx-red-hot: #ff2a43;
  --sx-red-deep: #7d0716;
  --sx-bg: #070505;
  --sx-panel: #0e0b0b;
  --sx-panel-2: #151010;
  --sx-line: #2a1a1c;
  --sx-glow: 0 0 0 1px #e8132f, 0 0 14px #e8132f99, inset 0 0 14px #e8132f33;
  --sx-glow-soft: 0 0 0 1px #e8132f88, 0 0 18px #e8132f44;
  --sx-head-h: 78px;
  --sx-side-w: 206px;
  --sx-brush: "VK Brush", "Permanent Marker", Impact, sans-serif;
  --sx-cond: "VK Cond", "Barlow Condensed", "Arial Narrow", sans-serif;
}

/* ---------- Fundo grunge: respingos vermelhos + textura ---------- */
body.sx {
  background:
    radial-gradient(60vw 40vh at -10% -5%, #5a0611aa, transparent 60%),
    radial-gradient(40vw 30vh at 105% 0%, #4a050f99, transparent 65%),
    radial-gradient(50vw 40vh at 110% 105%, #3d040c99, transparent 60%),
    radial-gradient(30vw 30vh at -5% 100%, #3a040b88, transparent 60%),
    var(--sx-bg) !important;
  font-family: var(--sx-cond);
  letter-spacing: .01em;
}
body.sx::after { /* respingos */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: .5;
  background:
    radial-gradient(circle at 8% 12%, #a3081c 0 2px, transparent 3px),
    radial-gradient(circle at 12% 18%, #a3081c 0 4px, transparent 5px),
    radial-gradient(circle at 91% 9%, #b10a20 0 3px, transparent 4px),
    radial-gradient(circle at 95% 16%, #8a0618 0 6px, transparent 7px),
    radial-gradient(circle at 88% 92%, #9b081b 0 5px, transparent 6px),
    radial-gradient(circle at 4% 86%, #8a0618 0 3px, transparent 4px),
    radial-gradient(circle at 52% 4%, #7d0716 0 2px, transparent 3px);
}

/* ---------- Cabeçalho ---------- */
body.sx .topbar {
  height: var(--sx-head-h) !important; gap: 22px !important;
  padding: 0 clamp(14px, 2vw, 28px) !important;
  background:
    radial-gradient(220px 90px at 8% 40%, #e8132f22, transparent 70%),
    linear-gradient(180deg, #120909 0%, #0a0606 100%) !important;
  border-bottom: 1px solid #e8132f55 !important;
  box-shadow: 0 6px 30px #000a, 0 1px 0 #e8132f33;
}
body.sx .topbar #nav { display: none !important; }
body.sx .brand {
  display: inline-flex !important; flex-direction: column; align-items: flex-start; line-height: .9 !important;
  font-family: var(--sx-cond) !important; font-weight: 700 !important; font-size: 30px !important;
  letter-spacing: .02em !important; text-transform: uppercase; color: #f2f2f2; position: relative; margin-right: 6px;
}
body.sx .sx-brand-main { position: relative; display: inline-flex; align-items: baseline; }
body.sx .brand .brand-vk {
  font-family: var(--sx-brush); color: var(--sx-red) !important; font-size: 1.32em; margin-right: 2px;
  text-shadow: 0 0 14px #e8132f88, 2px 2px 0 #3a0008;
}
body.sx .sx-crown { position: absolute; left: 1.4em; top: -.62em; width: .9em; height: .9em; color: var(--sx-red); filter: drop-shadow(0 0 6px #e8132faa); }
body.sx .sx-brand-sub {
  font-family: var(--sx-brush); color: var(--sx-red); font-size: .62em; letter-spacing: .02em;
  margin: -2px 0 0 1.9em; transform: rotate(-4deg); text-shadow: 0 0 10px #e8132f77;
}
body.sx .sx-tagline {
  font-family: var(--sx-brush); text-transform: uppercase; color: #f4f4f4; font-size: 17px; line-height: 1.05;
  transform: rotate(-5deg); margin: 0 auto; text-align: left; text-shadow: 2px 2px 0 #000;
}
body.sx .sx-tagline b { color: var(--sx-red); font-weight: 400; }
body.sx .top-actions { gap: 12px !important; margin-left: auto; }
body.sx .topbar .iconbtn, body.sx .instagram-top-link {
  width: 46px !important; height: 46px !important; border-radius: 50% !important; padding: 0 !important;
  display: grid !important; place-items: center; background: #0d0909 !important; color: #fff !important;
  border: 1px solid #ffffff33 !important; font-size: 18px !important;
}
body.sx .instagram-top-link { border-color: var(--sx-red) !important; box-shadow: 0 0 14px #e8132f55; color: var(--sx-red) !important; }
body.sx .instagram-top-link span { display: none !important; }
body.sx .instagram-top-link svg { width: 22px; height: 22px; stroke: var(--sx-red); }
body.sx .topbar .iconbtn:hover, body.sx .instagram-top-link:hover { border-color: var(--sx-red) !important; box-shadow: 0 0 14px #e8132f66; }
body.sx .avatar-btn.sx-pill {
  width: auto !important; height: 50px !important; border-radius: 999px !important; padding: 0 12px 0 4px !important;
  display: inline-flex !important; align-items: center; gap: 10px; background: #0d0909 !important;
  border: 1px solid #ffffff22 !important; overflow: visible !important;
}
body.sx .avatar-btn #avatarMini {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  border: 1px solid var(--sx-red); box-shadow: 0 0 10px #e8132f55; background: #1a0d0f; flex: none;
}
body.sx .avatar-btn #avatarMini img { width: 100%; height: 100%; object-fit: cover; }
body.sx .sx-who { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; text-align: left; }
body.sx .sx-who b { font: 600 15px var(--sx-cond); color: #fff; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.sx .sx-who small { font: 600 12px var(--sx-cond); color: #bbb; letter-spacing: .06em; }
body.sx .sx-chev { width: 16px; height: 16px; color: #ddd; }

/* ---------- Menu lateral ---------- */
.sx-side { display: none; }
body.sx:not(.login-mode) .sx-side {
  display: flex; flex-direction: column; gap: 14px;
  position: fixed; z-index: 45; left: 12px; top: calc(var(--sx-head-h) + 12px); bottom: 12px; width: var(--sx-side-w);
  overflow-y: auto; scrollbar-width: none;
}
.sx-side::-webkit-scrollbar { display: none; }
.sx-menu { flex: none;
  display: flex; flex-direction: column; background: linear-gradient(180deg, #110b0c, #0b0808);
  border: 1px solid var(--sx-line); border-radius: 10px; padding: 6px; box-shadow: 0 10px 30px #0008;
}
.sx-menu a {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 7px; color: #e9e9e9; text-decoration: none;
  font: 600 18px var(--sx-cond); letter-spacing: .01em; border-bottom: 1px solid #ffffff0d; transition: background .2s, box-shadow .2s, color .2s;
}
.sx-menu a:last-child { border-bottom: 0; }
.sx-menu a .sx-ico { width: 24px; height: 24px; flex: none; }
.sx-menu a:hover { background: #e8132f14; color: #fff; }
.sx-menu a.is-active {
  background: linear-gradient(90deg, #e8132f33, #e8132f10); color: #fff; box-shadow: var(--sx-glow); border-color: transparent;
}
.sx-menu a.is-active .sx-ico { color: #fff; filter: drop-shadow(0 0 6px #e8132f); }
.sx-side-art {
  position: relative; display: block; flex: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--sx-line);
  background: #000; min-height: 260px; text-decoration: none;
}
.sx-side-art img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; }
.sx-side-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #000c 0%, transparent 35%, transparent 70%, #000a 100%); }
.sx-side-mark {
  position: absolute; z-index: 1; left: 12px; top: 10px; font: 400 40px/.82 var(--sx-brush); color: var(--sx-red);
  transform: rotate(-8deg); text-shadow: 0 0 14px #e8132f99, 2px 2px 0 #000;
}
.sx-side-mark i { font-style: normal; font-size: .72em; }

/* ---------- Área de conteúdo ---------- */
@media (min-width: 1100px) {
  body.sx:not(.login-mode) #app { margin-left: calc(var(--sx-side-w) + 24px); padding-right: 14px; }
  body.sx #menuBtn { display: none !important; }
  body.sx.sx-admin .sx-side { display: none; }
  body.sx.sx-admin:not(.login-mode) #app { margin-left: 0; padding-right: 0; }
}
body.sx:not(.login-mode) main#app { padding-top: calc(var(--sx-head-h) - 58px); }

/* ---------- Destaque da home ---------- */
body.sx .hero {
  margin: 14px 0 30px !important; border-radius: 14px !important; overflow: hidden !important;
  border: 1px solid #e8132faa; box-shadow: 0 0 0 1px #e8132f33, 0 0 30px #e8132f33, 0 30px 60px -30px #000;
  min-height: clamp(420px, 44vw, 560px) !important; padding-top: 40px !important; position: relative;
}
body.sx .home-hero-media img { transition: opacity .26s ease; }
body.sx .home-hero-media img.sx-fade { opacity: 0; }
body.sx .hero-copy { position: relative; z-index: 3; }
body.sx .hero-kicker {
  font: 600 clamp(14px, 1.4vw, 20px) var(--sx-cond) !important; letter-spacing: .42em !important; color: #f0f0f0 !important;
  order: 2; text-shadow: 0 2px 8px #000 !important;
}
body.sx .hero-logo {
  font-family: var(--sx-brush) !important; font-weight: 400 !important; text-transform: uppercase;
  font-size: clamp(56px, 8vw, 132px) !important; letter-spacing: -.01em !important; line-height: .95 !important;
  color: #f4f4f4; transform: rotate(-3deg); transform-origin: left center; margin: 34px 0 10px !important;
  text-shadow: 3px 3px 0 #000, 0 0 30px #0009 !important;
}
body.sx .hero-logo span { color: var(--sx-red) !important; text-shadow: 3px 3px 0 #3a0008, 0 0 26px #e8132f88 !important; }
body.sx .hero-copy p { font: 600 clamp(17px, 1.5vw, 22px)/1.35 var(--sx-cond) !important; color: #fff !important; text-shadow: 0 2px 10px #000; max-width: 520px; }
body.sx .hero .actions .btn { font: 600 19px var(--sx-cond) !important; letter-spacing: .02em !important; text-transform: none; border-radius: 10px !important; padding: 14px 26px !important; }
body.sx .hero .actions .btn.red { background: #1a0306cc !important; border: 2px solid var(--sx-red) !important; box-shadow: 0 0 18px #e8132f88, inset 0 0 14px #e8132f44 !important; color: #fff !important; }
body.sx .hero .actions .btn.dark { background: #0008 !important; border: 1px solid #ffffffaa !important; color: #fff !important; }
body.sx .hero-dots { display: flex; gap: 10px; margin-top: 26px; }
body.sx .hero-dots button, body.sx .hero-dots i { width: 11px; height: 11px; border-radius: 50%; border: 0; padding: 0; background: #ffffff88; cursor: pointer; }
body.sx .hero-dots button.active, body.sx .hero-dots i.active { background: var(--sx-red); box-shadow: 0 0 10px var(--sx-red); }
.sx-hero-arrow {
  position: absolute; z-index: 4; top: 50%; translate: 0 -50%; width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: #0006; color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .2s;
}
.sx-hero-arrow:hover { background: #e8132fcc; }
.sx-hero-arrow .sx-ico { width: 30px; height: 30px; stroke-width: 2.4; }
.sx-hero-arrow.prev { left: 10px; } .sx-hero-arrow.next { right: 10px; }

/* ---------- Títulos de seção (pincel) ---------- */
body.sx .section-title, body.sx .video-carousel-head h2 {
  font-family: var(--sx-brush) !important; font-weight: 400 !important; text-transform: uppercase;
  font-size: clamp(22px, 2.3vw, 32px) !important; letter-spacing: .01em !important; color: #f3f3f3 !important;
  display: inline-flex !important; align-items: center; gap: 12px; padding-left: 0 !important;
  transform: rotate(-1.5deg); text-shadow: 2px 2px 0 #000;
}
body.sx .section-title::before, body.sx .video-carousel-head h2::before { display: none !important; }
body.sx .sx-title-ico { width: 1.15em; height: 1.15em; color: var(--sx-red); filter: drop-shadow(0 0 8px #e8132fbb); flex: none; }
body.sx .section-head .section-sub, body.sx .video-carousel-head > span {
  font: 700 italic 18px var(--sx-cond) !important; color: var(--sx-red) !important; letter-spacing: .02em !important; text-transform: uppercase;
}
body.sx .section-head { align-items: center !important; }

/* ---------- Cards ---------- */
body.sx .card { background: transparent !important; border: 0 !important; box-shadow: none !important; }
body.sx .card .thumb {
  border-radius: 9px !important; overflow: hidden; border: 1px solid #e8132fcc !important;
  box-shadow: 0 0 12px #e8132f55, inset 0 0 0 1px #0008 !important; position: relative;
}
body.sx .card:hover .thumb { box-shadow: 0 0 0 1px var(--sx-red-hot), 0 0 26px #e8132fbb !important; }
body.sx .card:hover { transform: translateY(-4px) !important; }
body.sx .card-title { font: 600 17px var(--sx-cond) !important; letter-spacing: .01em !important; }
body.sx .card .meta { font-family: var(--sx-cond) !important; font-size: 14px !important; }
body.sx .video-short-card .card-body { padding: 8px 2px 0 !important; }
body.sx .rail .video-short-card .play { opacity: 0; transition: opacity .2s; }
body.sx .rail .video-short-card:hover .play { opacity: 1; }
.sx-dur {
  position: absolute; z-index: 3; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 6px; background: #000c; color: #fff; font: 600 15px var(--sx-cond);
}
.sx-dur .sx-ico { width: 12px; height: 12px; }

/* ---------- Categorias em blocos com ícone (home) ---------- */
.sx-cat-ico { display: none; }
body.sx .sx-cat-tiles .rail { grid-auto-columns: minmax(124px, 1fr) !important; }
body.sx .sx-cat-tiles .category-card {
  min-height: 118px !important; height: 118px; border-radius: 10px !important; overflow: hidden;
  background: linear-gradient(180deg, #170b0d, #0c0707) !important; border: 1px solid #e8132fcc !important;
  box-shadow: 0 0 12px #e8132f44, inset 0 0 16px #e8132f22 !important;
  display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
}
body.sx .sx-cat-tiles .category-card > img, body.sx .sx-cat-tiles .category-card .category-shade,
body.sx .sx-cat-tiles .category-card .category-icon, body.sx .sx-cat-tiles .category-card .meta,
body.sx .sx-cat-tiles .category-card .category-cover, body.sx .sx-cat-tiles .category-card picture { display: none !important; }
body.sx .sx-cat-tiles .sx-cat-ico { display: block; color: var(--sx-red); filter: drop-shadow(0 0 8px #e8132fbb); }
body.sx .sx-cat-tiles .sx-cat-ico .sx-ico { width: 40px; height: 40px; stroke-width: 1.6; }
body.sx .sx-cat-tiles .category-content { position: static !important; padding: 0 !important; background: none !important; }
body.sx .sx-cat-tiles .category-card .card-title { font: 600 18px var(--sx-cond) !important; color: #fff !important; }
body.sx .sx-cat-tiles .category-card:hover { box-shadow: var(--sx-glow) !important; }

/* ---------- Botões, campos e painéis em geral ---------- */
body.sx .btn { font-family: var(--sx-cond) !important; }
body.sx .btn.red { border: 1px solid var(--sx-red-hot); }
body.sx .page-hero h1, body.sx .primary-tab-copy h1, body.sx .category-page-hero-copy h1,
body.sx .video-hero h1, body.sx .video-library-intro h2, body.sx .video-feature .vf-copy h2, body.sx .fp-info h2,
body.sx .info-panel h3, body.sx .auth-card h1 {
  font-family: var(--sx-brush) !important; font-weight: 400 !important; letter-spacing: 0 !important; transform: rotate(-2deg);
}
body.sx .primary-tab-hero, body.sx .page-hero, body.sx .category-page-hero, body.sx .video-hero {
  border-radius: 14px; overflow: hidden; border: 1px solid #e8132f88; box-shadow: 0 0 24px #e8132f2a;
}
body.sx .panel, body.sx .auth-card { border-color: #e8132f44 !important; }

/* ---------- Celular / tablet: menu vira gaveta ---------- */
@media (max-width: 1099px) {
  :root { --sx-head-h: 64px; }
  body.sx .sx-tagline { display: none; }
  body.sx #menuBtn { display: grid !important; width: 42px !important; height: 42px !important; border-radius: 50% !important; border: 1px solid #ffffff33 !important; background: #0d0909 !important; color: #fff !important; place-items: center; }
  body.sx:not(.login-mode) .sx-side {
    left: 0; top: var(--sx-head-h); bottom: 0; width: min(80vw, 280px); padding: 12px; z-index: 60;
    background: #0a0707f2; border-right: 1px solid #e8132f55; translate: -102% 0; transition: translate .28s ease;
  }
  body.sx.sx-drawer .sx-side { translate: 0 0; box-shadow: 20px 0 50px #000c; }
  .sx-veil { position: fixed; inset: var(--sx-head-h) 0 0 0; z-index: 55; background: #000a; opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.sx.sx-drawer .sx-veil { opacity: 1; pointer-events: auto; }
  body.sx.sx-drawer { overflow: hidden; }
  .sx-side-art { min-height: 200px; }
}
@media (max-width: 900px) { /* painel ADM: o menu do painel vira uma faixa rolável e nada passa da tela */
  body.sx .admin-grid { grid-template-columns: minmax(0, 1fr) !important; }
  body.sx .admin-nav { display: flex !important; overflow-x: auto !important; overflow-y: hidden !important; position: static !important; gap: 6px; max-width: 100%; width: auto !important; scrollbar-width: none; }
  body.sx .admin-nav > * { flex: none; }
  body.sx .admin-grid > * { min-width: 0; max-width: 100%; overflow-x: auto; }
}
@media (max-width: 640px) {
  :root { --sx-head-h: 60px; }
  body.sx .topbar { gap: 10px !important; padding: 0 10px !important; }
  body.sx .brand { font-size: 21px !important; }
  body.sx .topbar .iconbtn, body.sx .instagram-top-link { width: 38px !important; height: 38px !important; font-size: 15px !important; }
  body.sx .instagram-top-link svg { width: 18px; height: 18px; }
  body.sx .top-actions { gap: 7px !important; }
  body.sx .topbar .hide-mobile { display: none !important; }
  body.sx .avatar-btn.sx-pill { height: 40px !important; padding: 0 !important; border: 0 !important; background: none !important; }
  body.sx .avatar-btn #avatarMini { width: 38px; height: 38px; }
  body.sx .sx-who, body.sx .sx-chev { display: none; }
  body.sx .hero { margin: 10px 10px 24px !important; min-height: 480px !important; }
  body.sx .hero-logo { margin-top: 20px !important; }
  body.sx .hero .actions .btn { font-size: 16px !important; padding: 12px 16px !important; }
  body.sx .sx-cat-tiles .rail { grid-auto-columns: 112px !important; }
  .sx-hero-arrow { display: none; } /* no celular: troca pelos pontinhos e automaticamente */
  body.sx .section-title, body.sx .video-carousel-head h2 { font-size: 21px !important; gap: 8px; }
  body.sx .section-head .section-sub, body.sx .video-carousel-head > span { font-size: 14px !important; white-space: nowrap; }
  body.sx .sx-cat-tiles .category-card { height: 104px; min-height: 104px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .sx-side, .sx-veil, body.sx .home-hero-media img { transition: none !important; }
}

/* Descrições (ex.: página do vídeo) usam a mesma classe do "VER TODOS": texto normal e legível. */
body.sx p.section-sub { text-transform: none !important; letter-spacing: .01em !important; font: 400 16px/1.5 var(--sx-cond) !important; color: #d6d6d6 !important; white-space: normal !important; overflow-wrap: anywhere; }

/* ---------- Nada pode deixar a página mais larga que a tela ----------
   Filas de cards (rail) dentro de grades sem min-width:0 empurravam a largura da página
   (ex.: "Continuar assistindo" no perfil), e o celular afastava o zoom. */
body.sx .profile-wrap > *, body.sx .split > *, body.sx .section, body.sx .rail { min-width: 0; }
body.sx:not(.login-mode) #app { overflow-x: clip; } /* rede de segurança: corta, mas nunca alarga a página */
@media (max-width: 900px) {
  body.sx .profile-wrap { grid-template-columns: minmax(0, 1fr) !important; }
  body.sx .profile-side { display: flex !important; overflow-x: auto !important; gap: 6px; position: static !important; scrollbar-width: none; }
  body.sx .profile-side > * { flex: none; }
}
