:root {
  --postgelb: #ffcc00;
  --red: #D40511;
}

html, body {
  height: 100%;
}

@keyframes yellowmagic {
  0% {
    background-color: var(--postgelb);
  }
  25% {
    background-color: #fcf383;
  }
  50% {
    background-color: #f3ff00;
  }
  75% {
    background-color: #dad800;
  }
  100% {
    background-color: var(--postgelb);
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* taken from https://css-tricks.com/snippets/css/shake-css-keyframe-animation/ */
@keyframes shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%, 80% {
    transform: translate3d(2px, 0, 0);
  }

  30%, 50%, 70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%, 60% {
    transform: translate3d(4px, 0, 0);
  }
}

body {
  margin: 0px;
  font-family: sans-serif;
  background-color: var(--postgelb);
  animation: yellowmagic ease-in-out 20s infinite;
}

#chooser-container {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#chooser {
  margin: 16px;
  border-radius: 8px;
  max-width: 555px;
  border: 1px solid black;
  text-align: center;
  display: flex;
  flex-direction: column;
  padding: 16px;
  background-color: white;
}

#chooser span {
  font-size: 3rem;
  font-weight: bold;
}

#chooser img {
  width: 150px;
  margin: .5rem auto;
}

#chooser-buttons {
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  gap: 8px;
}

button {
  background-color: var(--red);
  color: white;
  border: none;
  padding: 16px;
  border-radius: 8px;
}

.popup {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 400px;
  width: 80vw;
  background: white;
}

#punktespiel-popup-inner {
  text-align: center;
  position: relative;
  background: white;
  border-radius: 8px;
  padding: 16px;
}

#punktespiel-popup-inner-bg-wrapper {
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: -8px;
  right: -8px;
  z-index: -1;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#punktespiel-popup-inner-bg {
  width: 1000px;
  height: 1000px;
  background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
  animation: rotate cubic-bezier(0.79, 0.14, 0.15, 0.86) 4s infinite;
  flex-shrink: 0;
}

.shake {
  animation: shake 1s ease-in-out both infinite;
}

#punktespiel-popup-init button {
  animation-delay: 3s;
}

#punktespiel-popup-next {
  display: none;
}

#elfchen {
  font-family: serif;
}

#fausthiebespiel-popup,
#fausthiebespiel-popup-again {
  border: 1px solid black;
  border-radius: 8px;
  padding: 16px;
}

#fausthiebespiel-popup-actions,
#fausthiebespiel-popup-again-actions {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

#rule-counter {
  display: none;
  background: linear-gradient(90deg, red, yellow, lime, aqua, blue, magenta, red);
  background-clip: text;
  color: transparent;
  filter: brightness(75%);
}
