@charset "UTF-8";

body {
  overflow: hidden;
  margin: 0;
  height: 100vh;
  background-size: cover;
}

*,
*:before,
*:after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

/*#############################################################################################*/
/* UTILS ENGINE CLASS
/*#############################################################################################*/

.u-focused {
  /* empty rules here */
}

.u-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.u-selected {
  /* empty rules here */
}

.u-hidden {
  display: none !important;
}

/*#############################################################################################*/
/* CORE ENGINE CLASS
/*#############################################################################################*/

#APP {
  position: relative;
  overflow: hidden;
  width: 600px;
  height: 600px;
  color: #FFF;
  font-size: 10px;
  transform-origin: top left;
  user-select: none;
  box-sizing: content-box;
}

#APP.scanlines::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  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));
  z-index: 99999999;
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
}

#APP_FAIL {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  background: red;
  color: white;
  font-weight: bold;
  font-family: monospace;
  font-size: 16px;
  text-align: center;
}

#APP_FAIL.SHOW {
  display: flex;
}

#CANVAS_3D {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#CANVAS_2D {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  image-rendering: pixelated;
}

#UI_ROOT {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
}

#UI_FADELAYER {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: #000;
  opacity: 0;
  transition: opacity 1s;
  z-index: 10;
  pointer-events: none;
}

#UI_OVERLAYER {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  z-index: 10;
  pointer-events: none;
}

/*#############################################################################################*/
/* WIDGETS
/*#############################################################################################*/

/*---------------------------------------------------------------------------------------------*/
/* UI BUBBLE WIDGET
/*---------------------------------------------------------------------------------------------*/
.UIBubble {
  display: flex;
  position: absolute;
  flex-direction: row;
  padding: 10px;
  z-index: 12;
  border: 10px solid;
  border-image: url(../textures/ui_border.png) 3 fill;
}

.UIBubble-text {
  display: block;
  margin-bottom: 8px;
  line-height: 2;
  white-space: pre-line;
}

.UIBubble-picture {
  max-width: 110px;
  max-height: 110px;
  min-width: 110px;
  min-height: 110px;
  margin-right: 12px;
  object-fit: cover;
}

.UIBubble-author {
  margin-bottom: 10px;
}

.UIBubble .UIMenuText {
  border: 0;
}

/*---------------------------------------------------------------------------------------------*/
/* UI DESCRIPTION LIST WIDGET
/*---------------------------------------------------------------------------------------------*/
.UIDescriptionList {
  display: flex;
  flex-direction: column;
  border: 10px solid;
  border-image: url(../textures/ui_border.png) 3 fill;
  padding-left: 10px;
  padding-right: 10px;
}

.UIDescriptionList-item {
  display: flex;
  justify-content: space-between;
  line-height: 32px;
}

.UIDescriptionList-item-label {
  color: #ccccff;
}

.UIDescriptionList-item-value {
  color: #fff;
  margin-left: 15px;
}

/*---------------------------------------------------------------------------------------------*/
/* UI DIALOG WIDGET
/*---------------------------------------------------------------------------------------------*/
.UIDialog {
  display: block;
  position: absolute;
  right: 80px;
  bottom: 10px;
  left: 80px;
  z-index: 12;
}

.UIDialog-author {
  display: inline-block;
  padding: 10px;
  margin-bottom: 5px;
  background-color: rgba(0, 0, 0, 0.5);
}

.UIDialog-textbox {
  position: relative;
  min-height: 128px;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.5);
}

.UIDialog-textbox-text {
  line-height: 1.6;
  white-space: pre-line;
}

.UIDialog-textbox-next {
  display: none;
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 11px;
  height: 8px;
  background: transparent url(../textures/ui_next_icon_sprite.png) 0 0 no-repeat;
  animation: ui-dialog-widget-textbox-next 1s steps(6) infinite;
}

@keyframes ui-dialog-widget-textbox-next {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: -66px 0;
  }
}

/*---------------------------------------------------------------------------------------------*/
/* UI INPUT RANGE WIDGET
/*---------------------------------------------------------------------------------------------*/
.UIInputRange {
  display: flex;
  align-items: center;
}

.UIInputRange-prevIcon {
  display: block;
}

.UIInputRange-value {
  margin-left: 16px;
  margin-right: 16px;
}

.UIInputRange-nextIcon {
  display: block;
}

