/*
@import url('https:///fonts.googleapis.com/css?family=Playfair+Display|Quicksand&display=swap');
@import url('https:///fonts.googleapis.com/css2?family=MedievalSharp&display=swap');
@import url('https:///fonts.googleapis.com/css2?family=Playfair+Display:ital@1&display=swap');
*/

@font-face {
    font-family: Arcade;
    font-display: swap;
    src: url('../fonts/arcade.ttf');
}

@font-face {
    font-family: Playfair Display;
    font-optical-sizing: auto;
    font-style: normal;
    src: url('../fonts/PlayfairDisplay-VariableFont_wght.ttf');
}

@font-face {
    font-family: Playfair Display;
    font-optical-sizing: auto;
    font-style: italic;
    src: url('../fonts/PlayfairDisplay-Italic-VariableFont_wght.ttf');
}

@font-face {
    font-family: MedievalSharp;
    font-display: swap;
    src: url('../fonts/MedievalSharp-Regular.ttf');
}

@font-face {
    font-family: Quicksand;
    font-optical-sizing: auto;
    font-style: normal;
    src: url('../fonts/Quicksand-VariableFont_wght.ttf');
}

* {
    box-sizing: border-box;
}

body {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    -webkit-tap-highlight-color: transparent;
    font-size: .8em;
    font-family: "Quicksand";
    margin: 0;
    text-rendering: geometricPrecision;
    overflow: hidden;
    text-shadow: 1px 1px 2px rgba(0,0,0,.4);
    --window-color: #5c9fcd;
}

h1 {
    font-family: "Playfair Display";
    font-style: italic;
    font-weight: normal;
    margin-top: 0;
}

div#room {
    display: none;
    text-align: center;
}

body.logged-in div#room {
    vertical-align: top;
    display: inline-block;
    pointer-events: all;
}

body.logged-in div#login {
    display: none;
}

span#logo {
    position: fixed;
    left: 0;
    top: 0;
    cursor: pointer;
    z-index: 2;
    color: white;
    transition: font-size .3s ease-in;
    font-size: 6em;
    font-weight: bold;
    font-variant: small-caps;
    display: inline-block;
    text-align: center;
    letter-spacing: -5px;
    margin: 0.5em 0.5em 0 0.5em;
    line-height: 0.8;
    font-family: 'MedievalSharp';
}

div#main > div#info,
div#move_ship {
    display: none;
}

body.playing span#logo {
    font-size: 5em;
}

a#github:before {
    content: '';
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    margin: 0 0.2em;
    vertical-align: middle;
    background-image: url('../images/github.png');
    background-size: contain;
    background-position: center;
}

/* controls */

body #main label[for="checkbox_controls"] {
    display: none;
}

body.playing #main label[for="checkbox_controls"] {
    display: inline-block;
    color: white;
    font-size: 4em;
    top: 3em;
    margin: 0;
    padding: 0;
    line-height: 1;
    left: 1.5em;
    z-index: 99999;
    background: none;
    border-color: transparent;
    pointer-events: all;
    box-shadow: none;
    text-shadow: 2px 2px 5px black;
    transition: .3s color ease-in;
}

body.playing #main label[for="checkbox_controls"]:hover {
    color: var(--window-color);
}

body.playing #main label[for="checkbox_controls"]:after {
    display: none;
}

div#controls {
    position: relative;
    z-index: 99999;
    margin: 1.5em;
    text-align: right;
    pointer-events: none;
    direction: rtl;
}

div#controls > div {
    direction: ltr;
}

body.playing div#room {
    bottom: 100vh;
    position: relative;
}

body.playing input[type=checkbox]#checkbox_controls:checked ~ div#room {
    bottom: 0;
}

div#controls input[type=text] {
    width: 15.5em;
}

label, span.custom-label {
    font-size: 0.9em;
}

div#main {
    display: inline-block;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    overflow: visible;
    background: url('../images/wallpaper1.jpg');
    background-size: cover;
    background-position: 60%;
}

body.logged-in div#main {
    background: url('../images/wallpaper2.jpg');
    background-size: cover;
    background-position: 60%;
}

/* person */

div.person {
    position: absolute;
    color: var(--player-text-color);
    transition: left .3s ease-in, top .3s ease-in;
    z-index: 3;
    cursor: pointer;
    white-space: nowrap;
}

div.person * {
    white-space: normal;
}

div.person.myself {
    z-index: 4;
}

div.person.movable {
    transition: none;
}

div.person.clickable {
    z-index: 9999;
    cursor: pointer;
}

div.person.clickable:hover {
    box-shadow: 4px 4px 25px white inset;
}

div.person.clickable div.halo {
    box-shadow: 0 0 25px white;
}

