/* MY RAD SET - Instrument Panel & Audio Styles */
/* ============================================== */

/* ============ TOOLBAR DROPDOWN FIXES ============ */

/* Fix for toolbar dropdowns - ensure they appear above everything */
#perfRootNote,
#perfScaleType,
#bassStringCount {
    position: relative !important;
    z-index: 9999 !important;
    background: #1a1a1a !important;
    color: #ffffff !important;
    border: 2px solid #333 !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    cursor: pointer !important;
}

/* BASS DROPDOWN DISABLE - Match other disabled styling */
#bassStringCount {
    opacity: 0.3 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    background: #1a1a1a !important;
    color: #666 !important;
    border: 2px solid #333 !important;
}

/* Only enable when bass tab is active */
.instrument-tab.active[onclick*="bass"] ~ select#bassStringCount {
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    background: #1a1a1a !important;
    color: #ffffff !important;
    border: 2px solid #333 !important;
}

#perfRootNote:focus,
#perfScaleType:focus,
#bassStringCount:focus {
    outline: none !important;
    border-color: #00d9ff !important;
    z-index: 10000 !important;
}

/* Ensure dropdown options appear correctly */
#perfRootNote option,
#perfScaleType option,
#bassStringCount option {
    background: #1a1a1a !important;
    color: #ffffff !important;
    border: none !important;
    padding: 8px !important;
}

/* CRITICAL FIX: Make sure the container allows dropdowns to overflow */
.instrument-section {
    overflow: visible !important;
    contain: none !important;
}

.instrument-section > div:first-child {
    overflow: visible !important;
    position: relative !important;
    z-index: 8000 !important;
}

/* Additional fix for the toolbar container */
.instrument-section > div[style*="display: flex"] {
    overflow: visible !important;
    position: relative !important;
    z-index: 8000 !important;
}

/* ============ INSTRUMENT SECTION ============ */

.instrument-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    padding: 10px;
    border-radius: 12px 12px 0 0;
    border: 2px solid #333;
    border-bottom: none;
    transition: transform 0.3s ease;
    z-index: 1000;
    max-height: 65vh;
    overflow: visible !important;
    touch-action: pan-y;
    contain: none !important;
}

.instrument-section > div {
    box-sizing: border-box;
    overflow: visible !important;
    position: relative !important;
    z-index: 8000 !important;
}

.instrument-section.collapsed {
    transform: translateY(calc(100% - 60px));
}

@media (max-width: 1200px) {
    .instrument-section.collapsed {
        transform: translateY(calc(100% - 60px));
    }
}

.instrument-section.collapsed .instrument-content {
    max-height: 100px; /* Show some content */
    opacity: 1;
    overflow: hidden;
}

.instrument-section h3 {
    font-size: 18px;
    color: #888;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    user-select: none;
}

