@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  background: #151525;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: rgba(21, 21, 37, 0.88);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  /* Ensure menu bar stays above GL overlay (z-index ~1004) but below modals (2000) */
  z-index: 1100;
  border-bottom: 1px dotted #ffa800;
}

.second-top-bar {
    position: fixed;
    top: 50px;
    left: 0;
    width: 100%;
    height: 50px;
    background: rgba(21, 21, 37, 0.88);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    /* Keep second bar just under main top bar but above GL overlay */
    z-index: 1099;
    display: flex;
    flex-direction: column;
}
.second-top-bar.collapsed {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.icons-wrapper {
    flex-grow: 1;
    overflow-y: scroll;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-gutter: stable both-edges;
}
  
.icons-wrapper.collapsed {
  height: 0;
  border-bottom: none;
}

.icons-wrapper::-webkit-scrollbar {
    width: 8px;
    background-color: transparent;
}
  
.icons-wrapper::-webkit-scrollbar-thumb {
    background-color: rgba(255, 168, 0, 0.6);
    border-radius: 4px;
}
  
.icons-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 168, 0, 0.8);
}

.icons-container {
    display: flex;
    flex-wrap: wrap;
    padding: 4px 4px 0 4px;
    gap: 4px;
    align-content: flex-start;
}
.icons-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background-color: transparent;
}
.icons-container::-webkit-scrollbar-thumb {
  background-color: rgba(255, 168, 0, 0.6);
  border-radius: 4px;
}
.icons-container::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 168, 0, 0.8);
}

.separator {
    height: 1px;
    border-bottom: 1px dotted #ffa800;
}
  
.pull-tab {
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    height: 16px;
    background: #ffa800;
    opacity: 0.8;
    border: 1px dotted #151525;
    border-top: none;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    cursor: ns-resize;
    width: 40px;
}
  
.pull-tab:hover {
    background: #ff0000;
}

.icons-container .icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  background: #ffa800;
  border-radius: 4px;
}

.second-bar-toggle {
  position: absolute;
  top: 9px; 
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 16px;
  background: #ffa800;
  opacity: 0.8;
  border: 1px dotted #151525;
  border-top: none;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  cursor: pointer;
  z-index: 3;
  transition: background 0.3s ease;
  padding: 0;
  box-sizing: border-box;
}
.second-bar-toggle:hover {
  background: #ff0000;
}

.second-bar-toggle .toggle-line {
  position: absolute;
  left: 50%;
  width: 60%;
  height: 1px;
  background-color: #151525;
  transform: translateX(-50%);
}
.second-bar-toggle .toggle-line:nth-child(1) {
  top: 4px;
}
.second-bar-toggle .toggle-line:nth-child(2) {
  top: 7px;
}
.second-bar-toggle .toggle-line:nth-child(3) {
  top: 10px;
}

.controls-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.right-controls {
    display: flex;
    align-items: center;
    margin-right: 36px;
}

#playPauseBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
}
.pp {
    position: relative;
    width: 20px;
    height: 20px;
    transition: all 0.5s ease-in-out;
}
.pp::before,
.pp::after,
.pp span {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background-color: #ffa800;
    transform-origin: center;
    transition: all 0.5s ease-in-out;
}
.pp::before {
    transform: translate(-50%, -275%) rotate(30deg);
}
.pp::after {
    transform: translate(-50%, 175%) rotate(-30deg);
}
.pp span {
    transform: translate(-90%, -50%) rotate(90deg);
}
.pp:hover::before,
.pp:hover::after,
.pp:hover span {
    filter: drop-shadow(0 0 10px #ffa800);
}
.pp.open::before {
    transform: translate(-75%, -50%) rotate(270deg) ;
}
.pp.open::after {
    transform: translate(-25%, -50%) rotate(90deg);
}
.pp.open span {
    transform: translate(-25%, -50%) rotate(90deg);
}
.pp.open::before,
.pp.open::after,
.pp.open span {
    background-color: #ff0000;
}
.pp.open:hover::before,
.pp.open::after,
.pp.open span {
    filter: drop-shadow(0 0 10px #ff0000);
}

.stop-button:hover .stop span {
    filter: drop-shadow(0 0 10px #ff0000);
}
.menu-container {
    position: relative;
}

.stop-button {
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stop {
    position: absolute;
    width: 20px;
    height: 20px;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stop span {
    position: absolute;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background-color: #ffa800;
    transition: all 0.2s ease-in-out;
    pointer-events: none;
}

.stop span:nth-child(1) {
    top: 0.5%;
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
}

.stop span:nth-child(2) {
    top: 50.5%;
    right: 46%;
    transform: translateY(-50%) rotate(90deg);
}

.stop span:nth-child(3) {
    bottom: -1%;
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
}

.stop span:nth-child(4) {
    top: 50.5%;
    left: 46%;
    transform: translateY(-50%) rotate(90deg);
}

.stop-button:hover .stop span {
    background-color: #ff0000;
}

.stop-button:hover .stop span:nth-child(1) {
    top: 45%;
    left: 0%;
    transform: rotate(45deg);
}

.stop-button:hover .stop span:nth-child(2) {
    top: 45%;
    left: 0%;
    transform: rotate(-45deg);
}

.stop-button:hover .stop span:nth-child(3) {
    top: 45%;
    left: 0%;
    transform: rotate(45deg);
}

.stop-button:hover .stop span:nth-child(4) {
    top: 45%;
    left: 0%;
    transform:  rotate(-45deg);
}

.stop-button:hover .stop span {
    filter: drop-shadow(0 0 10px #ff0000);
}

.dropdown-button {
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plusminus {
    position: relative;
    width: 20px;
    height: 20px;
}

.plusminus::before,
.plusminus::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background-color: #ffa800;
    transform-origin: center;
    transition: all 0.5s ease-in-out;
}

.plusminus::before {
    transform: translate(-50%, -50%) rotate(270deg);
}

.plusminus::after {
    transform: translate(-50%, -50%) rotate(180deg);
}

.plusminus:hover::before,
.plusminus:hover::after {
    filter: drop-shadow(0 0 10px #ffa800);
}

.plusminus.open::before {
    transform: translate(-50%, -50%) rotate(0deg);
    background-color: #ff0000;
}

.plusminus.open::after {
    transform: translate(-50%, -50%) rotate(0deg);
    background-color: #ff0000;
}

.plusminus.open:hover::before,
.plusminus.open:hover::after {
    filter: drop-shadow(0 0 10px #ff0000);
}

.widget {
    position: absolute;
    top: 35px;
    right: -16px;
    background: rgba(21, 21, 37, 0.88);
    border-bottom-left-radius: 5px;
    border-left: 1px dotted #ffa800;
    border-bottom: 1px dotted #ffa800;
    padding: 20px;
    min-width: 250px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    color: #ffa800;
    transform-origin: top center;
    transform: scaleY(0);
    opacity: 0;
    transition: all 0.3s ease-out;
    visibility: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 168, 0, 0.6) transparent;
}

.widget::-webkit-scrollbar {
    width: 8px;
    background-color: transparent;
}

.widget::-webkit-scrollbar-thumb {
    background-color: rgba(255, 168, 0, 0.6);
    border-radius: 4px;
}

.widget::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 168, 0, 0.8);
}

.widget.open {
    transform: scaleY(1);
    opacity: 1;
    visibility: visible;
}

.slider-container {
    margin-bottom: 15px;
}

.slider-container label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
}

.slider-container input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 2px;
    background: #ffa800;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: #ffa800;
    cursor: pointer;
    border-radius: 50%;
}

.menu-item {
    color: #ffa800;
    padding: 8px;
    cursor: pointer;
}

.menu-item:hover {
    background: rgba(255, 168, 0, 0.2);
}

#volumeSlider {
    -webkit-appearance: none;
    width: 100px;
    height: 2px;
    border-radius: 2px;
    background: #ffa800;
    outline: none;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #ffa800;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 168, 0, 0.7);
    transition: all 0.2s ease-in-out;
    touch-action: manipulation;
}

#volumeSlider::-webkit-slider-thumb:active,
#volumeSlider::-webkit-slider-thumb:hover {
    background: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

#volumeSlider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ffa800;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 168, 0, 0.7);
    transition: all 0.2s ease-in-out;
    border: none;
    touch-action: manipulation;
}

#volumeSlider::-moz-range-thumb:active,
#volumeSlider::-moz-range-thumb:hover {
    background: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

#volumeSlider::-webkit-slider-thumb:focus,
#volumeSlider::-webkit-slider-thumb:focus-visible {
    background: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

@media (hover: none) {
    #volumeSlider::-webkit-slider-thumb:active {
        background: #ff0000 !important;
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.7) !important;
    }
    
    #volumeSlider::-moz-range-thumb:active {
        background: #ff0000 !important;
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.7) !important;
    }
}

