:root {
  --bg: #0c0b10;
  --bg-soft: #16141c;
  --bg-card: #1c1a24;
  --text: #f3f0f7;
  --text-muted: #a89fb3;
  --accent: #e11d48;
  --accent-soft: #fb7185;
  --line: rgba(255, 255, 255, 0.08);
  --max: 1120px;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(225, 29, 72, 0.22), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(168, 85, 247, 0.12), transparent 50%),
    var(--bg);
  line-height: 1.75;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-soft);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #fff;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(12, 11, 16, 0.82);
  border-bottom: 1px solid var(--line);
}

/* Sticky ads bar under header */
.ads-sticky {
  position: sticky;
  top: 58px;
  z-index: 99;
  display: none;
  background: rgba(12, 11, 16, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 8px 0 6px;
}

.ads-sticky.is-ready {
  display: block;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px 4px;
  background: transparent;
  margin: 0;
  padding: 0 8px;
}

#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.28);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
  border: none;
  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.35);
}

#ads figcaption,
#ads .caption {
  height: 15px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
}

.nav-toggle-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: background 0.2s ease;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.nav-toggle-icon::before {
  top: -6px;
}

.nav-toggle-icon::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--text-muted);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.95rem;
}

.nav-list a:hover,
.nav-list a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* Hero */
.hero {
  padding: 3rem 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  color: var(--accent-soft);
  background: rgba(225, 29, 72, 0.12);
  border: 1px solid rgba(225, 29, 72, 0.35);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.25rem;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #be123c);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
  opacity: 0.92;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: #fff;
}

.hero-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero-visual {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Sections */
.section {
  padding: 2.75rem 0;
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-head h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.3;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 70ch;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  border-block: 1px solid var(--line);
}

/* Cards / Grids */
.grid-3,
.grid-4,
.grid-2 {
  display: grid;
  gap: 1.15rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 113, 133, 0.35);
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-soft);
}

.card-body {
  padding: 1rem 1.05rem 1.15rem;
}

.card-body h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.card-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feature-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.9rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
}

.feature-item img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
}

.feature-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.feature-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Content prose */
.prose {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
}

.prose h2,
.prose h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.prose p {
  color: #d8d2e0;
  margin: 0 0 1rem;
}

.prose ul,
.prose ol {
  color: #d8d2e0;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumbs {
  padding: 1.1rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.page-hero {
  padding: 1.5rem 0 0.5rem;
}

.page-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 70ch;
}

.page-content {
  padding: 1.5rem 0 3rem;
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  margin: 0 0 0.5rem;
  color: var(--accent-soft);
}

.error-page p {
  color: var(--text-muted);
  max-width: 42ch;
  margin: 0 auto 1.5rem;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: #09080c;
  padding: 2.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.site-footer h3 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
}

.site-footer p,
.site-footer li {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0 0;
}

.toc a {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.toc a:hover {
  color: #fff;
  border-color: rgba(251, 113, 133, 0.4);
}

.keywords-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.keywords-bar span {
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}

@media (max-width: 960px) {
  .hero-grid,
  .grid-4,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(12, 11, 16, 0.98);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .nav.open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
  }

  .nav-list a {
    display: block;
    border-radius: 10px;
  }

  .hero {
    padding-top: 1.75rem;
  }

  .hero-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .footer-grid,
  .feature-item {
    grid-template-columns: 1fr;
  }

  .feature-item {
    grid-template-columns: 72px 1fr;
  }

  .feature-item img {
    width: 72px;
    height: 72px;
  }

  .section {
    padding: 2rem 0;
  }

  .prose {
    padding: 1.15rem 1rem;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
