* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f9f9f9;
  overflow-x: hidden;
}

#toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  background-color: #222;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
}

#toolbar select,
#toolbar button {
  padding: 6px 10px;
  margin: 5px;
  border: none;
  border-radius: 5px;
  font-size: 0.95rem;
  cursor: pointer;
}

#toolbar select {
  background-color: #fff;
  color: #222;
}

#toolbar button {
  background-color: #4CAF50;
  color: white;
  transition: background-color 0.3s;
}

#toolbar button:hover {
  background-color: #45a049;
}

#notes-container {
  position: relative;
  padding: 10px;
}

.note {
  position: absolute;
  width: 200px;
  min-height: 150px;
  background-color: #fffacd;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
  overflow: hidden;
  resize: both;
  display: flex;
  flex-direction: column;
}

.note textarea {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  resize: none;
  font-size: 1rem;
  margin-bottom: 5px;
}

.note .note-footer {
  display: flex;
  justify-content: space-between;
  gap: 5px;
}

.note button {
  padding: 4px 6px;
  font-size: 0.8rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.delete-btn {
  background-color: #f44336;
  color: white;
}

.save-btn {
  background-color: #2196F3;
  color: white;
}

.rendered-markdown {
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow: auto;
}

/* Mobile adjustments */
@media screen and (max-width: 600px) {
  .note {
    width: 90vw;
    max-width: 95vw;
    left: 5vw !important;
    right: 5vw !important;
  }

  #toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
