:root {
  --bg-deep: #050414;
  --bg-surface: #0b0824;
  --neon-cyan: #00d4ff;
  --neon-purple: #9d4edd;
  --neon-magenta: #d946ef;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --gradient-primary: linear-gradient(90deg, #c026d3 0%, #6366f1 50%, #00d4ff 100%);
  --gradient-card: linear-gradient(145deg, rgba(25, 19, 68, 0.85), rgba(10, 8, 30, 0.92));
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(157, 78, 221, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(0, 212, 255, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 50% 85%, rgba(99, 102, 241, 0.12) 0%, transparent 50%);
}

h1, h2, h3, h4, .brand-title { font-family: 'Outfit', sans-serif; }

.cyber-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: -1;
}

/* ================= NAVBAR ================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 5, 24, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(157, 78, 221, 0.25);
  padding: 0.9rem 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand { display: flex; align-items: center; gap: 0.85rem; text-decoration: none; color: var(--text-main); }

.brand-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(192, 38, 211, 0.25), rgba(0, 212, 255, 0.25));
  border: 1px solid rgba(0, 212, 255, 0.5);
  display: grid; place-items: center;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title { font-size: 1.35rem; font-weight: 800; }
.brand-title span { color: var(--neon-cyan); }
.brand-sub { font-size: 0.72rem; color: var(--neon-cyan); }

.nav-links { display: flex; align-items: center; gap: 1.8rem; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-size: 0.92rem; font-weight: 500; transition: color 0.25s; }
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }

.nav-auth { display: flex; align-items: center; gap: 0.85rem; }

.btn-outline, .btn-login-nav {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: var(--text-main);
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.25s;
}
.btn-outline:hover { background: rgba(0, 212, 255, 0.12); border-color: var(--neon-cyan); }

.btn-login-nav {
  background: var(--gradient-primary);
  border: none;
  color: #fff;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(192, 38, 211, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-login-nav:hover { transform: translateY(-2px); box-shadow: 0 0 28px rgba(0, 212, 255, 0.55); }

.btn-lg { padding: 0.85rem 1.4rem; font-size: 0.95rem; }
.btn-full { width: 100%; }

/* HUD Logado */
.user-hud {
  display: flex; align-items: center; gap: 0.85rem;
  background: rgba(16, 13, 46, 0.85);
  border: 1px solid rgba(0, 212, 255, 0.4);
  padding: 0.35rem 0.65rem 0.35rem 0.5rem;
  border-radius: 999px;
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gradient-primary); display: grid; place-items: center; font-weight: 700;
}
.user-stats { display: flex; flex-direction: column; font-size: 0.75rem; line-height: 1.2; }
.user-stats span { color: var(--neon-cyan); }
.btn-logout {
  color: #fda4af; text-decoration: none; font-size: 0.78rem; font-weight: 600;
  padding: 0.3rem 0.65rem; border-radius: 999px;
  background: rgba(244, 63, 94, 0.14); border: 1px solid rgba(244, 63, 94, 0.35);
}

/* ================= CONTAINER & ALERTAS ================= */
.container { max-width: 1280px; margin: 0 auto; padding: 2.5rem 5% 4rem; }

.alert-error {
  background: rgba(244, 63, 94, 0.14); border: 1px solid rgba(244, 63, 94, 0.5);
  color: #fecdd3; padding: 0.85rem 1.2rem; border-radius: 12px; margin-bottom: 1.5rem; font-size: 0.9rem;
}
.alert-success {
  background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.5);
  color: #a7f3d0; padding: 1rem 1.2rem; border-radius: 12px; margin-bottom: 1.5rem; font-size: 0.95rem;
}

