@font-face {
  font-family: "Press Start 2P";
  src: url("/font/PressStart2P-Regular.ttf");
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes danger {
  0% {
    /* white */
    filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(43deg)
      brightness(102%) contrast(105%);
  }

  25% {
    /*  red; */
    filter: invert(12%) sepia(94%) saturate(5982%) hue-rotate(2deg)
      brightness(95%) contrast(115%);
  }

  50% {
    /* black */
    filter: invert(0%) sepia(100%) saturate(7434%) hue-rotate(342deg)
      brightness(84%) contrast(113%);
  }

  100% {
    /* green */
    filter: invert(32%) sepia(50%) saturate(4139%) hue-rotate(109deg)
      brightness(105%) contrast(104%);
  }
}

@keyframes blink {
  to {
    background-image: none;
  }
}

@keyframes ellipsis {
  to {
    width: 1.25em;
  }
}

@keyframes flash {
  to {
    visibility: hidden;
  }
}

@keyframes shake {
  0% {
    transform: translate(4px, 4px) rotate(0deg);
  }

  10% {
    transform: translate(-4px, -8px) rotate(-3deg);
  }

  20% {
    transform: translate(-9px, 0px) rotate(3deg);
  }

  30% {
    transform: translate(9px, 6px) rotate(0deg);
  }

  40% {
    transform: translate(3px, -3px) rotate(3deg);
  }

  50% {
    transform: translate(-3px, 6px) rotate(-3deg);
  }

  60% {
    transform: translate(-9px, 3px) rotate(0deg);
  }

  70% {
    transform: translate(9px, 3px) rotate(-3deg);
  }

  80% {
    transform: translate(-3px, -3px) rotate(3deg);
  }

  90% {
    transform: translate(3px, 6px) rotate(0deg);
  }

  100% {
    transform: translate(3px, -6px) rotate(-3deg);
  }
}

* {
  box-sizing: border-box;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: -moz-none;
  -o-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: manipulation;
}

body {
  margin: 0;
  padding: 0;
  display: block;
  border-style: none;
  min-height: var(--app-height);
  font-family: "Press Start 2P";
  color: #ffffff;
}

.container {
  overflow: hidden;
  position: absolute;
  pointer-events: none;
}

.sprite {
  position: absolute;
  pointer-events: none;
  visibility: hidden;
  z-index: -6;
  background-repeat: no-repeat;
}

.blink {
  animation: blink 0.1s steps(5, start) infinite;
}

.white {
  filter: brightness(0) invert(1);
}

#gameCoverContainer {
  width: 100vw;
  height: var(--app-height);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
}

#coverImage {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  display: block;
  cursor: pointer;
}

.gradientBG {
  background: linear-gradient(-90deg, #a34fde, #ff386b, #ebff38, #3dd6f5);
  background-size: 400% 400%;
  animation: gradient 5s ease infinite;
  height: var(--app-height);
}

#loadingContainer {
  width: 100vw;
  height: var(--app-height);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  background-color: #000000;
  pointer-events: none;
}

#loadingMessage {
  color: red;
  border: 6px solid red;
  border-radius: 18px;
  font-size: 22pt;
  padding: 12px;
  width: 270px;
}

#loadingMessage:after {
  overflow: hidden;
  display: inline-block;
  vertical-align: bottom;
  animation: ellipsis steps(4, end) 1500ms infinite;
  content: "\2026";
  width: 0px;
}

#titleContainer {
  height: var(--app-height);
  width: 100vw;
  z-index: 2;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

#title {
  width: 80%;
  text-align: center;
}

#titleImage {
  position: relative;
  max-width: 100%;
  max-height: 100%;
}

#logoAreaContainer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  width: 100vw;
  height: 105px;
  background-color: #ab2621;
  bottom: 0px;
  gap: 4px;
  padding: 4px;
  justify-content: space-between;
  visibility: hidden;
  border-radius: 4px;
  border: 4px solid #000000;
  outline: 2px solid #ffffff;
}

.gameDialogContainer {
  width: 100vw;
  height: var(--app-height);
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  background-color: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.gameDialogTitle {
  font-size: 16pt;
  background-color: #000000;
  display: table;
  margin: 0 auto;
  margin-top: -14px;
  padding-left: 4px;
  padding-right: 4px;
}

.gameDialog {
  border-radius: 10px;
  outline: 2px solid #ffffff;
  width: 357px;
  color: #ffffff;
  padding: 0;
  pointer-events: inherit;
}

.gameDialog > div {
  border-radius: 7px;
  background-color: #000000;
  padding: 12px;
  height: 100%;
}

.gameDialog > div > div {
  border-radius: 7px;
  height: 100%;
  border: 10px solid #3dd6f5;
}

#gameSummaryStats {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 30px;
  justify-content: center;
  align-items: center;
  font-size: 9pt;
}

