/**
 * CSS for the game.
 */

@font-face {
  font-family: VTCLettererProRegular;
  src: url(VTCLettererProRegular.ttf);
}


#snap-3d-panel {
  --w: calc(100vw - 100px);
  --h: calc(100vh - 100px);
  background: transparent;
  z-index: 200;
  position: absolute;
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity 1s;
  pointer-events: none;
}
#snap-3d-canvas {
  width: var(--w);
  height: var(--h);
  position: absolute;
  left: 50vw;
  top: 50vh;
  margin-left: 0;
  transform-origin: top left;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%,-50%);
  border: 2px solid #4c3d32;
  transition: opacity 1s, width 1s ease, height 1s ease;
  margin-left: -3px;
  margin-top: -8px;
}
#snap-3d-panel::before {
  content: '';
  position: absolute;
  left: 50vw;
  top: 50vh;
  width: calc(var(--w) * 1.01);
  height: calc(var(--h) * 1.01);
  background-image: url(../img/am-cockpit.png);
  background-size: 100%;
  transform: translate(-50%,-50%);
  background-repeat: no-repeat;
  /* border: 1px solid red; */
  z-index: 140;
  pointer-events: none;
  margin-left: -3px;
  margin-top: -8px;
}

.bb-game-started #snap-3d-canvas {
  cursor: pointer;
}
#snap-3d-panel.visible, #snap-3d-canvas.visible {
  opacity: 1;
  pointer-events: all;
}
#snap-3d-labels {
  z-index: 150;
  width: var(--w);
  height: var(--h);
  position: absolute;
  left: 50vw;
  top: 50vh;
  margin-left: 0;
  transform-origin: top left;
  pointer-events: none;
  transform: translate(-50%,-50%);
  transition: opacity 1s, width 1s ease, height 1s ease;
  margin-left: -3px;
  margin-top: -8px;
  
}

.snap-3d-label {
  text-align: center;
  position: absolute;
  transform: translate(-50%, -100%);
}



button {
  background: red;
  color: white;
  font-family: VTCLettererProRegular;
  font-size: 24px;
  padding: 10px 24px;
  transform: rotate(2deg);
  cursor: pointer;
  border-radius: 4px;
  user-select: none;
  -moz-user-select: none;
}

.bb-center-button {
  position: absolute;
  top: 65vh;
  left: 50vw;
  transform: translate(-50%, -10%) rotate(3deg);
  transform-origin: center center;
  transition: transform .4s, opacity .4s;
  z-index: 200;
}
.bb-center-button.hidden {
  opacity: 0;
  pointer-events: none;
}
.bb-center-button:hover {
  transform: scale(1.1) translate(-47%, 0%) rotate(0deg);
}
.bb-center-button:active {
  transform: scale(1.0) translate(-47%, 0%) rotate(0deg);
}

.bb-reset-button {
  left: 85vw;
  top: 50vh;
  opacity: 0;
  transition: transform .4s, opacity 1s;
}
.bb-game-started .bb-reset-button {
  opacity: 1;
}

.bb-progress-panel {
  position: absolute;
  top: 50vh;
  left: 85vw;
  transform: translate(-50%, -80%) rotate(3deg);
  transform-origin: center center;
  transition: transform .4s, opacity .4s;
  z-index: 0;
  pointer-events: none;
  width: 135px;
  height: 100px;
  color: rgba(255,255,255,.4);
  font-size: 27px;
  text-align: center;
  line-height: 22px;
}
.bb-progress-panel b {
  color: white;
  font-weight: normal;
}
.bb-progress-panel i {
  color: white;
  text-shadow: 0px 0px 4px white;
  font-style: normal;
}

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  perspective: 2000px;
  perspective-origin: center center;
  user-select: none;
  background-color: white;
  -moz-user-select: none;
}

