/* V2 Homepage - Note Relay Theme */

/* Theme Variables - Default is now Blue Pro (Gravl Slate) */
:root {
    /* Note Relay Official Theme */
    --nr-bg-primary: #1E293B;
    --nr-bg-secondary: #202B3E;
    --nr-bg-tertiary: #273548;
    --nr-bg-glass: rgba(30, 41, 59, 0.85);
    --nr-border: rgba(59, 130, 246, 0.3);
    --nr-text: #FFFFFF;
    --nr-text-muted: #E8E8E8;
    --nr-text-faint: #A0A0A0;
    --nr-accent: #3B82F6;
    --nr-accent-hover: #60A5FA;
    --nr-accent-glow: rgba(59, 130, 246, 0.4);
    --nr-shadow: rgba(0, 0, 0, 0.4);
    --nr-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Dark variant (for Obsidian demo) */
.theme-obsidian {
    --nr-bg-primary: #1E1E1E;
    --nr-bg-secondary: #252525;
    --nr-bg-tertiary: #2D2D2D;
    --nr-border: #3D3D3D;
    --nr-text: #DCDDDE;
    --nr-text-muted: #888888;
    --nr-text-faint: #666666;
    --nr-accent: #7C3AED;
    --nr-accent-hover: #8B5CF6;
}

/* Documentation theme (minimal) */
.theme-docs {
    --nr-bg-primary: #FFFFFF;
    --nr-bg-secondary: #F8F9FA;
    --nr-bg-tertiary: #E9ECEF;
    --nr-border: #DEE2E6;
    --nr-text: #212529;
    --nr-text-muted: #6C757D;
    --nr-accent: #495057;
}

/* Family theme (warm) */
.theme-family {
    --nr-bg-primary: #FFF8F0;
    --nr-bg-secondary: #FFF3E6;
    --nr-bg-tertiary: #FFEDD9;
    --nr-border: #FFD9B3;
    --nr-text: #3D2914;
    --nr-text-muted: #8B6F4E;
    --nr-accent: #E07B39;
    --nr-accent-hover: #D06A28;
}

/* =================================== */
/* NOTE RELAY THEME - GRAVL SLATE      */
/* =================================== */

/* Note Relay Theme - Blue (Electric Blue on Gravl Slate) */
.theme-nr-blue {
    --nr-bg-primary: #1E293B;
    --nr-bg-secondary: #202B3E;
    --nr-bg-tertiary: #273548;
    --nr-border: rgba(59, 130, 246, 0.3);
    --nr-text: #FFFFFF;
    --nr-text-muted: #E8E8E8;
    --nr-text-faint: #A0A0A0;
    --nr-accent: #3B82F6;
    --nr-accent-hover: #2563EB;
    --nr-accent-glow: rgba(59, 130, 246, 0.3);
    --nr-shadow: rgba(0, 0, 0, 0.4);
}

/* Note Relay Theme - Blue Pro (Enhanced with Gravl effects) */
.theme-nr-blue-pro {
    --nr-bg-primary: #1E293B;
    --nr-bg-secondary: rgba(32, 43, 62, 0.95);
    --nr-bg-tertiary: rgba(39, 53, 72, 0.95);
    --nr-bg-glass: rgba(30, 41, 59, 0.85);
    --nr-border: rgba(59, 130, 246, 0.3);
    --nr-text: #FFFFFF;
    --nr-text-muted: #E8E8E8;
    --nr-text-faint: #A0A0A0;
    --nr-accent: #3B82F6;
    --nr-accent-hover: #60A5FA;
    --nr-accent-glow: rgba(59, 130, 246, 0.4);
    --nr-shadow: rgba(0, 0, 0, 0.4);
}

/* ========== GRAVL-STYLE ENHANCEMENTS (Blue Pro) ========== */

/* Glassmorphism on sidebar */
.theme-nr-blue-pro #sidebar {
    background: var(--nr-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 2px solid rgba(59, 130, 246, 0.3);
}

/* Glassmorphism on ribbon */
.theme-nr-blue-pro #app-ribbon {
    background: var(--nr-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 2px solid rgba(59, 130, 246, 0.3);
}

/* Glow effect on accent buttons */
.theme-nr-blue-pro .ribbon-btn.primary {
    box-shadow: 0 0 20px var(--nr-accent-glow);
}

.theme-nr-blue-pro .ribbon-btn.primary:hover {
    box-shadow: 0 0 30px var(--nr-accent-glow), 0 0 60px rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

/* Glow on focus toggle when active */
.theme-nr-blue-pro #focus-btn:hover {
    box-shadow: 0 0 15px var(--nr-accent-glow);
}

/* Hover lift on vault cards */
.theme-nr-blue-pro .vault-item {
    transition: all 0.25s ease;
    background: var(--nr-bg-glass);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.theme-nr-blue-pro .vault-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 20px var(--nr-accent-glow);
    border-color: var(--nr-accent);
}

/* Hover lift on note items */
.theme-nr-blue-pro .note-item {
    transition: all 0.2s ease;
}

.theme-nr-blue-pro .note-item:hover {
    transform: translateX(4px);
    background: var(--nr-bg-glass);
}

/* Glow on active note */
.theme-nr-blue-pro .note-item.active {
    box-shadow: 0 0 15px var(--nr-accent-glow);
}

/* Glow on active folder */
.theme-nr-blue-pro .folder-item.active {
    box-shadow: 0 0 12px var(--nr-accent-glow);
}

/* Subtle gradient on editor header */
.theme-nr-blue-pro #editor-header {
    background: linear-gradient(180deg, var(--nr-bg-secondary) 0%, var(--nr-bg-primary) 100%);
}

