:root {
  --primary: #6366f1;
  --primary-dark: #8b5cf6;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --primary-soft: color-mix(in srgb, var(--primary) 12%, white);
  --primary-softer: color-mix(in srgb, var(--primary) 6%, white);
  --primary-faint: color-mix(in srgb, var(--primary) 4%, white);
  --primary-border: color-mix(in srgb, var(--primary) 35%, white);
  --primary-shadow: color-mix(in srgb, var(--primary) 15%, transparent);
  --text: #0f172a;
  --text-muted: #64748b;
  --bg: #ffffff;
  --bg-section: color-mix(in srgb, var(--primary) 4%, #f8fafc);
  --bg-section-strong: color-mix(in srgb, var(--primary) 7%, #f8fafc);
  --bg-muted: var(--bg-section);
  --bg-card: #ffffff;
  --bg-footer: color-mix(in srgb, var(--primary) 10%, #0f172a);
  --header-bg: color-mix(in srgb, var(--primary) 4%, rgba(255, 255, 255, 0.92));
  --surface-overlay: color-mix(in srgb, var(--primary) 3%, rgba(255, 255, 255, 0.92));
  --border: color-mix(in srgb, var(--primary) 7%, #e2e8f0);
  --dot-inactive: color-mix(in srgb, var(--primary) 12%, #cbd5e1);
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px color-mix(in srgb, var(--primary) 10%, rgba(15, 23, 42, 0.08));
  --header-h: 64px;
  --container: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.site-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  flex-direction: column;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px 20px;
  box-shadow: var(--shadow);
}

.site-nav.is-open {
  display: flex;
}

.nav-link {
  padding: 12px 0;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.nav-link:last-child {
  border-bottom: none;
}

.nav-link.is-active,
.nav-link:hover {
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  text-align: center;
}

a.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--primary-gradient);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--ghost {
  background: var(--bg-muted);
  color: var(--text-muted);
}

.btn--white {
  background: #fff;
  color: var(--primary);
}

.btn--outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn--lg {
  padding: 12px 24px;
  font-size: 1rem;
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  border-color: transparent;
  pointer-events: none;
}

.btn--outline.btn--disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

/* Hero */
.hero {
  padding: 48px 0 56px;
  background: linear-gradient(180deg, var(--bg-section-strong) 0%, var(--bg-section) 100%);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

.hero-title {
  margin: 0 0 8px;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-slogan {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.hero-desc {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual {
  width: 100%;
  max-width: 280px;
}

.hero-image {
  width: 100%;
  filter: drop-shadow(0 20px 40px var(--primary-shadow));
}

/* Carousel */
.carousel-section {
  padding: 56px 0;
  background: var(--bg-section);
}

.section-title {
  margin: 0 0 32px;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
}

.carousel {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

/* 手机竖屏截图轮播：按高度展示，完整呈现画面 */
.carousel--phone {
  max-width: none;
  width: fit-content;
  padding: 0 48px;
}

.carousel--phone .carousel-track {
  position: relative;
  margin: 0 auto;
  height: min(480px, 68vh);
  aspect-ratio: 360 / 720;
  width: auto;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.carousel--phone .carousel-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel--phone .carousel-slide img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 32px var(--primary-shadow));
}

.carousel-track {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  background: var(--dot-inactive);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--surface-overlay);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 2;
}

.carousel--phone .carousel-btn--prev { left: 0; }
.carousel--phone .carousel-btn--next { right: 0; }

.carousel-btn--prev { left: 12px; }
.carousel-btn--next { right: 12px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--dot-inactive);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.is-active {
  background: var(--primary);
  transform: scale(1.25);
}

/* Features */
.features {
  padding: 56px 0 72px;
  background: var(--bg-section);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.feature-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.feature-card:hover {
  border-color: var(--primary-border);
  background: var(--primary-faint);
  box-shadow: var(--shadow);
}

.feature-icon {
  margin-bottom: 16px;
}

.feature-title {
  margin: 0 0 8px;
  font-size: 1.125rem;
}

.feature-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* CTA */
.cta {
  padding: 56px 0;
  background: var(--primary-gradient);
  color: #fff;
  text-align: center;
}

.cta-title {
  margin: 0 0 8px;
  font-size: 1.75rem;
}

.cta-desc {
  margin: 0 0 28px;
  opacity: 0.9;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Page hero */
.page-hero {
  padding: 48px 0 32px;
  background: linear-gradient(180deg, var(--bg-section-strong) 0%, var(--bg-section) 100%);
  text-align: center;
}

.page-title {
  margin: 0 0 8px;
  font-size: 2rem;
}

.page-desc {
  margin: 0;
  color: var(--text-muted);
}

/* Download */
.download-section {
  padding: 40px 0 72px;
  background: var(--bg-section);
}

.about-section {
  padding: 40px 0 72px;
  background: var(--bg-section);
}

.legal-section {
  padding: 40px 0 72px;
  background: var(--bg-section);
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}

.download-card {
  padding: 32px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.download-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: #fff;
}

.download-card-icon--ios {
  background: linear-gradient(135deg, #1e293b, #334155);
}

.download-card-icon--android {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.download-card-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.download-card-version {
  margin: 0 0 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}

.download-card-version[hidden] {
  display: none;
}

.download-card-desc {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.qrcode-block {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.qrcode-image {
  width: 160px;
  height: 160px;
  margin: 0 auto 12px;
  border-radius: var(--radius);
}

.qrcode-tip {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* WeChat in-app browser guide (download page) */
.wechat-guide {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 72px 24px 24px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  text-align: center;
}

.wechat-guide.is-visible {
  display: block;
}

.wechat-guide__arrow {
  position: absolute;
  top: 12px;
  right: 56px;
  width: 96px;
  height: 80px;
}

.wechat-guide__arrow svg {
  width: 100%;
  height: 100%;
}

.wechat-guide__tip {
  margin: 0 auto;
  max-width: 280px;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.6;
}

/* Legal (privacy / terms) */
.legal-inner {
  max-width: 720px;
  margin: 0 auto;
}

.legal-content {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.legal-content > :first-child {
  margin-top: 0;
}

.legal-content p {
  margin: 0 0 1em;
}

.legal-content h2 {
  margin: 2em 0 0.75em;
  font-size: 1.25rem;
  color: var(--text);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}

.legal-content li {
  margin-bottom: 0.5em;
}

.legal-content strong {
  color: var(--text);
}

/* About */
.about-inner {
  max-width: 840px;
  margin: 0 auto;
}

.about-content {
  margin-bottom: 40px;
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.about-content p {
  margin: 0 0 1em;
}

.contact-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}

.contact-list {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.contact-item + .contact-item {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.contact-item {
  margin: 0;
}

.contact-label {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-value {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--primary);
}

a.contact-value:hover {
  text-decoration: underline;
}

.contact-qrcode-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  text-align: center;
}

.contact-qrcode {
  width: 140px;
  height: 140px;
  margin: 0 auto;
  border-radius: var(--radius);
}

/* Footer */
.site-footer {
  padding: 48px 0 32px;
  background: var(--bg-footer);
  border-top: 1px solid color-mix(in srgb, var(--primary) 12%, #1e293b);
  color: #94a3b8;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
  font-weight: 600;
}

.footer-logo {
  border-radius: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.footer-link {
  color: #94a3b8;
  font-size: 0.875rem;
}

.footer-link:hover {
  color: #e2e8f0;
}

.footer-link--disabled {
  color: #475569;
  cursor: not-allowed;
}

.footer-meta {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.footer-icp-link {
  color: #64748b;
}

.footer-icp-link:hover {
  color: #94a3b8;
}

.footer-copy {
  margin: 0;
  font-size: 0.8125rem;
}

/* Desktop */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 8px;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .nav-link {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
  }

  .nav-link.is-active {
    background: var(--primary-soft);
  }

  .hero-inner {
    flex-direction: row;
    text-align: left;
    gap: 48px;
  }

  .hero-text {
    flex: 1;
  }

  .hero-visual {
    flex: 0 0 300px;
    max-width: 300px;
  }

  .carousel--phone .carousel-track {
    height: min(600px, 72vh);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .download-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: none;
  }

  .contact-block {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-title {
    font-size: 3rem;
  }
}
