.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-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: center;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
}
.modal-content input, .modal-content textarea {
  width: 100%;
  padding: 10px;
  background: #1e1e1e;
  border: 1px solid #444;
  color: #ffffff;
  border-radius: 4px;
  box-sizing: border-box;
  outline: none;
}
.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: 12px 20px;
}
.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;
  margin: 0;
}

.modal-body {
  padding: 0 20px;
}

.modal-footer {
  cursor: move;
  padding: 12px 20px;
  border-top: 1px solid #444;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.modal-footer button {
  flex: 1;
}

#save-song-project-select {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
  margin-top: 8px;
}

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

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

.modal-sm {
  width: 200px;
}

.modal-md {
  width: 480px;
}

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

.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;
}
.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;
  font-weight: bold;
}
.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;
}

.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);
}

/* 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;
}

/* 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;
}

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: #444;
  color: rgb(228, 228, 228);
  border: 1px solid #444;
  border-radius: 4px;
  cursor: auto;
}

/* Range Slider Styling */
input[type=range] {
  width: 80px;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}
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: 14px;
  background: var(--primary-accent);
  border-radius: 50%;
  margin-top: -5px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
input[type=range]::-moz-range-thumb {
  border: none;
  height: 14px;
  width: 14px;
  background: var(--primary-accent);
  border-radius: 50%;
}

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

.list-item {
  padding: 0px 14px 0 0;
  border-bottom: 1px solid #333;
  display: flex;
  gap: 8px;
}
.list-item span {
  flex: 1;
  padding: 10px 16px;
  cursor: pointer;
  line-height: 1;
}
.list-item:hover {
  background: #2b2b2b;
}

.lyric-table button, .list-item button {
  padding: 5px 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;
}

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

.toolbar {
  min-height: 38px;
  height: auto;
  background: #333;
  display: flex;
  align-items: center;
  padding: 2px 16px;
  flex-wrap: wrap;
  gap: 4px 10px;
  border-bottom: 1px solid #444;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.toolbar button {
  padding: 6px 6px;
  height: 32px;
  vertical-align: middle;
}
.toolbar #mode-toggle.select-mode {
  background: var(--primary-accent);
  color: white;
}
.toolbar .toolbar-item {
  margin: 2px 2px 2px 0;
  display: flex;
  align-items: center;
  gap: 2px;
}
.toolbar .toolbar-item.zoom-control {
  gap: 10px;
}
.toolbar .toolbar-item input {
  padding: 7px;
}
.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 .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-bar {
  background: #252526;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-bottom: 1px solid #333;
  z-index: 2001;
}
.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;
}
.menu-bar .menu-group {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.menu-bar .menu-group .menu-trigger {
  background: none;
  border: none;
  color: #ccc;
  font-size: 12px;
  padding: 0 10px;
  height: 100%;
  cursor: pointer;
}
.menu-bar .menu-group .menu-trigger:hover {
  background: #3c3c3c;
  color: #fff;
}
.menu-bar .menu-group .menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #252526;
  border: 1px solid #444;
  min-width: 240px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  z-index: 2100;
}
.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:hover .menu-dropdown {
  display: block;
}

.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-width);
  background: #252526;
  border-right: 1px solid #444;
  overflow-y: auto;
  display: grid;
  grid-template-rows: 1fr 6px 80px;
  overflow: hidden;
  position: relative;
}

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

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

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

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

.track-item {
  height: 30px;
  padding: 6px 16px 6px 22px;
  border-bottom: 1px solid #333;
  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.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;
  width: 6px;
  height: 43px;
  background-color: rgba(76, 175, 79, 0.3215686275);
}

.vu-level {
  height: 0px;
  background-color: #4caf50;
  bottom: 0px;
  position: absolute;
  left: 0;
  width: 6px;
}

.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;
}
.instrument-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.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;
}

.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;
}
.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: 60px;
  background: #222;
  z-index: 100;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
  display: block;
  flex-shrink: 0;
}

.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;
}

.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: 100%;
  /* Minimal selebar layar agar background grid tetap penuh */
  width: auto;
}

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

.measure-label {
  position: absolute;
  height: 100%;
  border-left: 1px solid #555;
  padding-left: 5px;
  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 {
  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, #333 1px, transparent 1px), linear-gradient(#222 1px, transparent 1px), linear-gradient(to bottom, #242424 0%, #242424 8.333%, #1a1a1a 8.333%, #1a1a1a 16.666%, #242424 16.666%, #242424 25%, #242424 25%, #242424 33.333%, #1a1a1a 33.333%, #1a1a1a 41.666%, #242424 41.666%, #242424 50%, #1a1a1a 50%, #1a1a1a 58.333%, #242424 58.333%, #242424 66.666%, #242424 66.666%, #242424 75%, #1a1a1a 75%, #1a1a1a 83.333%, #242424 83.333%, #242424 91.666%, #1a1a1a 91.666%, #1a1a1a 100%), linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 256px 100%, 64px 100%, 100% var(--note-height), 100% calc(var(--note-height) * 12), 100% 25%;
  /* membagi jadi 4 bagian */
}

.note {
  position: absolute;
  background: #439c46;
  border: 1px solid #33b33a;
  cursor: move;
  min-width: 10px;
  display: flex;
  height: calc(var(--note-height) - 2px);
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: white;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.note.selected {
  background: #DF7273;
  border: 1px solid #EE8081;
  color: white;
  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: 5px;
  height: 100%;
  cursor: ew-resize;
  background: transparent;
}

#time-display {
  display: inline-block;
  width: 90px;
  font-size: 14px;
}

#playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 0, 0, 0.7);
  z-index: 95;
  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: #555;
}

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

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

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

