        :root {
            --primary-color: #4fc3f7;
            --secondary-color: #ffb74d;
            --accent-color: #4caf50;
            --warning-color: #ff9800;
            --danger-color: #f44336;
            --bg-dark: #1e1e2e;
            --bg-darker: #181825;
            --bg-lighter: #2d1b69;
            --text-primary: #ffffff;
            --text-secondary: #aaaaaa;
            --border-color: rgba(255,255,255,0.1);
        }

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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, var(--bg-dark), var(--bg-lighter));
            color: var(--text-primary);
            padding: 20px;
            min-height: 100vh;
        }

        .synth-container {
            max-width: 1400px;
            margin: 0 auto;
            background: rgba(0,0,0,0.3);
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.3);
            border: 1px solid var(--border-color);
        }

        .header-section {
            text-align: center;
            margin-bottom: 15px;
            padding-bottom: 10px;
        }

        .synth-title {
            font-size: 1.75em;
            margin-bottom: 5px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .synth-subtitle {
            color: var(--text-secondary);
            font-size: 0.77em;
        }

        .main-grid {
            column-count: auto;
            column-width: 300px;
            column-gap: 20px;
            margin-bottom: 5px;
        }

        .control-section {
            background: rgba(255,255,255,0.05);
            border-radius: 8px;
            padding: 20px;
            border: 1px solid var(--border-color);
            backdrop-filter: blur(10px);
            break-inside: avoid; /* Prevent sections from breaking across columns */
            margin-bottom: 20px; /* Add spacing between sections in columns */
        }

        .control-section h2 {
            margin-bottom: 15px;
            color: var(--primary-color);
            font-size: 1.3em;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .control-section h3 {
            margin-bottom: 10px;
            color: var(--secondary-color);
            font-size: 1.1em;
            border-bottom: 1px solid var(--border-color);
            padding-bottom: 5px;
        }

        /* Sections will auto-flow in grid - no fixed positioning */


        .osc-controls {
            margin-bottom: 20px;
            padding: 15px;
            background: rgba(255,255,255,0.03);
            border-radius: 6px;
            border: 1px solid rgba(255,255,255,0.05);
        }

        .control-row {
            display: grid;
            grid-template-columns: auto 1fr auto;
            gap: 10px;
            align-items: center;
            margin-bottom: 12px;
            position: relative;
            z-index: 1;
        }

        .control-row label {
            font-weight: bold;
            color: var(--text-secondary);
            min-width: 60px;
        }

        .control-row input[type="checkbox"] {
            accent-color: var(--accent-color);
            transform: scale(1.2);
            margin-right: 8px;
        }

        .control-row input[type="checkbox"] + span {
            color: var(--text-primary);
            font-size: 0.9em;
            user-select: none;
        }

        .value-display {
            min-width: 40px;
            text-align: right;
            font-family: monospace;
            color: var(--accent-color);
            font-weight: bold;
        }

        select, input[type="range"] {
            padding: 6px 8px;
            border-radius: 4px;
            border: 1px solid var(--border-color);
            background: var(--bg-darker);
            color: var(--text-primary);
            transition: border-color 0.2s;
            cursor: pointer;
            position: relative;
            z-index: 10;
        }

        select {
            min-width: 100px;
            font-size: 14px;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23fff' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
            background-repeat: no-repeat;
            background-position: right 8px center;
            background-size: 12px;
            padding-right: 30px;
        }

        select:focus, input[type="range"]:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.2);
        }

        select:hover {
            border-color: var(--secondary-color);
            background-color: #252537;
        }

        /* Ensure dropdown options are visible */
        select option {
            background: var(--bg-darker);
            color: var(--text-primary);
            padding: 8px;
        }

        .preset-dropdown {
            width: 100%;
            padding: 12px;
            font-size: 16px;
            margin-bottom: 0px;
        }

        .preset-dropdown optgroup {
            font-weight: bold;
            font-style: normal;
            color: var(--primary-color);
            background: rgba(0,0,0,0.3);
        }

        .preset-dropdown option {
            background: var(--bg-dark);
            color: var(--text-primary);
            padding: 8px;
        }

        .preset-actions {
            display: flex;
            gap: 10px;
        }

        .preset-btn {
            flex: 1;
            padding: 10px;
            border: none;
            border-radius: 4px;
            background: var(--primary-color);
            color: white;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .preset-btn:hover {
            background: var(--secondary-color);
        }

        /* Looper Styles */
        .looper-container {
            background: rgba(255,255,255,0.05);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px 20px 20px 20px;
            backdrop-filter: blur(10px);
        }

        .looper-header-row {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            margin-bottom: 15px;
        }

        .looper-header {
            font-size: 1.3em;
            font-weight: bold;
            color: #ff6b6b;
            letter-spacing: 0.5px;
        }

        .looper-recording-inline {
            font-size: 0.8em;
            color: var(--text-secondary);
            padding: 2px 8px;
            background: rgba(0,0,0,0.3);
            border-radius: 3px;
        }

        .looper-controls-row {
            display: flex;
            gap: 10px;
            margin-bottom: 12px;
        }

        .looper-toggle {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            background: rgba(0,0,0,0.3);
            border-radius: 4px;
            font-size: 0.95em;
            color: var(--text-secondary);
            cursor: pointer;
            white-space: nowrap;
        }

        .looper-toggle input[type="checkbox"] {
            cursor: pointer;
            width: 16px;
            height: 16px;
        }

        .looper-status {
            display: flex;
            align-items: baseline;
            justify-content: center;
            gap: 10px;
            padding: 8px 12px;
            background: rgba(0,0,0,0.4);
            border-radius: 4px;
            margin-bottom: 12px;
        }

        .looper-status-text {
            font-size: 0.75em;
            color: #b2ff59;
            font-weight: bold;
        }

        .looper-length {
            font-size: 1.3em;
            color: white;
            font-weight: bold;
        }

        .looper-buttons {
            display: flex;
            gap: 8px;
        }

        .looper-btn {
            flex: 1;
            padding: 10px;
            border: none;
            border-radius: 4px;
            color: white;
            font-size: 0.9em;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }

        .looper-btn-record {
            background: linear-gradient(135deg, #ff6b6b 0%, #c92a2a 100%);
            border: 1px solid #ff8787;
        }

        .looper-btn-record:hover {
            background: linear-gradient(135deg, #ff8787 0%, #e03131 100%);
        }

        .looper-btn-stop {
            background: linear-gradient(135deg, #555 0%, #333 100%);
            border: 1px solid #666;
        }

        .looper-btn-stop:hover {
            background: linear-gradient(135deg, #666 0%, #444 100%);
        }

        .looper-btn-download {
            background: linear-gradient(135deg, #4fc3f7 0%, #0288d1 100%);
            border: 1px solid #81d4fa;
        }

        .looper-btn-download:hover:not(:disabled) {
            background: linear-gradient(135deg, #81d4fa 0%, #039be5 100%);
        }

        .looper-btn-clear {
            background: linear-gradient(135deg, #666 0%, #444 100%);
            border: 1px solid #777;
        }

        .looper-btn-clear:hover:not(:disabled) {
            background: linear-gradient(135deg, #777 0%, #555 100%);
        }

        .looper-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* MIDI Recorder Styles */
        .midi-recorder-container {
            background: rgba(255,255,255,0.05);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px 20px 20px 20px;
            backdrop-filter: blur(10px);
        }

        .midi-recorder-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            font-size: 1.3em;
            font-weight: bold;
            color: var(--secondary-color);
            letter-spacing: 0.5px;
        }

        .midi-status {
            font-size: 0.65em;
            padding: 4px 10px;
            background: rgba(0,0,0,0.3);
            border-radius: 3px;
            color: #b2ff59;
        }

        .midi-status.recording {
            background: rgba(255,0,0,0.2);
            color: #ff6b6b;
            animation: pulse 1s infinite;
        }

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

        .midi-recorder-buttons {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
        }

        .midi-btn {
            flex: 1;
            padding: 10px;
            border: none;
            border-radius: 4px;
            color: white;
            font-size: 0.95em;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s;
        }

        .midi-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .midi-btn-record {
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
            border: 1px solid #ff8787;
        }

        .midi-btn-record:hover:not(:disabled) {
            background: linear-gradient(135deg, #ff8787 0%, #ff6b6b 100%);
        }

        .midi-btn-stop {
            background: linear-gradient(135deg, #555 0%, #333 100%);
            border: 1px solid #666;
        }

        .midi-btn-stop:hover:not(:disabled) {
            background: linear-gradient(135deg, #666 0%, #444 100%);
        }

        .midi-btn-download {
            background: linear-gradient(135deg, var(--primary-color) 0%, #039be5 100%);
            border: 1px solid #81d4fa;
        }

        .midi-btn-download:hover:not(:disabled) {
            background: linear-gradient(135deg, #81d4fa 0%, var(--primary-color) 100%);
        }

        .midi-btn-clear {
            background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
            border: 1px solid #e57373;
        }

        .midi-btn-clear:hover:not(:disabled) {
            background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
        }

        .midi-recorder-info {
            display: flex;
            gap: 15px;
            justify-content: center;
        }

        .midi-info-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .midi-info-label {
            font-size: 0.85em;
            color: var(--text-secondary);
        }

        .midi-info-value {
            font-size: 1em;
            font-weight: bold;
            color: var(--primary-color);
            font-family: monospace;
        }

        /* Audio Player Styles */
        .audio-player-container {
            background: rgba(255,255,255,0.05);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px 20px 20px 20px;
            backdrop-filter: blur(10px);
        }

        .audio-player-header {
            font-size: 1.3em;
            font-weight: bold;
            color: var(--primary-color);
            margin-bottom: 15px;
            letter-spacing: 0.5px;
        }

        .audio-player-file {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 12px;
        }

        .audio-file-btn {
            padding: 8px 16px;
            background: linear-gradient(135deg, var(--primary-color) 0%, #039be5 100%);
            border: 1px solid #81d4fa;
            border-radius: 4px;
            color: white;
            font-size: 0.9em;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s;
        }

        .audio-file-btn:hover {
            background: linear-gradient(135deg, #81d4fa 0%, var(--primary-color) 100%);
        }

        .audio-key-display {
            padding: 6px 12px;
            background: rgba(178, 255, 89, 0.15);
            border: 1px solid var(--accent-color);
            border-radius: 4px;
            font-size: 0.8em;
            font-weight: bold;
            color: var(--accent-color);
            white-space: nowrap;
        }

        .audio-key-display span {
            color: white;
            font-size: 1.1em;
        }

        .audio-file-name {
            flex: 1;
            font-size: 0.85em;
            color: var(--text-secondary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .audio-player-controls {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
        }

        .audio-player-btn {
            flex: 1;
            padding: 12px;
            border: none;
            border-radius: 4px;
            color: white;
            font-size: 1.1em;
            cursor: pointer;
            transition: all 0.2s;
        }

        .audio-btn-play {
            background: linear-gradient(135deg, #51cf66 0%, #2f9e44 100%);
            border: 1px solid #69db7c;
        }

        .audio-btn-play:hover:not(:disabled) {
            background: linear-gradient(135deg, #69db7c 0%, #37b24d 100%);
        }

        .audio-btn-pause {
            background: linear-gradient(135deg, var(--secondary-color) 0%, #fd7e14 100%);
            border: 1px solid #ffa94d;
        }

        .audio-btn-pause:hover:not(:disabled) {
            background: linear-gradient(135deg, #ffa94d 0%, var(--secondary-color) 100%);
        }

        .audio-btn-stop {
            background: linear-gradient(135deg, #555 0%, #333 100%);
            border: 1px solid #666;
        }

        .audio-btn-stop:hover:not(:disabled) {
            background: linear-gradient(135deg, #666 0%, #444 100%);
        }

        .audio-btn-clear {
            background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
            border: 1px solid #e57373;
        }

        .audio-btn-clear:hover:not(:disabled) {
            background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
        }

        .audio-player-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .audio-player-volume {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .audio-volume-label {
            font-size: 0.85em;
            color: var(--text-secondary);
            font-weight: bold;
        }

        .audio-volume-slider {
            flex: 1;
            -webkit-appearance: none;
            height: 6px;
            border-radius: 3px;
            background: rgba(255,255,255,0.1);
            outline: none;
        }

        .audio-volume-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--primary-color);
            cursor: pointer;
        }

        .audio-volume-slider::-moz-range-thumb {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--primary-color);
            cursor: pointer;
            border: none;
        }

        .audio-volume-value {
            font-size: 0.85em;
            color: var(--text-secondary);
            min-width: 40px;
            text-align: right;
        }

        .keyboard-controls {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-right: 15px;
            min-width: 80px;
            padding-top: 10px;
        }

        .octave-btn {
            padding: 10px 12px;
            border: none;
            border-radius: 6px;
            background: linear-gradient(135deg, var(--secondary-color) 0%, #fd7e14 100%);
            border: 1px solid #ffa94d;
            color: white;
            cursor: pointer;
            font-weight: bold;
            font-size: 0.9em;
            transition: all 0.2s;
            white-space: nowrap;
        }

        .octave-btn:hover {
            background: linear-gradient(135deg, #ffa94d 0%, var(--secondary-color) 100%);
        }

        .octave-display {
            font-family: monospace;
            color: var(--primary-color);
            font-weight: bold;
            text-align: center;
            padding: 8px;
            background: rgba(255,255,255,0.05);
            border-radius: 4px;
            border: 1px solid var(--border-color);
            font-size: 0.9em;
        }

        .arp-button {
            padding: 10px 12px;
            border: none;
            border-radius: 6px;
            background: linear-gradient(135deg, #555 0%, #333 100%);
            border: 1px solid #666;
            color: white;
            cursor: pointer;
            font-weight: bold;
            font-size: 0.9em;
            transition: all 0.2s;
            white-space: nowrap;
        }

        .arp-button:hover {
            background: linear-gradient(135deg, #666 0%, #444 100%);
        }

        .arp-button.active {
            background: linear-gradient(135deg, var(--accent-color) 0%, #2f9e44 100%);
            border: 1px solid #69db7c;
        }

        .arp-button.active:hover {
            background: linear-gradient(135deg, #69db7c 0%, var(--accent-color) 100%);
        }

        .keyboard-container {
            position: relative;
            display: flex;
            align-items: flex-start;
            padding: 10px 20px 10px 20px;
            background: transparent;
            border-radius: 12px;
            margin: 0;
        }

        .keyboard {
            display: flex;
            position: relative;
            flex: 1;
        }

        /* Professional Piano Key Styling */
        .white-key {
            width: 36px;
            height: 180px;
            background: linear-gradient(to bottom,
                #ffffff 0%,
                #fafafa 20%,
                #f8f8f8 80%,
                #e8e8e8 100%);
            border: 1px solid #d0d0d0;
            border-bottom: 2px solid #b0b0b0;
            border-radius: 0 0 8px 8px;
            margin-right: 2px;
            cursor: pointer;
            user-select: none;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            font-size: 12px;
            font-weight: 500;
            color: #666;
            padding-bottom: 15px;
            transition: all 0.1s ease;
            position: relative;
            z-index: 1;
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,0.8),
                0 2px 4px rgba(0,0,0,0.15),
                0 1px 0 rgba(0,0,0,0.1);
        }

        .white-key:hover {
            background: linear-gradient(to bottom,
                #f8f8f8 0%,
                #f2f2f2 20%,
                #f0f0f0 80%,
                #e0e0e0 100%);
            transform: translateY(1px);
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,0.6),
                0 1px 2px rgba(0,0,0,0.2),
                0 0 0 1px rgba(0,0,0,0.15);
        }

        .white-key:active,
        .white-key.active {
            background: linear-gradient(to bottom,
                #ff6b35 0%,
                #e55a2b 20%,
                #d64920 80%,
                #c73e1a 100%);
            color: #fff;
            font-weight: 600;
            transform: translateY(2px);
            box-shadow:
                inset 0 2px 4px rgba(0,0,0,0.3),
                inset 0 1px 0 rgba(255,255,255,0.2),
                0 1px 2px rgba(0,0,0,0.5);
        }

        .white-key.in-key {
            background: linear-gradient(to bottom,
                #e3f2fd 0%,
                #bbdefb 20%,
                #90caf9 80%,
                #64b5f6 100%);
            border: 1px solid #42a5f5;
            color: #1565c0;
        }

        .white-key.in-key:hover {
            background: linear-gradient(to bottom,
                #bbdefb 0%,
                #90caf9 20%,
                #64b5f6 80%,
                #42a5f5 100%);
        }

        .black-key {
            width: 24px;
            height: 115px;
            background: linear-gradient(to bottom,
                #2a2a2a 0%,
                #1a1a1a 20%,
                #0f0f0f 80%,
                #000000 100%);
            border: 1px solid #000;
            border-radius: 0 0 4px 4px;
            cursor: pointer;
            user-select: none;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            font-size: 10px;
            font-weight: 400;
            color: #999;
            padding-bottom: 10px;
            position: absolute;
            z-index: 2;
            transition: all 0.1s ease;
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,0.1),
                0 3px 6px rgba(0,0,0,0.4),
                0 1px 2px rgba(0,0,0,0.6);
        }

        .black-key:hover {
            background: linear-gradient(to bottom,
                #3a3a3a 0%,
                #2a2a2a 20%,
                #1f1f1f 80%,
                #151515 100%);
            transform: translateY(1px);
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,0.15),
                0 2px 4px rgba(0,0,0,0.5),
                0 1px 1px rgba(0,0,0,0.7);
        }

        .black-key.in-key {
            background: linear-gradient(to bottom,
                #1976d2 0%,
                #1565c0 20%,
                #0d47a1 80%,
                #0a3d8f 100%);
            border: 1px solid #42a5f5;
            color: #90caf9;
        }

        .black-key.in-key:hover {
            background: linear-gradient(to bottom,
                #2196f3 0%,
                #1976d2 20%,
                #1565c0 80%,
                #0d47a1 100%);
        }

        .black-key:active,
        .black-key.pressed {
            background: linear-gradient(to bottom,
                #ff6b35 0%,
                #e55a2b 20%,
                #d64920 80%,
                #c73e1a 100%);
            transform: translateY(2px);
            box-shadow:
                inset 0 2px 4px rgba(0,0,0,0.4),
                inset 0 1px 0 rgba(255,255,255,0.2),
                0 1px 2px rgba(0,0,0,0.5);
        }

        /* Black key positioning is now handled dynamically by JavaScript */

        .status-section {
            margin-top: 20px;
        }

        .status-display {
            text-align: center;
            padding: 15px;
            background: rgba(76, 175, 80, 0.1);
            border: 1px solid var(--accent-color);
            border-radius: 8px;
            color: var(--accent-color);
            font-family: monospace;
            margin-bottom: 10px;
        }

        .debug-info {
            text-align: center;
            padding: 10px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-secondary);
            font-family: monospace;
            font-size: 12px;
        }

        /* Responsive masonry layout */
        @media (max-width: 768px) {
            .main-grid {
                column-count: 1;
                column-width: auto;
            }
        }

        @media (min-width: 769px) and (max-width: 1200px) {
            .main-grid {
                column-width: 280px;
            }
        }

        @media (min-width: 1201px) {
            .main-grid {
                column-width: 300px;
            }
        }

        /* Virtual Keyboard Layout */
        .keyboard-section {
            margin-top: 30px;
            clear: both;
        }

        .keyboard-layout {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .keyboard {
            display: flex;
            justify-content: center;
            flex: 1;
        }

        /* New Section Styles */
        .filter-section, .lfo-section, .ring-mod-noise-section, .envelope-section, .effects-section {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
        }

        .filter-controls, .lfo-controls, .ring-mod-controls, .noise-controls, .envelope-controls, .effects-controls {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .filter-adsr-section {
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid var(--border-color);
        }

        .filter-adsr-section h3 {
            color: var(--secondary-color);
            font-size: 1.0em;
            margin-bottom: 10px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .effect-group {
            background: rgba(0,0,0,0.2);
            padding: 15px;
            border-radius: 6px;
            border: 1px solid rgba(255,255,255,0.05);
        }

        .effect-group h3 {
            margin: 0 0 10px 0;
            color: var(--secondary-color);
            font-size: 0.9em;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .value-display {
            color: var(--secondary-color);
            font-weight: bold;
            min-width: 60px;
            text-align: right;
            font-family: monospace;
        }

        /* MIDI Panel Styles */
        .midi-panel {
            background: rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            padding: 15px;
            margin-top: 10px;
        }

        .midi-activity {
            display: flex;
            justify-content: center;
            margin-bottom: 15px;
        }

        .activity-indicator {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            color: var(--text-color);
        }

        .led-indicator {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #333;
            border: 1px solid #666;
            transition: all 0.1s ease;
        }

        .led-indicator.active {
            background: #00ff00;
            box-shadow: 0 0 10px #00ff00, inset 0 0 5px #ffffff;
        }

        .midi-monitor {
            margin-top: 15px;
        }

        .midi-display {
            background: #000;
            color: #00ff00;
            font-family: monospace;
            font-size: 12px;
            padding: 8px;
            border-radius: 4px;
            min-height: 40px;
            max-height: 80px;
            overflow-y: auto;
            border: 1px solid #333;
        }

        .midi-cc-section {
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .midi-cc-section h3 {
            margin: 0 0 10px 0;
            font-size: 14px;
            color: var(--secondary-color);
        }

        .cc-mappings {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .cc-mapping {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .cc-mapping label {
            font-size: 12px;
            color: var(--text-color);
        }

        .cc-mapping-select {
            padding: 4px;
            font-size: 11px;
            background: var(--bg-color);
            color: var(--text-color);
            border: 1px solid var(--border-color);
            border-radius: 3px;
        }

        /* Additional section responsive behavior inherits from main-grid */

        /* Settings Modal Styles */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(5px);
            z-index: 1000;
            animation: fadeIn 0.3s ease;
            align-items: center;
            justify-content: center;
            overflow-y: auto;
            padding: 20px;
        }

        .modal-overlay.show {
            display: flex;
        }

        .settings-modal {
            background: linear-gradient(135deg, var(--bg-dark), var(--bg-lighter));
            border: 2px solid var(--border-color);
            border-radius: 12px;
            padding: 30px;
            min-width: 400px;
            max-width: 600px;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 40px rgba(0,0,0,0.5);
            transform: scale(0.9);
            animation: modalSlideIn 0.3s ease forwards;
            margin: auto;
        }

        .settings-modal h2 {
            color: var(--primary-color);
            margin-bottom: 20px;
            text-align: center;
            font-size: 1.5em;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .settings-group {
            margin-bottom: 20px;
            padding: 15px;
            background: rgba(255,255,255,0.05);
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.1);
        }

        .settings-group h3 {
            color: var(--secondary-color);
            margin-bottom: 15px;
            font-size: 1.1em;
        }

        .setting-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .setting-item:last-child {
            margin-bottom: 0;
        }

        .setting-label {
            color: var(--text-primary);
            font-size: 0.95em;
        }

        .setting-description {
            color: var(--text-secondary);
            font-size: 0.85em;
            margin-top: 2px;
        }

        .toggle-switch {
            position: relative;
            width: 50px;
            height: 26px;
        }

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

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--text-secondary);
            transition: 0.3s;
            border-radius: 26px;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 3px;
            bottom: 3px;
            background: white;
            transition: 0.3s;
            border-radius: 50%;
        }

        input:checked + .toggle-slider {
            background: var(--primary-color);
        }

        input:checked + .toggle-slider:before {
            transform: translateX(24px);
        }

        .modal-buttons {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 25px;
        }

        .modal-btn {
            padding: 10px 20px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.9em;
            transition: all 0.2s ease;
            min-width: 80px;
        }

        .modal-btn-primary {
            background: var(--primary-color);
            color: white;
        }

        .modal-btn-primary:hover {
            background: var(--accent-color);
            transform: translateY(-1px);
        }

        .modal-btn-secondary {
            background: var(--text-secondary);
            color: white;
        }

        .modal-btn-secondary:hover {
            background: var(--warning-color);
            transform: translateY(-1px);
        }

        .modal-btn-share {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            font-size: 0.9em;
        }

        .modal-btn-share:hover {
            background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }

        .settings-icon {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 30px;
            height: 30px;
            cursor: pointer;
            color: var(--text-secondary);
            font-size: 1.5em;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(255,255,255,0.1);
        }

        .settings-icon:hover {
            color: var(--primary-color);
            background: rgba(255,255,255,0.2);
            transform: rotate(90deg);
        }

        .user-guide-icon {
            position: absolute;
            top: 20px;
            right: 60px;
            width: 30px;
            height: 30px;
            cursor: pointer;
            color: var(--text-secondary);
            font-size: 1.5em;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(255,255,255,0.1);
        }

        .user-guide-icon:hover {
            color: var(--secondary-color);
            background: rgba(255,255,255,0.2);
            transform: scale(1.1);
        }

        .help-icon {
            position: absolute;
            top: 20px;
            right: 100px;
            width: 30px;
            height: 30px;
            cursor: pointer;
            color: var(--text-secondary);
            font-size: 1.5em;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(255,255,255,0.1);
        }

        .help-icon:hover {
            color: var(--accent-color);
            background: rgba(255,255,255,0.2);
            transform: scale(1.1);
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes modalSlideIn {
            from {
                transform: scale(0.9) translateY(-20px);
                opacity: 0;
            }
            to {
                transform: scale(1) translateY(0);
                opacity: 1;
            }
        }