/* ============================================================
   Saúde em Série — Design System (template inspirado no app
   Método Nanda Mac Doctors, com a identidade do Dr. Saada)
   ============================================================ */

:root {
  --bg: #0a0e17;
  --bg-soft: #0f1524;
  --surface: #161d2e;
  --surface-2: #1d2740;
  --surface-hover: #253253;
  --border: #2a3450;
  --text: #f4f6fb;
  --text-muted: #9aa5bd;
  --text-faint: #6b7690;

  --accent: #ff7a1a;
  --accent-2: #ffb238;
  --accent-soft: rgba(255, 122, 26, 0.14);

  --youtube: #ff3b5f;
  --instagram-1: #ff5f9e;
  --instagram-2: #8b5cf6;
  --info-blue: #4f8bff;
  --whatsapp: #25d366;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.45);

  --maxw: 1160px;
}

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

body {
  background: radial-gradient(1200px 600px at 50% -10%, #14203a 0%, var(--bg) 55%) fixed;
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: 84px; /* room for bottom tab bar on mobile */
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------- Top bar ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #1a0f00;
  flex-shrink: 0;
}
.brand-text { line-height: 1.1; }
.brand-text strong { display: block; font-size: 14px; font-weight: 700; }
.brand-text span { display: block; font-size: 11px; color: var(--text-muted); }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--instagram-2), var(--instagram-1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.top-nav-links {
  display: none;
  gap: 4px;
}
.top-nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}
.top-nav-links a.active,
.top-nav-links a:hover {
  background: var(--surface-2);
  color: var(--text);
}

@media (min-width: 900px) {
  .top-nav-links { display: flex; }
}

/* ---------------- Hero ---------------- */
.hero {
  margin: 18px 0 28px;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 300px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow-pop);
  border: 1px solid var(--border);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(6,9,16,0.95) 5%, rgba(6,9,16,0.55) 55%, rgba(6,9,16,0.15) 100%);
}
.hero-home::before {
  background: linear-gradient(0deg, rgba(6,9,16,0.95) 5%, rgba(6,9,16,0.55) 80%, rgba(6,9,16,0.15) 100%);
}
.hero-content {
  position: relative;
  padding: 28px 24px;
  max-width: 640px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--accent-soft);
  border: 1px solid rgba(255,122,26,0.35);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.15;
  margin: 0 0 10px;
  font-weight: 800;
}
.hero p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 18px;
  max-width: 480px;
}
.hero-meta {
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.hero-meta div { font-size: 12px; color: var(--text-muted); }
.hero-meta strong { display: block; color: var(--text); font-size: 15px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
  border: none;
  transition: transform .12s ease, filter .12s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #1a0f00;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.14);
}
.btn-ghost:hover { background: rgba(255,255,255,0.14); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-block { width: 100%; }
.btn-whatsapp { background: var(--whatsapp); color: #06210f; }

/* ---------------- Sections & carousels ---------------- */
.section {
  margin: 30px 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}
.section-head h2 {
  font-size: 18px;
  margin: 0;
  font-weight: 700;
}
.section-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.section-nav { display: none; gap: 6px; }
@media (min-width: 700px) { .section-nav { display: flex; } }

.carousel-wrap { position: relative; }
.carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }

.card {
  position: relative;
  flex: 0 0 auto;
  width: 190px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card-media {
  position: relative;
  aspect-ratio: 3/4;
  background-size: cover;
  background-position: center;
  background-color: var(--surface-2);
}
.card-media.wide { aspect-ratio: 16/9; }
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  color: white;
}
.badge-youtube { background: var(--youtube); }
.badge-instagram { background: linear-gradient(135deg, var(--instagram-2), var(--instagram-1)); }
.badge-soon { background: var(--info-blue); }
.lock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: rgba(10,14,23,0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.card-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(6,9,16,0.92) 10%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 12px;
}
.card-media-overlay span {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.card-body { padding: 12px 12px 14px; }
.card-title {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}
.card-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.card.locked .card-media { filter: grayscale(0.3) brightness(0.55); }

/* episode list item (compact row, used on series page) */
.ep-card { width: 220px; }
.ep-card .card-media { aspect-ratio: 16/9; }
.ep-card.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-card); }
.ep-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent-2);
}
.ep-status.watched { color: var(--text-faint); }

/* ---------------- Continue watching strip ---------------- */
.continue-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-card);
}
.continue-thumb {
  width: 120px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.continue-info { flex: 1; min-width: 0; }
.continue-info .kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--accent-2);
  margin-bottom: 4px;
}
.continue-info h3 { margin: 0 0 6px; font-size: 15px; }
.progress-track {
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  overflow: hidden;
  margin: 8px 0 12px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: var(--radius-pill);
}
.continue-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- Bottom tab bar (mobile app feel) ---------------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(15, 21, 36, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-around;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-faint);
  padding: 4px 10px;
  border-radius: 12px;
}
.tab-item.active { color: var(--accent-2); }
.tab-item svg { width: 22px; height: 22px; }

