:root {
  --bg: #0b1016;
  --surface: #161e28;
  --bg3: #121920;
  --border: #223042;
  --border2: rgba(0,214,143,.12);
  --green: #00d68f;
  --green2: #00ffb3;
  --amber: #f5c842;
  --text: #e8edf3;
  --muted: #8a97a6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

h1, h2, h3, .brand { font-family: 'Syne', sans-serif; }
a { color: var(--green); text-decoration: none; }

/* ── Nav ── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(11,16,22,.92); backdrop-filter: blur(8px); z-index: 10;
}
.nav .brand { font-weight: 800; font-size: 19px; color: var(--text); }
.nav .brand span { color: var(--green); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-phone { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--muted); }

/* ── Hero ── */
.hero {
  max-width: 820px; margin: 0 auto; padding: 72px 24px 40px; text-align: center;
}
.hero .tag {
  display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 11.5px;
  font-weight: 600; color: var(--green); letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--border2); background: rgba(0,214,143,.06);
  border-radius: 20px; padding: 6px 14px; margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.08;
  margin: 0 0 14px;
}
.hero h1 .accent { color: var(--green); }
.hero .tagline { font-size: 16px; color: var(--muted); max-width: 540px; margin: 0 auto 28px; }
.hero-stats { display: flex; justify-content: center; gap: 28px; margin-bottom: 32px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat .num { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 700; color: var(--green); }
.hero-stat .label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.hero-cta { display: inline-block; padding: 14px 32px; background: var(--green); color: #04140e;
  font-weight: 700; font-size: 15px; border-radius: 10px; }
.hero-cta:hover { background: var(--green2); }

/* ── Info section ── */
.info-section { max-width: 780px; margin: 0 auto; padding: 20px 24px 60px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; margin-top: 28px; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.info-card h3 { font-size: 15px; margin: 0 0 8px; color: var(--green); }
.info-card p { font-size: 13.5px; color: var(--muted); margin: 0; }

/* ── Course breakdown ── */
.breakdown { max-width: 780px; margin: 0 auto; padding: 20px 24px 80px; }
.tier-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--green); margin: 40px 0 6px;
}
.tier-tag.advanced { color: var(--amber); }
.tier-sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 8px; overflow: hidden;
}
.card.advanced { border-color: rgba(245,200,66,.3); background: rgba(245,200,66,.04); }

.mod-header { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 14px 16px; }
.mod-num { font-family: 'JetBrains Mono', monospace; color: var(--green); font-weight: 700; font-size: 13px; width: 24px; flex-shrink: 0; }
.card.advanced .mod-num { color: var(--amber); }
.mod-name { flex: 1; font-weight: 600; font-size: 14.5px; }
.mod-count { font-family: 'JetBrains Mono', monospace; color: var(--muted); font-size: 11.5px; flex-shrink: 0; }
.chevron { color: var(--muted); font-size: 11px; transition: transform .2s; }
.card.open .chevron { transform: rotate(180deg); }

.mod-videos { display: none; padding: 0 16px 16px 52px; }
.card.open .mod-videos { display: block; }
.takeaway { font-size: 12.5px; color: var(--green); margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.card.advanced .takeaway { color: var(--amber); }
.video-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 13.5px; color: var(--muted); }
.video-row::before { content: '› '; color: var(--green); margin-right: 4px; }
.card.advanced .video-row::before { color: var(--amber); }
.pill { font-family: 'JetBrains Mono', monospace; font-size: 10px; padding: 2px 8px; border-radius: 10px; flex-shrink: 0; }
.pill.free { color: var(--green); background: rgba(0,214,143,.1); }
.pill.locked { color: var(--muted); background: var(--bg3); }

