/* Wiki 专用样式 */
/* ===== 布局基础 ===== */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f4f6fa;
}

.wiki-root {
    flex: 1 1 auto;
    display: flex;
    min-height: 0;
    /* overflow: visible; */
}

.wiki-sidebar {
    width: 260px;
    background: #f7f7fa;
    box-shadow: 2px 0 8px rgba(0,0,0,0.04);
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    position: fixed;
    left: 0;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    z-index: 2000;
    padding-top: 0;
    transform: translateX(0);
}
.wiki-sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background: #e9ecef;
    color: #495057;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-tree .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.nav-tree .nav-link:hover {
    background: #e9ecef;
    color: #232946;
    border-left-color: #4CAF50;
}

.nav-tree .nav-link.active {
    background: #e8f5e8;
    color: #4CAF50;
    border-left-color: #4CAF50;
    font-weight: 600;
}

.nav-tree .nav-link i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
}

/* ===== 主内容区 ===== */
.wiki-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: transparent;
    margin-left: 260px;
    padding-bottom: 120px;
    transition: margin-left 0.3s cubic-bezier(.4,0,.2,1);
}
.wiki-content.sidebar-collapsed {
    margin-left: 0;
}

.content-header {
    padding: 20px 30px 0 30px;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #45a049;
    text-decoration: underline;
}

.breadcrumb i {
    font-size: 0.8rem;
    color: #adb5bd;
}

.content-actions {
    display: flex;
    gap: 12px;
}

.btn-search, .btn-theme, .btn-edit {
    background: none;
    border: 1px solid #e9ecef;
    padding: 8px 12px;
    border-radius: 6px;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-search:hover, .btn-theme:hover, .btn-edit:hover {
    background: #f8f9fa;
    color: #495057;
    border-color: #adb5bd;
}

.btn-search:active, .btn-theme:active, .btn-edit:active {
    background: #e9ecef;
}

.document-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: transparent;
    padding: 0 48px;
}

@media (max-width: 900px) {
    .document-content {
        max-width: 100%;
        padding: 0 16px;
    }
}
@media (max-width: 600px) {
    .document-content {
        padding: 0 6px;
    }
}

.markdown-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    background: none;
}

@media (max-width: 600px) {
    .markdown-content {
        padding: 10px 2px;
        margin: 10px 0 0 0;
        border-radius: 0;
    }
}

/* ===== 响应式侧边栏 ===== */
@media (max-width: 1024px) {
    .wiki-root {
        flex-direction: column;
    }
    .wiki-sidebar {
        position: fixed;
        left: -260px;
        top: 70px;
        height: calc(100vh - 70px);
        z-index: 999;
        background: #fff;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
        transition: left 0.3s;
        overflow-y: auto;
        padding-top: 0;
    }
    .wiki-sidebar.active {
        left: 0;
    }
    .sidebar-toggle {
        display: block;
    }
    .wiki-content {
        margin-left: 0;
    }
    .content-header {
        padding: 15px 20px 0 20px;
    }
    .document-content {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    .content-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .markdown-content {
        padding: 10px 2px;
        margin: 10px 0 0 0;
    }
}

/* 移除对 .footer、.footer-content、.footer-section、.footer-bottom 的所有自定义覆盖，保证与主页一致 */

/* Markdown 内容样式 */
.markdown-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #232946;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #4CAF50;
}

.markdown-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #232946;
    margin: 35px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.markdown-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #232946;
    margin: 30px 0 12px 0;
}

.markdown-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #232946;
    margin: 25px 0 10px 0;
}

.markdown-content p {
    margin-bottom: 16px;
    color: #495057;
}

.markdown-content ul, .markdown-content ol {
    margin-bottom: 16px;
    padding-left: 20px;
}

.markdown-content li {
    margin-bottom: 8px;
    color: #495057;
}

/* 美化 Admonition 类型引用块 */
.markdown-content blockquote.important,
.markdown-content blockquote.warning,
.markdown-content blockquote.tip,
.markdown-content blockquote.info,
.markdown-content blockquote.success {
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(76,175,80,0.06);
  margin: 24px 0;
  padding: 18px 22px 16px 22px;
  border-left-width: 6px;
  background: #f8f9fa;
  position: relative;
}
.markdown-content blockquote.important {
  border-left: 6px solid #e67e22;
  background: #fff7e6;
}
.markdown-content blockquote.warning {
  border-left: 6px solid #e74c3c;
  background: #fff0f0;
}
.markdown-content blockquote.tip {
  border-left: 6px solid #00bcd4;
  background: #e0f7fa;
}
.markdown-content blockquote.info {
  border-left: 6px solid #3498db;
  background: #f0f8ff;
}
.markdown-content blockquote.success {
  border-left: 6px solid #27ae60;
  background: #eafaf1;
}
.markdown-content .admonition-title {
  display: flex;
  align-items: center;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 1.08rem;
  color: inherit;
  letter-spacing: 1px;
}
.markdown-content blockquote.important .admonition-title {
  color: #b4690e;
}
.markdown-content blockquote.warning .admonition-title {
  color: #b94a48;
}
.markdown-content blockquote.tip .admonition-title {
  color: #00838f;
}
.markdown-content blockquote.info .admonition-title {
  color: #217dbb;
}
.markdown-content blockquote.success .admonition-title {
  color: #218838;
}
.markdown-content .admonition-icon {
  margin-right: 10px;
  font-size: 1.3em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6em;
  height: 1.6em;
}
.markdown-content blockquote p {
  margin: 0 0 4px 0;
  color: inherit;
  font-size: 1rem;
  line-height: 1.8;
}

