/* General Body Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  color: #333;
}

/* Header and Navigation */
header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem 5%;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  text-decoration: none;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}


nav ul li {
  margin-left: 2rem;
}

nav ul li a {
  text-decoration: none;
  color: #555;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #007bff;
}

/* Main Content */
main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 100vw;
  margin: 2rem auto;
  padding: 0 1rem;
}

section {
  width: 85%;
  max-width: 1200px;
  background-color: #fff;
  margin-bottom: 2rem;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

h1, h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Gallery Section */
.gallery {
  width: 95%;
  max-width: 1400px;
  display: flex;
  flex-wrap: nowrap; /* 不换行 */
  justify-content: flex-start; /* 靠左排列 */
  gap: 0.5rem; /* 减小图片间距 */
  background-color: transparent;
  box-shadow: none;
  overflow-x: auto; /* 横向滚动 */
  -webkit-overflow-scrolling: touch; /* 移动端顺滑滚动 */
}

.gallery img {
  display: block;
  width: auto; /* 避免被拉伸，使用自身宽度 */
  max-width: 270px; /* 上限 */
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

/*.gallery img:hover {*/
/*  transform: scale(1.05);*/
/*}*/

/* Features Section */
.features ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem; /* 稍大一些的间距，让卡片更呼吸 */
  text-align: center;
}

.features li {
  background-color: #fff; /* 卡片底色 */
  padding: 1.25rem;
  border-radius: 12px; /* 更圆润 */
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); /* 些许阴影 */
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.features li:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.10);
}

.features li strong {
  color: #222;
}

.features .highlight {
  text-align: center;
  margin-top: 2rem;
  font-size: 1.2rem;
  color: #007bff;
}

/* QR Code Section */
.qrcode {
  text-align: center;
}

.qrcode img {
  max-width: 200px;
  margin: 1rem 0;
}

/* Content Section for Tutorial/FAQ */
.content {
  width: 90%;
  background-color: transparent; /* 让内部卡片更突出 */
  box-shadow: none;
  padding: 0; /* 由卡片自身控制留白 */
}

.content h1 {
  margin-bottom: 1.5rem;
}

.content article {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 1.25rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.content article:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.10);
}

.content article h2 {
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  color: #222;
}

.content article p {
  margin: 0.25rem 0 0.5rem;
  color: #444;
}

.content article ol {
  margin: 0.5rem 0 0.5rem 1.25rem;
  padding: 0;
  list-style: decimal-leading-zero; /* 更清晰的序号 */
}

.content article ol li {
  margin: 0.25rem 0;
  padding-left: 0.25rem;
}

.content article ol li::marker {
  color: #007bff; /* 序号高亮 */
  font-weight: 600;
}

.content article a {
  color: #0a58ca;
  text-decoration: none;
  border-bottom: 1px dashed rgba(10, 88, 202, 0.35);
}

.content article a:hover {
  color: #084298;
  border-bottom-color: rgba(8, 66, 152, 0.6);
}

.content article + article {
  margin-top: 1rem; /* 连续卡片间距 */
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
  color: #777;
}

/* Responsive Design */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav {
    flex-wrap: wrap;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    margin-top: 1rem;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 0.5rem 0;
    text-align: center;
  }

  /* 紧凑移动端整体留白 */
  main {
    margin: 1rem auto; /* 原为 2rem */
    padding: 0 0.5rem; /* 原为 0 1rem */
  }

  section {
    padding: 1rem; /* 原为 2rem */
  }

  /* 紧凑画廊边距与间距，贴近四周 */
  .gallery {
    padding: 0.25rem; /* 避免离边太远 */
    gap: 0.4rem; /* 稍微缩小图片间距 */
  }

  /*.gallery img {*/
  /*    max-width: 150px; !* 移动端稍微小一点 *!*/
  /*}*/
}
