/* ============================================================
   TikTok to Income — Members
   Tema escuro grafite, acentos ciano/rosa com parcimônia
   ============================================================ */

:root {
  --bg: #0e0f13;
  --bg-soft: #14161d;
  --surface: #181b23;
  --surface-2: #1e222c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eceef3;
  --text-muted: #9aa1b0;
  --text-faint: #6b7280;
  --cyan: #25f4ee;
  --pink: #fe2c55;
  --cyan-dim: rgba(37, 244, 238, 0.12);
  --pink-dim: rgba(254, 44, 85, 0.12);
  --radius: 14px;
  --sidebar-w: 320px;
  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(37, 244, 238, 0.25); }

/* ============ LAYOUT ============ */
.app { display: flex; min-height: 100vh; }

/* ============ SIDEBAR ============ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  padding: 22px 18px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.brand-text em {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-top: 2px;
}

/* Idiomas */
.sidebar-lang label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.lang-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.lang-pill {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.18s ease;
}
.lang-pill:hover { color: var(--text); border-color: var(--border-strong); }
.lang-pill.is-active {
  color: #0b0c10;
  background: var(--cyan);
  border-color: var(--cyan);
}

/* Progresso */
.sidebar-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.progress-count { font-family: var(--font-display); color: var(--cyan); }
.progress-bar, .module-progress {
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar span, .module-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), #7ef0c8);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Módulos */
.modules { display: flex; flex-direction: column; gap: 8px; }

.module {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  transition: border-color 0.2s ease;
}
.module:hover { border-color: var(--border-strong); }

.module-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 10px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.module-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: var(--cyan);
  padding-top: 2px;
  min-width: 22px;
}
.module-info { flex: 1; min-width: 0; }
.module-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.module-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  flex-wrap: wrap;
}
.module-count { font-size: 11px; color: var(--text-faint); }
.module-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  padding: 4px 9px;
  border-radius: 8px;
  white-space: nowrap;
}
.chevron {
  color: var(--text-faint);
  flex-shrink: 0;
  margin-top: 3px;
  transition: transform 0.25s ease;
}
.module.is-open .chevron { transform: rotate(180deg); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}
.badge-main { color: var(--pink); background: var(--pink-dim); }
.badge-unlocked { color: var(--cyan); background: var(--cyan-dim); }

.module-progress { margin: 0 12px 6px; height: 3px; }

.lesson-list {
  list-style: none;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.module.is-open .lesson-list { max-height: 500px; }
.lesson-list li { border-top: 1px solid var(--border); }

.lesson-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.4;
  transition: color 0.15s ease, background 0.15s ease;
  border-radius: 8px;
}
.lesson-link:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.lesson-link.is-active { color: var(--cyan); background: var(--cyan-dim); }

.lesson-check {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.22);
  border-radius: 50%;
  position: relative;
  transition: all 0.2s ease;
}
.lesson-check.is-done { border-color: var(--cyan); background: var(--cyan); }
.lesson-check.is-done::after {
  content: '';
  position: absolute;
  left: 4px; top: 1.5px;
  width: 4px; height: 8px;
  border: solid #0b0c10;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.lesson-link.is-done .lesson-name { color: var(--text-faint); text-decoration: line-through; text-decoration-color: rgba(255,255,255,0.25); }

.sidebar-edu {
  font-size: 11.5px;
  color: var(--text-faint);
  text-align: center;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.sidebar-backdrop { display: none; }

/* ============ MAIN ============ */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(14, 15, 19, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  flex: 1;
}
.topbar-brand em { font-style: normal; color: var(--cyan); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; margin-left: 4px; }
.topbar-lang { display: flex; gap: 5px; }
.topbar-lang .lang-pill { padding: 4px 8px; font-size: 10.5px; }

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px; height: 38px;
  padding: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  height: 1.8px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s ease;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.content {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 40px 40px;
}

/* ============ VIEWS ============ */
.view { display: none; }
.view.is-active { display: block; animation: viewIn 0.35s cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ HERO ============ */
.kicker {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}
.hero-text {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 40px;
}
.hero-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.hero-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 244, 238, 0.35);
  background: var(--surface-2);
}
.hero-card-top { display: flex; justify-content: space-between; align-items: center; }
.hero-card-num {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hero-card-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--cyan);
}
.hero-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.hero-card-tag { font-size: 13px; color: var(--text-muted); }
.hero-card .badge { align-self: flex-start; margin-top: 4px; }

/* ============ LESSON ============ */
.lesson-header { margin-bottom: 28px; }
.lesson-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.lesson-module-label {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
}
.lesson-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  padding: 4px 10px;
  border-radius: 8px;
}
.lesson h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.6vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lesson > p {
  font-size: 16.5px;
  color: #cfd4de;
  margin-bottom: 20px;
}

.key-points {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 32px 0;
}
.key-points h2 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}
.key-points ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.key-points li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  color: var(--text);
}
.key-points li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: rotate(-45deg);
}

.lesson-extras {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 0 32px;
}
.practice-box, .mistakes-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.practice-box h2, .mistakes-box h2 {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.practice-box h2 { color: var(--cyan); }
.mistakes-box h2 { color: var(--pink); }
.practice-box ul, .mistakes-box ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.practice-box li, .mistakes-box li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.5;
  color: #cfd4de;
}
.practice-box li::before {
  content: '';
  position: absolute;
  left: 0; top: 6px;
  width: 8px; height: 8px;
  border-top: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
  transform: rotate(45deg);
}
.mistakes-box li::before {
  content: '×';
  position: absolute;
  left: 1px; top: -1px;
  font-weight: 700;
  font-size: 17px;
  color: var(--pink);
  line-height: 1;
}

.lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ============ BOTÕES ============ */
.btn-primary, .btn-ghost, .btn-complete {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-primary {
  color: #0b0c10;
  background: var(--cyan);
  border: 1px solid var(--cyan);
}
.btn-primary:hover { background: #6ff8f3; transform: translateY(-1px); }
.btn-ghost {
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }

.btn-complete {
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(37, 244, 238, 0.3);
}
.btn-complete:hover { border-color: var(--cyan); }
.btn-complete .txt-done { display: none; }
.btn-complete.is-done { color: #0b0c10; background: var(--cyan); border-color: var(--cyan); }
.btn-complete.is-done .txt-do { display: none; }
.btn-complete.is-done .txt-done { display: inline; }

/* ============ DISCLAIMER ============ */
.disclaimer {
  margin-top: 56px;
  padding: 22px 24px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.disclaimer p { font-size: 12.5px; line-height: 1.7; color: var(--text-faint); }

/* ============ RESPONSIVO ============ */
@media (max-width: 980px) {
  .topbar { display: flex; }

  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 50;
    transform: translateX(-105%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 60px rgba(0,0,0,0.5);
    width: min(var(--sidebar-w), 86vw);
  }
  .sidebar.is-open { transform: translateX(0); }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(5, 6, 9, 0.6);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; }

  .sidebar-lang { display: none; } /* idiomas ficam na topbar no mobile */

  .content { padding: 32px 20px 40px; }
}

@media (max-width: 640px) {
  .hero-grid { grid-template-columns: 1fr; }
  .lesson-extras { grid-template-columns: 1fr; }
  .lesson-nav { flex-direction: column; align-items: stretch; }
  .lesson-nav .btn-primary, .lesson-nav .btn-ghost, .lesson-nav .btn-complete { justify-content: center; }
  .lesson-nav span { display: none; }
  .content { padding: 28px 16px 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
