@charset "UTF-8";
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay button:focus, .modal-overlay button:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px #004a7b;
}
.modal-overlay .modal-header button:focus, .modal-overlay .modal-header button:focus-visible {
  outline: none;
  box-shadow: none;
}

.modal-content {
  background: #2d2d2d;
  border-radius: 5px;
  width: 320px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border: 1px solid #444;
  text-align: left;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
}
.modal-content input,
.modal-content select,
.modal-content textarea {
  width: 100%;
  padding: 8px 10px;
  background-color: #222;
  border: 1px solid #444;
  color: #eee;
  border-radius: 4px;
  box-sizing: border-box;
  outline: none;
}
.modal-content input[type=text],
.modal-content input[type=number],
.modal-content input[type=email],
.modal-content input[type=password],
.modal-content select {
  height: 32px;
}
.modal-content input:focus,
.modal-content textarea:focus {
  outline: none;
  border-color: #004a7b;
  box-shadow: 0 0 5px rgba(0, 67, 112, 0.5);
}

.modal-header {
  cursor: move;
  margin-bottom: 10px;
  border-bottom: 1px solid #444;
  padding: 8px 20px;
  touch-action: none; /* cegah gesture default */
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding-right: 10px !important;
}
.modal-header h3 {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  font-size: 16px;
  font-weight: normal;
  color: #eee;
  letter-spacing: 0.5px;
  text-align: left !important;
  margin: 0 !important;
  flex: 1 !important;
}
.modal-header button.modal-close {
  height: 28px !important;
}

.modal-body {
  padding: 0 20px;
  overflow-x: auto;
}
.modal-body .form-group label {
  display: block;
  font-size: 12px;
  color: #aaa;
  margin-bottom: 2px;
  padding: 2px 0px;
}

.modal-footer {
  cursor: move;
  padding: 10px 20px;
  border-top: 1px solid #444;
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  /* Hapus paksaan flex: 1 agar tombol tidak terlalu panjang */
}
.modal-footer > button {
  flex: 0 0 auto;
  min-width: 70px;
}
.modal-footer button.modal-footer-btn {
  min-width: 70px;
}
.modal-footer button.square-button {
  width: 32px !important;
  min-width: 32px !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

#save-song-project-select {
  width: 100%;
  box-sizing: border-box;
}

#prompt-message {
  padding: 0 0 5px 0;
}

#confirm-modal .modal-content,
#prompt-modal .modal-content,
#alert-modal .modal-content {
  width: 320px;
}

.modal-sm {
  width: 240px;
}

.modal-md {
  width: 480px;
}

.modal-wide {
  width: calc(100vw - 32px);
  max-width: 1000px;
}

.modal-lg {
  width: 720px;
}

.modal-xl {
  width: 930px;
}

.modal-subtitle {
  font-size: 11px;
  margin-bottom: 10px;
  margin-top: 5px;
  color: #aaa;
}

.form-group {
  margin-bottom: 10px;
}

.modal-close {
  background: none !important;
  border: none !important;
  color: #888 !important;
  cursor: pointer !important;
  padding: 4px !important;
  display: flex !important;
}

.modal-close:hover {
  color: #fff !important;
}

.modal-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 40px);
  overflow: hidden !important;
  /* Mencegah seluruh kotak modal ikut bergeser */
}

.modal-header,
.modal-footer {
  flex-shrink: 0;
  /* Menjamin header dan footer tidak mengecil */
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  /* Bilah gulir hanya muncul di sini */
  min-height: 0;
  /* Diperlukan agar flex-item bisa menciut dan melakukan scroll */
}

.modal-body-sidebar-layout {
  display: flex;
  gap: 0;
  padding: 0 !important;
  min-height: 400px;
  overflow: hidden;
}

.modal-sidebar {
  width: 280px;
  padding: 0px 0px 0px 20px;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.modal-sidebar .project-list {
  flex: 1;
  margin-bottom: 10px;
  height: auto;
}
.modal-sidebar .pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.modal-sidebar .pagination-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 32px;
}
.modal-sidebar .add-new-btn {
  margin-top: 10px;
  margin-bottom: 0;
}

@media screen and (max-width: 750px) {
  .modal-sidebar {
    max-width: 280px;
    width: 35vw;
  }
}
.context-menu {
  position: fixed;
  background: #333;
  border: 1px solid #444;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  padding: 5px 0;
  border-radius: 4px;
  min-width: 200px;
  display: none;
  max-height: calc(100dvh - 70px);
  overflow-y: auto;
}
.context-menu .menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 15px;
  font-size: 12px;
  cursor: pointer;
  color: #eee;
  white-space: nowrap;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.context-menu .menu-item:hover {
  background: var(--primary-accent);
}
.context-menu .menu-item:hover .menu-shortcut {
  color: #eee;
}
.context-menu .menu-item.active {
  background: rgba(0, 122, 204, 0.3);
  border-left: 3px solid var(--primary-accent);
  padding-left: 12px;
}
.context-menu .menu-item.menu-item-success {
  color: #4caf50;
}
.context-menu .menu-item.menu-item-danger {
  color: #c62828;
}
.context-menu .menu-item .menu-shortcut {
  color: #777;
  font-size: 11px;
  margin-left: 16px;
  text-align: left;
  width: 40px;
}
.context-menu .menu-separator {
  height: 1px;
  background: #444;
  margin: 5px 0;
}

:root {
  --ring-width: 15%;
  --ring-space: 15%;
  --accent: #04C5F7;
}

.mixer-knob {
  padding-top: 4px;
}
.mixer-knob::before {
  content: attr(data-value);
  position: absolute;
  z-index: 1;
  margin-top: -13px;
  left: 0px;
  width: 100%;
  text-align: center;
  height: 11px;
  font-size: 10px;
  display: none;
  color: #ccc;
}
.mixer-knob.dragging::before {
  display: block;
}

.knob-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 26px;
  height: 26px;
}

.ring {
  position: absolute;
  background: conic-gradient(#545C64 140deg, rgba(255, 255, 255, 0) 0 220deg, #545C64 0deg);
  border-radius: 50%;
  width: 100%;
  height: 100%;
}

.ring-fill {
  position: absolute;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  background: transparent;
}

.space {
  position: absolute;
  background-color: #32383F;
  border-radius: 50%;
  width: calc(100% - var(--ring-width));
  height: calc(100% - var(--ring-width));
}

.knob {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  background: linear-gradient(#6D757F, #596067);
  border-radius: 50%;
  width: calc(100% - (var(--ring-width) + var(--ring-space)));
  height: calc(100% - (var(--ring-width) + var(--ring-space)));
}

.knob-indicator-container {
  display: flex;
  justify-content: center;
  width: 100%;
  height: 100%;
  transform: rotate(140deg);
}

.knob-indicator {
  background: #16181A;
  width: 9%;
  height: 35%;
  margin-top: 4%;
}

.volume-slider-placeholder {
  width: 32px;
  height: 138px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-container {
  height: 126px;
  width: 24px;
  box-sizing: border-box;
  position: relative;
  display: flex;
  justify-content: center;
  touch-action: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.slider-track {
  width: 4px;
  height: 100%;
  background: #111;
  border: 1px solid #333;
  border-radius: 2px;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.slider-thumb {
  width: 18px;
  height: 12px;
  background: #4caf50;
  border: 1px solid #000;
  border-radius: 1px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  cursor: auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  z-index: 2;
}
.slider-thumb::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  right: 2px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}
.slider-thumb:focus {
  outline: none;
  box-shadow: 0 0 0 1px #4caf50;
}

#tempo-editor-svg {
  display: block;
  cursor: crosshair;
}

#tempo-editor-svg-wrapper {
  background-position: 0 0;
  background-repeat: repeat;
}

#tempo-modal #tempo-editor-scroll-wrapper {
  height: 350px;
  overflow: auto;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 4px;
}
#tempo-modal #tempo-editor-scroll-wrapper .tempo-flex-container {
  display: flex;
  width: -moz-max-content;
  width: max-content;
  min-width: 100%;
}
#tempo-modal #tempo-bpm-labels-container {
  flex-shrink: 0;
  width: 50px;
  background: #222;
  border-right: 1px solid #333;
  position: sticky;
  left: 0;
  z-index: 30;
}
#tempo-modal .tempo-main-content-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
#tempo-modal #tempo-editor-svg-wrapper {
  width: -moz-max-content;
  width: max-content;
  position: relative;
  border-bottom: 1px solid #333;
}
#tempo-modal #tempo-playhead {
  position: absolute;
  top: 0;
  height: 1000px;
  width: 2px;
  background: rgba(255, 0, 0, 0.7);
  z-index: 10;
  pointer-events: none;
}
#tempo-modal #tempo-timeline-wrapper {
  width: -moz-max-content;
  width: max-content;
  background: #222;
  position: sticky;
  bottom: 0;
  z-index: 20;
  border-top: 1px solid #444;
}
#tempo-modal #tempo-timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 0, 0, 0.7);
  z-index: 25;
  pointer-events: none;
}
#tempo-modal .tempo-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
#tempo-modal #tempo-seeker {
  flex-grow: 4;
}
#tempo-modal .tempo-zoom-controls {
  display: flex;
  align-items: center;
  margin: 0 10px;
}
#tempo-modal .tempo-zoom-controls #tempo-zoom-range {
  width: 80px;
}
#tempo-modal .tempo-shape-controls {
  display: flex;
  gap: 2px;
  margin-right: 10px;
}

#precise-tempo-container {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #444;
  padding: 2px 8px;
  border-radius: 4px;
}

#precise-tempo-input {
  width: 70px;
  margin: 0;
  padding: 4px 8px;
  height: 32px;
  background-color: #2d2d2d;
}

#tempo-seeker {
  flex-grow: 4;
}

.tempo-zoom-controls {
  display: flex;
  align-items: center;
  margin: 0 10px;
}
.tempo-zoom-controls #tempo-zoom-range {
  width: 80px;
}

.tempo-shape-controls {
  display: flex;
  gap: 2px;
  margin-right: 10px;
}

.lyric-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.lyric-table .col-tick {
  width: 80px;
}
.lyric-table .col-time {
  width: 90px;
}
.lyric-table .col-action {
  width: 40px;
}
.lyric-table tr.active-row {
  background-color: black;
  box-shadow: 0 0 2px black;
}
.lyric-table th {
  background: #333;
  color: #aaa;
  font-size: 11px;
  padding: 10px 10px;
  text-align: left;
  border-bottom: 1px solid #444;
  position: sticky;
  top: 0;
  z-index: 10;
}
.lyric-table td {
  padding: 0 10px;
  border-bottom: 1px solid #333;
}
.lyric-table input[type=text],
.lyric-table input[type=number] {
  width: 100%;
  background: transparent;
  border: none;
  color: #4caf50;
  font-size: 12px;
  padding: 8px 5px;
  box-sizing: border-box;
  outline: none;
  text-align: left;
  border-radius: 0px;
}
.lyric-table input[type=text]:focus,
.lyric-table input[type=number]:focus {
  background: #2d2d2d;
}
.lyric-table input[type=text] {
  color: #eee;
}

.add-new-btn {
  width: 100%;
  margin-bottom: 10px;
  background: #2e7d32;
}

#lyric-preview {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #4caf50;
  padding: 10px 30px;
  border-radius: 25px;
  font-size: 24px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  z-index: 1000;
  pointer-events: none;
  border: 1px solid rgba(76, 175, 80, 0.3);
  min-width: 160px;
  text-align: center;
  min-height: 28px;
}

