body {
    background-color: var(--body);
    color: var(--body-text);
    margin: 0;
    width: 100%;
    height: 100%;
    user-select: none;
}

.top-bar {
    font-family: sans-serif;
    height: 48px;
    max-height: 10vh;
    width: 100%;
    padding: 0;
    margin: 0;
    top: 0;
    position: fixed;
    color: white;
    background-color: var(--top-bar);
    transition-property: background;
    transition-duration: 0.1s;
    transition-timing-function: linear;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    align-content: center;
}

.top-bar a {
    font-weight: bolder;
    text-decoration: none;
    color: var(--top-bar);
    background-color: white;
}

.top-bar code {
    font-size: larger;
}

.top-bar:hover {
    background-color: var(--top-bar-hover);
}

.top-element {
    font-size: min(8vh, 15px);
    margin: 0 8px;
    max-height: 6vh;
    text-align: center;
    min-width: 0;
}

.color-scheme {
    height: 25px;
    max-height: 8vh;
    width: 25px;
    max-width: 8vh;
}

.color-scheme-light {
    fill: white;
}

.color-scheme-dark {
    fill: #242424;
}

.top-space {
    width: 100%;
    height: 48px;
    max-height: 10vh;
}

.content-box {
    background-color: var(--code-box);
    border: 1px solid var(--code-box-border);
    border-radius: 10px;
    padding: 10px;
    margin: 10px;
    transition-property: background;
    transition-duration: 0.1s;
    transition-timing-function: linear;
    display: flex;
    font-family: monospace;
    cursor: default;
}

.content-box:hover {
    background-color: var(--code-box-hover);
}

.line-box {
    width: 30px;
}

.line-number {
    width: 30px;
}

@media (max-aspect-ratio: 1/1) {
    .top-bar {
        justify-content: space-around;
        height: 2em;
    }

    .top-element {
        height: 1.5em;
        font-size: 1em;
    }

    .color-scheme {
        height: 1.5em;
        width: 1.5em;
        flex-shrink: 0;
    }

    .top-space {
        height: 2em;
    }

    body {
        background-color: var(--code-box);
    }

    .content-box {
        width: calc(100% - 6px);
        padding: 3px;
        border-radius: 0;
        border: none;
        margin: 0;
        font-size: 2vw;
    }

    .code-box {
        width: calc(97vw - 6px);
        height: calc(100vh - min(40px, 10vh) - 6px);
    }

    .line-box {
        width: 3vw;
    }

    .line-number {
        width: 100%;
    }
}

.line {
    white-space: pre;
}

.token {
    cursor: pointer;
    transition-property: font-weight;
    transition-duration: 0.3s;
}

.token:hover {
    font-weight: bolder;
}

.keyword {
    font-weight: bold;
}

.comment {
    color: var(--comment-text);
}

.literal {
    color: var(--literal-text);
}

.symbol {
    cursor: default;
}

.symbol:hover {
    font-weight: normal;
}

.marked {
    background-color: var(--marked);
    color: var(--marked-text);
}

.marked-bracket {
    background-color: var(--marked-bracket);
}
