* {
  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;
}

/* Header Banner */
.header-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background-color: #0c130c;
  z-index: 1001;
}

.header-banner__left {
  display: flex;
  align-items: center;
  gap: 5px;
}

.header-banner__logo {
  width: 27px;
  height: 27px;
  object-fit: contain;
}

.header-banner__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: "PingFang TC", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.1;
  color: #fff;
}

.header-banner__title {
  font-weight: 400;
}

.header-banner__subtitle {
  font-weight: 400;
}

.header-banner__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 31px;
  padding: 0 12px;
  border-radius: 15.5px;
  background: linear-gradient(152deg, #bfff04 21%, #f3ad0f 77%);
  font-family: "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

/* 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;
}

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

/* Modal Content */
.modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 500px;
  animation: modalPopup 0.4s ease-out forwards;
}

.modal-title {
  width: 90%;
  margin-bottom: 20px;
}

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

.modal-content {
  position: relative;
  width: 100%;
  margin-top: -48%;
}

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

.modal-btn {
  position: absolute;
  bottom: 10%;
  left: 50%;
  margin-left: -27.5%;
  width: 55%;
  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: 100%;
  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);
  }
}
