:root {
  --bg: #0d1117;
  --bg-elevated: #161b22;
  --bg-card: rgba(22, 27, 34, 0.72);
  --bg-glass: rgba(26, 26, 46, 0.55);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e6edf3;
  --text-muted: #9ba7b4;
  --text-dim: #6e7b8b;
  --primary: #e94560;
  --primary-soft: rgba(233, 69, 96, 0.14);
  --accent: #533483;
  --accent-2: #0f3460;
  --cyan: #38bdf8;
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 38%, #0f3460 70%, #533483 100%);
  --gradient-primary: linear-gradient(135deg, #e94560 0%, #b83b5e 55%, #533483 100%);
  --gradient-text: linear-gradient(120deg, #ffffff 0%, #ffd6de 40%, #e94560 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 8px 32px rgba(233, 69, 96, 0.28);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --header-h: 72px;
  --maxw: 1240px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6fb;
    --bg-elevated: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.82);
    --bg-glass: rgba(255, 255, 255, 0.62);
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.16);
    --text: #121826;
    --text-muted: #4a5568;
    --text-dim: #7a8699;
    --primary: #d92b4b;
    --primary-soft: rgba(217, 43, 75, 0.1);
    --accent: #533483;
    --accent-2: #0f3460;
    --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 45%, #0f3460 100%);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 28px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.16);
    --shadow-glow: 0 8px 32px rgba(217, 43, 75, 0.22);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(233, 69, 96, 0.14), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(83, 52, 131, 0.18), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(15, 52, 96, 0.16), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover {
  color: #ff6b83;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.6em;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 {
  font-size: clamp(1.75rem, 3.4vw, 2.85rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  padding-bottom: 0.5rem;
  position: relative;
}

h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--gradient-primary);
}

h3 {
  font-size: clamp(1.12rem, 1.6vw, 1.35rem);
  margin-top: 1.6em;
}

h4 {
  font-size: 1.02rem;
  color: var(--text-muted);
  margin-top: 1.2em;
}

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

strong {
  color: var(--text);
  font-weight: 600;
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
  color: var(--text-muted);
}

li {
  margin-bottom: 0.45em;
}

li::marker {
  color: var(--primary);
}

blockquote {
  margin: 0 0 1rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

blockquote:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}

blockquote p {
  margin: 0;
  color: var(--text);
  font-style: italic;
}

address {
  font-style: normal;
}

section {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ============ 头部导航 ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  min-height: var(--header-h);
  background: var(--bg-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), var(--shadow-sm);
}

header .brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}

header .brand svg {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-glow);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

header .brand:hover svg {
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 10px 38px rgba(233, 69, 96, 0.45);
}

header .brand span {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

header nav {
  flex: 1 1 auto;
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

header nav li {
  margin: 0;
}

header nav a {
  display: inline-block;
  padding: 0.42rem 0.72rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

header nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--gradient-primary);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

header nav a:hover {
  color: var(--text);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

header nav a:hover::after {
  width: 60%;
}

header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 1 320px;
  min-width: 0;
}

header form[role="search"] label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

header form[role="search"] input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.55rem 0.95rem;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

header form[role="search"] input[type="search"]::placeholder {
  color: var(--text-dim);
}

header form[role="search"] input[type="search"]:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

header form[role="search"] button {
  flex: 0 0 auto;
  padding: 0.55rem 1.05rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

header form[role="search"] button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 34px rgba(233, 69, 96, 0.42);
}

header form[role="search"] button:active {
  transform: translateY(0) scale(0.98);
}

/* ============ 主内容容器 ============ */
main {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2.5rem) 3rem;
}

main > section,
main > nav,
main > article {
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

/* 面包屑 */
main > nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1.5rem;
  padding: 0.55rem 1rem;
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-dim);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  width: fit-content;
  max-width: 100%;
}

main > nav[aria-label="面包屑导航"] li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  color: var(--text-dim);
  opacity: 0.6;
}

main > nav[aria-label="面包屑导航"] a {
  color: var(--text-muted);
}

main > nav[aria-label="面包屑导航"] a:hover {
  color: var(--primary);
}

main > nav[aria-label="面包屑导航"] [aria-current="page"] {
  color: var(--primary);
  font-weight: 600;
}

/* ============ Banner ============ */
#banner {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem);
  border-radius: var(--radius-lg);
  background: var(--gradient-hero);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
  animation: fadeUp 0.9s var(--ease) both;
}

#banner::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -1;
  background:
    radial-gradient(closest-side, rgba(233, 69, 96, 0.42), transparent 70%) 20% 20% / 60% 60% no-repeat,
    radial-gradient(closest-side, rgba(56, 189, 248, 0.26), transparent 70%) 85% 15% / 55% 55% no-repeat,
    radial-gradient(closest-side, rgba(83, 52, 131, 0.5), transparent 70%) 60% 95% / 65% 65% no-repeat;
  filter: blur(10px);
  animation: auroraShift 18s ease-in-out infinite alternate;
}

#banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(13, 17, 23, 0) 40%, rgba(13, 17, 23, 0.45) 100%);
  border-radius: inherit;
}

#banner h1 {
  max-width: 22ch;
  margin-bottom: 1rem;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
  background: linear-gradient(120deg, #ffffff 0%, #ffe3e9 45%, #ff8fa3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#banner > p {
  max-width: 76ch;
  font-size: clamp(0.95rem, 1.4vw, 1.06rem);
  color: rgba(230, 237, 243, 0.82);
  margin-bottom: 1.75rem;
}

#banner > p strong {
  color: #fff;
  padding: 0.05em 0.35em;
  border-radius: 6px;
  background: rgba(233, 69, 96, 0.28);
  box-shadow: inset 0 0 0 1px rgba(233, 69, 96, 0.4);
}

#banner figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

#banner figure:hover {
  transform: translateY(-6px) scale(1.008);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
}

#banner figure svg {
  width: 100%;
  height: auto;
}

#banner figcaption {
  padding: 0.8rem 1.1rem;
  font-size: 0.85rem;
  color: rgba(230, 237, 243, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(13, 17, 23, 0.35);
}

/* ============ 通用区块卡片 ============ */
main > section:not(#banner) {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
}

main > section:not(#banner):hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

main > section:not(#banner)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(233, 69, 96, 0.35), transparent 40%, transparent 60%, rgba(83, 52, 131, 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

main > section:not(#banner):hover::before {
  opacity: 1;
}

/* ============ 新闻 / 文章卡片 ============ */
#news {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

#news h2 {
  grid-column: 1 / -1;
}

#news article {
  position: relative;
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}

#news article:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-md);
}

#news article h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

#news article time {
  display: inline-block;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--primary);
  padding: 0.1rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  margin-bottom: 0.5rem;
}

#news article p:last-child {
  margin-bottom: 0;
}

/* ============ 技术文章列表 ============ */
#articles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

#articles h2 {
  grid-column: 1 / -1;
}

#articles article {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}

#articles article:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

#articles article:hover::before {
  transform: scaleY(1);
}

#articles article h3 {
  margin-top: 0;
  margin-bottom: 0.3rem;
  font-size: 1.08rem;
  transition: color 0.3s var(--ease);
}

#articles article:hover h3 {
  color: var(--primary);
}

#articles article time {
  font-size: 0.76rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-bottom: 0.6rem;
  display: block;
}

#articles article p {
  font-size: 0.92rem;
  margin-bottom: 1rem;
  flex: 1 1 auto;
}

#articles article a {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(233, 69, 96, 0.28);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#articles article a::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

#articles article a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

#articles article a:hover::after {
  transform: translateX(4px);
}

/* ============ FAQ 折叠面板 ============ */
#faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 0.7rem;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#faq details:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.055);
}

#faq details[open] {
  border-color: rgba(233, 69, 96, 0.4);
  background: rgba(233, 69, 96, 0.055);
  box-shadow: var(--shadow-sm);
}

#faq summary {
  position: relative;
  padding: 0.95rem 3rem 0.95rem 1.2rem;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.25s var(--ease);
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1;
  color: var(--primary);
  border-radius: 50%;
  background: var(--primary-soft);
  transition: transform 0.35s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
  background: var(--primary);
  color: #fff;
}

#faq summary:hover {
  color: var(--primary);
}

#faq details p {
  margin: 0;
  padding: 0 1.2rem 1.1rem;
  font-size: 0.93rem;
  animation: fadeUp 0.35s var(--ease) both;
}

/* ============ HowTo 有序步骤 ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 0.7rem;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 0.85rem 1rem 0.85rem 3.4rem;
  margin: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: var(--shadow-glow);
}

#howto ol li:hover {
  transform: translateX(6px);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
}

/* ============ 客户评价 ============ */
#testimonials {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

#testimonials h2 {
  grid-column: 1 / -1;
}

#testimonials blockquote {
  margin: 0;
  position: relative;
  padding: 1.4rem 1.4rem 1.2rem;
  border-left: none;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(233, 69, 96, 0.12), rgba(83, 52, 131, 0.1));
  border: 1px solid var(--border);
}

#testimonials blockquote::before {
  content: "\201C";
  position: absolute;
  top: -0.35rem;
  left: 0.7rem;
  font-size: 3.4rem;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--primary);
  opacity: 0.4;
}

#testimonials blockquote p {
  font-style: normal;
  font-size: 0.95rem;
  color: var(--text);
}

/* ============ 客户案例 ============ */
#cases h3 {
  padding-left: 0.85rem;
  border-left: 3px solid var(--primary);
  border-radius: 2px;
}

/* ============ 联系与地址 ============ */
#contact address {
  display: grid;
  gap: 0.55rem;
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
}

