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

        html, body {
            height: 100%;
        }

        body {
            font-family: Arial, sans-serif;
            background: #1a1a1a;
            overflow: hidden;
            touch-action: none;
        }

        #settings {
            display: none !important;
        }

        #start-button {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            padding: 20px 40px;
            font-size: 20px;
            background: #4a7a4a;
            color: white;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            z-index: 2000;
        }

        #debug-console {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            max-height: 150px;
            background: rgba(0, 0, 0, 0.9);
            color: #0f0;
            font-family: monospace;
            font-size: 10px;
            padding: 5px;
            overflow-y: auto;
            z-index: 3000;
            display: none; /* Hidden by default */
            border-top: 1px solid #0f0;
        }

        #debug-console div {
            margin: 2px 0;
        }

        #hamburger-menu {
            position: fixed;
            top: 10px;
            right: 10px;
            width: 40px;
            height: 40px;
            background: rgba(42, 42, 42, 0.9);
            border: 1px solid #555;
            border-radius: 5px;
            display: none; /* Will show/hide based on play state */
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 5px;
            cursor: pointer;
            z-index: 2000;
            transition: opacity 0.2s;
        }

        #hamburger-menu span {
            width: 20px;
            height: 2px;
            background: #fff;
            display: block;
        }

        #settings-menu {
            position: fixed;
            top: 0;
            right: -100%;
            width: 100%;
            height: 100%;
            background: #1a1a1a;
            z-index: 2500;
            overflow-y: auto;
            transition: right 0.3s ease-in-out;
        }

        #settings-menu.open {
            right: 0;
        }

        #settings-menu-header {
            position: sticky;
            top: 0;
            height: 50px;
            background: #2a2a2a;
            border-bottom: 1px solid #555;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            z-index: 10;
        }
        
        #settings-menu-content {
            padding: 20px;
        }

        #settings-menu-header h2 {
            color: #fff;
            font-size: 18px;
            margin: 0;
        }

        #close-settings {
            background: none;
            border: none;
            color: #fff;
            font-size: 30px;
            cursor: pointer;
            padding: 0;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .settings-section {
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 1px solid #333;
        }

        .settings-section h3 {
            color: #6a9fb5;
            font-size: 16px;
            margin-bottom: 15px;
        }

        .setting-row {
            margin-bottom: 15px;
        }

        .setting-row label {
            display: block;
            color: #aaa;
            font-size: 14px;
            margin-bottom: 5px;
        }

        .setting-row select {
            width: 100%;
            background: #2a2a2a;
            color: #fff;
            border: 1px solid #555;
            border-radius: 5px;
            padding: 10px;
            font-size: 14px;
        }

        .parameter-control {
            margin-bottom: 25px;
        }

        .parameter-label {
            display: block;
            color: #aaa;
            font-size: 14px;
            margin-bottom: 8px;
        }

        .parameter-mapping {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }

        .parameter-mapping label {
            color: #888;
            font-size: 12px;
            min-width: 40px;
        }

        .parameter-mapping select {
            flex: 1;
            background: #2a2a2a;
            color: #fff;
            border: 1px solid #555;
            border-radius: 5px;
            padding: 8px;
            font-size: 13px;
        }

        .slider-container {
            position: relative;
            margin-top: 10px;
        }

        .slider-single {
            width: 100%;
            height: 40px;
            background: #2a2a2a;
            border-radius: 5px;
            position: relative;
            border: 1px solid #555;
        }

        .slider-single input[type="range"] {
            width: 100%;
            height: 100%;
            margin: 0;
            -webkit-appearance: none;
            appearance: none;
            background: transparent;
            cursor: pointer;
        }

        .slider-single input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 20px;
            height: 36px;
            background: #6a9fb5;
            border-radius: 3px;
            cursor: pointer;
        }

        .slider-single input[type="range"]::-moz-range-thumb {
            width: 20px;
            height: 36px;
            background: #6a9fb5;
            border-radius: 3px;
            cursor: pointer;
            border: none;
        }

        .slider-value {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            color: #888;
            font-size: 12px;
            pointer-events: none;
        }

        .slider-dual {
            width: 100%;
            height: 40px;
            background: #2a2a2a;
            border-radius: 5px;
            position: relative;
            border: 1px solid #555;
        }

        .slider-dual-track {
            position: absolute;
            height: 8px;
            background: #6a9fb5;
            top: 16px;
            border-radius: 4px;
        }

        .slider-dual input[type="range"] {
            position: absolute;
            width: 100%;
            height: 100%;
            margin: 0;
            -webkit-appearance: none;
            appearance: none;
            background: transparent;
            cursor: pointer;
            pointer-events: none;
        }

        .slider-dual input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 20px;
            height: 36px;
            background: #6a9fb5;
            border-radius: 3px;
            cursor: pointer;
            pointer-events: all;
        }

        .slider-dual input[type="range"]::-moz-range-thumb {
            width: 20px;
            height: 36px;
            background: #6a9fb5;
            border-radius: 3px;
            cursor: pointer;
            border: none;
            pointer-events: all;
        }

        .slider-dual-values {
            display: flex;
            justify-content: space-between;
            margin-top: 5px;
        }

        .slider-dual-values span {
            color: #888;
            font-size: 12px;
        }

        #instrument-container {
            display: none;
        }

        @media (max-width: 768px) {
            #hamburger-menu {
                display: flex; /* Will be controlled by JS based on play state */
            }

            #instrument-container {
                display: flex;
                height: 100%;
                height: calc(var(--vh, 1vh) * 100);
                width: 100%;
            }

            #start-button {
                display: block;
            }

            #controls {
                width: 25%;
                display: flex;
                flex-direction: column;
                gap: 1px;
                background: #2a2a2a;
                padding: 1px;
            }

            .chord-button {
                flex: 1;
                background: #3a4a3a;
                border: 0.5px solid #1a1a1a;
                color: #fff;
                font-size: 18px;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 5px;
                text-align: center;
                user-select: none;
                transition: background 0.1s;
            }

            .chord-button:active {
                background: #4a6a4a;
            }

            .chord-button.playing {
                background: #5a8a5a;
                box-shadow: 0 0 15px rgba(90, 138, 90, 0.6);
            }

            #keys {
                flex: 1;
                display: flex;
                flex-direction: column;
                gap: 1px;
                padding: 1px;
            }

            .key {
                flex: 1;
                background: linear-gradient(to right, #4a4a4a, #3a3a3a);
                border: 0.5px solid #1a1a1a;
                display: flex;
                align-items: center;
                justify-content: center;
                color: #fff;
                font-size: 16px;
                font-weight: bold;
                cursor: pointer;
                user-select: none;
                transition: background 0.1s;
                letter-spacing: 2px;
                line-height: 1.3;
                text-align: center;
            }

            .key.active {
                background: linear-gradient(to right, #6a9fb5, #4a7a8a);
            }
        }

        @media (min-width: 769px) {
            body::before {
                content: 'This instrument is designed for mobile devices. Please view on a phone or resize your browser window.';
                display: flex;
                align-items: center;
                justify-content: center;
                height: 100vh;
                color: #fff;
                font-size: 18px;
                padding: 20px;
                text-align: center;
            }
        }
