/* ================================================================
   CentralDS — Stylesheet Principal (Responsivo Completo)
   Cada elemento tem suas próprias regras CSS independentes
================================================================ */

/* ── Variáveis ── */
:root {
  --bg:          #06090f;
  --bg-2:        #0d1220;
  --bg-3:        #131929;
  --bg-4:        #1a2235;
  --bg-glass:    rgba(13,18,32,.72);
  --border:      rgba(99,102,241,.18);
  --border-2:    rgba(99,102,241,.30);
  --text:        #e8eaf6;
  --text-2:      #8892b0;
  --text-3:      #495670;
  --accent:      #6366f1;
  --accent-2:    #818cf8;
  --accent-3:    #a78bfa;
  --accent-glow: rgba(99,102,241,.4);
  --green:       #00e676;
  --blue:        #40c4ff;
  --orange:      #ff6d00;
  --purple:      #e040fb;
  --gray:        #90a4ae;
  --red:         #ff5252;
  --yellow:      #ffd740;
  --cyan:        #18ffff;
  --pink:        #ff4081;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 8px 40px rgba(0,0,0,.6);
  --shadow-sm:   0 2px 16px rgba(0,0,0,.35);
  --font:        'Space Grotesk', system-ui, sans-serif;
  --font-head:   'Syne', 'Space Grotesk', system-ui, sans-serif;
  --mono:        'JetBrains Mono', monospace;
  --font-sz-xs:  0.72rem;
  --font-sz-sm:  0.82rem;
  --font-sz-md:  0.95rem;
  --font-sz-lg:  1.1rem;
  --header-h:    60px;
  --sidebar-w:   300px;
  --particle:    rgba(99,102,241,.15);
  --grid-line:   rgba(99,102,241,.05);
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
  height: auto;
}
input, select, textarea, button {
  font-family: var(--font);
}

/* ── Canvas de fundo animado ── */
#tech-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
body > *:not(#tech-canvas) { position: relative; }

/* ── Layout ── */
.container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  width: 100%;
}
.section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.section-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

/* ── Utilitários ── */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-muted {
  color: var(--text-3);
  font-size: .875rem;
}

/* ─────────────────────────────────────────────
   BOTÕES — cada variante independente
───────────────────────────────────────────── */
.btn {
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-2);
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-2);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-full {
  width: 100%;
  justify-content: center;
}
.btn-sm {
  padding: .35rem .85rem;
  font-size: .82rem;
}

/* ─────────────────────────────────────────────
   BADGES — cada cor independente
───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .6rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  border: 1px solid currentColor;
}
.badge-android {
  color: #3ddc84;
  background: rgba(61,220,132,.1);
}
.badge-windows {
  color: #3b9eff;
  background: rgba(59,158,255,.1);
}
.badge-macos {
  color: #d1d5db;
  background: rgba(209,213,219,.1);
}
.badge-linux {
  color: #ff6b35;
  background: rgba(255,107,53,.1);
}
.badge-iso {
  color: #a855f7;
  background: rgba(168,85,247,.1);
}
.badge-jogos {
  color: #f59e0b;
  background: rgba(245,158,11,.1);
}
.badge-educacao {
  color: #06b6d4;
  background: rgba(6,182,212,.1);
}
.badge-seguranca {
  color: #ef4444;
  background: rgba(239,68,68,.1);
}
.badge-design {
  color: #ec4899;
  background: rgba(236,72,153,.1);
}
.badge-outros {
  color: #94a3b8;
  background: rgba(148,163,184,.1);
}
.badge-destaque {
  position: absolute;
  top: .5rem;
  right: .5rem;
  font-size: .85rem;
}

/* ─────────────────────────────────────────────
   ALERTAS
───────────────────────────────────────────── */
.alert {
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .9rem;
  border: 1px solid;
}
.alert-erro {
  background: rgba(239,68,68,.1);
  border-color: rgba(239,68,68,.4);
  color: #fca5a5;
}
.alert-ok {
  background: rgba(61,220,132,.1);
  border-color: rgba(61,220,132,.4);
  color: #6ee7b7;
}