/* Context panel glassmorphism */
.theme-nr-blue-pro #context-panel {
    background: var(--nr-bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 2px solid rgba(59, 130, 246, 0.3);
}

/* Property tags with glow */
.theme-nr-blue-pro .property-tag {
    box-shadow: 0 0 8px var(--nr-accent-glow);
}

/* Brand header accent glow */
.theme-nr-blue-pro .brand-header {
    text-shadow: 0 0 10px var(--nr-accent-glow);
}

/* Smooth transitions on all interactive elements */
.theme-nr-blue-pro button,
.theme-nr-blue-pro .folder-item,
.theme-nr-blue-pro .note-item,
.theme-nr-blue-pro .vault-item,
.theme-nr-blue-pro .ribbon-btn {
    transition: all 0.2s ease;
}

/* ========== MODALS - Glassmorphism & Glow ========== */

/* Modal backdrop with deeper blur */
.theme-nr-blue-pro .modal-backdrop {
    background: rgba(1, 25, 53, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Modal content with glassmorphism */
.theme-nr-blue-pro .modal-content {
    background: var(--nr-bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 40px var(--nr-accent-glow);
}

/* Welcome modal enhancement */
.theme-nr-blue-pro .welcome-modal {
    background: rgba(1, 25, 53, 0.85);
}

.theme-nr-blue-pro .welcome-content {
    background: var(--nr-bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 60px var(--nr-accent-glow);
}

/* ========== FORM ELEMENTS ========== */

/* Input fields with glow focus */
.theme-nr-blue-pro input[type="text"],
.theme-nr-blue-pro input[type="email"],
.theme-nr-blue-pro input[type="password"] {
    background: var(--nr-bg-secondary);
    border: 1px solid var(--nr-border);
    color: var(--nr-text);
    transition: all 0.2s ease;
}

.theme-nr-blue-pro input[type="text"]:focus,
.theme-nr-blue-pro input[type="email"]:focus,
.theme-nr-blue-pro input[type="password"]:focus {
    border-color: var(--nr-accent);
    box-shadow: 0 0 15px var(--nr-accent-glow);
    outline: none;
}

/* Primary buttons with glow */
.theme-nr-blue-pro button[style*="background:var(--nr-accent)"],
.theme-nr-blue-pro button[style*="background: var(--nr-accent)"] {
    box-shadow: 0 0 20px var(--nr-accent-glow);
}

/* ========== TABS & NAVIGATION ========== */

/* Tab bar styling */
.theme-nr-blue-pro .tab-bar {
    background: var(--nr-bg-glass);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.theme-nr-blue-pro .tab.active {
    text-shadow: 0 0 10px var(--nr-accent-glow);
}

/* Section headers */
.theme-nr-blue-pro .section-header {
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

/* ========== PRICING CARDS ========== */

/* Pricing card hover lift */
.theme-nr-blue-pro div[style*="border:2px solid var(--nr-accent)"] {
    box-shadow: 0 0 25px var(--nr-accent-glow);
}

/* ========== LINKS & INTERACTIVE ========== */

/* Links with glow hover */
.theme-nr-blue-pro a {
    transition: all 0.2s ease;
}

.theme-nr-blue-pro a:hover {
    text-shadow: 0 0 10px var(--nr-accent-glow);
}

/* ========== SEARCH BOX ========== */

.theme-nr-blue-pro .search-box {
    background: var(--nr-bg-glass);
    border: 1px solid var(--nr-border);
    transition: all 0.2s ease;
}

.theme-nr-blue-pro .search-box:focus-within {
    border-color: var(--nr-accent);
    box-shadow: 0 0 12px var(--nr-accent-glow);
}

/* ========== SCROLLBARS ========== */

.theme-nr-blue-pro ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.theme-nr-blue-pro ::-webkit-scrollbar-track {
    background: var(--nr-bg-primary);
}

.theme-nr-blue-pro ::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 4px;
}

.theme-nr-blue-pro ::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* ========== PANE HEADERS ========== */

.theme-nr-blue-pro .pane-header {
    background: linear-gradient(90deg, var(--nr-bg-secondary) 0%, var(--nr-bg-primary) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

/* ========== CONTEXT HEADERS ========== */

.theme-nr-blue-pro .context-header {
    background: var(--nr-bg-glass);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

/* ========== GRAPH VISUALIZATION ========== */

.theme-nr-blue-pro #graph-canvas circle[fill="var(--nr-accent)"] {
    filter: drop-shadow(0 0 8px var(--nr-accent-glow));
}

/* ========== BACKLINKS ========== */

.theme-nr-blue-pro .backlink-item {
    transition: all 0.2s ease;
}

.theme-nr-blue-pro .backlink-item:hover {
    background: var(--nr-bg-glass);
    padding-left: 12px;
    box-shadow: 0 0 10px var(--nr-accent-glow);
}

/* ========== BLOCKQUOTES ========== */

.theme-nr-blue-pro blockquote {
    border-left: 3px solid var(--nr-accent);
    background: var(--nr-bg-glass);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
}

/* ========== CODE BLOCKS ========== */

.theme-nr-blue-pro code {
    background: var(--nr-bg-tertiary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.theme-nr-blue-pro pre {
    background: var(--nr-bg-tertiary);
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: var(--nr-font);
    background: var(--nr-bg-primary);
    color: var(--nr-text);
    height: 100vh;
    overflow: hidden;
}

/* Welcome Modal */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.welcome-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.welcome-content {
    text-align: center;
    padding: 60px 80px;
    background: var(--nr-bg-primary);
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    max-width: 500px;
}

.welcome-logo {
    font-size: 64px;
    margin-bottom: 20px;
}

.welcome-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--nr-accent);
    margin-bottom: 8px;
}

.welcome-tagline {
    font-size: 24px;
    font-weight: 600;
    color: var(--nr-text);
    margin-bottom: 16px;
}

.welcome-subtitle {
    font-size: 16px;
    color: var(--nr-text-muted);
    line-height: 1.6;
    margin-bottom: 32px;
}

.welcome-enter-btn {
    background: var(--nr-accent);
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.welcome-enter-btn:hover {
    background: var(--nr-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--nr-accent-glow);
}

.welcome-footer {
    margin-top: 24px;
    font-size: 13px;
    color: var(--nr-text-faint);
    font-style: italic;
}

/* App Container */
#app-container {
    display: flex;
    height: 100vh;
    transition: filter 0.5s ease;
}

#app-container.blurred {
    filter: blur(5px);
}

/* Ribbon */
#app-ribbon {
    width: 54px;
    background: var(--nr-bg-tertiary);
    border-right: 2px solid rgba(59, 130, 246, 0.3);
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    flex-shrink: 0;
}

.ribbon-top,
.ribbon-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ribbon-bottom {
    margin-top: auto;
}

.ribbon-logo {
    font-size: 28px;
    margin-bottom: 16px;
}

.ribbon-btn {
    width: 38px;
    height: 38px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--nr-text-muted);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ribbon-btn:hover {
    background: var(--nr-bg-secondary);
    color: var(--nr-text);
}

.ribbon-btn.primary {
    background: var(--nr-accent);
    color: white;
}

.ribbon-btn.primary:hover {
    background: var(--nr-accent-hover);
}

/* Sidebar */
#sidebar {
    width: 260px;
    background: var(--nr-bg-secondary);
    border-right: 2px solid rgba(59, 130, 246, 0.3);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.brand-header {
    padding: 16px;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--nr-accent);
}

.vault-sections {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.vault-section {
    margin-bottom: 16px;
}

.section-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--nr-text-muted);
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-icon {
    font-size: 10px;
}

/* Folder Tree */
.folder-item {
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--nr-text);
    font-size: 14px;
    transition: background 0.15s;
}

.folder-item:hover {
    background: var(--nr-bg-tertiary);
}

.folder-item.active {
    background: var(--nr-accent);
    color: white;
}

.folder-item i {
    font-size: 12px;
    color: var(--nr-text-muted);
}

.folder-item.active i {
    color: white;
}

.folder-item.special {
    color: var(--nr-accent);
    font-weight: 500;
}

/* Available Vaults */
.vault-item {
    padding: 10px 12px;
    background: var(--nr-bg-primary);
    border: 1px solid var(--nr-border);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.vault-item:hover {
    border-color: var(--nr-accent);
    box-shadow: 0 2px 8px var(--nr-shadow);
}

.vault-item .vault-name {
    font-weight: 500;
    font-size: 14px;
}

.vault-item .vault-desc {
    font-size: 12px;
    color: var(--nr-text-muted);
    margin-top: 4px;
}

/* Tabs */
.tab-bar {
    display: flex;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    background: var(--nr-bg-tertiary);
}

.tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--nr-text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

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

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

.tab-content {
    flex: 1;
    overflow-y: auto;
}


/* Notes Pane */
#pane-notes {
    width: 280px;
    background: var(--nr-bg-primary);
    border-right: 2px solid rgba(59, 130, 246, 0.3);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

/* Notes Toolbar */
.notes-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    background: var(--nr-bg-tertiary);
}

.toolbar-actions {
    display: flex;
    gap: 6px;
}

.toolbar-btn {
    width: 26px;
    height: 26px;
    background: transparent;
    border: none;
    border-radius: 5px;
    color: var(--nr-text-muted);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.toolbar-btn:hover {
    background: var(--nr-bg-secondary);
    color: var(--nr-text);
}

.toolbar-btn.active {
    color: var(--nr-accent);
    background: rgba(59, 130, 246, 0.15);
}

.toolbar-btn.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.toolbar-btn.disabled:hover {
    background: transparent;
    color: var(--nr-text-muted);
}

.toolbar-btn .disabled-overlay {
    position: absolute;
    font-size: 14px;
    color: #ef4444;
    opacity: 0.9;
}

/* Filter Bar (expandable) */
.notes-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--nr-bg-secondary);
    border-bottom: 1px solid var(--nr-border);
}

.notes-filter-bar i {
    color: var(--nr-text-faint);
    font-size: 14px;
}

.notes-filter-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--nr-text);
    outline: none;
}

