/* ===== Variables ===== */
:root {
  --bg: #0f0f12;
  --bg-card: #18181c;
  --bg-card-hover: #1e1e24;
  --text: #f0f0f2;
  --text-muted: #9ca3af;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --green: #22c55e;
  --green-dark: #16a34a;
  --border: rgba(255, 255, 255, 0.06);
  --font-sans: "Outfit", "Noto Sans SC", system-ui, sans-serif;
  --radius: 16px;
  --radius-btn: 12px;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  /* 安全区域：适配刘海屏、底部横条（不撑大宽度） */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  width: 100%;
}

/* Subtle noise overlay */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
/* 大屏：内容不过度拉宽 */
@media (min-width: 1400px) {
  .container { max-width: 1200px; padding: 0 32px; }
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(15, 15, 18, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  box-sizing: border-box;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
}
.brand { flex-shrink: 0; min-width: 0; }
.nav { flex-shrink: 0; }
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
}
.logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}
.logo-fallback {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}
.nav { display: flex; gap: 28px; }
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.nav a:hover { color: var(--text); }

main { overflow-x: hidden; width: 100%; box-sizing: border-box; }

/* ===== Hero ===== */
.hero {
  padding: 140px 0 80px;
  position: relative;
  width: 100%;
  overflow-x: clip;
  box-sizing: border-box;
}
.hero::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  height: 70%;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
}
.hero-content { min-width: 0; }
.hero-visual { min-width: 0; display: flex; justify-content: center; align-items: center; }
.hero-title {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  word-break: break-word;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin: 0 0 36px;
  max-width: 420px;
}

