@import url("https://fonts.googleapis.com/css?family=Open+Sans");

@font-face{
  font-family: "Comic Neue";
  src: url(fonts/ComicNeue-Bold.ttf) format("truetype");
}

*{
  font-family: "Comic Neue", "Comic Sans MS", cursive, sans-serif;
}


body {

  overflow: hidden;
  opacity: 1;
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100%;
  background: #aa0000;
  transition: background 1s ease-in-out, 1s opacity ease-out;
    margin-top:22px;
}

.skew {
  animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
  0% {
    transform: skew(0deg, 0deg) scale(1, 1);
  }
  25% {
    transform: skew(5deg, 5deg) scale(0.9, 1.1);
  }

  50% {
    transform: skew(0deg, 0deg) scale(1.1, 0.9);
  }

  75% {
    transform: skew(-5deg, -5deg) scale(0.9, 1.1);
  }
}

.fade {
  opacity: 0;
}

main {
  display: flex;
  align-self: center;
  flex-direction: column;
  justify-content: center;
  max-width: 520px;
  margin: auto;
  text-align: center;
}

h1 {
  font-weight: 800;
  text-transform: uppercase;
}

h1,h2,p,small{
  color:#FFF;
  transition:color 1s ease-in-out;
}



#number {
  font-weight: 600;
  font-size: 3em;
  font-variant-numeric: tabular-nums;
}

button {
  cursor: pointer;
  text-transform: capitalize;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.5);
  width: 100%;
  margin-bottom: 0.5em;
  color: #fff;
  font-size: 1.2em;
  background: #51aded;
  padding: 22px;
  border: white;
  transition: background 0.3s ease-in-out;
  font-weight: 700;
  transform: translateY(0px);
  border-radius:5px;
  border-bottom:#448ec1 5px solid;
}

button:active, button:hover {
  border-bottom:0px;
  background: #448ec1;
  border-top:#37729a 5px solid;
}

button.red {
  background: #ed5153;
  border-bottom:#bb4142 5px solid;
}

button.red:active, button.red:hover {
  border-bottom:0px;
  background: #bb4142;
  border-top:#9c3738 5px solid;
}

small.footer {
  position: absolute;
  font-family: "Open Sans", sans-serif;
  bottom: 0;
  right: 0;
  padding: 22px;
  z-index: 150;
}

small.footer a{
  font-family: "Open Sans", sans-serif;
}

small.footer a {
  color: #0000aa;
}

.footer a {
  position: relative;
}

.footer .img-div {
  position: absolute;
  width: 100px;
  height: 100px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
  border-radius: 10%;
  transform: scale(0, 0) translate(-50%, 0%);
  transform-origin: left bottom;
  transition: 0.3s ease-in-out transform;
  left: 50%;
  bottom: 22px;
  overflow: hidden;
  display: block;
}

.footer img {
  width: 100%;
  height: 100%;
}

.footer .img-div::after {
  content: "";
  display: block;
  height: 20%;
  transform: rotate(45deg) translateY(-100px);
  width: 200%;
  background: rgba(255, 255, 255, 0.5);
  position: absolute;
  top: 0;
  left: 0;
  box-shadow: 0px 0px 15px rgba(255, 255, 255, 1);
  transition: 0.6s ease-out transform;
}

.footer a:hover .img-div {
  transform: scale(1, 1) translate(-50%, 0%);
}

.footer a:hover .img-div::after {
  transform: rotate(45deg) translateY(200px);
}

#btnContainer {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 350px;
}

#message {
  transform: translate(-50%, -50%);
  z-index: -1;
}

#gif {
  position: absolute;
  z-index: 50;
  top: 0;
  left: 0;
  overflow: hidden;
  max-width: 300px;
  max-height: 300px;
  height: auto;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  user-drag: none;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  cursor: grab;
}

#skew-wrapper {
  width: 100%;
  height: 100%;
}
#gif.bumpHorizontal {
  animation: bumpHorizontal 0.3s ease-out forwards;
}

#gif.bumpVertical {
  animation: bumpVertical 0.3s ease-out forwards;
}

#gif.dragging {
  transform: scale(0.9, 0.9);
  box-shadow: 0 5px 35px rgba(0, 0, 0, 0.5);
  cursor: grabbing;
}

@keyframes bumpHorizontal {
  0% {
    transform: scale(1, 1);
  }
  50% {
    transform: scale(0.95, 1.05);
  }
  100% {
    transform: scale(1, 1);
  }
}

@keyframes bumpVertical {
  0% {
    transform: scale(1, 1);
  }
  50% {
    transform: scale(1.05, 0.95);
  }
  100% {
    transform: scale(1, 1);
  }
}

#red-overlay {
  background: rgba(255, 0, 0, 1);
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  z-index: 100;
  pointer-events: none;
  animation: bgPuls 0.5s ease-in-out infinite;
}

@keyframes bgPuls {
  0% {
    background: rgba(255, 0, 0, 1);
  }
  50% {
    background: rgba(255, 0, 0, 0.8);
  }
  100% {
    background: rgba(255, 0, 0, 1);
  }
}

@media(max-width:520px){

  body{

  }

  main{
    display: block;
    padding:11px;
    box-sizing: border-box;
  }

  h1{
    font-size:1.5em;
    padding:1em;
  }

  #number {
    font-weight: 600;
    font-size: 2em;
  }

  button{
    width:100%;
  }

  #gif {
    max-width: 200px;
    max-height: 200px;
  }

  small.footer {
    text-align: right;
  }

}