.notes-filter-bar input::placeholder {
    color: var(--nr-text-faint);
}

.filter-close {
    background: transparent;
    border: none;
    color: var(--nr-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-close:hover {
    background: var(--nr-bg-tertiary);
    color: var(--nr-text);
}

#note-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.note-item {
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: background 0.15s;
}

.note-item:hover {
    background: var(--nr-bg-secondary);
}

.note-item.active {
    background: var(--nr-accent);
    color: white;
}

.note-item .note-title {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
}

.note-item .note-preview {
    font-size: 12px;
    color: var(--nr-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-item.active .note-preview {
    color: rgba(255, 255, 255, 0.8);
}

/* Editor Pane */
#pane-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--nr-bg-primary);
    min-width: 0;
}

#editor-header {
    padding: 12px 20px;
    border-bottom: 1px solid var(--nr-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#filename {
    font-weight: 600;
    font-size: 15px;
}

.readonly-badge {
    background: var(--nr-bg-tertiary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--nr-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

#editor-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Properties Panel */
#properties-panel {
    border-bottom: 1px solid var(--nr-border);
    background: var(--nr-bg-secondary);
}

#properties-panel.collapsed .properties-content {
    display: none;
}

.properties-header {
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--nr-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.properties-header i {
    font-size: 10px;
    transition: transform 0.2s;
}

#properties-panel:not(.collapsed) .properties-header i {
    transform: rotate(90deg);
}

.properties-content {
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.property-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
}

.property-key {
    color: var(--nr-text-muted);
    min-width: 70px;
    flex-shrink: 0;
}

.property-value {
    color: var(--nr-text);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.property-tag {
    background: var(--nr-accent);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.property-item {
    font-size: 12px;
    color: var(--nr-text-muted);
}

/* Preview Content */
#preview-content {
    flex: 1;
    padding: 24px 40px;
    overflow-y: auto;
    line-height: 1.7;
}

#preview-content h1 {
    font-size: 2em;
    margin-bottom: 0.5em;
    color: var(--nr-accent);
}

#preview-content h2 {
    font-size: 1.5em;
    margin: 1.5em 0 0.5em;
}

#preview-content h3 {
    font-size: 1.2em;
    margin: 1.2em 0 0.4em;
}

