.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  /* opacity: 0; */
  /* animation: fadeIn 0.6s ease-out forwards; */
  opacity: 1;
}

/* .popup-overlay.fade-out {
  animation: fadeOut 0.6s ease-out forwards;
} */

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.popup-container {
  position: relative;
  border-radius: 30px;
  overflow: visible;
  animation: scaleIn 0.6s ease-out forwards;
  max-height: calc(100dvh - 40px);
  background: #000;
  max-width: 60%;
  box-shadow:
    0 0 60px -10px rgba(214, 242, 54, 0.2),
    0 0 100px 10px rgba(214, 242, 54, 0.2);
  animation:
    scaleIn 0.6s ease-out forwards,
    glowPulseAll 3s ease-in-out infinite;
}

.popup-overlay.fade-out .popup-container {
  animation:
    scaleOut 0.8s ease-out forwards,
    glowPulseAll 3s ease-in-out infinite;
    
}

@keyframes scaleIn {
  from {
    transform: scale(1.4);
  }
  to {
    transform: scale(1);
  }
}

@keyframes scaleOut {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(0.5);
  }
}

@keyframes glowPulseAll {
  0%,
  100% {
    box-shadow:
      0 0 60px -10px rgba(214, 242, 54, 0.2),
      0 0 100px 10px rgba(214, 242, 54, 0.2);
  }
  50% {
    box-shadow:
      0 0 70px 5px rgba(214, 242, 54, 0.3),
      0 0 110px 15px rgba(214, 242, 54, 0.4);
  }
}

.popup-content {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 83px 62px 0;
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 20px;
  background: none;
  border: none;
  color: #888;
  font-size: 32px;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s;
}

.close-btn:hover {
  color: #fff;
}

.popup-text-content {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  /* min-width: 420px;
  max-width: 480px; */
  padding-right: 20px;
  height: auto;
  display: flex;
  flex-direction: column;
}

.popup-text-content .bonus-title {
  color: #fff;
  font-size: 60px;
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 8px;
  white-space: nowrap;
}

.bonus-title span {
  color: #d6f236;
  white-space: nowrap;
}
.bonus-percentage span {
  color: #fff;
}
.bonus-percentage {
  color: #d6f236;
  font-size: 33px;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 30px;
  white-space: nowrap;
  margin-top: 15px;
}

.bonus-description {
  color: #fff;
  font-size: 20px;
  margin-bottom: 40px;
  line-height: 1.5;
}
.claim-btn {
  color: #1e1e1e;
  border-radius: 18.171px;
  border: 1.514px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(90deg, #d6f236 0%, #7c8c1f 100%);
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
  padding: 12.114px 36.343px;
  cursor: pointer;
  transition: all 0.5s ease-in-out;
  /* inset border */
  box-shadow: inset 0 0 0 1.514px rgba(255, 255, 255, 0.3);
  width: fit-content;
  margin-top: 15px;
  /* animation */
  animation: tiltFloat 3.5s ease-in-out infinite;
  transform-origin: center;
}

.claim-btn:hover {
  animation-play-state: paused;
  background: #d6f236;
  transform: translateY(-1px);
  box-shadow: 0px 0px 12px rgba(214, 242, 54, 0.6);
}

@keyframes tiltFloat {
  0% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(2px) rotate(1.2deg);
  }
  50% {
    transform: translateX(0) rotate(0deg);
  }
  75% {
    transform: translateX(-2px) rotate(-1.2deg);
  }
  100% {
    transform: translateX(0) rotate(0deg);
  }
}

.image-content {
  position: absolute;
  right: 0;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  bottom: 0;
}

.coin-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.coin-container img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
    border-bottom-right-radius: 30px;
}