/* ─────────────────────────────────────────────
   HEADER
───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8,12,18,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  width: 100%;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
  width: 100%;
}
.logo {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-icon {
  color: var(--accent);
  font-size: 1.3rem;
}
.logo-accent {
  color: var(--accent);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-left: auto;
  flex-shrink: 0;
}
.user-menu {
  position: relative;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--border-2);
  transition: border-color .2s;
  display: block;
  object-fit: cover;
}
.user-avatar:hover {
  border-color: var(--accent);
}
.user-dropdown {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  min-width: 180px;
  padding: .4rem 0;
  box-shadow: var(--shadow);
  z-index: 200;
  transition: opacity .15s, visibility .15s;
}
.user-dropdown.aberto {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.user-dropdown a {
  display: block;
  padding: .5rem 1rem;
  font-size: .875rem;
  color: var(--text-2);
  transition: all .2s;
}
.user-dropdown a:hover {
  color: var(--text);
  background: var(--bg-4);
}
.user-dropdown-tema {
  display: block;
  width: 100%;
  text-align: left;
  padding: .5rem 1rem;
  font-size: .875rem;
  color: var(--text-2);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: all .2s;
}
.user-dropdown-tema:hover {
  color: var(--text);
  background: var(--bg-4);
}
.user-dropdown .admin-link {
  color: var(--accent);
}
.user-dropdown .logout-link {
  color: var(--red);
}



/* Botões de auth no header */
.btn-header-auth {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-header-auth.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-header-auth.btn-primary:hover {
  background: var(--accent-2);
}
.btn-header-auth.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-2);
}
.btn-header-auth.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Botão tema */
.btn-tema {
  background: none;
  border: 1px solid var(--border-2);
  color: var(--text-2);
  cursor: pointer;
  padding: .35rem .65rem;
  border-radius: 8px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  transition: all .2s;
  line-height: 1;
  flex-shrink: 0;
}
.btn-tema:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─────────────────────────────────────────────
   HERO
───────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 1rem 0 1rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-content {
  position: relative;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.hero-title {
  font-size: clamp(1.75rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero-sub {
  color: var(--text-2);
  font-size: clamp(.95rem, 2vw, 1.1rem);
  margin-bottom: 2rem;
}
.hero-search {
  display: flex;
  gap: .5rem;
  max-width: 580px;
  margin: 0 auto;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: 50px;
  padding: .35rem .35rem .35rem 1.25rem;
  transition: border-color .2s;
  align-items: center;
}
.hero-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.hero-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1.4rem;
  min-width: 0;
}
.hero-search button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: .6rem 1.4rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: background .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.hero-search button:hover {
  background: var(--accent-2);
}

/* ─────────────────────────────────────────────
   GRID DE CATEGORIAS — cada cat independente
───────────────────────────────────────────── */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .75rem;
  max-width: 800px;   /* ← adicionar */
  margin: 0 auto;     /* ← adicionar */
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: 1.25rem .75rem;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--border);
  transition: all .25s;
  text-align: center;
  cursor: pointer;
  color: var(--cat-color, var(--accent));
  text-decoration: none;
}
.cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--cat-color, var(--accent));
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.cat-card-icon {
  font-size: 2rem;
  line-height: 1;
}
.cat-card-nome {
  font-weight: 700;
  font-size: .95rem;
  color: var(--cat-color, var(--accent));
}
.cat-card-count {
  font-size: .75rem;
  color: var(--text-3);
}

/* ─────────────────────────────────────────────
   CARDS DE APP
───────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.cards-grid--destaque {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.app-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .25s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.app-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.app-card-img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-card-img img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 12px;
}
.app-card-img .badge {
  position: absolute;
  top: .5rem;
  left: .5rem;
}
.app-card-body {
  padding: .85rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.app-card-title {
  font-weight: 700;
  font-size: .9rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}
.app-card-meta {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}
.meta-versao {
  font-size: .75rem;
  color: var(--accent-2);
  font-family: var(--mono);
}
.meta-tam {
  font-size: .75rem;
  color: var(--text-3);
}
.app-card-stats {
  display: flex;
  gap: .6rem;
  font-size: .72rem;
  color: var(--text-3);
  margin-top: auto;
  flex-wrap: wrap;
  align-items: center;
}
.meta-time {
  margin-left: auto;
}
.app-card-cats {
  display: flex;
  gap: .3rem;
  font-size: .85rem;
}

/* Wrap de card com botão remover fav */
.app-card-wrap {
  position: relative;
}
.btn-rem-fav {
  position: absolute;
  top: .5rem;
  right: .5rem;
  background: rgba(239,68,68,.85);
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  opacity: 0;
  transition: opacity .2s;
  z-index: 2;
  border: none;
  cursor: pointer;
}
.app-card-wrap:hover .btn-rem-fav {
  opacity: 1;
}

