html {
  border: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

h1,
h2 {
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
}

body {
  border: 0;
  margin: 0;
  font-size: 12px;
  overflow: hidden;
  text-align: center;
  padding: 0;
  font-family: arial, sans-serif;
}

#curtain {
  content: "";
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  transition: height 0.5s ease;
}

#coffee-start {
  width: 100vw;
  height: 100vh;
  background: url("./icons/joinads-bg.jpg") top/cover;
  position: relative;
  display: flex;
  align-items: center;
}

.restart-button {
  position: absolute;
  left: 0;
  bottom: 0;
  transform: translate(50%, -40%);
  z-index: 1;
}

.header {
  position: relative;
  text-align: center;
  background: transparent;
}

.waves {
  width: 100%;
  display: flex;
  margin-bottom: -7px; /*Fix for safari gap*/
  justify-content: center;
}

.waves img {
  width: 100%;
  height: 100vh;
}

/* Animation */
.parallax > use {
  animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}
.parallax > use:nth-child(1) {
  animation-delay: -2s;
  animation-duration: 7s;
}
.parallax > use:nth-child(2) {
  animation-delay: -3s;
  animation-duration: 10s;
}
.parallax > use:nth-child(3) {
  animation-delay: -4s;
  animation-duration: 13s;
}
.parallax > use:nth-child(4) {
  animation-delay: -5s;
  animation-duration: 20s;
}
@keyframes move-forever {
  0% {
    transform: translate3d(-90px, 0, 0);
  }
  100% {
    transform: translate3d(85px, 0, 0);
  }
}

#level {
  display: none;
}

.loader {
  top: 0;
  left: 0;
  height: 100%;
  position: fixed;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.loader p {
  left: 0;
  top: 45%;
  margin: 0;
  width: 100%;
  color: #fff;
  font-size: 14px;
  position: fixed;
  text-align: center;
  font-weight: normal;
  font-family: monospace;
}

@media (max-width: 500px) {
  .loader p {
    font-size: 14px;
  }
}

html[context="popup"] body {
  overflow: hidden;
}

html[context="popup"] .content table {
  border-spacing: 1px;
}

html[context="popup"] .content canvas {
  max-height: 400px;
}

html[context="webapp"] .toolbar {
  display: none;
}

html[context="webapp"] .loader {
  width: "100%";
}

.game-container {
  background: url(./icons/joinads-bg.jpg) top/cover;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding-left: 5vw;
  padding-right: 5vw;
}

.game-container h2 {
  color: #fefefd;
  font: 700 clamp(3rem, 12vw, 12rem) / 1.125 "League Spartan", sans-serif;
}

.game-dollar {
  display: inline-block;
  animation: shake 2s infinite;
  padding-top: 20px;
  padding-bottom: 20px;
}

/* Dollar animation */
@keyframes shake {
  0% {
    transform: translate(0px, 0px) rotate(0deg);
  }
  20% {
    transform: translate(-5px, -10px) rotate(-4deg);
  }
  40% {
    transform: translate(-15px, 0px) rotate(4deg);
  }
  50% {
    transform: translate(15px, 10px) rotate(0deg);
  }
  60% {
    transform: translate(5px, -5px) rotate(4deg);
  }
  80% {
    transform: translate(-5px, 10px) rotate(-4deg);
  }
  100% {
    transform: translate(0px, 0px) rotate(0deg);
  }
}
.game-dollar div {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-85%, -50%);
}
.game-dollar img {
  width: 80vw;
  height: auto;
}

.game-start-button {
  padding: 3vw 12vw;
  border-radius: 12vw;
  font: 700 clamp(1rem, 6vw, 6rem) / 1.125 "Roboto", sans-serif;
  letter-spacing: 0;
  background-color: #3ff167;
  border: 4px solid #ffffff55;
  color: #fefefd;
  text-transform: uppercase;
  box-shadow: 0 0 50px 1rem rgba(63, 241, 103, 1);
  transition: box-shadow 0.2s, background-color 0.2s;
  animation: glitch 3s 0s infinite;
}

@keyframes glitch {
  0% {
    box-shadow: 0 0 50px 1rem rgba(63, 241, 103, 1);
    background-color: #3ff167;
  }
  4% {
    box-shadow: none;
    background-color: transparent;
  }
  8% {
    box-shadow: 0 0 50px 1rem rgba(63, 241, 103, 1);
    background-color: #3ff167;
  }
  10% {
    box-shadow: none;
    background-color: transparent;
  }
  12% {
    box-shadow: 0 0 50px 1rem rgba(63, 241, 103, 1);
    background-color: #3ff167;
  }
  100% {
    box-shadow: 0 0 50px 1rem rgba(63, 241, 103, 1);
    background-color: #3ff167;
  }
}

.game-logo {
  width: 50%;
}

.game-logo img {
  max-width: 100%;
  height: auto;
}
