/* ==========================================================================
   Código da Reconquista — Área de Membros
   Tema inspirado na área de membros da Kiwify (dark, zinc, capas verticais)
   ========================================================================== */

:root {
  --bg: #09090b;
  --sidebar: #0b0f13;
  --surface: #18181b;
  --surface-2: #1f1f23;
  --surface-3: #27272a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #fafafa;
  --muted: #a1a1aa;
  --subtle: #71717a;
  --primary: #3b82f6;
  --primary-rgb: 59, 130, 246;
  --success: #22c55e;
  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-w: 256px;
  --sidebar-w-collapsed: 76px;
  --bottom-nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-card: 0 18px 40px -12px rgba(0, 0, 0, 0.75);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.9);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection {
  background: rgba(var(--primary-rgb), 0.45);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm { width: 16px; height: 16px; }
.icon-xs { width: 14px; height: 14px; }
.icon-lg { width: 28px; height: 28px; }
.icon-fill { fill: currentColor; stroke: none; }

/* ---------- Layout shell ---------- */

.shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: none;
  flex-direction: column;
  z-index: 40;
  transition: width 0.3s var(--ease);
}

.main {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 24px);
}

@media (min-width: 1024px) {
  .sidebar { display: flex; }
  .main {
    margin-left: var(--sidebar-w);
    padding-bottom: 48px;
    transition: margin-left 0.3s var(--ease);
  }
  .bottom-nav, .topbar { display: none !important; }
  .shell.is-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
  .shell.is-collapsed .main { margin-left: var(--sidebar-w-collapsed); }
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px 18px;
  min-height: 76px;
}
.sidebar__brand img {
  max-height: 40px;
  max-width: 100%;
  object-fit: contain;
}
.brand-text {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(var(--primary-rgb), 0.14);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.nav-item.is-active { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}
.nav-item .badge { margin-left: auto; }

.badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.sidebar__section-label {
  padding: 18px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.sidebar__footer {
  border-top: 1px solid var(--border);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius);
  min-width: 0;
  text-align: left;
  width: 100%;
  transition: background 0.15s;
}
.user-chip:hover { background: rgba(255, 255, 255, 0.05); }
.user-chip__meta { min-width: 0; }
.user-chip__name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-chip__email {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.9), rgba(var(--primary-rgb), 0.45));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  text-transform: uppercase;
}
.avatar--lg { width: 72px; height: 72px; font-size: 28px; }

.collapse-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--subtle);
  font-size: 13px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.collapse-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.shell.is-collapsed .collapse-btn .icon { transform: rotate(180deg); }

.footer-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--subtle);
  font-size: 13px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  width: 100%;
}
.footer-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.shell.is-collapsed .sidebar .footer-btn { justify-content: center; padding: 0; }

.shell.is-collapsed .sidebar .nav-label,
.shell.is-collapsed .sidebar .brand-text,
.shell.is-collapsed .sidebar .sidebar__section-label,
.shell.is-collapsed .sidebar .user-chip__meta,
.shell.is-collapsed .sidebar .sidebar__brand img { display: none; }
.shell.is-collapsed .sidebar .nav-item,
.shell.is-collapsed .sidebar .collapse-btn { justify-content: center; padding: 0; }
.shell.is-collapsed .sidebar .user-chip { justify-content: center; }
.shell.is-collapsed .sidebar .sidebar__brand { justify-content: center; padding-left: 0; padding-right: 0; }
.shell.is-collapsed .sidebar .nav-item .badge {
  position: absolute;
  top: 6px;
  right: 14px;
  margin: 0;
}
.shell:not(.is-collapsed) .sidebar .brand-mark--collapsed { display: none; }
.shell.is-collapsed .sidebar .brand-mark--collapsed { display: grid; }

/* ---------- Mobile top bar + bottom nav ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 60px;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  background: rgba(9, 9, 11, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.topbar.is-scrolled { border-bottom-color: var(--border); background: rgba(9, 9, 11, 0.9); }
.topbar--overlay {
  position: fixed;
  inset: 0 0 auto 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.topbar--overlay.is-scrolled {
  background: rgba(9, 9, 11, 0.9);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}
.topbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.topbar__brand img { max-height: 30px; max-width: 150px; object-fit: contain; }
.topbar__brand .brand-text { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__title {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--text);
  flex-shrink: 0;
  transition: background 0.15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
.icon-btn .badge { position: absolute; top: 4px; right: 2px; }
.icon-btn--glass {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.icon-btn--glass:hover { background: rgba(0, 0, 0, 0.7); }

.bottom-nav {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: flex;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(9, 9, 11, 0.86);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--border);
}
.bottom-nav__item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--subtle);
  transition: color 0.15s;
}
.bottom-nav__item .icon { width: 24px; height: 24px; }
.bottom-nav__item.is-active { color: var(--text); }
.bottom-nav__item.is-active .icon { color: var(--primary); }
.bottom-nav__item .badge { position: absolute; top: 8px; left: calc(50% + 6px); }

/* Pisca no ícone de Postagens quando chega uma postagem nova (ex: a
   mensagem de marco do Enrico) — chama atenção até o lead abrir a aba. */
