:root {
  --bg: #0f1120;
  --bg-soft: #161a2e;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-card-hover: rgba(255, 255, 255, 0.1);
  --text: #e8eaf6;
  --text-soft: #a8aecb;
  --text-mute: #7c83a3;
  --primary: #6c5ce7;
  --primary-2: #a29bfe;
  --accent: #00d2d3;
  --accent-2: #ff6b9d;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --blur: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1120px;
  --header-h: 64px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5fb;
    --bg-soft: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --text: #1c1f33;
    --text-soft: #4a4f6d;
    --text-mute: #767c9c;
    --primary: #5b4bd6;
    --primary-2: #8b7cf6;
    --accent: #00a8a9;
    --accent-2: #e5497f;
    --border: rgba(28, 31, 51, 0.1);
    --shadow: 0 8px 32px rgba(60, 64, 120, 0.12);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(108, 92, 231, 0.18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 0%, rgba(0, 210, 211, 0.12), transparent 55%);
  background-attachment: fixed;
}

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

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

a:hover,
a:focus-visible {
  color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============ Header ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 32, 0.72);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  border-bottom: 1px solid var(--border);
  padding: 12px clamp(16px, 4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

@media (prefers-color-scheme: light) {
  header {
    background: rgba(255, 255, 255, 0.72);
  }
}

.site-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.site-brand a {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, var(--primary-2), var(--accent) 60%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1.2;
}

.site-brand a:hover {
  filter: brightness(1.15);
}

.site-brand p {
  font-size: 0.72rem;
  color: var(--text-mute);
  letter-spacing: 0.08em;
}

header nav {
  flex: 1 1 100%;
  order: 3;
}

header nav ul {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  padding: 4px 0 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
  -webkit-overflow-scrolling: touch;
}

header nav ul::-webkit-scrollbar {
  height: 4px;
}

header nav ul::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

header nav li {
  flex-shrink: 0;
}

header nav a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-soft);
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

header nav a:hover,
header nav a:focus-visible {
  background: var(--bg-card);
  color: var(--text);
  transform: translateY(-1px);
}

/* ============ Main / Article ============ */
main {
  display: block;
}

main > article {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 32px) 64px;
}

main > article > h1 {
  font-size: clamp(1.6rem, 4.2vw, 2.6rem);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: clamp(24px, 4vw, 40px);
  padding: clamp(28px, 5vw, 48px) clamp(20px, 4vw, 40px);
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(135deg, rgba(108, 92, 231, 0.32), rgba(0, 210, 211, 0.22) 55%, rgba(255, 107, 157, 0.2)),
    var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.7s ease both;
}

main > article > h1::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 45%);
  pointer-events: none;
}

/* ============ Sections ============ */
section {
  margin-bottom: clamp(24px, 4vw, 40px);
  padding: clamp(20px, 3.5vw, 36px);
  border-radius: var(--radius);
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: fadeUp 0.7s ease both;
}

section:hover {
  background: var(--bg-card-hover);
  border-color: rgba(162, 155, 254, 0.35);
  box-shadow: 0 10px 36px rgba(108, 92, 231, 0.18);
}

section h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 18px;
  padding-left: 16px;
  position: relative;
  color: var(--text);
}

section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 5px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary-2), var(--accent));
}

section h3 {
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  font-weight: 700;
  margin: 22px 0 10px;
  color: var(--text);
  line-height: 1.5;
}

section h3:first-of-type {
  margin-top: 4px;
}

section p {
  color: var(--text-soft);
  margin-bottom: 14px;
  font-size: 0.97rem;
}

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

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

section ul,
section ol {
  margin: 10px 0 16px;
  padding-left: 22px;
  color: var(--text-soft);
}

section li {
  margin-bottom: 8px;
  font-size: 0.97rem;
}

section ol li::marker {
  color: var(--accent);
  font-weight: 700;
}

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

/* ============ Nested articles (技术文章) ============ */
#articles > article {
  padding: 18px 20px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  transition: transform 0.28s ease, background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

@media (prefers-color-scheme: light) {
  #articles > article {
    background: rgba(255, 255, 255, 0.6);
  }
}

