  * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container {
  width: 100%;
  height: 100vh;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.background {
  position: relative;
  top: 0;
  left: 0;
  width: 650px;
  height: 100vh;
}

.background img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.main-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.totalmoney {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.totalmoney h1 {
  font-size: 100px;
  font-weight: 600;
  color: #fff;
}

.frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 600px;
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.moneys {
  position: absolute;
  top: 50%;
  left: 22%;
  transform: translate(-50%, -50%);
  z-index: 10;
  height: 300px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.moneys img {
  width: 100%;
  max-width: 250px;
  height: 100%;
  object-fit: cover;
}

.plusmoney {
  position: absolute;
  top: 50%;
  left: 78%;
  transform: translate(-50%, -50%);
  height: 300px;
  overflow: hidden;
}

.plusmoney img {
  width: 100%;
  max-width: 400px;
  height: 100%;
  object-fit: cover;
}

.puls {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.puls img {
  width: 100%;
  max-width: 70px;
  height: 100%;
  object-fit: fill;
}

.StartBtn {
  position: absolute;
  top: 85%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.StartBtn button {
  width: 200px;
  padding: 10px 20px;
  background-color: #e13c1f;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  outline: none;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.764);
  transition: all 0.3s ease-in-out;
  animation: buttonPulse 2s ease-in-out infinite;
}

.StartBtn button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px 0 rgba(225, 60, 31, 0.8);
}

.StartBtn button:active {
  transform: scale(0.95);
}

.StartBtn button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  animation: none;
  transform: none;
}
/* Animation to move the money image from top to bottom and back to top */
.fall {
  animation: fallAndRepeat 0.1s linear infinite; /* Looping fall and return for 2 seconds */
}

@keyframes fallAndRepeat {
from {
  transform: translateY(-0vh);
}

50% {
  transform: translateY(40vh);
}
60% {
  transform: translateY(60vh);
}
70% {
  transform: translateY(70vh);
}
80% {
  transform: translateY(80vh);
}
90% {
  transform: translateY(90vh);
}
to {
  transform: translateY(0vh);
}

}

/* Button pulse animation */
@keyframes buttonPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.764);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 15px 0 rgba(225, 60, 31, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.764);
  }
}

/* Simple popup styles */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.popup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: popupBounce 0.5s ease-out;
}

@keyframes popupBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Frame effect animations */
@keyframes panelGlow {
  0% {
    box-shadow: 0 0 20px #ffd700, 0 0 40px #ffd700, 0 0 60px #ffd700;
    filter: brightness(1.2);
  }
  100% {
    box-shadow: 0 0 30px #ffd700, 0 0 60px #ffd700, 0 0 90px #ffd700;
    filter: brightness(1.5);
  }
}

@keyframes xGlow {
  0% {
    box-shadow: 0 0 20px #ffd700, 0 0 40px #ffd700, 0 0 60px #ffd700;
    filter: brightness(1.2);
  }
  100% {
    box-shadow: 0 0 30px #ffd700, 0 0 60px #ffd700, 0 0 90px #ffd700;
    filter: brightness(1.5);
  }
}

/* SweetAlert popup styles */
.swal-wide {
  width: 400px !important;
}

/* Keep blur but remove overlay color */
.swal-overlay {
  background-color: transparent !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
}

/* SweetAlert button container */
.swal-footer {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 20px !important;
}

/* SweetAlert button styles */
.swal-button--website {
  background-color: #007bff !important;
  border: none !important;
  border-radius: 8px;
  padding: 15px 20px !important;
  margin: 0 !important;
  width: 100% !important;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3) !important;
  transition: all 0.2s ease;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: white !important;
}

.swal-button--contact {
  background-color: #25d366 !important;
  border: none !important;
  border-radius: 8px;
  padding: 15px 20px !important;
  margin: 0 !important;
  width: 100% !important;
  box-shadow: 0 2px 4px rgba(37, 211, 102, 0.3) !important;
  transition: all 0.2s ease;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: white !important;
}

