/* Notes Content Specific Styles */

.notes-flex-layout {
  display: flex;
  min-height: 80vh;
  background: #fff;
}

.notes-sidebar {
  width: 270px;
  background: linear-gradient(135deg, #f7fafc 0%, #e8f0fe 100%);
  border-right: 1px solid #e2e2e2;
  padding: 32px 0 32px 0;
  box-sizing: border-box;
  min-height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  border-radius: 0 18px 18px 0;
  box-shadow: 2px 0 12px 0 rgba(30, 60, 90, 0.06);
  transition: box-shadow 0.2s;
}

.notes-sidebar::-webkit-scrollbar {
  width: 8px;
}
.notes-sidebar::-webkit-scrollbar-thumb {
  background: #e2e2e2;
  border-radius: 8px;
}
.notes-sidebar {
  scrollbar-width: thin;
  scrollbar-color: #e2e2e2 #f7fafc;
}

.notes-sidebar:after {
  content: '';
  display: block;
  height: 16px;
}

.sidebar-search {
  padding: 0 32px 20px 32px;
}

#sidebar-search-input {
  width: 100%;
  padding: 7px 12px 7px 36px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  font-size: 1em;
  background: #fff url('data:image/svg+xml;utf8,<svg fill="%2399bcee" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M12.9 14.32a8 8 0 111.41-1.41l4.29 4.3a1 1 0 01-1.42 1.4l-4.28-4.29zm-4.9-1.32a6 6 0 100-12 6 6 0 000 12z"/></svg>') no-repeat 10px center;
  background-size: 18px 18px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
#sidebar-search-input:focus {
  border-color: #1772d0;
  background-color: #f0f7ff;
}


.sidebar-header {
  font-size: 1.22em;
  font-weight: 700;
  margin-bottom: 18px;
  padding-left: 32px;
  color: #1a2a42;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-header:before {
  content: '\1F4D6'; /* book icon */
  font-size: 1.13em;
  margin-right: 6px;
  opacity: 0.7;
}

