body {display: flex;font-family:system-ui, -apple-system, sans-serif;margin: 0;height: 100vh;color: #2c3e50;}
#sidebar {width: 280px;background: #f8f9fa;border-right: 1px solid #e1e4e8;padding: 20px;overflow-y:auto;font-size: 0.9em;}
#content {flex: 1;padding: 60px;overflow-y:auto;}
#sidebar a {text-decoration: none;color: #0366d6;display: block;padding: 2px 0;}
#sidebar a:hover {text-decoration:underline;}
summary {display: flex;margin-top: 10px;color: #586069;text-transform:uppercase;font-size: 0.8em;letter-spacing: 0.5px;}
.active-file {background-color: #e1e4e8;border-radius: 4px;}
.sidebar-item-pinned, .sidebar-item-recent, .sidebar-item-added, .sidebar-item-edited {list-style: none;padding-left: 0;margin: 2px 0;display: flex;align-items: flex-start;}
.sidebar-item-pinned::before, .sidebar-item-recent::before, .sidebar-item-added::before, .sidebar-item-edited::before {flex-shrink: 0;width: 1.7em;text-align:center;margin-right: 0.3em;}
.sidebar-item-pinned a, .sidebar-item-recent a, .sidebar-item-added a, .sidebar-item-edited a {flex-grow: 1;word-break:break-word;min-width: 0;}
.sidebar-item-file {display: flex;align-items: flex-start;flex-grow: 1;min-width: 0;}
.sidebar-item-file::before {flex-shrink: 0;width: 1.7em;text-align:center;margin-right: 0.3em;}
.sidebar-item-pinned::before, .sidebar-item-recent::before, .sidebar-item-added::before, .sidebar-item-edited::before, .sidebar-item-file::before {display: inline-block;width: 1.7em;}
.sidebar-item-pinned::before {content:'📌';}
.sidebar-item-recent::before {content:'🕒';}
.sidebar-item-added::before {content:'🆕';}
.sidebar-item-edited::before {content:'📝';}
.sidebar-item-file::before {content:'📄';}
#sidebar h3 a {text-decoration: none;color:inherit;}
code, pre, .editor-textarea {font-family:'Fira Code', 'JetBrains Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;}
.active-file a {font-weight: bold;color: #24292e !important;}
.obsidian-tag {background-color: #e8e8e8;color: #555;padding: 2px 6px;border-radius: 10px;text-decoration: none;font-size: 0.9em;}
.obsidian-tag:hover {background-color: #d0d0d0;color: #333;}
.markdown-body {max-width: 1200px;margin: 0 auto;line-height: 1.6;}
.markdown-content-single {max-width: 800px;margin: 0 auto;}
#new-note-creator-form {margin-top: 2em;max-width: 600px;}
.form-label {display: block;font-weight: bold;margin-bottom: 5px;}
.form-input {width: 100%;padding: 8px;font-size: 1em;margin-bottom: 20px;box-sizing:border-box;}
.form-select {width: 100%;padding: 8px;font-size: 1em;margin-bottom: 10px;box-sizing:border-box;}
.form-separator {text-align:center;margin: 15px 0;}
.btn-primary {padding: 10px 15px;font-size: 1em;cursor: pointer;background-color: #28a745;color:white;border: none;border-radius: 4px;}
.editor-form {margin-top: 2em;}
.editor-toolbar {background: #f6f8fa;padding: 8px;border: 1px solid #ccc;border-bottom: none;border-radius: 4px 4px 0 0;display: flex;gap: 5px;align-items:center;}
.editor-toolbar button {cursor: pointer;}
.editor-textarea {width: 100%;height: 60vh;padding: 10px;font-size: 1em;border: 1px solid #ccc;border-radius: 0 0 4px 4px;resize:vertical;box-sizing:border-box;}
.editor-preview {display: none;width: 100%;height: 60vh;padding: 10px;border: 1px solid #ccc;border-radius: 0 0 4px 4px;overflow-y:auto;background: #fff;box-sizing:border-box;}
.btn-danger {padding: 10px 15px;font-size: 1em;cursor: pointer;background-color: #dc3545;color:white;border: none;border-radius: 4px;}
.btn-info {padding: 10px 15px;font-size: 1em;cursor: pointer;background-color: #17a2b8;color:white;border: none;border-radius: 4px;}
.btn-warning {padding: 10px 15px;font-size: 1em;cursor: pointer;background-color: #ffc107;color:black;border: none;border-radius: 4px;}
.move-select {padding: 8px;font-size: 0.9em;height: 38px;vertical-align:top;}
.action-bar {margin-bottom: 20px;padding-bottom: 10px;border-bottom: 1px solid #eee;text-align:right;}
.action-btn {font-size: 0.9em;background-color: #f1f1f1;padding: 5px 10px;border-radius: 4px;text-decoration: none;color: #333;margin-left: 10px;}
.action-btn:first-child {margin-left: 0;}
.note-meta {text-align:right;font-size: 0.8em;color: #666;margin-bottom: 20px;}
.note-tags {text-align:right;margin-bottom: 20px;display: flex;justify-content: flex-end;flex-wrap:wrap;gap: 5px;}
.tag-cloud {display: flex;flex-wrap:wrap;gap: 10px;margin-top: 20px;line-height: 1.8;}
.tag-cloud .obsidian-tag {padding: 4px 10px;font-size: 1em;}
.tag-count {font-size: 0.8em;color: #888;margin-left: 3px;}
pre {position: relative;overflow-x:auto;}
.copy-code-btn {position: absolute;top: 5px;right: 5px;padding: 4px 8px;font-size: 0.8em;background-color: #f1f1f1;border: 1px solid #ccc;border-radius: 4px;cursor: pointer;opacity: 0;transition:opacity 0.2s;color: #333;}
pre:hover .copy-code-btn {opacity: 1;}
.copy-code-btn:hover {background-color: #e1e1e1;}
.copy-code-btn.copied {background-color: #28a745;color:white;border-color: #28a745;}
.editor-meta {font-size: 0.8em;color: #666;margin-top: 5px;text-align:right;}
.vis-tooltip {position: absolute;visibility:hidden;padding: 8px;white-space:pre-wrap;font-family:system-ui, -apple-system, sans-serif;font-size: 14px;background-color: #f8f9fa;border: 1px solid #ccc;border-radius: 4px;box-shadow: 0 2px 5px rgba(0,0,0,0.1);max-width: 300px;}
.graph-legend {position: absolute;bottom: 15px;left: 15px;background: rgba(255, 255, 255, 0.9);padding: 10px;border-radius: 4px;border: 1px solid #ccc;font-size: 0.9em;box-shadow: 0 2px 5px rgba(0,0,0,0.1);z-index: 10;}
.legend-item {display: flex;align-items:center;margin-bottom: 5px;}
.legend-item:last-child {margin-bottom: 0;}
.legend-shape {display: inline-block;width: 14px;height: 14px;margin-right: 8px;}
.legend-shape.note {border-radius: 50%;background-color: #f8f9fa;border: 2px solid #2c3e50;}
.legend-shape.folder {border-radius: 2px;background-color: #f0f0f0;border: 1px solid #ccc;}
.legend-shape.home_node {background-color: #DAA520;}
#back-to-top {position: fixed;bottom: 20px;right: 30px;z-index: 99;font-size: 18px;border: none;outline: none;background-color: #555;color:white;cursor: pointer;padding: 10px 15px;border-radius: 4px;opacity: 0.7;transition:opacity 0.3s;}
#modal-overlay {position: fixed;top: 0;left: 0;width: 100%;height: 100%;background: rgba(0,0,0,0.5);z-index: 1000;display: flex;justify-content:center;align-items:center;}
#modal-box {background:white;padding: 20px;border-radius: 8px;width: 300px;box-shadow: 0 4px 15px rgba(0,0,0,0.2);}
#modal-buttons {margin-top: 15px;text-align:right;display: flex;justify-content: flex-end;gap: 10px;}
.rename-input {font-size: 1em;padding: 2px;border: 1px solid #ccc;border-radius: 3px;}
.theme-pill {display: inline-flex;background: #e1e4e8;border-radius: 20px;padding: 2px;font-size: 11px;}
.theme-btn {border: none;background: transparent;padding: 2px 8px;border-radius: 15px;cursor: pointer;color: #586069;font-size:inherit;}
.theme-btn.active {background:white;color: #24292e;box-shadow: 0 1px 2px rgba(0,0,0,0.1);}
body.dark-mode .theme-btn {color: #8b949e;}
body.dark-mode .theme-btn.active {background: #444;color: #c9d1d9;}
.note-footer {margin-top: 40px;padding-top: 20px;border-top: 1px solid #eee;}
.backlinks-section {margin-bottom: 30px;}
.backlinks-section h2 {font-size: 1.2em;margin-top: 0;margin-bottom: 10px;border-bottom: none;color: #2c3e50;}
.backlinks-section ul {list-style:disc;padding-left: 20px;margin: 0;}
.backlinks-section li {margin-bottom: 8px;}
.last-modified {font-size: 0.8em;color: #666;text-align:center;}
.mobile-only {display: none;}
@media (max-width: 768px) {.mobile-only {display: block;margin-bottom: 20px;padding: 10px 15px;background: #f1f1f1;border: 1px solid #ccc;border-radius: 4px;cursor: pointer;width: 100%;text-align:left;}
#sidebar {position: fixed;left:-300px;top: 0;bottom: 0;z-index: 1000;transition:left 0.3s ease;box-shadow: 2px 0 10px rgba(0,0,0,0.2);width: 280px;}
#sidebar.open {left: 0;}
#content {padding: 20px;}
body.dark-mode .mobile-only {background: #333;color: #c9d1d9;border-color: #444;}}
.content-with-toc {display:grid;grid-template-columns:minmax(0, 1fr) 300px;gap: 40px;align-items:start;}
.toc-sidebar {position:sticky;top: 20px;}
.toc {background-color: #f8f9fa;padding: 15px;border: 1px solid #e1e4e8;border-radius: 4px;max-height: 80vh;overflow-y:auto;}
.toc.collapsed {background-color: transparent;border: none;padding: 0;}
.toc.collapsed h3 {border-bottom: none;margin-bottom: 0;padding-bottom: 0;}
.toc h3 {margin-top: 0;font-size: 1.2em;border-bottom: 1px solid #e1e4e8;padding-bottom: 5px;margin-bottom: 10px;}
.toc ul {list-style: none;padding-left: 0;margin: 0;}
.toc li {margin-bottom: 5px;font-size: 0.95em;}
.toc a {text-decoration: none;color: #0366d6;}
.toc a:hover {text-decoration:underline;}
.toc a.active {font-weight: bold;color: #24292e;text-decoration:underline;}
.toc-toggle {background: none;border: none;cursor: pointer;font-size: 0.8em;margin-left: 10px;color: #0366d6;padding: 0;}
@media (max-width: 1024px) {.content-with-toc {display: block;}
.toc-sidebar {position:static;margin-bottom: 20px;}}

#sidebar a:first-of-type {
	margin: 0 0 0 auto;
}
.sidebar-item-file a {
	margin: 0 !important;
}
