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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: #2a2a2a;
    color: #e8e8e8;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    font-weight: 300;
    font-size: 14px;
    background-image: 
        linear-gradient(45deg, transparent 49%, rgba(0, 0, 0, 0.1) 49%, rgba(0, 0, 0, 0.1) 51%, transparent 51%),
        linear-gradient(-45deg, transparent 49%, rgba(0, 0, 0, 0.1) 49%, rgba(0, 0, 0, 0.1) 51%, transparent 51%);
    background-size: 20px 20px;
}

.container {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.5),
        0 1px 2px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    max-width: 720px;
    width: 100%;
    padding: 32px;
    position: relative;
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.2) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 1px, transparent 1px);
    background-size: 24px 24px;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(200, 192, 177, 0.015) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(160, 140, 120, 0.015) 0%, transparent 50%);
    pointer-events: none;
}


.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    margin-top: 8px;
}

.tempo-control-header {
    font-size: 12px;
    color: #e8e8e8;
    cursor: ns-resize;
    user-select: none;
    padding: 8px 12px;
    background: #707070;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    transition: all 0.15s ease;
}

.tempo-control-header:hover {
    background: #808080;
}

/* Enhanced tempo control visual feedback */
.tempo-control-header.tempo-adjusting {
    background: #909090;
    box-shadow: 
        0 2px 8px rgba(139, 115, 85, 0.2),
        inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

.tempo-control-header.tempo-pulse {
    animation: tempo-pulse 0.1s ease-out;
}

.tempo-control-header.tempo-reset {
    animation: tempo-reset 0.3s ease-out;
}

@keyframes tempo-pulse {
    0% { 
        background: #909090;
        transform: scale(1.02);
    }
    50% { 
        background: #a0a0a0;
        transform: scale(1.05);
        box-shadow: 
            0 3px 12px rgba(139, 115, 85, 0.3),
            inset 0 1px 2px rgba(0, 0, 0, 0.1);
    }
    100% { 
        background: #909090;
        transform: scale(1.02);
    }
}

@keyframes tempo-reset {
    0% { 
        background: #909090;
        transform: scale(1.02);
    }
    25% { 
        background: #8b7355;
        transform: scale(1.08);
        box-shadow: 
            0 4px 16px rgba(139, 115, 85, 0.4),
            inset 0 1px 2px rgba(255, 255, 255, 0.1);
    }
    75% {
        background: #8b7355;
        transform: scale(1.04);
    }
    100% { 
        background: #707070;
        transform: scale(1);
    }
}

.tempo-control-header #tempo-display {
    font-weight: 500;
}

.swing-control-header {
    font-size: 12px;
    color: #e8e8e8;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #707070;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.swing-slider {
    appearance: none;
    width: 80px;
    height: 4px;
    background: #4a4a4a;
    border-radius: 2px;
    outline: none;
}

.swing-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: #e8e8e8;
    border-radius: 50%;
    cursor: pointer;
}

.swing-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #e8e8e8;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.transport-controls {
    display: flex;
    gap: 2px;
}

.transport-btn {
    background: #707070;
    color: #e8e8e8;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 12px;
    font-family: inherit;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transport-btn svg {
    transition: all 0.15s ease;
}

.transport-btn:hover {
    background: #808080;
    color: #fff;
}

#record-btn.active {
    background: #d73527;
    color: #fefcf8;
    border-color: #d73527;
}

#write-btn.active {
    background: #8b5cf6;
    color: #fefcf8;
    border-color: #8b5cf6;
}

#play-btn.active {
    background: #22c55e;
    color: #fefcf8;
    border-color: #22c55e;
}


#sequencer-btn.active {
    background: #f59e0b;
    color: #fefcf8;
    border-color: #f59e0b;
}

#edit-btn.active {
    background: #06b6d4;
    color: #fefcf8;
    border-color: #06b6d4;
}

.transport-btn.active {
    background: #2a2520;
    color: #fefcf8;
    border-color: #2a2520;
}

.pad-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 32px;
    padding: 8px;
}

.pad {
    aspect-ratio: 1;
    background: #6a6a6a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.1s ease;
    position: relative;
    font-size: 10px;
    color: transparent;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pad::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: rgba(42, 37, 32, 0.15);
    border-radius: 50%;
    transition: all 0.1s ease;
}

