
    :root {
        --bg-primary: #ffffff;
        --bg-secondary: #f8f9fa;
        --bg-tertiary: #f1f3f5;
        --text-primary: #212529;
        --text-secondary: #495057;
        --text-muted: #868e96;
        --border-color: #dee2e6;
        --accent-color: #228be6;
        --accent-hover: #1c7ed6;
        --hover-bg: #f1f3f5;
        --success-color: #40c057;
        --warning-color: #ffa94d;
        --error-color: #ff6b6b;
        --sidebar-width: 260px;
        --toc-width: 280px;
        --header-height: 50px;
        --transition-speed: 0.25s;
        --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
        --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
        --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
        --radius: 8px;
        --radius-sm: 4px;
        --font-size: 16px;
        --font-weight: 400;
        --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        --primary-color: #228be6;
    }

    [data-theme="dark"] {
        --bg-primary: #1c1b22;
        --bg-secondary: #2b2a33;
        --bg-tertiary: #36363f;
        --text-primary: #fbfbfe;
        --text-secondary: #cfcfd8;
        --text-muted: #8b8b96;
        --border-color: #44444f;
        --accent-color: #0df;
        --accent-hover: #80ebff;
        --hover-bg: #36363f;
        --success-color: #51cf66;
        --warning-color: #ffa94d;
        --error-color: #ff8787;
        --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
        --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
        --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);
        --primary-color: #0df;
    }

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    html {
        scroll-behavior: smooth;
    }

    body {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        background: var(--bg-primary);
        color: var(--text-primary);
        height: 100vh;
        overflow: hidden;
        transition: background var(--transition-speed), color var(--transition-speed);
        line-height: 1.6;
    }

    .app-container {
        display: flex;
        height: 100vh;
        position: relative;
    }

    .toggle-btn {
        width: 32px;
        height: 32px;
        border: none;
        background: transparent;
        border-radius: var(--radius-sm);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all var(--transition-speed);
        color: var(--text-secondary);
        flex-shrink: 0;
    }

    .toggle-btn:hover {
        background: var(--hover-bg);
        color: var(--accent-color);
    }

    .toggle-btn svg {
        width: 18px;
        height: 18px;
    }

    .sidebar {
        width: var(--sidebar-width);
        background: var(--bg-primary);
        border-right: 1px solid var(--border-color);
        display: flex;
        flex-direction: column;
        transition: all var(--transition-speed);
        overflow: hidden;
        flex-shrink: 0;
        z-index: 50;
    }

    .sidebar.collapsed {
        width: 0;
        border-right: none;
    }