/* Badge restrito GD */
.badge-gd {
  color: var(--yellow);
  background: rgba(245,158,11,.1);
  border: 1px solid var(--yellow);
}

/* ─────────────────────────────────────────────
   FILTROS
───────────────────────────────────────────── */
.filtros {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.filtro-btn {
  padding: .4rem .9rem;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 600;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  transition: all .2s;
  cursor: pointer;
  text-decoration: none;
}
.filtro-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(99,102,241,.15);
}
.filtro-btn.ativo {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(99,102,241,.15);
}
.filtro-android.ativo { border-color: var(--green);  color: var(--green);  background: rgba(61,220,132,.1); }
.filtro-windows.ativo { border-color: var(--blue);   color: var(--blue);   background: rgba(59,158,255,.1); }
.filtro-linux.ativo   { border-color: var(--orange); color: var(--orange); background: rgba(255,107,53,.1); }
.filtro-iso.ativo     { border-color: var(--purple); color: var(--purple); background: rgba(168,85,247,.1); }
.filtro-jogos.ativo   { border-color: var(--yellow); color: var(--yellow); background: rgba(245,158,11,.1); }
.filtro-educacao.ativo{ border-color: var(--cyan);   color: var(--cyan);   background: rgba(6,182,212,.1); }
.filtro-outros.ativo  { border-color: var(--gray);   color: var(--gray);   background: rgba(148,163,184,.1); }

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-4);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: .1rem .6rem;
  font-size: .75rem;
  color: var(--text-2);
  margin-left: .5rem;
  vertical-align: middle;
}
.search-query {
  color: var(--text-2);
  font-size: .9rem;
}

/* ─────────────────────────────────────────────
   PAGINAÇÃO
───────────────────────────────────────────── */
.paginacao {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}
.pag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  transition: all .2s;
  text-decoration: none;
}
.pag-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pag-btn.ativo {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ─────────────────────────────────────────────
   ESTADO VAZIO
───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-3);
}
.empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}
.empty-state p {
  margin-bottom: 1.5rem;
}

/* ─────────────────────────────────────────────
   PÁGINA DE POST
───────────────────────────────────────────── */
.post-page {
  padding: 2.5rem 0 4rem;
}
.post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}
.post-header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.post-icon {
  width: 100px;
  height: 100px;
  border-radius: 20px;
  object-fit: contain;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  padding: .5rem;
  flex-shrink: 0;
}
.post-header-info {
  flex: 1;
  min-width: 0;
}
.post-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin: .3rem 0 .6rem;
  line-height: 1.2;
}
.post-meta-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  color: var(--text-3);
  font-size: .85rem;
  margin-bottom: .75rem;
  align-items: center;
}
.post-tags {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.tag {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: .2rem .65rem;
  font-size: .75rem;
  color: var(--accent-2);
  transition: all .2s;
  text-decoration: none;
}
.tag:hover {
  border-color: var(--accent);
}
.screenshots-wrap {
  margin-bottom: 2rem;
}
.screenshots-main img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.screenshots-thumbs {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}
.ss-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid var(--border-2);
  transition: border-color .2s;
}
.ss-thumb.ativo {
  border-color: var(--accent);
}
.ss-thumb:hover {
  border-color: var(--accent);
}
.post-desc {
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2.5rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.post-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.download-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  flex-direction: column;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all .25s;
  text-align: center;
  text-decoration: none;
}
.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.dl-size {
  font-size: .75rem;
  font-weight: 400;
  opacity: .8;
}
.btn-fav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .6rem;
  margin-top: .75rem;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-fav:hover {
  border-color: #ec4899;
  color: #ec4899;
  background: rgba(236,72,153,.1);
}
.btn-fav.ativo {
  border-color: #ec4899;
  color: #ec4899;
  background: rgba(236,72,153,.1);
}
.sidebar-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.sidebar-box h4 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-2);
}
.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.info-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .875rem;
}
.info-list li span {
  color: var(--text-3);
}
.info-list li strong {
  color: var(--text);
  font-weight: 600;
}