.ping {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--sidebar);
  animation: pingBlink 1.1s ease-in-out infinite;
}
.nav-item .ping { top: 4px; left: 24px; }
.bottom-nav__item .ping { top: 4px; left: calc(50% + 6px); box-shadow: 0 0 0 2px var(--bg); }
.nav-item.is-blinking .icon,
.bottom-nav__item.is-blinking .icon { animation: iconPulse 1.1s ease-in-out infinite; color: var(--primary); }
@keyframes pingBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.25; transform: scale(1.5); }
}
@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

/* ---------- Notifications popover ---------- */

.popover {
  position: fixed;
  z-index: 60;
  width: min(360px, calc(100vw - 24px));
  max-height: min(480px, 70vh);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  animation: pop-in 0.18s var(--ease);
  transform-origin: top right;
}
.popover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
}
.popover__body { overflow-y: auto; }
.notif {
  display: flex;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.notif:last-child { border-bottom: 0; }
.notif:hover { background: rgba(255, 255, 255, 0.04); }
.notif__icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(var(--primary-rgb), 0.14);
  color: var(--primary);
  flex-shrink: 0;
}
.notif__title { font-size: 13px; font-weight: 600; line-height: 1.35; }
.notif__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.notif__time { font-size: 11px; color: var(--subtle); margin-top: 4px; }
.popover__empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.popover__empty .icon { margin: 0 auto 10px; width: 28px; height: 28px; color: var(--subtle); }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: transparent;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- Centered popover (ex.: instruções de instalar no iPhone) ---------- */

.popover--center {
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  animation: pop-in-center 0.18s var(--ease);
}
.scrim#ios-install-scrim { background: rgba(0, 0, 0, 0.5); }

@keyframes pop-in-center {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.ios-steps { display: flex; flex-direction: column; gap: 14px; }
.ios-steps li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.5; color: var(--text); }
.ios-steps .icon { flex-shrink: 0; margin-top: 2px; color: var(--primary); }

/* ---------- Indicador "ao vivo" + reações da aula ---------- */

.live-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(34, 197, 94, 0.08);
  border-bottom: 1px solid var(--border);
}
.live-strip strong { color: var(--text); font-weight: 700; }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.live-badge strong { color: var(--text); font-weight: 700; }

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  flex-shrink: 0;
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.lesson-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.reactions { display: inline-flex; align-items: center; gap: 8px; }
.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.reaction-btn:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.reaction-btn .icon { width: 14px; height: 14px; }
.reaction-btn[data-reaction="like"].is-active {
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.12);
}
.reaction-btn[data-reaction="dislike"].is-active {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.12);
}

/* ---------- Page scaffolding ---------- */

.page {
  animation: page-in 0.35s var(--ease);
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 768px) { .container { padding: 0 32px; } }
@media (min-width: 1280px) { .container { padding: 0 48px; } }

.container--narrow { max-width: 820px; }

.page-head {
  padding-top: 28px;
  padding-bottom: 8px;
}
@media (min-width: 1024px) { .page-head { padding-top: 44px; } }
.page-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
@media (min-width: 768px) { .page-title { font-size: 30px; } }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------- Hero banner ---------- */

