/**
 * CSS for the game.
 */
*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}


@font-face {
  font-family: Molot;
  src: url(Molot.otf);
}

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');


#snap-3d-panel {
  background: transparent;
  z-index: 100;
  position: absolute;
}
#snap-3d-canvas {
  width: 100vw;
  height: 100vh;
  position: absolute;
  left: 50vw;
  top: 50vh;
  margin-left: 0;
  transform-origin: top left;
  z-index: 0;
  opacity: 0;
  pointer-events: all;
  transform: translate(-50%,-50%);
  transition: opacity 1s;
}
.bb-game-started #snap-3d-canvas {
  cursor: pointer;
}
#snap-3d-canvas.visible {
  opacity: 1;
  pointer-events: all;
}

.bb-no-grab-panel {
  position: absolute;
  top: 50vh;
  left: 50vw;
  width: 15vh;
  height: 15vh;
  cursor: not-allowed;
  border: 2px dashed white;
  transform: translate(-50%,-50%);
  z-index: 100;
  border-radius: 15vh;
  opacity: 0;
  display: none;
  transition: opacity .2s;
}
.bb-no-grab-panel:hover {
  opacity: .5;
}
.bb-game-started .bb-no-grab-panel {
  display: block;
}

button {
  background: url(../img/tr-button.png);
  background-size: 100% 100%;
  color: black;
  text-shadow: 0 0 2px rgba(253,169,138,1); 
  font-family: Molot;
  font-size: 24px;
  padding: 30px 64px;
  transform: rotate(2deg);
  cursor: pointer;
  border-radius: 4px;
  user-select: none;
  border: none;
  -moz-user-select: none;
}

.bb-center-button {
  position: absolute;
  top: 55vh;
  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 {
  display: none;
  left: 85vw;
  top: 50vh;
  opacity: 0;
  transition: transform .4s, opacity 1s;
}
.bb-game-started .bb-reset-button {
  opacity: 1;
}

.bb-progress-panel {
  position: fixed;
  top: 4px;
  left: 50vw;
  margin-left: -77px;
  /* transform: translate(-50%, -80%) rotate(3deg); */
  /* transform-origin: center center; */
  transition: transform .4s, opacity .4s;
  z-index: 60;
  pointer-events: none;
  width: 325px;
  /* border: 1px solid red; */
  height: 100px;
  color: rgba(255,255,255,.4);
  font-size: 27px;
  text-align: left;
  line-height: 22px;
}
.bb-progress-panel i, .bb-progress-panel b {
  display: inline-block;
  width: 17px;
  height: 16px;
  background-size: 12px 12px;
  background-position: top left;
  background-image: url(../img/tr-progress-complete.png);
  background-repeat: no-repeat;
}
.bb-progress-panel b {
  background-image: url(../img/tr-progress-active.png);
}


body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  perspective: 2000px;
  perspective-origin: center center;
  background-color: #4cb5e3;
  background-image: url(../img/tr-body.jpg);
  background-position: center 85vh;
  background-size: 100vw;
  user-select: none;
  -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) brightness(.5);
  opacity: 1;
  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: .6;
  filter: none;
  transform: translate(-50%,-50%) scale(1.5);
}


.snap-3d-fps-panel {
  display: block;
  position: fixed;
  left: 50vw;
  top: -1px;
  margin-left: 249px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 15px;
  width: 32px;
  overflow: hidden;
  height: 20px;
  color: #f9ff9d;
  letter-spacing: -1px;
  padding-top: 1px;
}

/**
 * Styles for the panel.
 */
.bb-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;
}

/**
 * Styles for the timer panel.
 */
.tr-timer-panel {
  width: 587px;
  height: 69px;
  position: fixed;
  background-image: url(../img/tr-timer-panel.png);
  background-size: contain;
  top: 0;
  left: 50vw;
  transform: translate(-50%,0);
  z-index: 50;
  pointer-events: none;
  font-family: 'Share Tech Mono', monospace;
  font-size: 29px;
  color: #464333;
  padding-left: 63px;
  padding-top: 1px;
  text-shadow: 0 0 2px rgba(253,169,138,.2); 
  letter-spacing: -3px;
}
.tr-timer-panel b {
  font-weight: normal;
  color: #f9ff9d;
  text-shadow: 0 0 2px rgba(253,169,138,.8);
}

/**
 * Styles for the leader panel.
 */
.tr-leader-panel {
  width: 223px;
  height: 360px;
  position: fixed;
  background-image: url(../img/tr-leader-panel.png);
  background-size: contain;
  top: 50vh;
  right: 0;
  z-index: 950;
  pointer-events: all;
  transform: translate(0, -50%);
  font-family: 'Share Tech Mono', monospace;
  font-size: 29px;
  color: #464333 !important;
  padding-left: 48px;
  padding-top: 109px;
  padding-right: 22px;
  text-shadow: 0 0 2px rgba(253,169,138,.2); 
  cursor: pointer;
  transition: margin .5s ease;
}
.tr-leader-panel.collapsed {
  margin-right: -190px;
}
.tr-leader-panel td, .tr-leader-panel th {
  color: rgba(249,255,157,.6);
  font-size: 20px;
  border-bottom: 1px solid rgba(249,255,157,.3);
  padding: 6px;
}
.tr-leader-panel th {
  color: #f9ff9d;
  text-align: left;
}
.tr-leader-panel tr.current {
  background-color: rgba(0,255,0,.5);
}


