:root {
  --bg: #fdfbf7;
  --accent: #b22222;
  /* 中国红 */
  --muted: #5c4b3b;
  --card: #fffaf5;
  --glass: rgba(255, 255, 255, 0.7);
  --radius: 16px;
  --maxw: 1100px;
}

* {
  box-sizing: border-box
}

body {
  font-family: 'Noto Serif SC', serif;
  margin: 0;
  background-color: var(--bg);
  background-image: url('images/bg_texture.png');
  color: #3a2f25;
  line-height: 1.6;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(253, 251, 247, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px
}

.logo img {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08)
}

.brand h1 {
  font-size: 22px;
  margin: 0;
  color: #2e1e1e
}

.brand p {
  margin: 0;
  font-size: 13px;
  color: var(--muted)
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-weight: 600
}

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

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  align-items: center;
  padding: 28px 0;
  background-color: var(--card);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.hero-left {
  padding-left: 48px;
  padding-right: 16px;
  border-radius: 14px
}

.kicker {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px
}

.hero-title {
  font-size: 42px;
  margin: 0 0 12px;
  color: #2e1e1e
}

.hero-sub {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 20px
}

.ctas {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(178, 34, 34, 0.2)
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* Preview card */
.preview-card {
  border-radius: 20px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center
}

.device img {
  width: 100%;
  max-width: 320px;
  border-radius: 12px
}

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

.feature {
  background: var(--card);
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05)
}

.feature h3 {
  margin: 0 0 12px;
  font-size: 20px;
  color: #2e1e1e
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px
}

/* Community Boards */
#community-boards {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
  margin: 40px 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

#community-boards h3 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #2e1e1e;
}

#community-boards p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 16px;
}

/* Gallery */
#gallery {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  margin: 40px 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.gallery {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

.gallery::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

.gallery img {
  width: auto;
  height: 480px;
  /* Or a fixed height */
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.gallery .col {
  flex: 0 0 auto;
  /* Do not grow or shrink */
}

/* Footer */
footer {
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  margin-top: 28px;
  line-height: 1.8;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Download Section */
#download {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding: 28px;
  background: var(--glass);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

#download h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

#download p {
  margin: 0;
  color: var(--muted);
}

#download .download-buttons {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#download .qr-gallery {
  display: flex;
  gap: 20px;
}

#download .qr-item {
  text-align: center;
}

#download .qr-item img {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

#download .qr-item p {
  margin-top: 6px;
  font-size: 14px;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  cursor: pointer;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  font-size: 45px;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: #ccc;
}

/* --- Article & Hub Layouts --- */

/* Breadcrumbs */
.breadcrumbs {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.breadcrumbs span {
  margin: 0 8px;
  color: #ccc;
}

/* Page Layout */
.page-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  margin-top: 20px;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.sidebar h3 {
  margin-top: 0;
  font-size: 18px;
  color: #2e1e1e;
  border-bottom: 2px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin-bottom: 10px;
}

.sidebar a {
  color: var(--muted);
  text-decoration: none;
  display: block;
  padding: 6px 0;
  transition: color 0.2s;
}

.sidebar a:hover,
.sidebar a.active {
  color: var(--accent);
  font-weight: 600;
}

.sidebar .btn {
  color: #fff !important;
  text-align: center;
}

/* Article Content */
.article-content {
  background: var(--card);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  min-height: 600px;
}

.article-content h1 {
  font-size: 32px;
  margin-top: 0;
  color: #2e1e1e;
}

.article-meta {
  font-size: 14px;
  color: #999;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 20px;
}

.article-body {
  font-size: 17px;
  line-height: 1.8;
  color: #3a2f25;
}

.article-body h2 {
  font-size: 24px;
  margin-top: 40px;
  margin-bottom: 20px;
  color: #2e1e1e;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}

.article-body h3 {
  font-size: 20px;
  margin-top: 30px;
  margin-bottom: 16px;
  color: #2e1e1e;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.article-body blockquote {
  margin: 20px 0;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.03);
  border-left: 4px solid var(--muted);
  font-style: italic;
  border-radius: 0 8px 8px 0;
}

/* Hub Grid */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.hub-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: rgba(178, 34, 34, 0.1);
}

.hub-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #2e1e1e;
}

.hub-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.hub-card .tag {
  display: inline-block;
  font-size: 12px;
  padding: 4px 8px;
  background: rgba(178, 34, 34, 0.08);
  color: var(--accent);
  border-radius: 4px;
  margin-bottom: 12px;
  width: fit-content;
}

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

  .hero-left {
    padding: 24px;
  }

  .features {
    grid-template-columns: repeat(2, 1fr)
  }

  .wrap {
    padding: 18px
  }

  .page-container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    margin-bottom: 30px;
  }
}

@media (max-width:560px) {
  .header-inner {
    flex-direction: column;
    gap: 12px;
  }

  nav a {
    margin: 0 8px;
  }

  .hero-title {
    font-size: 28px
  }

  .hero-sub {
    font-size: 15px;
  }

  .features {
    grid-template-columns: 1fr
  }

  #download {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .article-content {
    padding: 24px;
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(8px);
  transition: all 600ms ease
}

.in-view {
  opacity: 1;
  transform: none
}

/* Feature Card Links */
.feature-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.feature-card-link .feature {
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid transparent;
}

.feature-card-link:hover .feature {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: rgba(178, 34, 34, 0.1);
}