.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 72vh;
  overflow: hidden;
  background: #000;
}
@media (max-width: 767px) {
  .hero, .course-hero .hero { aspect-ratio: auto; min-height: min(82vh, 600px); max-height: none; }
  .hero__img { object-position: center 30%; }
}
@media (min-width: 768px) { .hero { aspect-ratio: 1740 / 680; min-height: 440px; } }
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  animation: hero-zoom 1.4s var(--ease);
}
@keyframes hero-zoom {
  from { transform: scale(1.04); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}
.hero__img--blur {
  filter: blur(42px) saturate(140%) brightness(0.55);
  transform: scale(1.3);
  animation: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(9, 9, 11, 0.72) 24%, rgba(9, 9, 11, 0) 58%),
    linear-gradient(to right, rgba(9, 9, 11, 0.7) 0%, rgba(9, 9, 11, 0) 55%);
  pointer-events: none;
}
.hero__content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding-bottom: 28px;
}
@media (min-width: 768px) { .hero__content { padding-bottom: 48px; } }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 8px;
}
.hero__title {
  font-size: clamp(26px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 720px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}
.hero__desc {
  margin-top: 12px;
  max-width: 560px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero__meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.hero__meta .dot { width: 3px; height: 3px; border-radius: 999px; background: currentColor; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s, transform 0.15s var(--ease), opacity 0.15s, border-color 0.15s;
  user-select: none;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn--white { background: #fff; color: #09090b; }
.btn--white:hover { background: rgba(255, 255, 255, 0.86); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { filter: brightness(1.1); }
.btn--ghost { background: rgba(255, 255, 255, 0.1); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.16); }
.btn--outline { border: 1px solid var(--border-strong); color: var(--text); }
.btn--outline:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.24); }
.btn--success { background: rgba(34, 197, 94, 0.12); color: var(--success); border: 1px solid rgba(34, 197, 94, 0.28); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn--lg { height: 50px; padding: 0 26px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--wrap { white-space: normal; height: auto; min-height: 44px; padding-top: 10px; padding-bottom: 10px; text-align: center; }

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
.spinner--lg { width: 32px; height: 32px; border-width: 3px; color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

.page-loading {
  display: grid;
  place-items: center;
  min-height: 60vh;
}

/* ---------- Sections + carousels (Kiwify) ---------- */

.section { margin-top: 36px; }
.section:first-child { margin-top: 24px; }
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.section__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.section__sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.section__controls { display: none; gap: 8px; }
@media (min-width: 768px) { .section__controls { display: flex; } }
.arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  color: var(--text);
  transition: background 0.15s, opacity 0.15s;
}
.arrow-btn:hover { background: rgba(255, 255, 255, 0.08); }
.arrow-btn[disabled] { opacity: 0.3; pointer-events: none; }

.rail-wrap { position: relative; }
.rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  padding: 6px 16px 14px;
  margin: 0 -16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .rail { gap: 20px; padding: 8px 32px 18px; margin: 0 -32px; scroll-padding: 0 32px; }
}
@media (min-width: 1280px) {
  .rail { padding: 8px 48px 18px; margin: 0 -48px; scroll-padding: 0 48px; }
}
.rail > * { scroll-snap-align: start; }

/* Vertical poster card — Kiwify 256×384 */
.poster {
  position: relative;
  flex: 0 0 auto;
  width: 44vw;
  max-width: 256px;
  text-align: left;
  border-radius: var(--radius);
  outline-offset: 3px;
}
@media (min-width: 640px) { .poster { width: 210px; } }
@media (min-width: 1024px) { .poster { width: 236px; } }
@media (min-width: 1440px) { .poster { width: 256px; } }
.poster__frame {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.poster:hover .poster__frame {
  transform: translateY(-4px) scale(1.025);
  box-shadow: 0 0 0 1px var(--border-strong), var(--shadow-card);
}
.poster__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s, transform 0.6s var(--ease), filter 0.3s;
}
.poster__img.is-loaded { opacity: 1; }
.poster:hover .poster__img { transform: scale(1.04); }
.poster__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  padding: 18px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(var(--primary-rgb), 0.35), transparent 60%),
    linear-gradient(160deg, #1f1f23, #0d0d10);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.poster__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.55) 26%, rgba(0, 0, 0, 0) 52%);
  pointer-events: none;
}
.poster__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 14px 16px;
  z-index: 2;
}
.poster__kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}
.poster__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
@media (min-width: 768px) { .poster__title { font-size: 17px; } }
.poster__progress {
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  background: rgba(255, 255, 255, 0.18);
  z-index: 3;
}
.poster__progress > span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
  transition: width 0.6s var(--ease);
}
.poster__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.25s;
}
.poster__play span {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #09090b;
  display: grid;
  place-items: center;
  transform: scale(0.85);
  transition: transform 0.3s var(--ease);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.poster:hover .poster__play { opacity: 1; }
.poster:hover .poster__play span { transform: none; }
.poster.is-locked .poster__img { filter: grayscale(0.6) brightness(0.45); }
.poster__lock {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}
.chip--done { background: rgba(34, 197, 94, 0.92); color: #052e14; }
.chip--primary { background: var(--primary); }
.poster__cta { margin-top: 10px; }
.poster__index {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
}

/* Landscape card (Continue watching / lessons with 16:9) */
.landscape {
  flex: 0 0 auto;
  width: 72vw;
  max-width: 340px;
  text-align: left;
}
@media (min-width: 768px) { .landscape { width: 320px; } }
.landscape__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.landscape:hover .landscape__frame { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--border-strong), var(--shadow-card); }
.landscape__frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.landscape__meta { margin-top: 10px; }
.landscape__title { font-size: 14px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.landscape__sub { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Skeletons ---------- */

.skel {
  background: linear-gradient(90deg, #141417 0%, #1d1d21 40%, #141417 80%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-poster { aspect-ratio: 2 / 3; }
.skel-line { height: 14px; border-radius: 6px; }

/* ---------- Product (course) page ---------- */

.course-hero { position: relative; }
.course-hero .hero { aspect-ratio: 16 / 11; }
@media (min-width: 768px) { .course-hero .hero { aspect-ratio: 1740 / 600; min-height: 480px; } }

.course-head {
  display: grid;
  gap: 24px;
  align-items: end;
}
.course-cover {
  display: none;
  width: 190px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border-strong), 0 30px 60px -20px rgba(0, 0, 0, 0.9);
}
.course-cover img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 768px) {
  .course-head { grid-template-columns: auto 1fr; gap: 32px; }
  .course-cover { display: block; }
}

.progress-card {
  margin-top: 18px;
  max-width: 520px;
}
.progress-card__row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.progress-card__row strong { color: var(--text); font-weight: 700; }
.bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  box-shadow: 0 0 12px rgba(var(--primary-rgb), 0.6);
  transition: width 0.8s var(--ease);
}
.bar--thin { height: 4px; }

/* Banners from admin */
.banners { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 768px) { .banners { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
.banner {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.banner:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--border-strong), var(--shadow-card); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner--horizontal { aspect-ratio: 16 / 5; grid-column: 1 / -1; }
.banner--square { aspect-ratio: 1; max-width: 440px; }
.banner--vertical { aspect-ratio: 2 / 3; max-width: 300px; }
.banner__label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 18px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  font-weight: 700;
  font-size: 15px;
}

/* Module selector + lesson list (Kiwify drawer) */
.module-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.module-tabs::-webkit-scrollbar { display: none; }

.select {
  position: relative;
  width: 100%;
  max-width: 560px;
}
.select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 50px;
  padding: 0 44px 0 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  text-overflow: ellipsis;
}
.select select:hover { border-color: rgba(255, 255, 255, 0.24); }
.select .icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
}

.lesson-list {
  margin-top: 14px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #111114;
}
.lesson-row {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.lesson-row:last-child { border-bottom: 0; }
.lesson-row:hover { background: rgba(255, 255, 255, 0.035); }
.lesson-row.is-current { background: rgba(255, 255, 255, 0.06); }
.lesson-row.is-current::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
}
.lesson-row.is-locked { cursor: not-allowed; }
.lesson-row.is-locked .lesson-row__thumb img { filter: grayscale(0.8) brightness(0.5); }
.lesson-row.is-locked .lesson-row__title { color: var(--muted); }

.check {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
  color: transparent;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.check:hover { border-color: rgba(255, 255, 255, 0.5); }
.check.is-checked { background: #e4e4e7; border-color: #e4e4e7; color: #09090b; }
.check.is-checked:hover { background: #fff; }
.check.is-locked { border-style: dashed; color: var(--subtle); }
.check:active { transform: scale(0.9); }

.lesson-row__thumb {
  position: relative;
  width: 112px;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-2);
  flex-shrink: 0;
}
@media (min-width: 768px) { .lesson-row__thumb { width: 132px; } }
.lesson-row__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.lesson-row__thumb .type-ico {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.25);
}
.lesson-row__bar {
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--primary);
}
.lesson-row__body { min-width: 0; }
.lesson-row__title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lesson-row__desc {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lesson-row__aside {
  font-size: 13px;
  color: var(--subtle);
  white-space: nowrap;
  align-self: start;
  padding-top: 2px;
}
.lesson-row__lock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 520px) {
  .lesson-row { grid-template-columns: auto auto 1fr; gap: 12px; padding: 12px; }
  .lesson-row__aside { display: none; }
  .lesson-row__thumb { width: 96px; }
  .lesson-row__title { font-size: 14px; }
  .lesson-row__desc { -webkit-line-clamp: 2; font-size: 12px; }
}

.module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
.module-head .bar { flex: 1; max-width: 200px; }

/* ---------- Lesson (watch) page ---------- */

.watch {
  display: grid;
  gap: 0;
}
@media (min-width: 1200px) {
  .watch {
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 28px;
    padding: 28px 32px 0;
    max-width: 1680px;
    margin: 0 auto;
  }
}
.player-wrap {
  position: relative;
  background: #000;
}
@media (min-width: 1200px) {
  .player-wrap { border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 0 0 1px var(--border); }
}
.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.player iframe,
.player video,
.player .vturb-embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .vturb-embed { position: relative; height: auto; min-height: 100%; }
.player--embed { aspect-ratio: auto; min-height: 200px; }
.player--pdf { aspect-ratio: auto; height: 78vh; min-height: 420px; background: #1a1a1d; }
.player--image { aspect-ratio: auto; }
.player--image img { width: 100%; max-height: 72vh; object-fit: contain; margin: 0 auto; }
.player__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 24px;
}
.player__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s;
}
.player-wrap:hover .player__nav { opacity: 1; }
.player__nav--prev { left: 12px; }
.player__nav--next { right: 12px; }
@media (hover: none) { .player__nav { display: none; } }