#volumeSlider.active::-webkit-slider-thumb {
    background: #ff0000 !important;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.7) !important;
}

#volumeSlider.active::-moz-range-thumb {
    background: #ff0000 !important;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.7) !important;
}

.module-zone {
    display: flex;
    align-items: center;
}

.myspaceapp {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: transparent;
}

.right-bar {
    position: fixed;
    top: 50px;
    right: 0;
    width: 300px;
    height: calc(100% - 50px);
    background-color: #f1f1f1;
    border-left: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
    overflow-y: auto;
    display: none;
}

.note-details h3 {
    margin-top: 0;
}

.measure-bars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.measure-bar {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    border-left: 1px dashed rgba(255, 255, 255, 0.5);
    transform-origin: left;
    will-change: transform;
}

.measure-bar.secondary-bar {
    border-left: 1px solid rgba(255, 255, 255, 0.7);
    width: 1px;
    height: 100%;
}

.measure-bar.secondary-bar.start-bar {
    border-left-width: 2px;
}

.measure-bar.secondary-bar.end-bar {
    border-left-width: 2px;
}

.playhead {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background-color: #ffa800;
    box-shadow: 
        0 0 5px #ffa800,
        0 0 10px #ffa800,
        0 0 15px #ffa800;
    transform-origin: left;
    will-change: transform;
    pointer-events: none;
    z-index: 1002;
}

.tracking-zone {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 16px;
    color: #ffa800;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: #ffa800;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 168, 0, 0.7);
}

input:checked + .toggle-slider {
    background-color: #333;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background-color: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

.tempo-container {
    display: flex;
    align-items: center;
}

.tempo-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: space-between;
}

.tempo-input-group label {
    color: #ffa800;
    white-space: nowrap;
    font-size: 14px;
    margin-top: 4px;
    line-height: 1;
    display: flex;
    align-items: center;
}

#tempo-input {
    width: 60px;
    background: rgba(255, 168, 0, 0.1);
    border: 1px solid #ffa800;
    color: #ffa800;
    padding: 4px 8px;
    border-radius: 4px;
    outline: none;
}

#tempo-input::-webkit-inner-spin-button {
    appearance: none;
    background: transparent;
    cursor: pointer;
    display: block;
    color: #ffa800;
    opacity: 1;
}

#tempo-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
    opacity: 1;
}

#tempo-input[type='number'] {
    -moz-appearance: textfield;
}

#tempo-input:focus {
    box-shadow: 0 0 5px rgba(255, 168, 0, 0.5);
}

#tempo-submit {
    background: #ffa800;
    color: #151525;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#tempo-submit:hover {
    background: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

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

.frequency-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: space-between;
}

.frequency-input-group label {
    color: #ffa800;
    white-space: nowrap;
    font-size: 14px;
    margin-top: 4px;
    line-height: 1;
    display: flex;
    align-items: center;
}

#frequency-input {
    width: 60px;
    background: rgba(255, 168, 0, 0.1);
    border: 1px solid #ffa800;
    color: #ffa800;
    padding: 4px 8px;
    border-radius: 4px;
    outline: none;
}

#frequency-input::-webkit-inner-spin-button {
    appearance: none;
    background: transparent;
    cursor: pointer;
    display: block;
    color: #ffa800;
    opacity: 1;
}

#frequency-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
    opacity: 1;
}

#frequency-input[type='number'] {
    -moz-appearance: textfield;
}

#frequency-input:focus {
    box-shadow: 0 0 5px rgba(255, 168, 0, 0.5);
}

#frequency-submit {
    background: #ffa800;
    color: #151525;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#frequency-submit:hover {
    background: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    filter: sepia(100%) hue-rotate(5deg) saturate(500%);
    opacity: 1;
}

