* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.container {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: black;
}
.background {
  position: relative;
  width: 600px;
  height: 100vh;
  overflow: hidden;
}
.background img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.main-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100vh;
}
.money {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 500px;
}
.frame {
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
}
.pig {
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.pig img {
  width: 15%;
  height: 100%;
  object-fit: cover;
}
.pig img:nth-child(2) {
  width: 18%;
  height: 100%;
  object-fit: cover;
}
.pig img:nth-child(3) {
  width: 22%;
  height: 100%;
  object-fit: cover;
}
.pig img:nth-child(4) {
  width: 18%;
  height: 100%;
  object-fit: cover;
}
.godenharmer {
  position: absolute;
  top: 58%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.godenharmer img {
  width: 100%;
  height: 100%;
  max-width: 120px;
  object-fit: cover;
  animation: float-lr 5s ease-in-out infinite;
}

/* left-right float animation for godenharmer image */
@keyframes float-lr {
  0% {
    transform: translateX(-250px);
  }
  50% {
    transform: translateX(250px);
  }
  100% {
    transform: translateX(-250px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .godenharmer img {
    animation: none;
  }
}

.popout-overlay {
  /* overlay is always present but hidden by default so we can animate opacity */
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms ease, visibility 280ms ease;
  display: flex;
}
.popout-overlay.active {
  opacity: 1;
  visibility: visible;
}
.popout-card {
  width: min(420px, 94vw);
  max-width: 94vw;
  background: transparent;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(-30px) scale(0.98);
  opacity: 0;
  transition: transform 360ms cubic-bezier(0.2, 0.9, 0.2, 1), opacity 360ms ease;
}
.popout-overlay.active .popout-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.popout-image {
  width: 100%;
  height: auto;
  display: block;
}
.popout-actions {
  margin-top: 8px;
}
.popout-btn {
  width: 340px;
  max-width: 92%;
  cursor: pointer;
  display: block;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.popout-image--win {
  max-width: 380px;
}
.popout-claim {
  width: 320px;
  max-width: 90%;
  cursor: pointer;
  display: block;
  margin-top: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  border-radius: 12px;
}

/* Adjusted (smaller) WIN popout */
#winPopout .popout-card {
  width: min(420px, 94vw);
  padding: 10px;
}
#winPopout .popout-image--win {
  max-width: 420px;
}
#winPopout .popout-claim {
  width: 360px;
  max-width: 94%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}
@media (max-width: 600px) {
  #winPopout .popout-image--win {
    max-width: 86vw;
  }
  #winPopout .popout-claim {
    width: 86%;
  }
}

@media (max-width: 420px) {
  .popout-btn {
    width: 92%;
    max-width: 92%;
  }
}
@media (max-width: 360px) {
  .frame {
    top: 79%;
  }
}
