@font-face {
    font-family: 'BESCII';
    src: url(bescii.ttf);
}

:root {
    /* --main-bg-color: #5457f0; */
    --main-bg-color: #42348b;
    --main-fg-color: #ffffff;
    --window-fg-color: #42348b;
    --window-bg-color: #ea9ef6;
    --window-shadow-color: #222;
    --btn-bg-color: #a95fb4;
    --btn-fg-color: #fff;
}

body,
html {
    height: 100%;
}

* {
    margin: 0;
    padding: 0;
    font-family: "BESCII", monospace;
}

.layout {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 30vw 5vw;
    grid-template-rows: 5vw auto 1fr;
}

textarea {
    grid-row: span 3 / -1;
    grid-column: span 3 / -1;
    background-color: var(--main-bg-color);
    color: var(--main-fg-color);
    font-size: 16px;
    outline: none;
    border: none;
    padding: 2rem;
    resize: none;
    line-height: 1.5rem;
}

.output {
    display: flex;
    flex-direction: column;
    grid-row: 2;
    grid-column: 2;
    border: 24px solid var(--window-bg-color);
    background-color: var(--window-bg-color);
    box-shadow: 16px 16px var(--window-shadow-color);
}

.title-bar {
    display: flex;
    justify-content: center;
    background-color: var(--window-bg-color);
    color: var(--window-fg-color);
    margin: 0 0 24px 0;
}

.title-bar div {
    flex: 1;
    align-content: center;
}

button {
    background: none;
}

#btn-help {
    aspect-ratio: 1 / 1;
    border: none;
    background: none;
    color: var(--window-fg-color);
}

#btn-run-stop {
    /* height: 4vw; */
    padding: 1rem;
    border: none;
    margin: 24px 0 0 0;
    background: var(--btn-bg-color);
    color: var(--btn-fg-color);
}

canvas {
    aspect-ratio: 432 / 272;
    outline: none;
}

/* Media query for small screens */
@media only screen and (max-width: 480px) {
    .layout {
        height: 100%;
        display: grid;
        grid-template-columns: auto;
        grid-template-rows: auto 1fr;
    }

    .output {
        grid-row: 1;
        grid-column: 1;
        box-shadow: none;
        border: 0;
    }

    .title-bar {
        display: none;
    }

    #btn-run-stop {
        margin: 0;
    }

    textarea {
        grid-row: 2;
        grid-column: 1;
        line-height: 1.2rem;
    }

    canvas {
        width: 100%;
    }
}