<div id="application">
    <header id="header">
        <ul>
            <li><img loading="lazy" src="storage/header__svg/sprmotion.png" alt="" style="width: 180px;" href="sprmotion.xyz"></li>
            <li class="HeaderSerach">
                <div action="http://localhost/sprmotions.xyz/" style="border: 1px solid #efefef;padding: 5px;border-radius: 5px;bottom: 2px;left: 100px; background-color: #edeef0;">
                    <input type="search" style="background-color: #edeef0;height: 25px;" placeholder="Поиск" autocomplete="off" name="q">
                    <input type="submit" value="Найти">
                </div>
            </li>
            <li></li>
            </li>
                <div class="select-theme">
                    <select id="theme">
                    <option value="auto">Auto</option>
                    <option value="light">Light</option>
                    <option value="dark">Dark</option>
                </select>
                </div>
        </ul>
    </header>
    <aside id="aside">
            <nav class="header-side-left">
                <a href="#" data-tippy-placement="right" id="play"></a>
                <a href="#" class="premium" data-tippy-placement="right" id="premium"></a>
                <a href="#" data-tippy-placement="right" id="trophy"></a>
                <a href="#" data-tippy-placement="right" id="learn"></a>
                <a href="#" data-tippy-placement="right" id="link"></a>
            </nav>
    </aside>
    <main id="main">
            <div class="wrap">
                    <div id="pages">
                    </div>         
            </div>
    </main>
</div>
   body{
        --background-color: #edeef0;
        width: 100%;
        height: 100%;
        --text-color: #000000;
    }
    *, :after, :before{
        transition: .4s;
        box-sizing: border-box;
        position: relative;    
        margin: 0;
        padding: 0;
        outline: none;
        color: #ffffff;
        text-shadow: none;
        box-shadow: none;
        border: 0;
        font-family: Roboto;
    }
    header{
        width: 100%;
        /* display: flex; */
        position: fixed;
        background-color: #fff;
        height: 48px;
        font-family: 'Roboto', sans-serif;
        left: 64px;
    }
    li{
        list-style: none;
        transition: none;
    }
    .HeaderSerach{
        border-radius: 4px;
        display: inline-block;
        bottom: 15px;
        padding: 5px;
    } 
    input[type="search"]::-ms-clear{display: none;}
    header ul{
        display: block;
    }

    header ul li{
        display: inline-block;
    }
    aside#aside {
        background: #ffffff;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 64px;
        z-index: 1199;
    }
    aside#aside a {
        vertical-align: middle;
        display: block;
        text-align: center;
        font-size: 0;
        height: 64px;
        width: 64px;
        line-height: 64px;
    }
    aside#aside nav {
        position: absolute;
        top: 50%;
        margin-top: -200px;
        bottom: 0;
        height: 400px;
    }
    #theme{
        display: inline-block;
        background-color: #edeef0;
        height: 25px;

    }
    select{
        outline: none;
    }
    .select-theme{
        margin-right: 82px;
        display: inline-block;
        bottom: 15px;
        float: right;
        margin-top: 27px;
        border-radius: 5px;
    }
    :root{
        --dark-background-color: #0a0f14;
        --dark-text-color: #eeeeee;
    }
    body.theme-dark {
        background-color: #141822;
        color: #ffffff;
    }
    header.theme-dark {
        background-color: #191d27;
        color: #ffffff;
    }
    aside#aside.theme-dark {
        background-color: #191d27;
        color: #ffffff;
    }
    @media (prefers-color-scheme: dark) {
        body.theme-auto {
            --background-color: var(--dark-background-color);
            --text-color: var(--dark-text-color);
        }
    }
    aside#aside.theme-dark{
        background: #191d27;
    }
    .wrap {
    height: unset;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.wrap {
    margin: 0 auto;
}
#pages {
    width: 100%;
    display: block;
    flex-grow: 1;
    overflow: hidden;
}
#application {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
}
html {
    min-height: 100%;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: roboto condensed,sans-serif;
    font-family: var(--font-family-0);
}
main {
    margin-left: 64px!important;
    height: 100%;
    margin-top: 48px!important;
    display: block;
    margin-right: 2px;
    overflow-y: auto;
}
function applyTheme(theme) {
    document.body.classList.remove("theme-auto", "theme-light", "theme-dark");
  $("#header").removeClass(); $("#aside").removeClass();
    document.body.classList.add(`theme-${theme}`);
  $("#header").addClass(`theme-${theme}`);
  $("#aside").addClass(`theme-${theme}`);
}

document.addEventListener("DOMContentLoaded", () => {
   document.querySelector("#theme").addEventListener("change", function() {
        applyTheme(this.value);
   });
});

document.addEventListener("DOMContentLoaded", () => {
    const savedTheme = localStorage.getItem("theme") || "auto";

    applyTheme(savedTheme);

    for (const optionElement of document.querySelectorAll("#theme option")) {
        optionElement.selected = savedTheme === optionElement.value;
    }

    document.querySelector("#theme").addEventListener("change", function () {
        localStorage.setItem("theme", this.value);
        applyTheme(this.value);
    });
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js