.sidebar-header {
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    
    .sidebar-title {
        font-size: 11px;
        font-weight: 700;
        color: var(--text-muted);
        white-space: nowrap;
        text-transform: uppercase;
        letter-spacing: 0.8px;
    }

    .sidebar-actions {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .sidebar.collapsed .sidebar-title,
    .sidebar.collapsed .sidebar-content {
        opacity: 0;
        pointer-events: none;
    }

    .sidebar-content {
        flex: 1;
        overflow-y: auto;
        padding: 12px;
        transition: opacity var(--transition-speed);
    }

    .sidebar-content::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar-content::-webkit-scrollbar-track {
        background: transparent;
    }

    .sidebar-content::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 3px;
    }

    .sidebar-content::-webkit-scrollbar-thumb:hover {
        background: var(--text-muted);
    }

    .search-container {
        position: relative;
        margin-bottom: 12px;
    }

    .search-input {
        width: 100%;
        padding: 8px 12px 8px 34px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius);
        background: var(--bg-secondary);
        color: var(--text-primary);
        font-size: 13px;
        outline: none;
        transition: all var(--transition-speed);
    }

    .search-input:focus {
        border-color: var(--accent-color);
        background: var(--bg-primary);
        box-shadow: 0 0 0 3px rgba(0, 221, 255, 0.1);
    }

    .search-input::placeholder {
        color: var(--text-muted);
    }

    .search-icon {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        color: var(--text-muted);
        pointer-events: none;
    }

    .file-tree {
        font-size: 13px;
    }

    .tree-item {
        user-select: none;
    }

    .tree-folder {
        cursor: pointer;
        padding: 8px 10px;
        border-radius: var(--radius-sm);
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--text-primary);
        font-weight: 500;
        transition: all var(--transition-speed);
        margin: 2px 0;
    }

    .tree-folder:hover {
        background: var(--hover-bg);
    }

    .tree-folder .icon {
        width: 14px;
        height: 14px;
        color: #f59f00;
        transition: transform var(--transition-speed);
        flex-shrink: 0;
        font-size: 10px;
    }

    .tree-folder.expanded .icon {
        transform: rotate(90deg);
    }

    .tree-folder-children {
        padding-left: 12px;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease-out;
    }

    .tree-folder.expanded ~ .tree-folder-children,
    .tree-folder-children.expanded {
        max-height: 5000px;
    }

    .tree-file {
        cursor: pointer;
        padding: 6px 10px;
        border-radius: var(--radius-sm);
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--text-secondary);
        transition: all var(--transition-speed);
        margin: 2px 0;
    }

    .tree-file:hover {
        background: var(--hover-bg);
        color: var(--accent-color);
    }

    .tree-file.active {
        background: rgba(0, 221, 255, 0.12);
        color: var(--accent-color);
        font-weight: 500;
    }

    .tree-file .icon {
        width: 15px;
        height: 15px;
        flex-shrink: 0;
        font-size: 13px;
        color: #868e96;
    }

    .tree-file .fa-brands {
        font-size: 13px;
    }

    .tree-file.active .icon {
        color: var(--accent-color);
    }

    .tree-item-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
        font-size: 13px;
    }

    .tree-folder .folder-icon {
        color: #fab005;
        font-size: 14px;
    }

    .search-results {
        padding: 8px;
        background: var(--bg-tertiary);
        border-radius: var(--radius-sm);
        margin-bottom: 12px;
        max-height: 300px;
        overflow-y: auto;
        display: none;
    }

    .search-results.active {
        display: block;
    }

    .search-result-item {
        padding: 8px 10px;
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: background var(--transition-speed);
        margin-bottom: 4px;
    }

    .search-result-item:hover {
        background: var(--hover-bg);
    }

    .search-result-item:last-child {
        margin-bottom: 0;
    }

    .search-result-item .file-name {
        font-weight: 500;
        color: var(--accent-color);
        font-size: 13px;
    }

    .search-result-item .file-path {
        font-size: 11px;
        color: var(--text-muted);
        margin-top: 2px;
    }

    .main-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
        position: relative;
        overflow: hidden;
    }

    .content-header {
        height: var(--header-height);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        background: var(--bg-primary);
        flex-shrink: 0;
        gap: 12px;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
        min-width: 0;
    }

    .file-name-display {
        font-size: 14px;
        font-weight: 500;
        color: var(--text-primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
    }
    
    .header-stat {
        font-size: 12px;
        color: var(--text-muted);
        padding: 4px 8px;
        border-radius: 4px;
    }
    
    .header-search {
        position: relative;
        display: flex;
        align-items: center;
    }

    .header-search-icon {
        position: absolute;
        left: 10px;
        width: 14px;
        height: 14px;
        color: var(--text-muted);
        pointer-events: none;
    }

    .header-search-input {
        width: 180px;
        padding: 6px 12px 6px 32px;
        border: 1px solid var(--border-color);
        border-radius: 20px;
        background: var(--bg-tertiary);
        color: var(--text-primary);
        font-size: 13px;
        outline: none;
        transition: all var(--transition-speed);
    }

    .header-search-input:focus {
        width: 240px;
        border-color: var(--accent-color);
        background: var(--bg-primary);
        box-shadow: 0 0 0 3px rgba(0, 221, 255, 0.1);
    }

    .header-search-input::placeholder {
        color: var(--text-muted);
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        border: none;
        background: transparent;
        border-radius: var(--radius-sm);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        transition: all var(--transition-speed);
    }

    .theme-toggle:hover {
        background: var(--hover-bg);
        color: var(--accent-color);
    }

    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }

    .theme-toggle-container {
        display: flex;
        align-items: center;
    }

    .theme-toggle-input {
        display: none;
    }

    .toggle-background {
        width: 36px;
        height: 20px;
        background: var(--bg-tertiary);
        border-radius: 10px;
        position: relative;
        cursor: pointer;
        transition: background var(--transition-speed);
    }

    .toggle-background::before {
        content: '';
        position: absolute;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--text-muted);
        top: 2px;
        left: 2px;
        transition: all var(--transition-speed);
    }

    .theme-toggle-input:checked + .toggle-background {
        background: var(--accent-color);
    }

    .theme-toggle-input:checked + .toggle-background::before {
        left: 18px;
        background: white;
    }

    .content-wrapper {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0;
        position: relative;
    }

    .content-wrapper.full-width {
        max-width: 100%;
    }

    .content-wrapper::-webkit-scrollbar {
        width: 8px;
    }

    .content-wrapper::-webkit-scrollbar-track {
        background: transparent;
    }

    .content-wrapper::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 4px;
    }

    .content-wrapper::-webkit-scrollbar-thumb:hover {
        background: var(--text-muted);
    }

    #content {
        max-width: 900px;
        margin: 0 auto;
        padding: 32px;
    }

    .content-wrapper.full-width #content {
        max-width: 100%;
    }

    .empty-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        color: var(--text-muted);
        gap: 12px;
        text-align: center;
        padding: 40px;
    }

    .empty-state svg {
        width: 80px;
        height: 80px;
        opacity: 0.3;
        color: var(--border-color);
    }

    .empty-state p {
        font-size: 15px;
        color: var(--text-muted);
    }

    .empty-state-hint {
        font-size: 13px;
        color: var(--text-muted);
        opacity: 0.7;
        margin-top: 4px;
    }
    
    .float-window-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        display: none;
    }
    
    .float-window-overlay.active {
        display: block;
    }
    
    .float-window {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 80%;
        max-width: 800px;
        height: 80%;
        max-height: 600px;
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
        z-index: 1001;
        display: none;
        flex-direction: column;
        overflow: hidden;
    }
    
    .float-window.active {
        display: flex;
    }
    
    .float-window-header {
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: var(--bg-secondary);
    }
    
    .float-window-title {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .float-window-close {
        background: none;
        border: none;
        padding: 6px;
        border-radius: 6px;
        cursor: pointer;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .float-window-close:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
    }
    
    .float-window-content {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
    }

    .markdown-body {
        font-size: 16px;
        line-height: 1.75;
        color: var(--text-primary);
        font-family: var(--font-family);
    }

    .markdown-body h1,
    .markdown-body h2,
    .markdown-body h3,
    .markdown-body h4,
    .markdown-body h5,
    .markdown-body h6 {
        margin: 28px 0 16px 0;
        color: var(--text-primary);
        font-weight: 600;
        line-height: 1.4;
    }

    .markdown-body h1 {
        font-size: 1.75em;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 10px;
        margin-top: 0;
    }

    .markdown-body h2 {
        font-size: 1.4em;
    }

    .markdown-body h3 {
        font-size: 1.2em;
    }

    .markdown-body h4 {
        font-size: 1.05em;
    }

    .markdown-body h5,
    .markdown-body h6 {
        font-size: 1em;
    }

    .markdown-body p {
        margin: 14px 0;
    }

    .markdown-body ul,
    .markdown-body ol {
        margin: 14px 0;
        padding-left: 26px;
    }

    .markdown-body li {
        margin: 6px 0;
    }

    .markdown-body li > ul,
    .markdown-body li > ol {
        margin: 4px 0;
    }

    .markdown-body li {
        position: relative;
    }

    .list-collapse-indicator {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        margin-right: 4px;
        cursor: pointer;
        color: var(--text-muted);
        border-radius: 4px;
        transition: all 0.2s;
        flex-shrink: 0;
        vertical-align: middle;
    }

    .list-collapse-indicator:hover {
        background: var(--hover-bg);
        color: var(--accent-color);
    }

    .list-collapse-indicator svg {
        width: 14px;
        height: 14px;
        transition: transform 0.2s;
    }

    .list-collapse-indicator.collapsed svg {
        transform: rotate(-90deg);
    }

    .list-bullet {
        position: absolute;
        left: -20px;
        top: 8px;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--text-muted);
    }

    .markdown-body blockquote {
        border-left: 3px solid var(--accent-color);
        padding: 8px 16px;
        margin: 16px 0;
        color: var(--text-secondary);
        background: var(--bg-secondary);
        border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    }

    .markdown-body code {
        background: var(--bg-tertiary);
        padding: 3px 8px;
        border-radius: var(--radius-sm);
        font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
        font-size: 0.875em;
        color: var(--accent-color);
    }

    .markdown-body pre {
        background: var(--bg-secondary);
        padding: 16px;
        border-radius: var(--radius);
        overflow-x: auto;
        margin: 20px 0;
        border: 1px solid var(--border-color);
    }

    .markdown-body pre code {
        background: none;
        padding: 0;
        color: var(--text-primary);
    }

    .markdown-body a {
        color: var(--accent-color);
        text-decoration: none;
        transition: color var(--transition-speed);
    }

    .markdown-body a:hover {
        color: var(--accent-hover);
        text-decoration: underline;
    }

    .markdown-body img {
        max-width: 100%;
        height: auto;
        border-radius: var(--radius);
        margin: 16px 0;
    }

    .markdown-body table {
        border-collapse: collapse;
        width: 100%;
        margin: 16px 0;
    }

    .markdown-body table th,
    .markdown-body table td {
        border: 1px solid var(--border-color);
        padding: 8px 12px;
        text-align: left;
    }

    .markdown-body table th {
        background: var(--bg-tertiary);
        font-weight: 600;
    }

    .markdown-body table tr:nth-child(even) {
        background: var(--bg-secondary);
    }

    .markdown-body hr {
        border: none;
        border-top: 1px solid var(--border-color);
        margin: 24px 0;
    }

    .markdown-body mark {
        background: rgba(255, 200, 0, 0.534);
        padding: 2px 4px;
        border-radius: 2px;
    }

    .wiki-link {
        color: var(--accent-color);
        text-decoration: none;
        cursor: pointer;
        transition: all var(--transition-speed);
        position: relative;
    }

    .wiki-link:hover {
        text-decoration: underline;
    }

    .wiki-link-broken {
        color: var(--error-color);
        text-decoration: line-through;
        opacity: 0.6;
    }

    .code-block-wrapper {
        position: relative;
        margin: 20px 0;
        border-radius: var(--radius);
        overflow: hidden;
        border: 1px solid var(--border-color);
        background: var(--bg-secondary);
    }

    .code-block-wrapper pre {
        margin: 0;
        border-radius: 0;
        padding: 44px 16px 16px 16px;
        background: transparent;
    }

    .code-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 16px;
        background: var(--bg-tertiary);
        border-bottom: 1px solid var(--border-color);
        font-size: 12px;
        z-index: 1;
    }

    .code-lang {
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-secondary);
    }

    .copy-btn {
        padding: 4px 10px;
        border: none;
        background: var(--bg-primary);
        color: var(--text-secondary);
        border-radius: var(--radius-sm);
        cursor: pointer;
        font-size: 11px;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 4px;
        transition: all var(--transition-speed);
        opacity: 0.7;
    }

    .copy-btn:hover {
        background: var(--accent-color);
        color: white;
        opacity: 1;
    }

    .copy-btn.copied {
        background: var(--success-color);
        color: white;
    }

