@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg:          #05070B;
  --surface:     #0E1624;
  --surface-alt: #111C2C;
  --border:      rgba(41, 54, 77, 0.55);
  --border-glow: rgba(121, 168, 255, 0.35);
  --primary:     #79A8FF;
  --accent:      #3DD9C4;
  --text:        #F5F7FB;
  --muted:       #99A6BA;
  --on-primary:  #07111F;
  --sidebar-w:   268px;
  --card-r:      18px;
}

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

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Background ──────────────────────────────────────── */
.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%,  rgba(121,168,255,0.09) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 20% 40%, rgba(61,217,196,0.05)  0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 60%, rgba(121,168,255,0.04) 0%, transparent 60%);
}
.dot-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(121,168,255,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ── Layout ──────────────────────────────────────────── */
.guide-wrapper { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* ── Sidebar ─────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: fixed; top: 0; left: 0; height: 100vh;
  overflow-y: auto;
  background: rgba(17, 28, 44, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 0 40px;
  z-index: 10;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  text-decoration: none;
}

.brand-logo {
  height: 28px; width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-sub { font-size: 11px; color: var(--muted); }

.nav-group { margin-bottom: 6px; }

.nav-group-title {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 20px;
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  cursor: default;
  transition: color 0.2s;
  user-select: none;
}
.nav-group-title.link-page { cursor: pointer; }
.nav-group-title.link-page:hover { color: var(--text); }
.nav-group-title.current { color: var(--primary); }

.page-dot {
  width: 6px; height: 6px; border-radius: 50%;
  border: 1.5px solid currentColor;
  flex-shrink: 0; display: inline-block;
  transition: all 0.2s;
}
.nav-group-title.current .page-dot {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 6px rgba(121,168,255,0.5);
}

.nav-items { padding: 2px 0 8px; }

.nav-item {
  display: flex; align-items: center;
  padding: 6px 20px 6px 36px;
  font-size: 13px; color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  background: none; border: none;
  width: 100%; text-align: left;
  font-family: inherit;
  position: relative;
  transition: color 0.18s, background 0.18s;
}

.nav-item::before {
  content: '';
  position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  border: 1.5px solid rgba(153,166,186,0.35);
  background: transparent;
  transition: all 0.2s;
}

.nav-item:hover { color: var(--text); }
.nav-item:hover::before { border-color: var(--primary); }

.nav-item.active {
  color: var(--primary);
  background: linear-gradient(90deg, rgba(121,168,255,0.12) 0%, transparent 100%);
}
.nav-item.active::before {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 5px rgba(121,168,255,0.5);
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 16px 14px;
}

/* ── Main content ────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  padding: 52px 52px 80px;
}

.main-inner { max-width: 760px; }

/* ── Section panels ──────────────────────────────────── */
.section-panel { display: none; }

.section-panel.active {
  display: block;
  animation: panelIn 0.32s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

/* ── Section header ──────────────────────────────────── */
.section-header { margin-bottom: 28px; }

.section-kicker {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: linear-gradient(135deg, #79A8FF, #3DD9C4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  display: inline-block;
}

.section-title {
  font-size: 28px; font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 10px;
}

.section-desc {
  font-size: 15px; color: var(--muted);
  margin: 0; line-height: 1.65;
}

/* ── Sub-headings within a section ──────────────────── */
.sub-heading {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted);
  margin: 22px 0 10px;
}

/* ── Step cards ──────────────────────────────────────── */
.step-card {
  background: rgba(14, 22, 36, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--card-r);
  padding: 24px 28px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.28s, box-shadow 0.28s, transform 0.28s cubic-bezier(0.4,0,0.2,1);
}

.step-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(121,168,255,0.18), transparent);
  pointer-events: none;
}

.step-card:hover {
  border-color: rgba(121,168,255,0.28);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 0 1px rgba(121,168,255,0.06);
  transform: translateY(-2px);
}

.step-badge {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; padding: 0 9px;
  border-radius: 6px;
  background: rgba(121,168,255,0.11);
  border: 1px solid rgba(121,168,255,0.22);
  font-size: 11px; font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.step-card p {
  font-size: 14.5px; color: var(--muted);
  margin: 0 0 12px; line-height: 1.65;
}
.step-card p:last-child { margin-bottom: 0; }
.step-card p strong, .step-card li strong { color: var(--text); font-weight: 600; }

.step-card ul {
  margin: 0 0 12px; padding-left: 0;
  list-style: none;
}
.step-card li {
  font-size: 14.5px; color: var(--muted);
  padding: 5px 0 5px 18px;
  position: relative; line-height: 1.55;
}
.step-card li::before {
  content: ''; position: absolute; left: 0; top: 13px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--primary); opacity: 0.45;
}

/* ── Hotkey grid ─────────────────────────────────────── */
.hotkey-grid { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }

.hotkey-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: rgba(17, 28, 44, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px; gap: 12px;
}

.hotkey-label { font-size: 14px; color: var(--text); font-weight: 500; }
.hotkey-combo { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }

.key {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 8px; min-width: 26px;
  border-radius: 6px;
  background: rgba(121,168,255,0.10);
  border: 1px solid rgba(121,168,255,0.20);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 12px; font-weight: 600; color: var(--primary);
}
.key-sep { color: var(--muted); font-size: 12px; opacity: 0.6; }

/* ── Callout ─────────────────────────────────────────── */
.callout {
  background: rgba(61,217,196,0.06);
  border: 1px solid rgba(61,217,196,0.20);
  border-radius: 12px; padding: 14px 16px;
  margin: 0 0 16px;
}
.callout p { margin: 0; font-size: 14px; color: rgba(61,217,196,0.85); line-height: 1.55; }
.callout a { color: var(--accent); }
.callout code {
  background: rgba(61,217,196,0.12);
  border-color: rgba(61,217,196,0.22);
  color: var(--accent);
}

/* ── Trouble list ────────────────────────────────────── */
.trouble-list { display: flex; flex-direction: column; gap: 10px; }

.trouble-item {
  background: rgba(14, 22, 36, 0.6);
  border: 1px solid var(--border);
  border-radius: 13px; padding: 16px 18px;
  transition: border-color 0.2s;
}
.trouble-item:hover { border-color: rgba(121,168,255,0.22); }

.trouble-problem {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 5px;
}
.trouble-sol {
  font-size: 13.5px; color: var(--muted); line-height: 1.55;
}
.trouble-sol strong { color: var(--text); font-weight: 600; }

/* ── Screenshot ──────────────────────────────────────── */
.screenshot {
  display: block; width: 100%; height: auto;
  border: 1px solid rgba(41,54,77,0.6);
  border-radius: 13px;
  margin: 14px 0 6px;
  background: rgba(14, 22, 36, 0.4);
}
.caption { font-size: 11.5px; color: rgba(153,166,186,0.5); margin-top: 3px; }

/* ── Pills ───────────────────────────────────────────── */
.pill {
  display: inline-block;
  border: 1px solid rgba(121,168,255,0.22);
  border-radius: 999px; padding: 2px 9px;
  font-size: 12px; color: var(--primary);
  background: rgba(121,168,255,0.08);
  font-weight: 500; white-space: nowrap;
}

/* ── Code ────────────────────────────────────────────── */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 12.5px;
  background: rgba(14, 22, 36, 0.8);
  border: 1px solid rgba(41,54,77,0.6);
  border-radius: 5px; padding: 1px 6px;
  color: var(--accent);
}

/* ── Section footer (prev / next) ────────────────────── */
.section-footer {
  display: flex; align-items: center; gap: 12px;
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid var(--border);
}

.btn-next, .btn-prev {
  display: inline-flex; align-items: center; gap: 5px;
  border: none; cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 600;
  border-radius: 9999px; padding: 9px 20px;
  transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
  text-decoration: none;
}

.btn-next {
  background: linear-gradient(135deg, #5B93F0, #79A8FF);
  color: #07111F;
  box-shadow: 0 4px 18px rgba(121,168,255,0.28), inset 0 1px 0 rgba(255,255,255,0.15);
  margin-left: auto;
}
.btn-next:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 26px rgba(121,168,255,0.42), inset 0 1px 0 rgba(255,255,255,0.18);
  color: #07111F;
}

.btn-prev {
  background: rgba(121,168,255,0.08);
  border: 1px solid rgba(121,168,255,0.22);
  color: var(--primary);
}
.btn-prev:hover {
  background: rgba(121,168,255,0.14);
  border-color: rgba(121,168,255,0.40);
  box-shadow: 0 2px 14px rgba(121,168,255,0.12);
}

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(41,54,77,0.6); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(121,168,255,0.25); }

