﻿:root {
    /* These are set in GameComponent*/
    --pixels-per-game-unit: unset;
    --game-width: unset;
    --game-height: unset;
    --body-color: unset;
    --background-color: unset;

    --field-width: calc(var(--pixels-per-game-unit)*var(--game-width));
    --field-height: calc(var(--pixels-per-game-unit)*var(--game-height));
}

.backdrop {
    background-color: var(--background-color);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logic {
    display: flex;
    min-width: calc(var(--pixels-per-game-unit)*2);
    min-height: calc(var(--pixels-per-game-unit)*2);
    position: relative;
}

.field {
    position: absolute;
    min-width: var(--field-width);
    min-height: var(--field-height);
}

    .field .wall {
        width: 100%;
        height: 2px;
        background: var(--body-color);
        position: absolute;
    }

        .field .wall.top {
            top: -2px;
        }

        .field .wall.bottom {
            bottom: -2px;
        }

.filter {
    width: 100%;
    height: 100%;
    position: absolute;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 6px, 3px 100%;
}

.body-logic {
    position: absolute;
}

.body-visual {
    background-color: var(--body-color);
    height: 100%;
}

.glow {
    box-shadow: 0 0 14px 0px var(--body-color);
    border-radius: 2px;
}

.flicker {
    animation: flicker 0.2s infinite cubic-bezier(0.445, 0.050, 0.550, 0.950);
}

@keyframes flicker {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(0.9);
    }

    100% {
        filter: brightness(1);
    }
}

.flicker.blink {
    animation: flicker 0.2s infinite cubic-bezier(0.445, 0.050, 0.550, 0.950), blink 0.25s steps(1, end) 1s 8 both;
}

@keyframes blink {
    50% {
        visibility: hidden;
    }

    0%, 100% {
        visibility: visible;
    }
}

.text {
    text-shadow: 0 0 4px var(--body-color);
    color: var(--body-color);
    width: 100%;
    font: 16px monospace;
    user-select: none;
}
.link {
        text-decoration: underline;
        padding: 0 4px;
    }
.message {
    position: absolute;
    top: -28px;
    white-space: nowrap;
    justify-content: center;
    display: flex;
}

.toolbar {
    position: absolute;
    bottom: -28px;
    display: flex;
    text-align: center;
}

.help {
    background: var(--background-color);
    position: absolute;
    width: 100%;
    height: var(--field-height);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.help-inner {
    width: var(--field-width);
    margin:auto;
}

.console {
    list-style: none;
    background: linear-gradient(180deg, var(--body-color) 16%, rgba(0,0,0,1) 100%);
    position: absolute;
    background-color: black;
    left: 0px;
    top: 0px;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.players-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
}