#preview-content p {
    margin-bottom: 1em;
}

#preview-content ul,
#preview-content ol {
    margin: 1em 0;
    padding-left: 1.5em;
}

#preview-content li {
    margin-bottom: 0.5em;
}

#preview-content a {
    color: var(--nr-accent);
    text-decoration: none;
}

#preview-content a:hover {
    text-decoration: underline;
}

#preview-content code {
    background: var(--nr-bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

#preview-content blockquote {
    border-left: 3px solid var(--nr-accent);
    padding-left: 16px;
    margin: 1em 0;
    color: var(--nr-text-muted);
}

/* Context Panel - Bottom bar like real GUI */
#context-panel {
    height: 200px;
    border-top: 2px solid rgba(59, 130, 246, 0.3);
    display: flex;
    background: var(--nr-bg-primary);
    transition: height 0.3s ease-in-out;
}

#context-panel.collapsed {
    height: 35px;
}

#graph-container,
#backlinks-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#graph-container {
    border-right: 2px solid rgba(59, 130, 246, 0.3);
}

.context-section.collapsed .context-content {
    display: none;
}

.context-header {
    padding: 8px 15px;
    font-weight: 600;
    color: var(--nr-text-muted);
    border-bottom: 1px solid var(--nr-border);
    font-size: 11px;
    letter-spacing: 0.5px;
    background: var(--nr-bg-secondary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 35px;
    box-sizing: border-box;
}

.context-header:hover {
    color: var(--nr-text);
    background: var(--nr-bg-tertiary);
}

.context-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

#graph-canvas {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nr-bg-secondary);
    border-radius: 4px;
}

