/* Lumivra 文档样式 */
:root{
  --bg:#f7fafc;
  --card:#ffffff;
  --accent:#2563eb;
  --text:#1f2937;
  --muted:#6b7280;
  --max-width:1100px;
}
*{box-sizing:border-box}
html,body{height:100%;}
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
}
.header{
  background:linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0.6));
  border-bottom:1px solid rgba(0,0,0,0.04);
  padding:18px 20px;
}

/* Branding style: match preview site title */
.brand{display:flex;align-items:center;gap:12px;font-weight:800;font-size:1.25rem;color:var(--accent);}
.brand a{
  color: #4c1d95;
  text-decoration: none;
  display: inline-block;
  position: relative;
  padding-bottom: 6px;
  transition: color 0.2s ease, transform 0.15s ease;
}
.brand a::after{
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 56px;
  height: 4px;
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  border-radius: 4px;
  opacity: 0.95;
}
.brand a:hover{ color: #34126b; transform: translateY(-1px); }
.container{
  max-width:var(--max-width);
  margin:28px auto;
  padding:0 20px;
  display:grid;
  grid-template-columns: 260px 1fr;
  gap:28px;
}
.sidebar{
  background:var(--card);
  border-radius:12px;
  padding:18px;
  box-shadow:0 8px 28px rgba(16,24,40,0.06);
  height:calc(100vh - 160px);
  overflow:auto;
}
.toc h3{margin:0 0 10px 0;font-size:0.95rem}
.toc ul{list-style:none;padding:0;margin:0}
.toc li{margin:6px 0}
.toc a{color:var(--muted);text-decoration:none;font-size:0.95rem}
.toc a:hover{color:var(--accent)}
.content-wrap{
  background:var(--card);
  border-radius:12px;
  padding:32px;
  box-shadow:0 8px 28px rgba(16,24,40,0.06);
  overflow:auto;
  max-height:calc(100vh - 160px);
}
.content-wrap h1{font-size:1.6rem;margin-top:0}
.content-wrap h2{font-size:1.25rem;margin-top:1.25rem}
.content-wrap p{line-height:1.7;color:var(--text)}
.content-wrap pre{
  background: #0b0b0b !important;
  color: #9ca3af !important;
  padding: 16px !important;
  border-radius: 8px !important;
  overflow: auto !important;
  font-family: SFMono-Regular, Menlo, Monaco, 'Roboto Mono', 'Courier New', monospace;
  font-size: 0.95rem !important;
}
.content-wrap pre code{
  background: transparent !important;
  color: inherit !important;
}
.content-wrap code{background:#f3f4f6;padding:0.2rem 0.4rem;border-radius:4px}
.kv{font-weight:600;color:var(--muted)}
.footer{max-width:var(--max-width);margin:18px auto 48px;padding:0 20px;color:var(--muted);font-size:0.9rem}
@media (max-width:900px){
  .container{grid-template-columns:1fr;}
  .sidebar{height:auto;}
  .content-wrap{max-height:none}
}

/* GitHub corner */
.github-corner {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 48px;
  height: 48px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 6px;
  transition: transform .15s ease;
}
.github-corner:hover{transform:translateY(-2px)}
.github-corner svg{width:32px;height:32px;display:block}
.github-corner .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Enhanced content styles */
.content-wrap h1{font-size:1.9rem;margin-top:0;margin-bottom:0.6rem;letter-spacing:-0.02em}
.content-wrap h2{font-size:1.5rem;margin-top:1.25rem;margin-bottom:0.5rem}
.content-wrap h3{font-size:1.15rem;margin-top:1rem;margin-bottom:0.4rem}
.content-wrap p{line-height:1.8;color:var(--text);margin:0 0 1rem}
.content-wrap p.lead{font-size:1.05rem;color:var(--muted);margin-bottom:1.25rem}
.content-wrap code{background:#f3f4f6;padding:0.18rem 0.4rem;border-radius:6px;font-family:SFMono-Regular,Menlo,Monaco,'Roboto Mono','Courier New',monospace;color:#111}
.content-wrap pre{background:#0b0b0b !important;color:#9ca3af !important;padding:18px !important;border-radius:10px !important;overflow:auto !important;font-family: SFMono-Regular, Menlo, Monaco, 'Roboto Mono', 'Courier New', monospace;font-size:0.95rem !important;line-height:1.5 !important;box-shadow: inset 0 1px 0 rgba(255,255,255,0.02)}
.content-wrap pre code{background:transparent !important;color:inherit !important}
.callout{border-radius:8px;padding:14px 16px;margin:0 0 1rem;display:block}
.callout.note{background:#ecfdf5;border-left:4px solid #10b981;color:#064e3b}
.callout.info{background:#eef2ff;border-left:4px solid #6366f1;color:#1e293b}
.callout.warn{background:#fffbeb;border-left:4px solid #f59e0b;color:#854d0e}
.callout.danger{background:#fff1f2;border-left:4px solid #ef4444;color:#7f1d1d}
.content-wrap blockquote{border-left:4px solid rgba(16,24,40,0.06);padding:12px 16px;margin:0 0 1rem;background:rgba(16,24,40,0.02);border-radius:6px;color:var(--muted)}
.content-wrap ul{margin:0 0 1rem 1.25rem;padding:0}
.content-wrap ol{margin:0 0 1rem 1.4rem;padding:0}
.content-wrap li{margin:0.45rem 0}
.content-wrap table{width:100%;border-collapse:collapse;margin:0 0 1rem;font-size:0.95rem}
.content-wrap th,.content-wrap td{border:1px solid rgba(16,24,40,0.06);padding:10px;text-align:left}
.content-wrap thead th{background:rgba(37,99,235,0.06)}
.content-wrap img{max-width:100%;height:auto;border-radius:8px;display:block;margin:0.6rem 0}
.content-wrap figure{margin:0 0 1rem}
.content-wrap figcaption{font-size:0.9rem;color:var(--muted);margin-top:0.4rem}
.toc{position:sticky;top:28px}
.toc h3{display:flex;align-items:center;justify-content:space-between}
.toc ul{padding-right:8px}
@media (max-width:900px){
  .container{grid-template-columns:1fr}
  .sidebar{height:auto;padding-bottom:12px}
  .content-wrap{max-height:none;padding:22px}
  .header{padding:14px}
}

/* Link styles to match theme look */
a{
  color: var(--accent);
  text-decoration: none;
  position: relative;
  transition: color 0.18s ease, transform 0.12s ease;
}
a::after{
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  border-radius: 2px;
  transition: width 0.2s ease;
}
a:hover{ color: #1e40af; }
a:hover::after{ width: 100%; }

/* Specific: TOC links slightly muted */
.toc a{ color: var(--muted); }
.toc a:hover{ color: var(--accent); }

/* Accessibility focus */
a:focus{ outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,0.10); border-radius:4px; }
