@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;800&display=swap");

:root {
  --bg: #0b0b0d;
  --bg-soft: #141418;
  --bg-card: #1a1a20;
  --line: #2a2a32;
  --text: #e8e8ec;
  --muted: #9a9aa6;
  --accent: #c62828;
  --accent-2: #8bc34a;
  --link: #9ccc65;
  --max: 1100px;
  --radius: 10px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(198, 40, 40, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(139, 195, 74, 0.06), transparent);
  min-height: 100vh;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: #c5e1a5; text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.25rem; }
li { margin: 0.35rem 0; }

.wrap { width: min(100% - 2rem, var(--max)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 13, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}
.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}
.nav a:hover,
.nav a.active { color: var(--accent-2); }
.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.menu-btn .menu-icon {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

/* Hero */
.hero {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.35;
  margin: 0.75rem 0 1rem;
  letter-spacing: 0.02em;
}
.hero .lead {
  color: var(--muted);
  max-width: 42rem;
  margin: 0 auto 1.5rem;
  font-size: 1.05rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #d32f2f, #8e0000);
  color: #fff;
  box-shadow: 0 8px 24px rgba(198, 40, 40, 0.35);
}
.btn-primary:hover { color: #fff; }
.btn-ghost {
  background: var(--bg-card);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { color: var(--accent-2); border-color: var(--accent-2); }

.hero-shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.hero-shots img,
.shot img,
.gallery img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-card);
}

/* Sections */
section { padding: 2rem 0; }
.section-title {
  font-size: 1.45rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.section-desc {
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.prose p { margin: 0.9rem 0; color: #d4d4da; }
.prose h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  color: #fff;
}
.prose h3 {
  font-size: 1.12rem;
  margin: 1.4rem 0 0.55rem;
  color: #f0f0f4;
}
.prose strong { color: #fff; }

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}
.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}
.card p { color: var(--muted); font-size: 0.95rem; }
.feature-list {
  list-style: none;
  padding: 0;
}
.feature-list li {
  padding: 0.65rem 0.85rem;
  margin: 0.45rem 0;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.feature-list li strong { color: var(--accent-2); }

.shot-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.caption {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.4rem;
  text-align: center;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}
.steps li {
  position: relative;
  padding: 1rem 1rem 1rem 3.2rem;
  margin: 0.75rem 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag-cloud a,
.tag-cloud span {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}
.tag-cloud a:hover {
  color: var(--accent-2);
  border-color: var(--accent-2);
}

.toc {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.25rem 0;
}
.toc strong { display: block; margin-bottom: 0.5rem; }
.toc a { display: inline-block; margin: 0.2rem 0.85rem 0.2rem 0; }

.page-hero {
  padding: 2rem 0 1rem;
}
.page-hero h1 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  margin-bottom: 0.5rem;
}
.breadcrumb {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.breadcrumb a { color: var(--muted); }
.related {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.related ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; }

/* Error pages */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}
.error-page .code {
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.error-page h1 { margin-bottom: 0.75rem; }
.error-page p { color: var(--muted); margin-bottom: 1.5rem; }

/* Footer */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  background: #08080a;
  padding: 2rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.site-footer h3 {
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
  color: #fff;
}
.site-footer a {
  display: block;
  color: var(--muted);
  margin: 0.35rem 0;
  font-size: 0.92rem;
}
.site-footer a:hover { color: var(--accent-2); }
.copyright {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3,
  .footer-grid,
  .hero-shots,
  .shot-pair { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-shots {
    grid-template-columns: 1fr 1fr;
  }
  .hero-shots img:last-child { display: none; }
}

@media (max-width: 720px) {
  .menu-btn { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: auto;
    width: min(220px, calc(100vw - 2rem));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem;
    background: rgba(20, 20, 24, 0.98);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    z-index: 120;
  }
  .nav a {
    padding: 0.7rem 0.85rem;
    border-radius: 8px;
  }
  .nav a:hover,
  .nav a.active { background: var(--bg-soft); }
  .nav.open { display: flex; }
  .hero { padding-top: 1.5rem; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  section { padding: 1.5rem 0; }
  .ads-bar { top: 56px; }
}

/* Sticky ads bar under header */
.ads-bar {
  position: sticky;
  top: 58px;
  z-index: 99;
  background: rgba(11, 11, 13, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
}
#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px 4px;
  background: transparent;
  margin: 0 auto;
  max-width: var(--max);
}
#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  box-sizing: border-box;
}
#ads figure { margin: 0; }
#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
  border: 1px solid var(--line);
  background: #fff;
}
#ads a {
  display: inline-block;
  text-decoration: none;
  border-radius: 15px;
}
#ads img:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}
#ads figcaption,
#ads .caption {
  height: 15px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}
