*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;background:#1B2838;color:#E0E6ED;line-height:1.8;overflow-x:hidden}

/* Layout */
.layout{display:flex;min-height:100vh}
.sidebar{width:280px;background:#0F1923;border-right:1px solid #2A3A4A;position:fixed;height:100vh;overflow-y:auto;z-index:100}
.sidebar-header{padding:24px 20px;border-bottom:1px solid #2A3A4A}
.sidebar-header h1{font-size:16px;background:linear-gradient(135deg,#00D4FF,#BB86FC);-webkit-background-clip:text;-webkit-text-fill-color:transparent}
.sidebar-header p{font-size:11px;color:#667788;margin-top:4px}
.sidebar-nav{padding:12px 0}
.nav-group{margin-bottom:8px}
.nav-group-title{padding:8px 20px;font-size:11px;color:#667788;text-transform:uppercase;letter-spacing:1px}
.nav-item{display:block;padding:8px 20px 8px 32px;color:#8899AA;text-decoration:none;font-size:13px;border-left:2px solid transparent;transition:all .2s}
.nav-item:hover{color:#E0E6ED;background:#ffffff05}
.nav-item.active{color:#00D4FF;background:#00D4FF08;border-left-color:#00D4FF}
.nav-item .nav-num{color:#667788;font-size:11px;margin-right:6px}
.main-content{flex:1;margin-left:280px;min-height:100vh}
.content-wrapper{max-width:900px;margin:0 auto;padding:48px 40px}

/* Article typography */
.article h1{font-size:32px;font-weight:700;color:#E0E6ED;margin-bottom:12px;line-height:1.3}
.article .subtitle{font-size:14px;color:#8899AA;margin-bottom:32px;padding-bottom:24px;border-bottom:1px solid #2A3A4A}
.article h2{font-size:22px;font-weight:700;color:#E0E6ED;margin:40px 0 16px;padding-bottom:8px;border-bottom:1px solid #2A3A4A;display:flex;align-items:center;gap:10px}
.article h2::before{content:'';width:4px;height:20px;background:linear-gradient(180deg,#00D4FF,#BB86FC);border-radius:2px;flex-shrink:0}
.article h3{font-size:17px;font-weight:600;color:#E0E6ED;margin:28px 0 12px}
.article h4{font-size:15px;font-weight:600;color:#E0E6ED;margin:20px 0 10px}
.article p{margin-bottom:14px;color:#C0C8D0}
.article ul,.article ol{margin:12px 0 16px 20px;color:#C0C8D0}
.article li{margin-bottom:6px}
.article a{color:#00D4FF;text-decoration:none}
.article a:hover{text-decoration:underline}
.article strong{color:#E0E6ED}
.article blockquote{margin:16px 0;padding:12px 16px;border-left:3px solid #00D4FF40;background:#00D4FF08;border-radius:0 8px 8px 0;color:#8899AA;font-size:13px}
.article blockquote p{margin:0}

/* Code blocks */
.article pre{background:#0D1B2A;border:1px solid #2A3A4A;border-radius:10px;padding:0;margin:16px 0;overflow-x:auto;font-family:"SF Mono",Monaco,Inconsolata,"Fira Code",monospace;font-size:13px;line-height:1.7;position:relative}
.article pre code{background:transparent!important;border:none!important;padding:16px 20px!important;display:block;color:#C0C8D0;font-size:13px;overflow-x:auto}
.article code{background:#1A2A3A;border:1px solid #2A3A4A;border-radius:4px;padding:2px 6px;font-family:"SF Mono",Monaco,Inconsolata,"Fira Code",monospace;font-size:12.5px;color:#00D4FF}
.article pre code{color:#C0C8D0}

/* Override highlight.js atom-one-dark to match our theme */
.hljs{background:#0D1B2A!important;padding:16px 20px!important}

/* Tables */
.article table{width:100%;border-collapse:collapse;margin:16px 0;font-size:13px}
.article th{background:#0F1923;color:#E0E6ED;padding:10px 14px;text-align:left;border:1px solid #2A3A4A;font-weight:600}
.article td{padding:10px 14px;border:1px solid #2A3A4A;color:#C0C8D0}
.article tr:nth-child(even){background:#0F192350}
.article tr:hover{background:#00D4FF08}

/* Checklist */
.article input[type="checkbox"]{margin-right:8px;accent-color:#00D4FF}

/* Scrollbar */
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-track{background:#0F1923}
::-webkit-scrollbar-thumb{background:#2A3A4A;border-radius:4px}
::-webkit-scrollbar-thumb:hover{background:#3A4A5A}

/* Responsive */
@media(max-width:900px){
.sidebar{transform:translateX(-100%);transition:transform .3s}
.sidebar.open{transform:translateX(0)}
.main-content{margin-left:0}
.content-wrapper{padding:24px 20px}
.menu-toggle{position:fixed;top:16px;left:16px;z-index:200;background:#0F1923;border:1px solid #2A3A4A;color:#E0E6ED;padding:8px 12px;border-radius:8px;cursor:pointer}
}
@media(min-width:901px){.menu-toggle{display:none}}

/* Demo links inside code tags */
.article code .demo-link{color:#00D4FF;text-decoration:none;border-bottom:1px dashed #00D4FF80;transition:all .2s}
.article code .demo-link:hover{color:#BB86FC;border-bottom-color:#BB86FC;text-decoration:none}
.article pre code .demo-link{color:#82AAFF;border-bottom:1px dashed #82AAFF80}
.article pre code .demo-link:hover{color:#BB86FC;border-bottom-color:#BB86FC}

/* Print */
@media print{
.sidebar{display:none}
.main-content{margin-left:0}
body{background:#fff;color:#000}
}