.watch-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: #000;
}
@media (min-width: 1200px) { .watch-topbar { display: none; } }

.watch__info { padding: 20px 16px 0; }
@media (min-width: 768px) { .watch__info { padding: 24px 32px 0; } }
@media (min-width: 1200px) { .watch__info { padding: 24px 0 0; } }
.crumbs {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.crumbs a:hover { color: var(--text); }
@media (min-width: 1200px) { .crumbs { display: flex; } }

.watch__module {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--subtle);
  line-height: 1.5;
}
.watch__title {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
@media (min-width: 768px) { .watch__title { font-size: 28px; } }

.watch__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
@media (max-width: 640px) {
  .watch__actions .btn { flex: 1 1 100%; }
}

.tabs {
  display: flex;
  gap: 4px;
  margin-top: 24px;
  border-bottom: 1px solid var(--border);
}
.tab {
  position: relative;
  padding: 12px 6px;
  margin-right: 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--subtle);
  transition: color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); }
.tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}
.tab .badge { margin-left: 6px; background: var(--surface-3); color: var(--muted); }
@media (min-width: 1200px) { .tab--lessons { display: none; } }

.tab-panel { padding: 20px 0 8px; }

.prose {
  font-size: 15px;
  line-height: 1.7;
  color: #d4d4d8;
  white-space: pre-line;
  word-wrap: break-word;
  max-width: 760px;
}
.prose strong { color: var(--text); font-weight: 700; }
.prose a { color: #fff; text-decoration: underline; text-decoration-color: rgba(var(--primary-rgb), 0.8); text-underline-offset: 3px; }
.prose--empty { color: var(--subtle); }

.content-image {
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 760px;
  box-shadow: 0 0 0 1px var(--border);
}
.content-image img { width: 100%; max-height: 520px; object-fit: cover; }

.attach {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
  padding: 14px 16px;
  margin-top: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.attach:hover { border-color: var(--border-strong); background: var(--surface-2); }
.attach__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(var(--primary-rgb), 0.14);
  color: var(--primary);
  flex-shrink: 0;
}
.attach__title { font-size: 14px; font-weight: 600; }
.attach__sub { font-size: 12px; color: var(--muted); }
.attach > .icon:last-child { margin-left: auto; color: var(--subtle); }

.watch__side {
  display: none;
}
@media (min-width: 1200px) {
  .watch__side {
    display: block;
    position: sticky;
    top: 28px;
    align-self: start;
    max-height: calc(100vh - 56px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: #111114;
    overflow: hidden;
  }
}
.side__head {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.side__title { font-size: 15px; font-weight: 600; }
.side__meta { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.side__head .select select { height: 42px; font-size: 13px; }
.side__list { overflow-y: auto; max-height: calc(100vh - 220px); }
.side__list .lesson-row { grid-template-columns: auto auto 1fr; padding: 12px 14px; gap: 12px; }
.side__list .lesson-row__thumb { width: 92px; }
.side__list .lesson-row__aside { display: none; }
.side__list .lesson-row__title { font-size: 13px; }
.side__list .lesson-row__desc { display: none; }
.side__list .check { width: 20px; height: 20px; }

/* ---------- Locked product ---------- */

.locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 56px 16px 24px;
  max-width: 520px;
  margin: 0 auto;
}
.locked__icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary);
}
.locked h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.locked p { color: var(--muted); font-size: 15px; }

/* ---------- Cards / posts / account ---------- */

.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.post-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 20px 22px;
  transition: border-color 0.2s, background 0.2s, transform 0.3s var(--ease);
}
.post-card:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-2px); }
.post-card__date { font-size: 12px; color: var(--subtle); display: flex; align-items: center; gap: 6px; }
.post-card__title { margin-top: 6px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.post-card__excerpt {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}
.post-card__more { margin-top: 12px; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--text); }
.stack { display: grid; gap: 12px; }