.lyric-marker {
  position: absolute;
  background: rgba(0, 112, 179, 0.8);
  color: #fff;
  padding: 2px 6px;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: auto;
  z-index: 80;
  cursor: move;
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.lyric-marker:hover {
  background: #5c2d91;
  z-index: 81;
}
.lyric-marker.selected {
  background: #5c2d91;
  z-index: 81;
}

#lyric-preview {
  display: none;
}

#lyric-bulk-textarea {
  min-height: 80px;
  margin-top: 5px;
}

.lyric-table button, .list-item button {
  padding: 6px 0px 0px 2px;
  cursor: pointer;
}
.lyric-table button.btn-rename, .lyric-table button.btn-edit, .lyric-table button.btn-delete, .list-item button.btn-rename, .list-item button.btn-edit, .list-item button.btn-delete {
  border: none;
  background: none;
  color: #aaa;
}
.lyric-table button.btn-rename, .list-item button.btn-rename {
  background: none;
  color: #777;
}
.lyric-table button.btn-delete, .list-item button.btn-delete {
  background: none;
  color: #f91616;
}

.lyric-bulk-editor {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #444;
}

#lyric-modal .modal-content {
  width: 600px;
}
#lyric-modal .modal-content-scroll {
  max-height: 250px;
}

.lyric-table thead tr th {
  padding-left: 10px;
}
.lyric-table tr input[type=text], .lyric-table tr input[type=number] {
  padding-left: 0;
}
.lyric-table tr input[type=text]:focus-visible, .lyric-table tr input[type=text]:focus, .lyric-table tr input[type=number]:focus-visible, .lyric-table tr input[type=number]:focus {
  outline: none;
  box-shadow: none;
}
.lyric-table tr.active-row {
  background-color: #007acc !important;
  color: #fff;
}

#lyric-list input[type=text]:focus, #lyric-list input[type=number]:focus {
  outline: none;
  background-color: transparent;
}

/* Notification Styles */
.notification-group {
  position: relative;
}
.notification-group .notification-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notification-group .notification-trigger .notification-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  background-color: #b91c1c;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  padding: 0 4px;
  border-radius: 3px;
  line-height: 1;
  height: 14px;
  min-width: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  border: 1.5px solid #252526;
  z-index: 1;
}
.notification-group .notification-dropdown {
  width: 320px !important;
  padding: 0 !important;
  right: 0;
  left: auto !important;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
  border: 1px solid #444 !important;
  background: #252526 !important;
}
.notification-group .notification-dropdown .notification-header {
  padding: 12px 16px;
  border-bottom: 1px solid #444;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #2d2d2d;
}
.notification-group .notification-dropdown .notification-header span {
  font-weight: 600;
  font-size: 13px;
  color: #eee;
}
.notification-group .notification-dropdown .notification-header .mark-all-read {
  font-size: 11px;
  color: var(--primary-accent);
  font-weight: normal;
  padding: 0 !important;
  text-decoration: none;
}
.notification-group .notification-dropdown .notification-header .mark-all-read:hover {
  text-decoration: underline;
}
.notification-group .notification-dropdown .notification-list {
  max-height: 380px;
  overflow-y: auto;
  background: #252526;
}
.notification-group .notification-dropdown .notification-list .notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid #333;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.2s;
  position: relative;
}
.notification-group .notification-dropdown .notification-list .notification-item:hover {
  background: #323233;
}
.notification-group .notification-dropdown .notification-list .notification-item.unread {
  background: rgba(0, 122, 204, 0.05);
}
.notification-group .notification-dropdown .notification-list .notification-item.unread::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 15px;
  width: 8px;
  height: 8px;
  background: var(--primary-accent);
  border-radius: 50%;
}
.notification-group .notification-dropdown .notification-list .notification-item .notification-time {
  display: block;
  font-size: 10px;
  color: #777;
  margin-top: 4px;
}
.notification-group .notification-dropdown .notification-list .notification-empty {
  padding: 20px;
  text-align: center;
  color: #777;
}

#tour-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  pointer-events: none;
  transition: clip-path 0.3s ease;
  clip-path: polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%, 0% 0%);
}

#tour-tooltip {
  position: fixed;
  width: 320px;
  background: #252526;
  color: #eee;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 10010;
  pointer-events: auto;
  border: 1px solid #444;
  font-family: "Segoe UI", Tahoma, sans-serif;
  transition: all 0.3s ease;
}
#tour-tooltip h3#tour-title {
  margin-top: 0;
  color: #007acc;
  font-size: 18px;
}
#tour-tooltip #tour-desc {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}
#tour-tooltip .tour-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#tour-tooltip .tour-footer .tour-btn-skip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #444;
  color: #aaa;
  padding: 4px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}
#tour-tooltip .tour-footer .tour-btn-skip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #666;
  color: #eee;
}
#tour-tooltip .tour-footer .tour-nav button {
  border: none;
  color: white;
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
}
#tour-tooltip .tour-footer .tour-nav .tour-btn-prev {
  background: #3e3e42;
  margin-right: 5px;
}
#tour-tooltip .tour-footer .tour-nav .tour-btn-next {
  background: #007acc;
}

.tour-highlight-active {
  position: relative;
  z-index: 10001 !important;
  pointer-events: none !important;
  box-shadow: 0 0 0 4px #007acc, 0 0 20px rgba(0, 122, 204, 0.5) !important;
  border-radius: 0px;
}

#tour-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}
#tour-arrow::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}
#tour-arrow.arrow-left {
  border-width: 10px 10px 10px 0;
  border-color: transparent #444 transparent transparent;
}
#tour-arrow.arrow-left::after {
  border-width: 9px 9px 9px 0;
  border-color: transparent #252526 transparent transparent;
  top: -9px;
  left: 1px;
}
#tour-arrow.arrow-up {
  border-width: 0 10px 10px 10px;
  border-color: transparent transparent #444 transparent;
}
#tour-arrow.arrow-up::after {
  border-width: 0 9px 9px 9px;
  border-color: transparent transparent #252526 transparent;
  top: 1px;
  left: -9px;
}
#tour-arrow.arrow-down {
  border-width: 10px 10px 0 10px;
  border-color: #444 transparent transparent transparent;
}
#tour-arrow.arrow-down::after {
  border-width: 9px 9px 0 9px;
  border-color: #252526 transparent transparent transparent;
  top: -10px;
  left: -9px;
}
#tour-arrow.arrow-right {
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent #444;
}
#tour-arrow.arrow-right::after {
  border-width: 9px 0 9px 9px;
  border-color: transparent transparent transparent #252526;
  top: -9px;
  left: -10px;
}

.audio-clip-row {
  border-bottom: 1px solid #333;
  height: 80px;
  box-sizing: border-box;
}