.instrument-content {
    touch-action: pan-y;
    max-height: calc(65vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* ============ INSTRUMENT TABS ============ */

.instrument-tab {
    background: #2a2a2a;
    color: #ffffff;
    border: 2px solid #333;
    padding: 5px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.instrument-tab:hover {
    border-color: #00d9ff;
    background: #333;
}

.instrument-tab.active {
    background: #00d9ff;
    border-color: #00d9ff;
    color: #000;
}

.instrument-container {
    display: none;
}

.instrument-container.active {
    display: block;
}

/* ============ CONSISTENT INSTRUMENT HEIGHTS ============ */

.fretboard-container,
.piano-container {
    margin-top: 20px;
    margin-bottom: 20px;
}

#tunerContainer,
#recordContainer {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* ============ TUNER GRID LAYOUT ============ */

.tuner-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.tuner-box {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    transition: all 0.3s ease;
}

.tuner-box:hover {
    border-color: #00d9ff;
}

.tuner-meter-box {
    padding: 10px;
}

/* ============ FRETBOARD ============ */

.fretboard-container {
    background: #2a2420;
    padding: 0px 10px 5px 10px;
    border-radius: 12px;
    overflow: hidden;
    touch-action: pan-x pan-y pinch-zoom;
    position: relative;
}

.fretboard-container svg {
    touch-action: pan-x pan-y pinch-zoom;
}

/* ============ PIANO ============ */

.piano-container {
    background: #1a1a1a;
    padding: 0px;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    margin-top: -20px;
}

.piano-container svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ============ WAKE LOCK ============ */

.wake-status {
    position: absolute;
    top: -42px;
    right: 0;
    background: #1a1a1a;
    padding: 10px 15px;
    border-radius: 6px 0 0 0;
    border: 2px solid #333;
    border-right: none;
    border-bottom: none;
    font-size: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    color: #ffffff;
    font-family: inherit;
    z-index: 998;
    min-height: 40px;
}

.wake-status:hover {
    border-color: #00d9ff;
    background: #2a2a2a;
}

.wake-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #666;
}

.wake-indicator.active {
    background: #00ff00;
    box-shadow: 0 0 8px #00ff00;
}

/* Prevent double-tap zoom on font size buttons */
.song-info-content button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.song-info-content {
    display: inline-flex !important;
    width: auto !important;
    margin: 0 auto !important;
}

.song-info-content > div {
    gap: 20px !important;
    width: auto !important;
}

.btn-font-size {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    min-width: 70px;
    min-height: 55px;
    padding: 14px 24px !important;
    font-size: 20px;
    font-weight: bold;
}

/* Bigger slider handle for performance controls */
#scrollSpeedSlider {
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #555;
    border-radius: 4px;
    outline: none;
}

#scrollSpeedSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    background: #00d9ff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 217, 255, 0.5);
}

#scrollSpeedSlider::-moz-range-thumb {
    width: 30px;
    height: 30px;
    background: #00d9ff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 217, 255, 0.5);
}

/* ============ LEGEND ============ */

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
    border-top: 1px solid #333;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cccccc;
    font-size: 14px;
}

.legend-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.legend-dot.root {
    background: #f37c28;
    box-shadow: 0 0 10px rgba(243, 124, 40, 0.6);
}

.legend-dot.scale {
    background: #00d9ff;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.6);
}

.legend-dot.extra {
    background: #999999;
}

/* ============ FORMAT TOOLBAR ============ */

.format-toolbar {
    display: none;
    margin-bottom: 15px;
    padding: 10px;
    background: #2a2a2a;
    border-radius: 8px;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 70px;
    z-index: 50;
}

.format-toolbar.active {
    display: flex;
}

.format-btn {
    background: #1a1a1a;
    color: #ffffff;
    border: 2px solid #555;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.format-btn:hover {
    border-color: #00d9ff;
    background: #333;
}

.format-btn:active {
    transform: scale(0.95);
}

.color-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 2px solid #555;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-btn:hover {
    border-color: #ffffff;
    transform: scale(1.1);
}

.color-btn:active {
    transform: scale(0.95);
}

/* ============ PROGRESS BAR ============ */

.progress-container {
    transition: height 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.progress-container:hover {
    height: 8px !important;
    background: #1a1a1a !important;
}

.progress-container:active {
    height: 10px !important;
    cursor: grabbing !important;
}

.progress-bar {
    transition: width 0.05s linear !important;
    box-shadow: 0 0 8px rgba(0, 217, 255, 0.4);
    pointer-events: none;
}

.progress-container::before {
    content: attr(data-hover-time);
    position: absolute;
    top: -35px;
    left: var(--hover-x, 50%);
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: #00d9ff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    border: 1px solid #00d9ff;
}

.progress-container:hover::before {
    opacity: 1;
}

/* ============ FX TOGGLE BUTTON ============ */

#fxToggleBtn {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#fxToggleBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(243, 124, 40, 0.6);
}

#fxToggleBtn:active {
    transform: scale(0.95);
}