#gameSummaryDialog {
  height: 300px;
}

#logoContainer {
  display: flex;
  border-radius: 7px;
  background-color: black;
}

#logoImage {
  height: 80px;
  margin: auto;
  display: block;
}

#dhLogoContainer {
  display: flex;
  border-radius: 7px;
  background-color: black;
}

#dhLogo {
  width: 200px;
  height: 80px;
  margin: auto;
}

#titleQRCodeContainer {
  margin-bottom: 15px;
  margin-right: 15px;
  display: flex;
  position: fixed;
  bottom: 0;
  right: 0;
}

#logoQRCodeContainer {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000000;
  border-radius: 7px;
}

#qrCodeMessage {
  font-size: 14pt;
  margin-right: 20px;
}

#titleQRCode img {
  height: 100px;
  width: 100px;
  max-width: 100%;
  max-height: 100%;
}

#logoQRCode {
  width: 100px;
  height: 90px;
}

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

#playerInfoContainer {
  display: flex;
  bottom: 0px;
  margin-bottom: 60px;
  visibility: hidden;
  width: 100vw;
  justify-content: space-around;
  z-index: 1;
}

#roundAndScoreContainer {
  width: 357px;
  display: flex;
  justify-content: space-between;
}

#roundNumberAndBossHealth {
  display: inline-flex;
  flex-direction: column;
  height: 100%;
  font-size: 20pt;
  padding: 3px;
  width: 165px;
}

#bossHealthMeterContainer {
  display: flex;
  height: 20px;
  align-items: center;
}

#bossHealthMeter {
  height: 20px;
  width: 100%;
  border: 2px solid #ffffff;
  background-color: #000000;
  visibility: hidden;
}

#bossHealthMeter::before {
  content: "";
  display: flex;
  justify-content: end;
  width: var(--bossMeterValue, 0);
  height: 100%;
  background: #ff0000;
  white-space: nowrap;
}

#roundNumber {
  background-color: #000000;
  color: #8edd0a;
}

#roundNumberBox {
  display: flex;
  height: 28px;
  margin-top: 6px;
  align-items: center;
}

#playerNameAndScore {
  border: 3px solid #8edd0a;
  border-radius: 10px;
  background-color: #000000;
  height: 100%;
  width: 182px;
  padding: 3px;
  flex-direction: column;
  display: inline-flex;
  margin-left: 5px;
}

#playerName {
  height: 20px;
  font-size: 8pt;
  margin-left: auto;
  display: flex;
  align-items: center;
}

#playerScore {
  height: 30px;
  font-size: 20pt;
  margin-left: auto;
  align-items: center;
  display: flex;
}

#spritesContainer {
  width: 100vw;
  height: 100vh;
  height: var(--app-height);
  z-index: 0;
  pointer-events: auto;
}

#gameInfoContainer {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translate(0%, -50%);
  visibility: hidden;
  width: 430px;
}

#gameInfoContainer > div {
  padding: 18px;
  margin-right: 15px;
  border-radius: 10px;
  border: 4px solid #000000;
  outline: 2px solid #ffffff;
  background-color: #ab2621;
}

#gameInfoContainer > div > div {
  border-radius: 7px;
  background-color: #000000;
  padding: 18px;
}

#leaderText {
  font-size: 10pt;
  text-align: right;
  padding: 10px;
  margin-top: 8px;
  padding-top: 0px;
}

#leaderText div {
  padding-bottom: 10px;
}

#leaderList {
  height: 160px;
}

.infoList {
  border-radius: 7px;
  height: 300px;
  border: 10px solid #4bdfdd;
  background-color: #000000;
}

.infoTitle {
  font-size: 16pt;
  color: #ffffff;
  background-color: #000000;
  display: table;
  margin: 0 auto;
  margin-top: -14px;
  padding-left: 4px;
  padding-right: 4px;
}

#infoArea {
  margin-top: 20px;
  height: 200px;
}

#infoText {
  font-size: 8pt;
  padding-left: 8px;
  padding-right: 8px;
  padding-bottom: 10px;
  padding-top: 0px;
  margin-top: 8px;
  text-align: left;
}