.copy-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .mermaid-container {
        margin: 20px 0;
        position: relative;
    }
    
    .mermaid-container svg {
        max-width: 100%;
        height: auto;
    }

    .mermaid-toolbar {
        display: none;
        position: absolute;
        top: 8px;
        right: 8px;
        gap: 4px;
        z-index: 10;
    }

    .mermaid-container:hover .mermaid-toolbar {
        display: flex;
    }

    .mermaid-toolbar-btn {
        width: 28px;
        height: 28px;
        border: 1px solid var(--border-color);
        background: var(--bg-secondary);
        color: var(--text-secondary);
        border-radius: var(--radius-sm);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        transition: all var(--transition-speed);
    }

    .mermaid-toolbar-btn:hover {
        background: var(--accent-color);
        color: white;
        border-color: var(--accent-color);
    }

    .mermaid-toolbar-btn.active {
        background: var(--accent-color);
        color: white;
        border-color: var(--accent-color);
    }

    .mermaid-fullscreen-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.85);
        z-index: 2000;
        display: none;
        flex-direction: column;
    }

    .mermaid-fullscreen-overlay.active {
        display: flex;
    }

    .mermaid-fullscreen-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
    }

    .mermaid-fullscreen-title {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-primary);
    }

    .mermaid-fullscreen-controls {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mermaid-fullscreen-btn {
        padding: 6px 12px;
        border: 1px solid var(--border-color);
        background: var(--bg-primary);
        color: var(--text-secondary);
        border-radius: var(--radius-sm);
        cursor: pointer;
        font-size: 13px;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: all var(--transition-speed);
    }

    .mermaid-fullscreen-btn:hover {
        background: var(--accent-color);
        color: white;
        border-color: var(--accent-color);
    }

    .mermaid-fullscreen-btn.active {
        background: var(--accent-color);
        color: white;
        border-color: var(--accent-color);
    }

    .mermaid-fullscreen-btn.close-btn {
        background: var(--error-color);
        border-color: var(--error-color);
        color: white;
    }

    .mermaid-fullscreen-btn.close-btn:hover {
        background: #dc3545;
    }

    .mermaid-fullscreen-content {
        flex: 1;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
        cursor: grab;
    }

    .mermaid-fullscreen-content.panning {
        cursor: grabbing;
    }

    .mermaid-fullscreen-content svg {
        max-width: none;
        max-height: none;
        transform-origin: center center;
        transition: transform 0.1s ease-out;
    }
    
    .hljs {
        background: transparent !important;
        color: var(--text-primary);
    }

    .hljs-keyword, .hljs-selector-tag, .hljs-built_in {
        color: #c678dd;
    }

    .hljs-string, .hljs-attribute {
        color: #98c379;
    }

    .hljs-number, .hljs-literal {
        color: #d19a66;
    }

    .hljs-comment {
        color: #5c6370;
        font-style: italic;
    }

    .hljs-function, .hljs-title {
        color: #61afef;
    }

    .hljs-variable, .hljs-params {
        color: #e06c75;
    }

    .search-highlight {
        background: rgba(255, 255, 0, 0.4);
        border-radius: 2px;
        padding: 0 2px;
        transition: all var(--transition-speed);
    }

    .search-highlight.current {
        background: rgba(255, 165, 0, 0.6);
        box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.3);
    }

    .toc-sidebar {
        width: var(--toc-width);
        background: var(--bg-primary);
        border-left: 1px solid var(--border-color);
        display: flex;
        flex-direction: column;
        transition: all var(--transition-speed);
        overflow: hidden;
        flex-shrink: 0;
        z-index: 50;
    }

    .toc-sidebar.collapsed {
        width: 0;
        border-left: none;
    }

    .sidebar-handle {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        cursor: col-resize;
        background: transparent;
        transition: background 0.2s;
        z-index: 10;
    }

    .sidebar-handle:hover {
        background: var(--accent-color);
    }

    .sidebar-topbar {
        padding: 8px 12px;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: var(--bg-primary);
    }

    .topbar-content {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .clickable-icon {
        width: 28px;
        height: 28px;
        border: none;
        background: transparent;
        border-radius: var(--radius-sm);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        transition: all var(--transition-speed);
    }

    .clickable-icon:hover {
        background: var(--hover-bg);
        color: var(--accent-color);
    }

    .clickable-icon svg {
        width: 18px;
        height: 18px;
    }

    .sidebar-collapse-icon svg {
        width: 16px;
        height: 16px;
    }

    .sidebar-content-wrapper {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .leaf-content {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .toc-tabs {
        display: flex;
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-primary);
    }

    .toc-tab {
        flex: 1;
        padding: 12px 8px;
        border: none;
        background: transparent;
        color: var(--text-muted);
        font-size: 11px;
        cursor: pointer;
        transition: all var(--transition-speed);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    .toc-tab:hover {
        color: var(--text-primary);
        background: var(--bg-secondary);
    }

    .toc-tab.active {
        color: var(--accent-color);
        background: var(--bg-primary);
        border-bottom: 2px solid var(--accent-color);
        margin-bottom: -1px;
    }

    .toc-tab svg {
        flex-shrink: 0;
        width: 14px;
        height: 14px;
    }

    .toc-panels {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .toc-panel {
        display: none;
        flex: 1;
        overflow-y: auto;
    }

    .toc-panel.active {
        display: flex;
        flex-direction: column;
    }

    .toc-panel-content {
        padding: 12px;
        overflow-y: auto;
        flex: 1;
    }

    .toc-item {
        padding: 8px 10px;
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: all var(--transition-speed);
        color: var(--text-secondary);
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-left: 2px solid transparent;
        margin-left: -2px;
    }

    .toc-item:hover {
        background: var(--hover-bg);
        color: var(--accent-color);
        border-left-color: var(--accent-color);
    }

    .toc-item.level-1 {
        padding-left: 12px;
    }

    .toc-item.level-2 {
        padding-left: 20px;
    }

    .toc-item.level-3 {
        padding-left: 28px;
    }

    .feature-header {
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .feature-title {
        font-size: 11px;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.8px;
    }

    .nav-action-button {
        width: 24px;
        height: 24px;
        padding: 0;
    }

    .nav-action-button svg {
        width: 14px;
        height: 14px;
    }

    .tree-container {
        padding: 0;
    }

    .graph-view-wrapper {
        border-bottom: 1px solid var(--border-color);
    }

    .graph-view-placeholder {
        padding: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 120px;
        background: var(--bg-secondary);
    }

    .graph-view-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .graph-icon {
        width: 40px;
        height: 40px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: var(--text-muted);
        transition: all var(--transition-speed);
        background: var(--bg-primary);
    }

    .graph-icon:hover {
        border-color: var(--accent-color);
        color: var(--accent-color);
    }

    .graph-icon svg {
        width: 20px;
        height: 20px;
    }

    .graph-expand, .graph-global {
        display: flex;
    }

    #graph-canvas.hide {
        display: none;
    }

    .graph-view-container {
        flex-direction: row;
        gap: 8px;
    }

    .yaml-front-matter {
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-left: 3px solid var(--accent-color);
        padding: 12px 16px;
        margin-bottom: 16px;
        border-radius: 4px;
        font-family: 'SF Mono', 'Fira Code', monospace;
        font-size: 13px;
        overflow-x: auto;
    }

    .yaml-front-matter .token {
        color: var(--text-primary);
    }

    .yaml-front-matter .token.key {
        color: #e06c75;
    }

    .yaml-front-matter .token.string {
        color: #98c379;
    }

    .yaml-front-matter .token.number {
        color: #d19a66;
    }

    .yaml-front-matter .token.boolean {
        color: #c678dd;
    }

    .yaml-front-matter .token.comment {
        color: #5c6370;
        font-style: italic;
    }

    .yaml-front-matter .token.punctuation {
        color: var(--text-muted);
    }

    .yaml-front-matter .token.datetime {
        color: #d19a66;
    }

    .yaml-front-matter .copy-code-button {
        display: none;
    }

    .yaml-properties-table {
        width: 100%;
        border-collapse: collapse;
        margin: 12px 0;
        font-size: 13px;
        background: var(--bg-secondary);
        border-radius: var(--radius);
        overflow: hidden;
    }

    .yaml-properties-table tr {
        border-bottom: 1px solid var(--border-color);
    }

    .yaml-properties-table tr:last-child {
        border-bottom: none;
    }

    .yaml-properties-table td {
        padding: 8px 12px;
        vertical-align: top;
    }

    .yaml-properties-table td:first-child {
        font-weight: 600;
        color: var(--accent-color);
        width: 140px;
        background: var(--bg-tertiary);
    }

    .yaml-properties-table td:last-child {
        color: var(--text-primary);
        word-break: break-word;
    }

    .yaml-properties-table .yaml-tag {
        display: inline-block;
        padding: 2px 8px;
        background: var(--bg-tertiary);
        border-radius: 4px;
        font-size: 12px;
        margin: 2px;
        color: var(--text-secondary);
    }

    .yaml-properties-table .yaml-boolean {
        color: #c678dd;
    }

    .yaml-properties-table .yaml-datetime {
        color: #d19a66;
    }

    .sidebar-tabs {
        display: flex;
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-primary);
        padding: 0 8px;
    }

    .sidebar-tab {
        flex: 1;
        padding: 10px 8px;
        border: none;
        background: transparent;
        color: var(--text-muted);
        font-size: 11px;
        cursor: pointer;
        transition: all var(--transition-speed);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        font-weight: 500;
    }

    .sidebar-tab:hover {
        color: var(--text-primary);
    }

    .sidebar-tab.active {
        color: var(--accent-color);
        border-bottom: 2px solid var(--accent-color);
    }

    .sidebar-panel {
        display: none;
        height: 100%;
    }

    .sidebar-panel.active {
        display: block;
    }

    .graph-canvas-container {
        height: 250px;
        background: var(--bg-secondary);
        position: relative;
        user-select: none;
        -webkit-user-select: none;
    }

    #network {
        width: 100%;
        height: 100%;
        pointer-events: auto;
        z-index: 2;
    }

    .graph-empty-state {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        color: var(--text-muted);
        pointer-events: none;
        z-index: 1;
    }
    
    .links-section {
        padding: 12px;
        border-bottom: 1px solid var(--border-color);
        max-height: 150px;
        overflow-y: auto;
    }
    
    .links-header {
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        color: var(--text-muted);
        margin-bottom: 8px;
        letter-spacing: 0.5px;
    }
    
    .links-list {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .link-item {
        font-size: 13px;
        color: var(--text-secondary);
        padding: 10px 12px;
        border-radius: 4px;
        cursor: pointer;
        transition: background 0.15s;
        margin: 2px 0;
    }
    
    .link-item:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
    }
    
    .links-empty {
        font-size: 12px;
        color: var(--text-muted);
        font-style: italic;
    }
    
    .backlinks-section {
        padding: 12px;
        max-height: 150px;
        overflow-y: auto;
    }
    
    .backlinks-header {
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        color: var(--text-muted);
        margin-bottom: 8px;
        letter-spacing: 0.5px;
    }
    
    .backlinks-list {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .backlink-item {
        font-size: 13px;
        color: var(--text-secondary);
        padding: 10px 12px;
        border-radius: 4px;
        cursor: pointer;
        transition: background 0.15s;
        margin: 2px 0;
    }
    
    .backlink-item:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
    }
    
    .backlinks-empty {
        font-size: 12px;
        color: var(--text-muted);
        font-style: italic;
    }

    .graph-footer-actions {
        padding: 12px;
        border-top: 1px solid var(--border-color);
    }

    .graph-footer-btn {
        width: 100%;
        padding: 10px 16px;
        border: 1px solid var(--border-color);
        background: var(--bg-secondary);
        color: var(--text-secondary);
        border-radius: var(--radius-sm);
        cursor: pointer;
        font-size: 13px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: all var(--transition-speed);
    }

    .graph-footer-btn:hover {
        background: var(--accent-color);
        color: white;
        border-color: var(--accent-color);
    }

    .graph-empty-state svg {
        opacity: 0.5;
        margin-bottom: 8px;
    }

    .graph-empty-state p {
        font-size: 13px;
        font-weight: 500;
        margin: 0;
    }

    .graph-empty-state span {
        font-size: 11px;
    }

    .settings-section {
        padding: 16px;
    }

    .settings-group {
        margin-bottom: 20px;
    }

    .settings-label {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 8px;
    }

    .color-picker-wrapper {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .color-picker {
        width: 40px;
        height: 32px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        cursor: pointer;
        padding: 0;
        background: transparent;
    }

    .color-picker::-webkit-color-swatch-wrapper {
        padding: 2px;
    }

    .color-picker::-webkit-color-swatch {
        border-radius: 4px;
        border: none;
    }

    .color-value {
        font-size: 13px;
        font-family: monospace;
        color: var(--text-secondary);
    }

    .settings-select {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        background: var(--bg-secondary);
        color: var(--text-primary);
        font-size: 13px;
        cursor: pointer;
    }

    .settings-select:focus {
        outline: none;
        border-color: var(--accent-color);
    }

    .theme-buttons {
        display: flex;
        gap: 8px;
    }

    .theme-btn {
        flex: 1;
        padding: 10px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        background: var(--bg-secondary);
        color: var(--text-secondary);
        font-size: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: all var(--transition-speed);
    }

    .theme-btn:hover {
        border-color: var(--accent-color);
        color: var(--accent-color);
    }

.theme-btn.active {
        background: var(--accent-color);
        border-color: var(--accent-color);
        color: white;
    }

    .settings-button {
        width: 100%;
        padding: 10px 16px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        background: var(--bg-secondary);
        color: var(--text-primary);
        font-size: 13px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: all var(--transition-speed);
    }

    .settings-button:hover {
        border-color: var(--accent-color);
        color: var(--accent-color);
    }

    .settings-button.danger {
        border-color: #dc3545;
        color: #dc3545;
    }

    .settings-button.danger:hover {
        background: #dc3545;
        color: white;
    }

    .settings-textarea {
        width: 100%;
        min-height: 120px;
        padding: 10px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        background: var(--bg-secondary);
        color: var(--text-primary);
        font-size: 12px;
        font-family: 'Courier New', monospace;
        resize: vertical;
        box-sizing: border-box;
    }

    .settings-textarea:focus {
        outline: none;
        border-color: var(--accent-color);
    }

    @media print {
        body {
            background: white !important;
            color: black !important;
            height: auto !important;
            overflow: visible !important;
        }

        .sidebar, .header, .search-bar, .graph-canvas-container, 
        .links-section, .backlinks-section, .breadcrumbs, .settings-section,
        .file-tree-sidebar, #panel-graph, #panel-settings, #panel-toc,
        #panel-files, #panel-search, .panel-header, .toggle-sidebar-btn,
        .tree-toggle-btn, .tree-container, .sidebar-tabs, .sidebar-tab {
            display: none !important;
        }

        .main-content {
            margin: 0 !important;
            padding: 0 !important;
            width: 100% !important;
            max-width: 100% !important;
            position: static !important;
            height: auto !important;
            overflow: visible !important;
        }

        .content-wrapper {
            background: white !important;
            box-shadow: none !important;
            overflow: visible !important;
            height: auto !important;
            max-height: none !important;
            position: static !important;
        }

        #content {
            height: auto !important;
            overflow: visible !important;
        }

        .markdown-body {
            color: black !important;
            font-size: 12pt !important;
            line-height: 1.6 !important;
            height: auto !important;
            overflow: visible !important;
        }

        .markdown-body h1, .markdown-body h2, .markdown-body h3, 
        .markdown-body h4, .markdown-body h5, .markdown-body h6 {
            color: black !important;
            page-break-after: avoid;
        }

        .markdown-body pre, .markdown-body code {
            background: #f5f5f5 !important;
            color: black !important;
            border: 1px solid #ddd !important;
            page-break-inside: avoid;
        }

        .markdown-body pre {
            background: #f8f8f8 !important;
            border: 1px solid #ddd !important;
            border-radius: 4px !important;
            padding: 12px 16px !important;
            margin: 16px 0 !important;
            overflow: visible !important;
        }

        .markdown-body pre code {
            background: transparent !important;
            border: none !important;
            padding: 0 !important;
            font-size: 10pt !important;
            font-family: 'Courier New', Courier, monospace !important;
            white-space: pre-wrap !important;
            word-wrap: break-word !important;
        }

        .mermaid-container {
            page-break-inside: avoid;
            margin: 20px 0 !important;
            background: white !important;
            border: 1px solid #ccc !important;
            padding: 16px !important;
            border-radius: 4px !important;
            display: block !important;
            text-align: center !important;
            width: 100% !important;
            box-sizing: border-box !important;
            overflow: hidden !important;
        }

        .mermaid-container svg {
            max-width: 100% !important;
            height: auto !important;
            display: inline-block !important;
            width: auto !important;
            max-height: 250px !important;
            background: white !important;
            border: none !important;
        }

        .mermaid-container svg text,
        .mermaid-container svg tspan {
            fill: #222 !important;
            color: #222 !important;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
            font-size: 11px !important;
        }

        .mermaid-container svg rect,
        .mermaid-container svg circle,
        .mermaid-container svg polygon,
        .mermaid-container svg ellipse {
            fill: #fff !important;
            stroke: #444 !important;
            stroke-width: 1px !important;
        }

        .mermaid-container svg path {
            stroke: #444 !important;
            stroke-width: 1px !important;
            fill: none !important;
        }

        .mermaid-container svg .node rect,
        .mermaid-container svg .node polygon,
        .mermaid-container svg .node circle,
        .mermaid-container svg .node ellipse {
            fill: #fff !important;
            stroke: #444 !important;
            stroke-width: 1px !important;
        }

        .mermaid-container svg .node text,
        .mermaid-container svg .node tspan {
            fill: #222 !important;
            color: #222 !important;
            font-size: 11px !important;
        }

        .mermaid-container svg .node rect,
        .mermaid-container svg .node circle,
        .mermaid-container svg .node polygon,
        .mermaid-container svg .edge-path path,
        .mermaid-container svg .marker {
            stroke: #333 !important;
        }

        .mermaid-container svg .edgeLabel text,
        .mermaid-container svg .edgeLabel tspan {
            fill: #222 !important;
            color: #222 !important;
        }

        .mermaid-container svg .edge-label rect {
            fill: white !important;
            stroke: #444 !important;
        }

        .mermaid-container svg line,
        .mermaid-container svg path {
            stroke: #444 !important;
        }

        .mermaid-container svg defs marker {
            fill: #444 !important;
            stroke: #444 !important;
        }

        .mermaid-container svg marker polygon {
            fill: #444 !important;
            stroke: #444 !important;
        }

        .heading-fold {
            display: none !important;
        }

        .copy-btn {
            display: none !important;
        }

        .hljs-keyword, .hljs-selector-tag, .hljs-built_in {
            color: #000 !important;
            font-weight: bold !important;
        }

        .hljs-string, .hljs-attribute {
            color: #333 !important;
            font-style: italic !important;
        }

        .hljs-number, .hljs-literal {
            color: #000 !important;
        }

        .hljs-comment {
            color: #666 !important;
            font-style: italic !important;
        }

        .hljs-function, .hljs-title {
            color: #000 !important;
            font-weight: bold !important;
        }

        .markdown-body img {
            max-width: 100% !important;
            page-break-inside: avoid;
        }

        .markdown-body a {
            color: black !important;
            text-decoration: underline !important;
        }

        .markdown-body table {
            border: 1px solid #ddd !important;
            page-break-inside: avoid;
        }

        .markdown-body th, .markdown-body td {
            border: 1px solid #ddd !important;
        }
    }
    
    .markdown-body {
        font-size: var(--font-size);
        font-weight: var(--font-weight);
    }

    .header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 16px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .page-title {
        font-size: 1.5em;
        font-weight: 600;
        color: var(--text-primary);
        margin: 0;
    }

    .data-bar {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .el-ol, .el-ul {
        margin: 14px 0;
    }

    .el-ol ol, .el-ul ul {
        padding-left: 24px;
        margin: 8px 0;
    }

    .el-ol li, .el-ul li {
        margin: 6px 0;
        position: relative;
    }

    .has-list-bullet {
        list-style: none;
        padding-left: 0;
    }

    .has-list-bullet > li {
        padding-left: 24px;
        position: relative;
    }

    .has-list-bullet > li .list-bullet {
        position: absolute;
        left: 8px;
        top: 10px;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: var(--text-muted);
    }

    @media (max-width: 1024px) {
        .toc-sidebar {
            width: 220px;
        }
        
        .sidebar {
            width: 240px;
        }
    }

    @media (max-width: 768px) {
        :root {
            --sidebar-width: 280px;
            --header-height: 56px;
        }
        
        .sidebar,
        .toc-sidebar {
            position: fixed;
            height: 100%;
            z-index: 60;
            box-shadow: var(--shadow-lg);
            top: 0;
        }
        
        .sidebar {
            left: 0;
            width: var(--sidebar-width);
            padding-top: 0;
        }
        
        .toc-sidebar {
            right: 0;
            width: 280px;
        }
        
        .sidebar.collapsed,
        .toc-sidebar.collapsed {
            width: 0;
            border: none;
            padding: 0;
            overflow: hidden;
        }
        
        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 55;
        }
        
        .sidebar-overlay.active {
            display: block;
        }
        
        .content-wrapper {
            padding: 16px;
        }
        
        #content {
            max-width: 100%;
            padding: 16px;
        }
        
        .markdown-body {
            font-size: 15px;
            line-height: 1.6;
        }
        
        .markdown-body h1 { font-size: 1.6em; }
        .markdown-body h2 { font-size: 1.35em; }
        .markdown-body h3 { font-size: 1.15em; }
        
        .header-search {
            display: none;
        }
        
        .header-left {
            min-width: 0;
            flex: 1;
        }
        
        #sidebar-toggle {
            display: flex;
        }
        
        .header-actions {
            gap: 2px;
        }
        
        .content-header {
            padding: 0 12px;
            gap: 8px;
        }
        
        .file-name-display {
            max-width: 150px;
            font-size: 14px;
        }
        
        .theme-toggle, 
        #toc-toggle {
            width: 36px;
            height: 36px;
        }
        
        .sidebar-header {
            padding: 12px;
        }
        
        .sidebar-content {
            padding: 8px;
        }
        
        .search-input {
            padding: 10px 12px 10px 36px;
            font-size: 14px;
        }
        
        .tree-folder,
        .tree-file {
            padding: 10px 12px;
            font-size: 14px;
        }
        
        .code-block-wrapper pre {
            padding: 12px;
            font-size: 13px;
        }
        
        .code-header {
            padding: 8px 12px;
        }
        
        .markdown-body pre {
            padding: 12px;
            font-size: 13px;
        }
        
        .markdown-body img {
            border-radius: 6px;
        }
        
        .markdown-body blockquote {
            padding: 10px 14px;
            margin: 12px 0;
        }
        
        .toc-sidebar {
            width: 100%;
            max-width: 320px;
        }
        
        .sidebar-tabs {
            padding: 0 4px;
        }
        
        .sidebar-tab {
            padding: 10px 4px;
            font-size: 11px;
        }
        
        .feature-header {
            padding: 10px 12px;
        }
        
        .graph-canvas-container {
            height: 180px;
        }
        
        .links-section,
        .backlinks-section {
            padding: 10px 12px;
            max-height: 120px;
        }
        
        .heading-fold {
            width: 22px;
            height: 22px;
            font-size: 11px;
        }
        
        .float-window {
            width: 95%;
            max-height: 90vh;
        }
        
        .float-window-content {
            padding: 12px;
        }
    }

    @media (max-width: 480px) {
        :root {
            --sidebar-width: 100%;
        }
        
        .content-header {
            padding: 0 8px;
            flex-wrap: wrap;
            height: auto;
            min-height: 56px;
            padding: 8px;
            gap: 6px;
        }
        
        .header-left {
            gap: 6px;
            flex: 1;
        }
        
        .file-name-display {
            font-size: 13px;
            max-width: 100px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .header-actions {
            gap: 2px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }
        
        .content-wrapper {
            padding: 12px;
        }
        
        #content {
            padding: 12px;
        }
        
        .markdown-body {
            font-size: 14px;
        }
        
        .markdown-body h1 { font-size: 1.5em; }
        .markdown-body h2 { font-size: 1.25em; }
        .markdown-body h3 { font-size: 1.1em; }
        .markdown-body h4 { font-size: 1em; }
        
        .markdown-body p {
            margin: 10px 0;
        }
        
        .markdown-body ul,
        .markdown-body ol {
            padding-left: 20px;
            margin: 10px 0;
        }
        
        .markdown-body li {
            margin: 4px 0;
        }
        
        .sidebar {
            width: 100%;
        }
        
        .toc-sidebar {
            width: 100%;
            max-width: none;
        }
        
        .toc-item {
            padding: 10px 12px;
            font-size: 13px;
        }
        
        .yaml-properties-table {
            font-size: 12px;
        }
        
        .yaml-properties-table td:first-child {
            width: 100px;
        }
        
        .code-block-wrapper {
            margin: 12px 0;
            border-radius: 6px;
        }
        
        .code-block-wrapper pre {
            padding: 10px;
            font-size: 12px;
        }
        
        .code-header {
            padding: 6px 10px;
            font-size: 11px;
        }
        
        .copy-btn {
            padding: 4px 8px;
            font-size: 10px;
        }
        
        .list-collapse-indicator {
            width: 20px;
            height: 20px;
        }
        
        .feature-header {
            padding: 8px 10px;
        }
        
        .feature-title {
            font-size: 10px;
        }
        
        .graph-canvas-container {
            height: 150px;
        }
        
        .links-section,
        .backlinks-section {
            padding: 8px 10px;
            max-height: 100px;
        }
        
        .links-header,
        .backlinks-header {
            font-size: 10px;
        }
        
        .link-item,
        .backlink-item {
            font-size: 12px;
            padding: 6px 8px;
        }
        
        .sidebar-panel {
            overflow-y: auto;
        }
        
        .settings-section {
            padding: 12px;
        }
        
        .settings-label {
            font-size: 11px;
            margin-bottom: 6px;
        }
        
        .settings-select {
            padding: 8px 10px;
            font-size: 13px;
        }
        
        .theme-btn {
            padding: 8px;
            font-size: 11px;
        }
        
        .color-picker {
            width: 32px;
            height: 28px;
        }
        
        .float-window {
            width: 98%;
            max-height: 95vh;
            border-radius: 8px;
        }
        
        .float-window-header {
            padding: 10px 12px;
        }
        
        .float-window-title {
            font-size: 13px;
        }
        
        .float-window-content {
            padding: 10px;
            font-size: 14px;
        }
        
        .empty-state svg {
            width: 60px;
            height: 60px;
        }
        
        .empty-state p {
            font-size: 14px;
        }
        
.empty-state-hint {
            font-size: 12px;
        }
    }

    @media print {
        .sidebar,
        .toc-sidebar,
        .toggle-btn,
        .content-header {
            display: none;
        }
        
        .main-content {
            max-width: 100%;
        }
        
        .content-wrapper {
            padding: 0;
        }
    }

    .heading-fold {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        margin-right: 6px;
        cursor: pointer;
        color: var(--text-muted);
        border-radius: 4px;
        transition: all 0.2s;
        font-size: 10px;
        vertical-align: middle;
    }

    .heading-fold i {
        pointer-events: none;
    }

    .heading-fold:hover {
        background: var(--hover-bg);
        color: var(--accent-color);
    }

    kbd {
        background: var(--bg-tertiary);
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 12px;
        font-family: 'Courier New', monospace;
        color: var(--text-primary);
        border: 1px solid var(--border-color);
    }

    .hashtag {
        display: inline-block;
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 0.9em;
        font-weight: 500;
        cursor: pointer;
    }

    .hashtag:hover {
        opacity: 0.8;
    }

    .latex-error {
        color: #ff6b6b;
        background: #fff5f5;
        padding: 2px 6px;
        border-radius: 4px;
        font-family: monospace;
    }

    .katex-display {
        margin: 1em 0;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 8px 0;
    }

    .katex {
        font-size: 1.1em;
    }

    pre[data-line-numbers] {
        counter-reset: line;
    }

    pre[data-line-numbers] code::before {
        counter-increment: line;
        content: counter(line);
        display: inline-block;
        width: 2em;
        margin-right: 1em;
        text-align: right;
        color: #999;
        border-right: 1px solid #ddd;
        padding-right: 0.5em;
    }

    .backlinks-list {
        list-style: none;
        padding: 12px;
    }

    .backlinks-item {
        padding: 8px;
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: background var(--transition-speed);
        margin-bottom: 6px;
    }

    .backlinks-item:hover {
        background: var(--hover-bg);
    }

    .backlinks-item .file-name {
        color: var(--accent-color);
        font-size: 13px;
        font-weight: 500;
    }

    .backlinks-item .context {
        font-size: 11px;
        color: var(--text-muted);
        margin-top: 2px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .markdown-body .obsidian-img {
        cursor: pointer;
        transition: opacity 0.2s;
        border: 2px solid transparent;
    }

    .markdown-body .obsidian-img:hover {
        opacity: 0.85;
        border-color: var(--accent-color);
    }

    .heading-content.collapsed {
        display: none;
    }

    .heading-section.collapsed {
        display: none;
    }

    .markdown-body h1 .heading-fold,
    .markdown-body h2 .heading-fold,
    .markdown-body h3 .heading-fold,
    .markdown-body h4 .heading-fold,
    .markdown-body h5 .heading-fold,
    .markdown-body h6 .heading-fold {
        display: inline-flex;
    }

    .image-viewer {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95);
        z-index: 10000;
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.25s ease;
    }

    .image-viewer.active {
        display: flex;
        opacity: 1;
    }

    .image-viewer-close {
        position: absolute;
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        border: none;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 24px;
        transition: all 0.2s;
        z-index: 10;
    }

    .image-viewer-close:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.1);
    }

    .image-viewer-content {
        flex: 1;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        position: relative;
    }

    .image-viewer-img {
        max-width: 90%;
        max-height: 90%;
        object-fit: contain;
        transform-origin: center;
        transition: transform 0.1s ease-out;
        cursor: grab;
    }

    .image-viewer-img:active {
        cursor: grabbing;
    }

    .image-viewer-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 50px;
        height: 50px;
        border: none;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 20px;
        transition: all 0.2s;
        opacity: 0.7;
    }

    .image-viewer-nav:hover {
        opacity: 1;
        background: rgba(255, 255, 255, 0.25);
    }

    .image-viewer-nav.prev {
        left: 16px;
    }

    .image-viewer-nav.next {
        right: 16px;
    }

    .image-viewer-counter {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        color: rgba(255, 255, 255, 0.7);
        font-size: 14px;
        background: rgba(0, 0, 0, 0.5);
        padding: 8px 16px;
        border-radius: 20px;
    }

    .image-viewer-zoom-controls {
        position: absolute;
        bottom: 20px;
        right: 20px;
        display: flex;
        gap: 8px;
    }

    .image-viewer-zoom {
        width: 40px;
        height: 40px;
        border: none;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 18px;
        transition: all 0.2s;
    }

    .image-viewer-zoom:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    @media (max-width: 768px) {
        .image-viewer-nav {
            width: 40px;
            height: 40px;
            font-size: 16px;
        }

        .image-viewer-nav.prev {
            left: 8px;
        }

        .image-viewer-nav.next {
            right: 8px;
        }

        .image-viewer-close {
            top: 12px;
            right: 12px;
            width: 40px;
            height: 40px;
            font-size: 20px;
        }

        .image-viewer-counter {
            bottom: 16px;
            font-size: 12px;
            padding: 6px 12px;
        }

        .image-viewer-zoom-controls {
            bottom: 16px;
            right: 12px;
        }

        .image-viewer-zoom {
            width: 36px;
            height: 36px;
            font-size: 16px;
        }
    }

    @media (max-width: 480px) {
        .image-viewer-nav {
            width: 36px;
            height: 36px;
            font-size: 14px;
        }

        .image-viewer-nav.prev {
            left: 4px;
        }

        .image-viewer-nav.next {
            right: 4px;
        }

        .image-viewer-counter {
            bottom: 70px;
        }

        .image-viewer-zoom-controls {
            bottom: 12px;
            right: 50%;
            transform: translateX(50%);
        }
    }

    .breadcrumbs {
        padding: 10px 12px;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 12px;
        color: var(--text-secondary);
        flex-wrap: wrap;
        background: var(--bg-secondary);
    }

    .breadcrumb-item {
        display: flex;
        align-items: center;
        gap: 4px;
        cursor: pointer;
        padding: 2px 6px;
        border-radius: 4px;
        transition: all 0.15s;
    }

    .breadcrumb-item:hover {
        background: var(--hover-bg);
        color: var(--accent-color);
    }

    .breadcrumb-item.root {
        color: var(--accent-color);
        font-weight: 600;
    }

    .breadcrumb-separator {
        color: var(--text-muted);
        font-size: 10px;
    }

    .breadcrumb-item.current {
        color: var(--text-primary);
        font-weight: 500;
        cursor: default;
    }

    .breadcrumb-item.current:hover {
        background: transparent;
    }