/* ── Forms ── */
.form-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 28px; max-width: 380px; margin: 60px auto;
}
.input {
  width: 100%; padding: 12px 14px; margin-bottom: 12px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 14px; font-family: 'Manrope', sans-serif;
}
.input:focus { outline: none; border-color: var(--green); }
.btn {
  width: 100%; padding: 12px; border: none; border-radius: 8px;
  background: var(--green); color: #04140e; font-weight: 700; font-size: 14px;
  cursor: pointer; font-family: 'Manrope', sans-serif;
}
.btn:hover { background: var(--green2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.msg { font-size: 13px; margin-top: 10px; min-height: 18px; }
.msg.error { color: #ff6b6b; }
.msg.ok { color: var(--green); }

/* ── Admin table ── */
table { width: 100%; border-collapse: collapse; margin-top: 16px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.badge { padding: 2px 8px; border-radius: 6px; font-size: 11px; background: var(--bg3); color: var(--muted); }
.badge.published { color: var(--green); }

@media (max-width: 600px) {
  .hero h1 { font-size: 30px; }
  .hero-stats { gap: 18px; }
}

/* ── Watch page ── */
.watch-layout { display: flex; gap: 0; align-items: flex-start; max-width: 1200px; margin: 0 auto; }
.watch-main { flex: 1; min-width: 0; padding: 24px; }
.watch-sidebar { width: 340px; flex-shrink: 0; background: var(--surface); border-left: 1px solid var(--border); min-height: 100vh; }
.watch-sidebar.collapsed .sidebar-body { display: none; }
.watch-sidebar.collapsed .sidebar-toggle { transform: rotate(-90deg); }

.sidebar-header {
  display: flex; justify-content: space-between; align-items: center; cursor: pointer;
  padding: 16px 18px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--border);
}
.sidebar-toggle { color: var(--muted); transition: transform .2s; }
.sidebar-section-title { padding: 12px 18px 6px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sidebar-video {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px;
  color: var(--text); font-size: 13px; border-left: 2px solid transparent;
}
.sidebar-video:hover { background: var(--bg3); }
.sidebar-video.current { background: rgba(0,214,143,.08); border-left-color: var(--green); }
.sidebar-video .check {
  width: 16px; height: 16px; border: 1px solid var(--border); border-radius: 4px;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--green);
}
.sidebar-video .check.done { background: var(--green); color: #04140e; border-color: var(--green); }
.sv-title { flex: 1; }
.sv-time { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); flex-shrink: 0; }

.player-wrap { border-radius: 10px; overflow: hidden; background: #000; }
.dummy-player {
  aspect-ratio: 16/9; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); text-align: center; padding: 20px;
}
.dummy-player-icon { font-size: 32px; color: var(--muted); margin-bottom: 10px; }
.dummy-player-text { color: var(--muted); font-size: 13.5px; max-width: 320px; }

.video-info { margin-top: 20px; }
.video-info h2 { margin: 0 0 4px; font-size: 20px; }
.video-section-label { color: var(--muted); font-size: 12.5px; margin-bottom: 16px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab-btn {
  background: none; border: none; color: var(--muted); font-size: 13.5px; font-weight: 600;
  padding: 10px 4px; cursor: pointer; border-bottom: 2px solid transparent; font-family: 'Manrope', sans-serif;
}
.tab-btn.active { color: var(--green); border-bottom-color: var(--green); }
.materials-list { list-style: none; padding: 0; margin: 0; }
.materials-list li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }

@media (max-width: 860px) {
  .watch-layout { flex-direction: column; }
  .watch-sidebar { width: 100%; min-height: auto; border-left: none; border-top: 1px solid var(--border); }
}

/* ── Rating modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; max-width: 360px; width: 100%; }
.stars { font-size: 28px; color: var(--border); margin: 14px 0; letter-spacing: 4px; cursor: pointer; }
.star { transition: color .15s; }
.star.filled { color: var(--amber); }

/* ── Dashboard ── */
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; }
.dash-card-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.dash-card h3 { margin: 0 0 4px; font-size: 16px; }
.dash-progress-text { color: var(--muted); font-size: 12.5px; margin: 0; }
.progress-bar { height: 6px; background: var(--bg3); border-radius: 4px; margin-top: 14px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); }