/* MikeCast Tutorial — Dark Theme */
:root {
  --bg: #0d1117;
  --card: #161b22;
  --card2: #1c2330;
  --accent: #4f8ef7;
  --accent-dim: #2d5fa8;
  --text: #e6edf3;
  --muted: #8b949e;
  --green: #3fb950;
  --orange: #f0883e;
  --purple: #bc8cff;
  --red: #f85149;
  --border: #30363d;
  --code-bg: #1e2a3a;
  --sidebar-w: 240px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

/* ─── Layout ─────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ─────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 24px 0 40px;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.sidebar-logo h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.sidebar-logo p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.nav-list {
  list-style: none;
  padding: 0 8px;
}

.nav-list li { margin: 2px 0; }

.nav-list a {
  display: block;
  padding: 7px 12px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
}

.nav-list a:hover,
.nav-list a.active {
  background: var(--accent-dim);
  color: var(--text);
}

.nav-list a .nav-num {
  display: inline-block;
  width: 20px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
}

/* ─── Mobile top bar ─────────────────────────────────── */
.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  align-items: center;
  justify-content: space-between;
}

.topbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

.hamburger {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  padding: 6px 10px;
  font-size: 18px;
  line-height: 1;
}

.mobile-nav {
  display: none;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  position: sticky;
  top: 52px;
  z-index: 99;
}

.mobile-nav.open { display: block; }

.mobile-nav .nav-list { padding: 0; }

/* ─── Main content ───────────────────────────────────── */
.main {
  flex: 1;
  min-width: 0;
  max-width: 860px;
  padding: 0 40px 80px;
}

/* ─── Hero ───────────────────────────────────────────── */
.hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 18px;
}

.hero h1 span { color: var(--accent); }

.hero-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 32px;
  line-height: 1.55;
}

.hero-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  cursor: pointer;
}

.btn:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }

/* ─── Sections ───────────────────────────────────────── */
.section {
  margin-bottom: 72px;
  scroll-margin-top: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.section-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}

.section h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}

.section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 12px;
}

.section p {
  color: var(--muted);
  margin-bottom: 16px;
  max-width: 720px;
}

.section ul, .section ol {
  color: var(--muted);
  padding-left: 22px;
  margin-bottom: 16px;
}

.section li { margin-bottom: 8px; }

.section a { color: var(--accent); text-decoration: none; }
.section a:hover { text-decoration: underline; }

/* ─── Diagram images ─────────────────────────────────── */
.diagram {
  display: block;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin: 24px 0;
  background: var(--card);
}

.diagram-caption {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: -16px;
  margin-bottom: 24px;
}

/* ─── Cards / callouts ───────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.callout {
  border-left: 3px solid var(--accent);
  background: var(--card);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--muted);
}

.callout strong { color: var(--text); }

.callout.tip  { border-color: var(--green); }
.callout.warn { border-color: var(--orange); }
.callout.info { border-color: var(--accent); }

/* ─── Tables ─────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 10px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead { background: var(--card2); }

th {
  padding: 12px 16px;
  text-align: left;
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  vertical-align: top;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(79, 142, 247, 0.04); }

td:first-child { color: var(--text); font-weight: 500; }

/* ─── Code blocks ─────────────────────────────────────── */
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 20px 0;
  counter-reset: line;
}

pre code {
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text);
  background: none;
  padding: 0;
  display: block;
}

code {
  font-family: "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--code-bg);
  color: var(--orange);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Syntax highlight classes */
.kw  { color: #ff7b72; }  /* keywords: name, on, run, uses, with */
.st  { color: #a5d6ff; }  /* strings */
.cm  { color: #6e7681; font-style: italic; }  /* comments */
.nm  { color: var(--green); }  /* numbers, names */
.op  { color: var(--purple); } /* operators, special */
.fn  { color: var(--orange); } /* function names */
.var { color: var(--accent); } /* variables, keys */

/* Code block label */
.code-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--muted);
  font-family: monospace;
}

.code-label + pre {
  border-radius: 0 0 10px 10px;
  margin-top: 0;
}

/* ─── Step list ──────────────────────────────────────── */
.step-list {
  list-style: none;
  padding: 0;
  counter-reset: steps;
}

.step-list li {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  counter-increment: steps;
  align-items: flex-start;
}

.step-list li::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  margin-top: 2px;
}

.step-list li span { color: var(--muted); }

/* ─── Badge row ──────────────────────────────────────── */
.badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--card2);
}

.badge.green { border-color: var(--green); color: var(--green); }
.badge.blue  { border-color: var(--accent); color: var(--accent); }
.badge.purple{ border-color: var(--purple); color: var(--purple); }

/* ─── Output list ────────────────────────────────────── */
.output-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.output-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
}

.output-card .icon { font-size: 24px; margin-bottom: 8px; }
.output-card h4 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.output-card p  { font-size: 13px; color: var(--muted); margin: 0; }

/* ─── Checklist ──────────────────────────────────────── */
.checklist {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.checklist li::before {
  content: "☐";
  color: var(--accent);
  font-size: 16px;
  line-height: 1.3;
  flex-shrink: 0;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .topbar  { display: flex; }

  .main {
    padding: 0 20px 60px;
    max-width: 100%;
  }

  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 15px; }

  .section h2 { font-size: 22px; }

  pre { padding: 14px 16px; }
  pre code { font-size: 12px; }
}

@media (max-width: 480px) {
  .hero { padding: 32px 0 32px; }
  .hero h1 { font-size: 24px; }
  .output-list { grid-template-columns: 1fr 1fr; }
}

/* ─── Featured section (Make It Your Own) ───────────── */
.section.featured {
  border: 1px solid rgba(79, 142, 247, 0.3);
  border-radius: 14px;
  padding: 36px 40px;
  background: rgba(79, 142, 247, 0.04);
}

.section-num.star {
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  width: 42px;
  height: 42px;
}

.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.qs-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qs-card .qs-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.qs-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.qs-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.url-table td:nth-child(2) {
  font-family: "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}

@media (max-width: 900px) {
  .section.featured { padding: 24px 20px; }
}

/* ─── Claude Code prompt blocks ─────────────────────── */
.claude-block {
  background: rgba(188, 140, 255, 0.05);
  border: 1px solid rgba(188, 140, 255, 0.35);
  border-radius: 10px;
  margin: 20px 0;
  overflow: hidden;
}

.claude-block-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(188, 140, 255, 0.1);
  border-bottom: 1px solid rgba(188, 140, 255, 0.2);
}

.claude-block-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--purple);
}

.claude-block-note {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
  font-style: italic;
}

.claude-prompt-text {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  margin: 0;
}

.claude-prompt-text .caret {
  color: var(--purple);
  font-weight: 700;
  font-family: monospace;
  font-size: 16px;
  margin-right: 8px;
  user-select: none;
}

/* ─── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
