::selection {
  background-color: #fff666;
  color: #333;
}
html, body {
  margin: 0;
  padding: 0;
  background: #222;
  color: #ddd;
  font-family: sans-serif;
  filter: sepia(.6) hue-rotate(180deg);
  text-rendering: geometricprecision;
  background: radial-gradient(#2d2d2d, #181818);
}
html {
  background: #2f3237;
}
#page {
  min-height: 100vh;
  max-width: 50em;
  margin: 0 auto;
  padding: 0 2em;
  background: #333;
  position: relative;
}

#appMessages {
  position: fixed;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 2000;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #222;
  font-size: 0.95rem;
  color: #777;
}

.toast button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  background: linear-gradient(135deg, #7a5cff, #ff7a18);
  color: #fff;
  cursor: pointer;
}

.toast button:hover,
.toast button:focus {
  filter: brightness(1.1);
}

#header {
  position: sticky;
  top: 0;
  z-index: 999;
  padding: 1em 0;
  margin-bottom: 0.5em;
  background: #333;
}
#title {
  margin: 0 0 1em 0;
  letter-spacing: 3px;
  color:#202020;
}
#controls {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  display: none;
}
#audioPlayer {
  width: 100%;
}
#dropOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #444c;
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 9999;
}
#dropOverlay.active {
  display: flex;
}
#playlist {
  list-style: none;
  padding: 0;
  margin: 0;
  padding-bottom: 2em;
}
#playlistTotal {
  text-align: right;
  margin: 0.2em;
  color: #666;
  font-size: 0.9em;
  font-variant-numeric: tabular-nums;
}
.trackItem {
  cursor: default;
  background: #3b3b3b;
  display: flex;
  align-items: center;
}
.highlight .trackPlayBtn {
  color: #ddd !important;
  background: #1e1e1e !important;
}
.trackItem:nth-child(even) {
  background-color: #373737;
}
/*.trackItem button {
  height: 30px;
}*/
.trackItem:hover {
  background: #ffffff1a;
}
.trackItem:hover button {
  color: #222;
}
.trackLine {
  display: flex;
  align-items: stretch;
  flex: auto;
}
.trackPlayBtn {
  padding: 0;
  width: 45px;
  box-sizing: border-box;
  margin-right: 0.1em;
  background: none;
  border: 0;
  color: transparent;
  font-size: 16pt;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s, filter 0.1s;
  border-radius: 0;
  flex-shrink: 0;
}
/*.trackPlayBtn:hover {
  background: #eee;
  color: #333;
}*/
.trackPlayBtn.active {
  background: #ddd;
  color: #ddd;
}
.trackPlayBtn.hide {
  display: none !important;
}
.trackInfo {
  flex: 0 10 auto;
  padding: 4px 10px 6px 10px;
}
/*.trackName {
  flex: 0 10 auto;
  padding: 5px 10px;
}*/
.trackDuration {
  margin-left: 10px;
  font-size: .8em;
  color: #888;
}
.noteSummary {
  flex: 1;
  color: #6a6a6a;
  font-size: .8em;
  font-weight: normal;
  cursor: default;
  /*text-align: right;*/
  margin: 0 .5em 0 0;
  display: flex;
  align-items: center;
  line-height: 1em;
}
.noteSummary[contenteditable='true'] {
  border: 0;
  outline: 0;
  background: #aaaaaa;
  color: #444;
  padding: 7px 6px;
  border-radius: 1px;
  font-weight: normal;
  cursor: text;
  margin: 0 2px;
  white-space: pre-wrap;
  text-align: left;
}
.noteBtn {
  padding: 0;
  width: 30px;
  border: 0;
  color: #666;
  border-radius: 0;
  background: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 22px;
  transform: scaleX(-1);
  display: none;
}
.trackItem:hover .noteBtn {
  display: block;
}
.noteBtn.confirming {
  background: #222 !important;
  color: #eee !important;
}
.highlight {
  font-weight: bold;
  background: #ccc !important;
  color: #444 !important;
}
button {
  cursor: pointer;
  padding: 5px 10px;
  background: #ddd1;
  color: #ddd;
  border: 0;
  border-radius: 3px;
  user-select: none;
}
.highlight button:hover {
  background: #888;
  color:#222
}
button:hover {
  /*background: #555;*/
  /*opacity: 0.6;*/
  filter:brightness(1.2);
}
button.active {
  background: #222;
}
#menu {
  position: absolute;
  top: 0;
  right: 0;
  padding: 1.5em 0 1em 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

#menuToggleBtn {
  padding: 0.5rem 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}


#menuToggleBtn:active {
  translate: 2px 2px;
}

.menu-dropdown {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0;
  background: #444;
  border: 1px solid #444;
  border-radius: 4px;
  box-shadow: 0 0 15px 2px #0003;
  min-width: 14rem;
  z-index: 99999;
  top: -5px;
  position: relative;
}

.menu-dropdown button.active {
  background: #ddd;
  color: #222;
}

.menu-dropdown button {
  width: 100%;
  text-align: left;
  border-radius: 1px;
  background: #373737;
  color: #fff;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 500;
}

/* Disable text selection during drag */
.noselect, .noselect * {
  user-select: none !important;
}

/* Drag & drop reordering visuals */
.trackItem.dragging {
  opacity: 0.5;
}
.trackItem.drag-over {
  background: #555 !important;
}


.drag-insert-line {
  position: relative;
  height: 4px;
  background: #aaa;
  pointer-events: none;
  margin: -2px 0;
  z-index: 100;
}

.empty-message {
  text-align: center;
  color: #888;
  margin: 0em 0 4em 0;
}

.empty-message.hidden {
  display: none;
}

.hidden {
  display: none;
}

#allNotes {
  margin-top: 1em;
  font-size: 0.9em;
}
#allNotes div {
  margin-bottom: 0.3em;
}
#allNotes strong {
  color: #777;
}
#allNotes span {
  color: #ccc;
}
/*<div class="drag-insert-line"></div>*/