<style>
    .box {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-left: 25px;  
    }

	.row {
    display: flex;
    flex-direction: row;
}

    .container {
        display: flex;
        flex-direction: column;
    }
</style>

<div class="container">
    <div class="row" style="margin-top:5%;">
        <div class="box">
            <p>Mystery</p>
            <button class="button" onclick="setFortniteMode()">Toggle</button>
        </div>
        <div class="box">
            <p>About:Blank Cloaking</p>
            <button class="button" onclick="abc()">Click Me</button>
        </div>
        <div class="box">
            <p>Title</p>
            <input type="text" class="settingsInput button" onchange="changeTitle(this.value)" placeholder="Change Title" />
            <input type="text" class="settingsInput button" onchange="changeFavicon(this.value)" placeholder="Change Favicon (URL)" />
        </div>
    </div>
    <div class="row">
        <div class="box">
            <p>Search Engine</p>
            <select class="browsers" id="browsers" onchange="changeSearch(this)">
                <option>Google</option>
                <option>DuckDuckGo</option>
                <option>Brave</option>
            </select>
        </div>
        <div class="box">
            <p>Custom Themes</p>
            <input type="color" id="colorPicker" class="settingsInput button" oninput="changeTheme(this.value)">
            <button onclick="resetTheme()" class="button">Reset</button>
        </div>
        <div class="box">
            <p>Proxy Type</p>
            <select class="browsers" id="proxy" onchange="changeProxy(this)">
                <option>Ultraviolet</option>
                <option>Dynamic</option>
            </select>
        </div>
    </div>
</div>

<div style="margin-top: 50%; z-index: 1;">
    <%- include("ad"); %>
</div>
<script src="/assets/js/settings.js"></script>
<script>
    // Check and set the background when the page loads
    window.onload = function() {
        if (localStorage.getItem('fortniteMode') === 'activated') {
            document.body.style.backgroundImage = "url('https://i.ytimg.com/vi/6evDWowLMbE/maxresdefault.jpg')";
        }
    }

    function setFortniteMode() {
        if (localStorage.getItem('fortniteMode') === 'activated') {
            // If Fortnite Mode is already activated, deactivate it
            document.body.style.backgroundImage = "";
            localStorage.setItem('fortniteMode', 'deactivated');
        } else {
            // Otherwise, activate it
            document.body.style.backgroundImage = "url('https://i.ytimg.com/vi/6evDWowLMbE/maxresdefault.jpg')";
            localStorage.setItem('fortniteMode', 'activated');
        }
    }
</script>