.pad:hover {
    filter: brightness(1.1) saturate(1.1);
    transform: translateY(-1px);
    box-shadow: 
        0 2px 6px rgba(42, 37, 32, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pad:hover::before {
    background: rgba(42, 37, 32, 0.3);
    width: 6px;
    height: 6px;
}

.pad.active {
    background: var(--pad-color-light, rgba(42, 37, 32, 0.15));
    transform: translateY(1px);
    box-shadow: 
        0 0 2px rgba(42, 37, 32, 0.3),
        inset 0 2px 6px rgba(0, 0, 0, 0.2);
}

.pad.active::before {
    background: rgba(255, 255, 255, 0.9);
    width: 8px;
    height: 8px;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

.pad.has-sample::before {
    background: rgba(255, 255, 255, 0.8);
    width: 6px;
    height: 6px;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);
}

.pad.has-sample.active::before {
    background: rgba(255, 255, 255, 0.9);
    width: 8px;
    height: 8px;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

.pad.recording {
    background: #f1efeb;
}

.pad.recording::before {
    background: rgba(255, 255, 255, 0.9);
    animation: pulse 0.8s infinite;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

.pad.drag-over {
    filter: brightness(1.2) saturate(1.3);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 4px 12px rgba(139, 115, 85, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.pad.drag-over::before {
    background: rgba(255, 255, 255, 0.9);
    width: 8px;
    height: 8px;
    animation: pulse 0.6s infinite;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
}

@keyframes sequencer-glow {
    0% { 
        background: #f1efeb;
        box-shadow: 
            0 1px 3px rgba(42, 37, 32, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    50% { 
        background: var(--pad-color-light, rgba(139, 115, 85, 0.2));
        box-shadow: 
            0 3px 12px var(--pad-color-light, rgba(139, 115, 85, 0.2)),
            0 0 16px var(--pad-color-lighter, rgba(139, 115, 85, 0.1)),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    100% { 
        background: #f1efeb;
        box-shadow: 
            0 1px 3px rgba(42, 37, 32, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
}

.pad.sequencer-trigger {
    animation: sequencer-glow 0.3s ease-out;
}

.sequencer-controls, .edit-controls {
    background: #707070;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 24px;
    margin-bottom: 24px;
}

.sequencer-header, .edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.speed-selector, .bank-selector, .subdivision-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.speed-label, .bank-label, .subdivision-label {
    font-size: 10px;
    color: #ccc;
    letter-spacing: 0.2px;
    text-transform: lowercase;
}

.speed-buttons, .bank-buttons, .subdivision-buttons {
    display: flex;
    gap: 2px;
}

.speed-btn, .bank-btn, .subdivision-btn {
    background: transparent;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    font-family: inherit;
    font-weight: 300;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: lowercase;
    letter-spacing: 0.3px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.speed-btn:hover, .bank-btn:hover, .subdivision-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.speed-btn.active, .bank-btn.active, .subdivision-btn.active {
    background: #f59e0b;
    color: #fefcf8;
    border-color: #f59e0b;
}

.speed-btn.active {
    background: #4a9eff;
    border-color: #4a9eff;
}

.subdivision-btn.active {
    background: #8b5cf6;
    color: #fefcf8;
    border-color: #8b5cf6;
}

.bank-btn.has-patterns {
    position: relative;
}

.bank-btn.has-patterns::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 2px;
    background: #8b7355;
    border-radius: 50%;
}

.selected-pad-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.selected-pad-info span:first-child,
.edit-header span:first-child {
    font-size: 12px;
    font-weight: 400;
    color: #e8e8e8;
    letter-spacing: 0.3px;
}

.pad-name {
    font-size: 10px;
    color: #ccc;
    letter-spacing: 0.2px;
}

.pad-name.has-sample {
    color: #8b7355;
}

.clear-btn, .test-btn {
    background: transparent;
    color: #e8e8e8;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    font-family: inherit;
    font-weight: 300;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

.clear-btn:hover, .test-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.step-grid {
    margin-bottom: 20px;
}

.step-row {
    display: flex;
    gap: 2px;
    margin-bottom: 2px;
}

.step {
    width: 24px;
    height: 24px;
    background: #808080;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.1s ease;
    position: relative;
}

.step.primary {
    width: 28px;
    height: 28px;
    background: #909090;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.step.secondary {
    width: 20px;
    height: 20px;
    background: #707070;
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0.7;
}

.step::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 3px;
    background: transparent;
    border-radius: 50%;
    transition: all 0.1s ease;
}

.step:hover {
    background: #909090;
}

.step.active {
    background: #2a2520;
}

.step.primary.active {
    background: #2a2520;
    border-color: rgba(255, 255, 255, 0.4);
}

.step.active::before {
    background: #f1efeb;
    width: 6px;
    height: 6px;
}

.step.primary.active::before {
    width: 8px;
    height: 8px;
}

.step.current {
    background: linear-gradient(135deg, #ff6b35, #f7931e) !important;
    box-shadow: 
        0 0 0 2px #ff6b35,
        0 0 8px rgba(255, 107, 53, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    z-index: 1;
    transform: scale(1.1);
    border-color: #ff8c00;
}


.edit-sections {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
    max-width: 100%;
    overflow: hidden;
}

.edit-section {
    background: #808080;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    min-width: 0;
    overflow: hidden;
}

.edit-section h4 {
    font-size: 13px;
    font-weight: 400;
    color: #e8e8e8;
    margin-bottom: 12px;
    text-transform: lowercase;
    letter-spacing: 0.4px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 8px;
}

/* Legacy slider styles - kept for compatibility */
.slider-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: flex-end;
    height: 80px;
}

.slider-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.slider-group label {
    font-size: 11px;
    color: #ccc;
    margin-bottom: 6px;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

.slider-group input[type="range"] {
    -webkit-appearance: slider-vertical;
    appearance: none;
    width: 4px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
    writing-mode: bt-lr;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 8px;
    background: var(--edit-accent-color, #8b7355) !important;
    border-radius: 2px;
    cursor: pointer;
    border: 1px solid #fefcf8 !important;
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 8px;
    background: var(--edit-accent-color, #8b7355) !important;
    border-radius: 2px;
    cursor: pointer;
    border: 1px solid #fefcf8 !important;
    box-sizing: border-box;
    -moz-appearance: none;
}

.slider-value {
    font-size: 9px;
    color: #e8e8e8;
    margin-top: 4px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* Radial Knob Styles */
.adsr-knobs {
    gap: 8px;
    height: 80px;
    align-items: center;
}

.radial-knob-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.radial-knob-group label {
    font-size: 11px;
    color: #ccc;
    margin-bottom: 8px;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

.radial-knob {
    position: relative;
    width: 28px;
    height: 28px;
    cursor: pointer;
    user-select: none;
}

.knob-track {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 0;
    left: 0;
}

.knob-indicator {
    position: absolute;
    top: 2px;
    left: 50%;
    width: 2px;
    height: 9px;
    background: var(--edit-accent-color, #8b7355);
    border-radius: 1px;
    transform-origin: 50% 12px;
    transform: translateX(-50%) rotate(-135deg);
    transition: transform 0.1s ease;
}

.hidden-range {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radial-knob:hover .knob-track {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.4);
}

.radial-knob.adjusting .knob-track {
    border-color: var(--edit-accent-color, #8b7355);
    background: rgba(0, 0, 0, 0.5);
}

.radial-knob.pulse .knob-indicator {
    filter: brightness(1.3);
}

.radial-knob-group .knob-value {
    font-size: 9px;
    color: #e8e8e8;
    margin-top: 6px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.knob-row {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.knob-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.knob-group label {
    font-size: 11px;
    color: #ccc;
    margin-bottom: 8px;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

.knob-group input[type="range"] {
    width: 48px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.knob-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 8px;
    height: 8px;
    background: var(--edit-accent-color, #8b7355) !important;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #fefcf8 !important;
}

.knob-group input[type="range"]::-moz-range-thumb {
    width: 8px;
    height: 8px;
    background: var(--edit-accent-color, #8b7355) !important;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #fefcf8 !important;
    box-sizing: border-box;
    -moz-appearance: none;
}

/* Additional range slider styling for better browser support */
.slider-group input[type="range"]::-ms-thumb,
.knob-group input[type="range"]::-ms-thumb {
    background: var(--edit-accent-color, #8b7355) !important;
    border: 1px solid #fefcf8 !important;
}

.slider-group input[type="range"]::-webkit-slider-track,
.knob-group input[type="range"]::-webkit-slider-track {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Force accent color override */
.edit-controls input[type="range"] {
    accent-color: var(--edit-accent-color, #8b7355) !important;
}

.knob-value {
    font-size: 10px;
    color: #e8e8e8;
    margin-top: 6px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.filter-type, .poly-mode {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.filter-type label, .poly-mode label {
    font-size: 11px;
    color: #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: lowercase;
    letter-spacing: 0.2px;
}

.filter-type input[type="radio"], .poly-mode input[type="radio"] {
    width: 8px;
    height: 8px;
    accent-color: var(--edit-accent-color, #8b7355);
}

.visualizer {
    background: #808080;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
}

.waveform-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.zoom-controls {
    display: flex;
    gap: 2px;
}

.zoom-btn {
    background: #707070;
    color: #e8e8e8;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 8px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
}

.zoom-btn:hover {
    background: #808080;
    color: #fff;
}

.waveform-container {
    position: relative;
    width: 100%;
    height: 80px;
    background: rgba(42, 37, 32, 0.02);
    border: 1px solid rgba(42, 37, 32, 0.06);
    overflow: hidden;
    margin-bottom: 12px;
}

#waveform-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.trim-handles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.trim-handle {
    position: absolute;
    top: 0;
    height: 100%;
    width: 8px;
    pointer-events: all;
    cursor: ew-resize;
    z-index: 10;
}

.start-handle {
    left: 0;
}

.end-handle {
    left: 100%;
    transform: translateX(-100%);
}

.handle-line {
    width: 1px;
    height: 100%;
    background: var(--edit-accent-color, #8b7355);
    margin: 0 auto;
}

.handle-grip {
    position: absolute;
    top: -16px;
    font-size: 7px;
    font-weight: 400;
    letter-spacing: 0.2px;
    text-transform: lowercase;
    white-space: nowrap;
}

.handle-grip {
    color: var(--edit-accent-color, #8b7355);
}

.start-handle .handle-grip {
    left: 0;
}

.end-handle .handle-grip {
    right: 0;
}

.trim-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.trim-info {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #999;
    letter-spacing: 0.2px;
}

.loop-control {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.loop-btn {
    background: transparent;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    min-width: 32px;
}

.loop-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.loop-btn.active {
    background: #f97316;
    color: #fff;
    border-color: #f97316;
    box-shadow: 0 0 4px rgba(249, 115, 22, 0.4);
}


.status {
    text-align: center;
    font-size: 10px;
    color: #999;
    min-height: 16px;
    letter-spacing: 0.2px;
}

#recording-status {
    color: #a03c28;
}


#edit-status {
    color: #666;
}

.pad-controls {
    position: absolute;
    bottom: 4px;
    right: 4px;
    display: flex;
    gap: 2px;
    z-index: 10;
}

.mute-btn, .solo-btn {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 1px;
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    transition: all 0.15s ease;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mute-btn:hover, .solo-btn:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.mute-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    box-shadow: 0 0 4px rgba(59, 130, 246, 0.4);
}

.solo-btn.active {
    background: #f97316;
    border-color: #f97316;
    color: #fff;
    box-shadow: 0 0 4px rgba(249, 115, 22, 0.4);
}

.mute-btn:active, .solo-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .edit-sections {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .knob-row {
        gap: 8px;
    }
    
    .step {
        width: 20px;
        height: 20px;
    }
    
    .pad-controls {
        bottom: 2px;
        right: 2px;
        gap: 1px;
    }
    
    .mute-btn, .solo-btn {
        width: 14px;
        height: 14px;
        font-size: 9px;
    }
    
    /* Mobile-specific tempo control enhancements */
    .tempo-control-header {
        padding: 10px 16px;
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
    
    .tempo-control-header.tempo-adjusting {
        transform: scale(1.05);
        box-shadow: 
            0 3px 12px rgba(139, 115, 85, 0.3),
            inset 0 1px 2px rgba(0, 0, 0, 0.1);
    }
    
    /* Enhanced mobile gesture feedback */
    .tempo-control-header::after {
        content: '↕';
        position: absolute;
        right: -20px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 10px;
        color: rgba(255, 255, 255, 0.4);
        opacity: 0;
        transition: opacity 0.2s ease;
    }
    
    .tempo-control-header.tempo-adjusting::after {
        opacity: 1;
        color: rgba(139, 115, 85, 0.8);
    }
}