.audio-clip-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.audio-track-sidebar-row {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 201;
  padding: 0 5px;
  background-color: #1e1e1e;
  border-bottom: 1px solid #333;
  box-sizing: border-box;
}
.audio-track-sidebar-row span {
  width: 100%;
  font-size: 10px;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audio-track-sidebar-row .track-ms-btns {
  display: flex;
  flex-shrink: 0;
  gap: 2px;
}

.audio-clip-row.drag-over {
  background: rgba(0, 122, 204, 0.1);
  border: 1px dashed var(--primary-accent);
}

.modal-clip-preview-scroll-content {
  height: 100%;
  position: relative;
}

.waveform-svg-container {
  height: 72px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}
.waveform-svg-container svg {
  vertical-align: bottom;
  position: absolute;
}

.audio-clip {
  position: absolute;
  background: rgba(103, 58, 183, 0.8);
  height: 72px;
  margin-top: 3px;
  /* inset shadow sebagai pengganti border */
  box-shadow: inset 0 0 0 1px rgba(156, 39, 176, 0.8);
}
.audio-clip.selected {
  z-index: 1;
}

.audio-clip-label {
  position: absolute;
  color: #ffffff;
  text-shadow: 1px 1px 2px #000, 0 0 8px rgba(0, 0, 0, 0.8);
  font-size: 11px;
  z-index: 30;
  pointer-events: none;
  max-height: 72px;
  box-sizing: border-box;
  padding: 4px 6px;
  max-width: calc(100% - 6px);
  display: -webkit-box;
  line-clamp: 5;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-section {
  margin-top: 15px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #333;
  border-radius: 6px;
}

.prop-section-compact {
  padding: 8px 12px;
  margin-top: 8px;
}

.prop-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.prop-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.prop-input-group label {
  white-space: nowrap;
  padding: 0;
}

.small-num-input {
  width: 80px !important;
  height: 28px !important;
  padding: 4px 4px !important;
  font-size: 12px !important;
}

.modal-content input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  margin: 0px;
  width: 18px;
  height: 18px;
  padding: 6px 6px;
  padding: 6px 6px;
  border: 1px solid #555;
  border-radius: 4px;
  background-color: #222; /* warna dasar dark */
  cursor: pointer;
  position: relative;
}

/* Saat dicentang */
.modal-content input[type=checkbox]:checked {
  background-color: #0078d4; /* biru terang */
  border-color: #0078d4;
}

/* Tanda centang */
.modal-content input[type=checkbox]:checked::after {
  content: "✔";
  color: #fff;
  font-size: 12px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.edit-clip-preview-container {
  height: 78px;
  background: #000;
  position: relative;
}

.edit-clip-full-waveform {
  position: relative;
  height: 71px;
}

.edit-clip-window {
  position: absolute;
  top: 0;
  height: 71px;
  background: rgba(0, 122, 204, 0.3);
  border: 1px solid #007acc;
  cursor: move;
  width: 100%;
}
.edit-clip-window .handle {
  position: absolute;
  width: 6px;
  height: 100%;
  cursor: ew-resize;
}
.edit-clip-window .handle.left {
  left: 0px;
}
.edit-clip-window .handle.right {
  right: 0px;
}

.modal-clip-fade-container, .modal-clip-trim-container {
  background: #000;
  position: relative;
}

.modal-clip-fade-container {
  height: 130px;
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #333;
  overflow-x: auto; /* Enable horizontal scrolling */
  position: relative;
  margin-top: 10px;
  display: flex; /* Use flex to align timeline and clip */
  flex-direction: column;
  box-sizing: border-box;
}

.modal-clip-trim-container {
  height: 72px;
}

.modal-clip-preview-timeline {
  height: 20px;
  background: #252526;
  border-bottom: 1px solid #444;
  position: sticky;
  top: 0;
  z-index: 1;
}
.modal-clip-preview-timeline .measure-label {
  transform: translateX(16px);
}

.modal-clip-preview-clip {
  top: 10px; /* Adjusted for better vertical centering within 90px available space (110px container - 20px timeline) */
  left: 16px;
  right: 16px;
  position: relative;
  height: 72px; /* Consistent with audio-clip and waveformSvg */
  background: #673ab7;
  border-radius: 0px;
  font-size: 11px;
  display: flex;
  align-items: center;
  padding: 0px;
  cursor: pointer; /* Allow drawing interaction */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #eee;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  flex-shrink: 0; /* Prevent shrinking */
}

.fade-sub-controls {
  margin-top: 8px;
}

.modal-shape-selector {
  display: flex;
  gap: 4px;
}

button.transition-btn {
  background: #444;
  border: 1px solid #555;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
button.transition-btn.active {
  color: rgb(255, 208, 0);
}

.mini-btn-wide {
  background: #444;
  border: 1px solid #444;
  color: #ccc;
  border-radius: 4px;
  height: 24px;
  padding: 0 10px;
  font-size: 11px;
  cursor: pointer;
}
.mini-btn-wide:hover {
  background: #505055;
  color: #fff;
}

.flex-1 {
  flex: 1;
}

#audio-track-editor {
  min-height: 100%;
}

/* Layout */
/* Sidebar */
/* Tabs & Editor */
/* Piano Roll */
/* Piano Keys Sidebar */
/* Playhead */
:root {
  --bg-color: #1e1e1e;
  --sidebar-width: 240px;
  --note-height: 20px;
  --tick-width: 2px;
  --primary-accent: #007acc;
}

body {
  font-family: sans-serif;
  margin: 0;
  background: var(--bg-color);
  color: white;
  overflow: hidden;
  font-size: 12px;
}

a {
  color: #ccc;
  text-decoration: none;
}

.modal-main-content {
  flex: 1;
  padding: 0px 20px 0 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.modal-main-content .flex-row-gap {
  display: flex;
  gap: 8px;
}
.modal-main-content .btn-plus-fixed {
  width: 32px;
  padding: 0;
}
.modal-main-content .song-list-scroll {
  flex: 1;
}

.app-container {
  display: flex;
  height: 100dvh;
  flex-direction: column;
}

button,
select {
  font-size: 12px;
  font-family: inherit;
  padding: 5px 12px;
  box-sizing: border-box;
  line-height: 1.2;
  /* samakan line-height */
  height: 32px;
  /* paksa tinggi sama */
  vertical-align: middle;
  /* sejajarkan baseline */
  background-color: #2d2d2d;
  color: rgb(207, 207, 207);
  border: 1px solid #444;
  border-radius: 4px;
  cursor: auto;
}
button:focus, button:focus-visible,
select:focus,
select:focus-visible {
  outline: none;
}

/* Range Slider Styling */
input[type=range] {
  width: 80px;
  -moz-appearance: none;
       appearance: none;
  background: transparent;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
input[type=range]#volume-range {
  width: 80px;
}
input[type=range]:focus {
  outline: none;
}
input[type=range] {
  /* Track */
}
input[type=range]::-webkit-slider-runnable-track {
  background: #444;
  height: 4px;
  border-radius: 2px;
}
input[type=range]::-moz-range-track {
  background: #444;
  height: 4px;
  border-radius: 2px;
}
input[type=range] {
  /* Thumb */
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 14px;
  width: 7px;
  border-radius: 0;
  background: var(--primary-accent);
  border: none;
  margin-top: -5px;
}
input[type=range]::-moz-range-thumb {
  border: none;
  height: 14px;
  width: 7px;
  border-radius: 0;
  background: var(--primary-accent);
}

input[type=range][orient=vertical] {
  -webkit-appearance: none;
  -moz-appearance: none;
       appearance: none;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 16px;
  height: 142px;
  cursor: pointer;
  box-sizing: border-box;
  padding: 0;
}
input[type=range][orient=vertical]:focus, input[type=range][orient=vertical]:focus-visible {
  outline: none;
}
input[type=range][orient=vertical] {
  /* Track */
}
input[type=range][orient=vertical]::-webkit-slider-runnable-track {
  background: #333;
  border-radius: 6px;
  width: 16px;
}
input[type=range][orient=vertical]::-moz-range-track {
  background: #333;
  border-radius: 6px;
  width: 16px;
}
input[type=range][orient=vertical] {
  /* Thumb */
}
input[type=range][orient=vertical]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 14px;
  width: 14px;
  background: var(--primary-accent);
  border: none;
  border-radius: 0;
}
input[type=range][orient=vertical]::-moz-range-thumb {
  height: 14px;
  width: 14px;
  background: var(--primary-accent);
  border: none;
  border-radius: 0;
}

input::-webkit-slider-runnable-track {
  /* common styles */
}
input::-moz-range-track {
  /* common styles */
}
input::-ms-track {
  /* common styles */
}

input[type=range]#main-seeker {
  width: 150px;
}

#toolbar {
  min-height: 38px;
  height: auto;
  background: #333;
  display: flex;
  align-items: center;
  padding: 2px 10px 4px 10px;
  flex-wrap: wrap;
  gap: 2px 10px;
  border-bottom: 1px solid #444;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
#toolbar.minimized .toolbar-item {
  display: none;
}
#toolbar.minimized .toolbar-item.show-on-minimized {
  display: flex;
}
#toolbar button,
#toolbar select {
  font-size: 12px;
  font-family: inherit;
  padding: 6px 6px;
  box-sizing: border-box;
  line-height: 1.2;
  /* samakan line-height */
  height: 32px;
  /* paksa tinggi sama */
  vertical-align: middle;
  /* sejajarkan baseline */
  background-color: #444;
  color: rgb(228, 228, 228);
  border: 1px solid #444;
  border-radius: 4px;
  cursor: auto;
}
#toolbar #mode-toggle.select-mode {
  background: var(--primary-accent);
  color: white;
}
#toolbar .toolbar-item {
  margin: 2px -4px 2px 0;
  display: flex;
  align-items: center;
  gap: 2px;
}
#toolbar .toolbar-item.zoom-control {
  gap: 10px;
}
#toolbar .toolbar-item input {
  padding: 7px;
  color: #dddddd;
}
#toolbar .toolbar-item button {
  transition: color 0.2s ease-in-out, background 0.2s ease-in-out;
  color: #dddddd;
}
#toolbar .toolbar-item button.disabled {
  color: #777777;
}
#toolbar .toolbar-item button.active {
  opacity: 1;
  filter: saturate(1);
  color: rgb(255, 208, 0);
}
#toolbar .toolbar-item button:hover {
  color: #eeeeee;
}
#toolbar .toolbar-item button.active:hover {
  opacity: 1;
  filter: saturate(1);
  color: rgb(255, 208, 0);
}
#toolbar .toolbar-item .recording-ready svg {
  color: #c62828;
  animation: pulse-red 1s infinite;
  border-radius: 12px;
}
#toolbar .toolbar-label {
  font-size: 12px;
  color: #aaa;
}
#toolbar .toolbar-select {
  background: #444;
  color: white;
  border: 1px solid #555;
  font-size: 12px;
  padding: 5px 8px;
}
#toolbar .spacer {
  flex: 1;
}

.modal-footer button.active {
  color: rgb(255, 208, 0);
}

.menu-shortcut {
  color: #777;
  font-size: 11px;
  margin-left: 10px;
  flex: 0 0 40px;
  text-align: left;
}

.menu-divider {
  height: 1px;
  background: #444;
  margin: 4px 0;
}

.menu-disabled {
  pointer-events: none;
  opacity: 0.6;
}
.menu-disabled:hover {
  background: transparent;
}

#menu-bar {
  background: #252526;
  height: 40px;
  /* Gunakan tinggi tetap untuk stabilitas di desktop */
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 0 0 0 10px;
  border-bottom: 1px solid #333;
  z-index: 990;
  flex-wrap: nowrap;
  /* Jangan biarkan membungkus di desktop */
}
#menu-bar .spacer {
  flex: 1;
}
#menu-bar .song-title-display {
  margin-right: 10px;
  font-size: 12px;
  color: #888;
  pointer-events: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  width: 120px;
  /* Lebar tetap untuk menjaga konsistensi layout */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 30px;
  /* Samakan dengan tinggi menu bar */
  line-height: 30px;
  /* Memastikan teks rata tengah secara vertikal */
}
#menu-bar .menu-group {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
#menu-bar .menu-group .menu-trigger {
  background: none;
  border: none;
  border-radius: 0;
  color: #ccc;
  font-size: 12px;
  padding: 0 10px;
  height: 100%;
  cursor: pointer;
}
#menu-bar .menu-group .menu-trigger:hover, .menu-group.open #menu-bar .menu-group .menu-trigger {
  background: #3c3c3c;
  color: #fff;
}
#menu-bar .menu-group .menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0px;
  background: #252526;
  border: 1px solid #444;
  min-width: 240px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  max-width: calc(100vw - 32px);
  z-index: 2100;
  max-height: calc(100dvh - 60px);
  overflow: visible;
}
@media (max-width: 768px) {
  #menu-bar .menu-group .menu-dropdown {
    overflow-y: auto;
    overflow-x: hidden;
  }
}
#menu-bar .menu-group .menu-dropdown::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
  background: transparent;
}
#menu-bar .menu-group .menu-dropdown a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 15px;
  color: #ccc;
  text-decoration: none;
  font-size: 12px;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
#menu-bar .menu-group .menu-dropdown a:hover {
  background: var(--primary-accent);
  color: #fff;
}
#menu-bar .menu-group .menu-dropdown a:hover .menu-shortcut {
  color: #eee;
}
#menu-bar .menu-group.open .menu-dropdown {
  display: block;
}

/* Nested Submenu Styles */
#menu-bar .menu-group .menu-dropdown .menu-item-has-submenu {
  position: relative;
}
#menu-bar .menu-group .menu-dropdown .menu-item-has-submenu > .menu-submenu {
  display: none !important;
}
#menu-bar .menu-group .menu-dropdown .menu-item-has-submenu.active > .menu-submenu {
  display: block !important;
}

#menu-bar .menu-group .menu-dropdown .menu-submenu {
  display: none !important;
  position: absolute;
  top: 0;
  left: 100%;
  background: #252526;
  border: 1px solid #444;
  min-width: 240px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  z-index: 2200;
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
}

#menu-bar .menu-group .menu-dropdown .submenu-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

#menu-bar .menu-group .menu-dropdown .submenu-arrow {
  margin-left: 10px;
  font-size: 8px;
  color: #888;
}

#menu-bar .menu-group .menu-dropdown .menu-submenu a {
  padding: 8px 15px;
}

@media (max-width: 768px) {
  #menu-bar .menu-group .menu-dropdown .menu-submenu {
    position: static;
    border: none;
    box-shadow: none;
    background: #1e1e1f;
    border-left: 2px solid var(--primary-accent, #007acc);
    margin-left: 0;
    margin-top: 0;
    margin-bottom: 0;
    max-height: none;
    overflow-y: visible;
    box-sizing: border-box;
  }
}
/* Spatial Mixer 2D Styles */
.spatial-mixer-grid {
  width: 512px;
  height: 512px;
  background: #111;
  border: 1px solid #444;
  margin: 20px auto 40px auto;
  position: relative;
  background-image: linear-gradient(#111, #111), linear-gradient(#111, #111), linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 2px 100%, 100% 2px, 32px 32px, 32px 32px;
  background-position: center, center, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
}
.spatial-mixer-grid::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}
.spatial-mixer-grid::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.node-instrument-badge {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s;
  z-index: 10;
}

.node-instrument-badge.visible {
  opacity: 1;
}

.spatial-node {
  position: absolute;
  width: 32px;
  height: 32px;
  background: #333;
  border: 1px solid #666;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transform: translate(-50%, -50%);
  z-index: 5;
  transition: z-index 0s;
}
.spatial-node:active, .spatial-node:hover {
  z-index: 100;
}
.spatial-node.active {
  border-color: var(--primary-accent);
  box-shadow: 0 0 10px var(--primary-accent);
}
.spatial-node .node-instrument-badge {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 101;
}
.spatial-node .node-instrument-badge.visible {
  opacity: 1;
}
.spatial-node .node-label {
  position: absolute;
  bottom: -18px;
  font-size: 10px;
  white-space: nowrap;
  color: #aaa;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

@media (max-width: 600px) {
  #song-title-display {
    display: block;
    width: 100%;
    text-align: center;
    height: 32px;
    /* Tinggi tetap untuk area judul di mobile */
    line-height: 32px;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid #3d3d3d;
  }
  #menu-bar {
    height: 40px;
    /* Biarkan meluas di mobile karena judul pindah ke bawah */
    min-height: 30px;
    flex-wrap: wrap;
    padding-bottom: 32px;
    padding: 0 0 0 4px;
  }
  #toolbar {
    padding-left: 12px;
    padding-right: 0px;
    padding-top: 32px;
  }
  #toolbar .toolbar-item {
    margin-right: -4px;
  }
  #toolbar #volume-range {
    width: 36px;
  }
  #menu-bar .menu-group .menu-trigger {
    padding: 0px 6px;
  }
  #menu-bar .song-title-display {
    width: 100%;
    text-align: center;
  }
  #menu-bar .menu-group-transport {
    display: none;
  }
  input[type=range]#main-seeker {
    width: 85px;
  }
}
@media (max-width: 360px) {
  #song-title-display {
    font-size: 11px;
    height: 40px;
    line-height: 40px;
    top: 32px;
  }
  .toolbar-item button,
  .toolbar-item select {
    padding: 4px;
    height: 28px;
  }
  .spatial-mixer-grid {
    width: 280px;
    height: 280px;
  }
}
.main-content {
  display: grid;
  grid-template-columns: var(--sidebar-width) 6px 1fr;
  flex: 1;
  overflow: hidden;
}