/*---------------------------------------------------------------------------------------------*/
/* UI INPUT SELECT WIDGET
/*---------------------------------------------------------------------------------------------*/
.UIInputSelect {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.UIInputSelect.u-focused .UIMenuItemText.u-focused {
  color: rgb(98, 211, 255);
}

/*---------------------------------------------------------------------------------------------*/
/* UI INPUT SELECT MULTIPLE WIDGET
/*---------------------------------------------------------------------------------------------*/
.UIInputSelectMultiple {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.UIInputSelectMultiple.u-focused .UIMenuItemText.u-focused {
  color: rgb(98, 211, 255);
}

/*---------------------------------------------------------------------------------------------*/
/* UI INPUT SLIDER WIDGET
/*---------------------------------------------------------------------------------------------*/
.UIInputSlider {
  display: flex;
  align-items: center;
}

.UIInputSlider-range {
  display: block;
}

.UIInputSlider-value {
  margin-left: 16px;
}

/*---------------------------------------------------------------------------------------------*/
/* UI INPUT KEYBOARD WIDGET
/*---------------------------------------------------------------------------------------------*/
.UIInputKeyboard {
  padding-top: 10px;
  border: 10px solid;
  border-image: url(../textures/ui_border.png) 3 fill;
}

.UIInputKeyboard-value {
  background-color: blue;
  padding: 0 8px;
  height: 32px;
  line-height: 32px;
  margin-bottom: 16px;
}

.UIInputKeyboard-row {
  display: flex;
  flex-direction: row;
}

.UIInputKeyboard-row-item {
  position: relative;
  flex: 1;
  padding: 8px;
}

.UIInputKeyboard.u-focused .UIInputKeyboard-row-item.u-focused {
  background-color: rgb(98, 211, 255);
}

/*---------------------------------------------------------------------------------------------*/
/* UI MENU WIDGET
/*---------------------------------------------------------------------------------------------*/
.UIMenu {
  border: 10px solid;
  border-image: url(../textures/ui_border.png) 3 fill;
  overflow-y: auto;
}

.UIMenu.u-focused .UIMenuItemText.u-focused {
  background-color: rgb(98, 211, 255);
}

/*---------------------------------------------------------------------------------------------*/
/* UI MENU TEXT
/*---------------------------------------------------------------------------------------------*/
.UIMenuText {
  border: 10px solid;
  border-image: url(../textures/ui_border.png) 3 fill;
  overflow-y: auto;
}

.UIMenuText.u-focused .UIMenuTextItem.u-focused {
  background-color: rgb(98, 211, 255);
}

/*---------------------------------------------------------------------------------------------*/
/* UI MENU TEXT ITEM
/*---------------------------------------------------------------------------------------------*/
.UIMenuTextItem {
  display: flex;
  align-items: center;
  padding: 8px;
  cursor: pointer;
}

.UIMenuTextItem.u-selected {
  background-color: rgb(98, 255, 106);
}

.UIMenuTextItem.u-disabled {
  pointer-events: none;
  opacity: 0.5;
}

/*---------------------------------------------------------------------------------------------*/
/* UI MESSAGE WIDGET
/*---------------------------------------------------------------------------------------------*/
.UIMessage {
  display: block;
  position: absolute;
  right: 0;
  bottom: 10px;
  left: 0;
  z-index: 12;
}

.UIMessage-inner {
  background-color: rgba(0, 0, 0, 0.5);
}

.UIMessage-picture {
  position: absolute;
  bottom: 0;
  left: 0;
  padding-left: 10px;
  padding-right: 10px;
}

.UIMessage-picture-img {
  width: 132px;
}

.UIMessage-textbox {
  position: relative;
  margin-left: 160px;
  margin-right: 80px;
  padding-top: 10px;
  min-height: 150px;
  max-height: 150px;
  overflow: hidden;
}

.UIMessage-textbox-text {
  line-height: 1.6;
  white-space: pre-line;
}

.UIMessage-textbox-author {
  font-size: 12px;
  margin-bottom: 10px;
  color: yellow;
}

.UIMessage-textbox-next {
  display: none;
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 11px;
  height: 8px;
  background: transparent url(../textures/ui_next_icon_sprite.png) 0 0 no-repeat;
  animation: ui-message-widget-textbox-next 1s steps(6) infinite;
}

@keyframes ui-message-widget-textbox-next {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: -66px 0;
  }
}

/*---------------------------------------------------------------------------------------------*/
/* UI PRINT WIDGET
/*---------------------------------------------------------------------------------------------*/
.UIPrint {
  display: block;
  position: absolute;
  top: 10px;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 12;
}

.UIPrint-textbox {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.5);
}

.UIPrint-textbox-text {
  line-height: 1.6;
  white-space: pre-line;
}

