/* Base layout */
* { box-sizing: border-box; }
:root {
  --bg: #0e0f12;
  --text: #eef1f5;
  --muted: #a7afc0;
  --card: #1a1d24;
  --accent: #4fd1c5;
  --badge: #ffd166;
}
html, body {
  height: 100%;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Top hero (roxo) */
.top-hero {
  background: var(--top-bg, #6c1fe8);
  padding: 40px 0 30px;
}
.hero-wrap {
  display: grid;
  justify-items: center;
  gap: 16px;
}
.hero-image {
  width: 480px;
  max-width: 90vw;
  border-radius: 22px;
  display: block;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.hero-placeholder {
  width: 360px;
  height: 220px;
  max-width: 90vw;
  border-radius: 22px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
}
.hero-title {
  margin: 6px 0 8px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.hero-menu {
  display: grid;
  grid-auto-flow: column;
  gap: 18px;
  align-items: center;
}
.hero-btn { display: inline-block; text-decoration: none; }
.hero-btn img { width: 90px; height: 90px; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 0; display: block; }
.hero-btn:hover { transform: translateY(-2px); box-shadow: none; }
.hero-btn-text { color: #fff; font-weight: 700; font-size: 12px; }
.admin-entry { color: #fff; opacity: 0.85; text-decoration: none; }
.admin-entry:hover { text-decoration: underline; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 24px 0 40px;
}
.empty {
  margin: 32px 0;
  color: var(--muted);
}

/* Card */
.card {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid #262b36;
  text-decoration: none;
  color: inherit;
}
.card:hover {
  border-color: #334054;
  transform: translateY(-2px);
  transition: transform 160ms ease, border-color 160ms ease;
}
.card-image {
  width: 100%;
  height: 160px;
  object-fit: contain; /* não cortar a imagem */
  display: block;
  background: #14161c; /* barras laterais quando necessário */
}
.card-placeholder {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.card-info {
  display: none;
}
.card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.badge {
  background: var(--badge);
  color: #111;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

/* Footer */
.site-footer {
  border-top: 1px solid #22262f;
  color: var(--muted);
}
.site-footer .container {
  padding: 16px;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: start; }
.footer-section { background: #14161c; border: 1px solid #22262f; border-radius: 12px; padding: 14px; }
.footer-title { margin: 0 0 6px; color: #fff; font-size: 16px; }
.footer-text { margin: 0 0 10px; color: var(--muted); }
.footer-icons { display: flex; gap: 12px; align-items: center; }
.footer-icon { width: 72px; height: 72px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #2b3441; color: #e5e7eb; text-decoration: none; }
.footer-icon:hover { background: #3a4554; }
.footer-icon svg { width: 36px; height: 36px; display: block; }
.footer-copy { text-align: center; padding: 12px 16px; border-top: 1px solid #22262f; color: #c7cfdd; }

/* Progress bar under cards */
.progress { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.progress .bar { flex: 1; height: 16px; background: #e6e6e6; border-radius: 10px; overflow: hidden; position: relative; }
.progress .bar .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; background: linear-gradient(90deg, #22c55e, #f59e0b); transition: width 0.2s ease; }
.progress .percent { min-width: 44px; text-align: center; color: #fff; font-weight: 700; }

/* Mobile: duas colunas e imagens sem corte */
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card-image { height: 150px; object-fit: contain; }
}

/* CTA substituindo porcentagem para convidados */
.cta-box { display: none; padding: 10px 12px; border-top: 1px solid #22262f; background: #14161c; }
.cta-message { margin: 0 0 8px; color: #fff; font-weight: 700; }
.cta-button { width: 100%; border: 0; border-radius: 10px; padding: 12px; font-size: 16px; font-weight: 800; cursor: pointer; color: #0b1a12;
  background: linear-gradient(90deg, #34d399, #22c55e);
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: pulseGlow 2s ease-in-out infinite; }
.cta-button:hover { filter: brightness(1.05); }
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
  70% { box-shadow: 0 0 0 12px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* Alternância entre progresso e CTA conforme login */
.guest .progress { display: none; }
.guest .cta-box { display: block; }
.logged .cta-box { display: none; }

/* Modal básico para cadastro/login */
.modal { display: none; position: fixed; inset: 0; z-index: 50; }
.modal.show { display: block; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.modal-content { position: relative; width: 92vw; max-width: 420px; margin: 10vh auto; background: #1a1d24; border: 1px solid #2a2f3a; border-radius: 16px; padding: 18px; color: #eef1f5; }
.modal-close { position: absolute; top: 8px; right: 10px; background: transparent; border: 0; color: #eef1f5; font-size: 22px; cursor: pointer; }
.modal .form { display: grid; gap: 10px; }
.modal .form input { background: #11151b; border: 1px solid #2a2f3a; border-radius: 10px; padding: 10px 12px; color: #eef1f5; }
.modal .form .btn.primary { background: linear-gradient(90deg, #8b5cf6, #7c3aed); color: #fff; border: 0; padding: 12px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.modal .form-feedback { margin: 0; color: #ffd166; font-size: 14px; }
.modal .highlight { color: #34d399; }
.modal .modal-switch { margin: 0 0 10px; color: #c7cfdd; }