@media (min-width: 900px) {
  .tabbar { display: none; }
  body { padding-bottom: 40px; }
}

/* ---------------- Info / footer notice ---------------- */
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--info-blue);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.notice strong { color: var(--text); }

.footer {
  text-align: center;
  padding: 30px 20px 20px;
  font-size: 12px;
  color: var(--text-faint);
}
.footer a { color: var(--text-muted); }

/* ---------------- Page header (series / episode) ---------------- */
.page-header { padding-top: 6px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.back-link:hover { color: var(--text); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
}
.chip.blue { color: var(--info-blue); border-color: rgba(79,139,255,0.35); background: rgba(79,139,255,0.1); }

/* ---------------- Author card ---------------- */
.author-card {
  display: flex;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.author-photo {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.author-info h3 { margin: 0 0 2px; font-size: 17px; }
.author-info .role { color: var(--accent-2); font-size: 12px; font-weight: 700; margin-bottom: 10px; }
.author-stats { display: flex; gap: 22px; margin: 10px 0; }
.author-stats div strong { display: block; font-size: 16px; }
.author-stats div span { font-size: 11px; color: var(--text-muted); }
.author-checks { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.author-checks li { font-size: 13px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.author-checks li svg { color: var(--accent-2); flex-shrink: 0; }
.author-links { display: flex; gap: 10px; margin-top: 12px; }
.tag-link {
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  color: white;
}
.tag-youtube { background: var(--youtube); }
.tag-instagram { background: linear-gradient(135deg, var(--instagram-2), var(--instagram-1)); }

/* ---------------- Locations ---------------- */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.location-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.location-card h4 { margin: 0 0 6px; font-size: 14px; }
.location-card p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ---------------- Player page ---------------- */
.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
}
.player-shell img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.player-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-btn {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.ep-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}
.ep-list-row:hover { background: var(--surface); }
.ep-list-row.active { background: var(--surface); border-color: var(--accent); }
.ep-list-row .num {
  width: 30px;
  text-align: center;
  font-weight: 800;
  color: var(--text-faint);
  font-size: 13px;
}
.ep-list-row.active .num { color: var(--accent-2); }
.ep-list-row .thumb {
  width: 90px;
  aspect-ratio: 16/9;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.ep-list-row .info { flex: 1; min-width: 0; }
.ep-list-row .info h5 { margin: 0 0 3px; font-size: 13px; font-weight: 700; }
.ep-list-row .info span { font-size: 11px; color: var(--text-muted); }

/* ---------------- Auth pages ---------------- */
.auth-wrap {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-pop);
  text-align: center;
}
.auth-card .brand-badge { margin: 0 auto 18px; width: 48px; height: 48px; border-radius: 14px; font-size: 16px; }
.auth-card h1 { font-size: 20px; margin: 0 0 6px; }
.auth-card p.lead { color: var(--text-muted); font-size: 13px; margin: 0 0 26px; }

.field { text-align: left; margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.field input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
}
.field input:focus { outline: none; border-color: var(--accent); }

.auth-toggle {
  display: flex;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 24px;
}
.auth-toggle a {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}
.auth-toggle a.active { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #1a0f00; }

.fineprint { font-size: 11px; color: var(--text-faint); margin-top: 16px; line-height: 1.5; }
.fineprint a { color: var(--text-muted); text-decoration: underline; }

hr.sep { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ---- Extensões app (player / auth / progresso) ---- */
.brand { cursor: pointer; }
.brand a { display: flex; align-items: center; gap: 10px; color: inherit; }
.player-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.player-shell.is-playing img,
.player-shell.is-playing .player-play { display: none; }
.auth-message {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-muted);
  min-height: 1.2em;
}
.auth-message.is-error { color: #ff8a80; }
.auth-message.is-ok { color: #9dffa8; }
.ep-card.is-watched .ep-status::after { content: " · assistido"; color: var(--accent-2); }
.ep-list-row.is-watched .info span::after { content: " · assistido"; color: var(--accent-2); }
.btn.is-done {
  background: var(--accent-soft);
  color: var(--accent-2);
  border-color: transparent;
}
.topbar .signout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
}
.topbar .signout:hover { color: var(--text); border-color: var(--text-faint); }
.continue-card[hidden] { display: none !important; }
.avatar { cursor: default; user-select: none; }
.ep-list-row { width: 100%; text-align: left; background: transparent; color: inherit; cursor: pointer; }
button.ep-list-row { font: inherit; }
.hero .btn { display: inline-flex; }

/* ---- Landing pública ---- */
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.landing-hero .hero-content { max-width: 560px; }
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 720px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}
.feature-card strong { display: block; font-size: 15px; margin-bottom: 6px; }
.feature-card p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 800px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}
.step-num {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #1a0f00;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 10px;
}
.step-card h3 { margin: 0 0 6px; font-size: 15px; }
.step-card p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.topbar .btn-enter {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}
