:root {
  --bg-dark: #0f172a;
  --bg-darker: #0b1120;
  --bg-light: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #0ea5e9;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg-light);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Cabeçalho */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
}
.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.brand span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: #fff; }

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid #334155;
  color: #fff;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: rgba(37, 99, 235, 0.08); }
.btn-light { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.btn-light:hover { background: rgba(255, 255, 255, 0.18); }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--bg-darker) 0%, #1e293b 100%);
  color: #fff;
  padding: 5rem 0 4.5rem;
}
.hero-content { max-width: 740px; }
.hero-tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.15);
  color: #7dd3fc;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 0 2rem;
  color: #cbd5e1;
  font-size: 1.1rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* Seções */
.section { padding: 4rem 0; }
.section-alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2rem;
}
.section-head h2 { margin: 0 0 0.35rem; font-size: 1.75rem; letter-spacing: -0.01em; }
.section-head p { margin: 0; color: var(--muted); }

/* Filtros */
.filtros { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filtro-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.filtro-btn.ativo, .filtro-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Grids e Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}
.card-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #e2e8f0;
  display: block;
}
.card-placeholder {
  width: 100%;
  height: 190px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #94a3b8;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #eff6ff;
  color: var(--primary);
}
.badge-destaque { background: #fef3c7; color: #92400e; }
.card h3 { margin: 0 0 0.5rem; font-size: 1.18rem; line-height: 1.3; }
.card p { margin: 0 0 1rem; color: var(--muted); font-size: 0.94rem; }

.preco-box {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-bottom: 1rem;
}
.preco-valor { font-size: 1.35rem; font-weight: 800; color: var(--text); }
.preco-rotulo { font-size: 0.84rem; color: var(--muted); margin-left: 0.35rem; }

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.tag {
  font-size: 0.76rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
}

/* Lista de Downloads */
.download-list { display: grid; gap: 0.9rem; }
.download-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.download-info h3 { margin: 0 0 0.25rem; font-size: 1.08rem; }
.download-info p { margin: 0 0 0.4rem; color: var(--muted); font-size: 0.92rem; }
.download-meta { font-size: 0.82rem; color: #64748b; display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Estado vazio */
.vazio {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

/* Rodapé */
.footer {
  background: var(--bg-darker);
  color: #94a3b8;
  padding: 2.5rem 0;
  font-size: 0.9rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer a { color: #cbd5e1; text-decoration: none; }
.footer a:hover { color: #fff; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: none;
  place-items: center;
  padding: 1rem;
  z-index: 100;
}
.modal-backdrop.aberto { display: grid; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
}
.modal-header h3 { margin: 0; font-size: 1.25rem; }
.modal-close {
  background: #f1f5f9;
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
}
.modal-body { padding: 1.4rem; }
.modal-body img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.modal-texto { white-space: pre-line; color: #334155; }
.modal-footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .menu-toggle { display: inline-block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-links.aberto { display: flex; }
}

/* Galeria no modal */
.modal-stage {
  position: relative;
  margin-bottom: 0.75rem;
}
.modal-stage img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #0f172a;
  border-radius: 8px;
  margin-bottom: 0;
  display: block;
}
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.modal-nav:hover { background: rgba(15, 23, 42, 0.95); }
.modal-nav.prev { left: 10px; }
.modal-nav.next { right: 10px; }

.modal-galeria {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
}
.modal-thumb {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  opacity: 0.65;
  cursor: pointer;
  flex-shrink: 0;
  margin-bottom: 0 !important;
}
.modal-thumb.ativa,
.modal-thumb:hover {
  border-color: var(--primary);
  opacity: 1;
}