/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, sans-serif;
}

body {
  background-color: #0f1116;
  color: #d8d8d8;
}

/* ---------------------- */
/* TOP BAR                */
/* ---------------------- */
.top-bar {
  height: 55px;
  width: 100%;
  background-color: #16171d;
  border-bottom: 1px solid #2a2b32;

  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.app-title {
  font-size: 18px;
  font-weight: 600;
  color: #dcdcdc;
  background-color: #16171d;
  border: 0px none;
  text-decoration: none;
}

.app-title:hover {
  cursor: pointer;
}

.top-btn {
  background-color: #1f2026;
  border: 1px solid #2a2b32;
  padding: 7px 15px;
  margin-right: 10px;
  border-radius: 6px;
  color: #e3e3e3;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
}

.top-btn:hover {
  background-color: #2b2c33;
}

.icon {
  font-size: 20px;
  margin-right: 15px;
  cursor: pointer;
}

.reset-btn {
  background: #ff4c4c;
  border: 1px solid #ff7777;
}

.reset-btn:hover {
  background: #ff2f2f;
  border-color: #ffaaaa;
}

/* ---------------------- */
/* MAIN CONTAINER         */
/* ---------------------- */
.container {
  display: flex;
  height: calc(100vh - 55px);
}

/* LEFT SIDEBAR */
.sidebar-left {
  width: 20%;
  background-color: #131419;
  border-right: 1px solid #2a2b32;
  padding: 20px;
}

/* Folders section */
.folder-section {
  margin-bottom: 16px;
}

.folder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.folder-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.folder-add-btn {
  padding: 4px 8px;
  font-size: 12px;
  background-color: #1f2026;
  border: 1px solid #2a2b32;
  border-radius: 6px;
  color: #e4e4e4;
  cursor: pointer;
}

.folder-add-btn:hover {
  background-color: #2b2c33;
}

.folders-list {
  list-style: none;
  max-height: 150px;
  overflow-y: auto;
}

.folder-item {
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: 6px;
  background: #15161c;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
  transition: 0.15s;
}

.folder-item:hover {
  background: #20212a;
}

.folder-item.active {
  background: #2d2e36;
  border-color: #5c5ef0;
}

/* New note */
.new-note-btn {
  width: 100%;
  padding: 12px;
  background-color: #1f2026;
  border: 1px solid #2a2b32;
  border-radius: 6px;
  color: #e4e4e4;
  cursor: pointer;
  margin-bottom: 10px;
}

.new-note-btn:hover {
  background-color: #2b2c33;
}

.empty-text {
  margin-top: 10px;
  opacity: 0.7;
}

/* CENTER PANEL */
.center-panel {
  width: 60%;
  background-color: #0f1116;
  border-right: 1px solid #2a2b32;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

/* RIGHT SIDEBAR */
.sidebar-right {
  width: 20%;
  background-color: #131419;
  padding: 20px;
}

.graph-title {
  font-size: 17px;
  font-weight: 600;
}

.graph-sub {
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: 25px;
}

.graph-placeholder {
  margin-top: 50px;
  opacity: 0.5;
  text-align: center;
}

/* ---------------------- */
/* DRAGGABLE RESIZE BARS  */
/* ---------------------- */

.dragbar {
  width: 5px;
  background-color: #1b1c22;
  cursor: col-resize;
  transition: background 0.2s;
}

.dragbar:hover {
  background-color: #2d2f36;
}

.sidebar-left,
.center-panel,
.sidebar-right {
  min-width: 10%;
}

/* ---------- UPLOAD MODAL ---------- */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background: #1a1b20;
  padding: 25px;
  border-radius: 10px;
  width: 380px;
  border: 1px solid #2a2b32;
  text-align: center;
}

.modal-title {
  margin-bottom: 20px;
  font-size: 20px;
  color: #e3e3e3;
}

/* Drag & Drop Box */
.drop-area {
  border: 2px dashed #3a3b44;
  padding: 35px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: 0.2s;
}

.drop-area:hover {
  border-color: #6a6df0;
}

/* Hide default file input */
#fileInput {
  display: none;
}

