:root {
  --bg: #0a0a12;
  --bg-card: #12121f;
  --bg-elevated: #1a1a2e;
  --text: #e8e8f0;
  --text-muted: #9898b0;
  --accent: #7c5cff;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 92, 255, 0.35);
  --border: rgba(255, 255, 255, 0.08);
  --gradient: linear-gradient(135deg, #7c5cff 0%, #e040fb 50%, #ff6b9d 100%);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(124, 92, 255, 0.18), transparent 42%),
    radial-gradient(circle at 80% 20%, rgba(224, 64, 251, 0.12), transparent 38%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 40px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: rgba(18, 18, 31, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px 28px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.app-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px var(--accent-glow);
  object-fit: cover;
  background: var(--bg-elevated);
}

.app-name {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-meta {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.platform-hint {
  color: var(--accent-light);
  font-size: 0.92rem;
  margin: 8px 0 24px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 240px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 10px 28px var(--accent-glow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-download:active {
  transform: scale(0.98);
}

.btn-download.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}

.qrcode-box {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.qrcode-box .qcode {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
}

.qrcode-box .qcode img,
.qrcode-box .qcode canvas {
  display: block;
}

.qrcode-box .code-text {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.tips {
  margin-top: 22px;
  text-align: left;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.tips p {
  display: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.tips p.is-visible {
  display: block;
}

.tips strong {
  color: var(--text);
}

.footer-copy {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* 微信 / QQ 引导层 */
.weixin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.weixin-overlay.is-show {
  display: block;
}

.weixin-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
}

.weixin-tip {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  color: #fff;
  text-align: right;
}

.weixin-tip-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.weixin-tip p {
  font-size: 0.92rem;
  line-height: 1.8;
  margin-bottom: 10px;
}

.weixin-tip img {
  height: 28px;
  vertical-align: middle;
  margin: 0 4px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  margin-right: 6px;
}

@media (max-width: 640px) {
  .page {
    padding: 20px 16px 32px;
    justify-content: flex-start;
    padding-top: 48px;
  }

  .card {
    padding: 28px 20px 22px;
  }

  .qrcode-box {
    display: none;
  }

  .btn-download {
    width: 100%;
    min-width: 0;
  }
}