body:not(.playing) div.person.selected:not(.myself) div.halo,
div.person.clickable:hover div.halo {
    /*
    background: var(--player-text-color);
    color: var(--player-color);
    */
    background: white;
}

body.playing div.person {
    transition: none;
}

div.person.active div.halo {
    animation: glowing-player 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

div.person div.face {
    vertical-align: top;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.7);
    font-size: 1.3em;
    border-radius: 100%;
    margin: 0;
    white-space: normal;
    vertical-align: top;
    white-space: nowrap;
    background: white;
    z-index: 3;
    position: absolute;
    overflow: hidden;
    text-align: center;
    font-size: 3em;
    pointer-events: none;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    background-color: var(--player-color);
}

div.person div.emojiselect {
    position: absolute;
    background: white;
    left: -3em;
    bottom: 1.2em;
    text-align: center;
    width: 31em;
    z-index: 9999;
    padding: 0;
    border-radius: 5px;
    box-shadow: 3px 3px 10px black;
    display: none;
}
div.person.right div.emojiselect {
    left: auto;
    right: -3em;
}

div.person div.emojiselect span {
    border: 2px solid transparent;
    border-radius: 2px;
    transition: .1s ease-in border-color;
    cursor: pointer;
}

div.person div.emojiselect span:hover {
    border-color: indianred;
}

div.person div.body div.nametag {
    background-color: var(--player-color);
    color: white;
    color: var(--player-text-color);
    width: 100%;
    text-align: center;
}

div.person div.body {
    transition: .3s height ease-in;
    border: 3px solid black;
    border-radius: 5px;
    box-shadow: 2px 5px 5px rgba(0,0,0,0.7);
    position: absolute;
    top: 6em;
    left: 0;
    right: 0;
    min-width: 9em;
    width: auto;
    z-index: 4;
    color: black;
    border-color: var(--player-color);
}

div.person div.container {
    background-color: rgba(0,0,0,0.4);
    text-align: center;
    white-space: nowrap;
    border-color: inherit;
}

div.person div.container button {
    margin: 0;
}

div.person div.face:after {
    content: attr(data-initial);
    display: inline-block;
    width: 100%;
    pointer-events: none;
}

div.halo {
    z-index: 3;
    border-radius: 100%;
    position: absolute;
    transition: all .2s ease-in;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    white-space: nowrap;
    direction: ltr;
    box-sizing: content-box;
    border-color: var(--player-color);
}

div.halo div {
    white-space: normal;
    direction: ltr;
}


div.person.right, div.person.right div.stuff {
    direction: rtl;
}
div.person.right *, div.person.right div.stuff * {
    direction: ltr;
}

div.person.myself div.halo {
    border: 5px solid var(--player-color);
}

div.person.myself {
    min-width: 12em;
}

div.person div.face:before {
    content: attr(data-status);
    display: block;
    text-align: center;
    background: white;
    pointer-events: all;
    font-size: 0.3em;
}
div.person.myself div.face:hover:before {
    background-color: lightgray;
}

div.person.signal div.face:before {
    content: '\1F4F9'; /* attr(title) ' \1F4F9'; */
}
video {
    display: none;
}
.video video {
    display: inline;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

span.bubble {
    font-family: 'Playfair Display', serif;
    position: absolute;
    font-size: .8em;
    font-style: italic;
    left: 0;
    white-space: nowrap;
    bottom: 100%;
    border-radius: 15px;
    animation: grow-and-shrink 5000ms;
    transform: scale(0);
    z-index: 3;
    font-size: 3em;
    color: rgba(255,255,255,0.8);
}

div.person.right span.bubble {
    left: auto;
    right: 0;
}

div.person div.stuff {
    pointer-events: none;
    height: 100%;
    white-space: nowrap;
}

/* Style the placeholder */

input:focus::placeholder {
    color: transparent;
}
input:focus::-webkit-input-placeholder {
/* WebKit browsers */
    color: transparent;
}
input:focus:-moz-placeholder {
/* Mozilla Firefox 4 to 18 */
    color: transparent;
}
input:focus::-moz-placeholder {
/* Mozilla Firefox 19+ */
    color: transparent;
}
input:focus:-ms-input-placeholder {
/* Internet Explorer 10+ */
    color: transparent;
}
input:focus::placeholder {
    color: transparent;
}
input:focus::placeholder {
    color: transparent;
}
input::-webkit-input-placeholder {
/* WebKit browsers */
    color: rgb(128,128,128);
    font-style: italic;
}
input:-moz-placeholder {
/* Mozilla Firefox 4 to 18 */
    color: rgb(128,128,128);
    font-style: italic;
}
input::-moz-placeholder {
/* Mozilla Firefox 19+ */
    color: rgb(128,128,128);
    font-style: italic;
}
input:-ms-input-placeholder {
/* Internet Explorer 10+ */
    color: rgb(128,128,128);
    font-style: italic;
}
input::placeholder {
    color: rgb(128,128,128);
    font-style: italic;
}
textarea:focus, button:focus, input:focus, select:focus {
    outline: none;
}

/* window and dialog */

div.window:before {
    content: attr(title);
    display: block;
    background-color: var(--window-color);
    color: lightgray;
    font-weight: bold;
    margin: -1px;
}

div.window {
    background: rgba(0,0,0,0.4);
    background: lightgray;
/*    border: 3px solid var(--window-color); */
    border: 2px solid darkgray;
    box-shadow: 2px -3px 25px black;
    border-radius: 5px;
    opacity: 1;
    width: auto;
    font-size: 1.3em;
    transition: .3s all ease-out;
    text-align: left;
    overflow: hidden;
    max-height: 100%;
    overflow-y: auto;
}

div.window > div {
    padding: 1em;
}

div.window button.default {
    border-width: 3px;
}

div#dialog, div#login {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%,-50%,1px);
    z-index: 99999;
    text-align: center;
}

