:root {
  --bg: #0a0a12;
  --bg-card: #12121f;
  --bg-section: #161628;
  --line: #2a2a45;
  --text: #f3f4f8;
  --text-muted: #b8bdd4;
  --pri: #ff9900;
  --pri-dark: #e08800;
  --pri-glow: rgba(255, 153, 0, 0.25);
  --link: #ffb84d;
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #06060e 0%, var(--bg) 40%, #0e0e1a 100%);
  line-height: 1.85;
  font-size: 16px;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: #ffd080; text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header,
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 6, 14, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  position: relative;
}

nav { padding: 0; }

.menu,
.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 14px;
}

.menu a,
.nav-main a {
  color: var(--text-muted);
  padding: 4px 0;
}

.menu a:hover,
.menu a.active,
.nav-main a:hover,
.nav-main a.active {
  color: var(--pri);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-toggle:hover { background: #1e1e32; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow: 0 2px 12px var(--pri-glow);
  flex-shrink: 0;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand span em {
  color: var(--pri);
  font-style: normal;
}

/* Hero */
.hero {
  padding: 40px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}

h1 {
  margin: 0 0 16px;
  font-size: 34px;
  line-height: 1.35;
  font-weight: 800;
}

h1 .accent { color: var(--pri); }

h2 {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.4;
  color: var(--text);
}

h3 {
  margin: 0 0 10px;
  font-size: 19px;
  color: #ffe8c0;
}

p { margin: 0 0 14px; color: var(--text-muted); }

.lead {
  font-size: 17px;
  color: #d8dce8;
  max-width: 720px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-pri {
  background: linear-gradient(135deg, var(--pri), var(--pri-dark));
  color: #1a1000;
  box-shadow: 0 4px 20px var(--pri-glow);
}

.btn-sec {
  border: 1px solid #4a4a6a;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.hero-shot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-shot img { width: 100%; }

/* Sections */
.section {
  margin: 24px 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-section);
}

.section-alt { background: var(--bg-card); }

.grid-2 { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }

.card {
  border: 1px solid #2e2e4a;
  border-radius: 12px;
  background: var(--bg-card);
  padding: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--pri);
  box-shadow: 0 4px 24px var(--pri-glow);
}

.card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 12px;
  aspect-ratio: 9/16;
  object-fit: cover;
  object-position: top;
}

.card h3 { font-size: 16px; margin-bottom: 8px; }

.card .small { font-size: 13px; color: #9aa0bc; margin: 0; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  background: rgba(255, 153, 0, 0.12);
  color: var(--pri);
  border: 1px solid rgba(255, 153, 0, 0.3);
}

.feature-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.feature-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.feature-row img {
  border-radius: 10px;
  border: 1px solid var(--line);
}

ul, ol {
  margin: 0 0 14px;
  padding-left: 22px;
  color: var(--text-muted);
}

li { margin-bottom: 6px; }

.columns { columns: 2; column-gap: 28px; }

.faq-item { margin-bottom: 18px; }

.faq-item strong { color: var(--text); display: block; margin-bottom: 4px; }

.toc {
  background: rgba(255, 153, 0, 0.06);
  border: 1px solid rgba(255, 153, 0, 0.2);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 24px;
}

.toc h2 { font-size: 18px; margin-bottom: 10px; }

.toc ol,
.toc-list { margin: 0; }

.toc a { color: var(--link); }

.toc-chips {
  display: none;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 2px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.toc-chips a {
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text);
  background: rgba(255, 153, 0, 0.1);
  border: 1px solid rgba(255, 153, 0, 0.28);
  white-space: nowrap;
}

.toc-chips a:hover {
  background: rgba(255, 153, 0, 0.2);
  text-decoration: none;
  color: #ffe8c0;
}

/* Sub pages */
.page-hero { padding: 32px 0 20px; }

.page-hero h1 { font-size: 30px; }

.content-box {
  background: var(--bg-section);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 32px;
}

/* Error pages */
.error-box {
  max-width: 560px;
  margin: 48px auto;
  padding: 40px 32px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-section);
}

.error-box h1 {
  font-size: 72px;
  color: var(--pri);
  margin: 0 0 12px;
  line-height: 1;
}

/* Footer */
footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
  color: #8e94b0;
  font-size: 14px;
}

footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
}

/* Mobile preview strip */
.mobile-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.mobile-strip .card {
  min-width: 200px;
  max-width: 220px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

.mobile-strip .card img { aspect-ratio: 9/19; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-shot { order: -1; max-width: 280px; margin: 0 auto 8px; }
  .hero { padding: 24px 0 20px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: 1fr; }
  .feature-row img { max-width: 100%; width: 100%; }
  .columns { columns: 1; }
}

@media (max-width: 768px) {
  .menu-toggle { display: inline-flex; }

  .nav-main {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: min(260px, calc(100vw - 40px));
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px;
    background: rgba(14, 14, 26, 0.98);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    z-index: 110;
  }

  .nav-main.is-open { display: flex; }

  .nav-main a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid #2e2e4a;
  }

  .nav-main a.active {
    background: rgba(255, 153, 0, 0.12);
    border-color: rgba(255, 153, 0, 0.35);
  }

  .toc-list { display: none; }

  .toc-chips {
    display: flex;
    margin: 0 -4px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .toc { padding: 14px 16px; margin-bottom: 16px; }

  .toc h2 { font-size: 15px; margin-bottom: 10px; }

  .cta { flex-direction: column; }

  .cta .btn { width: 100%; text-align: center; }

  .section { margin: 16px 0; }

  .wrap { padding: 0 14px; }

  .mobile-strip .card { min-width: 140px; max-width: 160px; }
}

@media (max-width: 600px) {
  h1 { font-size: 24px; line-height: 1.4; }
  h2 { font-size: 20px; }
  .section { padding: 18px 14px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .brand { font-size: 15px; }
  .brand img { width: 36px; height: 36px; }
  .btn { padding: 11px 16px; font-size: 14px; }
  .lead { font-size: 15px; }
  .header-top { padding: 12px 0; }
}
