/* 落地页：背景、顶栏、内容区、按钮组 */


/* 内容在背景之上 */
.landing-container {
  position: relative;
  z-index: 1;
}

/* ---------- 底部背景 ---------- */
.landing-bg {
  width: 100%;
  height: 100%;
  /* background-color: #e07b0a; */
}

.landing-bg .bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 顶部悬浮栏 ---------- */
.landing-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 8px 16px;
  flex-shrink: 0;
}

.landing-topbar-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.landing-topbar-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.landing-topbar-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.landing-topbar-desc {
  margin: 0;
  font-size: 12px;
  opacity: 0.95;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 底部按钮组 ---------- */
.landing-actions {
  position: absolute;
  z-index: 11;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* 首行：注册按钮 */
.landing-btn-register {
  width: 9rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  background: transparent;
  padding: 0;
}

.landing-btn-register img {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
  transform-origin: center;
  animation: landing-register-breathe 2.4s ease-in-out infinite;
}

.landing-btn-register:hover,
.landing-btn-register:active {
  transform: translateY(1px);
  opacity: 0.9;
}

@keyframes landing-register-breathe {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.16));
    opacity: 1;
  }
  50% {
    transform: scale(1.035);
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.24));
    opacity: 0.96;
  }
}

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

/* 二行：下载 / 直接玩 */
.landing-btn-row {
  width: 100%;

  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.landing-btn-download {
  width: 8rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
  background: transparent;
  padding: 0;
}

.landing-btn-download img {
  width: 100%;
  max-width: 120px;
  height: auto;
  display: block;
}

.landing-btn-download:hover,
.landing-btn-download:active {
  opacity: 0.9;
  transform: scale(0.98);
}

/* ---------- 注册弹窗 ---------- */
.landing-register {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.landing-register.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.landing-register__mask {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(86, 84, 221, 0.6), rgba(7, 10, 37, 0.9));
  backdrop-filter: blur(8px);
}

.landing-register__panel {
  position: relative;
  z-index: 1;
  width: min(360px, 90vw);
  max-height: min(640px, 90vh);
  padding: 24px 20px 20px;
  border-radius: 26px;
  background: linear-gradient(165deg, #4c2af6 0%, #8e3de9 35%, #2632ff 100%);
  box-shadow:
    0 22px 40px rgba(5, 5, 40, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(24px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.24s ease-out;
}

.landing-register.is-open .landing-register__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.landing-register__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(0, 0, 0, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.landing-register__close:hover {
  background: rgba(0, 0, 0, 0.26);
  transform: scale(1.02);
}

.landing-register__close-icon {
  position: relative;
  width: 12px;
  height: 12px;
}

.landing-register__close-icon::before,
.landing-register__close-icon::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: #ff6b6b;
  transform-origin: center;
}

.landing-register__close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.landing-register__close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.landing-register__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  margin-top: 8px;
  margin-bottom: 2rem;
}

.landing-register__logo {
  width: 72px;
  height: auto;
}

.landing-register__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.landing-register__body {
  margin-top: 4px;
}

.landing-register__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.landing-register__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.landing-register__field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  opacity: 0.95;
}

.landing-register__field-label-icon {
  width: 12px;
  height: auto;
  display: inline-block;
}

.landing-register__field-label-icon--name::before,
.landing-register__field-label-icon--password::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin: 4px auto;
  background: rgba(255, 255, 255, 0.85);
}

.landing-register__field-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(10, 7, 40, 0.2);
  padding: 0 12px;
}

.landing-register__input {
  flex: 1;
  height: 40px;
  border: none;
  outline: none;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
}

.landing-register__input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.landing-register__eye {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.16);
  margin-left: 8px;
  cursor: pointer;
  position: relative;
}

.landing-register__eye::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url("../images/icon-see.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 70% 70%;
  opacity: 0.82;
  display: block;
}

.landing-register__agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.5;
}

.landing-register__agree-checkbox {
  margin-top: 2px;
  width: 14px;
  height: 14px;
}

.landing-register__agree-text {
  opacity: 0.9;
}

.landing-register__link {
  color: #ffd76b;
  text-decoration: underline;
}

.landing-register__submit {
  margin-top: 3rem;
  width: 100%;
  height: 46px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: linear-gradient(90deg, #ffb347 0%, #ff7742 50%, #ff2f5b 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
  position: relative;
}

.landing-register__submit-text {
  letter-spacing: 0.12em;
}

.landing-register__footer {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
}

.landing-register__footer-link {
  color: #ffd76b;
  font-weight: 500;
}

/* 小屏与安全区 */
@media (max-width: 380px) {
  .landing-topbar {
    min-height: 56px;
    padding: 6px 12px;
  }

  .landing-topbar-icon {
    width: 42px;
    height: 42px;
  }

  .landing-topbar-title {
    font-size: 14px;
  }

  .landing-topbar-desc {
    font-size: 11px;
  }
}

/* 安全区域（刘海、底部横条） */
@supports (padding: env(safe-area-inset-bottom)) {
  .landing-actions {
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }
}

@supports (padding: env(safe-area-inset-top)) {
  .landing-topbar {
    padding-top: calc(8px + env(safe-area-inset-top));
  }
}