.notes-list {
  list-style: none;
  padding: 0 0 0 32px;
  margin: 0;
  max-height: calc(100vh - 170px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e2e2e2 #f7fafc;
}
.notes-list::-webkit-scrollbar {
  width: 7px;
}
.notes-list::-webkit-scrollbar-thumb {
  background: #e2e2e2;
  border-radius: 8px;
}


.notes-list li {
  margin-bottom: 12px;
}

.notes-list a {
  color: #1a2a42;
  text-decoration: none;
  font-size: 1em;
  padding: 7px 12px;
  border-radius: 6px;
  display: block;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  position: relative;
  font-weight: 500;
}
.notes-list a:before {
  content: '\2022';
  color: #b6c9e2;
  margin-right: 9px;
  font-size: 1.1em;
  vertical-align: middle;
  opacity: 0.6;
}
.notes-list a.active, .notes-list a:focus {
  background: linear-gradient(90deg, #e3ebfa 0%, #d1eaff 100%);
  color: #1772d0;
  font-weight: 700;
  box-shadow: 0 1px 4px 0 rgba(23,114,208,0.06);
}
.notes-list a:hover {
  background: #e7e7e7;
  color: #1772d0;
  font-weight: 600;
  box-shadow: 0 2px 10px 0 rgba(23,114,208,0.05);
}

.notes-list a:hover, .notes-list a.active {
  background: #e7e7e7;
  color: #1772d0;
}

.notes-main-content {
  flex: 1;
  padding: 48px 40px 48px 40px;
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

@media (max-width: 900px) {
  .notes-flex-layout {
    flex-direction: column;
  }
  .notes-sidebar {
    width: 100%;
    min-height: unset;
    position: static;
    border-right: none;
    border-bottom: 1px solid #e2e2e2;
    padding: 18px 0 6px 0;
    border-radius: 0 0 18px 18px;
    box-shadow: none;
  }
  .sidebar-header {
    padding-left: 20px;
  }
  .sidebar-search {
    padding: 0 20px 12px 20px;
  }
  .notes-list {
    padding-left: 20px;
    max-height: 220px;
  }
  .notes-main-content {
    padding: 28px 10px 28px 10px;
    max-width: 100%;
    min-height: unset;
    box-shadow: none;
  }
}


.note-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  line-height: 1.6;
}


.note-header {
  margin-bottom: 30px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.note-header h1 {
  font-size: 32px;
  margin-bottom: 10px;
  color: #333;
}

.note-content {
  max-width: 760px;
  margin: 40px auto;
  padding: 40px 36px 48px 36px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #222;
}


.note-content h2 {
  font-size: 1.5em;
  margin-top: 2.2em;
  margin-bottom: 0.8em;
  line-height: 1.25;
  color: #111;
  border-bottom: none;
  padding-bottom: 0;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-weight: bold;
}

.note-content h3 {
  font-size: 1.17em;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-weight: bold;
  color: #111;
}

.note-content p {
  margin: 1.1em 0;
  font-size: 15px;
  line-height: 1.7;
}

.note-content ul, .note-content ol {
  margin-bottom: 20px;
  padding-left: 30px;
  font-size: 15px;
  line-height: 1.7;
}

.note-content li {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.7;
}

.note-content blockquote {
  border-left: 4px solid #1772d0;
  padding-left: 15px;
  margin-left: 0;
  color: #555;
  font-style: italic;
}

.note-content code {
  background-color: #f5f5f5;
  padding: 2px 5px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.9em;
}

.note-content pre {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.note-content pre code {
  background-color: transparent;
  padding: 0;
}

.note-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 5px;
}

.note-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.note-content th, .note-content td {
  border: 1px solid #ddd;
  padding: 8px 12px;
}

.note-content th {
  background-color: #f5f5f5;
  text-align: left;
}

.note-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.backlinks h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.backlinks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.backlinks-list a {
  display: inline-block;
  padding: 5px 10px;
  background-color: #f5f5f5;
  border-radius: 15px;
  font-size: 14px;
  color: #1772d0;
  text-decoration: none;
}

.backlinks-list a:hover {
  background-color: #e0e0e0;
}

.missing-link {
  color: #1772d0;
}

/* Math equations styling */
.note-content .math {
  overflow-x: auto;
  padding: 5px 0;
}

/* Tag styling within notes */
.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.note-tags .tag {
  display: inline-block;
  padding: 4px 10px;
  background-color: #e1f5fe;
  color: #0288d1;
  border-radius: 15px;
  font-size: 14px;
  text-decoration: none;
}

.note-tags .tag:hover {
  background-color: #b3e5fc;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .note-container {
    padding: 15px;
  }
  
  .note-header h1 {
    font-size: 26px;
  }
  
  .note-content h2 {
    font-size: 22px;
  }
  
  .note-content h3 {
    font-size: 18px;
  }
  
  .note-content {
    font-size: 15px;
  }
}

/* Notes Page Styles */
.notes-header {
  text-align: center;
  margin-bottom: 30px;
}

.notes-header h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.topic-connections {
  max-width: 600px;
  margin: 0 auto 40px;
  overflow-x: auto;
}

.connections-svg {
  display: block;
  margin: 0 auto;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-btn {
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background-color: #e9e9e9;
}

.filter-btn.active {
  background-color: #1772d0;
  color: white;
  border-color: #1772d0;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.note-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  background-color: white;
}

.note-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.note-header h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.4;
}

.note-meta {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #666;
  margin-bottom: 15px;
}

.note-excerpt {
  flex-grow: 1;
  margin-bottom: 15px;
}

.note-excerpt p {
  margin: 0;
  color: #444;
  line-height: 1.6;
}

.note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  background-color: #f0f0f0;
}

.tag.ml {
  background-color: #e1f5fe;
  color: #0288d1;
}

.tag.neuro {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

.tag.consciousness {
  background-color: #e8f5e9;
  color: #388e3c;
}

.tag.philosophy {
  background-color: #fff3e0;
  color: #f57c00;
}

.tag.personal {
  background-color: #fce4ec;
  color: #c2185b;
}

.tag.sapling {
  background-color: #fff3e0;
  color: #f57c00;
}

.tag.sapling:hover {
  background-color: #ffdfac;
}

.tag.seed {
  background-color: #ffffe0;
  color: #f5e900;
}

.tag.seed:hover {
  background-color: #fdfdaa;
}

.tag.tree {
  background-color: #7ad8004f;
  color: #5a9d01f7;
}

.tag.tree:hover {
  background-color: #64af016c;
}

.read-more {
  font-size: 12px;
  font-weight: bold;
}

.related-notes {
  font-size: 12px;
  color: #666;
  padding-top: 10px;
}