/* ============ ROTARY KNOBS ============ */

.eq-knob,
.small-knob {
    width: 55px;
    height: 55px;
    background: radial-gradient(circle at 30% 30%, #3a3a3a, #1a1a1a);
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    border: 3px solid #333;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    user-select: none;
}

.small-knob {
    width: 41px;
    height: 41px;
}

.eq-knob:hover,
.small-knob:hover {
    border-color: #00d9ff;
    box-shadow: 
        0 4px 12px rgba(0, 217, 255, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.5);
}

.eq-knob::before,
.small-knob::before {
    content: '';
    position: absolute;
    width: 3px;
    height: 45%;
    background: #00d9ff;
    top: 5%;
    left: 50%;
    transform: translateX(-50%) rotate(calc(var(--rotation) * 270deg - 135deg));
    transform-origin: center bottom; /* This is key */
    border-radius: 2px;
}

.small-knob::before {
    height: 17px;
        top: 8%;
            transform-origin: center bottom;
}

/* ============ RECORDING SECTION ============ */

#recordTab {
    padding: 0px 25px 20px 25px;
}

.record-layout {
    display: flex;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
    min-height: min-content;
}

.meter-volume-window,
.eq-knobs-window,
.effects-window,
.record-main,
.recordings-section {
    background: #1a1a1a;
    border-radius: 12px;
    border: 2px solid #333;
    height: 350px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

/* ============ METER & VOLUME WINDOW ============ */

.meter-volume-window {
    padding: 15px;
    width: 200px;
    flex-shrink: 0;
    flex-direction: row;
    gap: 12px;
    justify-content: center;
    align-items: stretch;
}

.meter-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
}

.meter-label {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.meter-markers {
    position: absolute;
    left: -25px;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 8px;
    color: #666;
    font-weight: 600;
    text-align: right;
    pointer-events: none;
}

.meter-markers span {
    position: absolute;
    right: 0;
    transform: translateY(-50%);
}

.gain-meter-vertical {
    width: 35px;
    flex: 1;
    background: #0a0a0a;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    border: 2px solid #333;
}

.gain-meter-fill-vertical {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, 
        #0099ff 0%,
        #00d9ff 20%,
        #00ff88 50%,
        #ffdd00 80%,
        #ff6600 92%,
        #ff0000 100%
    );
    transition: height 0.05s ease;
}

.gain-value {
    font-size: 10px;
    color: #00d9ff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.volume-slider-vertical {
    -webkit-appearance: slider-vertical;
    width: 35px;
    flex: 1;
    background: #2a2a2a;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    border: 2px solid #333;
    writing-mode: bt-lr;
}

.volume-slider-vertical::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 31px;
    height: 18px;
    border-radius: 3px;
    background: #00d9ff;
    cursor: pointer;
    border: 2px solid #000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    transition: all 0.2s ease;
}

.volume-slider-vertical::-webkit-slider-thumb:hover {
    background: #33e5ff;
    transform: scale(1.05);
}

.volume-slider-vertical::-moz-range-thumb {
    width: 31px;
    height: 18px;
    border-radius: 3px;
    background: #00d9ff;
    cursor: pointer;
    border: 2px solid #000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.volume-value {
    font-size: 10px;
    color: #00d9ff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

/* ============ FILTER & GAIN CONTROLS ============ */

.filter-gain-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    flex: 1;
}

.filter-btn {
    width: 50px;
    height: 32px;
    background: #2a2a2a;
    border: 2px solid #555;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.filter-btn:hover {
    border-color: #00d9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 217, 255, 0.2);
}

.filter-btn.active {
    background: #00d9ff;
    border-color: #00d9ff;
    box-shadow: 0 0 12px rgba(0, 217, 255, 0.5);
}

.filter-btn.active .filter-label {
    color: #000;
    font-weight: 900;
}

