:root {
  --primary-color: darkred;
  --secondary-color: #6c757d;
  --dark-color: #343a40;
  --light-color: #f8f9fa;
}

body {
  margin: 0;
}

header {
  display: flex;
  flex-flow: column;
  align-items: center;
  background-color: var(--primary-color);
  color: var(--light-color);
}

main {
  display: flex;
  flex-flow: column;
  align-items: center;
  margin: 6rem auto;
  width: min(100%, 800px);
}

footer {
  display: flex;
  flex-flow: column;
  text-align: center;
  a {
    color: var(--dark-color);
  }
}

@keyframes shake {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(10deg);
  }
  50% {
    transform: rotate(-10deg);
  }
  75% {
    transform: rotate(5deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.mikuji {
  user-select: none;
  cursor: pointer;
  animation: shake 1s infinite;
  .stick {
    transition: none;
    transform: translate(90px, 200px);
  }
}

.mikuji.completed {
  animation: none;
  .stick {
    transition: all 0.5s;
    transform: translate(90px, 10px);
  }
}

.popup {
  color: var(--light-color);
  position: fixed;
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100dvh;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  background-color: rgba(52, 58, 64, 0.9);
}

.popup.active {
  pointer-events: all;
  opacity: 1;
  transition: all 0;
  transition-delay: 1s;
}

button {
  background-color: darkred;
  color: var(--light-color);
  border: none;
  padding: 0.5rem 1rem;
  margin: 1rem;
  cursor: pointer;
  border-radius: 0.2rem;
  opacity: 1;
}
