:root {
  --brand: #e62e8a;
  --brand-2: #ff6b35;
  --brand-3: #ffa500;
  --ink: #1a1a1f;
  --muted: #5c5c66;
  --line: #ececf0;
  --bg: #f7f5f8;
  --card: #ffffff;
  --grad: linear-gradient(135deg, #ffa500 0%, #ff6b35 45%, #e62e8a 100%);
  --shadow: 0 10px 30px rgba(230, 46, 138, 0.08);
  --radius: 14px;
  --max: 1180px;
  --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);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }
ul, ol { padding-left: 1.2em; }
h1, h2, h3, h4 { line-height: 1.35; color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 0.7rem; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); margin: 1.6rem 0 0.8rem; }
h3 { font-size: 1.15rem; margin: 1.2rem 0 0.55rem; }
p { margin-bottom: 1rem; color: #2d2d35; }
.container { width: min(100% - 2rem, var(--max)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 1rem;
}
.logo {
  display: flex; align-items: center; gap: 0.65rem;
  color: var(--ink); font-weight: 800; font-size: 1.15rem;
}
.logo img { width: 40px; height: 40px; border-radius: 10px; }
.logo span {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.nav { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.nav a {
  color: var(--muted); padding: 0.45rem 0.75rem; border-radius: 999px;
  font-size: 0.95rem; font-weight: 600;
}
.nav a:hover, .nav a.active {
  color: var(--brand); background: rgba(230,46,138,0.08);
}
.menu-toggle {
  display: none; border: 0; background: var(--grad); color: #fff;
  width: 34px; height: 34px; border-radius: 8px; font-size: 0.85rem; line-height: 1; cursor: pointer;
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: #16141c;
  color: #fff;
  min-height: 72vh;
  display: flex; align-items: flex-end;
}
.hero-media {
  position: absolute; inset: 0;
  background: center/cover no-repeat;
  opacity: 0.55;
  transform: scale(1.04);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,20,28,0.25) 0%, rgba(22,20,28,0.82) 70%, #16141c 100%);
}
.hero-content {
  position: relative; z-index: 2; padding: 4.5rem 0 3rem; width: min(100% - 2rem, var(--max)); margin: 0 auto;
}
.hero-brand {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900; letter-spacing: 0.02em;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 0.6rem;
}
.hero p { color: rgba(255,255,255,0.88); max-width: 40rem; font-size: 1.05rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.4rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.35rem; border-radius: 999px; font-weight: 700;
  border: 0; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(230,46,138,0.35); }
.btn-primary:hover { color: #fff; }
.btn-ghost {
  background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.28);
}
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,0.2); }

/* Sections */
.section { padding: 3.2rem 0; }
.section.alt { background: #fff; }
.section-head { margin-bottom: 1.5rem; max-width: 46rem; }
.section-head p { color: var(--muted); margin-bottom: 0; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 0.45rem;
}

.grid-2 {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 1.6rem; align-items: center;
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

.media-frame {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: #111;
  border: 1px solid rgba(230,46,138,0.08);
}
.media-frame img { width: 100%; aspect-ratio: 9/16; object-fit: cover; object-position: top; }
.media-frame.wide img { aspect-ratio: 16/10; object-fit: cover; }

.feature-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-card img { width: 100%; aspect-ratio: 9/16; object-fit: cover; object-position: top; }
.feature-card .body { padding: 1rem 1.05rem 1.2rem; }
.feature-card h3 { margin-top: 0; font-size: 1.05rem; }
.feature-card p { font-size: 0.92rem; color: var(--muted); margin-bottom: 0; }

.content-block {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; margin-bottom: 1.2rem;
}
.content-block h2:first-child, .content-block h3:first-child { margin-top: 0; }
.prose { max-width: 860px; }
.prose li { margin-bottom: 0.45rem; color: #2d2d35; }
.toc {
  background: linear-gradient(180deg, #fff, #fff8fb);
  border: 1px solid #f3d7e6; border-radius: var(--radius);
  padding: 1.2rem 1.4rem; margin-bottom: 1.6rem;
}
.toc h2 { margin-top: 0; font-size: 1.15rem; }
.toc ol { margin: 0.4rem 0 0; }
.toc a { color: #333; }
.toc a:hover { color: var(--brand); }

.pill-list { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 1rem 0 0.4rem; }
.pill {
  display: inline-block; padding: 0.35rem 0.8rem; border-radius: 999px;
  background: rgba(230,46,138,0.08); color: var(--brand); font-size: 0.86rem; font-weight: 600;
}

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; margin-top: 1.4rem;
}
.stat {
  background: #fff; border-radius: 12px; padding: 1rem; text-align: center;
  border: 1px solid var(--line);
}
.stat strong {
  display: block; font-size: 1.45rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { color: var(--muted); font-size: 0.86rem; }

.breadcrumb {
  padding: 1rem 0 0; font-size: 0.9rem; color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }

.page-hero {
  padding: 2.2rem 0 1rem;
  background: #fff; border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.related {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; margin-top: 1rem;
}
.related a {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem; color: var(--ink); font-weight: 600;
}
.related a:hover { border-color: #f0b6d3; color: var(--brand); }

/* Error pages */
.error-wrap {
  min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 3rem 1rem;
}
.error-code {
  font-size: clamp(4rem, 12vw, 7rem); font-weight: 900;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.error-wrap p { max-width: 28rem; margin: 0.8rem auto 1.4rem; color: var(--muted); }

/* Footer */
.site-footer {
  background: #16141c; color: rgba(255,255,255,0.78); padding: 2.8rem 0 1.6rem; margin-top: 1rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.6rem; margin-bottom: 1.8rem;
}
.site-footer h3 { color: #fff; margin-bottom: 0.7rem; font-size: 1rem; }
.site-footer a { color: rgba(255,255,255,0.72); display: inline-block; margin-bottom: 0.4rem; }
.site-footer a:hover { color: #ffb4d6; }
.footer-brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.7rem; }
.footer-brand img { width: 42px; height: 42px; border-radius: 10px; }
.footer-brand strong { color: #fff; font-size: 1.1rem; }
.copyright {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1rem;
  font-size: 0.86rem; color: rgba(255,255,255,0.5);
}

/* Animations */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-content, .feature-card, .content-block {
  animation: rise .7s ease both;
}
.feature-card:nth-child(2) { animation-delay: .08s; }
.feature-card:nth-child(3) { animation-delay: .16s; }
.feature-card:nth-child(4) { animation-delay: .24s; }

@media (max-width: 960px) {
  .grid-2, .grid-3, .related, .footer-grid, .stats { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 68px;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 0.8rem 1rem 1rem; align-items: stretch;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.75rem 0.9rem; }
  .hero { min-height: 62vh; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .related, .footer-grid, .stats { grid-template-columns: 1fr; }
  .media-frame img, .feature-card img { aspect-ratio: 3/4; }
  .section { padding: 2.2rem 0; }
  .content-block { padding: 1.1rem 1rem; }
}
