:root{
--bg:#0f1115;
--panel:#161a22;
--text:#e6e6eb;
--muted:#9aa0aa;
--accent:#7c7cff;
--border:#232837;
}
[data-theme="light"]{
--bg:#f6f7fb;
--panel:#ffffff;
--text:#0f1115;
--muted:#5a5f6a;
--accent:#5b5bff;
--border:#e3e6ef;
}
*{box-sizing:border-box}
body{
margin:0;
font-family:Inter,system-ui;
background:var(--bg);
color:var(--text);
display:flex;
min-height:100vh;
}
.mobile-header{
display:none;
position:fixed;
top:0;left:0;right:0;
background:var(--panel);
border-bottom:1px solid var(--border);
padding:12px 16px;
z-index:1000;
height:56px;
}
.mobile-header-content{
display:flex;
width:100%;
justify-content:space-between;
align-items:center;
}
.mobile-header h1{
font-size:18px;
font-weight:800;
margin:0;
}
.mobile-menu-btn{
background:none;
border:none;
color:var(--text);
cursor:pointer;
padding:0;
font-size:24px;
}
.mobile-controls{
display:flex;
gap:8px;
align-items:center;
}
.mobile-controls button{
background:var(--bg);
border:1px solid var(--border);
color:var(--text);
padding:6px 10px;
border-radius:6px;
cursor:pointer;
font-size:14px;
min-width:40px;
}
aside{
width:260px;
background:var(--panel);
border-right:1px solid var(--border);
padding:24px;
position:fixed;
height:100vh;
overflow-y:auto;
}
aside h1{
font-size:22px;
font-weight:800;
margin:0 0 24px 0;
}
.nav button{
display:block;
width:100%;
text-align:left;
background:none;
border:none;
color:var(--muted);
font-size:16px;
margin-bottom:10px;
cursor:pointer;
}
.nav button.active,
.nav button:hover{color:var(--accent)}
.subnav{
margin-left:12px;
margin-top:6px;
display:none;
}
.subnav button{
font-size:14px;
margin-bottom:8px;
}
.theme{margin-top:32px}
.theme button{
width:100%;
padding:10px;
border-radius:8px;
border:1px solid var(--border);
background:var(--bg);
color:var(--text);
cursor:pointer;
margin-bottom:8px;
}
main{
margin-left:260px;
padding:48px;
max-width:1000px;
flex:1;
}
section{display:none}
section.active{display:block}
h2{font-size:32px;margin-bottom:12px}
h3{margin-top:32px}
h4{margin-top:20px}
p{line-height:1.7;color:var(--muted)}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
pre,code{
background:var(--bg);
border:1px solid var(--border);
border-radius:8px;
}
pre{padding:16px;overflow:auto}
code{padding:2px 6px}
details{
border:1px solid var(--border);
border-radius:10px;
padding:14px;
margin-bottom:16px;
background:var(--panel);
}
summary{
cursor:pointer;
font-weight:600;
color:var(--accent);
}
table{
width:100%;
border-collapse:collapse;
margin-top:12px;
}
th,td{
border:1px solid var(--border);
padding:8px;
text-align:left;
}
th{background:var(--bg)}

@media (max-width:768px){
body{flex-direction:column}
.mobile-header{display:flex}
aside{
position:fixed;
top:0;
left:-100%;
width:280px;
height:100vh;
transition:left 0.3s ease;
z-index:900;
}
aside.mobile-visible{left:0}
.mobile-overlay{
display:none;
position:fixed;
top:0;left:0;right:0;bottom:0;
background:rgba(0,0,0,0.5);
z-index:850;
}
.mobile-overlay.visible{display:block}
.nav button{
padding:0;
margin-bottom:10px; 
font-size:16px;
border-bottom:none;
}
.subnav button{
padding:0;
margin-bottom:8px;
font-size:14px;
margin-left:12px;
border-bottom:none;
}
main{
margin-left:0;
margin-top:56px;
padding:20px;
width:100%;
max-width:none;
}
h2{font-size:28px;margin-top:8px}
h3{font-size:22px;margin-top:24px}
pre{padding:12px;font-size:14px}
table{display:block;overflow-x:auto}
}
@media (max-width:480px){
.mobile-header{padding:10px}
.mobile-header h1{font-size:16px}
main{padding:16px}
h2{font-size:24px}
h3{font-size:20px}
p{font-size:15px;line-height:1.6}
pre{padding:10px;font-size:13px}
details{padding:12px}
}