.pendulum-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #0a0a0f;
}

.main-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Control Panel - centered floating toolbar */
.control-panel {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: rgba(10, 10, 15, 0.94);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 10px;
    backdrop-filter: blur(12px);
    z-index: 10;
    max-width: 96vw;
}

.panel-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 16px;
}

.panel-row + .panel-row {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 7px;
    padding-bottom: 10px;
}

.panel-row:first-child {
    padding-top: 10px;
    padding-bottom: 7px;
}

.panel-section {
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.panel-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

/* Count control */
.count-control {
    display: flex;
    align-items: center;
    gap: 4px;
}

.count-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.08);
    color: #f59e0b;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.count-btn:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.2);
}

.count-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.count-val {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: #f59e0b;
    min-width: 20px;
    text-align: center;
}

/* Slider controls */
.panel-section input[type="range"] {
    width: 72px;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
}

.panel-section input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f59e0b;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.3);
}

.panel-section input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f59e0b;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.3);
}

.val {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    min-width: 24px;
    white-space: nowrap;
}

/* Option buttons (scale, sound) */
.option-buttons {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.option-btn {
    padding: 3px 8px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: capitalize;
    white-space: nowrap;
}

.option-btn:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: rgba(255, 255, 255, 0.8);
}

.option-btn.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.5);
    color: #f59e0b;
}

/* Action buttons */
.action-btn {
    padding: 5px 14px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.action-btn:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: white;
}

.play-btn {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.4);
    color: #f59e0b;
    font-weight: 600;
    min-width: 52px;
    text-align: center;
}

.play-btn:hover {
    background: rgba(245, 158, 11, 0.2);
}

.play-btn.playing {
    background: rgba(245, 158, 11, 0.25);
    border-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.trail-btn.active {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

/* Note Picker */
.note-picker {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 8px;
    padding: 12px 16px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 320px;
}

.note-picker-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.note-picker-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.note-picker-current {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
}

.note-picker-mute {
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s;
    margin-left: auto;
}

.note-picker-mute:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}

.note-picker-mute.muted {
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.note-picker-reset {
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s;
}

.note-picker-reset:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}

.note-picker-close {
    padding: 0 6px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.3);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.15s;
    line-height: 1;
}

.note-picker-close:hover {
    color: white;
}

.note-picker-notes {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.note-btn {
    padding: 4px 7px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
    min-width: 28px;
    text-align: center;
}

.note-btn:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: rgba(255, 255, 255, 0.8);
}

.note-btn.active {
    background: rgba(245, 158, 11, 0.12);
}

.note-picker-octaves {
    display: flex;
    align-items: center;
    gap: 6px;
}

.octave-btn {
    width: 28px;
    height: 26px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.octave-btn:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: rgba(255, 255, 255, 0.8);
}

.octave-btn.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.5);
    color: #f59e0b;
}

.note-picker-bpm {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    margin-left: auto;
}

.note-picker-speed {
    display: flex;
    align-items: center;
    gap: 8px;
}

.note-picker-speed input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
}

.note-picker-speed input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f59e0b;
    cursor: pointer;
    border: none;
}

.note-picker-speed input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f59e0b;
    cursor: pointer;
    border: none;
}

.speed-val {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: #f59e0b;
    min-width: 32px;
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .control-panel {
        bottom: 8px;
        left: 8px;
        right: 8px;
        transform: none;
        max-width: none;
    }

    .panel-row {
        flex-wrap: wrap;
        padding: 6px 10px;
        gap: 4px 8px;
        justify-content: center;
    }

    .panel-row:first-child {
        padding-top: 8px;
        padding-bottom: 5px;
    }

    .panel-row + .panel-row {
        padding-top: 5px;
        padding-bottom: 8px;
    }

    .panel-divider {
        display: none;
    }

    .section-label {
        font-size: 9px;
    }

    .panel-section input[type="range"] {
        width: 56px;
    }

    .option-btn {
        padding: 3px 6px;
        font-size: 9px;
    }

    .action-btn {
        padding: 4px 10px;
        font-size: 10px;
    }

    .note-picker {
        min-width: unset;
        left: 8px;
        right: 8px;
        transform: none;
        bottom: auto;
        top: 48px;
    }

    .note-picker-notes {
        gap: 2px;
    }

    .note-btn {
        padding: 4px 5px;
        min-width: 24px;
        font-size: 10px;
    }
}