.small {
  opacity: 0.6;
  font-size: 14px;
}

.divider {
  margin: 20px 0;
  opacity: 0.5;
}

.drive-btn {
  width: 100%;
  padding: 12px;
  background: #3c55f0;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 12px;
}

.drive-btn:hover {
  background: #5870ff;
}

.close-btn {
  background: #24252b;
  color: #d9d9d9;
  padding: 10px;
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
}

.close-btn:hover {
  background: #303136;
}

/* Notes list */
.notes-list {
  list-style: none;
  margin-top: 10px;
}

.note-item {
  padding: 10px;
  margin-bottom: 5px;
  background: #1b1c22;
  border: 1px solid #2a2b32;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
  font-size: 14px;
}

.note-item:hover {
  background: #23242b;
}

.note-item.active {
  background: #2d2e36;
  border-color: #5c5ef0;
}

/* Editable markdown area */
.editor-area {
  width: 50%;
  padding: 20px;
  height: 100%;
  outline: none;
  border: none;
  resize: none;
  font-size: 16px;
  background: #0f1116;
  color: #e4e4e4;
  border-right: 1px solid #2a2b32;
}

/* Preview pane */
.preview-pane {
  width: 50%;
  padding: 20px;
  overflow-y: auto;
  background: #0d0f14;
  font-size: 15px;
}

/* Placeholder text in preview */
.preview-placeholder {
  opacity: 0.5;
  font-size: 14px;
}
/* DARKER SCROLLBAR FOR PREVIEW */


/* Rendered markdown styles */
.preview-pane h1,
.preview-pane h2,
.preview-pane h3,
.preview-pane h4 {
  margin: 10px 0;
  font-weight: 600;
}

.preview-pane p {
  margin: 6px 0;
}

.preview-pane code {
  background: #1e1f26;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: "Fira Code", monospace;
  font-size: 13px;
}

.preview-pane pre {
  background: #1a1b23;
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
}


/* Graph container */
.graph-network {
  margin-top: 10px;
  width: 100%;
  height: 450px;
  border-radius: 8px;
  border: 1px solid #2a2b32;
  background: #101118;
}

/* Graph tooltip / snippet area */
.graph-tooltip {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.8;
  max-height: 150px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 6px;
  background: #181922;
  border: 1px solid #262735;
}

/* Small badge style for active node name */
.graph-tooltip strong {
  color: #9ea5ff;
}

/* Highlight search hit nodes text in list */
.note-item.search-hit {
  border-color: #9ea5ff;
}

/* Scrollbars */
.preview-pane::-webkit-scrollbar,
.graph-tooltip::-webkit-scrollbar,
.graph-network::-webkit-scrollbar,
.folders-list::-webkit-scrollbar {
  width: 6px;
}

.preview-pane::-webkit-scrollbar-thumb,
.graph-tooltip::-webkit-scrollbar-thumb,
.graph-network::-webkit-scrollbar-thumb,
.folders-list::-webkit-scrollbar-thumb {
  background: #2b2c33;
  border-radius: 10px;
}

/* Vertical drag bar between editor and preview */
.dragbar-v {
  width: 5px;
  background-color: #1b1c22;
  cursor: col-resize;
  transition: background 0.2s;
}

.dragbar-v:hover {
  background-color: #2d2f36;
}

/* Search bar in left sidebar */
.search-wrapper {
  margin-bottom: 12px;
}

#searchNotes {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #2a2b32;
  background: #181921;
  color: #e4e4e4;
  font-size: 14px;
  outline: none;
}

#searchNotes::placeholder {
  color: #777;
}
.folders-notes-wrapper {
  margin-bottom: 15px;
}

.editor-area::-webkit-scrollbar {
  width: 6px;
}

.editor-area::-webkit-scrollbar-track {
  background: #07080b;   
}

.editor-area::-webkit-scrollbar-thumb {
  background: #1a1b20;   
  border-radius: 10px;
}

.editor-area::-webkit-scrollbar-thumb:hover {
  background: #2a2b32;   
}
