/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Helvetica Neue", system-ui, sans-serif;
  color: #e9ecf5;
  background: #0a0a18;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

:root {
  --bg-0: #0a0a18;
  --bg-1: #14102b;
  --brand-a: #7c5cff;
  --brand-b: #4ea1ff;
  --text: #e9ecf5;
  --text-dim: #9aa0b8;
  --text-mute: #6b7088;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover: rgba(255, 255, 255, 0.07);
  --focus: #a6c8ff;
}

/* ---------- Ambient background ---------- */
body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0.55;
}
body::before {
  top: -200px;
  left: -150px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.55), transparent 60%);
}
body::after {
  bottom: -250px;
  right: -150px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(78, 161, 255, 0.45), transparent 60%);
}

/* ---------- Layout shell ---------- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: rgba(10, 10, 24, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.5px;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  display: block;
}
.nav-actions { display: flex; align-items: center; gap: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  background-size: 200% 200%;
  background-position: 0% 50%;
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover {
  background-position: 100% 50%;
  box-shadow: 0 14px 40px rgba(124, 92, 255, 0.55);
  transform: translateY(-1px);
}
.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-lg { height: 54px; padding: 0 30px; font-size: 16px; }
.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* ---------- Hero (index) ---------- */
.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px 24px 16px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.hero-visual {
  position: relative;
  width: min(420px, 78%);
  aspect-ratio: 16 / 9;
  margin: 0 0 16px;
  animation: fadeUp 0.8s ease both;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  /* Soft radial mask blends edges into the dark page background */
  -webkit-mask-image: radial-gradient(ellipse at center, #000 55%, transparent 95%);
          mask-image: radial-gradient(ellipse at center, #000 55%, transparent 95%);
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: #c9b8ff;
  font-size: 13px;
  letter-spacing: 0.3px;
  margin-bottom: 18px;
  animation: fadeUp 0.7s ease both;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #7c5cff;
  box-shadow: 0 0 8px #7c5cff;
}
.hero h1 {
  font-size: clamp(36px, 5.2vw, 56px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -1px;
  margin: 0 0 14px;
  animation: fadeUp 0.7s ease 0.1s both;
}
.hero h1 .grad {
  background: linear-gradient(135deg, #ffffff 10%, var(--brand-b) 50%, var(--brand-a) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero .sub {
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 auto 26px;
  animation: fadeUp 0.7s ease 0.2s both;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
  animation: fadeUp 0.7s ease 0.3s both;
}

/* ---------- Feature cards ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 960px;
  animation: fadeUp 0.7s ease 0.4s both;
}
.feature {
  position: relative;
  padding: 22px 22px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: left;
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.feature:hover {
  background: var(--card-hover);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.25), rgba(78, 161, 255, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  color: #c9b8ff;
  margin-bottom: 14px;
}
.feature h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #f4f5fb;
}
.feature p {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.55;
}

/* ---------- Footer ---------- */
.footer {
  padding: 20px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-mute);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(10, 10, 24, 0.4);
  backdrop-filter: blur(10px);
}
.footer a:hover { color: var(--text-dim); }
.footer .sep { margin: 0 10px; opacity: 0.5; }

/* ---------- Download page ---------- */
.download-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
}
.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 20px 50px rgba(124, 92, 255, 0.4);
  margin-bottom: 28px;
  animation: fadeUp 0.6s ease both;
}
.dl-title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
  animation: fadeUp 0.6s ease 0.05s both;
}
.dl-sub {
  color: var(--text-dim);
  font-size: 16px;
  margin: 0 0 40px;
  animation: fadeUp 0.6s ease 0.1s both;
}
.dl-card {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: fadeUp 0.6s ease 0.15s both;
}
.qr-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.qr-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.qr-label {
  position: absolute;
  bottom: -26px;
  left: 0; right: 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 1px;
}
.dl-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}
.dl-actions .meta {
  font-size: 13px;
  color: var(--text-mute);
}
.dl-actions .plat {
  font-size: 18px;
  font-weight: 600;
  color: #f4f5fb;
}
.coming {
  margin-top: 48px;
  font-size: 13px;
  color: var(--text-mute);
  letter-spacing: 0.5px;
  animation: fadeUp 0.6s ease 0.25s both;
}
.coming .tag {
  display: inline-block;
  padding: 3px 10px;
  margin: 0 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- Mobile (≤ 768px) ---------- */
@media (max-width: 768px) {
  .header { padding: 14px 18px; }
  .brand { font-size: 15px; }
  .brand-mark { width: 26px; height: 26px; font-size: 14px; }
  .nav-actions .btn { height: 38px; padding: 0 16px; font-size: 14px; }

  .hero { padding: 24px 20px 20px; }
  .hero-visual { width: 86%; margin-bottom: 12px; }
  .hero-visual img { border-radius: 16px; }
  .hero-eyebrow { margin-bottom: 16px; font-size: 12px; }
  .hero h1 { font-size: 34px; letter-spacing: -0.5px; margin-bottom: 14px; }
  .hero .sub { font-size: 15px; margin-bottom: 28px; }
  .hero-actions { width: 100%; flex-direction: column; gap: 10px; margin-bottom: 36px; }
  .hero-actions .btn { width: 100%; }

  .features { grid-template-columns: 1fr; gap: 12px; }
  .feature { padding: 22px 20px; }

  .download-main { padding: 32px 20px; }
  .app-icon { width: 80px; height: 80px; font-size: 34px; border-radius: 20px; }
  .dl-title { font-size: 26px; }
  .dl-sub { font-size: 14px; margin-bottom: 28px; }

  .dl-card {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 22px;
  }
  .qr-wrap { display: none; }
  .dl-actions { align-items: stretch; text-align: center; }
  .dl-actions .btn { width: 100%; }

  .coming { margin-top: 36px; font-size: 12px; }

  .footer { padding: 20px 18px; font-size: 12px; }
  .footer .sep { margin: 0 6px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