#sidebar {
  background: #252526;
  border-right: 1px solid #444;
  overflow-y: auto;
  display: grid;
  grid-template-rows: 1fr 6px 100px;
  overflow: hidden;
  position: relative;
}

.resizer-v {
  width: 6px;
  background: #111;
  cursor: col-resize;
  border-left: 1px solid #333;
  border-right: 1px solid #333;
  z-index: 10;
}
.resizer-v:hover {
  background: #444;
}

/* Global Form Elements */
select,
.toolbar-select {
  background-color: #333;
  color: #eee;
  border: 1px solid #444;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  -webkit-appearance: none;
  /* hilangkan style default Safari/Chrome */
  -moz-appearance: none;
  /* hilangkan style default Firefox */
  appearance: none;
  /* hilangkan style default umum */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaaaaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  padding-right: 30px;
  transition: border-color 0.2s, background-color 0.2s;
}
select:focus,
.toolbar-select:focus {
  border-color: var(--primary-accent);
}
select option,
.toolbar-select option {
  background-color: #252526;
  color: #eee;
}

.list-item {
  padding: 0px 14px 0 0;
  border-bottom: 1px solid #333;
  display: flex;
  gap: 8px;
}
.list-item span {
  flex: 1;
  padding: 10px 0px 10px 16px;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.list-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
  padding: 8px 15px;
  text-align: left;
}
.list-item label span {
  padding: 0;
}
.list-item label input[type=checkbox] {
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  cursor: pointer;
}
.list-item:hover {
  background: #2b2b2b;
}

.status-bar {
  height: 100%;
  padding: 16px 16px;
}

.progress-bar-container {
  width: 100%;
  height: 4px;
  background: #333;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 2px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-accent);
  transition: width 0.1s linear;
}

#track-list {
  overflow-y: auto;
}

.track-item {
  height: 30px;
  padding: 5px 28px 5px 20px;
  border-bottom: 2px solid transparent;
  border-top: 2px solid transparent;
  box-shadow: 0 1px 0 0 rgba(70, 70, 70, 0.5);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0px;
  position: relative;
  /* Batasi hanya 2 baris text pada tombol instrumen */
  line-clamp: 2;
  -moz-line-clamp: 2;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.track-item.active {
  background: var(--primary-accent);
}

.track-item.dragging {
  opacity: 0.9;
}

.track-item.drag-over {
  border-top: 2px solid var(--primary-accent) !important;
}

.track-item.drag-over-top {
  border-top: 2px solid var(--primary-accent) !important;
}

.track-item.drag-over-bottom {
  border-bottom: 2px solid var(--primary-accent) !important;
}

.track-item.checked::before {
  content: "";
  position: absolute;
  left: 6px;
  top: calc(50% - 6px);
  bottom: 0;
  width: 12px;
  height: 12px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23fff"><path d="M20.285 6.708a1 1 0 0 0-1.414-1.416l-9.192 9.2-4.192-4.2a1 1 0 0 0-1.414 1.416l5 5a1 1 0 0 0 1.414 0l10-10z"/></svg>') no-repeat center center;
}
.track-item.checked.active {
  background: var(--primary-accent);
}

.vu-meter {
  position: relative;
  bottom: 0px;
  right: -16px;
  height: 43px;
  /* Gradasi statis pada kontainer */
  background: linear-gradient(to top, #4caf50 60%, #ffeb3b 85%, #ff5252 100%);
  opacity: 0.8;
  border-radius: 2px;
  overflow: hidden; /* Memastikan level tidak keluar dari batas */
  width: 4px;
}

.vu-level {
  /* Elemen ini sekarang berfungsi sebagai "penutup" dari atas */
  height: 100%; /* Mulai dari penuh (level 0) */
  background-color: #333; /* Warna latar belakang yang menutupi gradien */
  top: 0px;
  position: absolute;
  left: 0;
  width: 4px;
  transition: height 0.01s linear;
  /* JavaScript akan mengubah height dari 100% (kosong) ke 0% (penuh) */
}
.vu-level[data-track-id=main] {
  transition: none;
}

.track-instrument-btn {
  background: transparent;
  border: none;
  padding: 0px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  transition: background 0.2s;
  margin-left: 10px;
}
.track-instrument-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.track-instrument-btn:hover {
  background: transparent;
  color: white;
}

.editor-area {
  flex: 1;
  display: grid;
  grid-template-rows: 1fr 6px var(--bottom-pane-height, 200px);
  overflow: hidden;
  position: relative;
}

.tabs-outer-container {
  display: flex;
  background: #2d2d2d;
  align-items: center;
  position: relative;
  min-width: 0;
}

.envelope-visual-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 12;
}

.custom-scrollbar {
  overflow-y: scroll;
  scrollbar-width: none;
}

.custom-scrollbar::-webkit-scrollbar {
  display: none;
}

.tabs-container {
  flex: 1;
  display: flex;
  background: #2d2d2d;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  /* Firefox */
}
.tabs-container::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

.tabs-scroll-buttons {
  display: none;
  gap: 2px;
  padding: 0 5px;
  background: #2d2d2d;
  box-shadow: -5px 0 10px rgba(0, 0, 0, 0.3);
  z-index: 5;
}

.tab-scroll-btn {
  background: transparent;
  padding: 4px;
  border-radius: 0;
}
.tab-scroll-btn:hover {
  background: #444;
}

.tab {
  padding: 8px 14px;
  cursor: pointer;
  border-right: 1px solid #333;
  font-size: 12px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.tab.active {
  background: #1e1e1e;
  border-bottom: 2px solid var(--primary-accent);
}

.piano-roll-container,
#scroll-container {
  flex: 1;
  overflow: auto !important;
  /* Memastikan scrollbar muncul untuk kedua sumbu (X dan Y) */
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  background: #121212;
}

#piano-keys {
  position: sticky;
  left: 0;
  width: 74px;
  min-height: 2591px;
  background: #222 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADwCAYAAADB2w41AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOnAAADpwBB5RT3QAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNS8wMy8yNoUFoJ4AAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAASUlEQVQ4je2RsQ3AMAgEDzZiB4b2Sj/Fu3CTJh1FpLi5AqTXH9DdRpIT4CAiSNsMzdZaADir6rmYw4mXNNX51ePe6n8e9+df8dj8f4ia05QxjgAAAABJRU5ErkJggg==") repeat;
  background-position: 0px 30px;
  z-index: 200;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
  display: block;
  flex-shrink: 0;
}

[data-active-track-id="-2"] #piano-keys,
[data-active-track-id="-3"] #piano-keys,
[data-active-track-id="-4"] #piano-keys,
[data-active-track-id="-5"] #piano-keys {
  background: none;
  box-shadow: none;
}

.track-tabs-container {
  height: 32px;
}

.piano-keys-spacer {
  height: 30px;
  background: #222;
  border-bottom: 1px solid #444;
  position: sticky;
  top: 0;
  z-index: 101;
}

.piano-key-label {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 4px;
}

.piano-key {
  height: var(--note-height) !important;
  width: 100%;
  border: none !important;
  box-shadow: inset 0 -1px 0 0 rgba(88, 88, 88, 0.5);
  box-sizing: border-box;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  margin: 0 !important;
  padding: 0 !important;
}

.note,
.text-marker,
.subtitle-marker,
.lyric-marker,
.resizer,
.subtitle-resizer,
.overlay-resizer,
.piano-key {
  touch-action: none;
}

.piano-key.white {
  background: linear-gradient(to right, #f0f0f0 0%, #d8d8d8 100%);
  color: #777;
}

.piano-key.black {
  background: linear-gradient(to right, #444 0%, #000 100%);
  color: #aaaaaa;
  border-radius: 0 3px 3px 0;
  box-shadow: inset 0 -1px 0 0 #000, inset -1px 0 0 0 #000, inset 0 1px 0 0 #000;
  z-index: 2;
}

.piano-key.dead {
  background: #151515;
  cursor: default;
  pointer-events: none;
}

.piano-key.active-note {
  background: var(--primary-accent) !important;
  transition: background 0.05s ease-out, box-shadow 0.05s ease-out;
  color: #ffffff;
}

.piano-key.white-wrapper .piano-key.white div.active-note {
  background: var(--primary-accent) !important;
  transition: background 0.05s ease-out, box-shadow 0.05s ease-out;
}

.piano-key.white-wrapper {
  background: #dcdcdc;
  width: 100%;
}

.piano-roll-content {
  position: relative;
  display: block;
  flex: 0 0 auto;
  /* Jangan paksa mengecil, biarkan lebar ditentukan oleh .piano-roll */
  min-width: calc(100% - 60px);
  /* Minimal selebar layar agar background grid tetap penuh */
  width: auto;
}

#timeline,
.piano-roll-wrapper,
#bottom-canvas-container,
#bottom-canvas {
  min-width: 100%;
}

#timeline {
  height: 30px;
  background: #252526;
  border-bottom: 1px solid #444;
  position: sticky;
  top: 0;
  z-index: 150;
  cursor: pointer;
}

.measure-label {
  position: absolute;
  height: 100%;
  border-left: 1px solid #555;
  padding-left: 2px;
  font-size: 10px;
  color: #888;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.piano-roll-wrapper {
  position: relative;
  width: 5000px;
  height: calc(130 * var(--note-height));
  z-index: 1;
  /*
  background-image:
    linear-gradient(90deg, #555 1px, transparent 1px),
    linear-gradient(90deg, transparent 1px, transparent 1px),
    linear-gradient(#222 1px, transparent 1px),
    linear-gradient(to bottom,
      #242424 0%, #242424 8.333%,
      /* G  - Putih */
  /* F# - Hitam */
  /* F  - Putih */
  /* E  - Putih */
  /* D# - Hitam */
  /* D  - Putih */
  /* C# - Hitam */
  /* C  - Putih */
  /* B  - Putih */
  /* A# - Hitam */
  /* A  - Putih */
  /* G# - Hitam */
  background: url(background/piano-roll.png) repeat;
  /*
  background-size:
    256px 100%,
    64px 100%,
    100% var(--note-height),
    100% calc(var(--note-height) * 12),
    100% 25%;
    */
  /* membagi jadi 4 bagian */
}

