:root {
  --bg-1: #07162d;
  --bg-2: #0b234a;
  --gold-1: #ffe18c;
  --gold-2: #d8a93f;
  --gold-3: #8a6020;
  --blue-1: #19396e;
  --blue-2: #102749;
  --blue-3: #274a88;
  --text-main: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.78);
  --shadow-strong: 0 24px 60px rgba(0, 0, 0, 0.42);
  --shadow-gold: 0 0 30px rgba(255, 217, 111, 0.3);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(180deg, rgba(4, 17, 34, 0.28), rgba(4, 17, 34, 0.5)),
    url("./images/背景.jpg") center top / cover no-repeat fixed,
    linear-gradient(180deg, #041122 0%, var(--bg-1) 30%, var(--bg-2) 100%);
  color: var(--text-main);
}

body {
  display: flex;
  justify-content: center;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto -20vw;
  height: 40vh;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 206, 102, 0.16), transparent 55%);
  filter: blur(18px);
}

body::before {
  top: -12vh;
}

body::after {
  bottom: -14vh;
}

.page-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  padding: 14px 14px 22px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 36px);
  padding: 16px 18px 22px;
  background: transparent;
}

.lang-switch {
  position: fixed;
  top: 18px;
  right: 18px;
  left: auto;
  z-index: 45;
  border: 1px solid rgba(255, 220, 135, 0.46);
  background:
    linear-gradient(180deg, rgba(255, 245, 195, 0.12), rgba(255, 245, 195, 0.02) 20%),
    rgba(10, 25, 51, 0.58);
  color: #fff0c4;
  min-width: 56px;
  height: 36px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(5px);
  cursor: pointer;
}

.lang-switch-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100%;
}

.lang-switch:hover,
.lang-switch:active {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.brand-block {
  position: relative;
  text-align: center;
  padding-top: 0;
}

.brand-logo {
  display: block;
  width: min(95%, 388px);
  margin: 0 auto -4px;
  filter: drop-shadow(0 12px 30px rgba(255, 203, 88, 0.24));
}

.brand-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand-subtitle {
  margin: -8px 0 4px;
  font-size: clamp(2.1rem, 8.5vw, 3.1rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.brand-tagline {
  margin: 0;
  font-size: 1rem;
  color: var(--text-soft);
  letter-spacing: 0.1em;
}

.cta-group {
  margin-top: 26px;
  display: grid;
  gap: 16px;
  padding-inline: 2px;
}

.cta-button {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 999px;
  text-decoration: none;
  color: #f8edc7;
  background:
    linear-gradient(180deg, rgba(255, 245, 195, 0.18), rgba(255, 245, 195, 0.02) 18%),
    linear-gradient(180deg, #183d78 0%, #0f2449 100%);
  border: 2px solid rgba(251, 215, 111, 0.75);
  box-shadow:
    0 0 0 3px rgba(255, 225, 140, 0.12),
    inset 0 0 0 2px rgba(255, 255, 255, 0.05),
    0 10px 22px rgba(0, 0, 0, 0.24),
    var(--shadow-gold);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.cta-button:active,
.cta-button:hover {
  transform: translateY(-1px) scale(1.01);
  filter: brightness(1.04);
}

.cta-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 241, 189, 0.3), rgba(255, 215, 111, 0.08));
  font-size: 1.9rem;
  flex: 0 0 auto;
}

.cta-icon-image {
  width: 34px;
  height: 34px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(255, 210, 94, 0.3));
}

.cta-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cta-copy strong {
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.cta-copy small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
}

.invite-panel {
  margin-top: 24px;
  padding: 10px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(176, 132, 45, 0.92), rgba(116, 82, 23, 0.96));
  border: 1px solid rgba(255, 228, 164, 0.38);
  box-shadow:
    inset 0 0 0 2px rgba(255, 236, 179, 0.18),
    0 14px 32px rgba(0, 0, 0, 0.24);
  scroll-margin-top: 104px;
}

.invite-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 6px 8px 0;
}

.panel-label {
  margin: 0 0 4px;
  color: rgba(255, 247, 224, 0.8);
  font-weight: 700;
  font-size: 0.82rem;
}

.invite-header h3 {
  margin: 0;
  font-size: 1.42rem;
  color: #fffdf6;
}

.reward-chip {
  min-width: 104px;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255, 245, 216, 0.14);
  text-align: right;
}

.reward-chip span {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 250, 240, 0.8);
}

.reward-chip strong {
  display: block;
  margin-top: 2px;
  color: #fff7cf;
  font-size: 0.95rem;
}

