/* latin */
@font-face {
  font-family: 'Abel';
  font-style: normal;
  font-weight: 400;
  src: local('Abel Regular'), local('Abel-Regular'), url(../font/abel-regular.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* {
  margin: 0;
  padding: 0;
}
body {
  background-color: #CCC;
  font-family: 'Abel', sans-serif;
}
  body > p {
    text-align: center;
  }
#wrapper {
  position: relative;
}
#PHASER_CANVAS {
  position: relative;
  margin: 0 auto;
  max-width: 474px;
}
#UI {
  position: relative;
  margin: 0 auto;
  max-width: 474px;
  width:100%;
  font-family: 'Abel', sans-serif;
  overflow: hidden;
}
#topbar {
  font-family: 'Abel', sans-serif;
  margin-right: 4%;
  margin-left: 4%;
  position: absolute;
  top:0;
  padding: 4px;
  text-align: center;
  color:#FFF;
  font-size:16px;
  width:92%;
  box-sizing: border-box;
  background-color: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,0,0,0.8);
}
#topbar span {
  display:inline-block;
  width: 130px;
  margin: 0 auto;
  text-align: left;
}

#debug {
  padding: 10px;
  border: 2px solid #AAA;
  margin-top:20px;
}
#backdrop {
  position: absolute;
  top: 0;
  left:0;
  width:100%;
  max-width:474px;
  height: 100%;
  max-height:600px;
  background-color: rgba(0,0,0,0.5);
}
.overlay {
  /*background-color: #fff;*/
  border-radius: 10px 10px;
  /*box-shadow: 0 0 10px #000;*/
  width: 90%;
  height: 60%;
  position: absolute;
  top: 30%;
  left: 5%;
  box-sizing: border-box;
  padding: 20px;
}
/*div mit rundenzeit in der zwischensequenz*/
.overlay div {
  text-align: center;
  border-radius: 5px;
  margin-bottom: 10px;
  padding: 20px;
  font-size: 14pt;
  color: white;
  background-color: rgba(0,0,0,0.5);
  border: 1px dotted rgba(0,0,0,0.8);
}
@media (max-width:480px) {
  .overlay {
    width:100%;
    left:0;
  }
  .overlay div {
    margin:0 0 10px 0;
  }
}


/*link zum gewinnspiel*/
.overlay a{
  color:white;
  text-decoration-color:orange; 
  text-align: center;
}
.hidden {
  display: none;
}
.start-overlay {
  top: 80%;
  background-color: transparent;
  border: none;
  box-shadow: none;
}
.start-overlay button {
  color:transparent;
  background-color: transparent;
  border: none;
  background-image:url('../images/buttons/start.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius:0; 
  width: 100%;
  height: 50px;
  position:relative;
  animation: button-bounce .5s ease;
  animation-delay: 1s;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  cursor:pointer;
}
@keyframes button-bounce {
  0% { top: 0px; }
  100% { top: -10px; }
}
.overlay.end-overlay {
  top: 50%;
  transform: translateY(-50%);
}
.end-overlay table {
  width:100%;
  margin:10px 0;
}
.end-overlay table td, .end-overlay table th {
  width:50%;
  text-align:left;
}
.end-overlay button {
  font-family: 'Abel', sans-serif;
  color:white;
  background:url('../images/buttons/button.png') top center no-repeat;
  background-size:contain;
  border: none;
  vertical-align: middle;
  border-radius:0; 
  width: 100%;
  height:75px;
  outline:none;
  cursor:pointer;
  font-size: 20px;
  padding-bottom: 14px;
  white-space: nowrap;

  color: white;
  text-shadow:1px 1px 2px #000;
}
.end-overlay button:first-of-type {
  margin-top:10px;
}

.start-overlay, .end-overlay {
  height: auto;
}

.track-name-overlay {
  pointer-events: none;
}
.track-name-overlay {
  opacity: 0;
}
.track-name-overlay.fade-in {
  opacity: 1;
  transition: opacity 1s;
}
.track-name-overlay.fade-out {
  opacity: 0;
  transition: opacity 1s;
}

/* HTML elements for best practice */
#pre_game_overlay,
#post_game_overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-flow: row;
  justify-content: center;
}
#pre_game_overlay a,
#post_game_overlay a,
#pre_game_overlay button,
#post_game_overlay button {
  position: absolute;
  display: flex;
  flex-flow: row;
  justify-content: center;
  align-items: center;
  width: 85%;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}
#pre_game_overlay a span,
#post_game_overlay a span,
#pre_game_overlay button span,
#post_game_overlay button span {
  position: absolute;
  font-size: 10vw;
  color: #fff;
  font-family: 'Abel', sans-serif;
}
@media screen and (min-width: 474px) {
  #pre_game_overlay a span,
#post_game_overlay a span,
#pre_game_overlay button span,
#post_game_overlay button span {
  font-size: 48px;
}
}
#pre_game_overlay a img,
#post_game_overlay a img,
#pre_game_overlay button img,
#post_game_overlay button img {
  width: 100%;
  height: auto;
}
#pre_game_overlay #start_button {
  top: 78.3%;
}
#post_game_overlay #action_button {
  top: 58%;
}
#post_game_overlay #restart_button {
  top: 78.3%;
}
#pre_game_overlay.hide,
#post_game_overlay.hide {
  display: none;
}
#pre_game_overlay.show,
#post_game_overlay.show {
  display: flex;
}
#pre_game_overlay #start_button.show,
#post_game_overlay #restart_button.show,
#post_game_overlay #action_button.show {
  display: flex;
}
#pre_game_overlay #start_button.hide,
#post_game_overlay #restart_button.hide,
#post_game_overlay #action_button.hide {
  display: none;
}

/* START BUTTON */
#pre_game_overlay #start_button.show {
  animation-name: startIn;
  animation-duration: .5s;
  animation-timing-function: ease-in-out;
}
#pre_game_overlay #start_button.out {
  animation-name: startOut;
  animation-duration: .5s;
  animation-timing-function: ease-in-out;
}
@keyframes startIn {
  0% {top: 100%;}
  40% {top: 68.3%;}
  100% {top: 78.3%;}
}
@keyframes startOut {
  0% {top: 78.3%;}
  40% {top: 83.3%;}
  100% {top: -50%;}
}
/* RESTART BUTTON */
#post_game_overlay #restart_button.show {
  animation-name: restartIn;
  animation-duration: .5s;
  animation-timing-function: ease-in-out;
}
#post_game_overlay #restart_button.out {
  animation-name: restartOut;
  animation-duration: .5s;
  animation-timing-function: ease-in-out;
}
@keyframes restartIn {
  0% {top: 100%;}
  40% {top: 68.3%;}
  100% {top: 78.3%;}
}
@keyframes restartOut {
  0% {top: 78.3%;}
  40% {top: 83.3%;}
  100% {top: -50%;}
}
/* ACTION BUTTON */
#post_game_overlay #action_button.show {
  animation-name: actionIn;
  animation-duration: .6s;
  animation-timing-function: ease-in-out;
}
@keyframes actionIn {
  0% {top: 100%;}
  40% {top: 43%;}
  100% {top: 58%;}
}