/* O card da postagem pulsa igual ao ícone de Postagens no menu, até o
   lead abrir e ela ser marcada como vista. */
.post-card.is-new { border-color: var(--primary); animation: cardGlow 1.4s ease-in-out infinite; }
.post-card__new {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  animation: pingBlink 1.1s ease-in-out infinite;
}
@keyframes cardGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.35); }
  50% { box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.9), 0 0 18px rgba(var(--primary-rgb), 0.35); }
}

.post-author { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.post-author__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.post-author__avatar--fallback {
  display: inline-grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
}
.post-author__name { font-size: 14px; font-weight: 600; color: var(--text); }

.post-article { padding: 28px 0 40px; }
.post-article h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; margin-top: 10px; }
.post-article .post-author { margin-top: 14px; margin-bottom: 0; }
.post-article .post-card__date { margin-top: 8px; }
.post-article .prose { margin-top: 24px; font-size: 16px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s;
}
.back-link:hover { color: var(--text); }

.account-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
}
.account-hero__name { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.account-hero__email { color: var(--muted); font-size: 14px; word-break: break-all; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { padding: 18px 20px; }
.stat .icon { color: var(--primary); margin-bottom: 10px; }
.stat__value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.stat__label { font-size: 13px; color: var(--muted); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--success); margin-right: 8px; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); vertical-align: middle; }