.invite-box {
  display: grid;
  grid-template-columns: 1fr auto;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(90deg, #eef1f8 0%, #f7f8fc 58%, #edc45b 58%, #f6d875 100%);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.invite-box.copy-emphasis {
  box-shadow:
    0 0 0 3px rgba(255, 245, 205, 0.48),
    0 0 0 6px rgba(255, 225, 140, 0.18),
    0 18px 34px rgba(0, 0, 0, 0.18);
  transform: scale(1.03);
}

.invite-value-wrap {
  padding: 15px 18px;
  color: #1d2742;
}

.invite-label {
  display: block;
  font-size: 0.92rem;
  opacity: 0.8;
}

#inviteCode {
  display: block;
  margin-top: 4px;
  font-size: 1.9rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.copy-button {
  min-width: 122px;
  border: 0;
  padding: 0 16px;
  background: transparent;
  color: #2d2410;
  font-size: 1.12rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.copy-button:disabled {
  cursor: default;
  opacity: 0.88;
}

.copy-button.copy-emphasis {
  background: linear-gradient(180deg, rgba(255, 248, 223, 0.5), rgba(246, 216, 117, 0.38));
  box-shadow: inset 0 0 0 2px rgba(255, 248, 223, 0.34);
  transform: scale(1.04);
}

.helper-text {
  margin: 10px 6px 2px;
  color: rgba(255, 249, 235, 0.94);
  line-height: 1.55;
  font-size: 0.88rem;
}

.download-warning {
  min-height: 1.3em;
  margin: 8px 6px 2px;
  color: #fff0bd;
  font-size: 0.84rem;
  line-height: 1.5;
}


.ios-guide-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 50;
}

.ios-guide-modal.is-open {
  display: flex;
}

.ios-guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 22, 0.72);
  backdrop-filter: blur(8px);
}

.ios-guide-dialog {
  position: relative;
  width: min(100%, 420px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 20px 16px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(13, 29, 54, 0.98), rgba(9, 20, 38, 0.98));
  border: 1px solid rgba(255, 225, 140, 0.25);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.ios-guide-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.45rem;
  cursor: pointer;
}

.ios-guide-head {
  padding: 6px 6px 0;
}

.ios-guide-kicker {
  margin: 0 0 6px;
  color: #ffe39a;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ios-guide-title {
  margin: 0;
  font-size: 1.35rem;
  color: #fff;
}

.ios-guide-text {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  font-size: 0.92rem;
}

.ios-guide-video {
  margin-top: 14px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 225, 140, 0.22);
  background: rgba(0, 0, 0, 0.18);
}

.ios-guide-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.guide-primary,
.guide-secondary {
  min-height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.guide-primary {
  border: 1px solid rgba(251, 215, 111, 0.75);
  color: #2d2410;
  background: linear-gradient(180deg, #f6d875 0%, #edc45b 100%);
}

.guide-secondary {
  border: 1px solid rgba(255, 225, 140, 0.28);
  color: #fff4cf;
  background: rgba(255, 255, 255, 0.06);
}

.support-fab {
  position: fixed;
  right: 18px;
  left: auto;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.5px solid rgba(251, 215, 111, 0.72);
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 245, 195, 0.16), rgba(255, 245, 195, 0.02) 20%),
    linear-gradient(180deg, rgba(24, 61, 120, 0.98), rgba(15, 36, 73, 0.98));
  color: #ffe39a;
  box-shadow:
    0 0 0 3px rgba(255, 225, 140, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 14px 28px rgba(0, 0, 0, 0.28),
    var(--shadow-gold);
  cursor: pointer;
  backdrop-filter: blur(5px);
}

.support-fab:active,
.support-fab:hover {
  transform: translateY(-1px) scale(1.03);
  filter: brightness(1.04);
}

.support-fab-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 232, 171, 0.24), rgba(255, 232, 171, 0.02));
  overflow: hidden;
}

.support-fab-image {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(87%) sepia(31%) saturate(668%) hue-rotate(336deg) brightness(103%) contrast(101%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.support-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 60;
}

.support-modal.is-open {
  display: flex;
}

.support-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 22, 0.78);
  backdrop-filter: blur(8px);
}

.support-dialog {
  position: relative;
  width: min(100%, 420px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 20px 16px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(13, 29, 54, 0.98), rgba(9, 20, 38, 0.98));
  border: 1px solid rgba(255, 225, 140, 0.22);
  color: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.support-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.45rem;
  cursor: pointer;
}

.support-head {
  padding: 6px 6px 0;
  text-align: center;
}

.support-kicker {
  margin: 0 0 6px;
  color: #ffe39a;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.support-title {
  margin: 0;
  font-size: 1.48rem;
  color: #fff;
}

.support-text {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
  font-size: 0.92rem;
}

.support-qr-wrap {
  margin-top: 18px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 225, 140, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.support-qr-image {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  border-radius: 18px;
}

.support-actions {
  margin-top: 18px;
}

.support-actions .guide-secondary {
  width: 100%;
  border-color: rgba(255, 225, 140, 0.28);
  color: #fff4cf;
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 520px) {
  .lang-switch {
    top: 14px;
    right: 14px;
    left: auto;
  }

  .support-fab {
    right: 14px;
    left: auto;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: 50px;
    height: 50px;
  }

  .support-dialog {
    padding: 20px 14px 16px;
  }
}

@media (max-width: 380px) {
  .hero-card {
    padding-inline: 14px;
  }

  .brand-logo {
    width: min(96%, 320px);
  }

  .brand-subtitle {
    font-size: 1.78rem;
  }

  .lang-switch {
    min-width: 52px;
    height: 34px;
    font-size: 0.82rem;
  }

  .ios-guide-actions {
    grid-template-columns: 1fr;
  }

  .invite-box {
    grid-template-columns: 1fr;
  }

  .copy-button {
    min-height: 58px;
    border-top: 1px solid rgba(45, 36, 16, 0.12);
  }

  #inviteCode {
    font-size: 1.7rem;
  }
}
