:root {
  --bg: #0a0a0c;
  --bg-soft: #121218;
  --bg-card: #1a1a22;
  --text: #f2f2f5;
  --text-muted: #a8a8b3;
  --accent: #ff3b5c;
  --accent-soft: #ff6b81;
  --accent-dark: #c9183a;
  --border: rgba(255, 255, 255, 0.08);
  --gold: #f5c542;
  --radius: 12px;
  --max: 1180px;
  --font-display: "ZCOOL XiaoWei", "Noto Serif SC", Georgia, serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

ul,
ol {
  padding-left: 1.25rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.35;
  font-weight: 500;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.logo span {
  background: linear-gradient(120deg, #fff 30%, var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.25rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 14px;
}

.nav-toggle-bars span {
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}

.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 6px; }
.nav-toggle-bars span:nth-child(3) { top: 12px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(255, 59, 92, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 80%, rgba(245, 197, 66, 0.08), transparent 50%),
    linear-gradient(180deg, #0a0a0c 0%, #14141c 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 4rem 0 3.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}

.hero-brand em {
  font-style: normal;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  color: var(--text);
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 36em;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.4rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 8px 28px rgba(255, 59, 92, 0.35);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent-soft);
  color: var(--accent-soft);
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: floatIn 0.9s ease both;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy > * {
  animation: fadeUp 0.7s ease both;
}

.hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.24s; }

/* Sections */
.section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.section-alt {
  background: var(--bg-soft);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 46rem;
}

.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin-bottom: 0.65rem;
}

.section-head p {
  color: var(--text-muted);
}

.prose {
  color: var(--text-muted);
}

.prose p {
  margin-bottom: 1.1rem;
}

.prose h2,
.prose h3 {
  color: var(--text);
  margin: 2rem 0 0.85rem;
}

.prose h2 {
  font-size: 1.55rem;
}

.prose h3 {
  font-size: 1.2rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(255, 59, 92, 0.4);
  transform: translateY(-3px);
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.55rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.feature-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 59, 92, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.9rem;
}

/* Category / screenshot gallery */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.shot-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.shot-item:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 59, 92, 0.45);
}

.shot-item img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  background: #000;
}

.shot-item figcaption {
  padding: 0.75rem 0.9rem 1rem;
}

.shot-item h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  font-family: var(--font-body);
}

.shot-item p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.shot-grid.wide img {
  aspect-ratio: 9 / 14;
}

/* Two column */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.split img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
}

.split-text h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  margin-bottom: 0.85rem;
}

.split-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  counter-reset: step;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.step h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.step p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* FAQ */
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  color: var(--text);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details[open] summary {
  color: var(--accent-soft);
  margin-bottom: 0.65rem;
}

.faq details p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Page hero (inner pages) */
.page-hero {
  padding: 3rem 0 2rem;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(255, 59, 92, 0.18), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 0.6rem;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 40rem;
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent-soft);
}

.content-wrap {
  padding: 2.5rem 0 4rem;
}

.content-wrap .prose {
  max-width: 48rem;
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding: 4rem 0;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  margin-bottom: 0.75rem;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #070709;
  padding: 2.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.65rem;
}

.footer-brand span {
  color: var(--accent);
}

.site-footer p,
.site-footer li {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--accent-soft);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0 2rem;
}

.toc h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
}

.toc ol {
  margin: 0;
  color: var(--text-muted);
}

.toc a {
  color: var(--text-muted);
}

.toc a:hover {
  color: var(--accent-soft);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag-list a {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
}

.tag-list a:hover {
  border-color: var(--accent);
  color: var(--accent-soft);
}

.cta-banner {
  margin-top: 2rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 59, 92, 0.18), rgba(255, 107, 129, 0.06));
  border: 1px solid rgba(255, 59, 92, 0.3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cta-banner h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.cta-banner p {
  color: var(--text-muted);
  margin: 0;
}

/* Mobile */
@media (max-width: 960px) {
  .hero-inner,
  .split,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .shot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .hero-visual {
    order: -1;
    max-width: 360px;
    margin-inline: auto;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0 0.75rem;
  }

  .nav.open {
    display: flex;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .feature-grid,
  .shot-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .shot-item img {
    aspect-ratio: 9 / 12;
  }

  .hero-brand {
    font-size: 2.2rem;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
