:root {
  --bg: #0f1218;
  --bg-soft: #171b24;
  --bg-card: #1c2230;
  --line: #2a3344;
  --text: #e8ecf4;
  --muted: #9aa6bd;
  --accent: #e85d4c;
  --accent-2: #f0a06a;
  --link: #7eb6ff;
  --radius: 12px;
  --max: 1120px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: linear-gradient(180deg, #121622 0%, #0f1218 40%, #10141c 100%);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; border-radius: 8px; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; }
ul, ol { padding-left: 1.25rem; }
li { margin: 0.35rem 0; }

.container { width: min(100% - 2rem, var(--max)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 18, 24, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.75rem 0;
}
.brand {
  display: flex; align-items: center; gap: 0.65rem;
  color: var(--text); text-decoration: none; font-weight: 700;
}
.brand:hover { text-decoration: none; color: var(--accent-2); }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.brand span { font-size: 1.1rem; letter-spacing: 0.02em; }
.nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; align-items: center; }
.nav a {
  color: var(--muted); font-size: 0.95rem; padding: 0.25rem 0;
}
.nav a:hover, .nav a.active { color: var(--accent-2); text-decoration: none; }
.menu-toggle {
  display: none; background: var(--bg-card); border: 1px solid var(--line);
  color: var(--text); width: 42px; height: 42px; padding: 0;
  border-radius: 10px; cursor: pointer; align-items: center; justify-content: center;
  position: relative;
}
.menu-toggle:hover { border-color: var(--accent-2); color: var(--accent-2); }
.menu-toggle-bar,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle::before { transform: translateY(-6px); }
.menu-toggle::after { transform: translateY(6px); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar { opacity: 0; }
.menu-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"]::after { transform: rotate(-45deg); }

/* Hero */
.hero {
  padding: 2.5rem 0 1.5rem;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(232, 93, 76, 0.18), transparent 50%),
    radial-gradient(ellipse at 90% 20%, rgba(126, 182, 255, 0.12), transparent 45%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: center;
}
.hero h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  line-height: 1.35; margin-bottom: 0.85rem;
}
.hero .lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-block; padding: 0.7rem 1.2rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #c94436); color: #fff; }
.btn-primary:hover { color: #fff; filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }
.hero-visual { position: relative; }
.hero-visual img {
  width: 100%; border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

/* Sections */
.section { padding: 2.5rem 0; }
.section + .section { border-top: 1px solid rgba(42, 51, 68, 0.55); }
.section-head { margin-bottom: 1.5rem; }
.section-head h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  margin-bottom: 0.5rem;
}
.section-head p { color: var(--muted); max-width: 46rem; }

.prose h2, .prose h3 {
  margin: 1.6rem 0 0.75rem;
  line-height: 1.4;
}
.prose h2 { font-size: 1.45rem; }
.prose h3 { font-size: 1.15rem; color: #f3d6c7; }
.prose p { margin: 0.85rem 0; color: #d5dbe8; }
.prose .muted { color: var(--muted); }

/* Cards / grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.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: #3d4b63; }
.card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 0; }
.card-body { padding: 0.9rem 1rem 1.1rem; }
.card-body h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.card-body p { color: var(--muted); font-size: 0.9rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.feature {
  display: grid; grid-template-columns: 140px 1fr; gap: 1rem;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; align-items: start;
}
.feature img {
  width: 140px; height: 190px; object-fit: cover;
}
.feature h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.feature p { color: var(--muted); font-size: 0.92rem; }

.shot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}
.shot {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.shot img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 0; }
.shot figcaption {
  padding: 0.55rem 0.7rem 0.75rem;
  font-size: 0.85rem; color: var(--muted);
}

.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: center;
}
.split img { width: 100%; border: 1px solid var(--line); }

.toc {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.25rem 0 1.75rem;
}
.toc h2 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.toc ol { margin: 0; }
.toc a { color: var(--link); }

.note {
  background: rgba(232, 93, 76, 0.08);
  border-left: 3px solid var(--accent);
  padding: 0.9rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 1.2rem 0;
  color: #f0d3cd;
}

.breadcrumb {
  padding: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb span { color: var(--text); }

.page-hero {
  padding: 1.5rem 0 0.5rem;
}
.page-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}
.page-hero p { color: var(--muted); max-width: 48rem; }

.content-wrap {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 1.75rem;
  padding: 1.5rem 0 3rem;
}
.main-col {
  background: rgba(28, 34, 48, 0.45);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 2rem;
}
.side-col { position: sticky; top: 5rem; align-self: start; }
.side-box {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.side-box h3 {
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
  color: var(--accent-2);
}
.side-box ul { list-style: none; padding: 0; }
.side-box li { margin: 0.45rem 0; font-size: 0.9rem; }

/* Error pages */
.error-page {
  min-height: 70vh;
  display: grid; place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}
.error-page h1 { font-size: 4rem; color: var(--accent); line-height: 1; }
.error-page h2 { margin: 0.75rem 0; }
.error-page p { color: var(--muted); margin-bottom: 1.5rem; max-width: 28rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #0c0f15;
  padding: 2rem 0 1.5rem;
  margin-top: 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.site-footer h3 { font-size: 0.95rem; margin-bottom: 0.6rem; color: #f0d3cd; }
.site-footer p, .site-footer a { color: var(--muted); font-size: 0.9rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin: 0.35rem 0; }
.copyright {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: #6f7b92;
  font-size: 0.85rem;
  text-align: center;
}

/* Mobile */
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .header-inner { position: relative; flex-wrap: nowrap; }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem 1rem;
    background: rgba(15, 18, 24, 0.98);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    z-index: 120;
  }
  .nav.open { display: flex; }
  .hero-grid, .feature-grid, .split, .content-wrap, .footer-grid {
    grid-template-columns: 1fr;
  }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .shot-grid { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 110px 1fr; }
  .feature img { width: 110px; height: 150px; }
  .side-col { position: static; }
  .main-col { padding: 1.1rem; }
}

@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 1.5rem; }
  .btn { width: 100%; text-align: center; }
}
