:root {
  --bg: #ffffff;
  --section-bg: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --border: #d2d2d7;
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --section-bg: #1d1d1f;
    --text: #f5f5f7;
    --muted: #86868b;
    --accent: #0a84ff;
    --border: #424245;
  }

  /* 深色模式下调整图片阴影 */
  .screenshots img,
  .feature-image img {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  }

  /* 深色模式下二维码阴影 */
  .qr-code img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-top: 118px;
  font-family: -apple-system, BlinkMacSystemFont,
    "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 14px;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  display: flex;
  align-items: center;
}

nav a:hover {
  color: var(--accent);
}

nav picture,
nav img {
  display: block;
}

/* Header layout groups */
.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-right {
  gap: 12px;
}

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-size: 12px;
}

.lang-switch a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--section-bg);
  line-height: 1.2;
}

.lang-switch a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

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

/* ---------- Typography ---------- */

.hero-title {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 21px;
  color: var(--muted);
}

h2 {
  /* font-size: 36px; */
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

p {
  font-size: 17px;
}

.muted {
  color: var(--muted);
}

/* ---------- Sections ---------- */

.section {
  background: var(--bg);
}

.section.alt {
  background: var(--section-bg);
}

/* ---------- Screenshot Gallery ---------- */

.screenshots {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.screenshots img {
  width: 260px;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  scroll-snap-align: start;
}

/* ---------- Feature List ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.feature-item {
  font-size: 16px;
}

/* ---------- Detailed Features ---------- */

.features-detailed {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.feature-detailed {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.feature-detailed.feature-left {
  flex-direction: row;
}

.feature-detailed.feature-right {
  flex-direction: row-reverse;
}

.feature-content {
  flex: 1;
  min-width: 0;
}

.feature-detailed h2 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.3;
}

.feature-detailed p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
}

.feature-image {
  flex: 0 0 400px;
  max-width: 100%;
}

.feature-image img {
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* ---------- FAQ ---------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--section-bg);
  padding: 20px 22px;
}

.faq-item h2 {
  font-size: 20px;
  margin: 0;
}

.faq-answer {
  margin-top: 12px;
  color: var(--muted);
}

.faq-answer p {
  margin: 10px 0;
}

.faq-answer ul {
  margin: 10px 0 10px 18px;
  padding: 0;
}

.faq-answer li {
  margin: 6px 0;
}

/* ---------- 响应式设计 ---------- */

@media (max-width: 768px) {
  /* 容器和间距 */
  body {
    padding-top: 100px;
  }

  .container {
    padding: 40px 20px;
  }

  header .container {
    padding: 16px 20px !important;
  }

  footer {
    padding: 32px 20px !important;
  }

  /* 导航栏 */
  nav {
    gap: 16px;
    font-size: 13px;
    flex-wrap: wrap;
  }

  nav img {
    width: 60px !important;
  }

  /* 标题和字体 */
  h1 {
    font-size: 32px;
    margin-bottom: 20px;
  }

  h2 {
    font-size: 24px;
    margin-bottom: 16px;
  }

  p {
    font-size: 16px;
  }

  /* FAQ */
  .faq-item {
    padding: 18px 18px;
  }

  .faq-item h2 {
    font-size: 18px;
  }

  /* Hero 标题 */
  .hero-title {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  /* 截图画廊 */
  .screenshots {
    gap: 16px;
  }

  .screenshots img {
    width: 220px;
    border-radius: 16px;
  }

  /* 功能模块 */
  .features-detailed {
    gap: 48px;
  }

  .feature-detailed {
    flex-direction: column !important;
    gap: 24px;
  }

  /* 移动端统一顺序：文字在上，图片在下 */
  .feature-content {
    order: 1;
  }

  .feature-image {
    order: 2;
    flex: 1 1 auto;
    width: 100%;
  }

  .feature-detailed h2 {
    font-size: 24px;
    margin-bottom: 12px;
  }

  .feature-detailed p {
    font-size: 16px;
    line-height: 1.6;
  }

  /* 介绍段落 - 覆盖内联样式 */
  .section p {
    max-width: 100% !important;
  }

  .section p[style*="font-size: 21px"] {
    font-size: 18px !important;
    line-height: 1.5 !important;
  }

  .section p[style*="font-size: 17px"] {
    font-size: 15px !important;
    line-height: 1.5 !important;
    margin-top: 16px !important;
  }

  .section p[style*="font-size: 24px"] {
    font-size: 20px !important;
    line-height: 1.5 !important;
    max-width: 100% !important;
  }

  /* 联系页面 */
  .contact-info {
    gap: 24px;
  }

  .contact-item {
    padding: 20px;
  }

  .contact-item h2 {
    font-size: 20px;
  }

  /* 移动端：带二维码的联系项垂直排列 */
  .contact-item-with-qr {
    flex-direction: column;
    gap: 20px;
  }

  .qr-code {
    text-align: center;
  }

  .qr-code img {
    max-width: 180px;
  }
}

@media (max-width: 480px) {
  /* 更小的移动设备 */
  body {
    padding-top: 90px;
  }

  .container {
    padding: 32px 16px;
  }

  header .container {
    padding: 12px 16px !important;
  }

  nav {
    gap: 12px;
    font-size: 12px;
  }

  nav img {
    width: 50px !important;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  .hero-title {
    font-size: 32px;
  }

  .screenshots img {
    width: 180px;
  }

  .features-detailed {
    gap: 40px;
  }

  .feature-detailed h2 {
    font-size: 22px;
  }

  .section p[style*="font-size: 24px"] {
    font-size: 18px !important;
  }

  /* 联系页面 */
  .contact-item h2 {
    font-size: 18px;
  }

  .qr-code img {
    max-width: 160px;
  }
}

/* ---------- Footer ---------- */

/* ---------- Contact Page ---------- */

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 32px;
}

.contact-item {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--section-bg);
}

.contact-item h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

.contact-item a:hover {
  text-decoration: underline;
}

/* 带二维码的联系项布局 */
.contact-item-with-qr {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

.contact-content {
  flex: 1;
  min-width: 0;
}

.qr-code {
  flex: 0 0 auto;
  text-align: center;
}

.qr-code picture,
.qr-code img {
  display: block;
  max-width: 200px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* legacy: older in-page language switch removed in favor of header switch */

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
  padding: 40px 24px;
  text-align: center;
}

.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;

  /* 背景图 */
  background-image: url("assets/banner1.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* Apple 风格：干净、克制 */
  color: #fff;
  position: relative;
}