/*
body::before {
  content: '';
  position: absolute;
  width: 50vh;
  height: 25vh;
  background-image: url(../img/bb-logo.png);
  background-size: 100%;
  background-repeat: no-repeat;
  left: 50vw;
  top: 35vh;
  pointer-events: none;
  transform: translate(-50%,-70%) scale(1.5);
  transition: filter 1s, opacity 1s, transform 2s;
}
body.bb-game-started::before {
  filter: blur(2px);
  opacity: .5;
  transform: translate(-50%,-50%) scale(1);
}


body::after {
  content: '';
  position: absolute;
  width: 10vh;
  height: 10vh;
  background-image: url(../img/bb-instructions.png);
  background-size: 100%;
  background-repeat: no-repeat;
  left: 15vw;
  top: 50vh;
  transform: translate(-50%,-50%) scale(1);
  opacity 0;
  pointer-events: none;
  filter: blur(5px);
  transition: filter 1s, opacity 1s, transform 2s;
  z-index: 0;
}
body.bb-game-started::after {
  opacity: 1;
  filter: none;
  transform: translate(-50%,-50%) scale(1.5);
}
*/


.am-background {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: 10;
  background-color: white;
  background-image: url(../img/am-body.png);
  background-position: top left;
  background-size: 1200px 1200px;
  transition: filter 1s;   
}
.am-background.blurred {
  /*filter: blur(5px);*/
}

.snap-3d-fps-panel {
  display: none;
}

/**
 * Styles for the panel.
 */
.am-panel {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  transform-style: preserve-3d;
  perspective: 2900px;
  overflow: hidden;
  z-index: 100;
  perspective-origin: 50% 170px;
  pointer-events: none;
}



/**
 * Talk bubbles for actors.
 */
.say-bubble {
  position: relative;
  border: 2px solid black;
  border-radius: 10px;
  background: white;
  padding: 7px 12px;
  color: black;
  margin-bottom: 0;
  max-width: 160px;
  min-width: 100px;
  line-height: 17px;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  top: 18vh;
  font-size: 18px;
  font-family: VTCLettererProRegular;
  animation: bounceIn;
  margin-left: -43vh;
  animation-duration: .4s;
}
.say-bubble span.character {
  position: absolute;
  width: 13vh;
  bottom: -23vh;
  left: 2vh;
  height: 13vh;
  border: 1px solid red;
  background-image: url(../img/am-character-admiral.png);
  background-size: contain;
  background-repeat: no-repeat;
  border: none;
  outline: none;
}
  
.say-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0px;
  height: 20px;
  z-index: 1000;
  margin-left: -7px;
  border-top: 10px solid white;
  border-right: 7px solid rgba(0,0,0,0);
  border-left: 7px solid rgba(0,0,0,0);
}
.say-bubble::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -10px;
  width: 0px;
  height: 20px;
  z-index: 1000;
  border-top: 13px solid black;
  border-right: 10px solid rgba(0,0,0,0);
  border-left: 10px solid rgba(0,0,0,0);
}

/**
 * You can put UI hints in a <small> tag and they will appear like keyboard keys.
 */
.say-bubble span {
  position: absolute;
  background: rgb(221,221,221);
  background: linear-gradient(180deg, rgba(221,221,221,1) 0%, rgba(165,165,165,1) 100%);
  outline: 2px solid black;
  bottom: -11px;
  right: 38px;
  padding: 3px 2px;
  border-radius: 3px;
  height: 21px;
}
.say-bubble small {
  display: block;
  background: rgb(221,221,221);
  background: linear-gradient(0deg, rgba(221,221,221,1) 0%, rgba(165,165,165,1) 100%);
  padding: 1.5px 14px;
  border-radius: 2px;
  font-family: MrsLollipop;
  font-size: 11px;
  line-height: 14px;
  margin-top: -1px;
}


/**
 * Health bars for actors.
 */
.health-bar {
  width: 45vh;
  height: 2vh;
  padding: 5px;
  background: #ddd;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  /* border-radius: 5px; */
  position: relative;
  background: none;
  top: -38vh;
  left: 1vh;
}
.bar {
  background: #e6b04b;
  width: 100%;
  height: 10px;
  position: relative;
  border-radius: 12px;
}
.hit {
  background: #c54;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0px;
  border-radius: 12px;
  border: 3px solid #d65;

/* Start the shake animation and make the animation last for 0.5 seconds */
  xanimation: shake 0.5s;

  /* When the animation is finished, start again */
  animation-iteration-count: infinite;
}
.restore {
  background: rgb(34 226 228 / 60%);
  position: absolute;
  top: 0;
  left: 100%;
  bottom: 0;
  width: 0px;
  border-radius: 12px;
}
.animate .bar,
.animate .hit,
.animate .restore {
  transition: width .3s linear;
}


