/* 文档主结构 */
.docs-page { display: flex; flex-direction: column; }

.content-wrapper { 
    display: flex; 
    margin-top: var(--nav-height); 
    min-height: calc(100vh - var(--nav-height)); 
}

/* 侧边栏 */
.sidebar { 
    width: 260px; border-right: 1px solid var(--border-color); 
    padding: 2.5rem 1.2rem; position: sticky; top: var(--nav-height); 
    height: calc(100vh - var(--nav-height)); overflow-y: auto; 
    background: var(--bg-surface); flex-shrink: 0;
}

.sidebar-group-title { 
    font-size: 0.7rem; font-weight: 700; color: var(--text-light); 
    text-transform: uppercase; margin-bottom: 0.8rem; letter-spacing: 0.8px; padding-left: 0.8rem;
    margin-top: 1.8rem;
}

.sidebar-group-title:first-of-type {
    margin-top: -0.5rem;        /* 这样第一个标题（核心文档）就会紧贴顶部 */
}

.sidebar-link { 
    display: block; padding: 0.6rem 0.8rem; border-radius: 6px; 
    color: var(--text-light); font-size: 0.9rem; margin-bottom: 2px; 
}
.sidebar-link:hover { color: var(--text-color); background: rgba(0,0,0,0.03); }
html[data-theme='dark'] .sidebar-link:hover { background: rgba(255,255,255,0.05); }

.sidebar-link.active { 
    background: rgba(37, 99, 235, 0.08) !important; 
    color: var(--primary-color) !important; 
    font-weight: 600; 
}

/* 主内容区 */
.page { flex: 1; display: flex; min-width: 0; background: var(--bg-color); }
.page-content { flex: 1; padding: 3rem 4rem 5rem; max-width: 900px; margin: 0 auto; }

/* --- 修复: 插件页面头部 --- */
.plugin-header-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.plugin-icon-large {
    width: 64px; height: 64px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.plugin-icon-large .material-icons { font-size: 32px; }

.meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 10px;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}
.meta-badge .material-icons { font-size: 14px; }

/* 内容区块 */
.command-section { margin-bottom: 3rem; }
.command-section h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 1rem; }
.command-section h2 { 
    font-size: 1.5rem; margin: 2rem 0 1rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.command-section h3 { font-size: 1.15rem; margin: 1.5rem 0 0.8rem; }
.command-section p { color: var(--text-light); line-height: 1.7; margin-bottom: 1rem; }

/* 代码块与复制按钮 */
pre { 
    background: #1e293b; color: #f8fafc; padding: 1.25rem; border-radius: 10px; 
    margin: 1.5rem 0; position: relative; overflow-x: auto; 
    font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; 
}
html[data-theme='light'] pre { background: #f8fafc; color: #1e293b; border: 1px solid var(--border-color); }

.copy-pre-btn { 
    position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,0.1); 
    border: 1px solid rgba(255,255,255,0.1); color: #fff; cursor: pointer; 
    padding: 6px; border-radius: 6px; display: flex; align-items: center; opacity: 0; 
}
pre:hover .copy-pre-btn { opacity: 1; }

/* 提示框 */
.warning-box {
    background: rgba(210, 153, 34, 0.08);
    border-left: 4px solid #d29922;
    padding: 1rem 1.2rem;
    border-radius: 6px;
    margin: 1.5rem 0;
    color: #d29922;
}

/* --- 修复: 右侧目录 (TOC) 线条样式 --- */
.toc-sidebar { 
    width: 220px; padding: 3rem 1.5rem; position: sticky; 
    top: var(--nav-height); height: calc(100vh - var(--nav-height)); 
    flex-shrink: 0;
}

.toc-title { 
    font-size: 0.75rem; font-weight: 700; color: var(--text-light); 
    text-transform: uppercase; margin-bottom: 1rem; 
}

#toc-list { border-left: 1px solid var(--border-color); }

.toc-link { 
    display: block; padding: 6px 0 6px 15px; color: var(--text-light); 
    font-size: 0.85rem; border-left: 2px solid transparent; 
    margin-left: -1px; /* 覆盖在灰线上 */
    transition: var(--transition);
}

.toc-link:hover { color: var(--primary-color); }

.toc-link.active {
    color: var(--primary-color) !important;
    border-left-color: var(--primary-color) !important;
    font-weight: 600;
    background: transparent !important;
}

/* 响应式适配 */
@media (max-width: 1200px) { .toc-sidebar { display: none; } }
@media (max-width: 768px) { .sidebar { display: none; } .page-content { padding: 2rem; } }