:root {
  --bg: #0b0b0f;
  --bg-soft: #14141c;
  --bg-card: #1a1a24;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f3f3f7;
  --muted: #a8a8b8;
  --accent: #ff4d6d;
  --accent-2: #ff8a3d;
  --grad: linear-gradient(135deg, #ff8a3d 0%, #ff4d6d 55%, #e23a8c 100%);
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --max: 1120px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 77, 109, 0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(255, 138, 61, 0.14), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
}

a {
  color: #ff8aa0;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #ffc1cc;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(11, 11, 15, 0.82);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.menu-btn {
  display: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-btn span {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.hero {
  padding: 56px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.25;
  margin-bottom: 14px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy .lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 22px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--grad);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(1.05);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.hero-visual {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 520px;
  object-fit: cover;
  object-position: top;
}

.section {
  padding: 42px 0;
}

.section-head {
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  margin-bottom: 8px;
}

.section-head p {
  color: var(--muted);
  max-width: 760px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  background: #111;
}

.card-body {
  padding: 14px 16px 16px;
}

.card-body h3 {
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.card-body p {
  color: var(--muted);
  font-size: 0.92rem;
}

.feature {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 18px;
}

.feature.reverse {
  grid-template-columns: 1.1fr 0.9fr;
}

.feature.reverse .feature-media {
  order: 2;
}

.feature-media {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.feature-media img {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 420px;
  object-fit: cover;
  object-position: top;
  margin: 0 auto;
}

.feature-text h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.feature-text p {
  color: var(--muted);
  margin-bottom: 10px;
}

.feature-text ul {
  margin: 10px 0 0 18px;
  color: var(--muted);
}

.prose {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 8px;
}

.prose h2,
.prose h3 {
  margin: 18px 0 10px;
}

.prose p,
.prose li {
  color: #d6d6e0;
  margin-bottom: 12px;
}

.prose ul {
  margin: 0 0 14px 20px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud a {
  background: rgba(255, 77, 109, 0.1);
  border: 1px solid rgba(255, 77, 109, 0.28);
  color: #ffb3c1;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.page-hero {
  padding: 40px 0 10px;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  margin-bottom: 10px;
}

.page-hero p {
  color: var(--muted);
  max-width: 760px;
}

.breadcrumb {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.breadcrumb a {
  color: var(--muted);
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: #09090d;
  padding: 34px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}

.footer-grid h3 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.footer-grid p,
.footer-grid a {
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: #7f7f90;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 0;
}

.error-page h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}

.error-page p {
  color: var(--muted);
  margin-bottom: 20px;
}

.toc {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
}

.toc strong {
  display: block;
  margin-bottom: 8px;
}

.toc a {
  display: inline-block;
  margin: 4px 10px 4px 0;
}

@media (max-width: 960px) {
  .hero-grid,
  .feature,
  .feature.reverse,
  .grid-3,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .feature.reverse .feature-media {
    order: 0;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .menu-btn {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 64px;
    background: #12121a;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    border-radius: 10px;
  }

  .hero-visual img,
  .feature-media img {
    max-height: 420px;
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 28px;
  }

  .prose {
    padding: 16px 14px 4px;
  }

  .card img {
    aspect-ratio: 3 / 4;
  }
}