#backlinks-list {
    font-size: 13px;
}


.backlink-item {
    padding: 8px;
    background: var(--nr-bg-primary);
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: pointer;
}

.backlink-item:hover {
    background: var(--nr-bg-tertiary);
}

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
}

.modal-content {
    background: var(--nr-bg-primary);
    border-radius: 16px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Utility */
.hidden {
    display: none !important;
}

/* Focus Mode - Hide sidebars and panels */
#app-container.focus-mode #sidebar,
#app-container.focus-mode #pane-notes,
#app-container.focus-mode #context-panel,
#app-container.focus-mode #properties-panel,
#app-container.focus-mode .readonly-badge,
#app-container.focus-mode #editor-header {
    display: none !important;
}

#app-container.focus-mode #pane-editor {
    border-radius: 12px;
    margin: 20px;
    box-shadow: 0 8px 40px var(--nr-shadow);
}

#app-container.focus-mode #app-ribbon {
    background: transparent;
    border-right: none;
}

#app-container.focus-mode #focus-btn i {
    transform: rotate(45deg);
}

/* Demo Cursor Animation */
#demo-cursor {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.1s ease-out;
}

#demo-cursor.clicking {
    transform: scale(0.85);
}

@keyframes cursorMove {
    0% {
        left: 50%;
        top: 50%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        left: var(--target-x);
        top: var(--target-y);
        opacity: 1;
    }
}

/* Focus mode ribbon button highlight */
#focus-btn.highlight {
    animation: pulse 0.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 var(--nr-accent-glow);
    }

    50% {
        box-shadow: 0 0 0 8px var(--nr-accent-glow);
    }
}