.piano-roll-wrapper[data-active-track="-2"],
.piano-roll-wrapper[data-active-track="-3"],
.piano-roll-wrapper[data-active-track="-4"],
.piano-roll-wrapper[data-active-track="-5"] {
  background-image: linear-gradient(90deg, #555 1px, transparent 1px), linear-gradient(90deg, #333 1px, transparent 1px), linear-gradient(#222 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
}

.note {
  position: absolute;
  background: linear-gradient(#4caf50, #3d8b40); /* gradasi hijau tipis */
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.5); /* bayangan luar */
  cursor: move;
  min-width: 10px;
  height: 20px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: start;
  font-size: 9px;
  color: white;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.note.selected {
  background: linear-gradient(#df7273, #c94b4c); /* gradasi merah tipis */
  border: 1px solid #b33a3b;
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.6);
  z-index: 10;
}

[data-active-track="-1"] .note[data-channel="0"] {
  background: #e6194b;
  border: 1px solid #a60029;
  color: white;
}
[data-active-track="-1"] .note[data-channel="1"] {
  background: #3cb44b;
  border: 1px solid #2a7f34;
  color: white;
}
[data-active-track="-1"] .note[data-channel="2"] {
  background: #ffe119;
  border: 1px solid #b3a100;
  color: black;
}
[data-active-track="-1"] .note[data-channel="3"] {
  background: #4363d8;
  border: 1px solid #2e46a3;
  color: white;
}
[data-active-track="-1"] .note[data-channel="4"] {
  background: #f58231;
  border: 1px solid #b35300;
  color: black;
}
[data-active-track="-1"] .note[data-channel="5"] {
  background: #911eb4;
  border: 1px solid #6b0d87;
  color: white;
}
[data-active-track="-1"] .note[data-channel="6"] {
  background: #46f0f0;
  border: 1px solid #2bb3b3;
  color: black;
}
[data-active-track="-1"] .note[data-channel="7"] {
  background: #f032e6;
  border: 1px solid #a600a6;
  color: white;
}
[data-active-track="-1"] .note[data-channel="8"] {
  background: #bcf60c;
  border: 1px solid #7fa600;
  color: black;
}
[data-active-track="-1"] .note[data-channel="9"] {
  background: #fabebe;
  border: 1px solid #c48c8c;
  color: black;
}
[data-active-track="-1"] .note[data-channel="10"] {
  background: #008080;
  border: 1px solid #004d4d;
  color: white;
}
[data-active-track="-1"] .note[data-channel="11"] {
  background: #e6beff;
  border: 1px solid #b38ccf;
  color: black;
}
[data-active-track="-1"] .note[data-channel="12"] {
  background: #9a6324;
  border: 1px solid #6b4619;
  color: white;
}
[data-active-track="-1"] .note[data-channel="13"] {
  background: #fffac8;
  border: 1px solid #b3b08c;
  color: black;
}
[data-active-track="-1"] .note[data-channel="14"] {
  background: #800000;
  border: 1px solid #4d0000;
  color: white;
}
[data-active-track="-1"] .note[data-channel="15"] {
  background: #aaffc3;
  border: 1px solid #6fb38a;
  color: black;
}

.note .resizer {
  position: absolute;
  right: 0;
  width: 3px;
  height: 100%;
  cursor: ew-resize;
  background: transparent;
}

#time-display {
  display: inline-block;
  width: 76px;
  padding-left: 4px;
  font-size: 12px;
  white-space: nowrap;
  overflow: visible;
  box-sizing: border-box;
}

#playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 0, 0, 0.7);
  z-index: 151;
  pointer-events: none;
  left: 0;
}

#selection-box {
  position: absolute;
  border: 1px solid #c7c7c7;
  background: rgba(0, 122, 204, 0.3);
  pointer-events: none;
  z-index: 150;
  display: none;
}

#selection-overlay {
  position: absolute;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
  z-index: 149;
  display: none;
}
#selection-overlay .overlay-border {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  pointer-events: none;
}
#selection-overlay .overlay-resizer {
  position: absolute;
  right: -4px;
  top: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
  pointer-events: auto;
  z-index: 152;
}
#selection-overlay .overlay-resizer:hover + .overlay-border {
  border: 1px solid rgba(255, 255, 255, 0.5);
}

textarea {
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

button.drum-pad-btn {
  background: #444;
  color: white;
  border: none;
  padding: 5px 5px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button.drum-pad-btn svg {
  pointer-events: none;
}

button:hover {
  background: #333;
}

.add-new-btn {
  width: 100%;
  margin-top: 5px;
  margin-bottom: 10px;
  background: #2e7d32;
}

.export-track-list {
  padding: 10px;
  height: 150px !important;
  border: 1px solid #444 !important;
  border-radius: 4px;
}
.export-track-list .list-item label {
  padding: 6px 6px;
}

.modal-content-scroll {
  max-height: 325px;
  overflow-y: auto;
  overflow-x: auto;
  margin-bottom: 0px;
  border: 1px solid #444;
  background: #1e1e1e;
  border-radius: 4px;
  text-align: left;
}

.project-list {
  overflow-y: auto;
  overflow-x: auto;
  margin-bottom: 10px;
  border: 1px solid #444;
  background: #1e1e1e;
  border-radius: 4px;
  text-align: left;
  max-height: 242px;
}

.radio-group-horizontal {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 5px;
}

.radio-label-inline {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 13px;
}

.footer-modal-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
}
.footer-modal-controls button {
  flex: 0 0 auto;
  padding: 5px 8px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes pulse-red {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
  }
}
.track-ms-btns {
  display: flex;
  gap: 2px;
}
.track-ms-btns button {
  margin-right: 2px;
  vertical-align: middle;
}
.track-ms-btns button.mini-btn {
  margin-top: 4px;
}

.mini-btn {
  background: #444;
  border: 1px solid #555;
  color: #999;
  font-size: 9px;
  width: 18px;
  height: 18px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  cursor: pointer;
}
.mini-btn.channel-btn {
  text-align: center;
}
.mini-btn.mute-btn.active {
  background: #ff5252;
  color: white;
  border-color: #ff1744;
}
.mini-btn.solo-btn.active {
  background: #ffeb3b;
  color: black;
  border-color: #fdd835;
}

.mini-btn.lock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffeb3b !important;
  margin-right: -8px;
  width: 12px;
  background: transparent !important;
  border: none !important;
}

/* Hilangkan spinner di Chrome, Safari, Edge */
input[type=number] {
  accent-color: #f0f0f0;
  /* warna spinner/controls */
}

input[type=number]:focus,
input[type=number]:focus-visible {
  outline: none;
}

#import-midi-input {
  display: none;
}

#bpm-input {
  width: 54px;
  background: #444;
  border: 1px solid #444;
  margin-left: 4px;
}

#bpm-input.readonly {
  opacity: 0.7;
  cursor: not-allowed;
  border-color: #333 !important;
}

.list-item label input[type=checkbox],
.radio-label-inline input[type=radio],
.export-track-list input[type=checkbox] {
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  cursor: pointer;
}

#instrument-icon-preview {
  margin: 15px 0;
  color: #4caf50;
  height: calc(100dvh - 380px);
  overflow: auto;
}

.instrument-preview-pad {
  width: 120px;
  height: 120px;
  background: #3d3d3d;
  border: 1px solid transparent;
  border-radius: 4px;
  display: inline-block;
  position: relative;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  margin-right: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}
.instrument-preview-pad:hover {
  background: #404040;
}
.instrument-preview-pad.active {
  border-color: #4caf50;
  background: #484848;
}
.instrument-preview-pad svg {
  pointer-events: none;
  width: 48px;
  height: 48px;
  fill: currentColor;
}

.instrument-select-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(86, 86, 86, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  border: none;
  color: #cccccc;
  z-index: 2;
}

.instrument-select-btn svg {
  width: 12px;
  height: 12px;
}

.instrument-preview-pad.active .instrument-select-btn {
  background: rgba(76, 175, 80, 0.8);
  color: #ffffff;
}

/* stray duplicate CSS removed */
.instrument-select-btn svg {
  width: 16px;
  height: 16px;
}

.instrument-preview-btn {
  background-color: transparent;
  border: none;
  height: auto;
  width: auto;
  cursor: default;
}
.instrument-preview-btn:hover {
  background-color: transparent;
  color: #4caf50;
}

.instrument-label-number {
  padding-top: 10px;
  font-size: 11px;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.instrument-label-name {
  font-size: 10px;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

#generator-modal .modal-content {
  width: 350px;
}

#sync-modal input[type=range] {
  width: 100%;
}

#about-modal .about-content {
  text-align: center;
}
#about-modal .logo {
  color: var(--primary-accent);
}
#about-modal .app-title-text {
  font-size: 12px;
  color: #aaa;
  margin-top: 10px;
}
#about-modal .copyright-text {
  font-size: 11px;
  color: #888;
  margin-top: 15px;
}
#about-modal .copyright-text a {
  color: #888;
}

#instrument-modal #instrument-select {
  width: 100%;
  margin-bottom: 15px;
}
#instrument-modal .btn-test-sound {
  width: 100%;
  margin-bottom: 15px;
  background: #673ab7;
  color: white;
  padding: 10px;
}
#instrument-modal .btn-test-sound:hover {
  background: #7e57c2;
}

#instrument-event-modal .instrument-event-details {
  text-align: left;
  padding: 10px;
}
#instrument-event-modal .instrument-event-details .form-group {
  margin-bottom: 15px;
}
#instrument-event-modal .instrument-event-details .form-group .form-label {
  display: block;
  font-size: 12px;
  color: #aaa;
  margin-bottom: 5px;
  padding: 0;
}
#instrument-event-modal .instrument-event-details input[readonly] {
  background: #1e1e1e;
  color: #888;
  border: 1px solid #333;
  cursor: default;
}
#instrument-event-modal .instrument-event-details .toolbar-select {
  width: 100%;
}
#instrument-event-modal .instrument-event-details .btn-test-sound {
  width: 100%;
  margin-top: 10px;
  background: #673ab7;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
#instrument-event-modal .instrument-event-details .btn-test-sound:hover {
  background: #7e57c2;
}

#bottom-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 0, 0, 0.7);
  z-index: 95;
  pointer-events: none;
}

.bottom-param-canvas {
  z-index: 3;
}

/* Gaya tambahan untuk layout frame vertikal */
.editor-area {
  display: grid;
  grid-template-rows: 1fr 6px var(--bottom-pane-height, 200px);
  height: 100%;
  overflow: hidden;
}

#editor-top-frame {
  min-height: 100px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* PENTING: Mencegah grid item melebar mengikuti konten sehingga scrollbar bisa aktif */
  overflow: hidden;
  /* Menjaga agar elemen internal tidak meluap keluar frame */
}

#editor-resizer {
  height: 6px;
  background: #111;
  cursor: ns-resize;
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
  z-index: 10;
}

#editor-resizer:hover {
  background: #444;
}

#editor-bottom-frame {
  /* Default height */
  background: #1a1a1a;
  display: flex;
  flex-direction: column;
  min-height: 50px;
  min-width: 0;
  /* Menghindari masalah yang sama pada panel parameter bawah */
}

.bottom-tabs-header {
  display: flex;
  flex-direction: column;
  background: #252525;
  min-width: 0;
}

button.tab-btn {
  border-radius: 0;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: #bbbbbb;
  cursor: pointer;
  font-size: 12px;
  border-right: 1px solid #333;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
button.tab-btn:hover {
  background: #252525;
  color: #cccccc;
}
button.tab-btn.active {
  background: #1e1e1e;
  color: #cccccc;
  border-bottom: 2px solid var(--primary-accent);
}

#bottom-parameter-container {
  flex: 1; /* Tetap flex-grow di dalam #editor-bottom-frame */
  display: grid; /* Ganti dari flex ke grid */
  grid-template-columns: 74px 1fr; /* Definisikan kolom sidebar dan area scroll */
  /* PENTING: Mengurung isi agar flex-item (scroll container) bisa mendeteksi overflow */
  min-height: 0;
  /* Penting agar flex item menghormati batas kontainer */
}

#bottom-recording-container {
  display: flex;
  flex-direction: column;
  background: #1a1a1a;
  overflow: hidden;
  height: 100%;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