/* Comentários */
.comentarios-section {
  margin-top: 2.5rem;
}
.comentarios-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.form-comentario {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 2rem;
}
.form-comentario textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  padding: .75rem 1rem;
  resize: vertical;
  outline: none;
  font-size: .9rem;
  transition: border-color .2s;
}
.form-comentario textarea:focus {
  border-color: var(--accent);
}
.login-prompt {
  color: var(--text-3);
  padding: 1rem;
  background: var(--bg-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.login-prompt a {
  color: var(--accent-2);
}
.comentarios-lista {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.comentario {
  display: flex;
  gap: 1rem;
}
.comentario-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.comentario-corpo {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  min-width: 0;
}
.comentario-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: .4rem;
  flex-wrap: wrap;
  gap: .3rem;
}
.comentario-header strong {
  font-size: .875rem;
}
.comentario-header span {
  font-size: .75rem;
  color: var(--text-3);
}
.comentario-corpo p {
  font-size: .875rem;
  color: var(--text-2);
  line-height: 1.6;
}
.sem-comentarios {
  color: var(--text-3);
  text-align: center;
  padding: 2rem;
}

/* ─────────────────────────────────────────────
   AUTH
───────────────────────────────────────────── */
.auth-section {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-box {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--accent);
}
.auth-box h2 {
  text-align: center;
  font-size: 1.25rem;
  margin-bottom: 1.75rem;
  color: var(--text-2);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .875rem;
  color: var(--text-3);
}
.auth-switch a {
  color: var(--accent-2);
}

/* ─────────────────────────────────────────────
   FORMULÁRIOS
───────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.form-group label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-2);
}
.form-group input[type="text"] {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  padding: .6rem .9rem;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.form-group input[type="email"] {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  padding: .6rem .9rem;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.form-group input[type="password"] {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  padding: .6rem .9rem;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.form-group input[type="url"] {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  padding: .6rem .9rem;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.form-group input[type="number"] {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  padding: .6rem .9rem;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.form-group select {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  padding: .6rem .9rem;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  width: 100%;
  cursor: pointer;
}
.form-group textarea {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  padding: .6rem .9rem;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  width: 100%;
  resize: vertical;
}
.form-group input:focus {
  border-color: var(--accent);
}
.form-group select:focus {
  border-color: var(--accent);
}
.form-group textarea:focus {
  border-color: var(--accent);
}
.form-group input[type="file"] {
  background: var(--bg-3);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  padding: .6rem .9rem;
  color: var(--text-2);
  cursor: pointer;
  width: 100%;
}
.form-group small {
  font-size: .75rem;
  color: var(--text-3);
}
.form-group input:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  font-weight: 500;
  font-size: .9rem;
  color: var(--text-2);
}
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}
.radio-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.radio-opt {
  display: flex;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  font-size: .9rem;
  color: var(--text-2);
}
.radio-opt input[type="radio"] {
  accent-color: var(--accent);
}

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  padding: 3rem 0 2rem;
}
.footer-brand .logo {
  margin-bottom: .75rem;
}
.footer-brand p {
  color: var(--text-3);
  font-size: .875rem;
  max-width: 260px;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  gap: 3rem;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.footer-col h4 {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .25rem;
}
.footer-col a {
  font-size: .875rem;
  color: var(--text-2);
  transition: color .2s;
  text-decoration: none;
}
.footer-col a:hover {
  color: var(--accent-2);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  text-align: center;
}
.footer-bottom p {
  font-size: .8rem;
  color: var(--text-3);
}

/* ─────────────────────────────────────────────
   PERFIL
───────────────────────────────────────────── */
.perfil-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 2rem;
  align-items: start;
}
.perfil-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 80px;
}
.perfil-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
}
.perfil-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}
.perfil-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  display: block;
}
.perfil-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  cursor: pointer;
  transition: background .2s;
  font-style: normal;
}
.perfil-avatar-edit:hover {
  background: var(--accent-2);
}
.perfil-nome {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: .15rem;
  transition: all .2s;
}
.perfil-email {
  font-size: .8rem;
  color: var(--text-3);
  margin: .25rem 0 .5rem;
}
.perfil-stats {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 1rem 0;
}
.perfil-stat {
  flex: 1;
  padding: .75rem .5rem;
  text-align: center;
}
.perfil-stat + .perfil-stat {
  border-left: 1px solid var(--border);
}
.perfil-stat-num {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
}
.perfil-stat-label {
  display: block;
  font-size: .7rem;
  color: var(--text-3);
}
.perfil-membro {
  font-size: .75rem;
  color: var(--text-3);
}
.perfil-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.perfil-box h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.perfil-box h4 {
  font-size: .875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-2);
}
.perfil-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.perfil-dl-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.perfil-dl-list li {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.perfil-dl-list li img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  background: var(--bg-3);
  flex-shrink: 0;
}
.perfil-dl-list li div {
  flex: 1;
  min-width: 0;
}
.perfil-dl-list li div a {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.perfil-dl-list li div span {
  font-size: .7rem;
  color: var(--text-3);
}

/* Avatar upload row */
.perfil-avatar-upload-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.perfil-avatar-mini {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-2);
  flex-shrink: 0;
}

