* {
          transition: all 0.3s cubic-bezier(.17,.84,.44,1);
    }

    img {
    max-width: 100%;
    max-height: 100%;
}

    body, html {
        margin: 0;
        padding: 0;
        height: 100%;
        width: 100%;
        overflow: hidden;
        background-color: black;
        color: white;
    }
    main {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
        width: 100%;
    }
    game {
        position: relative;
        display: flex;
        width: 640px;
        height: 480px;
        min-width: 640px;
        min-height: 480px;
        max-width: 640px;
        max-height: 480px;
        border: solid 1px rgb(0, 0, 0);
        outline: solid 2px white;
        font-family: 'Courier New', Courier, monospace;
	    font-size: 18px;
        pointer-events: none;
        user-select: none;
    }

    game::before {
    inset: 0;
    position: absolute;
    content: '';
    z-index: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
    background-image: var(--scene-bg, none);
}

game.bg-animated::before {
    animation: parallax-diagonal 30s linear infinite;
    filter: saturate(3000%) brightness(20%) grayscale(100%);
}

    onscreen {
        z-index: 1;
    }

    gamedialog {
        position: absolute;
        bottom: 0;
        width: 100%;
        height: 100%;
        display: flex;
    }

   gamedialog-textBox {
	background-color: rgba(4, 0, 21, 0.7);
	color: white;
	overflow-y: auto;
	bottom: 0;
	margin: 8px;
	border: solid 1px yellow;
	border-radius: 4px;
	padding-left: 16px;
	padding-right: 16px;
    padding-top: 1rem;
    padding-bottom: 1rem;
    display: flex;
	position: absolute;
	width: -moz-available;
	height: 4rem;
    line-height: 1.4rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s cubic-bezier(.17,.84,.44,1), transform 0.3s cubic-bezier(.17,.84,.44,1);
}

gamedialog-textBox.visible {
    opacity: 1;
    transform: translateY(0px);
}

    gamedialog-container {
        position: absolute;width: 100%;height: 100%;
    }

    gamedialog-character {
        border: solid 1px yellow;
        border-radius: 4px;
        background-color: rgba(4, 0, 21, 0.7);
        padding-left: 1rem;
        padding-right: 1rem;
        font-size: 16px;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        opacity: 0;
        transform: translateX(-20px);
        transition: opacity 0.3s cubic-bezier(.17,.84,.44,1), transform 0.3s cubic-bezier(.17,.84,.44,1);
    }

    gamedialog-character.visible {
        opacity: 1;
        transform: translateX(0px);
    }

    gamedialog-face {
        width: 94px;
  border: solid 1px yellow;
  border-radius: 4px;
  height: 94px;
  position: relative;
      opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s cubic-bezier(.17,.84,.44,1), transform 0.3s cubic-bezier(.17,.84,.44,1);
    }

    gamedialog-face img {
        image-rendering: pixelated;
  width: 100%;
  height: 100%;
    }

    gamedialog-face.visible {
    opacity: 1;
    transform: scale(1);
}

    gamedialog-wrap {
        position: absolute;
        bottom: 106px;
        display: flex;
        margin: 8px;
        align-items: self-end;
        width: -moz-available;
        justify-content: space-between;
    }

    @keyframes parallax-diagonal {
        0% {
            background-position: 0 0;
        }
        100% {
            background-position: -640px 480px;
        }
    }