.list-link {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  transition: background 0.15s;
}
.list-link:last-child { border-bottom: 0; }
.list-link:hover { background: rgba(255, 255, 255, 0.04); }
.list-link img { width: 40px; height: 60px; object-fit: cover; border-radius: 4px; }
.list-link > .icon:last-child { margin-left: auto; color: var(--subtle); }
.list-link--danger { color: #f87171; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 72px 16px;
  text-align: center;
  color: var(--muted);
}
.empty .icon { width: 36px; height: 36px; color: var(--subtle); margin-bottom: 6px; }
.empty strong { color: var(--text); font-size: 16px; }
.empty p { font-size: 14px; max-width: 360px; }

/* ---------- Login (Kiwify) ---------- */

.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(80% 50% at 50% 0%, rgba(var(--primary-rgb), 0.12), transparent 70%),
    #050505;
}
.login__inner { width: 100%; max-width: 420px; animation: page-in 0.5s var(--ease); }
.login__logo { display: flex; justify-content: center; margin-bottom: 24px; min-height: 8px; }
.login__logo img { max-height: 120px; max-width: 280px; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.9); }
.login__title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}
@media (min-width: 768px) { .login__title { font-size: 24px; } }
.login__card {
  background: #1a1a1d;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}
@media (min-width: 480px) { .login__card { padding: 32px; } }
.login__card p.lead { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 500; color: #d4d4d8; }
.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f0f11;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: #52525b; }
.input:hover { border-color: rgba(255, 255, 255, 0.2); }
.input:focus { outline: none; border-color: rgba(var(--primary-rgb), 0.8); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.18); }
.login__hint {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--subtle);
}
.login__hint .icon { margin-top: 1px; }
.login__foot { text-align: center; margin-top: 22px; font-size: 12px; color: #52525b; }

/* ---------- Toasts ---------- */

#toasts {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 16px);
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
@media (min-width: 1024px) {
  #toasts { left: auto; right: 24px; bottom: 24px; transform: none; }
}
.toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: #1f1f23;
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.8);
  pointer-events: auto;
  animation: toast-in 0.35s var(--ease);
}
.toast.is-leaving { animation: toast-out 0.25s ease forwards; }
.toast__icon { color: var(--success); margin-top: 1px; }
.toast--error .toast__icon { color: #f87171; }
.toast__title { font-size: 14px; font-weight: 600; }
.toast__desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Misc ---------- */

.not-found {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}
.not-found h1 { font-size: 64px; font-weight: 800; letter-spacing: -0.04em; color: var(--surface-3); }
.not-found p { color: var(--muted); margin: 8px 0 20px; }

.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.muted { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

/* ---------- Billboard: banners do admin no topo da home ---------- */

.billboard {
  display: grid;
  gap: 20px;
  padding-top: 16px;
}
.billboard__media {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px var(--border), 0 30px 70px -30px rgba(0, 0, 0, 0.9);
  background: var(--surface);
}
.billboard__media::-webkit-scrollbar { display: none; }
.billboard__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
}
.billboard__slide--horizontal { aspect-ratio: 16 / 7; }
.billboard__slide--vertical { aspect-ratio: 4 / 5; }
.billboard__slide img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
a.billboard__slide:hover img { transform: scale(1.015); }
.billboard__dots { display: flex; justify-content: center; gap: 8px; margin-top: -8px; }
.billboard__dots button { width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.25); transition: width 0.3s var(--ease), background 0.3s; }
.billboard__dots button.is-active { width: 22px; background: var(--primary); }
.billboard__text .hero__title { font-size: clamp(26px, 4vw, 44px); }
.billboard__text .hero__desc { color: var(--muted); }