.swal-button--website:hover {
  background-color: #0056b3 !important;
  transform: scale(1.02);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4) !important;
}

.swal-button--contact:hover {
  background-color: #1da851 !important;
  transform: scale(1.02);
  box-shadow: 0 4px 8px rgba(37, 211, 102, 0.4) !important;
}

/* ====== MONEY COUNTING STAGE ====== */
.count-stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 60;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.count-stage:not(.hidden) {
  transform: translateY(-15vh);
  opacity: 1;
}

.count-wrapper {
  position: relative;
  transform: translateY(-6vh);
  display: grid;
  place-items: center;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45));
  perspective: 900px;
}

.count-stack {
  position: relative;
  width: clamp(300px, 45vw, 450px);
  height: clamp(150px, 22vw, 220px);
  transform: rotateX(8deg) rotateZ(-2deg);
  transform-origin: center bottom;
}

.note {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(calc(-50% + var(--xOffset, 0px)), 0);
  width: auto;
  height: auto;
  animation: noteFeed var(--dur, 400ms) cubic-bezier(0.5, 0, 0.9, 0.5) var(--delay, 0ms) forwards;
  transform-origin: center bottom;
  z-index: var(--noteZ, 1);
}

.note.fly-out {
  animation: noteFlyOut 0.6s cubic-bezier(0.5, 0, 0.9, 0.5) forwards;
}

.note img {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  display: block;
  backface-visibility: hidden;
}