input[type="number"]::-webkit-inner-spin-button:hover,
input[type="number"]::-webkit-outer-spin-button:hover {
    filter: sepia(100%) hue-rotate(-50deg) saturate(700%);
}

.input-button-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.widget-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dotted rgba(255, 168, 0, 0.3);
}

.support-section {
    text-align: center;
    margin-bottom: 15px;
}

.support-section p {
    color: #ffa800;
    margin: 0 0 10px 0;
    font-size: 14px;
}

.donate-button {
    display: inline-block;
    background: #ffa800;
    color: #151525;
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.donate-button:hover {
    background: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.info-section {
    text-align: center;
    margin-bottom: 15px;
}

.info-link {
    color: #ffa800;
    text-decoration: none;
    font-size: 14px;
}

.info-link b {
    transition: color 0.3s ease;
}

.info-link:hover b {
    color: #ff0000;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.legal-section {
    text-align: center;
    margin-bottom: 15px;
}

.license-link {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px dotted rgba(255, 168, 0, 0.8);
    color: #ffa800;
    text-decoration: none;
    background: rgba(21, 21, 37, 0.2);
    transition: all 0.3s ease;
}

.license-link:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.license-link:focus-visible {
    outline: 2px solid #ffa800;
    outline-offset: 2px;
}

.widget-copyright {
    text-align: center;
    color: rgba(255, 168, 0, 0.5);
    font-size: 12px;
    margin-top: 15px;
}

.note-rect {
    cursor: pointer;
}

.note-rect .note-content > div,
.base-note-fraction {
    font-family: 'Roboto Mono', 'IBM Plex Mono', monospace;
    font-weight: 400;
}

.note-rect .note-content > div {
    font-size: 8px;
    color: white;
    text-shadow: 0 0 1px black;
}

.base-note-fraction {
    color: white;
    font-size: 12px;
    text-align: center;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.fraction-numerator,
.fraction-denominator {
    line-height: 1;
}

.fraction-line {
    width: 100%;
    height: 1px;
    background-color: white;
    margin: 2px 0;
}

.base-note-circle {
    position: absolute;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ffa800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    overflow: hidden;
}

.note-widget {
    position: fixed;
    bottom: 19px;
    left: 19px;
    background: rgba(21, 21, 37, 0.88);
    backdrop-filter: blur(5px);
    border: 1px dotted #ffa800;
    border-radius: 5px;
    width: 300px;
    overflow: hidden;
    box-sizing: border-box;
    /* Above menu bars (1100/1099) and GL, but below global modals (2000) */
    z-index: 1200;
    display: none;
    color: #ffa800;
    font-family: 'Roboto Mono', monospace;
}

.note-widget.visible {
    display: block;
}

.note-widget-header {
    padding: 10px;
    border-bottom: 1px dotted #ffa800;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.note-widget-title {
    font-weight: bold;
}

.note-widget-close {
    background: none;
    border: none;
    color: #ffa800;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
}

.note-widget-close:hover {
    color: #ff0000;
}

.note-widget-content {
    padding: 15px;
    overflow-y: auto;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 168, 0, 0.6) transparent;
}

.note-widget-content::-webkit-scrollbar {
    width: 8px;
    background-color: transparent;
}

.note-widget-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 168, 0, 0.6);
    border-radius: 4px;
}

.note-widget-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 168, 0, 0.8);
}

.variable-row {
    margin-bottom: 15px;
    padding: 8px;
    border-bottom: 1px dotted rgba(255, 168, 0, 0.3);
    background: rgba(255, 168, 0, 0.05);
    border-radius: 4px;
}

.variable-name {
    font-weight: bold;
    color: #ffa800;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
}

.variable-value {
    font-family: 'Roboto Mono', monospace;
    word-break: break-word;
    overflow-wrap: anywhere;
    color: rgba(255, 168, 0, 0.8);
    padding-left: 10px;
}

.evaluated-value, .raw-value {
    margin: 5px 0;
    padding: 4px 0;
}

.value-label {
    color: rgba(255, 168, 0, 0.6);
    font-size: 0.9em;
    margin-right: 8px;
    font-weight: bold;
}