#bottom-recording-container .recording-tabs-header {
  display: flex;
  background: #252525;
  border-bottom: 1px solid #333;
}
#bottom-recording-container .recording-tabs-header .rec-tab-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: #bbb;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 1px;
  border-radius: 0;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
}
#bottom-recording-container .recording-tabs-header .rec-tab-btn.active {
  color: white;
  background: #333;
  border-bottom: 2px solid #4caf50;
}
#bottom-recording-container .recording-content {
  flex: 1;
  position: relative;
  overflow: auto;
}
#bottom-recording-container .rec-panel {
  display: none;
  height: 100%;
  padding: 15px;
  box-sizing: border-box;
}
#bottom-recording-container .rec-panel.active {
  display: flex;
  flex-direction: column;
}

.analyzer-wrapper {
  margin-top: 10px;
  background: #000;
  border: 1px solid #333;
  height: 60px;
}
.analyzer-wrapper canvas {
  width: 100%;
  height: 100%;
}

.guitar-neck {
  display: flex;
  flex-direction: column;
  background: #3e2723;
  padding: 10px;
  border-radius: 4px;
  margin-top: 0px;
}
.guitar-neck .string-label {
  width: 40px;
  font-size: 11px;
  font-weight: bold;
  color: #ccc;
}
.guitar-neck .guitar-dot {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  position: absolute;
  left: 50%;
  pointer-events: none;
}
.guitar-neck .guitar-dot.single {
  top: 50%;
  transform: translate(-50%, -50%);
}
.guitar-neck .guitar-dot.double-top {
  top: 20%;
  transform: translateX(-50%);
}
.guitar-neck .guitar-dot.double-bottom {
  bottom: 20%;
  transform: translateX(-50%);
}
.guitar-neck .guitar-string {
  display: flex;
  height: 20px;
  border-bottom: none;
  position: relative;
}
.guitar-neck .guitar-fret {
  flex: 1;
  border-left: 2px solid #9e9e9e;
  cursor: pointer;
}
.guitar-neck .guitar-fret:hover {
  background: rgba(255, 255, 255, 0.1);
}
.guitar-neck .guitar-fret.detected-fret {
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.guitar-neck .guitar-fret.detected-fret::after {
  content: "";
  width: 14px;
  height: 14px;
  background: #4caf50;
  border-radius: 50%;
  box-shadow: 0 0 12px #4caf50, 0 0 2px #fff;
  border: 2px solid #fff;
  z-index: 10;
  pointer-events: none;
}

.fret-markers {
  display: flex;
  padding-left: 55px;
  padding-right: 10px;
}
.fret-markers.row-reverse {
  padding-left: 48px;
  padding-right: 17px;
}
.fret-markers {
  transform: translateY(12px);
}
.fret-markers .fret-marker {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: #888;
}

#drum-pad-container {
  margin-top: 10px;
}
#drum-pad-container .drum-pad-btn {
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 4px;
  width: 72px;
  height: 72px;
  display: inline-block;
  cursor: pointer;
  text-align: center;
  transition: background 0.01s, transform 0.05s;
  color: #888;
  margin-right: 8px;
  margin-bottom: 8px;
}
#drum-pad-container .drum-pad-btn.highlight {
  color: rgb(255, 208, 0);
}
#drum-pad-container .drum-pad-btn .pad-icon {
  width: 100%;
  height: 32px;
  margin-bottom: 8px;
  text-align: center;
}
#drum-pad-container .drum-pad-btn .pad-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  display: inline-block;
  margin-bottom: 2px;
}
#drum-pad-container .drum-pad-btn .pad-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow-x: hidden;
  text-overflow: ellipsis;
}
#drum-pad-container .drum-pad-btn:hover {
  background: #383838;
  color: #bbb;
  border-color: #666;
}
#drum-pad-container .drum-pad-btn.highlight:hover {
  color: rgb(255, 208, 0);
}

#bottom-sidebar {
  width: 74px;
  background: #222;
  border-right: 1px solid #333;
  flex-shrink: 0;
  position: relative;
  height: 100%;
  z-index: 10;
}

#bottom-scroll-container {
  flex: 1;
  min-width: 0;
  overflow-x: scroll !important;
  /* Memaksa scrollbar horizontal jika konten melebar */
  overflow-y: auto;
  position: relative;
  background: #151515;
  height: 100%;
  box-sizing: border-box;
}

.automation-tools-container {
  display: flex;
  flex-direction: row !important;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-start;
  padding: 0px 10px;
  background: #333;
  border-bottom: 1px solid #444;
  min-height: 37px;
  overflow-x: auto;
  scrollbar-width: none;
}
.automation-tools-container::-webkit-scrollbar {
  display: none;
}
.automation-tools-container {
  -webkit-overflow-scrolling: touch;
}

#automation-tools-inner {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 4px;
  width: auto;
  flex-shrink: 0;
}
#automation-tools-inner[data-hide-buttons=true] button {
  display: none;
}
#automation-tools-inner[data-hide-buttons=true] button#automation-erase {
  display: inline-block;
}
#automation-tools-inner[data-hide-buttons=true] .automation-separator {
  display: none;
}
#automation-tools-inner[data-active-tab=velocity] button {
  display: none;
}
#automation-tools-inner[data-active-tab=velocity] button#automation-erase {
  display: none;
}

.automation-separator {
  width: 1px;
  height: 20px;
  background: #444;
  margin: 0 2px;
}

#automation-pb-extra-btns {
  display: none;
  gap: 4px;
  align-items: center;
}

#automation-selection-box {
  display: none;
  position: absolute;
  border: 1px solid #c7c7c7;
  background: rgba(0, 122, 204, 0.3);
  pointer-events: none;
  z-index: 150;
}

/* Style untuk tombol di dalam automation-tools-container */
.automation-tools-container button {
  background-color: #444;
  color: #dddddd;
  border: 1px solid #444;
  border-radius: 4px;
  height: 28px;
  /* Tinggi sedikit lebih kecil dari tombol toolbar utama */
  width: 28px;
  /* Agar tombol berbentuk kotak */
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.automation-tools-container button:hover {
  background-color: #555;
  border-color: #555;
  color: #eeeeee;
}
.automation-tools-container button.active {
  color: rgb(255, 208, 0);
}

.rec-panel button.active {
  color: rgb(255, 208, 0);
}

@-moz-document url-prefix() {
  #bottom-scroll-container {
    padding-bottom: 10px;
    /* kompensasi tinggi scrollbar agar sejajar dengan Edge */
  }
  .bottom-sidebar-label {
    /* transform: translateY(-14px); */
    /* Penyesuaian khusus untuk Firefox, sesuai laporan awal */
  }
}
#bottom-canvas-container {
  transform: translateX(-1px);
  background-image: linear-gradient(90deg, #444 2px, transparent 2px), linear-gradient(90deg, transparent 1px, transparent 1px);
  background-size: 256px 100%, 64px 100%;
}

#bottom-canvas-container,
#bottom-canvas {
  position: relative;
  height: 100%;
  background-repeat: repeat;
  background-position: 0 0;
}

.param-bar {
  position: absolute;
  bottom: 20px;
  width: 2px;
  background: #439c46;
  pointer-events: none;
  transform: translateX(-50%);
  z-index: 5;
}

.param-bar.active {
  background: #DF7273;
  z-index: 6;
}

.automation-point, .expression-point, .volume-point, .pitch-bend-point, .pan-point {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #a9ddff;
  border: 1px solid var(--primary-accent);
  border-radius: 50%;
  transform: translate(-50%, 50%);
  z-index: 20;
}
.automation-point:hover, .expression-point:hover, .volume-point:hover, .pitch-bend-point:hover, .pan-point:hover, .automation-point.active, .active.expression-point, .active.volume-point, .active.pitch-bend-point, .active.pan-point, .automation-point.selected, .selected.expression-point, .selected.volume-point, .selected.pitch-bend-point, .selected.pan-point {
  background: var(--primary-accent);
  box-shadow: 0 0 8px var(--primary-accent);
}

.pitch-bend-point {
  border-color: #ff9800;
}
.pitch-bend-point:hover, .pitch-bend-point.active {
  background: #ff9800;
  box-shadow: 0 0 8px #ff9800;
}

.volume-point {
  border-color: #4caf50;
}
.volume-point:hover, .volume-point.active {
  background: #4caf50;
  box-shadow: 0 0 8px #4caf50;
}

.expression-point {
  border-color: #00bcd4;
}
.expression-point:hover, .expression-point.active {
  background: #00bcd4;
  box-shadow: 0 0 8px #00bcd4;
}

.pan-point.selected,
.pitch-bend-point.selected,
.volume-point.selected,
.expression-point.selected,
.modulation-point.selected,
.reverb-point.selected,
.chorus-point.selected,
.sustain-point.selected {
  background: #ffee00 !important;
  border-color: #ffee00 !important;
}

/* Grid styles for bottom area */
.bottom-h-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid #2a2a2a;
  pointer-events: none;
  z-index: 1;
}

.bottom-h-line.mid {
  border-top: 1px solid #4a4a4a;
}

.bottom-sidebar-label {
  position: absolute;
  right: 0;
  left: 0;
  padding-right: 8px;
  height: 22px;
  line-height: 1;
  box-sizing: border-box;
  font-size: 11px;
  color: #888;
  text-align: right;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  z-index: 5;
  pointer-events: auto;
  cursor: pointer;
  background: transparent;
  bottom: 0px;
}
.bottom-sidebar-label.primary {
  color: #aaaaaa;
}

svg.automation-svg {
  z-index: 15;
  pointer-events: none;
  position: absolute;
  bottom: 0px;
  left: 0px;
}

.progress-bar-container {
  width: 100%;
  height: 5px;
  background: #ccc;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  border-radius: 4px;
}

.status-bar-label {
  font-size: 11px;
  color: #888;
  margin-bottom: 2px;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.label-success {
  font-size: 11px;
  color: #4caf50;
  font-family: monospace;
}

.progress-bar-fill-animation {
  height: 100%;
  width: 50%;
  /* lebar isi bar */
  background: #4caf50;
  animation: loading 1s linear infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(200%);
  }
}
.empty-list-msg {
  padding: 0px 16px;
}

/* Scrollbar untuk browser berbasis WebKit (Chrome, Edge, Safari) */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #1e1e1e;
  /* latar gelap */
}

::-webkit-scrollbar-thumb {
  background-color: #444;
  /* warna thumb */
  border-radius: 6px;
  border: 2px solid #1e1e1e;
  /* agar thumb terlihat terpisah dari track */
}

::-webkit-scrollbar-thumb:hover {
  background-color: #666;
  /* warna saat hover */
}

/* Sudut pertemuan antara scrollbar horizontal dan vertikal */
::-webkit-scrollbar-corner {
  background: #1e1e1e;
  /* samakan dengan latar track agar tidak putih */
}

.lyric-table tr.active-row input {
  color: #fff;
}

.editor-area.resizing-bottom .bottom-parameter-layer,
.editor-area.resizing-bottom .bottom-param-canvas {
  top: auto !important;
  bottom: 0 !important;
}

.mixer-container {
  display: flex;
  flex-direction: row;
  gap: 8px;
  padding: 15px;
  overflow-x: auto;
  background: #1e1e1e;
  border-radius: 4px;
  min-height: 250px;
  align-items: flex-start;
  justify-content: center;
  justify-content: safe center;
}