.lyric-modal-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
}

.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: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #4caf50;
  /* Warna hijau agar kontras */
  padding: 10px 30px;
  border-radius: 25px;
  font-size: 28px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  z-index: 1000;
  pointer-events: none;
  /* Agar tidak menghalangi klik pada editor */
  border: 1px solid rgba(76, 175, 80, 0.3);
  min-width: 200px;
  text-align: center;
  min-height: 34px;
}

.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: 120px;
  margin-top: 5px;
}

@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;
  margin-left: 4px;
}
.track-ms-btns button {
  margin-left: 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;
}

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

/* 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;
  color: white;
  border: 1px solid #555;
  margin-left: 4px;
}

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

#instrument-icon-preview {
  margin: 15px 0;
  font-size: 48px;
  color: #4caf50;
  display: flex;
  justify-content: center;
}

#lyric-modal .modal-content {
  width: 600px;
}

#tempo-modal .modal-body .modal-subtitle {
  font-size: 11px;
  margin-bottom: 10px;
  color: #aaa;
}
#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-canvas-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;
}

#generator-modal .modal-content {
  width: 350px;
}
#generator-modal .modal-body {
  text-align: left;
  padding: 15px 20px;
}
#generator-modal .form-group {
  margin-bottom: 15px;
}
#generator-modal .form-group label {
  display: block;
  font-size: 12px;
  color: #aaa;
  margin-bottom: 5px;
}
#generator-modal .form-group select {
  width: 100%;
}

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

#instrument-modal .modal-content {
  width: 320px;
}
#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;
}

#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: grid;
  grid-template-rows: 36px 1fr;
  min-height: 50px;
  min-width: 0;
  /* Menghindari masalah yang sama pada panel parameter bawah */
}

.bottom-tabs-header {
  display: flex;
  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;
  display: flex;
  overflow: hidden;
  /* 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: #888;
  cursor: pointer;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 0;
}
#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: hidden;
}
#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: 10px;
  flex-direction: column-reverse; /* Senar rendah di bawah */
}
.guitar-neck .guitar-string {
  display: flex;
  flex-direction: row-reverse; /* Fret 0 di kanan (makin ke kanan makin rendah) */
  height: 20px;
  border-bottom: 1px solid #5d4037;
  position: relative;
}
.guitar-neck .guitar-string::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: #bdbdbd;
  pointer-events: none;
}
.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);
}

#drum-pad-container {
  margin-top: 10px;
}
#drum-pad-container .drum-pad-btn {
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 4px;
  width: 80px;
  height: 80px;
  display: inline-block;
  cursor: pointer;
  text-align: center;
  transition: background 0.01s, transform 0.05s, color 0.008s;
  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: 40px;
  margin-bottom: 8px;
  text-align: center;
}
#drum-pad-container .drum-pad-btn .pad-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  display: inline-block;
}
#drum-pad-container .drum-pad-btn .pad-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
#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);
}
#drum-pad-container .drum-pad-btn:active {
  background: #4caf50;
  color: #fff;
  transform: scale(0.95);
  border-color: #4caf50;
}

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

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

#bottom-canvas-container {
  position: relative;
  height: 100%;
  transform: translateX(-2px);
}

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

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

.pan-point, .pitch-bend-point {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #a9ddff;
  border: 2px solid var(--primary-accent);
  border-radius: 50%;
  transform: translate(-50%, 50%);
  z-index: 10;
  cursor: crosshair;
}
.pan-point:hover, .pitch-bend-point:hover, .pan-point.active, .active.pitch-bend-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;
}

/* 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: 8px;
  font-size: 10px;
  color: #888;
  transform: translateY(50%);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

#bottom-canvas-container {
  background-image: linear-gradient(90deg, #444 2px, transparent 2px), linear-gradient(90deg, #2a2a2a 1px, transparent 1px);
  background-size: 256px 100%, 64px 100%;
}

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

#precise-tempo-input {
  width: 65px;
  margin: 0;
  padding: 4px;
}

.progress-bar-container {
  width: 200px;
  height: 5px;
  background: #ccc;
  overflow: hidden;
}

.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;
}/*# sourceMappingURL=style.css.map */