:root {
    --primary-color: #414438;
    --secondary-color: #666;
    --hover-color: blue;
    --background-color: #FFF;
    --link-color: #636363;
    --base-font-size: 18px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--base-font-size);
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Atkinson Hyperlegible', sans-serif;
    line-height: 1.8;
    padding: 20px;
    background-color: var(--background-color);
    margin: 0;
    box-sizing: border-box;
}

.container {
    max-width: 800px;
    width: 100%;
    background: var(--background-color);
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

.header-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.header-right {
    flex: 2;
    padding: 20px;
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: flex-start;
    color: var(--primary-color);
    max-width: 50%;
    gap: 1rem;
}

h1, h2 {
    color: var(--primary-color);
    font-size: 1.75rem;
    font-weight: bold;
    text-align: left;
    line-height: normal;
}

p, li {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.6;
    text-align: left;
}

a {
    color: var(--link-color);
    font-weight: 600;
    text-decoration: underline;
}

ul, li {
    list-style-type: none;
}

a:hover {
    text-decoration: none;
    background-color: yellow;
    color: black;
}

.footer-content {
    width: 100%;
}

.footer-content ul {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
}

@media screen and (max-width: 768px) {
    body {
        display: block;
        padding: 10px;
        min-height: auto;
    }

    .container {
        padding: 10px;
        max-width: 100%;
    }

    .header-content {
        flex-direction: column;
    }

    .header-right {
        max-width: 100%;
        padding: 15px;
    }

    h1, h2 {
        font-size: 1.8rem;
        text-align: center;
    }

    p, li {
        font-size: 0.9rem;
    }

    #canvas-container {
        max-width: 100%;
        height: auto;
    }
    
    canvas {
        max-width: 100%;
        height: auto;
    }

    ul {
        flex-direction: column;
        padding: 0;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #cfd8dc;
        --secondary-color: #b0bec5;
        --background-color: #272727;
        --text-color: #FFF;
        --link-color: #cfd8dc;
        --hover-color: yellow;
    }

    body {
        background-color: var(--background-color);
        color: var(--text-color);
    }

    .header-right, h1, h2, p, li, a {
        color: var(--text-color);
    }

    a:hover {
        background-color: yellow;
        color: black;
    }

    .container {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
}