/* Download buttons */
.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 200px;
}
.btn-download:hover {
  transform: translateY(-2px);
}
/* 移动端点击高亮 */
@media (hover: none) {
  .btn-download:active { transform: scale(0.98); }
  .nav a:active { opacity: 0.7; }
}
.btn-download {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.nav a { -webkit-tap-highlight-color: transparent; }
.btn-download span { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.btn-download strong { display: block; font-size: 1rem; }
.btn-download small { font-size: 0.8rem; opacity: 0.85; font-weight: 400; }
.btn-icon { width: 28px; height: 28px; flex-shrink: 0; }
.btn-android {
  background: linear-gradient(180deg, #3ddc84 0%, var(--green-dark) 100%);
  color: #0f0f12;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.35);
}
.btn-android:hover { box-shadow: 0 8px 28px rgba(34, 197, 94, 0.45); }
.btn-apple {
  background: linear-gradient(180deg, #f5f5f7 0%, #d1d5db 100%);
  color: #0f0f12;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.btn-apple:hover { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3); }

/* Hero visual - phone mockup */
.phone-mockup {
  width: 280px;
  max-width: 100%;
  height: 560px;
  background: linear-gradient(145deg, #2a2a2e 0%, #1a1a1e 100%);
  border-radius: 36px;
  padding: 12px;
  box-shadow: var(--shadow), 0 0 0 1px var(--border), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative;
  flex-shrink: 0;
}
.phone-mockup::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: #0f0f12;
  border-radius: 12px;
}
.phone-screen {
  flex: 1;
  height: 100%;
  min-height: 380px;
  border-radius: 24px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}
.phone-app-icon {
  width: 55%;
  max-width: 140px;
  height: auto;
  aspect-ratio: 1;
  border-radius: 22%;
  object-fit: cover;
  display: block;
}

/* ===== Features ===== */
.features { padding: 80px 0; }
.section-title {
  text-align: center;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 48px;
  letter-spacing: -0.02em;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateY(-4px);
}
.feature-icon { font-size: 2.5rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.2rem; margin: 0 0 8px; font-weight: 600; }
.feature-card p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }

/* ===== CTA ===== */
.cta {
  padding: 80px 0 100px;
  text-align: center;
  background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.06) 50%, transparent 100%);
}
.cta-title { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; margin: 0 0 12px; }
.cta-desc { color: var(--text-muted); margin: 0 0 32px; font-size: 1.1rem; }
.cta-buttons { justify-content: center; }

/* ===== Footer ===== */
.footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}
.copyright { margin: 0; color: var(--text-muted); font-size: 0.9rem; text-align: center; }

/* ===== 响应式：电脑 / 平板 / 手机 自适应 ===== */

/* 平板竖屏、小桌面 */
@media (max-width: 1024px) {
  .hero { padding: 120px 0 60px; }
  .hero-inner { gap: 40px; }
  .phone-mockup { width: 260px; height: 520px; }
  .features { padding: 60px 0; }
  .cta { padding: 60px 0 80px; }
}

/* 平板竖屏：主内容单列，手机 mockup 在上 */
@media (max-width: 900px) {
  .container { padding: 0 20px; }
  .hero { padding: 100px 0 50px; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-content { order: 2; }
  .hero-visual { order: 1; }
  .hero-desc { max-width: none; margin-left: auto; margin-right: auto; }
  .download-buttons { justify-content: center; }
  .phone-mockup {
    width: min(220px, 100%);
    max-width: 100%;
    height: 440px;
    border-radius: 28px;
    padding: 10px;
  }
  .phone-mockup::before {
    width: 60px;
    height: 18px;
    top: 12px;
    border-radius: 9px;
  }
  .phone-app-icon { max-width: 120px; }
  .phone-screen { min-height: 280px; border-radius: 18px; padding: 20px; }
  .feature-grid { gap: 20px; }
  .feature-card { padding: 24px; }
}

/* 手机横屏、大屏手机 */
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .header { padding: 12px 0; }
  .header-inner { gap: 8px; }
  .brand { font-size: 1.1rem; gap: 8px; }
  .logo, .logo-fallback { width: 36px; height: 36px; border-radius: 8px; font-size: 0.9rem; }
  .nav { gap: 16px; font-size: 0.9rem; }
  .nav a { padding: 8px 0; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
  .hero { padding: 88px 0 40px; }
  .hero-title { margin-bottom: 16px; }
  .hero-desc { font-size: 1rem; margin-bottom: 28px; }
  .download-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .btn-download {
    justify-content: center;
    min-width: auto;
    padding: 16px 20px;
    min-height: 56px;
    border-radius: 14px;
  }
  .btn-download span { align-items: center; text-align: center; }
  .btn-icon { width: 26px; height: 26px; }
  .phone-mockup {
    width: min(180px, 100%);
    max-width: 100%;
    height: 360px;
    border-radius: 24px;
    padding: 8px;
  }
  .phone-mockup::before {
    width: 50px;
    height: 14px;
    top: 10px;
    border-radius: 7px;
  }
  .phone-app-icon { max-width: 96px; }
  .phone-screen { min-height: 220px; border-radius: 16px; padding: 16px; }
  .hero-title { padding: 0 4px; }
  .hero-desc { padding: 0 4px; }
  .features { padding: 48px 0; }
  .section-title { margin-bottom: 32px; font-size: 1.5rem; }
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .feature-card { padding: 20px; }
  .feature-icon { font-size: 2rem; margin-bottom: 12px; }
  .feature-card h3 { font-size: 1.1rem; }
  .feature-card p { font-size: 0.9rem; }
  .cta { padding: 48px 0 64px; }
  .cta-title { font-size: 1.5rem; }
  .cta-desc { font-size: 1rem; margin-bottom: 24px; }
  .cta-buttons .btn-download { min-height: 52px; }
  .footer { padding: 20px 16px; }
  .copyright { font-size: 0.85rem; }
}

/* 小屏手机 */
@media (max-width: 380px) {
  .container { padding: 0 12px; }
  .hero-title { font-size: 1.75rem; padding: 0 2px; }
  .phone-mockup {
    width: min(160px, 100%);
    max-width: 100%;
    height: 320px;
    border-radius: 22px;
  }
  .phone-app-icon { max-width: 72px; }
  .phone-screen { min-height: 200px; padding: 12px; }
  .btn-download { padding: 14px 16px; min-height: 52px; font-size: 0.95rem; }
}