#articles > article:hover {
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  border-color: rgba(0, 210, 211, 0.4);
  box-shadow: 0 8px 28px rgba(0, 210, 211, 0.14);
}

#articles > article h3 {
  margin-top: 0;
  color: var(--primary-2);
}

#articles > article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-mute);
  letter-spacing: 0.03em;
}

#articles > article a {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(162, 155, 254, 0.4);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

#articles > article a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateX(2px);
}

/* ============ Blockquote (客户评价) ============ */
blockquote {
  position: relative;
  margin: 14px 0;
  padding: 18px 20px 18px 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.14), rgba(0, 210, 211, 0.08));
  border: 1px solid var(--border);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

blockquote:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(108, 92, 231, 0.2);
}

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

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

/* ============ FAQ ============ */
#faq h3 {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(108, 92, 231, 0.1);
  border-left: 4px solid var(--primary-2);
  font-size: 1rem;
  margin: 14px 0 8px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

#faq h3:hover {
  background: rgba(0, 210, 211, 0.12);
  border-left-color: var(--accent);
}

#faq p {
  padding: 0 16px 4px;
  font-size: 0.94rem;
}

/* ============ Contact / Sitemap / Links ============ */
#contact p {
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 8px;
  font-size: 0.94rem;
  transition: background 0.25s ease, transform 0.25s ease;
}

@media (prefers-color-scheme: light) {
  #contact p {
    background: rgba(28, 31, 51, 0.03);
  }
}

#contact p:hover {
  background: rgba(0, 210, 211, 0.1);
  transform: translateX(4px);
}

#sitemap ul,
#links ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.86rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

@media (prefers-color-scheme: light) {
  #sitemap a,
  #links a {
    background: rgba(28, 31, 51, 0.04);
  }
}

#sitemap a:hover,
#links a:hover {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}

/* ============ Footer ============ */
footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px) 48px;
}

footer section {
  margin-bottom: 16px;
}

footer section h2 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

footer section p {
  font-size: 0.88rem;
  color: var(--text-mute);
}

footer > p {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-mute);
  padding: 12px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  line-height: 1.9;
}

footer > p:first-of-type {
  border-top: none;
  margin-top: 20px;
}

/* ============ Animations ============ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

section:nth-of-type(1) { animation-delay: 0.02s; }
section:nth-of-type(2) { animation-delay: 0.05s; }
section:nth-of-type(3) { animation-delay: 0.08s; }
section:nth-of-type(4) { animation-delay: 0.11s; }
section:nth-of-type(5) { animation-delay: 0.14s; }
section:nth-of-type(6) { animation-delay: 0.17s; }

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

/* ============ Responsive ============ */
@media (min-width: 768px) {
  header {
    flex-wrap: nowrap;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  header nav {
    flex: 1 1 auto;
    order: 2;
    min-width: 0;
  }

  header nav ul {
    justify-content: flex-end;
    padding-bottom: 0;
  }
}

@media (min-width: 1024px) {
  body {
    font-size: 17px;
  }

  section {
    padding: 36px 40px;
  }

  #articles > article {
    padding: 22px 26px;
  }
}

@media (max-width: 480px) {
  :root {
    --radius: 14px;
    --radius-sm: 10px;
    --blur: 12px;
  }

  header {
    padding: 10px 14px;
  }

  .site-brand a {
    font-size: 1.15rem;
  }

  main > article {
    padding: 18px 12px 48px;
  }

  section {
    padding: 18px 16px;
  }

  section h2 {
    padding-left: 13px;
    font-size: 1.18rem;
  }

  section h2::before {
    width: 4px;
  }

  blockquote {
    padding: 16px 14px 16px 40px;
  }

  #faq h3 {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  #faq p {
    padding: 0 12px 4px;
  }

  #sitemap a,
  #links a {
    padding: 5px 11px;
    font-size: 0.8rem;
  }
}

/* ============ Print ============ */
@media print {
  header {
    position: static;
    background: none;
    border-bottom: 1px solid #ccc;
  }

  body {
    background: #fff;
    color: #000;
  }

  section {
    box-shadow: none;
    border: 1px solid #ddd;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    page-break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}