.markdown-content code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #e91e63;
    font-size: 0.9em;
}

.markdown-content pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.markdown-content pre code {
    background: none;
    padding: 0;
    color: #333;
    font-size: 0.9em;
    line-height: 1.5;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.markdown-content th {
    background: #4CAF50;
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}

.markdown-content td {
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
}

.markdown-content tr:hover {
    background: #f8f9fa;
}

.markdown-content hr {
    border: none;
    height: 2px;
    background: #e9ecef;
    margin: 30px 0;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.markdown-content a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.2s;
}

.markdown-content a:hover {
    color: #45a049;
    text-decoration: underline;
}

/* 自定义块样式 */
.success-card {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 20px;
    border-radius: 8px;
    margin: 24px 0;
    display: flex;
    gap: 16px;
}

.success-icon {
    font-size: 1.5rem;
    color: #28a745;
}

.success-content h3 {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #155724;
}

.error-card {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 20px;
    border-radius: 8px;
    margin: 24px 0;
    display: flex;
    gap: 16px;
}

.error-icon {
    font-size: 1.5rem;
    color: #dc3545;
}

.error-content h3 {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #721c24;
}

/* 文档元信息 */
.doc-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #6c757d;
    width: 100%;
    max-width: 800px;
}

/* 加载和错误状态 */
.loading, .error {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 16px;
    color: #4CAF50;
}

.error {
    color: #dc3545;
}

.error i {
    font-size: 2rem;
    margin-bottom: 16px;
}

.loading p, .error p {
    margin: 8px 0;
    font-size: 1.1rem;
} 

.sidebar-logo-center {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 36px;
    margin-bottom: 10px;
    background: transparent;
    box-shadow: none;
    border: none;
}

.sidebar-logo {
    width: 130px;
    height: auto;
    transition: transform 0.2s;
    display: block;
}

.nav-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: #b0b3b8;
    margin: 18px 0 10px 24px;
    letter-spacing: 1px;
}

.nav-tree .nav-item {
    margin-bottom: 8px;
}

.nav-tree .nav-link {
    padding-left: 32px;
}
.sidebar-logo-center a:hover .sidebar-logo {
    transform: scale(1.08) rotate(-2deg);
    filter: drop-shadow(0 0 16px rgba(76,175,80,0.35));
}

/* 侧边栏搜索样式 */
.sidebar-search {
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.search-container:focus-within {
    background: #fff;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    color: #6c757d;
    font-size: 0.9rem;
    pointer-events: none;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 40px 10px 36px;
    font-size: 0.9rem;
    color: #495057;
    outline: none;
}

.search-input::placeholder {
    color: #adb5bd;
}

.search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: none;
}

.search-clear:hover {
    color: #6c757d;
    background: #e9ecef;
}

.search-clear.visible {
    display: block;
}