div#login {
    z-index: 999;
}

div#dialog.red {
    --window-color: indianred;
}

div#dialog.gold {
    --window-color: darkgoldenrod;
}

/* curtain */

div#curtain {
    position: fixed;
    z-index: 999;
    background-color: rgba(0,0,0,0.3);
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* message */

div#message {
    position: absolute;
    z-index: 9999;
    top: 0;
    cursor: default;
    font-family: 'Arcade', sans-serif;
    font-size: 2.4em;
    text-shadow: 1px 1px 4px #3c2700;
    padding-left: 2em;
    padding-right: 2em;
    padding-top: 10px;
    padding-bottom: 7px;
    transition: .5s transform ease-out;
    transform: translate3d(-50%, -200%, 5px);
    background: black;
    color: orange;
    max-width: 50%;
    left: 50%;
    height: auto;
    border: 3px solid #6e4800;
    border-radius: 7px;
    box-shadow: 2px 2px 15px darkgoldenrod
}
body.playing div#message.inactive {
    transform: translate3d(-50%, -80%, 5px);
    border-bottom-width: 6px;
}
body.playing div#message.active, body.playing div#message.inactive:hover {
    transform: translate3d(-50%, -5px, 5px);
}

/* buttons */

button, select, input, .btn, input[type=checkbox] + label, input[type=radio] + label {
    display: inline-block;
    white-space: nowrap;
    font-size: 1em;
    height: 2em;
    vertical-align: middle;
    border: 2px solid black;
    border-radius: 5px;
    color: black;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    margin: 3px;
    padding: 0 1em;
    background: rgba(181, 141, 141, 0.4);
    box-shadow: 2px 1px 4px rgba(0,0,0,.4);
    line-height: 1.7;
}

input[type=checkbox] + label, input[type=radio] + label {
    border-radius: 100%;
}

button:hover, input[type="submit"]:hover, input[type="button"]:hover, button.active, .btn:hover {
    background: black;
    color: white;
}

input[type="submit"] {
    border-width:3px;
}

input[type="text"], input[type="password"], input[type="email"] {
    padding: 0 .2em;
    text-transform: none;
    background: rgba(255, 255, 255, 0.4);
    cursor: text;
    font-family: "Quicksand";
}

/* checkbox */

input[type=checkbox] + label,
input[type=radio] + label {
    padding: 0;
}
input[type=checkbox] + label:after,
input[type=radio] + label:after {
    content: '✔';
    display: inline-block;
    font-size: 2em;
    margin-top: -0.5em;
}
input[type=checkbox], input[type=radio] {
    visibility: hidden;
    position: absolute;
    left: -9999px;
}
input[type=checkbox] + label:after,
input[type=radio] + label:after {
    visibility: hidden;
}
input[type=checkbox]:checked + label:after,
input[type=radio]:checked + label:after {
    visibility: visible;
}

@media (hover: hover) {
    input[type=checkbox] + label:hover:after,
    input[type=radio] + label:hover:after {
        visibility: visible;
        opacity: 0.6;
    }
}

@keyframes grow-and-shrink {
    0% {
      transform: scale(0);
    }
    10% {
      transform: scale(1);
    }
    90% {
      transform: scale(1);
    }
    100% {
      transform: scale(0);
    }
}

@keyframes glowing-player {
    0%, 100% {
        background-color: initial;
        box-shadow: 0 0 25px transparent;
    }

    50% {
        background-color: var(--player-color);
        box-shadow: 0 0 25px var(--player-color);
    }
}