#infoText div {
  padding-bottom: 8px;
}

#mountains {
  visibility: visible;
  position: absolute;
  bottom: 175px;
  left: 0px;
  width: 100vw;
  height: 698px;
  background-position: left bottom;
  background-size: contain;
  background-repeat: repeat-x;
  z-index: -7;
}

#scenery {
  visibility: visible;
  position: absolute;
  z-index: -5;
  bottom: 0px;
  width: calc(100vw * 8);
  height: 800px;
  background-position: left bottom;
  background-repeat: repeat-x;
}

#messageContainer {
  width: 100vw;
  height: var(--app-height);
  z-index: 4;
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
}

#messageBackground {
  width: 315px;
  height: 63px;
  z-index: -1;
  background-position: 0px 0px;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
}

#messageText {
  font-size: 16pt;
  width: 100%;
  text-align: center;
}

#confirmDialog {
  width: 315px;
  height: 160px;
  display: inline-flex;
  flex-direction: column;
  visibility: hidden;
}

#confirmDialogControls {
  width: 100%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

#confirmDialogButtons {
  display: flex;
}

#confirmMessage {
  display: flex;
  font-size: 14pt;
  margin: 12px;
}

#timebarContainer {
  width: 100vw;
  bottom: 0px;
  z-index: 1;
  display: flex;
  justify-content: space-around;
  align-items: center;
  visibility: hidden;
  margin-bottom: 20px;
  text-align: center;
}

#timeContainer {
  width: 357px;
  height: 36px;
  position: relative;
  overflow: hidden;
}

#timeBackground {
  width: 357px;
  height: 36px;
  background-repeat: no-repeat;
}

#posNegTimebarContainer {
  width: 333px;
  height: 12px;
  top: 12px;
  left: 12px;
}

#positiveTimebar {
  width: 333px;
  height: 12px;
  background-repeat: no-repeat;
}

#negativeTimebar {
  width: 333px;
  height: 12px;
  left: 180px;
  background-repeat: no-repeat;
}

.hurryUp {
  animation: danger 0.2s infinite;
}

#players {
  font-size: 16pt;
  text-align: right;
  color: #fe773e;
  margin-bottom: 18px;
}

.shaking {
  animation: shake 0.1s infinite;
}

#sight {
  width: fit-content;
  z-index: -2;
  display: inline-block;
  margin: auto;
}

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

#scoreAndAvatar {
  display: flex;
}

#playerAvatar {
  display: flex;
  height: 32px;
  width: 32px;
}

#avatarSelectDialog {
  height: 300px;
  pointer-events: none;
}

#avatarList {
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
}

.avatarChoice {
  flex-basis: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

dialog::backdrop {
  pointer-events: none;
  background-color: rgba(0, 0, 0, 0.5);
}

.button {
  border: 3px solid #ffffff;
  border-radius: 10px;
  height: 50px;
  width: 80px;
  margin-left: 8px;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spritePointsScoredFlashing {
  animation: flash 0.12s steps(2, start) infinite;
  position: absolute;
  font-size: 8pt;
}

.spritePointsScored {
  position: absolute;
  font-size: 10pt;
}

.sightMessage {
  /* animation: flash 0.5s steps(2, start) infinite; */
  position: absolute;
  font-size: 8pt;
  white-space: nowrap;
  display: inline-block;
}

#loginContainer {
  visibility: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
}

#loginBox {
  display: flex;
  flex-direction: column;
  width: 357px;
}

#loginFormBox {
  display: flex;
  flex-direction: column;
}

#passwordBox {
  height: 40px;
  display: flex;
  margin-top: 10px;
  padding-left: 20px;
  padding-right: 20px;
}

#loginLDLogo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#loginLogoBox {
  display: flex;
  width: 100%;
  height: 80px;
}

#passwordTextbox {
  border: 0;
  height: 100%;
  width: 100%;
  font-size: 18pt;
  border-bottom: 1px solid #ffffff;
  background-color: #000000;
  color: #ffffff;
  text-align: center;
}

#submitBox {
  display: flex;
  justify-content: right;
  margin-top: 20px;
  margin-bottom: 10px;
  height: 30px;
}

#submitButton {
  background-color: #000000;
  color: #ffffff;
  border: 0;
  cursor: pointer;
  font-family: "Press Start 2P";
  font-size: 18pt;
  margin-right: 20px;
  padding: 0;
}

#pauseButton {
  border: 3px solid #8edd0a;
  border-radius: 10px;
  width: 32px;
  height: 32px;
}