#contact address p {
  margin: 0;
  font-size: 0.93rem;
  padding-left: 1.5rem;
  position: relative;
}

#contact address p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* ============ 网站地图 / 友情链接 ============ */
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

#sitemap li,
#links li {
  margin: 0;
}

#sitemap a,
#links a {
  display: inline-block;
  padding: 0.42rem 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: color 0.28s var(--ease), background 0.28s var(--ease), border-color 0.28s var(--ease), transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--gradient-primary);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* ============ 页脚 ============ */
footer {
  position: relative;
  margin-top: 2rem;
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem) 2rem;
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.4), rgba(13, 17, 23, 0.85));
  border-top: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@media (prefers-color-scheme: light) {
  footer {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(244, 246, 251, 0.92));
  }
}

footer > section {
  max-width: var(--maxw);
  margin: 0 auto 1.5rem;
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

footer > section:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

footer h2 {
  font-size: 1rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0;
}

footer h2::after {
  display: none;
}

footer p {
  font-size: 0.86rem;
  margin-bottom: 0.6rem;
  color: var(--text-dim);
}

footer p:last-child {
  margin-bottom: 0;
}

footer > p {
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
  padding-top: 0.5rem;
}

footer > p a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.3s var(--ease);
}

footer > p a::before {
  content: "↑";
}

footer > p a:hover {
  color: #fff;
  background: var(--gradient-primary);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* ============ 滚动动画 ============ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auroraShift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-3%, 2%, 0) scale(1.06);
  }
  100% {
    transform: translate3d(3%, -2%, 0) scale(1.03);
  }
}

@supports (animation-timeline: view()) {
  main > section:not(#banner),
  #news article,
  #articles article,
  #testimonials blockquote {
    animation: fadeUp 0.8s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  header {
    gap: 0.85rem;
  }
  header form[role="search"] {
    flex: 1 1 240px;
  }
  #banner h1 {
    max-width: none;
  }
}

@media (min-width: 720px) {
  #news {
    grid-template-columns: repeat(2, 1fr);
  }
  #articles {
    grid-template-columns: repeat(2, 1fr);
  }
  #testimonials {
    grid-template-columns: repeat(3, 1fr);
  }
  #howto ol {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  #articles {
    grid-template-columns: repeat(3, 1fr);
  }
  #banner {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3rem);
  }
  #banner h1,
  #banner > p {
    grid-column: 1;
  }
  #banner h1 {
    grid-row: 1;
    margin-bottom: 0.8rem;
  }
  #banner > p {
    grid-row: 2;
    margin-bottom: 0;
  }
  #banner figure {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 860px) {
  header {
    position: relative;
    padding-bottom: 0.85rem;
  }
  header nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 -0.25rem;
    padding: 0 0.25rem;
  }
  header nav::-webkit-scrollbar {
    display: none;
  }
  header nav ul {
    flex-wrap: nowrap;
    gap: 0.1rem;
  }
  header nav a {
    white-space: nowrap;
    font-size: 0.86rem;
  }
  header form[role="search"] {
    order: 2;
    flex: 1 1 auto;
    margin-left: auto;
    max-width: 300px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }
  header {
    gap: 0.6rem;
  }
  header .brand {
    font-size: 1.02rem;
  }
  header .brand svg {
    width: 34px;
    height: 34px;
  }
  header form[role="search"] {
    flex-basis: 100%;
    max-width: none;
    order: 3;
  }
  header nav {
    order: 2;
  }
  header form[role="search"] button {
    padding: 0.55rem 0.85rem;
  }
  main {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
  #banner {
    padding: 1.6rem 1.15rem;
    border-radius: var(--radius);
  }
  main > section:not(#banner) {
    padding: 1.15rem 1rem;
    border-radius: var(--radius);
  }
  #banner figcaption {
    font-size: 0.78rem;
    padding: 0.65rem 0.85rem;
  }
  #articles article,
  #news article {
    padding: 1.05rem 1.1rem;
  }
  #faq summary {
    padding: 0.85rem 2.7rem 0.85rem 1rem;
    font-size: 0.93rem;
  }
  #howto ol li {
    padding-left: 3rem;
  }
  #sitemap a,
  #links a {
    font-size: 0.82rem;
    padding: 0.38rem 0.85rem;
  }
  footer {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
  footer > section {
    padding: 1rem;
  }
}

@media (hover: none) {
  main > section:not(#banner):hover,
  #news article:hover,
  #articles article:hover,
  #banner figure:hover,
  blockquote:hover,
  #howto ol li:hover,
  footer > section:hover {
    transform: none;
  }
}

::selection {
  background: rgba(233, 69, 96, 0.35);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(233, 69, 96, 0.6), rgba(83, 52, 131, 0.6));
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(233, 69, 96, 0.9), rgba(83, 52, 131, 0.9));
  background-clip: padding-box;
}