:root {
  --bg: #f5f7fa;
  --bg-soft: #eef2f7;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #5a6678;
  --line: #d8e0ea;
  --brand: #e11d48;
  --brand-deep: #be123c;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --shadow: 0 12px 40px rgba(28, 36, 48, 0.08);
  --radius: 14px;
  --max: 1120px;
  --nav-h: 68px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "ZCOOL XiaoWei", "Noto Serif SC", 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 500px at 10% -10%, rgba(225, 29, 72, 0.08), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(15, 118, 110, 0.08), transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 40%, #eef3f8 100%);
  line-height: 1.75;
  min-height: 100vh;
}

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(--brand);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(216, 224, 234, 0.9);
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}

.logo span {
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--brand);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand);
  background: rgba(225, 29, 72, 0.08);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  animation: heroZoom 18s ease-in-out infinite alternate;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 16, 24, 0.35) 0%, rgba(12, 16, 24, 0.72) 55%, rgba(12, 16, 24, 0.92) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 4.5rem 0 3.5rem;
  max-width: 720px;
  animation: fadeUp 0.9s ease both;
}

.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.15;
  margin: 0 0 0.85rem;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 600;
  line-height: 1.4;
}

.hero p {
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  max-width: 34em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.3rem;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.28);
}

.btn-primary:hover {
  background: var(--brand-deep);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.section {
  padding: 3.5rem 0;
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.3;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 46em;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.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);
}

.feature-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: fadeUp 0.7s ease both;
}

.feature-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(28, 36, 48, 0.12);
}

.feature-tile img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.feature-tile .body {
  padding: 1rem 1.1rem 1.2rem;
}

.feature-tile h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.feature-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.25rem, 3vw, 2.2rem);
  box-shadow: var(--shadow);
}

.prose h2,
.prose h3 {
  line-height: 1.35;
  margin-top: 1.8rem;
}

.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0.85rem 0;
  color: #2a3444;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
  color: #2a3444;
}

.prose li {
  margin: 0.4rem 0;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
}

.split-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.split-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.pill-list a {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.9rem;
}

.pill-list a:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(225, 29, 72, 0.06);
}

.guide-block {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.guide-block:last-child {
  border-bottom: 0;
}

.guide-block img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
}

.page-hero {
  padding: 2.8rem 0 1.5rem;
}

.page-hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 42em;
}

.breadcrumb {
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--muted);
}

.site-footer {
  margin-top: 2rem;
  padding: 2.5rem 0 2rem;
  background: #121822;
  color: rgba(255, 255, 255, 0.78);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
}

.site-footer h3 {
  margin: 0 0 0.8rem;
  color: #fff;
  font-size: 1rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.72);
}

.site-footer a:hover {
  color: #fff;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin: 0.4rem 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  color: #fff;
  font-family: var(--display);
  font-size: 1.25rem;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.copyright {
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
}

.error-page {
  min-height: calc(100vh - var(--nav-h) - 180px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 0;
}

.error-page h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2.4rem, 6vw, 4rem);
  color: var(--brand);
}

.error-page p {
  color: var(--muted);
  max-width: 28em;
  margin: 0 auto 1.4rem;
}

.toc {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0 1.6rem;
}

.toc strong {
  display: block;
  margin-bottom: 0.45rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.15rem;
}

.toc a {
  color: var(--text);
}

.highlight-box {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(225, 29, 72, 0.06));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin: 1.2rem 0;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroZoom {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.08);
  }
}

.feature-tile:nth-child(2) { animation-delay: 0.05s; }
.feature-tile:nth-child(3) { animation-delay: 0.1s; }
.feature-tile:nth-child(4) { animation-delay: 0.15s; }
.feature-tile:nth-child(5) { animation-delay: 0.2s; }
.feature-tile:nth-child(6) { animation-delay: 0.25s; }

@media (max-width: 960px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .split,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.2rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 0.75rem 0.9rem;
  }

  .hero {
    min-height: 72vh;
  }

  .hero-content {
    padding: 3rem 0 2.4rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .guide-block {
    grid-template-columns: 88px 1fr;
  }

  .guide-block img {
    width: 88px;
    height: 70px;
  }

  .section {
    padding: 2.4rem 0;
  }
}
