
    body {
      font-family: 'Inter', sans-serif;
      margin: 2rem;
    }

    h1 {
      color: #555;
      margin-bottom: .5rem;
    }

    h2 {
      color: #888;
      font-weight: normal;
      font-size: 1rem;
      margin-bottom: 1.5rem;
    }
    

    p {
      font-size: .8rem;
      margin-top: .5rem;
    }

    h1 svg,
    footer span,
    footer a:hover {
      color: #F35A5A;
    }

    .note.add-note {
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 24px;
      font-weight: bold;
      background: #F5F5F6;
      cursor: pointer;
      min-height: 250px;
      color: #aaa;
    }

    .note.add-note:hover {
      background: #EEEEEE;
    }

    #notesGrid {
      margin-top: 2rem;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
      gap: 15px;
      max-width: 100%;
    }

    .note {
      background: #F5F5F6;
      padding: .5rem .5rem .2rem .5rem;
      border-radius: 5px;
      min-height: 250px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .note textarea {
      color: #444;
      width: 100%;
      border: none;
      background: transparent;
      resize: none;
      outline: none;
      font-family: inherit;
      font-size: 16px;
      line-height: 1.4;
      flex-grow: 1;
      min-height: 50px;
    }

    .note.code textarea {
      font-family: monospace;
      color: #666;
      font-size: 14px;
    }


    .note button {
      align-self: flex-end;
      margin-top: 5px;
      padding: 2px 6px;
      border: none;
      color: #aaa;
      cursor: pointer;
      font-weight: bold;
      font-size: 14px;
      line-height: 1;
      background: none;
    }

    .note button:hover {
      color: #4b4b4b;
    }

    .note textarea::placeholder {
      color: #aaa;
    }

    #confirmPopup {
      display: none;
      /* hidden by default */
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.4);
      justify-content: center;
      align-items: center;
    }

    #confirmPopup .popup-content {
      background: white;
      padding: 20px;
      border-radius: 8px;
      text-align: center;
      min-width: 200px;
    }

    #confirmPopup button {
      border: none;
      padding: 5px 20px;
      border-radius: 5px;
      cursor: pointer;
    }

    #confirmYes {
      color: #fff;
      background: #444;
    }

    #confirmNo {
      color: #fff;
      background: #aaa;
    }

    #confirmYes:hover {
      background: #F35A5A;
    }

    #confirmNo:hover {
      background: #888;
    }




    .note-buttons {
      cursor: grab;
    }

    .note-buttons:active {
      cursor: grabbing;
    }

    footer {
      margin-top: 1rem;
      padding-top: 1rem;
      font-size: 12px;
    }

    footer a {
      color: #888;
      text-decoration: none;
    }

    /* --- DARK MODE TOGGLE --- */
    .dark-toggle {
      display: inline-flex;
      align-items: center;
      cursor: pointer;
      user-select: none;
      font-size: 14px;
      margin: 2rem 0;
    }

    .dark-toggle input {
      display: none;
    }

    .dark-toggle .slider {
      position: relative;
      width: 40px;
      height: 20px;
      background: #ccc;
      border-radius: 10px;
      margin-right: 8px;
      transition: 0.3s;
    }

    .dark-toggle .slider::before {
      content: "";
      position: absolute;
      width: 16px;
      height: 16px;
      left: 2px;
      top: 2px;
      background: white;
      border-radius: 50%;
      transition: 0.3s;
    }

    .dark-toggle input:checked+.slider::before {
      transform: translateX(20px);
      background: #999;
    }

    body.dark .dark-toggle .slider {
      background: #444;
    }

    /* --- DARK MODE --- */
    body.dark {
      background: #1e1e1e;
      color: #ddd;
    }

    body.dark h1 {
      color: #eee;
    }

    body.dark p {
      color: #aaa;
    }

    body.dark .note {
      background: #2b2b2b;
      border: 1px solid #333;
    }

    body.dark .note textarea {
      color: #ddd;
    }

    body.dark .note.code textarea {
      color: #b0d0ff;
    }

    body.dark .note button {
      color: #999;
    }

    body.dark .note button:hover {
      color: #fff;
    }

    body.dark .note.add-note {
      background: #333;
      color: #777;
    }

    body.dark .note.add-note:hover {
      background: #3a3a3a;
    }

    body.dark footer {
      color: #aaa;
    }

    body.dark footer a {
      color: #999;
    }

#filterSearchContainer {
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}

/* Tags styling */
.note-tags {
  color: #aaa;
  font-weight: normal;
  font-size: .8rem;
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 4px 0;
}

.note-tags .tag-btn {
  position: relative;
  font-size: 10px !important;
  text-transform: uppercase;
  font-weight: 400 !important;
  padding: 3px 6px !important;
  border-radius: 5px !important;
  border: 1px solid #aaa !important;
  background: none !important;
  color: #777 !important;
  cursor: pointer;
  margin-top: 0;
}
.note-tags-buttons {
  display: none;
  flex-wrap: wrap;
  gap: 4px;
}

.note-tags-buttons .tag-btn.open {
  display: inline-block;
  margin-left: 4px;
}

.note-tags-buttons.open {
  display: flex;
}

.note-tags .tag-btn.selected:not([data-tag="all"]) {
  padding: 3px 15px 3px 5px !important;
}
.note-tags .tag-btn.selected:not([data-tag="all"])::after
{
  content: "";
  color: #F35A5A;
  margin-left: 5px;
  display: inline-block;
  width: 5px;
  height: 5px;
  background-color: #f35a5a;
  border-radius: 50%;
  position: absolute;
  top: 5px;
  right: 5px;
}
/* Dark mode tags */
body.dark .note-tags .tag-btn {
  background: none !important;
  color: #aaa !important;
}
body.dark .note-tags .tag-btn.selected {

}

#tagFilter {
  display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex: 0 1 auto;
    min-width: 0;
}

#tagFilter .note-tags .tag-btn {
  font-size: 12px;
  padding: 2px 5px;
  margin: 2px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  color: #333;
  cursor: pointer;
}

#tagFilter .tag-btn.selected {
}

/* Dark mode */
body.dark #tagFilter .tag-btn {
}

body.dark #tagFilter .tag-btn.selected {
}

.backup {
font-size: .7rem;
margin: 1rem auto 1rem 0;
}

.backup div {
margin: .7rem 0;
}

/* Search input styling */
.search-wrapper {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  max-width: 450px;
  width: auto;
}

#searchInput {
  width: 100%;
  min-width: 350px;
  padding: 5px 5px 5px 6px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 3px;
  outline: none;
}

#clearSearch {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 16px;
  color: #888;
  display: none;
  user-select: none;
}

/* show X when input has content */
#searchInput:not(:placeholder-shown)+#clearSearch {
  display: block;
}

/* Dark mode */
body.dark #searchInput {
  background-color: #333;
  color: #eee;
  border-color: #555;
}

body.dark #clearSearch {
  color: #ddd;
}
@media (max-width: 600px) {
  body {
    margin: 1rem;
  }
  .note.add-note {
  min-width: 100px;
  margin: 1rem auto;
  min-height: 100px;
}
}
  