.mixer-strip {
  display: flex;
  position: relative;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #2d2d2d;
  padding: 8px 1px 1px 1px;
  border-radius: 3px;
  border: 1px solid #3d3d3d;
  width: 38px;
}
.mixer-strip .mixer-instrument {
  color: #EAEAEA;
  cursor: pointer;
  padding: 0;
  background-color: transparent;
  border: none;
}
.mixer-strip .mixer-instrument:focus, .mixer-strip .mixer-instrument:focus-visible, .mixer-strip .mixer-instrument:active {
  outline: none;
  box-shadow: none;
}
.mixer-strip .mixer-instrument svg {
  width: 18px;
  height: 18px;
}
.mixer-strip.active {
  background-color: #2F343A;
}
.mixer-strip.active .mixer-channel-label, .mixer-strip.active .mixer-instrument {
  color: var(--primary-accent);
}

.mixer-strip.dimmed {
  display: none;
}

.mixer-space {
  width: 80%;
  height: 3px;
  border-radius: 2px;
  background: rgba(68, 68, 68, 0.15);
}

.mixer-label {
  color: #aaa;
  font-size: 14px;
  font-family: monospace;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  text-align: center;
}

.mixer-channel-label {
  cursor: pointer;
  width: 100%;
  padding: 2px;
}

.mixer-instrument:hover, .mixer-channel-label:hover {
  color: var(--primary-accent);
}

.mixer-strip > .mixer-btns {
  display: flex;
  gap: 4px;
  margin-top: 0px;
}
.mixer-strip > .mixer-btns:first-child {
  margin-top: 4px;
}

.volume-slider {
  -webkit-appearance: none;
  /* reset default di WebKit/Chromium */
  -moz-appearance: none;
       appearance: none;
}

.volume-slider {
  -webkit-appearance: none;
  /* reset default */
  -moz-appearance: none;
       appearance: none;
  width: 200px;
  /* contoh ukuran slider */
  height: 4px;
  background: #ccc;
  /* warna track */
  border-radius: 2px;
}

/* Reset default style agar kompatibel di Opera */
.volume-slider {
  -webkit-appearance: none;
  -moz-appearance: none;
       appearance: none;
  width: 16px;
  height: 160px;
  background: #333;
  border-radius: 2px;
  outline: none;
}

input[type=range].volume-slider, input[type=range]#clip-volume-input {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
       appearance: none !important;
  width: 16px;
  border: none; /* remove border */
  outline: none; /* remove focus outline */
  background: transparent; /* optional: remove default background */
  border-radius: 2px;
}

input[type=range].volume-slider:focus, input[type=range]#clip-volume-input:focus {
  border: none; /* remove border */
  outline: none; /* remove focus outline */
  background: transparent; /* optional: remove default background */
}

input[type=range].volume-slider {
  height: 160px;
}

input[type=range]#clip-volume-input {
  width: 120px;
}

/* Thumb untuk Chromium/Opera */
input[type=range].volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 14px;
  height: 8px;
  background: #4caf50 !important;
  /* hijau */
  border: 1px solid #2e7d32;
  border-radius: 0;
  cursor: pointer;
  margin-top: -5px;
}

/* Track agar tidak menimpa thumb */
input[type=range].volume-slider::-webkit-slider-runnable-track {
  background: #444;
  border-radius: 2px;
  height: 4px;
}

/* Firefox */
input[type=range].volume-slider::-moz-range-thumb {
  width: 14px;
  height: 8px;
  background: #4caf50 !important;
  border: 1px solid #2e7d32;
  border-radius: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.pan-control {
  --accent: #1a90f2;
  /* Nuansa biru untuk knob Pan */
}

.pan-control .knob {
  /* gradasi dengan biru lebih tebal */
  background: linear-gradient(#6f7883, #5a626b, rgba(26, 144, 242, 0.3));
}

.reverb-control {
  --accent: #ff5252;
  /* Nuansa merah untuk knob Reverb */
}

.reverb-control .knob {
  /* gradasi dengan merah lebih tebal */
  background: linear-gradient(#7f6e6d, #675a59, rgba(255, 82, 82, 0.3));
}

/*
@media (max-width: 360px) {
  #menu-bar {
    padding-bottom: 40px;
  }

  #song-title-display {
    font-size: 11px;
    height: 40px;
    line-height: 40px;
    top: 32px;
  }

  .toolbar {
    padding-top: 0px;
    gap: 2px 5px;
  }

  .toolbar-item {

    button,
    select {
      padding: 4px;
      height: 28px;
    }
  }

  .spatial-mixer-grid {
    width: 280px;
    height: 280px;
  }
}
  */
.mixer-value {
  color: #4caf50;
  font-size: 12px;
  font-weight: bold;
  font-family: monospace;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.modal-footer input[type=range],
input[type=range]#sync-offset-range {
  height: 32px;
  -moz-appearance: slider-horizontal;
  appearance: slider-horizontal;
  -webkit-appearance: slider-horizontal;
  vertical-align: middle;
  padding: 4px 8px;
  box-sizing: border-box;
  line-height: 1;
  margin-top: 0;
  margin-bottom: 0;
}

.form-label {
  padding: 2px 0px 8px 0;
  display: inline-block;
}

.modulation-point {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #a9ddff;
  border: 2px solid #00ff00;
  border-radius: 50%;
  transform: translate(-50%, 50%);
  z-index: 20;
}

.modulation-point:hover,
.modulation-point.active {
  background: #00ff00;
  box-shadow: 0 0 8px #00ff00;
}

.chorus-point {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #a9ddff;
  border: 2px solid #9c27b0;
  border-radius: 50%;
  transform: translate(-50%, 50%);
  z-index: 20;
}

.chorus-point:hover,
.chorus-point.active {
  background: #9c27b0;
  box-shadow: 0 0 8px #9c27b0;
}

.reverb-point {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #a9ddff;
  border: 2px solid #ff5252;
  border-radius: 50%;
  transform: translate(-50%, 50%);
  z-index: 20;
}

.reverb-point:hover,
.reverb-point.active {
  background: #ff5252;
  box-shadow: 0 0 8px #ff5252;
}

.spatial-y-point {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #a9ddff;
  border: 2px solid #ffeb3b;
  border-radius: 50%;
  transform: translate(-50%, 50%);
  z-index: 20;
}

.spatial-y:hover,
.spatial-y.active {
  background: #ffffff;
  box-shadow: 0 0 8px #dc39b9;
}

.spatial-z-point {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #a9ddff;
  border: 2px solid #cddc39;
  border-radius: 50%;
  transform: translate(-50%, 50%);
  z-index: 20;
}

.spatial-z-point:hover,
.spatial-z-point.active {
  background: #ffffff;
  box-shadow: 0 0 8px #dc39b9;
}

.spatial-y-point.selected, spatial-z-point.selected {
  background: #ffffff !important;
  border-color: #dc39b9 !important;
}

.sustain-point {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  transform: translate(-50%, 50%);
  z-index: 20;
  cursor: auto;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s, background 0.1s;
}

.sustain-point:hover,
.sustain-point.active {
  background: #00acc1;
  border-color: #00acc1;
  box-shadow: 0 0 4px #00acc1;
}

.program-point {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff;
  border: 1px solid #444;
  border-radius: 50%;
  transform: translate(-50%, 50%);
  z-index: 20;
}

.program-point.active,
.program-point:hover {
  background: var(--primary-accent);
  box-shadow: 0 0 8px var(--primary-accent);
}

.program-icon-container {
  position: absolute;
  cursor: pointer;
  z-index: 21;
  background: #333;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.program-icon-container:hover {
  background: #444;
  border-color: var(--primary-accent);
}

.program-icon-container svg {
  width: 18px;
  height: 18px;
}

.bank-point {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff;
  border: 1px solid #444;
  border-radius: 50%;
  transform: translate(-50%, 50%);
  z-index: 20;
}

.bank-point.active {
  background: var(--primary-accent);
  box-shadow: 0 0 8px var(--primary-accent);
}

.bank-label-container {
  position: absolute;
  cursor: pointer;
  z-index: 21;
  background: #333;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 2px 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 24px;
  width: 24px;
}

.bank-label-container:hover {
  border-color: var(--primary-accent);
}

.zoom-btn {
  height: 32px;
  box-sizing: border-box;
  vertical-align: middle;
  width: 32px;
}

#pitch-preview-toggle-btn .icon-on {
  display: none;
}
#pitch-preview-toggle-btn .icon-off {
  display: block;
}
#pitch-preview-toggle-btn.active .icon-on {
  display: block;
}
#pitch-preview-toggle-btn.active .icon-off {
  display: none;
}

/* Text Event Editor Styles */
.text-event-row {
  height: 40px;
  border-bottom: 1px solid #333;
  position: relative;
  box-sizing: border-box;
  width: 100%;
}
.text-event-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.text-event-sidebar-row {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  font-size: 11px;
  color: #888;
  border-bottom: 1px solid #333;
  box-sizing: border-box;
  background: #222;
}

/* Sembunyikan Grid Piano Roll saat di Tab Text Events */
#piano-roll {
  height: 100%;
  min-width: 100%;
  background-repeat: repeat;
}

.test-instrument-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 10px;
}
.test-instrument-grid .test-instr-btn {
  text-align: left;
  justify-content: flex-start;
  padding: 8px 12px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #333;
  border-color: #444;
}

/* Pastikan playhead dan elemen absolut lainnya tetap berada di dalam area modal-body */
#instrument-timeline-modal .modal-body {
  padding-left: 0;
  padding-right: 0;
  position: relative;
}

.instr-timeline-row {
  display: flex;
  height: 40px;
  position: relative;
  width: -moz-max-content;
  width: max-content;
  min-width: 100%;
  padding-right: 200px;
  /* Padding lebih lebar agar tidak terpotong di akhir */
  border-bottom: 1px solid #333;
  align-items: stretch;
  /* Pastikan label mengisi seluruh tinggi baris */
  background: #1a1a1a;
}
.instr-timeline-row .instr-channel-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 100%;
  flex-shrink: 0;
  font-family: monospace;
  font-size: 11px;
  color: #888;
  text-align: center;
  border-right: 1px solid #333;
  position: sticky;
  left: 0;
  background: #1a1a1a;
  z-index: 110;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
  /* Tambahkan shadow saat scroll */
}
.instr-timeline-row .instr-lane {
  flex-grow: 1;
  position: relative;
  height: 100%;
  overflow: hidden;
  flex-shrink: 0;
}
.instr-timeline-row .instr-block {
  position: absolute;
  height: 30px;
  top: 5px;
  background: #2d5a27;
  border: 1px solid #4caf50;
  border-radius: 3px;
  font-size: 11px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #eee;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.instr-timeline-row .instr-block:hover {
  background: #3d7a34;
}

#instr-timeline-playhead {
  position: absolute;
  top: 0;
  /* Paksa tinggi 640px (16 channel x 40px) untuk override JS scrollHeight yang bernilai 0 */
  width: 2px;
  background: rgba(255, 0, 0, 0.7);
  z-index: 105;
  /* Di atas blok instrumen (0), tapi di bawah label channel (110) agar terlihat rapi saat scroll */
  pointer-events: none;
  left: 0;
}

/* Subtitle Editor Styles */
.subtitle-event-row {
  border-bottom: 1px solid #333;
  position: relative;
  box-sizing: border-box;
  width: 100%;
}

.marker, .text-marker, .subtitle-marker {
  position: absolute;
  color: white;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 10px;
  white-space: nowrap;
  cursor: move;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  top: 9px;
  height: 20px;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
}
.marker.selected, .selected.text-marker, .selected.subtitle-marker {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 5px #ffffff;
  z-index: 11;
}

.subtitle-marker {
  background: #007acc;
}
.subtitle-marker:hover {
  background: #3399ff;
}

.text-marker {
  background: #c2780e;
}
.text-marker:hover {
  background: #e67e22;
}

.subtitle-resizer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  cursor: ew-resize;
}

.hide-child > * {
  visibility: hidden;
}