.raw-value {
    margin-top: 8px;
    padding-top: 8px;
}

.raw-value-input {
    display: block;
    width: 100%;
    background: rgba(255, 168, 0, 0.1);
    border: 1px solid rgba(255, 168, 0, 0.3);
    color: #ffa800;
    font-family: 'Roboto Mono', monospace;
    padding: 8px;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 5px;
}

.raw-value-input:focus {
    outline: none;
    border-color: #ffa800;
    box-shadow: 0 0 5px rgba(255, 168, 0, 0.3);
}

.raw-value-save {
    display: block;
    width: 100%;
    background: #ffa800;
    color: #151525;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.raw-value-save:hover {
    background: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.note-rect .note-content.selected {
    border-color: #ffc850 !important;
    box-shadow: 0 0 5px #ffa800, 0 0 10px #ffa800, 0 0 15px #ffa800 !important;
}

.base-note-circle.selected {
    border-color: white !important;
    box-shadow: 0 0 5px #ffa800, 0 0 10px #ffa800, 0 0 15px #ffa800 !important;
}

.success-message {
    color: #00ff00;
    font-size: 0.9em;
    margin-top: 4px;
}

.error-message {
    color: #ff0000;
    font-size: 0.9em;
    margin-top: 4px;
}

.widget-title {
    color: #ffa800;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 168, 0, 0.3);
}

.measure-bar-triangle {
    position: fixed;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 30px solid rgba(51, 51, 51, 0.7);
    cursor: pointer;
    margin-left: -15px;
    z-index: 2;
    pointer-events: auto;
    transition: filter 0.3s ease;
    transform: translateX(0);
}

.measure-bar-triangle:hover,
.measure-bar-triangle.selected {
    filter: drop-shadow(0 0 5px #ffa800);
    transition: filter 0.3s ease;
}

.measure-id {
    position: absolute;
    bottom: -27px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffa800;
    font-size: 10px;
    white-space: nowrap;
}

#measureBarTrianglesContainer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    pointer-events: none;
    z-index: 2;
    transform: translateX(0.5px);
}

.menu-actions {
    padding: 15px;
}

.module-action-btn {
    width: 100%;
    background: #ffa800;
    color: #151525;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.module-action-btn:hover {
    background: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.note-content.dependency {
    box-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff, 0 0 15px #00ffff !important;
}

.note-content.dependent {
    box-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000, 0 0 15px #ff0000 !important;
}

.base-note-circle.dependency {
    box-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff, 0 0 15px #00ffff !important;
}

.measure-bar-triangle.dependency {
    filter: drop-shadow(0 0 5px #00ffff) drop-shadow(0 0 10px #00ffff);
    transition: filter 0.3s ease;
}

.measure-bar-triangle.dependent {
    filter: drop-shadow(0 0 5px #ff0000) drop-shadow(0 0 10px #ff0000);
    transition: filter 0.3s ease;
}

.delete-note-row {
    margin-bottom: 15px;
    padding: 8px;
    background: rgba(255, 168, 0, 0.05);
    border-radius: 4px;
    border-top: 2px solid #ff0000;
}

.delete-note-header {
    font-size: 14px;
    font-weight: bold;
    color: #ff0000;
    margin-bottom: 8px;
}

.delete-note-btn {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.delete-note-btn:hover {
    opacity: 0.9;
}

.delete-note-btn.keep-dependencies {
    background-color: #00ffff;
}

.delete-note-btn.delete-dependencies {
    background-color: #ff0000;
}

.delete-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(21, 21, 37, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.delete-confirm-modal {
    background-color: rgba(21, 21, 37, 0.88);
    border: 1px dotted #ffa800;
    border-radius: 5px;
    padding: 20px;
    max-width: 300px;
    width: 90%;
    text-align: center;
    font-family: 'Roboto Mono', monospace;
    color: #ffa800;
    box-shadow: 0 0 10px rgba(255, 168, 0, 0.7);
}

.delete-confirm-modal p {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.4;
}

.evaluate-note-btn.liberate-dependencies {
    background-color: #00ccff;
    color: #151525;
    margin-bottom: 8px;
}

.evaluate-note-btn.liberate-dependencies:hover {
    background-color: #00a3cc;
}

.modal-note-id {
    color: #ff0000;
}

.modal-delete-all {
    color: #ff0000;
}

.modal-keep {
    color: #add8e6;
}

.modal-btn-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.delete-confirm-modal button {
    cursor: pointer;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.delete-confirm-modal button:first-child {
    background-color: #ff0000;
    color: #fff;
}

.delete-confirm-modal button:first-child:hover {
    background-color: #cc0000;
}

.delete-confirm-modal button:last-child {
    background-color: #add8e6;
    color: #000;
}

.delete-confirm-modal button:last-child:hover {
    background-color: #8bbad7;
}

#resetViewBtn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    position: relative;
    cursor: pointer;
    outline: none;
    margin-right: 16px;
  }
  
  #resetViewBtn .center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background-color: #ffa800;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: background-color 0.3s ease;
  }
  
  #resetViewBtn .arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    transition: all 0.3s ease;
  }
  
  #resetViewBtn .arrow.top {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px 4px 0 4px;
    border-color: #ffa800 transparent transparent transparent;
  }
  
  #resetViewBtn .arrow.bottom {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 4px 4px 4px;
    border-color: transparent transparent #ffa800 transparent;
  }
  
  #resetViewBtn .arrow.left {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    border-width: 4px 0 4px 4px;
    border-color: transparent transparent transparent #ffa800;
  }
  
  #resetViewBtn .arrow.right {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border-width: 4px 4px 4px 0;
    border-color: transparent #ffa800 transparent transparent;
  }
  
  #resetViewBtn:hover .center-circle {
    background-color: #ff0000;
  }
  
  #resetViewBtn:hover .arrow.top {
    border-top-color: #ff0000;
    transform: translateX(-50%) translateY(6px);
  }
  
  #resetViewBtn:hover .arrow.bottom {
    border-bottom-color: #ff0000;
    transform: translateX(-50%) translateY(-6px);
  }
  
  #resetViewBtn:hover .arrow.left {
    border-left-color: #ff0000;
    transform: translateY(-50%) translateX(6px);
  }
  
  #resetViewBtn:hover .arrow.right {
    border-right-color: #ff0000;
    transform: translateY(-50%) translateX(-6px);
  }

  .buttonsContainer div {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

.evaluate-note-row {
    margin-bottom: 15px;
    padding: 8px;
    background: rgba(255, 168, 0, 0.05);
    border-radius: 4px;
    border-top: 2px solid #00ffff;
}

.evaluate-note-header {
    font-size: 14px;
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 8px;
}

.evaluate-note-btn {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 14px;
    cursor: pointer;
    background-color: #00ffff;
    color: #151525;
    transition: background-color 0.3s ease;
}

.evaluate-note-btn:hover {
    background-color: #00cccc;
}

.scale-controls {
    position: fixed;
    bottom: 11px;
    left: 10px;
    z-index: 1150;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    width: 150px;
    height: 170px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.scale-controls.visible {
    opacity: 1;
}

.y-scale-slider-container {
    position: absolute;
    height: 150px;
    width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    bottom: 11px;
    left: 1px;
    transform: scaleY(0);
    transform-origin: bottom center;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.x-scale-slider-container {
    position: absolute;
    width: 150px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    bottom: 1px;
    left: 20px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.scale-controls.visible .y-scale-slider-container {
    transform: scaleY(1);
}

.scale-controls.visible .x-scale-slider-container {
    transform: scaleX(1);
}

.y-scale-slider-container input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 150px;
    height: 1px;
    background: rgba(255, 168, 0, 0.7);
    outline: none;
    transform: rotate(-90deg);
    transform-origin: center;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    transition-delay: 0.3s;
}

.x-scale-slider-container input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 150px;
    height: 1px;
    background: rgba(255, 168, 0, 0.7);
    outline: none;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    transition-delay: 0.3s;
}

.scale-controls.visible input[type="range"] {
    opacity: 1;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border: 1px solid #ffa800;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 168, 0, 0.5);
    transition: background 0.3s ease;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ffa800;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 168, 0, 0.5);
    transition: background 0.3s ease;
    border: none;
}

input[type="range"]:hover::-webkit-slider-thumb {
    background: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

input[type="range"]:hover::-moz-range-thumb {
    background: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

input[type="range"]:active::-webkit-slider-thumb {
    background: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.9);
}

input[type="range"]:active::-moz-range-thumb {
    background: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.9);
}

.y-scale-slider-container::before {
    content: 'Y';
    position: absolute;
    top: -10px;
    left: 11px;
    color: #ffa800;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    transition-delay: 0.4s;
}

.x-scale-slider-container::before {
    content: 'X';
    position: absolute;
    bottom: 6px;
    right: -10px;
    color: #ffa800;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    transition-delay: 0.4s;
}

.scale-controls.visible .y-scale-slider-container::before,
.scale-controls.visible .x-scale-slider-container::before {
    opacity: 1;
}

.scale-controls-toggle {
    position: fixed;
    bottom: 20px;  
    left: 20px;    
    width: 12px;
    height: 12px;
    background-color: #ffa800;
    border-radius: 50%;
    z-index: 1150;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.scale-controls-toggle:hover {
    background-color: #ff0000;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

.scale-controls-toggle.active {
    background-color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.9);
}

.octave-indicators-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.octave-indicator {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    border-top: 1px dotted rgba(255, 168, 0, 0.3);
    pointer-events: none;
}

.octave-indicator.reference-octave {
    border-top: 1px dotted rgba(255, 168, 0, 0.7);
}

.octave-label {
    position: absolute;
    left: 10px;
    top: -10px;
    color: rgba(255, 168, 0, 0.7);
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    background-color: rgba(21, 21, 37, 0.7);
    padding: 2px 5px;
    border-radius: 3px;
}

.octave-indicator.reference-octave .octave-label {
    color: rgba(255, 168, 0, 1);
    font-weight: bold;
}

.resize-handle-icon {
    transition: background-color 0.3s ease;
}
  
.note-rect:hover .resize-handle-icon {
    background: rgba(255, 255, 255, 0.9);
}
  
.note-rect.resizing {
    outline: 2px dashed #ffa800;
}

.resize-ghost-note {
    transition: all 0.1s ease-out;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.resize-ghost-arrow {
    transition: all 0.1s ease-out;
    opacity: 0.7;
}

.lock-button {
    position: fixed;
    bottom: 20px;
    right: 11px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    pointer-events: none;
    z-index: 1150;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lock-icon {
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
}

.lock-body {
    fill: #f00;
    transition: fill 0.3s ease 0s, stroke 0.3s ease 0s;
    transform-origin: bottom center;
}

.lock-shackle-group {
    transition: transform 0.3s ease;
    transform-origin: 50% 40%;
}

.lock-shackle {
    fill: none;
    stroke: #f00;
    stroke-width: 4;
    transition: transform 0.3s ease, stroke 0.3s ease;
    transform-origin: 19px 16px;
}

.lock-icon:hover .lock-body {
    fill: #ffa800;
    stroke: #ffa800;
}

.lock-icon:hover .lock-shackle {
    stroke: #ffa800;
}

.lock-button.locked .lock-shackle-group {
    transition-delay: 0.3s;
    transform: translateY(0);
}

.lock-button.locked .lock-shackle {
    transition-delay: 0s, 0s;
    transform: rotateY(0deg);
    stroke: #f00;
}

.lock-button.locked .lock-body {
    fill: #f00;
    stroke: #f00;
}

.lock-button:not(.locked) .lock-shackle-group {
    transition-delay: 0s;
    transform: translateY(-6px);
}

.lock-button:not(.locked) .lock-shackle {
    transition-delay: 0.3s, 0s;
    transform: rotateY(180deg);
    stroke: #ffa800;
}

.lock-button:not(.locked) .lock-body {
    fill: #ffa800;
    stroke: #ffa800;
}

.lock-button.locked .lock-icon:hover .lock-body {
    fill: #ffa800;
    stroke: #ffa800;
}

.lock-button.locked .lock-icon:hover .lock-shackle {
    stroke: #ffa800;
}

.lock-button:not(.locked) .lock-icon:hover .lock-body {
    fill: #f00;
    stroke: #f00;
}

.lock-button:not(.locked) .lock-icon:hover .lock-shackle {
    stroke: #f00;
}
