{
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  width: 360px;
  max-height: 600px;
  background: radial-gradient(circle at top, #2c3850 0, #11141b 45%, #05060a 100%);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #f5f7ff;
  overflow-y: auto;
}

.container {
  padding: 14px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.quick-note-block {
  background: rgba(15, 20, 30, 0.9);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 0 18px rgba(80, 120, 255, 0.18);
  border: 1px solid rgba(120, 160, 255, 0.18);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#quickNoteInput {
  width: 100%;
  min-height: 70px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  border: none;
  padding: 8px 10px;
  resize: none;
  outline: none;
  color: #f5f7ff;
  font-size: 13px;
  transition: 0.2s ease;
}

#quickNoteInput::placeholder {
  color: rgba(220, 225, 245, 0.4);
}

#quickNoteInput:focus {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 1px rgba(110, 150, 255, 0.5);
}

button {
  font-family: inherit;
}

#saveQuickNoteBtn {
  background: #587dff;
  border: none;
  border-radius: 999px;
  padding: 9px 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #f5f7ff;
  transition: box-shadow 0.2s ease, transform 0.08s ease, background 0.2s ease;
  box-shadow: 0 0 18px rgba(120, 170, 255, 0.6);
}

#saveQuickNoteBtn:hover {
  background: #6e8dff;
  box-shadow: 0 0 26px rgba(130, 190, 255, 0.85);
}

#saveQuickNoteBtn:active {
  transform: scale(0.97);
  box-shadow: 0 0 14px rgba(110, 150, 255, 0.7);
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(214, 221, 255, 0.65);
  margin-top: 4px;
}

.section-label.gray {
  color: rgba(173, 182, 216, 0.7);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
}

.divider {
  margin: 6px 0;
  border-bottom: 1px solid rgba(120, 130, 160, 0.45);
}

.quick-notes-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.icon-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 2px;
  color: rgba(242, 210, 220, 0.85);
  font-size: 13px;
}

.icon-btn:hover {
  color: #ff96a8;
}

.note-card {
  position: relative;
  background: rgba(17, 22, 33, 0.95);
  border-radius: 10px;
  padding: 7px 9px 7px 10px;
  font-size: 13px;
  color: #e8ecff;
  overflow: hidden;
}

.note-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.note-card-preview {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-card-body {
  margin-top: 6px;
}

.note-card textarea {
  width: 100%;
  min-height: 60px;
  border-radius: 8px;
  border: none;
  padding: 6px 7px;
  resize: none;
  outline: none;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #f5f7ff;
}

.note-card textarea:focus {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 1px rgba(120, 155, 255, 0.65);
}

.note-card.editing .note-card-body {
  display: block;
}

.note-card.editing .note-card-preview {
  opacity: 0.3;
}

.note-card-body {
  display: none;
}

/* Projects */

.secondary-btn {
  background: rgba(30, 37, 55, 0.95);
  color: rgba(229, 236, 255, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(100, 120, 170, 0.55);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 4px;
  transition: 0.18s ease;
}

.secondary-btn:hover {
  background: rgba(45, 55, 85, 0.95);
  box-shadow: 0 0 14px rgba(110, 150, 255, 0.55);
}

.projects-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.project {
  background: radial-gradient(circle at top left, rgba(90, 125, 255, 0.35), rgba(10, 14, 26, 0.98));
  border-radius: 14px;
  border: 1px solid rgba(120, 155, 255, 0.4);
  overflow: hidden;
  box-shadow: 0 0 18px rgba(80, 115, 255, 0.45);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  cursor: pointer;
  user-select: none;
}

.project-toggle {
  width: 16px;
  text-align: center;
  font-size: 11px;
  opacity: 0.85;
}

.project-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.project-title[contenteditable="true"] {
  border-bottom: 1px dashed transparent;
}

.project-title:focus {
  border-bottom: 1px dashed rgba(220, 230, 255, 0.8);
}

.project-header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-body {
  padding: 6px 9px 9px;
  border-top: 1px solid rgba(130, 160, 255, 0.45);
  background: rgba(7, 10, 20, 0.95);
}

.project-notes-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-note {
  position: relative;
  background: rgba(20, 26, 42, 0.98);
  border-radius: 10px;
  padding: 7px 9px 7px 10px;
  font-size: 12px;
  color: #edf0ff;
  overflow: hidden;
}

.project-note-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-note-title-text {
  flex: 1;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-note-snippet {
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.85;
  max-height: 28px;
  overflow: hidden;
}

.project-note-body {
  display: none;
  margin-top: 6px;
  display: none;
}

.project-note.editing .project-note-body {
  display: block;
}

.project-note.editing .project-note-snippet,
.project-note.editing .project-note-title-text {
  opacity: 0.3;
}

.project-note-title-input {
  width: 100%;
  border-radius: 7px;
  border: none;
  padding: 4px 6px;
  margin-bottom: 4px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #f5f7ff;
  outline: none;
}

.project-note-title-input:focus {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(120, 150, 255, 0.7);
}

.project-note-textarea {
  width: 100%;
  min-height: 70px;
  border-radius: 8px;
  border: none;
  padding: 6px 7px;
  resize: none;
  outline: none;
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.06);
  color: #f5f7ff;
}

.project-note-textarea:focus {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(120, 150, 255, 0.7);
}

.add-note-btn {
  margin-top: 7px;
  background: rgba(40, 54, 90, 0.9);
  color: rgba(230, 238, 255, 0.95);
  border-radius: 999px;
  border: 1px dashed rgba(120, 145, 230, 0.9);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: 0.15s ease;
}

.add-note-btn:hover {
  background: rgba(65, 85, 140, 0.98);
  box-shadow: 0 0 12px rgba(120, 165, 255, 0.8);
}

.project.collapsed .project-body {
  display: none;
}

.project.collapsed .project-toggle {
  transform: rotate(-90deg);
  transform-origin: center;
}
