/* ==========================================================
   AllFactVerso — tema escuro cósmico
   ========================================================== */
:root {
  --background: #171129;
  --foreground: #f4f2fa;
  --surface: #221a42;
  --card: #221a42;
  --primary: #d633b8;
  --primary-glow: #3ec6e0;
  --primary-foreground: #ffffff;
  --muted-foreground: #b3a8cc;
  --border: #3a2c63;
  --destructive: #e5484d;
  --radius: 0.75rem;
  --gradient-primary: linear-gradient(135deg, var(--primary-glow), var(--primary));
  --gradient-spot: radial-gradient(120% 90% at 50% 0%, rgba(214, 51, 184, 0.28), rgba(62, 198, 224, 0.14) 45%, transparent 75%);
  --shadow-cinema: 0 24px 60px -24px rgba(214, 51, 184, 0.55);
  --font-display: "Bebas Neue", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Barlow", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 72rem; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }
.text-primary { color: var(--primary); }
.muted { color: var(--muted-foreground); font-size: 0.875rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(23, 17, 41, 0.85);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem; padding-top: 0.75rem; padding-bottom: 0.75rem;
}
.brand { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.brand-logo { height: 2.5rem; width: 2.5rem; object-fit: contain; flex-shrink: 0; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem; letter-spacing: 0.15em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header-side { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.main-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1rem; font-size: 0.875rem; }
.main-nav a { color: var(--muted-foreground); transition: color 0.2s; }
.main-nav a:hover { color: var(--foreground); }
.main-nav a.active { color: var(--primary); font-weight: 600; }

@media (min-width: 640px) {
  .header-inner { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
  .header-side { flex-direction: row; gap: 1.5rem; }
}

/* ---------- Social ---------- */
.social-links { display: flex; align-items: center; gap: 0.5rem; }
.social-links a {
  display: flex; align-items: center; justify-content: center;
  height: 2.25rem; width: 2.25rem; border-radius: 9999px;
  border: 1px solid var(--border);
  background: rgba(34, 26, 66, 0.6);
  color: var(--muted-foreground);
  transition: color 0.2s, border-color 0.2s;
}
.social-links a:hover { border-color: var(--primary); color: var(--primary); }
.social-links svg { height: 1rem; width: 1rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.4; }
.hero-overlay { position: absolute; inset: 0; background: rgba(23, 17, 41, 0.6); }
.hero-spot { position: absolute; inset: 0; background: var(--gradient-spot); }
.hero-inner {
  position: relative; display: grid; gap: 2rem;
  padding-top: 3.5rem; padding-bottom: 3.5rem;
}
@media (min-width: 768px) {
  .hero-inner { grid-template-columns: 1fr 1fr; align-items: center; }
}
.hero-kicker { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.3em; color: var(--primary); margin-bottom: 1.25rem; }
.hero h1 {
  font-family: var(--font-display);
  font-size: 2.5rem; line-height: 1; letter-spacing: 0.05em;
}
@media (min-width: 768px) { .hero h1 { font-size: 3.75rem; } }
.hero-desc { max-width: 65ch; font-size: 0.875rem; color: var(--muted-foreground); margin-top: 1.25rem; }
.hero-video-title { font-size: 1.125rem; font-weight: 600; margin-top: 1.25rem; }
.hero-video-meta { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.25rem; }
.hero-player { overflow: hidden; border-radius: 1rem; border: 1px solid var(--border); box-shadow: var(--shadow-cinema); }
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Botões ---------- */
.btn-primary {
  display: inline-flex; align-items: center;
  border: 0; cursor: pointer;
  border-radius: 0.375rem; padding: 0.625rem 1.25rem;
  font-size: 0.875rem; font-weight: 600; font-family: var(--font-sans);
  color: var(--primary-foreground);
  background: var(--gradient-primary);
  transition: opacity 0.2s;
  margin-top: 0.75rem;
}
.btn-primary:hover { opacity: 0.9; }
.btn-outline {
  display: inline-block;
  border: 1px solid var(--border); border-radius: 0.375rem;
  background: var(--surface); padding: 0.75rem 1.5rem;
  font-size: 0.875rem; font-weight: 600; color: var(--foreground);
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.center { text-align: center; }

/* ---------- Seções ---------- */
.sections { display: flex; flex-direction: column; gap: 4rem; padding-top: 3.5rem; padding-bottom: 5rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2 { font-family: var(--font-display); font-size: 1.875rem; letter-spacing: 0.05em; }
.section-head a { font-size: 0.875rem; font-weight: 600; color: var(--primary); }
.section-head a:hover { text-decoration: underline; }

/* ---------- Grid de cards ---------- */
.grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: block; overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-cinema);
  transition: transform 0.3s;
}
.video-card .card:hover { transform: translateY(-0.25rem); }
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #2c2154; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.video-card:hover .thumb img { transform: scale(1.05); }
.rank {
  position: absolute; left: 0.5rem; top: 0.5rem;
  display: flex; align-items: center; justify-content: center;
  height: 2rem; width: 2rem; border-radius: 0.375rem;
  font-family: var(--font-display); font-size: 1.125rem;
  color: var(--primary-foreground);
  background: var(--gradient-primary);
}
.duration {
  position: absolute; bottom: 0.5rem; right: 0.5rem;
  border-radius: 0.25rem; padding: 0.125rem 0.375rem;
  font-size: 0.75rem; font-weight: 500;
  background: rgba(23, 17, 41, 0.85);
}
.card-body { padding: 1rem; }
.card-body h3 {
  font-size: 1rem; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.video-card:hover .card-body h3 { color: var(--primary); }
.card-body .meta { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.5rem; }

@media (max-width: 639px) {
  .hide-mobile { display: none; }
}

/* ---------- Anúncios ---------- */
.ad-slot {
  display: flex; min-height: 90px; align-items: center; justify-content: center;
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: rgba(34, 26, 66, 0.6);
  padding: 1.5rem 1rem;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--muted-foreground);
}

/* ---------- Página de vídeo ---------- */
.video-page { padding-top: 2.5rem; padding-bottom: 5rem; }
.video-page h1 { font-size: 1.5rem; font-weight: 700; margin-top: 1.5rem; line-height: 1.3; }
.video-page .meta { font-size: 0.875rem; color: var(--muted-foreground); margin-top: 0.5rem; }
.video-page .description {
  margin-top: 1.5rem; white-space: pre-line;
  font-size: 0.875rem; color: var(--muted-foreground);
  border-top: 1px solid var(--border); padding-top: 1.5rem;
  max-width: 60rem;
}
.related { margin-top: 4rem; }

/* ---------- Contato ---------- */
.contact-section { border-top: 1px solid var(--border); background: rgba(34, 26, 66, 0.3); }
.contact-inner { max-width: 42rem; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.contact-inner h2 { font-family: var(--font-display); font-size: 1.875rem; letter-spacing: 0.05em; }
.contact-form { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.contact-form label {
  display: flex; flex-direction: column; gap: 0.25rem;
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted-foreground);
}
.contact-form input,
.contact-form textarea {
  width: 100%; border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem; font-family: var(--font-sans);
  color: var(--foreground); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(214, 51, 184, 0.25); }
.contact-form .btn-primary { align-self: flex-start; margin-top: 0; }
.form-success { margin-top: 1rem; font-size: 0.875rem; color: var(--primary-glow); }
.form-error { margin-top: 1rem; font-size: 0.875rem; color: var(--destructive); }

/* ---------- Rodapé ---------- */
.site-footer { border-top: 1px solid var(--border); background: rgba(34, 26, 66, 0.5); }
.footer-inner {
  display: flex; flex-direction: column; gap: 0.75rem;
  padding-top: 2rem; padding-bottom: 2rem;
  font-size: 0.75rem; color: var(--muted-foreground);
}
.footer-inner a:hover { color: var(--foreground); }
@media (min-width: 640px) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- Voltar ao topo ---------- */
#back-to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 50;
  height: 2.75rem; width: 2.75rem; border-radius: 9999px; border: 0; cursor: pointer;
  font-size: 1.25rem; color: var(--primary-foreground);
  background: var(--gradient-primary);
  box-shadow: var(--shadow-cinema);
  opacity: 0; pointer-events: none; transform: translateY(0.5rem);
  transition: opacity 0.3s, transform 0.3s;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------- Páginas simples ---------- */
.page { padding-top: 3.5rem; padding-bottom: 5rem; }
.page h1 { font-family: var(--font-display); font-size: 2.25rem; letter-spacing: 0.05em; }
.page .lead { color: var(--muted-foreground); font-size: 0.875rem; margin-top: 0.25rem; }
.page .grid { margin-top: 2rem; }
.prose { max-width: 48rem; margin-top: 2rem; color: var(--muted-foreground); font-size: 0.9rem; }
.prose h2 { color: var(--foreground); font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.prose p { margin-top: 0.75rem; }
.load-more { margin-top: 2.5rem; }
.alert {
  border: 1px solid var(--destructive); border-radius: var(--radius);
  background: rgba(229, 72, 77, 0.1); color: var(--foreground);
  padding: 1rem 1.25rem; font-size: 0.875rem; margin-top: 2rem;
}
