body, html {
    width: 100vw;
    height: 100vh;
    overflow: clip;
}

body {
    margin: 0px;
    font-family: helvetica;
}

canvas {
    image-rendering: pixelated;
}

#three-canvas {
    width: 100% !important;
    height: 100% !important;
    z-index: -2;
}

.hidden {
    display: none !important;
}

html-ui {
    pointer-events: none;
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
}

.wants-events {
    pointer-events: auto;
}

#interact-prompt {
    font-family: monospace;
    color: white;
    display: flex;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(24px, -50%);
}


#interact-prompt span {
    margin-left: 12px;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    font-size: 12px;
}

button-prompt {
    width: 39px;
    height: 39px;

    display: inline-flex;
    justify-content: center;
    align-items: center;

    border: 1px solid #00000099;

    font-family: monospace;
    background-color: #18181899;
    color: white;
    font-size: 30px;
    font-weight: bold;
}

#dialog-container {
    width: 100%;
    display: flex;
    justify-content: center;
    position: absolute;
    bottom: 0px;
}

#dialog {
    background-color: #17111e91;
    color: white;
    padding: 8px;
    width: 700px;
    height: 184px;
}

#dialog name {
    display: block;
    font-weight: bold;
    font-size: 1.9em;
    margin-bottom: 8px;
    opacity: 0.5;
    margin-left: 14px;
}

#dialog text {
    font-size: 1.5em;
}

#dialog text letter {
    animation: letter-show 40ms ease-in forwards;
    -webkit-mask-size: 0%;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 1) 100%,
      rgba(0, 0, 0, 0)
    );
}

@keyframes letter-show {
    100% {
        -webkit-mask-size: 100%;
    }
}

#crosshair-container {
    position: absolute;
    top: 0px;
    left: 0px;
    display: flex;
    height: 100%;
    width: 100%;
    justify-content: center;
    align-items: center;
}

#crosshair-container img {
    width: 25px;
    height: 25px;
    image-rendering: pixelated;
    opacity: 0.5;
}

#sigil-container {
    flex-direction: column;
    pointer-events: auto;
    position: absolute;
    top: 0px;
    left: 0px;
    display: flex;
    height: 100%;
    width: 100%;
    background-color: #000000aa;
    justify-content: center;
    align-items: center;
    z-index: 4;
}

#sigil {
    pointer-events: auto;
    flex-grow: 0;
    background-image: url("paper.png");
    background-size: 300px;
    background-color: #ffe88c;
}

#sigil-name {
    color: white;
    font-weight: bold;
    font-size: 4.2em;
}

#sigil-container #confirm-message {
    display: none;
    color: gold;
    font-size: 16px;
}
#sigil-container.confirming #confirm-message {
    display: unset;
}

.ptext {
    font-size: 16px;
    display: inline-block;
    white-space: pre;
}

.ptext > * {
    display: inline-block;
}

float-panel {
    display: inline-block;
    position: absolute;
    z-index: 2;
}

#combat-hud.gone {
    opacity: 0;
}

#combat-hud {
    transition: opacity 300ms;
    /*filter: drop-shadow(22px 22px 20px);*/
}

#combat-hud > * {
    cursor: pointer;
}

#combat-hud #paper-cont {
    display: inline-block;
    position: absolute;
    width: 150px;
    height: 200px;
    top: 20px;
    left: 50px;
    transform: rotate(15deg);

    filter: drop-shadow(15px 15px);
}

#combat-hud #paper {
    width: 100%;
    height: 100%;
    background-image: url("paper.png");
    /*
    background-color: rgba(0, 0, 0, 0.25);
    background-blend-mode: darken;
    */
    background-size: 300px;
}

#combat-hud .label {
    font-family: serif;
    font-size: 32px;
    font-weight: bold;
    background-color: white;
    color: black;

    display: inline-block;
    position: absolute;

    z-index: -1;
}

#combat-hud #paper-cont .label {
    transform: rotate(-12deg);
    top: -38px;
}

#combat-hud #stick-cont {
    display: inline-block;
    position: absolute;
    top: -200px;
    left: -300px;
    transform: rotate(-90deg);

    filter: drop-shadow(15px 15px);
}

#combat-hud #stick-cont .label {
    transform: rotate(20deg);
    top: -20px;
}

.bar {
    display: inline-block;
    background-color: white;
    width: 100px;

    transition: transform 2s;
    z-index: 3;

    position: relative;
    top: 24px;
    padding: 3px;
    transform: matrix(1.2, 0.1, -0.2, 0.8, -50, 0);
}

.bar-value {
    background-color: green;
    width: 100%;
    height: 16px;

    transition: transform 370ms, width 400ms, background-color 400ms;

    transform: matrix(1, -0.05, 0, 1.05, 0, 0);
    filter: drop-shadow(2px 2px);
}

black-bar {
    display: block;
    background-color: black;
    position: absolute;
    width: 100%;
    height: 0%;
    bottom: 0px;
    left: 0px;

    transition: height 2s;
}

#combat-score {
    position: absolute;
    top: 120px;
    left: -100%;
    font-size: 115px;
    font-family: serif;
    font-weight: bold;
    z-index: 7;
    transform: rotate(4deg);
    transition: left 2s;
}

#bangsvg {
    position: absolute;
    right: 0px;
    top: 0px;
}

#mood-cont[mood="sad"] polyline {
    fill: blue;
    stroke: darkblue;
}

#mood-cont[mood="angry"] polyline {
    fill: red;
    stroke: darkred;
}

#mood-cont[mood="mania"] polyline {
    fill: yellow;
    stroke: gold;
}

#mood-label {
    display: inline-block;
    position: absolute;
    right: 14px;
    top: 100px;
    color: black;
    z-index: 2;
    font-size: 49px;
    -webkit-text-stroke: 2px;
}

#mood-face {
    display: inline-block;
    position: absolute;
    top: 12px;
    right: -10px;
    color: black;
    z-index: 2;
    -webkit-text-stroke: 6px;
    opacity: 0.55;
    transform: rotate(109deg);
    font-size: 80px;
    font-weight: bold;
}

#mood-cont[mood="angry"] #mood-face {
    -webkit-text-fill-color: red;
}

#mood-cont[mood="angry"] #mood-label {
    transform: matrix(0.8, 0.1, -0.2, 3.8, 0, 0);
    -webkit-text-fill-color: red;
    font-family: serif;
    font-weight: bold;
    transform: rotate(22deg);
}

#mood-cont[mood="sad"] #mood-face {
    right: -6px;
    -webkit-text-fill-color: blue;
}

#mood-cont[mood="sad"] #mood-label {
    color: #000044;
    transform: matrix(1.2, 0.5, -0.8, 1.8, 0, 0);
    -webkit-text-fill-color: blue;
    font-family: helvetica;
    font-weight: bold;
}

#mood-cont[mood="mania"] #mood-face {
    right: -6px;
    -webkit-text-fill-color: yellow;
    -webkit-text-stroke: 4px;
    transform: rotate(22deg);
    font-size: 64px;
}

#mood-cont[mood="mania"] #mood-label {
    color: #440000;
    transform: matrix(1.2, 0.5, -0.8, 1.8, -15, 0);
    -webkit-text-fill-color: yellow;
    text-shadow: #220000 4px 5px;
    font-family: sans-serif;
    font-weight: bold;
}
debug-overlay {
    pointer-events: none;
    position: absolute;
    left: 0px;
    top: 0px;
    color: #ff00ff66;
    font-size: 15px;
    font-family: monospace;
}

debug-overlay > * {
    display: block;
}