@media (min-width: 900px) {
  .billboard {
    grid-template-columns: minmax(320px, 480px) 1fr;
    grid-template-areas: "media text" "dots text";
    align-items: center;
    column-gap: 48px;
    padding-top: 40px;
    padding-bottom: 8px;
  }
  .billboard__media { grid-area: media; }
  .billboard__dots { grid-area: dots; margin-top: 0; }
  .billboard__text { grid-area: text; }
  .billboard:has(.billboard__slide--horizontal) { grid-template-columns: 1fr; grid-template-areas: "media" "dots" "text"; }
}
@media (min-width: 1280px) { .billboard { grid-template-columns: 520px 1fr; } }

/* Continuar assistindo: cards horizontais */
.landscape { scroll-snap-align: start; }
.landscape__frame img { object-position: center 18%; }
.landscape__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 55%); pointer-events: none; }
.landscape__play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: #09090b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s var(--ease), background 0.2s;
}
.landscape__play .icon { width: 16px; height: 16px; }
.landscape:hover .landscape__play { transform: scale(1.08); background: #fff; }
.landscape:hover .landscape__frame img { transform: scale(1.03); }
.landscape__frame img { transition: opacity 0.4s, transform 0.6s var(--ease); }
.landscape__title { font-size: 15px; }
@media (min-width: 1024px) { .landscape { width: 360px; max-width: none; } }

/* Cards de produto: capa inteira + título embaixo */
.pcard { flex: 0 0 auto; width: 66vw; max-width: 280px; scroll-snap-align: start; }
@media (min-width: 640px) { .pcard { width: 248px; } }
@media (min-width: 1280px) { .pcard { width: 280px; } }
.pcard__link { display: block; }
.pcard__frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.pcard:hover .pcard__frame { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--border-strong), var(--shadow-card); }
.pcard__img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.4s, filter 0.3s; }
.pcard__img.is-loaded { opacity: 1; }
.pcard.is-locked .pcard__img { filter: grayscale(0.6) brightness(0.5); }
.pcard__chip { position: absolute; top: 10px; left: 10px; z-index: 2; }
.pcard__play {
  position: absolute; right: 12px; bottom: 14px; z-index: 2;
  width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.95); color: #09090b; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0; transform: scale(0.85); transition: opacity 0.25s, transform 0.3s var(--ease);
}
.pcard__play .icon { width: 16px; height: 16px; }
.pcard:hover .pcard__play { opacity: 1; transform: none; }
@media (hover: none) { .pcard__play { opacity: 1; transform: none; } }
.pcard__title { margin-top: 10px; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .poster__cta { margin-top: 10px; }

.pcard__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; }
.pcard__rating { display: inline-flex; align-items: center; gap: 4px; }
.pcard__rating strong { font-size: 12px; font-weight: 700; color: var(--text); }
.rating-stars { display: inline-flex; gap: 1px; }
.rating-star { position: relative; display: inline-block; width: 12px; height: 12px; flex-shrink: 0; }
.rating-star .icon { position: absolute; inset: 0; width: 100%; height: 100%; }
.rating-star .icon.is-bg { color: var(--border-strong); fill: currentColor; stroke: none; }
.rating-star .icon.is-fg { color: #f5b300; fill: currentColor; stroke: none; clip-path: inset(0 var(--empty, 0%) 0 0); }
.pcard__watched {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pcard__watched .icon { width: 12px; height: 12px; flex-shrink: 0; }

.list-link img { width: 72px; height: 45px; object-fit: contain; background: var(--surface-2); }

/* Banner do admin em largura total, com degradê para baixo (como o topo da Kiwify) */
.bb { position: relative; }
.bb__media {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: #000;
}
.bb__media::-webkit-scrollbar { display: none; }
.bb__slide { flex: 0 0 100%; scroll-snap-align: start; display: block; position: relative; }
.bb__slide img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  max-height: 88vh;
  object-fit: cover;
  object-position: center top;
}
.bb__slide--horizontal img { aspect-ratio: 1740 / 680; }
.bb__slide--vertical img { aspect-ratio: 4 / 5; }
.bb__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  pointer-events: none;
  background: linear-gradient(to top, var(--bg) 0%, rgba(9, 9, 11, 0.85) 22%, rgba(9, 9, 11, 0.35) 60%, rgba(9, 9, 11, 0) 100%);
}
.bb__dots { position: absolute; left: 0; right: 0; bottom: 18px; z-index: 3; margin: 0; }
.bb__text { position: relative; z-index: 2; margin-top: -110px; padding-bottom: 4px; }
.bb__text .hero__title { font-size: clamp(26px, 4.4vw, 52px); }
.bb__text .hero__desc { color: rgba(255, 255, 255, 0.8); }
.bb:has(.bb__dots) .bb__text { margin-top: -96px; }
@media (min-width: 768px) {
  .bb__slide img { max-height: 78vh; }
  .bb__fade { height: 60%; }
  .bb__text { margin-top: -170px; }
}

