:root {
    --bg-color: #0d1117;
    --text-color: #c9d1d9;
    --accent-color: #58a6ff;
    --font-stack: 'Unscii', 'VT323', monospace;
    --line-height: 1.0;
    --panel-gap: 0px;
}

@import url('./effects/waves.css');

@font-face {
    font-family: 'Unscii';
    /* Using CDN for Unscii as local assets folder is missing */
    src: url('https://raw.githack.com/viznut/unscii/master/fontfiles/unscii-16.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

*,
html,
body,
div,
span,
p,
a,
h1,
h2,
h3,
h4,
h5,
h6 {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-stack);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    font-size: 2.5vw;
    line-height: var(--line-height);

    /* Block selection globally */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
}

.crs-grid {
    display: grid;
    height: 100%;
    width: 100%;
    position: relative;
    z-index: 1;
    grid-template-areas:
        "header"
        "h-border"
        "body";
    grid-template-rows: 15vh 4px 1fr;
    grid-template-columns: 1fr;
}

.crs-panel {
    overflow: hidden;
    padding: 0;
    white-space: pre;
    position: relative;
}

#header {
    grid-area: header;
    font-size: 1vw;
    line-height: 1.5vw;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    white-space: pre;
    overflow: hidden;
    user-select: none;
}

#body {
    grid-area: body;
    overflow-y: auto;
    font-size: 3.2vw;
    line-height: 1.5;
    padding: 15px;
    white-space: pre-wrap;
    font-family: var(--font-stack);
    user-select: none;
}

#h-border {
    grid-area: h-border;
    overflow: hidden;
    white-space: pre;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #30363d;
    user-select: none;
}

#left {
    grid-area: left;
    display: none;
}

#right {
    grid-area: right;
    display: none;
}

@media (min-width: 768px) {
    .crs-grid {
        grid-template-areas:
            "left header right"
            "left h-border right"
            "left body right";
        grid-template-columns: 1fr 31.74vw 1fr;
        grid-template-rows: 15vh 4px 1fr;
    }

    #left {
        display: flex;
        grid-area: left;
        overflow: hidden;
        color: #30363d;
        justify-content: flex-end;
        align-items: center;
        width: 100%;
        height: 100%;
        user-select: none;
        position: relative;
        contain: layout;
    }

    #right {
        display: flex;
        grid-area: right;
        overflow: hidden;
        color: #30363d;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        height: 100%;
        user-select: none;
        contain: layout;
    }

    .art-inner {
        will-change: transform;
    }

    #header {
        font-size: 0.23vw;
        line-height: 0.23vw;
    }

    #body {
        padding: 20px;
        font-size: 0.75vw;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #30363d;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

a {
    user-select: none;
    -webkit-user-drag: none;
}

a:hover {
    color: var(--accent-color) !important;
}

.body-link {
    color: var(--text-color);
    text-decoration: none;
}

.body-link .link-text {
    text-decoration: underline;
}

.flicker-icon {
    text-decoration: none !important;
    display: inline-block;
}

.body-link:hover {
    color: var(--accent-color) !important;
}