body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(to bottom, #66b3ff 0%, #99c2ff 50%, #66b3ff 100%);
    color: #fff;
    text-align: left;
    padding: 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

main {
    flex-grow: 1; /* Allow main to grow and take remaining space */
    padding: 1em; /* Add padding to create space around the content */
    }

/* Add this CSS to create space between header and each section */
section {
    margin-top: 20px; /* Adjust this value as needed */
}

body {
    margin-top: 70px; /* Adjust this value based on the height of your header */
}

section {
            margin-left: 20px; /* Adjust the margin value as needed */
            margin-top: 20px; /* Adjust this value as needed */
        }

header h2 {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    margin-top: 0px;
    margin-right: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

header h2 a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
}

nav {
    box-sizing: border-box;
    padding-right: 20px; /* Adjust the padding as needed */
}

nav button,
nav a {
    color: #fff;
    background-color: #66b3ff;
    border: none;
    padding: 1em;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    margin-right: 10px; /* Adjust the right margin as needed */
}

nav button:hover,
nav a:hover {
    background-color: #005bb5;
}

main {
    padding: 1em;
}

footer {
    background: linear-gradient(to bottom, #66b3ff 0%, #99c2ff 50%, #66b3ff 100%);
    color: #fff;
    text-align: right;
    padding: 1em;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
}

/* Lighten the color of links in the main content */
main a {
    color: #0080ff; /* Adjust the color as needed */
}

main a:visited {
    color: #800080; /* Adjust the color as needed */
}

/* Dark mode styles */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #fff;
    }

    header,
    footer {
        background: linear-gradient(to bottom, #001f3f 0%, #003366 50%, #001f3f 100%);
    }

    nav button,
    nav a {
        background-color: #003366;
    }

    nav button:hover,
    nav a:hover {
        background-color: #005bb5;
    } 
    
    /* Adjust the color of links in dark mode */
    main a {
    color: #0080ff; /* Adjust the color as needed */
}
    main a:visited {
        color: #aa80ff; /* Adjust the color as needed */
    }
}

@media only screen and (max-width: 600px) {
    header {
        padding: 0.5em; /* Adjust the padding as needed */
    }

    header h2 {
        font-size: 16px; /* Adjust the font size as needed */
        line-height: 1; /* Adjust line height if necessary */
        margin-bottom: 5px; /* Adjust the margin as needed */
    }

    header nav {
        flex-direction: column; /* Arrange navigation buttons in a column */
        align-items: center; /* Center align navigation buttons */
    }

    nav button,
    nav a {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    section {
        margin-left: 0; /* Reduce side margin on small screens */
    }
}
