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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  display: flex;
  justify-content: center;
  background-color: #000;
}

.page-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 100%;
  background-image: url("../images/bg.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000cc;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding-bottom: 90px;
}

.modal-overlay.hidden {
  display: none;
}

/* Modal Content */
.modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, calc((100dvh - 90px) * 0.62));
  max-width: 500px;
  animation: modalPopup 0.4s ease-out forwards;
}

/* Modal Header (Logo + Close) */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  position: relative;
  margin-bottom: 8px;
}

.modal-logo {
  height: 30px;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
  opacity: 0.7;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

.modal-close:active {
  opacity: 1;
}

.modal-title {
  width: 90%;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.modal-title img {
  width: 100%;
  height: auto;
}

.modal-content {
  position: relative;
  width: 100%;
  margin-top: -111px;
  z-index: 0;
}

.modal-content img {
  width: 100%;
  height: auto;
  display: block;
}

.modal-btn {
  width: 100%;
  display: flex;
  position: static;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease;
  animation: shake 1.5s ease-in-out infinite;
}

.modal-btn:hover {
  animation:
    shake 1.5s ease-in-out infinite,
    scaleUp 0.2s ease forwards;
}

.modal-btn:active {
  animation: none;
  transform: scale(0.95);
  opacity: 0.9;
}

@keyframes scaleUp {
  to {
    transform: scale(1.05);
  }
}

.modal-btn img {
  width: 50%;
  height: auto;
}

.modal-btn__text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 21px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffb400 23%, #ff5400 50%, #ff0400 123%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

@keyframes modalPopup {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  70% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes shake {
  0%,
  30%,
  100% {
    transform: translateY(0);
  }
  10% {
    transform: translateY(-6px);
  }
  20% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-3px);
  }
}

/* Loading State */
.modal-btn.loading {
  pointer-events: none;
  animation: none;
}

.modal-btn.loading .modal-btn__text {
  visibility: hidden;
}

.modal-btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  margin-left: -12px;
  border: 3px solid #ffb400;
  border-top-color: #ff0400;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Bottom Download Banner */
.bottom-banner {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 500px;
  z-index: 1002;
  cursor: pointer;
}

.bottom-banner img {
  width: 100%;
  height: auto;
  display: block;
}
