body {
  font-family: "Open Sans", sans-serif;
  padding: 10px;
  background-color: #efeeda;
}

#header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
#header input {
  flex: 1;
  padding: 8px;
  font-size: 14px;
}

#global-reminder {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  border: none;
  border-radius: 10px;
  background-color: rgba(255, 255, 0, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  outline: none;
  transition: all 0.3s ease;
}
#global-reminder:hover, #global-reminder:focus {
  background-color: rgba(255, 255, 0, 0.4);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

#search-container {
  flex: 1;
  position: relative;
}

#search-input {
  width: 100%;
  padding: 10px 35px 10px 10px;
  font-size: 14px;
  border: none;
  border-radius: 10px;
  background-color: rgba(255, 255, 0, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}
#search-input:hover, #search-input:focus {
  background-color: rgba(255, 255, 0, 0.4);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

#search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 14px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}
#search-clear:hover {
  background-color: rgba(255, 255, 255, 0.95);
  color: #333;
  border-color: rgba(0, 0, 0, 0.2);
}
#search-clear:active {
  transform: translateY(-50%) scale(0.9);
  background-color: rgb(255, 255, 255);
}

#notes-container {
  position: relative;
  min-height: calc(100vh - 100px);
  width: 100%;
}

/* Note card styling */
.note {
  min-width: 330px;
  min-height: 280px;
  box-sizing: border-box;
  background-color: #fffab3;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  position: absolute;
  transition: box-shadow 0.2s ease;
  resize: both;
  overflow: auto;
  cursor: move;
}
.note.dragging {
  z-index: 1000;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transform: rotate(2deg);
  opacity: 0.9;
}
.note::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  background: linear-gradient(-45deg, transparent 30%, rgba(0, 0, 0, 0.1) 30%, rgba(0, 0, 0, 0.1) 70%, transparent 70%);
  cursor: se-resize;
  pointer-events: auto;
}
.note:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.note .delete-button {
  position: absolute;
  right: 8px;
  top: 8px;
  cursor: pointer;
  color: black;
  font-size: 16px;
  font-weight: bold;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.note .note-title {
  width: 100%;
  font-size: 18px;
  font-weight: bold;
  padding: 5px;
  border: none;
  background-color: transparent;
}
.note .note-title:focus {
  outline: none;
}
.note .note-tags {
  width: 100%;
  font-size: 12px;
  padding: 3px 5px;
  border: none;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  margin-bottom: 5px;
  color: #666;
}
.note .note-tags:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.5);
}
.note .note-tags::placeholder {
  color: #999;
  font-style: italic;
}
.note .tags-display {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.note .tags-display .tag {
  background-color: #4CAF50;
  color: white;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: bold;
  display: inline-block;
}
.note .reminder-container {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
}
.note .reminder-container .reminder-label {
  font-size: 14px;
  color: #666;
}
.note .reminder-container .note-reminder {
  flex: 1;
  font-size: 11px;
  padding: 2px 4px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.7);
}
.note .reminder-container .note-reminder:focus {
  outline: none;
  border-color: #007bff;
  background-color: rgba(255, 255, 255, 0.9);
}
.note .reminder-container .note-reminder:not(:placeholder-shown) {
  background-color: #fff3cd;
  border-color: #ffc107;
}
.note .created {
  font-size: 10px;
  color: #777;
  margin-bottom: 3px;
}
.note textarea {
  flex-grow: 1;
  width: 100%;
  border: none;
  resize: none;
  background-color: transparent;
  font-size: 14px;
  outline: none;
  transition: filter 0.3s ease;
}
.note .preview {
  flex-grow: 1;
  overflow-y: auto;
  padding: 5px;
  background-color: transparent;
  border: none;
}

/* Utility class to hide elements */
.hidden {
  display: none !important;
}

/* Content container */
.content-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Button container styling */
.button-container {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.toggle-button {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
}
.toggle-button img {
  width: 20px;
  height: 20px;
}

/* Fixed button styles */
#new-note {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 0, 0.5);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

#menu-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#menu-button img {
  width: 30px;
  height: 30px;
}

/* Side menu styling */
#side-menu {
  position: fixed;
  bottom: 15%;
  right: -30%;
  width: 30%;
  background-color: #f9f9c6;
  box-shadow: -2px 0 4px rgba(0, 0, 0, 0.2);
  transition: right 0.3s ease-in-out;
  z-index: 1100;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 2rem;
}

/* When side menu is open */
#side-menu.open {
  right: 0;
}

/* Side menu internal button/link styling */
#side-menu button,
#side-menu a {
  margin: 10px 0;
  height: 40px;
  border: none;
  cursor: pointer;
  background-color: transparent;
}
#side-menu button img,
#side-menu a img {
  width: 100%;
  height: 100%;
}