/* ================= HERO VITRINE ================= */
.hero {
  border-radius: 24px;
  border: 1px solid rgba(157, 78, 221, 0.35);
  background: linear-gradient(90deg, rgba(6, 5, 22, 0.96) 0%, rgba(12, 9, 38, 0.86) 55%, rgba(20, 12, 56, 0.65) 100%);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.hero-badge {
  display: inline-block;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: var(--neon-cyan);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 { font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 800; line-height: 1.12; margin-bottom: 0.8rem; }
.hero h1 .highlight {
  background: linear-gradient(90deg, #a855f7, #00d4ff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle { font-size: 1.12rem; font-weight: 600; color: #e2e8f0; margin-bottom: 0.5rem; }
.hero-desc { color: var(--text-muted); font-size: 0.96rem; line-height: 1.6; max-width: 580px; margin-bottom: 1.6rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }

.metrics-row {
  display: flex; flex-wrap: wrap; gap: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.metric-item strong { display: block; font-family: 'Outfit', sans-serif; font-size: 1.5rem; color: var(--neon-cyan); }
.metric-item span { font-size: 0.8rem; color: var(--text-muted); }

.hero-visual {
  position: relative; height: 300px; border-radius: 18px;
  background: radial-gradient(circle at center, rgba(157, 78, 221, 0.28), rgba(6, 5, 22, 0.9));
  border: 1px solid rgba(0, 212, 255, 0.25);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hud-pin {
  position: absolute; top: 16%; right: 12%;
  background: rgba(0, 212, 255, 0.14); border: 1px solid var(--neon-cyan);
  padding: 0.4rem 0.8rem; border-radius: 8px; font-size: 0.82rem; font-weight: 600;
}
.hud-quest {
  position: absolute; bottom: 14%; left: 8%; right: 8%;
  background: rgba(16, 13, 46, 0.9); border: 1px solid rgba(217, 70, 239, 0.5);
  padding: 0.75rem 1rem; border-radius: 12px; font-size: 0.8rem;
}
.hud-quest strong { color: var(--neon-magenta); display: block; font-size: 0.72rem; text-transform: uppercase; }

/* ================= SEÇÕES E CATÁLOGO ================= */
.section-header {
  margin-top: 4rem; margin-bottom: 1.8rem;
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem;
}
.section-header h2 { font-size: 1.75rem; font-weight: 700; }
.section-header p { color: var(--text-muted); font-size: 0.92rem; margin-top: 0.25rem; }

.filter-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-muted); padding: 0.45rem 1rem; border-radius: 999px; font-size: 0.82rem; cursor: pointer;
}
.pill.active, .pill:hover { background: rgba(0, 212, 255, 0.14); border-color: var(--neon-cyan); color: #fff; }

.modules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.module-card {
  background: var(--gradient-card);
  border: 1px solid rgba(157, 78, 221, 0.35);
  border-radius: 20px;
  padding: 1.2rem;
  display: flex; flex-direction: column;
  transition: transform 0.25s, border-color 0.25s;
}
.module-card.hidden { display: none; }
.module-card:hover { transform: translateY(-6px); border-color: var(--neon-cyan); }

.module-thumb {
  height: 135px; border-radius: 14px; position: relative;
  margin-bottom: 1.1rem; display: flex; align-items: flex-end; padding: 0.8rem;
}
.thumb-1 { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #0284c7 100%); }
.thumb-2 { background: linear-gradient(135deg, #2e1065 0%, #6d28d9 55%, #c026d3 100%); }
.thumb-3 { background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #06b6d4 100%); }

.module-tags {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; justify-content: space-between; gap: 0.4rem;
}
.tag-level {
  background: rgba(5, 4, 20, 0.78); border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.25rem 0.55rem; border-radius: 6px; font-size: 0.7rem; font-weight: 600;
}
.tag-xp {
  background: rgba(0, 212, 255, 0.2); border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan); padding: 0.25rem 0.55rem; border-radius: 6px; font-size: 0.7rem; font-weight: 700;
}
.thumb-footer-badge {
  display: flex; gap: 0.8rem; font-size: 0.74rem; color: #e2e8f0;
  background: rgba(5, 4, 20, 0.65); padding: 0.3rem 0.65rem; border-radius: 6px;
}

.module-card h3 { font-size: 1.12rem; margin-bottom: 0.5rem; }
.module-card p { color: var(--text-muted); font-size: 0.87rem; line-height: 1.5; margin-bottom: 1.25rem; flex-grow: 1; }

.btn-start {
  width: 100%; padding: 0.72rem 1rem; border-radius: 999px;
  background: rgba(15, 12, 41, 0.8); border: 1px solid rgba(157, 78, 221, 0.6);
  color: #fff; font-family: 'Outfit', sans-serif; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; text-align: center; text-decoration: none; display: block; transition: all 0.25s;
}
.btn-start:hover { background: var(--gradient-primary); border-color: transparent; }

/* ================= COMO FUNCIONA ================= */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.step-card {
  background: rgba(13, 10, 38, 0.75); border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: 18px; padding: 1.6rem;
}
.step-num {
  font-family: 'Outfit', sans-serif; font-size: 2rem; font-weight: 800;
  color: var(--neon-cyan); display: block; margin-bottom: 0.6rem;
}
.step-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.step-card p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.55; }

/* ================= PLANOS ================= */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch; }
.pricing-card {
  background: var(--gradient-card); border: 1px solid rgba(157, 78, 221, 0.3);
  border-radius: 20px; padding: 2rem 1.5rem; display: flex; flex-direction: column;
}
.pricing-card.featured {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 35px rgba(0, 212, 255, 0.16);
}
.plan-badge {
  align-self: flex-start; font-size: 0.75rem; font-weight: 700;
  padding: 0.25rem 0.7rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); margin-bottom: 0.9rem;
}
.highlight-badge { background: rgba(0, 212, 255, 0.2); color: var(--neon-cyan); border: 1px solid var(--neon-cyan); }
.pricing-card h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.plan-desc { color: var(--text-muted); font-size: 0.86rem; margin-bottom: 1.4rem; }
.plan-features { list-style: none; margin-bottom: 1.8rem; flex-grow: 1; }
.plan-features li { font-size: 0.88rem; color: #e2e8f0; margin-bottom: 0.65rem; }

/* ================= SEÇÃO DEMO / CONTATO ================= */
.demo-section { margin-top: 4rem; }
.demo-box {
  background: linear-gradient(135deg, rgba(20, 14, 54, 0.9), rgba(8, 6, 26, 0.95));
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: 24px;
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}
.demo-info h2 { font-size: 1.85rem; margin-bottom: 0.7rem; }
.demo-info p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.inst-segments { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.segment-item { font-size: 0.86rem; color: #e2e8f0; }

.site-footer {
  text-align: center; padding: 2rem 5%; color: var(--text-muted); font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ================= FORMULÁRIOS, MODAIS & LOGIN CENTRALIZADO ================= */
.login-page-wrapper {
  width: 100%;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.2rem;
}

.modal-overlay {
  position: fixed; inset: 0; background: rgba(3, 2, 12, 0.8); backdrop-filter: blur(10px);
  display: none; align-items: center; justify-content: center; z-index: 999; padding: 1rem;
}
.modal-overlay.open { display: flex; }

.login-modal {
  width: 100%; max-width: 430px; margin: 0 auto;
  background: linear-gradient(160deg, #110c33 0%, #07051a 100%);
  border: 1px solid rgba(0, 212, 255, 0.45);
  border-radius: 22px; padding: 2rem; position: relative;
  box-shadow: 0 0 50px rgba(157, 78, 221, 0.3);
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255, 255, 255, 0.06); border: none; color: #cbd5e1;
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
}
.login-modal h3 { font-size: 1.45rem; margin-bottom: 0.3rem; }
.login-modal .modal-sub { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.4rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.82rem; color: #cbd5e1; margin-bottom: 0.4rem; }

.input-wrap input, .input-wrap select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #fff;
  padding: 0.78rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  outline: none;
}
.input-wrap select option { background: #0b0824; color: #fff; }
.input-wrap input:focus, .input-wrap select:focus { border-color: var(--neon-cyan); }

.btn-submit {
  width: 100%; margin-top: 0.5rem; padding: 0.85rem; border: none; border-radius: 12px;
  background: var(--gradient-primary); color: #fff; font-family: 'Outfit', sans-serif;
  font-size: 1rem; font-weight: 700; cursor: pointer;
}

/* ================= RESPONSIVIDADE (TABLET & CELULAR) ================= */
@media (max-width: 992px) {
  .hero, .demo-box { grid-template-columns: 1fr; padding: 2rem; }
  .modules-grid, .steps-grid, .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  .modules-grid, .steps-grid, .pricing-grid { grid-template-columns: 1fr; }
  .hero { padding: 1.5rem; }
  .hero-visual { height: 210px; }
  .navbar .btn-outline { padding: 0.45rem 0.75rem; font-size: 0.8rem; }
  .login-page-wrapper { min-height: calc(100vh - 72px); padding: 1.25rem 1rem; }
  .login-page-wrapper .login-modal { padding: 1.5rem 1.25rem; }
}

/* Suporte para imagens dentro dos cards de matéria */
.module-thumb {
  height: 155px; /* Um pouco mais alto para destacar a foto */
  overflow: hidden;
}

.thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ajusta a foto sem distorcer */
  z-index: 0;
  transition: transform 0.35s ease;
}

.module-card:hover .thumb-img {
  transform: scale(1.06); /* Efeito sutil de zoom ao passar o mouse */
}

/* Sombra suave sobre a imagem para destacar os textos */
.thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 4, 20, 0.35) 0%, rgba(5, 4, 20, 0.78) 100%);
  z-index: 1;
}

/* Garante que as etiquetas fiquem acima da imagem e do overlay */
.module-tags,
.thumb-footer-badge {
  position: relative;
  z-index: 2;
}
.module-tags {
  position: absolute;
}