/* Image slide up animation */
@keyframes slideUpIn {
  from {
    transform: translateY(60px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.image-content {
  animation: slideUpIn 0.8s ease-out 0.4s both;
}

.popup-content .mw-25 {
  animation: slideUpIn 0.8s ease-out 0.4s both;
}

/* Large screens and above - max 900px container */
@media (min-width: 1200px) {
  /* .popup-text-content {
    min-width: 420px;
    max-width: 480px;
  }
   */
  .popup-text-content .bonus-title {
    font-size: 60px;
  }

  .bonus-percentage {
    font-size: 33px;
  }

  .image-content {
    width: 100%;
  }

  .coin-container img {
    max-width: 600px;
    width: auto;
    /* max-width: 100%; */
  }
}

/* Medium screens */
@media (max-width: 1199px) {
  .popup-content {
    padding: 81px 60px;
  }

  /* .popup-text-content {
    min-width: 380px;
    max-width: 450px;
  } */

  .popup-text-content .bonus-title {
    font-size: 56px;
  }

  .bonus-percentage {
    font-size: 36px;
  }

  .image-content {
    width: 100%;
  }

  .coin-container img {
    max-width: 300px;
  }
}

/* Tablet */
@media (max-width: 991px) {
  .popup-content {
    padding: 0 25px 25px;
  }

  .popup-text-content {
    /* min-width: 340px;
    max-width: 400px; */
    padding-right: 0;
    align-items: center;
  }

  .popup-text-content .bonus-title {
    font-size: 38px;
    white-space: pre-wrap;
  }

  .bonus-percentage {
    font-size: 25px;
    margin-bottom: 25px;
    text-align: center;
    
  }

  .bonus-description {
    font-size: 18px;
  }

  .claim-btn {
    padding: 12px 40px;
    font-size: 16px;
  }

  .image-content {
    width: 100%;
    padding-right: 25px;
  }

  .coin-container img {
    max-width: 50%;
  }

  .popup-content {
    flex-direction: column;
    align-items: center;
  }

  .popup-content .mw-25 {
    width: 70%;
    margin-top: -70px;
    mask-image: linear-gradient(#000, #000 88%, transparent);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .popup-container {
    width: 50%;
    min-height: auto;
  }

  .popup-content {
    flex-direction: column;
    padding: 0 20px 20px;
    min-height: auto;
  }

  .popup-text-content {
    position: relative;
    z-index: 2;
    padding-right: 0;
    text-align: center;
    margin-bottom: 0;
    min-width: auto;
    max-width: 100%;
  }

  .popup-text-content .bonus-title {
    font-size: 35px !important;
    white-space: normal !important;
    line-height: 1.1;
  }

  .bonus-percentage {
    font-size: 25px;
    margin-bottom: 20px;
    white-space: normal !important;
    text-align: center;
  }

  .bonus-description {
    font-size: 16px;
  }

  .image-content {
    position: relative;
    transform: none;
    width: 100%;
    height: auto;
    padding-right: 0;
    margin-top: 30px;
  }

  .coin-container {
    max-width: 100%;
  }

  .coin-container img {
    max-width: 100%;
    width: auto;
    height: auto;
  }

  .close-btn {
    font-size: 28px;
    top: 8px;
    right: 15px;
  }
}
/* landscape */
@media (max-width: 991px) and (orientation: landscape) {
  .bonus-percentage {
    font-size: 20px;
    text-align: center;
  }
  .popup-text-content .bonus-title {
    font-size: 28px !important;
  }

  .claim-btn {
    margin-top: 0;
  }

  .popup-content .mw-25 {
    width: 40%;
  }
}

@media (min-width: 850px) and (max-width: 920px) and (orientation: landscape) {

  .popup-content .mw-25 {
    width: 30%;
    margin-top: -32px;
  }
}
@media (max-width: 767px) and (orientation: landscape) {
  .bonus-percentage {
    font-size: 20px;
    text-align: center;
  }
  .popup-text-content .bonus-title {
    font-size: 28px !important;
  }

  .claim-btn {
    margin-top: 0;
  }

  .popup-content .mw-25 {
    width: 52%;
  }
}

/* Small mobile */
@media (max-width: 540px) {
  .popup-text-content .bonus-title {
    font-size: 35px !important;
    margin-bottom: 24px;
  }

  .bonus-percentage {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 24px;
    text-align: center;
  }

  .claim-btn {
    padding: 12px 35px;
    font-size: 15px;
    margin-top: 0;
  }
  .popup-content .mw-25 {
    width: 80%;
    margin-top: -70px;
    margin-left: -42px;
  }

  .popup-container {
    width: 90%;
    max-width: 90%;
  }
}

@media (min-width: 1280px) {
  .popup-container {
    min-height: 480px;
    max-width: 940px;
    width: 90%;
  }

  .popup-content {
    min-height: 480px;
  }

  .coin-container {
    max-width: 450px;
  }

  .coin-container img {
    max-width: 600px;
    width: auto;
    /* max-width: 100%; */
  }
}