.search-results {
    margin-top: 12px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-results.visible {
    display: block;
}

.search-result-item {
    padding: 8px 12px;
    margin-bottom: 4px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.search-result-item:hover {
    background: #e8f5e8;
    border-left-color: #4CAF50;
}

.search-result-item .result-title {
    font-weight: 500;
    color: #495057;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.search-result-item .result-file {
    font-size: 0.75rem;
    color: #6c757d;
}

.search-result-item .result-context {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 4px;
    line-height: 1.3;
}

.search-highlight {
    background: #fff3cd;
    color: #856404;
    padding: 1px 2px;
    border-radius: 2px;
} 

.anchor-nav {
    margin: 24px 0 12px 0;
    padding: 12px 0 12px 8px;
    border-left: 3px solid #e9ecef;
    background: none;
    font-size: 0.97rem;
    color: #8a9299;
    line-height: 1.7;
    min-height: 24px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.anchor-nav .anchor-link {
    color: #4CAF50;
    text-decoration: none;
    padding: 2px 0 2px 8px;
    border-left: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    cursor: pointer;
    display: block;
}
.anchor-nav .anchor-link.level-1 {
    font-weight: 600;
    font-size: 1.05em;
    margin-top: 2px;
}
.anchor-nav .anchor-link.level-2 {
    font-weight: 400;
    font-size: 0.98em;
    margin-left: 18px;
}
.anchor-nav .anchor-link.active {
    color: #232946;
    background: #e8f5e8;
    border-left: 2px solid #4CAF50;
}
@media (max-width: 600px) {
    .anchor-nav {
        font-size: 0.93rem;
        padding-left: 2px;
    }
    .anchor-nav .anchor-link.level-2 {
        margin-left: 10px;
    }
} 

 

/* 锚点导航样式 */
.sidebar-anchor-nav {
    margin: 0 0 0 24px;
    border-left: 2px solid #e0e0e0;
    background: #f9fafb;
    padding: 10px 0 10px 12px;
    border-radius: 0 0 8px 8px;
    box-shadow: none;
    position: relative;
    z-index: 1;
}

.sidebar-anchor-nav .anchor-nav-header {
    padding: 0 0 8px 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 8px;
}

.sidebar-anchor-nav .anchor-nav-header h4 {
    font-size: 0.88rem;
    color: #8a9299;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-anchor-nav .anchor-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.anchor-h2-item {
    position: relative;
    cursor: pointer;
    user-select: none;
    margin-bottom: 8px;
}
.anchor-h2-item:last-child {
    margin-bottom: 0;
}

.anchor-nav-list {
    list-style: none;
    margin: 14px 0 0 8px;
    padding: 4px 0 4px 12px;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.anchor-sub-list {
    margin-left: 8px;
    padding-left: 10px;
    background: none;
    border: none;
    margin-top: 2px;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(.4,0,.2,1), opacity 0.3s cubic-bezier(.4,0,.2,1), padding 0.3s cubic-bezier(.4,0,.2,1);
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.anchor-sub-list.expanded {
    max-height: 200px;
    opacity: 1;
    padding-top: 4px;
    padding-bottom: 4px;
}

.anchor-nav-list .anchor-link {
    display: block;
    padding: 6px 0 8px 24px;
    color: #495057;
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.4;
    border-left: 3px solid transparent;
    border-radius: 4px;
    transition: all 0.2s;
    margin-bottom: 2px;
    background: none;
    position: relative;
}

.anchor-nav-list .anchor-link.level-2 {
    padding-left: 24px;
    font-weight: 500;
    padding-bottom: 8px;
}

.anchor-nav-list .anchor-link.level-2:hover,
.anchor-nav-list .anchor-link.level-2.active {
    background: #e8f5e8;
    color: #4CAF50;
    border-left-color: #4CAF50;
}

.anchor-nav-list .anchor-link.level-3 {
    padding-left: 18px;
    font-size: 0.8rem;
    color: #6c757d;
    padding-bottom: 6px;
}

.anchor-nav-list .anchor-link.level-3:hover {
    background: #e9ecef;
    color: #232946;
    border-left-color: #4CAF50;
}

.anchor-nav-list .anchor-link.level-3.active {
    background: #e8f5e8;
    color: #4CAF50;
    border-left-color: #4CAF50;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .sidebar-anchor-nav {
        margin-left: 10px;
        padding-left: 6px;
    }
    .sidebar-anchor-nav .anchor-link.level-2 {
        padding-left: 10px;
    }
    .sidebar-anchor-nav .anchor-link.level-3 {
        padding-left: 20px;
    }
    
    .sidebar-search {
        padding: 12px 16px;
    }
    
    .search-input {
        font-size: 0.85rem;
        padding: 8px 36px 8px 32px;
    }
    
    .search-results {
        max-height: 250px;
    }
} 

.wiki-sidebar.collapsed {
    transform: translateX(-100%);
}
.wiki-content.sidebar-collapsed {
    margin-left: 0;
}

.sidebar-collapse-btn {
    position: fixed;
    top: 90px;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 0 20px 20px 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    color: #4CAF50;
    cursor: pointer;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, left 0.2s;
    font-size: 1.3em;
}
.sidebar-collapse-btn:hover {
    background: #e8f5e8;
    color: #388e3c;
}

@media (max-width: 1024px) {
    .sidebar-collapse-btn {
        display: none;
    }
} 

.wiki-sidebar.collapsing {
    transform: translateX(-100%);
}
.wiki-sidebar.collapsing > * {
    opacity: 0;
    pointer-events: auto;
} 

.wiki-content.collapsed-animating {
    margin-left: 0;
    transition: margin-left 0.3s cubic-bezier(.4,0,.2,1);
}
.wiki-content.sidebar-collapsed {
    margin-left: 0;
    transition: margin-left 0.3s cubic-bezier(.4,0,.2,1);
} 

/* Admonition 标题样式 */
.markdown-content .admonition-title {
  display: flex;
  align-items: center;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 1.08rem;
  color: inherit;
  letter-spacing: 1px;
}
.markdown-content .admonition-icon {
  margin-right: 10px;
  font-size: 1.3em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6em;
  height: 1.6em;
}

/* 内部 Wiki 链接样式 */
.wiki-internal-link {
  color: #4CAF50 !important;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  font-weight: 500;
}

.wiki-internal-link:hover {
  color: #45a049 !important;
  border-bottom-color: #4CAF50;
  text-decoration: none;
}

.wiki-internal-link:active {
  color: #388e3c !important;
} 