@keyframes noteFeed {
  from {
    transform: translate(calc(-50% + var(--xOffset, 0px)), 0) translateY(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  to {
    transform: translate(calc(-50% + var(--xOffset, 0px)), var(--stackY, -28%));
    opacity: 1;
  }
}

@keyframes noteFlyOut {
  0% {
    transform: translate(calc(-50% + var(--xOffset, 0px)), var(--stackY, -28%)) scale(1);
    opacity: 1;
  }
  30% {
    transform: translate(calc(-50% + var(--xOffset, 0px)), var(--stackY, -28%)) scale(0.4);
    opacity: 1;
  }
  70% {
    transform: translate(calc(-50% + var(--xOffset, 0px)), -45vh) scale(0.2);
    opacity: 0.8;
  }
  100% {
    transform: translate(calc(-50% + var(--xOffset, 0px)), -50vh) scale(0.1);
    opacity: 0;
  }
}

/* Responsive styles for devices 768px and smaller */
@media (max-width: 768px) {
  .container {
    height: 100vh;
    overflow: hidden;
  }

  .background {
    width: 100%;
    height: 100vh;
  }

  .totalmoney {
    top: 8%;
  }

  .totalmoney h1 {
    font-size: clamp(40px, 8vw, 60px);
    text-align: center;
  }

  .frame {
    max-width: 90%;
    width: 90%;
  }

  .moneys {
    left: 23%;
    height: 300px;
    max-width: 250px;
  }

  .moneys img {
    max-width: 200px;
  }

  .plusmoney {
    left: 78%;
    height: 300px;
    max-width: 300px;
  }

  .plusmoney img {
    max-width: 300px;
  }

  .puls {
    max-width: 100px;
  }

  .puls img {
    max-width: 50px;
  }

  .StartBtn {
    top: 90%;
  }

  .StartBtn button {
    width: 200px;
    padding: 15px 20px;
    font-size: 20px;
  }

  /* Money counting animation responsive */
  .count-stage {
    width: 100%;
    height: 100%;
  }

  .count-wrapper {
    width: 100%;
    height: 100%;
  }

  .count-stack {
    width: 80%;
    max-width: 400px;
  }

  .note {
    width: auto;
    height: auto;
  }

  /* SweetAlert responsive */
  .swal-wide {
    width: 90% !important;
    max-width: 350px !important;
  }

  .swal-title {
    font-size: 24px !important;
  }

  .swal-text {
    font-size: 16px !important;
  }

  .swal-button--website,
  .swal-button--contact {
    padding: 12px 16px !important;
    font-size: 14px !important;
  }

  /* Popup responsive */
  .popup {
    width: 100%;
    height: 100%;
  }

  .popup img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

/* Responsive styles for devices 480px and smaller */
@media (max-width: 480px) {
  .totalmoney {
    top: 5%;
  } 
  .totalmoney h1 {
    font-size: 70px;
  }
  .frame {
    top: 50%;
    width: 100%;
    max-width: 400px;
  }
  .frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .moneys {
    left: 22%;
    height: 200px;
    max-width: 200px;
  }

  .moneys img {
    max-width: 140px;
  }

  .plusmoney {
    left: 77%;
    height: 200px;
    max-width: 250px;
  }

  .plusmoney img {
    max-width: 250px;
  }

  .puls img {
    max-width: 30px;
  }

  .StartBtn button {
    width: 200px;
    padding: 20px 12px;
    font-size: 14px;
  }

  .note {
    width: auto;
    height: auto;
  }

  .swal-wide {
    width: 95% !important;
    max-width: 300px !important;
  }

  .swal-title {
    font-size: 20px !important;
  }

  .swal-text {
    font-size: 14px !important;
  }

  .swal-button--website,
  .swal-button--contact {
    padding: 10px 14px !important;
    font-size: 13px !important;
  }

  /* Popup responsive for small devices */
  .popup {
    padding: 15px;
  }

  .popup img {
    max-width: 95vw;
    max-height: 80vh;
    width: auto;
    height: auto;
  }
}

/* Responsive styles for devices 390px and smaller */
@media (max-width: 390px) {
  .totalmoney {
    top: 7%;
  }
  .totalmoney h1 {
    font-size: 50px;
  }

  .moneys {
    left: 20%;
    height: 180px;
    max-width: 200px;
  }

  .moneys img {
    max-width: 120px;
  }

  .plusmoney {
    left: 80%;
    height: 180px;
    max-width: 250px;
  }

  .plusmoney img {
    max-width: 180px;
  }

  .puls img {
    max-width: 25px;
  }

  .StartBtn button {
    width: 150px;
    padding: 15px 10px;
    font-size: 12px;
  }

  .note {
    width: auto;
    height: auto;
  }

  .swal-wide {
    width: 98% !important;
    max-width: 280px !important;
  }

  .swal-title {
    font-size: 18px !important;
  }

  .swal-text {
    font-size: 13px !important;
  }

  .swal-button--website,
  .swal-button--contact {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  .popup img {
    max-width: 98vw;
    max-height: 75vh;
    width: auto;
    height: auto;
  }
}

/* Responsive styles for devices 360px and smaller */
@media (max-width: 360px) {
  .totalmoney h1 {
    font-size: 40px;
  }
  .frame {
    top: 50%;
    width: 100%;
    max-width: 350px;
  }
  .frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .moneys {
    left: 21%;
    height: 180px;
    max-width: 180px;
  }

  .moneys img {
    max-width: 150px;
  }

  .plusmoney {
    left: 80%;
    height: 180px;
    max-width: 200px;
  }

  .plusmoney img {
    max-width: 200px;
  }

  .puls img {
    max-width: 20px;
  }
  .StartBtn {
    top: 85%;
  }

  .StartBtn button {
    width: 150px;
    padding: 15px 20px;
    font-size: 15px;
  }

  .note {
    width: auto;
    height: auto;
  }

  .swal-wide {
    width: 99% !important;
    max-width: 260px !important;
  }

  .swal-title {
    font-size: 16px !important;
  }

  .swal-text {
    font-size: 12px !important;
  }

  .swal-button--website,
  .swal-button--contact {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }

  .popup img {
    max-width: 99vw;
    max-height: 70vh;
    width: auto;
    height: auto;
  }
}
