/* ============================================
   文档管理系统 - 全屏布局样式
   架构：左侧树形导航 + 右侧内容面板
   ============================================ */

:root {
    --sidebar-width: 280px;
    --header-height: 64px;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --bg-lighter: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --accent-color: #00d4ff;
    --accent-hover: #00b8d4;
    --code-bg: #f3f4f6;
    --code-border: #e5e7eb;
    --danger-color: #ef4444;
    --success-color: #10b981;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.docs-manager-body {
    background: #fff;
    overflow: hidden;
}

/* ============================================
   登录模态框
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.modal-active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.login-modal {
    max-width: 400px;
}

.login-container {
    padding: 48px;
    text-align: center;
}

.login-title {
    font-size: 28px;
    margin-bottom: 32px;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--bg-lighter);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    background: var(--bg-lighter);
}

.login-form .btn {
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
}

.login-error {
    color: #d32f2f;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

.login-error.show {
    display: block;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
}

.back-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
}

/* ============================================
   主容器布局
   ============================================ */

.docs-manager-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
}

/* ============================================
   顶部导航栏
   ============================================ */

.docs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding: 0 20px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-left {
    flex: 1;
}

.header-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================
   主内容区域
   ============================================ */

.docs-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ============================================
   左侧边栏 - 树形结构
   ============================================ */

.docs-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-light);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-header .btn {
    padding: 6px 10px;
    font-size: 16px;
    min-width: auto;
}

.sidebar-filter {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: white;
}

.sidebar-filter .language-filter {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    background: white;
    cursor: pointer;
}

.category-tree {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

/* ============================================
   树形节点
   ============================================ */

.tree-node {
    user-select: none;
}

.tree-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: var(--text-primary);
    min-height: 32px;
}

.tree-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.tree-item.category-item {
    font-weight: 500;
}

.tree-item.document-item {
    padding-left: 32px;
    color: var(--text-secondary);
}

.tree-item.document-item:hover {
    color: var(--text-primary);
    background: rgba(0, 212, 255, 0.05);
}

.tree-toggle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    flex-shrink: 0;
    user-select: none;
    margin-left: auto;
}

.tree-toggle.collapsed {
    transform: rotate(-90deg);
}

.tree-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.tree-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-children {
    margin-left: 24px;
    padding-left: 0;
}

.tree-children.hidden {
    display: none;
}

/* ============================================
   右侧主内容区
   ============================================ */

.docs-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: white;
}

/* ============================================
   内容面板
   ============================================ */

.content-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: white;
}

.panel-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-close:hover {
    color: var(--text-primary);
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* ============================================
   分类管理面板
   ============================================ */

.category-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.info-text {
    padding: 10px 12px;
    background: var(--bg-light);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-control {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.category-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   文档显示/编辑面板
   ============================================ */

.doc-view-mode,
.doc-edit-mode {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.doc-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.doc-toolbar .btn {
    padding: 8px 16px;
    font-size: 14px;
}

.doc-content {
    flex: 1;
    overflow-y: auto;
    line-height: 1.8;
    color: var(--text-primary);
    padding: 30px 30px 30px 40px;
}

.doc-content .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
    height: 100%;
}

.doc-content p {
    margin: 0 0 16px 0;
}

.doc-content h1,
.doc-content h2,
.doc-content h3,
.doc-content h4,
.doc-content h5,
.doc-content h6 {
    margin: 24px 0 16px 0;
    font-weight: 600;
    color: var(--text-primary);
}

.doc-content h1 { font-size: 28px; }
.doc-content h2 { font-size: 24px; }
.doc-content h3 { font-size: 20px; }
.doc-content h4 { font-size: 18px; }
.doc-content h5 { font-size: 16px; }
.doc-content h6 { font-size: 14px; }

.doc-content code {
    background: var(--bg-light);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    color: #d63384;
}

.doc-content pre {
    background: #282c34;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid #3e4451;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.doc-content pre code {
    background: none;
    padding: 0;
    color: #abb2bf;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.doc-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 16px;
    margin: 16px 0;
    color: var(--text-secondary);
}

.doc-content ul,
.doc-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.doc-content li {
    margin: 8px 0;
}

.doc-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
}

.doc-content table th,
.doc-content table td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

.doc-content table th {
    background: var(--bg-light);
    font-weight: 600;
}

.doc-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 16px 0;
}

.doc-content a {
    color: var(--accent-color);
    text-decoration: none;
}

.doc-content a:hover {
    text-decoration: underline;
}

/* ============================================
   文档编辑模式
   ============================================ */

.doc-edit-mode {
    padding: 0;
}

.edit-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.markdown-editor {
    flex: 1;
    resize: none;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.form-actions .btn {
    padding: 10px 20px;
}

/* ============================================
   空状态
   ============================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    text-align: center;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: var(--text-primary);
}

.empty-state p {
    margin: 0;
    font-size: 14px;
    max-width: 300px;
}

/* ============================================
   右键菜单
   ============================================ */

.context-menu {
    position: fixed;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    min-width: 180px;
}

.context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.context-menu-item:last-child {
    border-bottom: none;
}

.context-menu-item:hover {
    background: var(--bg-light);
    color: var(--accent-color);
}

/* ============================================
   按钮样式
   ============================================ */

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 212, 255, 0.2);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--code-bg);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

/* ============================================
   响应式设计
   ============================================ */

@media (max-width: 768px) {
    :root {
        --sidebar-width: 200px;
    }
}