.UIPrint-textbox-next {
  display: none;
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 11px;
  height: 8px;
  background: transparent url(../textures/ui_next_icon_sprite.png) 0 0 no-repeat;
  animation: ui-print-widget-textbox-next 1s steps(6) infinite;
}

@keyframes ui-print-widget-textbox-next {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: -66px 0;
  }
}

/*---------------------------------------------------------------------------------------------*/
/* UI PROMPT WIDGET
/*---------------------------------------------------------------------------------------------*/
.UIPrompt {
  padding-top: 10px;
  padding-right: 10px;
  padding-left: 10px;
  border: 10px solid;
  border-image: url(../textures/ui_border.png) 3 fill;
}

.UIPrompt-text {
  display: block;
  line-height: 24px;
  margin-bottom: 16px;
  white-space: pre;
  text-align: center;
}

.UIPrompt .UIMenu {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  border: 0;
  border-image: none;
}

/*---------------------------------------------------------------------------------------------*/
/* UI SPRITE WIDGET
/*---------------------------------------------------------------------------------------------*/
.UISprite {
  background-repeat: no-repeat;
  background-position: 0px 0px;
}

/*---------------------------------------------------------------------------------------------*/
/* UI TEXT WIDGET
/*---------------------------------------------------------------------------------------------*/
.UIText {
  display: flex;
  border: 10px solid;
  border-image: url(../textures/ui_border.png) 3 fill;
}

.UIText-text {
  display: inline-flex;
  align-items: center;
  padding: 8px;
}

/*---------------------------------------------------------------------------------------------*/
/* UI INPUT WIDGET
/*---------------------------------------------------------------------------------------------*/
.UIInput {
  display: flex;
  border: 10px solid;
  border-image: url(../textures/ui_border.png) 3 fill;
  overflow: hidden;
}

.UIInput-container {
  position: relative;
  display: flex;
  padding: 5px 70px 5px 5px;
  width: 400px;
  height: 50px;
  background-color: #e4e4e4;
}

.UIInput-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
}

.UIInput-input:focus {
  padding: 8px;
  animation: PulseAttention 1.5s cubic-bezier(.215, .61, .355, 1) forwards infinite;
}

.UIInput-value {
  display: flex;
  align-items: stretch;
  flex-direction: row-reverse;
  max-width: 80%;
  border: 0;
  font-size: 1.3rem;
  color: #777;
  background-color: #e4e4e4;
  border-right: 3px solid transparent;
}

.UIInput-label {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 5px;
  display: flex;
  align-items: center;
  color: #a7a7a7;
  font-size: 15px;
}

.UIInput-input:not([value=""])~.UIInput-label {
  justify-content: flex-end;
}

.UIInput-value-char {
  display: flex;
  align-items: center;
}

.UIInput.u-focused .UIInput-value-char.u-focused {
  animation: InputCaretPulse 1.5s cubic-bezier(.215, .61, .355, 1) forwards infinite;
}

@keyframes InputCaretPulse {
  50% {
    background-color: rgb(0, 0, 0);
    color: #fff;
  }
}

/*---------------------------------------------------------------------------------------------*/
/* UI CONFETTI WIDGET
/*---------------------------------------------------------------------------------------------*/
.UIConfetti {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  z-index: 99999;
}

.UIConfetti--visible {
  display: fixed;
}

.UIConfetti-container {
  perspective: 700px;
  position: absolute;
  overflow: hidden;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.UIConfetti-container-item {
  perspective: 700px;
  position: absolute;
  overflow: hidden;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999999999999999;
}

.UIConfetti-container-item--animation-slow {
  animation: confetti-slow 2.25s linear infinite;
}

.UIConfetti-container-item--animation-medium {
  animation: confetti-medium 1.75s linear infinite;
}

.UIConfetti-container-item--animation-fast {
  animation: confetti-fast 1.25s linear infinite;
}

@keyframes confetti-slow {
  0% {
    transform: translate3d(0, 0, 0) rotateX(0) rotateY(0);
  }

  100% {
    transform: translate3d(25px, 105vh, 0) rotateX(360deg) rotateY(180deg);
  }
}

@keyframes confetti-medium {
  0% {
    transform: translate3d(0, 0, 0) rotateX(0) rotateY(0);
  }

  100% {
    transform: translate3d(100px, 105vh, 0) rotateX(100deg) rotateY(360deg);
  }
}

@keyframes confetti-fast {
  0% {
    transform: translate3d(0, 0, 0) rotateX(0) rotateY(0);
  }

  100% {
    transform: translate3d(-50px, 105vh, 0) rotateX(10deg) rotateY(250deg);
  }
}