:root {
  --brand: #121212;
  --bg: #ffffff;
  --text: #121212;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow-lg: 0 30px 60px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Dark mode: follow system preference */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --text: #f5f5f7;
    --muted: #a1a1aa;
    --border: #2a2a2a;
    --shadow-lg: 0 30px 60px rgba(0,0,0,0.6);
  }
  .site-header {
    background: rgba(0, 0, 0, 0.6);
    border-bottom-color: var(--border);
  }
  .nav-links a { color: var(--text); }
  .brand { color: var(--text); }
  .btn-outline:hover { background: #111; }
  .feature { background: #0a0a0a; border-color: var(--border); }
  .site-footer { background: #000; border-top-color: var(--border); }
  .links a { color: var(--text); }
  .device-mock { background: linear-gradient(180deg, #111, #0b0b0b); border-color: #222; }
  .wechat-card { background: #0a0a0a; border-color: var(--border); }
  .wechat-code img { background: #fff; border-color: var(--border); }
  
  /* Enhanced image contrast for dark mode */
  .section-bleed .bleed-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0.7), rgba(0,0,0,0.5));
  }
  .bleed-card {
    position: relative;
  }
  .bleed-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    pointer-events: none;
  }
  .bleed-card figcaption {
    background: rgba(0,0,0,0.7);
    color: #fff;
    z-index: 1;
  }
  
  /* Improved button contrast */
  .btn-outline {
    border-color: var(--border);
    color: var(--text);
  }
  .btn-outline:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--muted);
  }
  
  /* Better text readability */
  .hero-text h1 { color: #fff; }
  .hero-text .sub { color: rgba(255,255,255,0.8); }
  .bleed-title { color: #fff; }
  .bleed-sub { color: rgba(255,255,255,0.9); }
  .wechat-info h2 { color: #fff; }
  .wechat-info .sub { color: rgba(255,255,255,0.8); }
  .feature h3 { color: #fff; }
  .feature p { color: rgba(255,255,255,0.7); }
  .hint { color: rgba(255,255,255,0.6); }
  .wechat-points { color: rgba(255,255,255,0.7); }
  .wechat-points li { color: rgba(255,255,255,0.7); }
  
  /* 微信小程序区域暗色主题优化 */
  .wechat-card { 
    background: #0a0a0a; 
    border-color: var(--border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
  }
  .wechat-code img { 
    background: #fff; 
    border-color: var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 80px !important;
}

/* 主内容区域默认样式 */
main.container {
  padding: 160px 0 320px;
}

/* 手机端容器适配 */
@media (max-width: 640px) {
  /* 页面内容手机端优化 - 优先级更高 */
  main.container {
    padding: 64px 32px 120px !important;
  }
  
  /* 确保所有页面的main.container都有正确的移动端样式 */
  main.container,
  .container main {
    padding: 64px 32px 120px !important;
  }
  
  /* 其他container的移动端样式 */
  .container:not(main.container) {
    padding: 0 32px !important;
  }
  
  main.container h1 {
    font-size: 28px !important;
    margin-bottom: 16px !important;
  }
  
  main.container h3 {
    font-size: 20px !important;
    margin: 24px 0 12px !important;
  }
  
  main.container p {
    font-size: 15px !important;
    line-height: 1.7 !important;
    margin-bottom: 12px !important;
  }
  
  main.container ul {
    margin: 12px 0 !important;
    padding-left: 20px !important;
  }
  
  main.container li {
    margin: 8px 0 !important;
    font-size: 15px !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 24px !important;
  }
  
  main.container {
    padding: 48px 24px 96px !important;
  }
  
  /* 确保所有页面的main.container都有正确的移动端样式 */
  main.container,
  .container main {
    padding: 48px 24px 96px !important;
  }
  
  main.container h1 {
    font-size: 24px !important;
    margin-bottom: 12px !important;
  }
  
  main.container h3 {
    font-size: 18px !important;
    margin: 20px 0 10px !important;
  }
  
  main.container p {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 10px !important;
  }
  
  main.container ul {
    margin: 10px 0 !important;
    padding-left: 18px !important;
  }
  
  main.container li {
    margin: 6px 0 !important;
    font-size: 14px !important;
  }
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Logo图片样式 */
.brand-logo {
  height: 68px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  margin-top: 12px;
}

.nav-links a {
  margin-left: 16px;
  text-decoration: none;
  color: var(--text);
  opacity: 0.8;
}
.nav-links a:hover { opacity: 1; }

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 72px 0 40px;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-text h1 {
  margin: 0 0 12px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.sub { color: var(--muted); margin: 0 0 24px; }

.cta-group { display: flex; gap: 12px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--border);
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

.btn-outline {
  background: transparent;
  color: var(--text);
}
.btn-outline:hover { background: #f9fafb; }

.hint { margin-top: 8px; color: var(--muted); font-size: 14px; }

.hero-visual { 
  display: flex; 
  justify-content: center; 
  align-items: center;
  width: 100%;
  text-align: center;
  min-height: 640px;
}
.device-mock {
  width: 320px;
  height: 640px;
  border: 12px solid #111;
  border-radius: 36px;
  background: linear-gradient(180deg, #fafafa, #f3f4f6);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}



.device-screenshot {
  width: 320px;
  height: 640px;
  object-fit: cover;
  border-radius: 0;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  background: #000;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 40px 0 40px !important;
  margin: 40px 0 !important;
}

.feature {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  background: #fff;
}
.feature h3 { 
  margin: 0 0 8px; 
  color: var(--text);
}
.feature p { margin: 0; color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  background: #fff;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.links a { margin-right: 16px; text-decoration: none; color: var(--text); opacity: 0.8; }
.links a:hover { opacity: 1; }
.icp { color: var(--muted); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero { 
    grid-template-columns: 1fr; 
    padding-top: 48px; 
    max-width: 100%;
  }
  .hero-visual { 
    order: -1; 
    margin: 24px auto;
    display: flex;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .hero { 
    grid-template-columns: 1fr; 
    padding: 16px 0 24px; 
    max-width: 100%;
  }
  .hero-visual { 
    order: -1; 
    margin: 24px auto;
    display: flex;
    justify-content: center;
  }
  .hero-text h1 { font-size: 30px; }
  .hero-text .sub { font-size: 16px; }
  .cta-group { flex-direction: column; align-items: stretch; }
  .cta-group .btn { margin: 8px 0; }
  .features { 
    grid-template-columns: 1fr; 
    padding: 20px 0 20px !important;
  }
  .device-mock { 
    width: 280px; 
    height: 560px; 
  }
  .device-screenshot {
    width: 280px;
    height: 560px;
    top: 0;
    left: 0;
  }
  .section-bleed .bleed-content { padding: 30px 8px; }
  .bleed-title { font-size: 28px; }
  .bleed-sub { font-size: 16px; }
  .bleed-grid { padding: 0 8px 20px; }
  /* 删除重复的微信小程序样式 */
  .site-footer { padding: 16px 0; }
  .footer-inner { flex-direction: column; gap: 24px; text-align: center; }
}

/* Apple-style full-bleed promotional sections */
.section-bleed {
  position: relative;
  overflow: hidden;
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: #ffffff;
  margin: 40px 0 !important;
}
.section-bleed .bleed-bg {
  position: absolute;
  inset: 0;
  background-image: var(--bg-url);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}
.section-bleed .bleed-overlay {
  position: absolute;
  inset: 0;
  /* background: linear-gradient(180deg, rgba(0,0,0,0.5), rgba(0,0,0,0.35)); */
  background: linear-gradient(180deg, rgba(0,0,0,1), rgba(0,0,0,1));
}
.section-bleed .bleed-content {
  position: relative;
  z-index: 1;
  padding: 80px 80px;
}
.bleed-title {
  margin: 0 0 8px;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.bleed-sub { margin: 0 0 16px; opacity: 0.9; }
.cta-inline .link { color: #fff; text-decoration: underline; opacity: 0.9; }
.cta-inline .link:hover { opacity: 1; }

.section-bleed.alt { background: #000; color: #fff; padding: 40px 0; }
.bleed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 0 80px 60px;
}
.bleed-card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  margin: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-lg);
}
.bleed-card figcaption {
  position: absolute;
  left: 16px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  font-size: 14px;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.in-view { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .bleed-title { font-size: 34px; }
  .bleed-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section-bleed .bleed-content {
    padding: 40px 32px;
  }
  .bleed-grid {
    padding: 0 32px 40px;
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* WeChat Mini Program QR section */
.wechat-qr {
  padding: 20px 0 60px !important;
  margin: 20px 0 !important;
}
.wechat-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}
.wechat-info h2 { 
  margin: 0 0 8px; 
  font-size: 28px; 
  letter-spacing: -0.2px; 
  color: var(--text);
}
.wechat-points { margin: 12px 0 0; padding-left: 18px; color: var(--muted); }
.wechat-points li { margin: 6px 0; }
.wechat-code { text-align: center; }
.wechat-code img { border-radius: 12px; border: 1px solid var(--border); background: #fff; }

@media (max-width: 900px) {
  .wechat-card { grid-template-columns: 1fr; }
}

/* 手机端导航栏优化 */
@media (max-width: 640px) {
  .nav { 
    flex-direction: row; 
    justify-content: space-between;
    align-items: center;
    gap: 16px; 
    padding: 8px 0; 
    position: relative;
  }
  .brand { 
    font-size: 16px; 
    text-align: left;
  }
  
  /* 移动端logo图片样式 */
  .brand-logo {
    height: 56px;
    max-width: 100px;
    margin-top: 8px;
  }
  .nav-links { 
    flex-direction: row; 
    gap: 4px; 
    text-align: right; 
    flex-wrap: nowrap;
    justify-content: flex-end;
    max-width: 320px;
    min-width: 260px;
    margin-left: auto;
    /* 确保导航链接在移动端不会过度左移 */
    position: relative;
    right: 0;
  }
  .nav-links a { 
    padding: 6px 10px; 
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    font-size: 13px;
    white-space: nowrap;
    min-width: auto;
    flex-shrink: 0;
  }
  
  /* 移动端导航文字替换 */
  .nav-links a[data-mobile]::before {
    content: attr(data-mobile);
  }
  .nav-links a[data-mobile] {
    font-size: 0;
  }
  .nav-links a[data-mobile]::before {
    font-size: 12px;
  }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
  .hero-text h1 { font-size: 26px; }
  .hero-text .sub { font-size: 14px; }
  .bleed-title { font-size: 24px; }
  .bleed-sub { font-size: 14px; }
  
  .section-bleed .bleed-content {
    padding: 32px 24px;
  }
  .bleed-grid {
    padding: 0 24px 32px;
  }
  .device-mock { 
    width: 260px; 
    height: 520px; 
  }
  .device-screenshot {
    width: 236px;
    height: 496px;
  }
  .btn { 
    padding: 8px 16px; 
    font-size: 14px; 
  }
  .wechat-card { padding: 8px; }
  .wechat-info h2 { font-size: 20px; }
  
  /* 超小屏幕导航栏优化 */
  .nav { 
    gap: 12px; 
    padding: 6px 0; 
  }
  .brand { 
    font-size: 14px; 
  }
  
  /* 超小屏幕logo图片样式 */
  .brand-logo {
    height: 48px;
    max-width: 90px;
    margin-top: 6px;
  }
  .nav-links { 
    gap: 3px; 
    flex-wrap: nowrap;
    justify-content: flex-end;
    max-width: 280px;
    min-width: 240px;
    margin-left: auto;
  }
  .nav-links a { 
    padding: 3px 6px; 
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    min-width: auto;
    flex-shrink: 0;
  }
  
  /* 超小屏幕导航文字替换 */
  .nav-links a[data-mobile]::before {
    content: attr(data-mobile);
    font-size: 13px;
  }
}

/* 标准移动端屏幕优化 (375px@1x) */
@media (max-width: 375px) {
  .container {
    padding: 0 20px !important;
  }
  
  main.container {
    padding: 40px 20px 80px !important;
  }
  
  /* 确保所有页面的main.container都有正确的移动端样式 */
  main.container,
  .container main {
    padding: 40px 20px 80px !important;
  }
  
  .section-bleed .bleed-content {
    padding: 28px 20px;
  }
  
  .bleed-grid {
    padding: 0 20px 28px;
  }
  
  .hero-text h1 { 
    font-size: 24px; 
  }
  
  .hero-text .sub { 
    font-size: 13px; 
  }
  
  .bleed-title { 
    font-size: 22px; 
  }
  
  .bleed-sub { 
    font-size: 13px; 
  }
  
  .device-mock { 
    width: 240px; 
    height: 480px; 
  }
  
  .device-screenshot {
    width: 216px;
    height: 456px;
  }
  
  .btn { 
    padding: 7px 14px; 
    font-size: 13px; 
  }
  
  .wechat-card { 
    padding: 6px; 
  }
  
  .wechat-info h2 { 
    font-size: 18px; 
  }
  
  /* 标准移动端导航栏优化 */
  .nav { 
    gap: 10px; 
    padding: 5px 0; 
  }
  
  .brand { 
    font-size: 13px; 
  }
  
  /* 标准移动端logo图片样式 */
  .brand-logo {
    height: 44px;
    max-width: 80px;
    margin-top: 5px;
  }
  
  .nav-links { 
    gap: 2px; 
    max-width: 260px;
    min-width: 220px;
    margin-left: auto;
  }
  
  .nav-links a { 
    padding: 2px 5px; 
    border-radius: 4px;
    font-size: 11px;
  }
  
  .nav-links a[data-mobile]::before {
    font-size: 11px;
  }
}

/* 超窄屏幕适配 (320px以下) */
@media (max-width: 320px) {
  .container {
    padding: 0 16px !important;
  }
  
  main.container {
    padding: 32px 16px 64px !important;
  }
  
  .section-bleed .bleed-content {
    padding: 24px 16px;
  }
  
  .bleed-grid {
    padding: 0 16px 24px;
  }
  
  .hero-text h1 { 
    font-size: 22px; 
  }
  
  .hero-text .sub { 
    font-size: 12px; 
  }
  
  .bleed-title { 
    font-size: 20px; 
  }
  
  .bleed-sub { 
    font-size: 12px; 
  }
  
  .device-mock { 
    width: 220px; 
    height: 440px; 
  }
  
  .device-screenshot {
    width: 196px;
    height: 416px;
  }
  
  .btn { 
    padding: 6px 12px; 
    font-size: 12px; 
  }
  
  .wechat-card { 
    padding: 5px; 
  }
  
  .wechat-info h2 { 
    font-size: 16px; 
  }
  
  /* 超窄屏幕导航栏优化 */
  .nav { 
    gap: 8px; 
    padding: 4px 0; 
  }
  
  .brand { 
    font-size: 12px; 
  }
  
  /* 超窄屏幕logo图片样式 */
  .brand-logo {
    height: 40px;
    max-width: 70px;
    margin-top: 4px;
  }
  
  .nav-links { 
    gap: 1px; 
    max-width: 220px;
    min-width: 180px;
    margin-left: auto;
  }
  
  .nav-links a { 
    padding: 1px 4px; 
    border-radius: 3px;
    font-size: 10px;
  }
  
  .nav-links a[data-mobile]::before {
    font-size: 10px;
  }
}
