function createUI() {
    if (document.getElementById('ishak-settings-container')) return;

    const container = document.createElement('div');
    container.id = 'ishak-settings-container';
    container.style.cssText = 'position:fixed;bottom:20px;left:20px;z-index:10000;font-family:Arial,sans-serif;';

    const gearButton = document.createElement('button');
    gearButton.id = 'ishak-gear-button';
    gearButton.innerHTML = '⚙️';
    gearButton.style.cssText = 'width:40px;height:40px;border-radius:50%;background:white;color:black;font-size:24px;border:2px solid #ccc;cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,0.2);transition:transform 0.3s;display:flex;align-items:center;justify-content:center;';
    gearButton.addEventListener('mouseenter', () => gearButton.style.transform = 'rotate(30deg)');
    gearButton.addEventListener('mouseleave', () => gearButton.style.transform = 'rotate(0deg)');

    const menu = document.createElement('div');
    menu.id = 'ishak-menu';
    menu.style.cssText = 'position:absolute;bottom:50px;left:0;background:white;border-radius:8px;box-shadow:0 4px 15px rgba(0,0,0,0.2);padding:10px;min-width:280px;display:none;border:1px solid #ccc;';

    const menuTitle = document.createElement('div');
    menuTitle.textContent = 'Настройки Ишака';
    menuTitle.style.cssText = 'font-weight:bold;margin-bottom:8px;padding-bottom:5px;border-bottom:1px solid #eee;';
    menu.appendChild(menuTitle);

    // ========== КАТЕГОРИЯ "ФАН" ==========
    const funDetails = document.createElement('details');
    funDetails.style.marginBottom = '8px';
    const funSummary = document.createElement('summary');
    funSummary.textContent = '🎉 Фан';
    funSummary.style.cssText = 'font-weight:bold;cursor:pointer;margin-bottom:4px;';
    funDetails.appendChild(funSummary);

    const funContainer = document.createElement('div');
    funContainer.style.paddingLeft = '8px';

    // Робот-Ишак
    const robotContainer = document.createElement('div');
    robotContainer.style.cssText = 'display:flex;align-items:center;justify-content:space-between;margin-bottom:5px;';
    const robotLabel = document.createElement('span');
    robotLabel.textContent = 'Робот-Ишак';
    const robotInput = document.createElement('input');
    robotInput.type = 'checkbox';
    robotInput.id = 'robot-ishak-toggle';
    robotContainer.appendChild(robotLabel); robotContainer.appendChild(robotInput);
    funContainer.appendChild(robotContainer);

    // Психоделия --
    const lightContainer = document.createElement('div');
    lightContainer.style.cssText = 'display:flex;align-items:center;justify-content:space-between;margin-bottom:5px;';
    const lightLabel = document.createElement('span');
    lightLabel.textContent = 'Психоделия --';
    const lightInput = document.createElement('input');
    lightInput.type = 'checkbox';
    lightInput.id = 'psychedelic-light-toggle';
    lightContainer.appendChild(lightLabel); lightContainer.appendChild(lightInput);
    funContainer.appendChild(lightContainer);

    // Психоделия ++
    const heavyContainer = document.createElement('div');
    heavyContainer.style.cssText = 'display:flex;align-items:center;justify-content:space-between;margin-bottom:5px;';
    const heavyLabel = document.createElement('span');
    heavyLabel.textContent = 'Психоделия ++';
    const heavyInput = document.createElement('input');
    heavyInput.type = 'checkbox';
    heavyInput.id = 'psychedelic-heavy-toggle';
    heavyContainer.appendChild(heavyLabel); heavyContainer.appendChild(heavyInput);
    funContainer.appendChild(heavyContainer);

    // Ишакображение
    const ishakifyContainer = document.createElement('div');
    ishakifyContainer.style.cssText = 'display:flex;align-items:center;justify-content:space-between;margin-bottom:5px;';
    const ishakifyLabel = document.createElement('span');
    ishakifyLabel.textContent = 'Ишакображение';
    const ishakifyInput = document.createElement('input');
    ishakifyInput.type = 'checkbox';
    ishakifyInput.id = 'ishakify-toggle';
    ishakifyContainer.appendChild(ishakifyLabel); ishakifyContainer.appendChild(ishakifyInput);
    funContainer.appendChild(ishakifyContainer);

    funDetails.appendChild(funContainer);
    menu.appendChild(funDetails);

    // ========== КАТЕГОРИЯ "ИНСТРУМЕНТЫ" ==========
    const toolsDetails = document.createElement('details');
    toolsDetails.style.marginBottom = '8px';
    const toolsSummary = document.createElement('summary');
    toolsSummary.textContent = '🔧 Инструменты';
    toolsSummary.style.cssText = 'font-weight:bold;cursor:pointer;margin-bottom:4px;';
    toolsDetails.appendChild(toolsSummary);

    const toolsContainer = document.createElement('div');
    toolsContainer.style.paddingLeft = '8px';

    // Автодополнение Python
    const autocompleteContainer = document.createElement('div');
    autocompleteContainer.style.cssText = 'display:flex;align-items:center;justify-content:space-between;margin-bottom:5px;';
    const autocompleteLabel = document.createElement('span');
    autocompleteLabel.textContent = 'Автодополнение Python';
    const autocompleteInput = document.createElement('input');
    autocompleteInput.type = 'checkbox';
    autocompleteInput.id = 'autocomplete-toggle';
    autocompleteContainer.appendChild(autocompleteLabel); autocompleteContainer.appendChild(autocompleteInput);
    toolsContainer.appendChild(autocompleteContainer);

    // Выбор клавиши для автодополнения
    const keySelectContainer = document.createElement('div');
    keySelectContainer.id = 'autocomplete-key-select-container';
    keySelectContainer.style.cssText = 'display:none;align-items:center;justify-content:space-between;margin-bottom:5px;margin-left:8px;';
    const keySelectLabel = document.createElement('span');
    keySelectLabel.textContent = 'Клавиша:';
    keySelectLabel.style.fontSize = '12px';
    const keySelect = document.createElement('select');
    keySelect.id = 'autocomplete-key-select';
    keySelect.style.cssText = 'padding:2px 4px;font-size:12px;border-radius:4px;border:1px solid #ccc;';
    const optionEnter = document.createElement('option'); optionEnter.value = 'Enter'; optionEnter.textContent = 'Enter';
    const optionTab = document.createElement('option'); optionTab.value = 'Tab'; optionTab.textContent = 'Tab';
    keySelect.appendChild(optionEnter); keySelect.appendChild(optionTab);
    keySelectContainer.appendChild(keySelectLabel); keySelectContainer.appendChild(keySelect);
    toolsContainer.appendChild(keySelectContainer);

    // Подсветка синтаксиса
    const highlightContainer = document.createElement('div');
    highlightContainer.style.cssText = 'display:flex;align-items:center;justify-content:space-between;margin-bottom:5px;';
    const highlightLabel = document.createElement('span');
    highlightLabel.textContent = 'Подсветка синтаксиса';
    const highlightInput = document.createElement('input');
    highlightInput.type = 'checkbox';
    highlightInput.id = 'syntax-highlight-toggle';
    highlightContainer.appendChild(highlightLabel); highlightContainer.appendChild(highlightInput);
    toolsContainer.appendChild(highlightContainer);

    toolsDetails.appendChild(toolsContainer);
    menu.appendChild(toolsDetails);

    // ========== КАТЕГОРИЯ "ТЕМА" ==========
    const themeDetails = document.createElement('details');
    themeDetails.style.marginBottom = '8px';
    const themeSummary = document.createElement('summary');
    themeSummary.textContent = '🎨 Тема';
    themeSummary.style.cssText = 'font-weight:bold;cursor:pointer;margin-bottom:4px;';
    themeDetails.appendChild(themeSummary);

    const themeContainer = document.createElement('div');
    themeContainer.style.paddingLeft = '8px';

    // Цвет первой буквы
    const colorContainer = document.createElement('div');
    colorContainer.style.cssText = 'display:flex;align-items:center;justify-content:space-between;margin-bottom:5px;';
    const colorLabel = document.createElement('span');
    colorLabel.textContent = 'Цвет первой буквы';
    const colorSelect = document.createElement('select');
    colorSelect.id = 'name-first-letter-color';
    colorSelect.style.cssText = 'padding:2px 4px;font-size:12px;border-radius:4px;border:1px solid #ccc;';
    const colors = [
        { value: '#00FF00', name: 'Зелёный' },
        { value: '#FF0000', name: 'Красный' },
        { value: '#0000FF', name: 'Синий' },
        { value: '#FFA500', name: 'Оранжевый' },
        { value: '#800080', name: 'Фиолетовый' }
    ];
    colors.forEach(c => {
        const opt = document.createElement('option');
        opt.value = c.value;
        opt.textContent = c.name;
        colorSelect.appendChild(opt);
    });
    colorContainer.appendChild(colorLabel); colorContainer.appendChild(colorSelect);
    themeContainer.appendChild(colorContainer);

    // ... после добавления colorContainer (цвет первой буквы) ...

    // ========== ПОДКАТЕГОРИЯ "РЕДАКТОР КОДА" ==========
    const editorDetails = document.createElement('details');
    editorDetails.style.marginBottom = '8px';
    editorDetails.style.marginTop = '5px';
    const editorSummary = document.createElement('summary');
    editorSummary.textContent = '✏️ Редактор кода';
    editorSummary.style.cssText = 'font-weight:bold;cursor:pointer;margin-bottom:4px;';
    editorDetails.appendChild(editorSummary);

    const editorContainer = document.createElement('div');
    editorContainer.style.paddingLeft = '8px';

    // Шрифт
    const fontContainer = document.createElement('div');
    fontContainer.style.cssText = 'display:flex;align-items:center;justify-content:space-between;margin-bottom:5px;';
    const fontLabel = document.createElement('span');
    fontLabel.textContent = 'Шрифт';
    const fontSelect = document.createElement('select');
    fontSelect.id = 'editor-font-family';
    fontSelect.style.cssText = 'padding:2px 4px;font-size:12px;border-radius:4px;border:1px solid #ccc;';
    const fontOptions = [
        'Fira Code, monospace',
        'Consolas, monospace',
        'Monaco, monospace',
        'Courier New, monospace',
        'Arial, sans-serif',
        'Times New Roman, serif'
    ];
    fontOptions.forEach(f => {
        const opt = document.createElement('option');
        opt.value = f;
        opt.textContent = f.split(',')[0];
        fontSelect.appendChild(opt);
    });
    fontContainer.appendChild(fontLabel); fontContainer.appendChild(fontSelect);
    editorContainer.appendChild(fontContainer);

    // Размер шрифта
    const sizeContainer = document.createElement('div');
    sizeContainer.style.cssText = 'display:flex;align-items:center;justify-content:space-between;margin-bottom:5px;';
    const sizeLabel = document.createElement('span');
    sizeLabel.textContent = 'Размер (px)';
    const sizeInput = document.createElement('input');
    sizeInput.type = 'number';
    sizeInput.id = 'editor-font-size';
    sizeInput.min = 8;
    sizeInput.max = 30;
    sizeInput.step = 1;
    sizeInput.style.cssText = 'width:60px;padding:2px 4px;font-size:12px;border-radius:4px;border:1px solid #ccc;';
    sizeContainer.appendChild(sizeLabel); sizeContainer.appendChild(sizeInput);
    editorContainer.appendChild(sizeContainer);

    // Межстрочный интервал
    const lineHeightContainer = document.createElement('div');
    lineHeightContainer.style.cssText = 'display:flex;align-items:center;justify-content:space-between;margin-bottom:5px;';
    const lineHeightLabel = document.createElement('span');
    lineHeightLabel.textContent = 'Интервал';
    const lineHeightInput = document.createElement('input');
    lineHeightInput.type = 'number';
    lineHeightInput.id = 'editor-line-height';
    lineHeightInput.min = 1.0;
    lineHeightInput.max = 3.0;
    lineHeightInput.step = 0.1;
    lineHeightInput.style.cssText = 'width:60px;padding:2px 4px;font-size:12px;border-radius:4px;border:1px solid #ccc;';
    lineHeightContainer.appendChild(lineHeightLabel); lineHeightContainer.appendChild(lineHeightInput);
    editorContainer.appendChild(lineHeightContainer);

    // Цвет текста
    const textColorContainer = document.createElement('div');
    textColorContainer.id = 'editor-text-color-container';
    textColorContainer.style.cssText = 'display:none;align-items:center;justify-content:space-between;margin-bottom:5px;margin-top:5px;';
    const textColorLabel = document.createElement('span');
    textColorLabel.textContent = 'Цвет текста';
    const textColorSelect = document.createElement('select');
    textColorSelect.id = 'editor-text-color';
    textColorSelect.style.cssText = 'padding:2px 4px;font-size:12px;border-radius:4px;border:1px solid #ccc;';
    const blackOption = document.createElement('option');
    blackOption.value = '#000000';
    blackOption.textContent = 'Чёрный';
    const whiteOption = document.createElement('option');
    whiteOption.value = '#FFFFFF';
    whiteOption.textContent = 'Белый';
    textColorSelect.appendChild(blackOption);
    textColorSelect.appendChild(whiteOption);
    textColorContainer.appendChild(textColorLabel);
    textColorContainer.appendChild(textColorSelect);
    editorContainer.appendChild(textColorContainer);

    editorDetails.appendChild(editorContainer);
    themeContainer.appendChild(editorDetails);

    // ========== ОСТАЛЬНЫЕ НАСТРОЙКИ ТЕМЫ (кастомный фон, прозрачность) ==========
    // ... продолжение с backgroundContainer и transparencyContainer ...

    // Кастомный фон
    const backgroundContainer = document.createElement('div');
    backgroundContainer.style.marginTop = '10px';
    backgroundContainer.style.borderTop = '1px solid #eee';
    backgroundContainer.style.paddingTop = '5px';

    const backgroundCheckboxContainer = document.createElement('div');
    backgroundCheckboxContainer.style.cssText = 'display:flex;align-items:center;justify-content:space-between;margin-bottom:5px;';
    const backgroundCheckboxLabel = document.createElement('span');
    backgroundCheckboxLabel.textContent = 'Кастомный фон';
    const backgroundCheckbox = document.createElement('input');
    backgroundCheckbox.type = 'checkbox';
    backgroundCheckbox.id = 'custom-background-toggle';
    backgroundCheckboxContainer.appendChild(backgroundCheckboxLabel);
    backgroundCheckboxContainer.appendChild(backgroundCheckbox);
    backgroundContainer.appendChild(backgroundCheckboxContainer);

    const urlContainer = document.createElement('div');
    urlContainer.id = 'custom-background-url-container';
    urlContainer.style.cssText = 'display:none;margin-left:8px;margin-bottom:5px;';
    const urlLabel = document.createElement('span');
    urlLabel.textContent = 'URL изображения';
    urlLabel.style.fontSize = '12px';
    const urlInput = document.createElement('input');
    urlInput.type = 'text';
    urlInput.id = 'custom-background-url';
    urlInput.style.cssText = 'width:100%;padding:2px 4px;font-size:12px;border-radius:4px;border:1px solid #ccc;margin-top:2px;';
    urlContainer.appendChild(urlLabel);
    urlContainer.appendChild(urlInput);

    const blurContainer = document.createElement('div');
    blurContainer.id = 'custom-background-blur-container';
    blurContainer.style.cssText = 'display:none;margin-left:8px;margin-bottom:5px;';
    const blurLabel = document.createElement('span');
    blurLabel.textContent = 'Размытие: 0px';
    blurLabel.style.fontSize = '12px';
    const blurSlider = document.createElement('input');
    blurSlider.type = 'range';
    blurSlider.id = 'custom-background-blur';
    blurSlider.min = 0;
    blurSlider.max = 20;
    blurSlider.step = 1;
    blurSlider.value = 0;
    blurSlider.style.cssText = 'width:100%;';
    blurContainer.appendChild(blurLabel);
    blurContainer.appendChild(blurSlider);

    backgroundContainer.appendChild(urlContainer);
    backgroundContainer.appendChild(blurContainer);
    themeContainer.appendChild(backgroundContainer);

    // Прозрачные элементы
    const transparencyContainer = document.createElement('div');
    transparencyContainer.style.cssText = 'display:flex;align-items:center;justify-content:space-between;margin-top:5px;border-top:1px solid #eee;padding-top:5px;';
    const transparencyLabel = document.createElement('span');
    transparencyLabel.textContent = 'Прозрачные элементы';
    const transparencyCheckbox = document.createElement('input');
    transparencyCheckbox.type = 'checkbox';
    transparencyCheckbox.id = 'transparency-toggle';
    transparencyContainer.appendChild(transparencyLabel);
    transparencyContainer.appendChild(transparencyCheckbox);
    themeContainer.appendChild(transparencyContainer);

    themeDetails.appendChild(themeContainer);
    menu.appendChild(themeDetails);

    // ========== Контейнер для кнопки обновления ==========
    const updateContainer = document.createElement('div');
    updateContainer.id = 'update-button-container';
    updateContainer.style.marginTop = '10px';
    menu.appendChild(updateContainer);

    container.appendChild(gearButton);
    container.appendChild(menu);
    document.body.appendChild(container);

    // ========== ЛОГИКА ПЕРЕКЛЮЧАТЕЛЕЙ ==========

    // Психоделия
    function updatePsychedelicFromUI() {
        if (lightInput.checked && heavyInput.checked) heavyInput.checked = false;
        if (lightInput.checked) window.setPsychedelicMode('light');
        else if (heavyInput.checked) window.setPsychedelicMode('heavy');
        else window.setPsychedelicMode('off');
    }
    lightInput.addEventListener('change', () => {
        if (lightInput.checked) heavyInput.checked = false;
        updatePsychedelicFromUI();
    });
    heavyInput.addEventListener('change', () => {
        if (heavyInput.checked) lightInput.checked = false;
        updatePsychedelicFromUI();
    });

    // Ишакображение
    ishakifyInput.addEventListener('change', e => {
        e.target.checked ? window.enableIshakify() : window.disableIshakify();
    });

    // Робот-Ишак
    robotInput.addEventListener('change', e => {
        window.robotToggleState = e.target.checked;
        window.saveRobotState(window.robotToggleState);
        window.applyRobotReplacement();
    });

    // Автодополнение
    function updateKeySelectVisibility() {
        keySelectContainer.style.display = autocompleteInput.checked ? 'flex' : 'none';
    }
    autocompleteInput.addEventListener('change', e => {
        if (e.target.checked) window.enableAutocomplete(); else window.disableAutocomplete();
        updateKeySelectVisibility();
    });
    keySelect.addEventListener('change', e => {
        if (window.saveConfirmKey) window.saveConfirmKey(e.target.value);
    });

    // ========== ИЗМЕНЕНО: Подсветка синтаксиса и управление видимостью цвета текста ==========
    function updateTextColorVisibility() {
        const textColorContainerElem = document.getElementById('editor-text-color-container');
        if (highlightInput.checked) {
            textColorContainerElem.style.display = 'flex';
        } else {
            textColorContainerElem.style.display = 'none';
        }
    }
    highlightInput.addEventListener('change', e => {
        if (e.target.checked) {
            window.enableHighlight();
        } else {
            window.disableHighlight();
        }
        updateTextColorVisibility();
    });
    // ========== КОНЕЦ ИЗМЕНЕНИЙ ==========

    // Тема: цвет
    colorSelect.addEventListener('change', e => {
        if (window.updateNameColor) window.updateNameColor(e.target.value);
    });

    // Тема: шрифт, размер, интервал
    function updateFontSettings() {
        const family = fontSelect.value;
        const size = parseInt(sizeInput.value, 10);
        const lineHeight = parseFloat(lineHeightInput.value);
        if (window.applyFontSettings) {
            window.applyFontSettings(family, size, lineHeight);
        }
    }
    fontSelect.addEventListener('change', updateFontSettings);
    sizeInput.addEventListener('input', updateFontSettings);
    lineHeightInput.addEventListener('input', updateFontSettings);

    // ========== ИЗМЕНЕНО: обработчик выбора цвета текста ==========
    textColorSelect.addEventListener('change', (e) => {
        if (window.updateTextColor) {
            window.updateTextColor(e.target.value);
        }
    });
    // Установка начального значения
    if (window.loadTextColor) {
        textColorSelect.value = window.loadTextColor();
    }
    // ========== КОНЕЦ ИЗМЕНЕНИЙ ==========

    // Кастомный фон
    backgroundCheckbox.addEventListener('change', (e) => {
        const checked = e.target.checked;
        urlContainer.style.display = checked ? 'block' : 'none';
        blurContainer.style.display = checked ? 'block' : 'none';
        if (checked) {
            const url = urlInput.value.trim();
            const blur = parseInt(blurSlider.value, 10);
            if (url) {
                window.enableBackground(url, blur);
            }
        } else {
            window.disableBackground();
        }
    });

    urlInput.addEventListener('input', () => {
        if (backgroundCheckbox.checked) {
            const url = urlInput.value.trim();
            const blur = parseInt(blurSlider.value, 10);
            if (url) {
                window.enableBackground(url, blur);
            } else {
                window.disableBackground();
            }
        }
    });

    blurSlider.addEventListener('input', () => {
        if (backgroundCheckbox.checked) {
            const url = urlInput.value.trim();
            const blur = parseInt(blurSlider.value, 10);
            blurLabel.textContent = `Размытие: ${blur}px`;
            if (url) {
                window.enableBackground(url, blur);
            } else {
                window.disableBackground();
            }
        }
    });

    // Прозрачные элементы
    transparencyCheckbox.addEventListener('change', e => {
        if (e.target.checked) {
            window.enableTransparency();
        } else {
            window.disableTransparency();
        }
    });

    // Установка начального состояния
    if (window.loadTransparencyState) {
        transparencyCheckbox.checked = window.loadTransparencyState();
    }

    // Установка начальных значений
    const bgSettings = window.loadBackgroundSettings ? window.loadBackgroundSettings() : { enabled: false, url: '', blur: 0 };
    backgroundCheckbox.checked = bgSettings.enabled;
    urlInput.value = bgSettings.url;
    blurSlider.value = bgSettings.blur;
    blurLabel.textContent = `Размытие: ${bgSettings.blur}px`;
    urlContainer.style.display = bgSettings.enabled ? 'block' : 'none';
    blurContainer.style.display = bgSettings.enabled ? 'block' : 'none';
    if (bgSettings.enabled && bgSettings.url) {
        window.enableBackground(bgSettings.url, bgSettings.blur);
    }

    // ========== УСТАНОВКА НАЧАЛЬНЫХ СОСТОЯНИЙ ==========
    const savedMode = window.loadPsychedelicMode ? window.loadPsychedelicMode() : 'off';
    lightInput.checked = (savedMode === 'light');
    heavyInput.checked = (savedMode === 'heavy');
    ishakifyInput.checked = window.loadIshakifyState ? window.loadIshakifyState() : false;
    robotInput.checked = window.loadRobotState ? window.loadRobotState() : false;
    const autocompleteState = window.loadAutocompleteState ? window.loadAutocompleteState() : false;
    autocompleteInput.checked = autocompleteState;
    updateKeySelectVisibility();
    if (window.loadConfirmKey) keySelect.value = window.loadConfirmKey();
    if (window.applyRobotReplacement) window.applyRobotReplacement();

    // Подсветка
    if (window.loadHighlightState) {
        highlightInput.checked = window.loadHighlightState();
        updateTextColorVisibility(); // показываем/скрываем цвет текста
    }

    // Тема: цвет
    if (window.loadNameColor) colorSelect.value = window.loadNameColor();

    // Тема: шрифт
    const savedFont = window.loadFontSettings ? window.loadFontSettings() : { fontFamily: 'Fira Code, monospace', fontSize: 16, lineHeight: 1.4 };
    fontSelect.value = savedFont.fontFamily;
    sizeInput.value = savedFont.fontSize;
    lineHeightInput.value = savedFont.lineHeight;

    // ========== КНОПКА ОБНОВЛЕНИЙ ==========
    window.updateMenuButton = (data) => {
        const cont = document.getElementById('update-button-container');
        if (!cont) return;
        const oldBtn = document.getElementById('download-update-button');
        if (oldBtn) oldBtn.remove();
        if (data) {
            const downloadBtn = document.createElement('a');
            downloadBtn.id = 'download-update-button';
            downloadBtn.href = data.download_url;
            downloadBtn.target = '_blank';
            downloadBtn.textContent = 'Скачать обновления';
            downloadBtn.style.cssText = 'display:block;width:100%;padding:8px;background:#4CAF50;color:white;text-decoration:none;border-radius:4px;text-align:center;font-size:14px;box-sizing:border-box;';
            cont.appendChild(downloadBtn);
        }
    };
    if (window.latestVersionData) window.updateMenuButton(window.latestVersionData);

    // Обработчик кнопки
    gearButton.addEventListener('click', () => {
        menu.style.display = menu.style.display === 'none' ? 'block' : 'none';
    });

    document.addEventListener('click', e => {
        if (!container.contains(e.target)) menu.style.display = 'none';
    });
}