body {
    margin: 0;
    padding: 0;
    user-select: none;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

input {
    cursor: pointer;
}

kbd {
    background-color: #eee;
    border-radius: 3px;
    border: 1px solid #b4b4b4;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 2px 0 0 rgba(255, 255, 255, .7) inset;
    color: #333;
    display: inline-block;
    font-size: .85em;
    font-weight: 700;
    line-height: 1;
    padding: 2px 4px;
    white-space: nowrap;
}

#webgl_canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
#top-bar {
    position: relative;
    padding: 0 10px;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    text-align: center;
    line-height: 40px;
}
#top-bar:after {
    content: "";
    display: block;
}

#top-bar div {
    display: inline-block;
    color: white;
    font-size: 11pt;
    text-shadow: black 0 0 10px;
    margin: 0;
    text-align: center;
    vertical-align: middle;
}

#top-bar div * {
    line-height: normal;
}
#top-bar span {
    line-height: normal;
}

.left-box {
    float: left;
    min-width: 0 !important;
    max-width: unset !important;
    width: fit-content !important;
}

div#fps {
    width: 80px;
    text-align: left;
    margin-left: 5px;
    margin-right: 5px;
}

div#elapsed {
    min-width: 120px;
    text-align: left;
    margin-left: 5px;
    margin-right: 5px;
}

input[type="checkbox"] {
    vertical-align: middle;
}

.topbar-icon {
    cursor: pointer;
    text-align: right;
    margin-right: 10px;
    width: 30px;
    max-width: 30px;
    min-width: 30px;
}
.topbar-icon svg {
    display: block;
    margin: 0 auto;
}
.topbar-icon:hover svg {
    opacity: 0.8;
}
.topbar-icon[disabled] svg {
    opacity: 1.0;
    color: gray;
}

.center-box {
    min-width: 0 !important;
    max-width: unset !important;
    width: fit-content !important;
}

div#auto-cam {
    margin-right: 2px;
}

svg.cam-on {
    -webkit-filter: drop-shadow(0px 0px 4px rgba(0, 255, 0, .7));
    filter: drop-shadow(0px 0px 4px rgba(0, 255, 0, .7));
}

.cam-on {
    display: none !important;
}
.cam-off {
    display: none !important;
}

#auto-cam[auto-cam='on'] .cam-on {
    display: block !important;
}

#auto-cam[auto-cam='off'] .cam-off {
    display: block !important;
}

svg.ai-on {
    -webkit-filter: drop-shadow(0px 0px 4px rgba(0, 255, 0, .7));
    filter: drop-shadow(0px 0px 4px rgba(0, 255, 0, .7));
}

.ai-on {
    display: none !important;
}
.ai-off {
    display: none !important;
}

#ai-enabled[ai="on"] .ai-on {
    display: block !important;
}

#ai-enabled[ai="off"] .ai-off {
    display: block !important;
}


.right-box {
    float: right;
    min-width: 0 !important;
    max-width: unset !important;
    width: fit-content !important;
}

.snd-on {
    display: none !important;
}
.snd-off {
    display: none !important;
}
#sound[snd="on"] .snd-on {
    display: block !important;
}
#sound[snd="off"] .snd-off {
    display: block !important;
}

.fsc-on {
    display: none !important;
}
.fsc-off {
    display: none !important;
}
#fullscreen[fsc="on"] .fsc-on {
    display: block !important;
}
#fullscreen[fsc="off"] .fsc-off {
    display: block !important;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 130px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    line-height: normal;
    z-index: 1;
    bottom: -40px;
    left: 50%;
    margin-left: -65px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: -35%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent rgba(0, 0, 0, 0.5) transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}


div#info {
    cursor: unset;
}

div#info_overlay {
    position: absolute;
    margin: auto;
    right: 10px;
    top: 50px;
    width: fit-content;
    height: fit-content;
    min-width: 10%;
    max-width: 40%;
    padding: 10px;
    color: white;
    font-weight: bold;
    font-size: 10pt;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    text-align: left;
    vertical-align: middle;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease-in 0.5s, visibility 0.7s;
}

div#info:hover div#info_overlay {
    display: block;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.2s ease-in, visibility 0.2s;
}

div#scene.active svg {
    opacity: 0.6;
}
div#scene.active .tooltiptext {
    display: none;
}

div#scenes-panel {
    clear: both;
    position: relative;
    min-height: 100vh;
    top: 0;
    float: right;
    width: 0;
    background-color: rgba(0, 0, 0, 0.7);
    border-left: 1px solid rgba(255, 255, 255, 1.0);
    visibility: hidden;
    transition: width 0.5s ease-in-out, visibility 0.5s;
}
div#scenes-panel.shown {
    width: 200px;
    visibility: visible;
    transition: width 0.5s ease-in-out, visibility 0.5s;
}

div#scenes-panel .scene-item {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}
div#scenes-panel.shown .scene-item {
    opacity: 1;
    transition: opacity 0.2s ease-in-out 0.3s;
}

.scene-item {
    padding: 0 10px 10px;
    margin: 5px;
    cursor: pointer;
}
.scene-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
.scene-item.selected {
    background-color: rgba(100, 255, 133, 0.35);
}
.scene-item span {
    display: inline-block;
    width: 100%;
    margin: 5px 0;
    text-align: center;
    color: white;
    text-shadow: 0 0 5px black;
}
.scene-item img {
    width: 100%;
    box-shadow: 0 0 5px black;
}

#canvas_overlay {
    position: absolute;
    margin: auto;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: fit-content;
    height: fit-content;
    min-width: 20%;
    max-width: 60%;
    max-height: 50%;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.75);
    border-radius: 10px;
    text-align: center;
    vertical-align: middle;
}

#notify_text {
    font-weight: bold;
    font-size: 20pt;
}
.text-large {
    font-size: 36pt;
}

#ai-thinking-indicator {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    color: white;
    font-size: 14pt;
    text-shadow: black 0 0 10px;
    text-align: center;
    opacity: 0.0;
    visibility: hidden;
    transition: opacity 0.5s ease-in, visibility 0.5s;
    animation: fadeAnimation 4s infinite;
}
#ai-thinking-indicator.shown {
    visibility: visible;
    opacity: 1.0;
    transition: opacity 0.5s ease-in 1.0s, visibility 1.5s;
}
@keyframes fadeAnimation {
    0%   { color: white; }
    50%  { color: red; }
    100% { color: white; }
}

#page-loader-overlay {
    position: absolute;
    margin: auto;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: white;
}
.loader {
    position: absolute;
    margin: auto;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/*
 * Changes for mobile
 */
@media screen and (max-width: 700px) {
    .center-box {
        float: right;
    }
    .right-box {
        float: unset;
    }
    div#info {
        display: none;
    }
    #ai-thinking-indicator {
        top: 100px;
    }
    #canvas_overlay {
        max-width: 80%;
    }
    .text-large {
        font-size: 32pt;
    }
}