.filter-label {
    font-size: 9px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.filter-btn:hover .filter-label {
    color: #00d9ff;
}

.filter-btn.mute-btn.active {
    background: #ff3333;
    border-color: #ff3333;
    box-shadow: 0 0 12px rgba(255, 51, 51, 0.5);
}

.filter-btn.mute-btn.active .filter-label {
    color: #fff;
}

/* ============ EQ KNOBS WINDOW ============ */

.eq-knobs-window {
    width: 110px;
    flex-shrink: 0;
    padding: 15px;
    justify-content: space-between;
    align-items: center;
}

.eq-knob-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.eq-knob-label {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.eq-knob-center-mark {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 4px;
    background: #f37c28;
    border-radius: 1px;
    box-shadow: 0 0 4px rgba(243, 124, 40, 0.8);
    z-index: 10;
}

.eq-knob-value {
    font-size: 10px;
    color: #00d9ff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.eq-knob-input {
    position: absolute;
    opacity: 0;
    width: 55px;
    height: 55px;
    cursor: pointer;
}

.eq-title {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    text-align: center;
}

/* ============ EFFECTS WINDOW ============ */

.effects-window {
    width: 200px;
    flex-shrink: 0;
    padding: 15px;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
}

.effects-window h4 {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.effects-sliders {
    display: flex;
    gap: 20px;
    flex: 1;
    align-items: stretch;
}

.effect-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.effect-label {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.effect-slider-vertical {
    -webkit-appearance: slider-vertical;
    width: 35px;
    flex: 1;
    min-height: 120px;
    background: #2a2a2a;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    border: 2px solid #333;
    writing-mode: bt-lr;
}

.effect-slider-vertical::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 31px;
    height: 18px;
    border-radius: 3px;
    background: #f37c28;
    cursor: pointer;
    border: 2px solid #000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    transition: all 0.2s ease;
}

.effect-slider-vertical::-webkit-slider-thumb:hover {
    background: #ff8c3a;
    transform: scale(1.05);
}

.effect-slider-vertical::-moz-range-thumb {
    width: 31px;
    height: 18px;
    border-radius: 3px;
    background: #f37c28;
    cursor: pointer;
    border: 2px solid #000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.effect-value {
    font-size: 10px;
    color: #f37c28;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.reverb-toggle-stacked {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    width: 100%;
}

.reverb-toggle-btn {
    padding: 6px 8px;
    background: transparent;
    border: 1px solid #666;
    color: #888;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.reverb-toggle-btn:hover {
    border-color: #00d9ff;
    color: #00d9ff;
}

.reverb-toggle-btn.active {
    background: #f37c28;
    border-color: #f37c28;
    color: #fff;
}

/* ============ RECORD MAIN WINDOW ============ */

.record-main {
    width: 160px;
    flex-shrink: 0;
    padding: 15px 20px;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.timer {
    font-size: 36px;
    font-weight: 300;
    color: #00d9ff;
    font-variant-numeric: tabular-nums;
}

.timer.recording {
    color: #ff3333;
}

.recording-status {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.record-button {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 5px solid #f37c28;
    background: #2a2a2a;
    color: #f37c28;
    font-size: 42px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(243, 124, 40, 0.3);
}

.record-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(243, 124, 40, 0.5);
}

.record-button:active {
    transform: scale(0.95);
}

.record-button.recording {
    border-color: #ff3333;
    background: #ff3333;
    color: #fff;
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(255, 51, 51, 0.6);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ============ RECORDINGS LIST ============ */

.recordings-section {
    flex: 1;
    padding: 15px;
    min-width: 240px;
}

.recordings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #333;
}

.recordings-title {
    font-size: 11px;
    font-weight: 700;
    color: #00d9ff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.clear-all-btn {
    padding: 4px 10px;
    background: transparent;
    border: 2px solid #f37c28;
    color: #f37c28;
    border-radius: 4px;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clear-all-btn:hover {
    background: #f37c28;
    color: #fff;
}

.recordings-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recordings-list::-webkit-scrollbar {
    width: 5px;
}

.recordings-list::-webkit-scrollbar-track {
    background: #0a0a0a;
    border-radius: 3px;
}

.recordings-list::-webkit-scrollbar-thumb {
    background: #00d9ff;
    border-radius: 3px;
}

.recording-item {
    background: #2a2a2a;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 2px solid #333;
    transition: all 0.2s ease;
}

.recording-item:hover {
    border-color: #00d9ff;
    transform: translateY(-1px);
}

.recording-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.recording-info {
    flex: 1;
    min-width: 0;
}

.recording-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recording-meta {
    font-size: 9px;
    color: #888;
}

.delete-btn {
    width: 24px;
    height: 24px;
    background: #1a1a1a;
    border: 2px solid #666;
    color: #888;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background: #cc0000;
    border-color: #cc0000;
    color: #fff;
}

.playback-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.play-btn {
    width: 28px;
    height: 28px;
    background: #00d9ff;
    border: 2px solid #00d9ff;
    color: #000;
    border-radius: 50%;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.play-btn:hover {
    transform: scale(1.1);
}

.play-btn:active {
    transform: scale(0.95);
}

.play-btn.playing {
    background: #f37c28;
    border-color: #f37c28;
}

.play-btn svg {
    width: 12px;
    height: 14px;
}

.loop-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: 2px solid #666;
    color: #666;
    border-radius: 4px;
    font-size: 16px;
    position: relative;
    z-index: 10;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.loop-btn:hover {
    border-color: #00d9ff;
    color: #00d9ff;
    transform: scale(1.05);
}

.loop-btn.active {
    border-color: #00d9ff;
    background: rgba(0, 217, 255, 0.1);
    color: #00d9ff;
}

.progress-container {
    flex: 1;
    height: 5px;
    background: #0a0a0a;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    border: 1px solid #333;
}

.progress-bar {
    height: 100%;
    background: #00d9ff;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.playback-time {
    font-size: 9px;
    color: #888;
    font-variant-numeric: tabular-nums;
    min-width: 65px;
    text-align: right;
}

/* ============ RESPONSIVE OVERRIDES ============ */

@media (max-width: 1400px) {
    .record-layout {
        flex-wrap: wrap;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    #recordContainer {
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        max-height: calc(65vh - 100px) !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 20px !important;
    }
    
    .recordings-section {
        min-width: 100%;
        height: 300px;
    }
}


@media (min-width: 1024px) {
    .fretboard-container button[style*="position: absolute"],
    .piano-container button[style*="position: absolute"] {
        display: none !important;
    }
}



@media (max-width: 768px) {

    #tunerContainer,
#recordContainer {
    max-height: calc(65vh - 100px) !important;


        overflow-y: auto !important;
        overflow-x: hidden !important;
        max-height: calc(65vh - 100px) !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 20px !important;
}
    
    /* Tuner grid - mobile 2x2 */
    .tuner-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px;
    }
    
    .tuner-box {
        min-height: 220px;
        padding: 15px;
    }
    
    #tunerNote {
        font-size: 60px !important;
    }
    
    #tunerOctave {
        font-size: 24px !important;
    }
    
    #voxGrade {
        font-size: 56px !important;
    }
    
    #startTunerBtn,
    #rateVoxBtn,
    #stopVoxBtn {
        height: 42px !important;
        font-size: 12px !important;
    }
    
    /* Instrument tabs */
    .instrument-tab {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Legend - mobile */
    .legend {
        gap: 20px;
        flex-wrap: wrap;
    }

    .legend-item {
        font-size: 11px;
        padding: 6px 10px;
        gap: 8px;
    }

    .legend-dot {
        width: 12px;
        height: 12px;
        flex-shrink: 0;
    }

    /* Record layout */
    .record-layout {
        flex-direction: column;
        gap: 15px;
    }
    
    .meter-volume-window,
    .eq-knobs-window,
    .effects-window,
    .record-main,
    .recordings-section {
        width: 100% !important;
        height: auto !important;
        min-width: auto !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .meter-volume-window {
        flex-direction: row;
        padding: 15px;
    }
    
    .filter-gain-stack {
        flex-direction: row;
    }
    
    .eq-knobs-window {
        flex-direction: row;
    }
    
    .effects-window {
        padding: 15px;
    }
    
    .gain-meter-vertical,
    .volume-slider-vertical,
    .effect-slider-vertical {
        height: 180px !important;
    }

    /* Filter controls */
    .filter-controls,
    .filter-gain-stack {
        display: flex;
        flex-direction: column !important;
        align-items: flex-start;
        gap: 8px;
    }

    .filter-controls button,
    .filter-gain-stack button {
        width: 100%;
        max-width: 120px;
    }

    /* Instrument grabber */
    .instrument-grabber {
        top: 8px !important;
        right: -5px !important;
        transform: none !important;
    }

    /* Record container scrolling */
    #recordContainer {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        max-height: calc(65vh - 100px) !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 20px !important;
        padding-right: 30px;
    }

    .record-layout {
        height: auto !important;
        min-height: auto !important;
    }
}

/* Very small screens: single column tuner */
@media (max-width: 500px) {
    .tuner-grid {
        grid-template-columns: 1fr;
    }
    
    .tuner-box {
        min-height: 200px;
    }
}

/* Landscape phone (sideways) */
@media (max-width: 950px) and (orientation: landscape) {

    .tuner-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px;
    }
    
    .tuner-box {
        min-height: auto !important;
        padding: 10px !important;
    }
    
    #tunerContainer {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        max-height: calc(85vh - 100px) !important;
    }


    #recordContainer {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        max-height: calc(85vh - 100px) !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 20px !important;
    }

    .instrument-section {
        max-height: 90vh !important;
    }

    .instrument-content {
        max-height: calc(90vh - 100px) !important;
    }

    .record-layout {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .meter-volume-window {
        flex: 1 !important;
        min-width: 100px !important;
        height: 310px !important;
    }

    .eq-knobs-window {
        flex: 0.5 !important;
        min-width: 70px !important;
        height: 310px !important;
        padding: 8px !important;
        justify-content: space-evenly !important;
    }

    .effects-window {
        flex: 0.8 !important;
        min-width: 120px !important;
        height: 310px !important;
        padding: 8px !important;
    }

    .record-main {
        flex: 0.5 !important;
        width: 110px !important;
        height: 310px !important;
    }

    .meter-volume-window,
    .eq-knobs-window,
    .effects-window,
    .record-main {
        max-height: 310px !important;
        min-height: 310px !important;
        box-sizing: border-box !important;
    }

    .recordings-section {
        width: 90% !important;
        min-width: 90% !important;
        height: 200px !important;
        margin-top: 10px;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .eq-knob {
        width: 32px !important;
        height: 32px !important;
    }

    .small-knob {
        width: 26px !important;
        height: 26px !important;
    }

    .eq-knob-wrapper,
    .effect-column {
        gap: 3px !important;
    }

    .eq-knob-label,
    .effect-label {
        font-size: 7px !important;
    }

    .eq-knob-value,
    .effect-value {
        font-size: 8px !important;
    }

    .record-button {
        width: 75px !important;
        height: 75px !important;
        font-size: 30px !important;
    }

    .timer {
        font-size: 22px !important;
    }

}


@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .nav {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    #songsView,
    #setsView,
    #setEditView,
    .view {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .song-list,
    .sets-list,
    #setEditSongList {
        padding-left: 5px !important;
        padding-right: 5px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

.progress-bar {
    position: relative;
}

.progress-thumb {
    touch-action: none;
}

.progress-container {
    position: relative;
}