html, body {
    background-color: #f4f4f4;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* More targeted margin/padding reset */
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd {
    margin: 0;
    padding: 0;
}

ul {
    list-style: none;
}

/* --- Main Layout Structure --- */
body {
    display: flex;
    flex-direction: column;
}

#app-container {
    display: flex;
    flex-grow: 1;
    height: calc(100vh - 60px);
    /* Full height minus header */
}


/* --- Header --- */
header {
    box-sizing: border-box;
    background-color: #333;
    padding: 15px 20px;
    height: 60px;
    color: #fff;
    text-align: center;

}

/* --- Navigation Menu --- */
nav {
    box-sizing: border-box;
    border-right: 1px solid #ddd;
    background-color: #f4f4f4;
    padding: 20px 0;
    width: 200px;
    overflow-y: auto;
}

nav ul {
    list-style-type: none;
}

nav ul li a {
    display: flex;
    align-content: center;
    align-items: center;
    transition: background-color 0.2s, color 0.2s;
    padding: 12px 20px;
    color: #333;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
}

nav ul li:hover {
    background-color: #4CAF50;
    color: #fff;
}

nav ul li:hover a {
    color: #fff;
}

/* --- Main Content Area --- */
main {
    flex-grow: 1;
}

iframe {
    border: none;
    width: 100%;
    height: 100%;
}

#update-notification {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    background-color: #333;
    padding: 15px 25px;
    color: white;
    font-family: sans-serif;
    text-align: center;
}

#update-notification button {
    cursor: pointer;
    margin-left: 15px;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    padding: 8px 16px;
    color: white;
}

.favicon {
    vertical-align: middle;
    margin-right: 5px;
    width: 16px;
    height: 16px;
}

#hamburger-menu {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1100;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background: #4CAF50;
    padding: 8px 12px;
    color: white;
    font-size: 20px;
}


#sidebar {
    display: flex;
    flex-direction: column;
    transform: translateX(-200px);
    transition: transform 0.3s ease-in-out, width 0.3s ease-in-out, border-right-color 0.3s ease-in-out;
    box-sizing: content-box;
    background-color: #333;
    padding-top: 2em;
    width: 200px;
    height: 100vh;
}


#sidebar.collapsed {
    position: absolute;
    left: 0;
    border-right-color: transparent;
    width: 0px;
    overflow: hidden;
}

#sidebar.overlay {
    position: absolute;
    left: 0;
    transform: translateX(0);
    z-index: 1000;
    width: 200px;
}

#sidebar.overlay ul li a {
    display: block;
    box-sizing: border-box;
    padding: 15px 5px 10px 20px;
    width: 100%;
    overflow: hidden;
    color: white;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#sidebar ul li.active {
    border-left: 4px solid #2e7d32;
    background-color: #4CAF50;
    color: white;

}

.sidebar-content {
    display: flex;
    flex-direction: column;
}

.sidebar-info {
    margin-top: 20em;
    border-top: 1px solid #444;
    padding: 1em 15px;
    color: #555;
    font-size: 0.9em;
}

.sidebar-info h3 {
    margin: 1em 0 0.5em 0;
    padding-bottom: 2px;
    color: lightsteelblue;
    font-size: 0.9em;
}

.sidebar-info a {
    padding-left: 1em;
    color: #f4f4f4;
    text-decoration: none;
}

.sidebar-info a:hover {
    text-decoration: underline;
}

.maintained-by-link {
    display: block;
    margin-bottom: 1em;
}

.version-label {
    margin-top: auto;
    margin-bottom: 110px;
    border-top: 1px solid #444;
    background-color: #333;
    padding: 8px;
    overflow: hidden;
    color: #ccc;
    font-size: 0.85em;
    text-align: center;
    text-wrap: nowrap;
}

/* Styles for mobile devices */
@media (max-width: 767px) {
    #hamburger-menu {
        display: block;
    }

    #sidebar {
        position: absolute;
        left: -200px;
        box-sizing: content-box;
        padding-top: 0em;
    }

    #sidebar.overlay {
        left: 0;
        transform: translateX(0);
    }

    .sidebar-info {
        margin-top: 0em;
    }

    .version-label {
        margin-top: 1em;
        padding-top: 0;;
    }
}


@media (prefers-color-scheme: dark) {

    html, body {
        background-color: #2a2a2a;
        color: #f4f4f4;
    }

    /* --- Header --- */
    header {
        background-color: #202020;
        color: #f4f4f4;
    }

    /* --- Navigation Menu --- */
    nav {
        border-right: 1px solid #444;
        background-color: #2a2a2a;
    }

    nav ul li a {
        color: #f4f4f4;
    }


    nav ul li:hover {
        background-color: #6B9C6D;
        color: #202020;
    }

    nav ul li:hover a {
        color: #202020;
    }

    .version-label {
        border-top: 1px solid #444;
        background-color: #2a2a2a;
        color: #f4f4f4;
    }

}