/* ── Links ───────────────────────────────────────────── */
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

/* ── Image lightbox ──────────────────────────────────── */
.img-trigger {
  display: block; cursor: zoom-in;
  border-radius: 13px; overflow: hidden;
  margin: 14px 0 0;
  transition: box-shadow 0.25s;
}
.img-trigger:hover { box-shadow: 0 0 0 2px rgba(121,168,255,0.35); }
.img-trigger .screenshot { margin: 0; border-radius: 0; border: none; }

.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5, 7, 11, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  align-items: center; justify-content: center;
  padding: 28px;
  cursor: zoom-out;
}
.lightbox.open { display: flex; animation: lbFade 0.18s ease-out both; }

@keyframes lbFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-img {
  max-width: 100%; max-height: 90vh;
  border-radius: 16px;
  border: 1px solid rgba(41,54,77,0.6);
  box-shadow: 0 32px 80px rgba(0,0,0,0.65);
  object-fit: contain;
  cursor: default;
  animation: lbScale 0.2s cubic-bezier(0.4,0,0.2,1) both;
}

@keyframes lbScale {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-close {
  position: fixed; top: 18px; right: 22px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(17,28,44,0.92);
  border: 1px solid rgba(41,54,77,0.65);
  color: var(--muted); font-size: 17px;
  cursor: pointer; line-height: 1;
  transition: color 0.2s, border-color 0.2s;
}
.lightbox-close:hover { color: var(--text); border-color: rgba(121,168,255,0.4); }

/* ── Mobile ──────────────────────────────────────────── */
@media (max-width: 840px) {
  .sidebar {
    width: 100%; height: auto; position: relative;
    flex-direction: row; flex-wrap: wrap; align-items: center;
    padding: 14px 16px; gap: 8px; overflow-y: visible;
    border-right: none; border-bottom: 1px solid var(--border);
  }
  .sidebar-brand { padding: 0; border-bottom: none; margin-bottom: 0; flex-shrink: 0; }
  .nav-group { display: contents; }
  .nav-items, .nav-divider { display: none; }
  .nav-group-title {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    margin: 0;
  }
  .nav-group-title.current { border-color: var(--primary); color: var(--primary); }
  .nav-group-title.link-page { cursor: pointer; }
  .page-dot { display: none; }
  .guide-wrapper { flex-direction: column; }
  .main-content { margin-left: 0; padding: 28px 20px 60px; }
  .main-inner { max-width: 100%; }
}