/* ajuste: texto abaixo do banner (sem cobrir a arte), degradê só na base */
.bb__fade { height: 28%; background: linear-gradient(to top, var(--bg) 0%, rgba(9, 9, 11, 0.6) 45%, rgba(9, 9, 11, 0) 100%); }
.bb__text, .bb:has(.bb__dots) .bb__text { margin-top: 4px; padding-top: 8px; }
.bb__dots { bottom: 14px; }
@media (min-width: 768px) {
  .bb__slide img { max-height: 92vh; }
  .bb__fade { height: 30%; }
  .bb__text, .bb:has(.bb__dots) .bb__text { margin-top: 0; padding-top: 12px; }
}

/* Celular: mesmo degradê do topo antigo — a imagem escurece até sumir no fundo */
@media (max-width: 767px) {
  .bb__fade {
    height: 45%;
    background: linear-gradient(to top, var(--bg) 0%, rgba(9, 9, 11, 0.82) 16%, rgba(9, 9, 11, 0.45) 45%, rgba(9, 9, 11, 0) 100%);
  }
  .bb__text, .bb:has(.bb__dots) .bb__text { margin-top: 6px; padding-top: 0; }
}

/* ===== Banner do topo — versão final =====
   Celular: largura total, e a própria imagem se desfaz da metade para baixo
   até sumir no fundo (fade de verdade, não só uma sombra).
   PC: banner no tamanho certo ao lado do título e da descrição. */
.bb__fade { display: none; }
.bb__slide img {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, rgba(0, 0, 0, 0.55) 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 45%, rgba(0, 0, 0, 0.55) 72%, transparent 100%);
}
.bb__media { background: transparent; }
@media (max-width: 767px) {
  .bb__slide img { max-height: none; }
  .bb__text, .bb:has(.bb__dots) .bb__text { margin-top: -32px; padding-top: 0; }
  .bb__dots { bottom: 44px; }
}
@media (min-width: 768px) {
  .bb {
    display: grid;
    grid-template-columns: minmax(300px, 440px) 1fr;
    grid-template-areas: "media text" "dots text";
    align-items: center;
    column-gap: 48px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 32px 8px;
  }
  .bb__media {
    grid-area: media;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 0 1px var(--border), 0 30px 70px -30px rgba(0, 0, 0, 0.9);
  }
  .bb__slide img { max-height: none; -webkit-mask-image: none; mask-image: none; }
  .bb__dots { grid-area: dots; position: static; margin-top: 12px; }
  .bb__text, .bb:has(.bb__dots) .bb__text { grid-area: text; margin: 0; padding: 0; }
  .bb__text.container { padding: 0; max-width: none; }
}
@media (min-width: 1280px) {
  .bb { grid-template-columns: 480px 1fr; padding-left: 48px; padding-right: 48px; }
}

/* ===== Luz do banner vazando para baixo ===== */
.bb { position: relative; isolation: isolate; }
.bb__glow {
  position: absolute;
  z-index: -1;
  left: -15%;
  right: -15%;
  top: -10%;
  height: 170%;
  background-size: cover;
  background-position: center top;
  filter: blur(70px) saturate(1.8) brightness(1.25);
  opacity: 0.85;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, rgba(0, 0, 0, 0.5) 65%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 35%, rgba(0, 0, 0, 0.5) 65%, transparent 100%);
}
.main, .page { overflow-x: clip; }
/* banner nítido: só a pontinha de baixo se mistura com a luz */
.bb__slide img {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 78%, transparent 100%);
}
@media (max-width: 767px) {
  .bb__text, .bb:has(.bb__dots) .bb__text { margin-top: -8px; }
  .bb__dots { bottom: 20px; }
}
@media (min-width: 768px) {
  .bb__glow { left: -10%; right: -10%; top: -30%; height: 190%; filter: blur(90px) saturate(1.8) brightness(1.2); opacity: 0.7; }
  .bb__slide img { -webkit-mask-image: none; mask-image: none; }
}
.bb__glow { filter: blur(70px) saturate(2) brightness(1.6); opacity: 1; }
@media (min-width: 768px) { .bb__glow { filter: blur(90px) saturate(2) brightness(1.5); opacity: 0.9; } }

/* Banner 100% visível: nenhuma máscara/fade na imagem; só a luz por trás vaza para baixo */
.bb__slide img { -webkit-mask-image: none !important; mask-image: none !important; }
@media (max-width: 767px) {
  .bb__text, .bb:has(.bb__dots) .bb__text { margin-top: 14px; }
}

/* Botão do link da aula, abaixo da descrição */
.lesson-link { margin-top: 20px; width: 100%; max-width: 420px; }

/* Ícone da aba selecionada em branco */
.bottom-nav__item.is-active .icon,
.nav-item.is-active .icon { color: #fff; }