/* Form actions */
.perfil-box .form-actions {
  padding-top: 1.25rem;
  margin-top: .5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.perfil-box .admin-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* ─────────────────────────────────────────────
   TEMA CLARO
───────────────────────────────────────────── */
body.tema-claro {
  --bg:          #b0c5ff;
  --bg-2:        #ffffff;
  --bg-3:        #f5f7ff;
  --bg-4:        #e8edf8;
  --bg-glass:    rgba(255,255,255,.78);
  --border:      rgba(99,102,241,.14);
  --border-2:    rgba(99,102,241,.24);
  --text:        #0f172a;
  --text-2:      #334155;
  --text-3:      #64748b;
  --accent-glow: rgba(99,102,241,.2);
  --grid-line:   rgba(99,102,241,.06);
  --particle:    rgba(99,102,241,.1);
}
body.tema-claro .site-header {
  background: rgba(240,244,255,.88);
}
body.tema-claro .app-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}
body.tema-claro .hero {
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(99,102,241,.1) 0%, transparent 70%);
}
body.tema-claro .hero-search {
  background: #fff;
}
body.tema-claro .cat-card { background: #fff; }
body.tema-claro .auth-box { box-shadow: 0 4px 32px rgba(99,102,241,.1); }
body.tema-claro .form-input,
body.tema-claro .form-select,
body.tema-claro .form-textarea { background: var(--bg-3); }
body.tema-claro .site-footer { background: #fff; }
body.tema-claro .btn-sm { background: #fff; }

/* ─────────────────────────────────────────────
   RESPONSIVO — 1024px
───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .post-layout {
    grid-template-columns: 1fr;
  }
  .post-sidebar {
    position: static;
  }
  .perfil-layout {
    grid-template-columns: 260px 1fr;
  }
}

/* ─────────────────────────────────────────────
   RESPONSIVO — 900px
───────────────────────────────────────────── */
@media (max-width: 900px) {
  .perfil-layout {
    grid-template-columns: 1fr;
  }
  .perfil-sidebar {
    position: static;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-links {
    flex-wrap: wrap;
    gap: 1.5rem;
  }
  .cats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─────────────────────────────────────────────
   RESPONSIVO — 768px
───────────────────────────────────────────── */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  .hero {
    padding: 3rem 0 2.5rem;
  }
  .hero-title {
    font-size: 1.75rem;
  }
  .hero-sub {
    font-size: .95rem;
  }
  .hero-search {
    padding: .25rem .25rem .25rem .9rem;
  }
  .hero-search button {
    padding: .55rem 1rem;
    font-size: .85rem;
  }
  .cats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
  }
  .cat-card {
    padding: 1rem .5rem;
  }
  .cat-card-icon {
    font-size: 1.5rem;
  }
  .cat-card-nome {
    font-size: .8rem;
  }
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
  }
  .cards-grid--destaque {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
  }
  .section-header h2 {
    font-size: 1.15rem;
  }
  .post-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .post-icon {
    width: 80px;
    height: 80px;
  }
  .post-title {
    font-size: 1.35rem;
  }
  .post-meta-row {
    justify-content: center;
  }
  .post-tags {
    justify-content: center;
  }
  .screenshots-thumbs {
    gap: .35rem;
  }
  .ss-thumb {
    width: 64px;
    height: 48px;
  }
  .btn-header-auth {
    display: inline-flex;
    padding: .35rem .7rem;
    font-size: .78rem;
  }
  .perfil-card {
    padding: 1.25rem;
  }
  .perfil-avatar {
    width: 80px;
    height: 80px;
  }
  .perfil-stat-num {
    font-size: 1.1rem;
  }
  .auth-box {
    padding: 1.75rem 1.25rem;
  }
  .footer-col h4 {
    font-size: .75rem;
  }
  .footer-col a {
    font-size: .8rem;
  }
}

/* ─────────────────────────────────────────────
   RESPONSIVO — 480px
───────────────────────────────────────────── */
@media (max-width: 480px) {
  .container {
    padding-left: .875rem;
    padding-right: .875rem;
  }
  .hero {
    padding: 2rem 0 2rem;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .hero-search {
    border-radius: var(--radius);
    flex-direction: column;
    padding: .75rem;
    gap: .5rem;
  }
  .hero-search button {
    width: 100%;
    justify-content: center;
    border-radius: var(--radius);
  }
  .cats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
  }
  .cards-grid {
    grid-template-columns: 1fr;
    gap: .75rem;
  }
  .cards-grid--destaque {
    grid-template-columns: 1fr;
  }
  .paginacao {
    gap: .25rem;
  }
  .pag-btn {
    width: 32px;
    height: 32px;
    font-size: .8rem;
  }
  .filtros {
    gap: .35rem;
  }
  .filtro-btn {
    font-size: .78rem;
    padding: .35rem .7rem;
  }
  .post-title {
    font-size: 1.2rem;
  }
  .btn-download {
    font-size: .95rem;
  }
  .auth-box {
    padding: 1.5rem 1rem;
  }
  .header-inner {
    gap: .5rem;
  }
  .logo {
    font-size: 1rem;
  }
  .btn-tema {
    padding: .3rem .5rem;
    font-size: .9rem;
  }
  .section-header {
    margin-bottom: 1rem;
  }
  .perfil-layout {
    gap: 1rem;
  }
  .perfil-main {
    gap: 1rem;
  }
  .perfil-box {
    padding: 1.25rem 1rem;
  }
  .comentario {
    gap: .5rem;
  }
  .comentario-avatar {
    width: 28px;
    height: 28px;
  }
  .form-row-responsive {
    display: flex;
    flex-direction: column;
    gap: .75rem;
  }
}

/* ─────────────────────────────────────────────
   CHECKBOXES CATEGORIAS (novo post)
───────────────────────────────────────────── */
.cats-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.cat-check-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .85rem;
  border-radius: 20px;
  border: 1px solid var(--border-2);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-2);
  transition: all .18s;
  user-select: none;
}
.cat-check-item input {
  display: none;
}
.cat-check-item:has(input:checked) {
  color: var(--cat-color, var(--accent));
  border-color: var(--cat-color, var(--accent));
  background: color-mix(in srgb, var(--cat-color, var(--accent)) 15%, transparent);
}
.cat-check-item:hover {
  border-color: var(--cat-color, var(--accent));
}

/* ─────────────────────────────────────────────
   MODAL
───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}
.modal-box {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
}
.modal-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

/* ─────────────────────────────────────────────
   BADGE dinâmico
───────────────────────────────────────────── */
.badge[style] {
  border: 1px solid currentColor;
}