* {
    overflow: auto;
    position: relative;
    /* transition-property: background, color, fill, stroke, text-shadow, border-color;
    transition-duration: 50ms;
    -moz-transition-duration: 500ms;
    transition-timing-function: ease-in-out; */
}

:root {
    --gradient: linear-gradient(to right, #F0F0F0, lightgrey);
    --input-bg-color: #F0F0F0;
    --main-bg-color: white;
    --input-border-color: #E0E0E0;
    --pre-color: #F0F0F0;
    --main-fg-color: black;
    --text-shadow: 0.5rem 0.5rem 1rem rgba(0, 0, 0, 0.64), -0.5rem -0.5rem 1rem rgba(0, 0, 0, 0.48);
    --jflap-text: white;
    --jflap-fill: black;
    --jflap-accent: #ffff96;
}

:root.theme {
    --gradient: linear-gradient(to right, #303030, #202020);
    --input-bg-color: #101010;
    --main-bg-color: black;
    --input-border-color: #2F2F2F;
    --pre-color: #1F1F1F;
    --main-fg-color: white;
    --text-shadow: 0.5rem 0.5rem 1rem rgba(255, 255, 255, 0.96), -0.5rem -0.5rem 1rem rgba(255, 255, 255, 0.64);
    --jflap-text: black;
    --jflap-fill: white;
    --jflap-accent: #006900;
}

body {
    background-color: var(--main-bg-color);
    color: var(--main-fg-color);
    font-family: 'Noto Mono', monospace;
    scroll-behavior: smooth;
}

header {
    background-color: var(--main-bg-color);
    left: 0;
    position: fixed;
    top: 0;
    white-space: nowrap;
    width: 100%;
    z-index: 1;
}

main {
    margin: 3rem 1rem 1rem 1rem;
    line-height: 1.5;
}

footer {
    left: 1rem;
    bottom: 0;
    font-size: 0.8rem;
    position: fixed;
}

h1, h2, h3, h4, h5, h6 {
    line-height: normal;
    text-align: center;
}

pre {
    background-color: var(--pre-color);
    margin: 1rem;
    padding: 1rem;
}

a:link, a:visited, a:hover, a:active {
    color: green;
    text-decoration: none;
}

table {
    margin-block: 1rem;
}

table > thead > tr > th, table > tbody > tr > td {
    padding: .5rem;
}

table > thead, table > tbody > tr:nth-child(even) {
    background-color: var(--pre-color);
}

header > nav {
    background-color: var(--main-bg-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: calc(100% - 112px);
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 2;
    scrollbar-width: thin;
}

header > div.switch {
    background-color: var(--main-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    float: right;
    position: fixed;
    right: 15px;
    top: 15px;
    z-index: 3;
}

header > div.switch > #EN, #DE, #themeSwitch {
    margin-inline: 0.25rem;
}

header > nav > a {
    flex: 0 0 auto;
    font-size: 1.2rem;
    outline: none;
    padding: 1.2rem;
    text-align: center;
    text-shadow: var(--text-shadow);
}

header > nav > a:hover, header > nav > a:focus, header > nav > a:active {
    transform: scale(1.1);
}

ul.content > li {
    list-style-position: inside;
    margin-block: 1rem;
    padding-inline: 0.2rem;
}

ul.content > li > ul.content > li, ul.sources > li {
    list-style-position: inside;
    margin-block: 0.5rem;
    padding-inline: 0.1rem;
}

ul.content > li > ol.content > li {
    list-style-position: inside;
    list-style-type: lower-roman;
    margin-block: 0.5rem;
    padding-inline: 0.1rem;
}

.center {
    display: flex;
    align-items: center;
    justify-content: center;
}

div.center {
    margin-block: 2rem;
    text-align: center;
}

a.button {
    background-image: var(--gradient);
    border: none;
    border-radius: 2rem;
    color: green;
    font-size: 1.2rem;
    font-weight: bold;
    outline: none;
    padding: 0.4rem 1.2rem;
    text-align: center;
    text-transform: capitalize;
}

input, select {
    accent-color: green;
    background-color: var(--input-bg-color);
    border-color: var(--input-border-color);
    border-radius: 4px;
    color: var(--main-fg-color);
    margin-block: 1rem;
    padding: 0.4rem;
    resize: vertical;
    width: 100%;
}

input[type='checkbox'] {
    width: 24px;
}

input[type='url'], input[type='date'] {
    background-color: var(--main-bg-color);
    margin-inline: 0.2rem;
    width: 94%;
}

audio.youtube-dl {
    display: flex;
    margin: 1rem auto;
    width: 100%;
}

video.youtube-dl {
    display: flex;
    margin: auto;
    width: 100%;
}

div.example {
    padding-block: 1rem;
    text-align: center;
}

div.example > span {
    border-style: inset;
    font-size: 1.4em;
    padding: .1em;
}

div.download {
    margin-block: 1rem;
    text-align: center;
}

div.download > a {
    display: inline-flex;
    margin: 0.5rem 2rem;
}

svg#merge-tree, svg#chomsky-hierarchy, svg#type2, svg#type3 {
    margin: 1rem auto;
    display: inline-flex;
}

svg#merge-tree {
    max-width: 941px;
    max-height: 405px;
}

svg#chomsky-hierarchy {
    max-width: 357px;
    max-height: 257.5px;
}

svg#type2 {
    max-width: 355px;
    max-height: 106px;
}

svg#type3 {
    max-width: 576px;
    max-height: 320px;
}

@media only screen and (min-width: 768px) {
    input, select {
        width: 100%;
    }

    input[type='url'], input[type='date'] {
        width: 87%;
    }

    form {
        float: left;
        max-width: 24%;
    }

    audio.youtube-dl, video.youtube-dl {
        width: 72%;
    }

    audio.youtube-dl {
        margin: 4rem auto;
    }
}

@media only screen and (min-width: 1280px) {
    header > nav {
        justify-content: space-evenly;
    }

    input[type='url'], input[type='date'] {
        width: 88%;
    }

    form {
        max-width: 16%;
    }

    audio.youtube-dl, video.youtube-dl {
        width: 80%;
    }

    video.youtube-dl {
        top: -2.5rem;
        margin: 0 auto;
    }
}

@media (prefers-color-scheme: dark) {
    :root.theme {
        --gradient: linear-gradient(to right, #F0F0F0, lightgrey);
        --input-bg-color: #F0F0F0;
        --main-bg-color: white;
        --input-border-color: #E0E0E0;
        --pre-color: #F0F0F0;
        --main-fg-color: black;
        --text-shadow: 0.5rem 0.5rem 1rem rgba(0, 0, 0, 0.64), -0.5rem -0.5rem 1rem rgba(0, 0, 0, 0.48);
        --jflap-text: white;
        --jflap-fill: black;
        --jflap-accent: #ffff96;
    }

    :root {
        --gradient: linear-gradient(to right, #303030, #202020);
        --input-bg-color: #1F1F1F;
        --main-bg-color: black;
        --input-border-color: #2F2F2F;
        --pre-color: #1F1F1F;
        --main-fg-color: white;
        --text-shadow: 0.5rem 0.5rem 1rem rgba(255, 255, 255, 0.96), -0.5rem -0.5rem 1rem rgba(255, 255, 255, 0.64);
        --jflap-text: black;
        --jflap-fill: white;
        --jflap-accent: #006900;
    }
}

.hidden {
    visibility: hidden;
}
