/* Homepage: editor area and components */
.editor-section { background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%); padding: 40px 0; margin-bottom: 60px; }
.editor-container { background-color: var(--bg-color); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; max-width: 1000px; margin: 0 auto; }
.editor-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background-color: var(--bg-secondary); border-bottom: 1px solid var(--border-color); }
.editor-title { font-size: 20px; font-weight: 600; color: var(--text-color); }
.editor-actions { display: flex; gap: 10px; }
.editor-btn { background: none; border: none; width: 40px; height: 40px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--text-color); cursor: pointer; transition: var(--transition); }
.editor-btn:hover { background-color: var(--bg-color); color: var(--primary-color); }
.editor-area { padding: 20px; }
#textEditor { width: 100%; min-height: 400px; padding: 15px; border: 1px solid var(--border-color); border-radius: 6px; background-color: #f8f9fa; font-size: 16px; line-height: 1.5; resize: vertical; transition: var(--transition); }
#textEditor:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(58,134,255,0.1); }

#textEditor {
    color: #333; 
}

.dark-mode #textEditor.dark-editor {
    color: white;
}

.dark-mode #textEditor {
    color: black;
}

.dark-editor {
    background-color: var(--bg-color) !important;
}

.editor-stats { display: flex; justify-content: space-between; padding: 10px 20px; background-color: var(--bg-secondary); border-top: 1px solid var(--border-color); font-size: 14px; color: var(--text-light); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin: 30px 0; }
.feature-card { background-color: var(--bg-secondary); padding: 25px; border-radius: 8px; box-shadow: var(--shadow); transition: var(--transition); }

.feature-card:nth-child(1) {background-color: var(--pallet1);}
.feature-card:nth-child(2) {background-color: var(--pallet2);}
.feature-card:nth-child(3) {background-color: var(--pallet3);}
.feature-card:nth-child(4) {background-color: var(--pallet4);}
.feature-card:nth-child(5) {background-color: var(--pallet1);}
.feature-card:nth-child(6) {background-color: var(--pallet2);}
.feature-card:nth-child(7) {background-color: var(--pallet3);}
.feature-card:nth-child(8) {background-color: var(--pallet4);}
.feature-card:nth-child(9) {background-color: var(--pallet1);}
.feature-card {
    color: var(--text-color3)
}

.feature-card:hover { transform: translateY(-5px); }
.feature-icon { font-size: 40px; color: var(--primary-color); margin-bottom: 15px; }
.shortcut-table { width: 100%; border-collapse: collapse; margin: 30px 0; background-color: var(--bg-secondary); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.shortcut-table th, .shortcut-table td { padding: 15px; text-align: left; border-bottom: 1px solid var(--border-color); }
.shortcut-table th { background-color: var(--primary-color); 
    /* color: var(--text-color);  */
    color: var(--text-color3);
    font-weight: 600; 
}
.shortcut-table tr:hover { background-color: var(--bg-color); }
kbd { background-color: var(--bg-color); border: 1px solid var(--border-color); border-radius: 4px; padding: 3px 6px; font-size: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
@media (max-width: 768px){ .editor-toolbar { flex-direction: column; gap: 15px; align-items: flex-start; } .editor-actions { width: 100%; justify-content: space-between; } .feature-grid { grid-template-columns: 1fr; } .shortcut-table { font-size: 14px; } .shortcut-table th, .shortcut-table td { padding: 10px; } }

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  left: -350px;
  width: 350px;
  height: 100vh;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: left 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.sidebar.open {
  left: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-color);
}

.sidebar-header h3 {
  margin: 0;
  color: var(--text-color);
  font-size: 18px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.close-btn:hover {
  background-color: var(--bg-secondary);
}

.sidebar-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.new-note-btn {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--darkpallet4);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
  margin-bottom: 24px;
}

.new-note-btn:hover {
  background-color: var(--darkpallet9);
}

.notes-history h4 {
  margin: 0 0 16px 0;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-item {
  padding: 12px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.note-item:hover {
  background-color: var(--bg-secondary);
  border-color: var(--primary-color);
}

.note-item.active {
  background-color: var(--darkpallet4);
  color: white;
  border-color: var(--darkpallet4);
}

.note-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-preview {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-item.active .note-preview {
  color: rgba(255, 255, 255, 0.8);
}
.note-date {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}
.note-item.active .note-date {
  color: rgba(255, 255, 255, 0.6);
}
.note-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}
.note-item:hover .note-actions {
  opacity: 1;
}
.note-action-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 12px;
  padding: 4px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}
.note-action-btn:hover {
  background-color: var(--bg-secondary);
  color: var(--text-color);
}
.note-item.active .note-action-btn {
  color: rgba(255, 255, 255, 0.7);
}
.note-item.active .note-action-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}
/* Dark mode adjustments */
.dark .sidebar {
  background-color: var(--bg-secondary);
  border-left-color: var(--border-color);
}
.dark .sidebar-header {
  background-color: var(--bg-color);
  border-bottom-color: var(--border-color);
}
/* Responsive design */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    left: -100%;
  }
  
  .sidebar.open {
    left: 0;
  }
}