@media (max-width: 600px) {
    .docs-content {
        flex-direction: column;
    }

    .docs-sidebar {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .docs-main {
        flex: 1;
    }

    .header-right {
        gap: 12px;
    }

    .user-name {
        display: none;
    }
}

/* ============================================
   滚动条美化
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}


/* ============================================
   浏览页面特定样式
   ============================================ */

.docs-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 16px 40px;
    border-bottom: 1px solid var(--border-color);
    background: white;
    gap: 12px;
}

.toolbar-left {
    flex: 1;
    min-width: 0;
}

.doc-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ============================================
   代码块和行内代码样式
   ============================================ */

pre {
    background: #282c34;
    color: #abb2bf;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 12px 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid #3e4451;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
    font-size: inherit;
}

code {
    background: var(--code-bg);
    color: #d73a49;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 13px;
    border: 1px solid var(--code-border);
}

/* 文档内容中的代码块 */
.doc-content pre {
    margin-left: 0;
    margin-right: 0;
}

.doc-content code {
    word-break: break-word;
}

/* 标题、段落、列表等基本元素 */
.doc-content h1,
.doc-content h2,
.doc-content h3,
.doc-content h4,
.doc-content h5,
.doc-content h6 {
    margin: 16px 0 8px 0;
    color: var(--text-primary);
    font-weight: 600;
}

.doc-content h1 {
    font-size: 28px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.doc-content h2 {
    font-size: 24px;
}

.doc-content h3 {
    font-size: 20px;
}

.doc-content p {
    margin: 12px 0;
    line-height: 1.6;
    color: var(--text-primary);
}

.doc-content ul,
.doc-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.doc-content li {
    margin: 6px 0;
    line-height: 1.6;
    color: var(--text-primary);
}

.doc-content blockquote {
    margin: 12px 0;
    padding: 12px 16px;
    border-left: 4px solid var(--accent-color);
    background: var(--bg-light);
    color: var(--text-secondary);
    font-style: italic;
}

.doc-content a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.doc-content a:hover {
    border-bottom-color: var(--accent-color);
}

.doc-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 12px 0;
}

.doc-content hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 24px 0;
}


/* ============================================
   Markdown 编辑器和帮助
   ============================================ */

.markdown-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.markdown-label label {
    margin: 0;
}

.btn-help {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: white;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-help:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.markdown-editor {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 13px;
    line-height: 1.5;
    min-height: 300px;
    resize: vertical;
}

.markdown-help {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 16px;
    margin-top: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.markdown-help h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.help-section {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.help-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.help-section strong {
    display: block;
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 600;
}

.help-section code {
    display: block;
    background: white;
    color: #d73a49;
    padding: 6px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 4px;
    border: 1px solid var(--code-border);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    line-height: 1.4;
}

.help-section code:last-child {
    margin-bottom: 0;
}


/* ============================================
   用户管理样式
   ============================================ */

.user-profile-form {
    max-width: 400px;
}

.user-list-container {
    overflow-x: auto;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.user-table thead {
    background: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
}

.user-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
}

.user-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 13px;
}

.user-table tbody tr:hover {
    background: var(--bg-light);
}

.user-table .btn {
    margin-right: 8px;
}

.user-table .btn:last-child {
    margin-right: 0;
}


/* ============================================
   管理员后台样式
   ============================================ */

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
}

.menu-item {
    padding: 12px 16px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.menu-item.active {
    background: var(--bg-light);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    font-weight: 600;
}

/* 模态框样式 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.user-form {
    max-width: 500px;
}

.user-form .form-group {
    margin-bottom: 16px;
}

.user-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px;
}

.user-form .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
}

.user-form .form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.form-actions .btn {
    flex: 1;
}

/* 状态徽章 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-suspended {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* 用户表格操作按钮 */
.user-table .btn {
    margin-right: 6px;
    font-size: 12px;
    padding: 6px 10px;
}

.user-table .btn:last-child {
    margin-right: 0;
}


/* ============================================
   文档内容美化
   ============================================ */

.doc-content {
    font-size: 15px;
    color: #374151;
}

.doc-content p {
    margin: 16px 0;
    line-height: 1.8;
}

.doc-content ul,
.doc-content ol {
    margin: 16px 0;
    padding-left: 24px;
    line-height: 1.8;
}

.doc-content li {
    margin: 8px 0;
}

.doc-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    border: 1px solid #e5e7eb;
}

.doc-content table th {
    background: #f3f4f6;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #e5e7eb;
}

.doc-content table td {
    padding: 12px;
    border: 1px solid #e5e7eb;
}

.doc-content table tr:hover {
    background: #f9fafb;
}

.doc-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.doc-content hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 24px 0;
}

.doc-content strong {
    font-weight: 600;
    color: #1f2937;
}

.doc-content em {
    font-style: italic;
    color: #6b7280;
}

/* ============================================
   代码块美化
   ============================================ */

.doc-content pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
    line-height: 1.5;
    font-size: 14px;
}

.doc-content pre code {
    background: none;
    color: #e5e7eb;
    padding: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
}

.doc-content code {
    background: #f3f4f6;
    color: #d946ef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
    font-size: 14px;
}

/* ============================================
   引用块美化
   ============================================ */

.doc-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 16px;
    margin-left: 0;
    margin-right: 0;
    color: #6b7280;
    font-style: italic;
    background: #f0f4ff;
    padding: 12px 16px;
    border-radius: 4px;
}

/* ============================================
   链接美化
   ============================================ */

.doc-content a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.doc-content a:hover {
    border-bottom-color: #667eea;
    color: #764ba2;
}

/* ============================================
   占位符
   ============================================ */

.placeholder {
    text-align: center;
    color: #9ca3af;
    padding: 48px 20px;
    font-size: 16px;
}
