:root {
  --brand: #e91e63;
  --brand-deep: #c2185b;
  --accent: #ff6f00;
  --accent-soft: #ffb74d;
  --ink: #1a1520;
  --ink-soft: #4a4450;
  --muted: #7a7380;
  --paper: #fff8f5;
  --paper-2: #fff0ea;
  --line: rgba(26, 21, 32, 0.08);
  --white: #ffffff;
  --shadow: 0 18px 48px rgba(233, 30, 99, 0.12);
  --radius: 18px;
  --max: 1180px;
  --font-display: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 111, 0, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(233, 30, 99, 0.16), transparent 50%),
    linear-gradient(180deg, #fffaf7 0%, var(--paper) 40%, #ffe8ef 100%);
  line-height: 1.75;
  font-size: 16px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-deep);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(255, 250, 247, 0.88);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.brand span {
  font-family: var(--font-display);
  font-size: 1.35rem;
  background: linear-gradient(120deg, var(--accent), var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a.active {
  color: var(--brand);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  width: 42px;
  height: 42px;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
  border-radius: 2px;
  transition: 0.2s ease;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.02);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 8, 16, 0.25) 0%, rgba(20, 8, 16, 0.55) 45%, rgba(20, 8, 16, 0.88) 100%),
    linear-gradient(90deg, rgba(233, 30, 99, 0.25), transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.5rem;
  max-width: 720px;
  animation: rise 0.9s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.1;
  margin: 0 0 0.8rem;
  letter-spacing: 0.04em;
}

.hero h1 {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 600;
  margin: 0 0 0.9rem;
  line-height: 1.45;
}

.hero p {
  margin: 0 0 1.6rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  max-width: 34em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.98rem;
  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(120deg, var(--accent), var(--brand));
  color: var(--white);
  box-shadow: 0 12px 28px rgba(233, 30, 99, 0.35);
}

.btn-primary:hover {
  color: var(--white);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
}

.btn-soft {
  background: var(--white);
  color: var(--brand-deep);
  border-color: rgba(233, 30, 99, 0.15);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 240, 234, 0.9));
}

.section-head {
  max-width: 720px;
  margin-bottom: 2rem;
  animation: rise 0.7s ease both;
}

.section-head .eyebrow {
  display: inline-block;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.55rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.45rem);
  margin: 0 0 0.7rem;
  line-height: 1.25;
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.cat-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
  animation: rise 0.8s ease both;
}

.cat-item:hover {
  transform: translateY(-4px);
}

.cat-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.cat-item figcaption {
  padding: 0.85rem 1rem 1.05rem;
}

.cat-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.cat-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Feature split */
.feature-list {
  display: grid;
  gap: 2rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.1rem;
  box-shadow: var(--shadow);
  animation: rise 0.85s ease both;
}

.feature-row.reverse {
  grid-template-columns: 0.95fr 1.05fr;
}

.feature-row.reverse .feature-copy {
  order: 2;
}

.feature-row img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
}

.feature-copy h3 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin: 0 0 0.7rem;
}

.feature-copy p {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
}

.feature-copy ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
}

.feature-copy li {
  margin-bottom: 0.35rem;
}

/* Article SEO body */
.seo-article {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  box-shadow: var(--shadow);
}

.seo-article h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 2rem 0 0.8rem;
  scroll-margin-top: 90px;
}

.seo-article h2:first-child {
  margin-top: 0;
}

.seo-article h3 {
  font-size: 1.2rem;
  margin: 1.4rem 0 0.55rem;
  color: var(--brand-deep);
}

.seo-article p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  text-align: justify;
}

.seo-article ul,
.seo-article ol {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.seo-article li {
  margin-bottom: 0.4rem;
}

.inline-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 1.2rem 0 1.5rem;
}

.inline-gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
}

.inline-gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.toc {
  background: var(--paper-2);
  border-radius: 16px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}

.toc strong {
  display: block;
  margin-bottom: 0.5rem;
}

.toc a {
  display: inline-block;
  margin: 0.2rem 0.75rem 0.2rem 0;
}

/* Page hero small */
.page-hero {
  padding: 3.2rem 0 1.5rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 0.6rem;
}

.page-hero p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 42em;
}

.legal-content {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(1.3rem, 3vw, 2.2rem);
  margin-bottom: 3rem;
  box-shadow: var(--shadow);
}

.legal-content h2 {
  font-size: 1.35rem;
  margin: 1.6rem 0 0.6rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  color: var(--ink-soft);
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5rem);
  margin: 0 0 0.4rem;
  background: linear-gradient(120deg, var(--accent), var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page p {
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
}

/* Footer */
.site-footer {
  background: #1b1218;
  color: rgba(255, 255, 255, 0.78);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.footer-brand strong {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.site-footer h4 {
  color: var(--white);
  margin: 0 0 0.8rem;
  font-size: 1rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.72);
}

.site-footer a:hover {
  color: var(--accent-soft);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.2rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  justify-content: space-between;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted);
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.related-links a {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.related-links a:hover {
  color: var(--brand);
  border-color: rgba(233, 30, 99, 0.25);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cat-item:nth-child(1) { animation-delay: 0.05s; }
.cat-item:nth-child(2) { animation-delay: 0.1s; }
.cat-item:nth-child(3) { animation-delay: 0.15s; }
.cat-item:nth-child(4) { animation-delay: 0.2s; }
.cat-item:nth-child(5) { animation-delay: 0.25s; }
.cat-item:nth-child(6) { animation-delay: 0.3s; }
.cat-item:nth-child(7) { animation-delay: 0.35s; }
.cat-item:nth-child(8) { animation-delay: 0.4s; }

/* Mobile */
@media (max-width: 960px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-row,
  .feature-row.reverse {
    grid-template-columns: 1fr;
  }

  .feature-row.reverse .feature-copy {
    order: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .inline-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    inset: 72px 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 250, 247, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1rem 1rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 0.85rem 0.4rem;
    border-bottom: 1px solid var(--line);
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    padding: 3.2rem 0 2.4rem;
  }

  .section {
    padding: 3rem 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .feature-row img {
    aspect-ratio: 3 / 4;
    max-height: 420px;
  }
}

@media (max-width: 520px) {
  .cat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
  }

  .cat-item figcaption {
    padding: 0.65rem 0.7rem 0.85rem;
  }

  .cat-item h3 {
    font-size: 0.95rem;
  }

  .cat-item p {
    display: none;
  }

  .inline-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .seo-article p {
    text-align: left;
  }
}