#center-toggle-btn svg path,
.center-toggle-btn svg path {
  display: none;
}
#center-toggle-btn.mode-0 .icon-bar,
.center-toggle-btn.mode-0 .icon-bar {
  display: block;
  opacity: 0.5;
}
#center-toggle-btn.mode-1 .icon-bar,
.center-toggle-btn.mode-1 .icon-bar {
  display: block;
}
#center-toggle-btn.mode-1 .icon-arrow-right,
.center-toggle-btn.mode-1 .icon-arrow-right {
  display: block;
}
#center-toggle-btn.mode-2 .icon-bar,
.center-toggle-btn.mode-2 .icon-bar {
  display: block;
}
#center-toggle-btn.mode-2 .icon-arrow-left,
.center-toggle-btn.mode-2 .icon-arrow-left {
  display: block;
}
#center-toggle-btn.mode-2 .icon-arrow-right,
.center-toggle-btn.mode-2 .icon-arrow-right {
  display: block;
}

/* Styling untuk MIDI Monitor */
.midi-monitor-header {
  display: grid;
  grid-template-columns: 100px 50px 140px 80px 80px;
  font-weight: bold;
  color: #fff;
  border-bottom: 2px solid #444;
  padding-bottom: 5px;
  margin-bottom: 5px;
  padding-top: 8px;
  font-family: monospace;
  font-size: 11px;
}

.midi-monitor-list {
  display: flex;
  flex-direction: column;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  height: 166px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.midi-monitor-row {
  display: grid;
  grid-template-columns: 100px 50px 140px 80px 80px;
  padding: 3px 0;
  border-bottom: 1px solid #1a1a1a;
  color: #0f0;
  /* Default Green */
}

#midi-monitor-modal .modal-content {
  width: 475px;
}
#midi-monitor-modal .modal-content-scroll {
  flex: none;
}

#mixer-modal .modal-content {
  width: 864px !important;
}

#spatial-mixer-modal .modal-content {
  width: 580px !important;
}
#spatial-mixer-modal .modal-body {
  overflow: hidden;
}

/* Color Coding berdasarkan Tipe Pesan */
.midi-monitor-row.note-on {
  color: #66ff66;
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

.midi-monitor-row.note-off {
  color: #888;
}

.midi-monitor-row.cc {
  color: #66ccff;
}

.midi-monitor-row.pitch-bend {
  color: #ffcc66;
}

.midi-monitor-row.program-change {
  color: #ff99ff;
}

.log-time {
  color: #ccc;
  font-size: 11px;
}

.log-ch {
  color: #fff;
  font-weight: bold;
}

/* Audio to MIDI Modal Styles */
#audio-to-midi-modal .modal-body {
  overflow: hidden;
}
#audio-to-midi-modal #atm-canvas-container-outer {
  width: 100%;
  height: 300px;
  background: #000;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid #444;
  margin-bottom: 10px;
}
#audio-to-midi-modal #atm-canvas-container {
  position: relative;
  height: 100%;
  cursor: crosshair;
  min-width: 100%;
}
#audio-to-midi-modal #atm-waveform-canvas {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  opacity: 0.4;
  pointer-events: none;
}
#audio-to-midi-modal #atm-midi-canvas {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
}
#audio-to-midi-modal #atm-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: red;
  left: 0;
  pointer-events: none;
  display: none;
  z-index: 10;
}
#audio-to-midi-modal .form-group.atm-controls {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
#audio-to-midi-modal .atm-divider {
  border-left: 1px solid #555;
  height: 20px;
  margin: 0 5px;
}
#audio-to-midi-modal #atm-file-input {
  display: none;
}

#atm-notes-container {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  min-width: 100%;
  /* Ensure it can expand horizontally */
  pointer-events: none;
  /* Allow clicks to pass through to canvas for playhead/empty space */
  z-index: 5;
  /* Below playhead, above waveform */
}

.atm-note {
  position: absolute;
  box-sizing: border-box;
  border: 1px solid #fff;
  border-radius: 2px;
  pointer-events: auto;
  /* Allow interaction with notes */
  cursor: grab;
  z-index: 6;
  /* Above other notes when selected */
  transition: background-color 0.1s ease, border-color 0.1s ease;
  /* Smooth hover/selection */
  display: flex;
  /* For centering text if needed, or for resizer positioning */
  align-items: center;
  justify-content: center;
  font-size: 10px;
  /* Adjust as needed */
  color: rgba(255, 255, 255, 0.8);
  overflow: hidden;
  /* Hide overflowing text */
  white-space: nowrap;
}
.atm-note.selected {
  background-color: #ffeb3b !important;
  /* Override default color */
  border-color: #fff !important;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  cursor: grabbing;
}
.atm-note .atm-note-resizer {
  position: absolute;
  right: -4px;
  /* Extend slightly outside for easier grabbing */
  top: 0;
  bottom: 0;
  width: 8px;
  /* Wider grab area */
  cursor: ew-resize;
  background: rgba(255, 255, 255, 0.1);
  /* Subtle visual cue */
  border-radius: 0 2px 2px 0;
  opacity: 0;
  /* Hidden by default */
  transition: opacity 0.2s ease;
}
.atm-note .atm-note-resizer:hover {
  opacity: 1;
}
.atm-note:hover .atm-note-resizer {
  opacity: 1;
  /* Show resizer on note hover */
}

.selection-info-grid {
  gap: 10px 20px;
  display: flex;
  flex-direction: column;
}

.selection-info-grid .form-group {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 0;
  text-align: left;
}

.selection-info-grid .form-group:last-child {
  border-bottom: none;
}

.selection-info-grid .form-group label {
  margin-bottom: 0;
  color: #aaa;
}

.selection-info-grid .form-group div {
  font-weight: bold;
  color: #eee;
}

#mp3-export-modal .form-group-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
#mp3-export-modal .form-group-checkbox input[type=checkbox] {
  width: auto !important;
  margin: 0 !important;
}
#mp3-export-modal .form-group-checkbox label {
  margin: 0;
  cursor: pointer;
}
#mp3-export-modal #mp3-lyric-format-group {
  margin-top: 8px;
  display: none;
}
#mp3-export-modal .mp3-hint {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
}

#instrument-timeline-modal #instrument-timeline-body {
  height: 450px;
}
#instrument-timeline-modal #instr-timeline-seeker {
  flex-grow: 10;
}
#instrument-timeline-modal #intrument-master-vol {
  flex-grow: 2;
}

#rescale-modal .form-group {
  text-align: left;
}
#rescale-modal #rescale-current-bpm {
  font-weight: bold;
  margin-bottom: 10px;
  color: #4caf50;
}
#rescale-modal #rescale-factor {
  width: 100%;
}

#about-modal .about-content {
  text-align: center;
}
#about-modal .logo {
  color: var(--primary-accent);
}
#about-modal .app-title-text {
  font-size: 12px;
  color: #aaa;
  margin-top: 10px;
}
#about-modal .copyright-text {
  font-size: 11px;
  color: #888;
  margin-top: 15px;
}
#about-modal .copyright-text a {
  color: #888;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: auto;
  transform: translateY(20px);
  background: rgba(37, 37, 38, 0.95);
  color: #eee;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 13px;
  z-index: 3000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  border: 1px solid var(--primary-accent);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.sheet-music-option-item {
  display: flex;
  align-items: center;
  flex-shrink: 0; /* Mencegah item menyusut */
  white-space: nowrap; /* Mencegah teks di dalam label terbungkus */
  gap: 8px;
}

/* Sheet Music Player Styles */
#sheet-music-player-modal .modal-content {
  width: 90vw;
  max-width: 1200px;
  height: 80vh;
}

#sheet-music-player-container {
  width: 100%;
  height: calc(100% - 64px);
  box-sizing: border-box;
  overflow: auto;
  position: relative;
}

#audio-visualization-canvas {
  width: 160px;
  height: 32px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 0px;
  pointer-events: none;
  border: 1px solid #444;
  box-sizing: border-box;
}

.captcha-container {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 5px;
}

#reg-captcha-img {
  height: 30px;
  border-radius: 4px;
  border: 1px solid #444;
  cursor: pointer;
}

#ad-image {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Sheet Music Player Modal Styles */
#sheet-music-player-modal .sheet-music-controls {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
#sheet-music-player-modal .sheet-music-controls .sheet-music-label {
  font-weight: bold;
}
#sheet-music-player-modal .sheet-music-controls .sheet-music-label:not(:first-child) {
  margin-left: 10px;
}
#sheet-music-player-modal .sheet-music-controls .sheet-music-label[for=sheet-music-lyric-font-size] {
  white-space: nowrap;
}
#sheet-music-player-modal .sheet-music-controls #sheet-music-lyric-font-size {
  width: 70px;
}
#sheet-music-player-modal .modal-footer .footer-modal-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 15px;
}
#sheet-music-player-modal .modal-footer .footer-modal-controls .footer-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
#sheet-music-player-modal .modal-footer .footer-modal-controls #sheet-music-seeker {
  flex-grow: 4;
  margin: 0 10px;
}
#sheet-music-player-modal .modal-footer .footer-modal-controls .volume-label {
  font-size: 12px;
  white-space: nowrap;
}
#sheet-music-player-modal .modal-footer .footer-modal-controls #sheet-music-vol {
  width: 100px;
  cursor: pointer;
}
#sheet-music-player-modal .modal-footer .footer-modal-controls button:last-child {
  margin-left: auto;
}

/* PDF Export Modal Styles */
#pdf-export-modal .pdf-options-group {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#pdf-export-modal .pdf-option-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
#pdf-export-modal .pdf-option-item input[type=checkbox] {
  width: 16px;
  height: 16px;
}

/* --- Penyesuaian untuk Right Sidebar --- */
.editor-area.right-sidebar-open {
  grid-template-columns: 1fr 6px var(--right-sidebar-width, 300px);
}

/* Konten utama selalu di kolom pertama */
#editor-top-frame, #editor-resizer, #editor-bottom-frame {
  grid-column: 1/2; /* Konten utama selalu di kolom pertama */
}

#right-sidebar, #right-sidebar-resizer {
  display: none; /* Sembunyikan secara default */
  grid-row: 1/-1; /* Rentangkan dari baris pertama hingga terakhir */
}

.editor-area.right-sidebar-open #right-sidebar {
  display: block;
  flex-direction: column;
  background: #252526;
  background: #f5f0e6;
  border-left: 1px solid #444;
  grid-column: 3/4;
}

.editor-area.right-sidebar-open #right-sidebar-resizer {
  display: block;
  grid-column: 2/3;
}

#sheet-music-placeholder {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

#sheet-music-tools {
  display: flex;
  gap: 4px;
  padding: 4px 8px;
  background: #e9e4d8;
  border-bottom: 1px solid #dcd6c9;
  flex-shrink: 0;
}
#sheet-music-tools button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 4px;
  color: #555;
}
#sheet-music-tools button:hover {
  background: #dcd6c9;
  color: #111;
}
#sheet-music-tools button.active {
  background: #d1c9b9;
  color: #000;
}

.sheet-music-tool-divider {
  width: 1px;
  background: #dcd6c9;
  margin: 4px 8px;
}

#sheet-music-container {
  height: 100%;
  overflow: auto;
  padding: 20px 0;
  box-sizing: border-box;
}

#transpose-modal .modal-content {
  width: 540px;
}

.midi-mapping-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.midi-mapping-grid .form-group {
  display: grid;
  grid-template-columns: 1fr 80px;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.midi-mapping-grid .form-group.full-width {
  grid-column: 1/-1; /* Span across both columns */
  grid-template-columns: 1fr; /* Revert to single column layout */
}
.midi-mapping-grid .form-label {
  margin-bottom: 0;
  text-align: left;
}/*# sourceMappingURL=style.css.map */