:root {
  --bg: #0f172a;
  --bg-soft: #111c33;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e8eefc;
  --text-soft: #a9b7d0;
  --text-muted: #7f8ea8;
  --accent: #4f8cff;
  --accent-2: #7c5cff;
  --accent-3: #22d3ee;
  --shadow: 0 18px 50px rgba(4, 10, 25, 0.45);
  --shadow-soft: 0 10px 30px rgba(4, 10, 25, 0.28);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f7fe;
    --bg-soft: #eaeffb;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: rgba(255, 255, 255, 0.88);
    --border: rgba(17, 34, 68, 0.12);
    --text: #14203a;
    --text-soft: #45557a;
    --text-muted: #6b7a99;
    --accent: #2f6bff;
    --accent-2: #6a45ff;
    --accent-3: #0ea5c4;
    --shadow: 0 18px 50px rgba(31, 56, 110, 0.16);
    --shadow-soft: 0 10px 30px rgba(31, 56, 110, 0.1);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  padding: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(79, 140, 255, 0.22), transparent 60%),
    radial-gradient(900px 480px at 92% 4%, rgba(124, 92, 255, 0.2), transparent 62%),
    radial-gradient(800px 520px at 50% 108%, rgba(34, 211, 238, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
  background-attachment: fixed;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

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

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

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

ul,
ol {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

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

h1 {
  font-size: clamp(1.75rem, 4.4vw, 2.9rem);
  line-height: 1.22;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  position: relative;
  padding-left: 16px;
}

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

h3 {
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  color: var(--text);
}

h4 {
  font-size: 1.02rem;
  color: var(--accent-3);
}

time {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

blockquote {
  margin: 0;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

blockquote:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 140, 255, 0.5);
  box-shadow: var(--shadow);
}

blockquote p {
  color: var(--text);
  font-size: 1.02rem;
}

blockquote footer {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--text-muted);
  text-align: right;
}

/* ============ 头部导航 ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.72);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 8px 30px rgba(4, 10, 25, 0.3);
}

@media (prefers-color-scheme: light) {
  header {
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 8px 30px rgba(31, 56, 110, 0.08);
  }
}

header nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

header nav > a {
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
  background: linear-gradient(92deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transition: filter 0.3s var(--ease), transform 0.3s var(--ease);
}

header nav > a:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

header nav ul li a {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-soft);
  border: 1px solid transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

header nav ul li a:hover {
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--border);
  transform: translateY(-2px);
}

/* ============ 主体布局 ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 60px;
}

main > section {
  margin: 34px 0;
  padding: 30px clamp(18px, 3vw, 34px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  opacity: 0;
  transform: translateY(26px);
  animation: rise 0.7s var(--ease) forwards;
}

main > section:hover {
  border-color: rgba(79, 140, 255, 0.34);
  box-shadow: var(--shadow);
}

main > section:nth-of-type(1) { animation-delay: 0.04s; }
main > section:nth-of-type(2) { animation-delay: 0.08s; }
main > section:nth-of-type(3) { animation-delay: 0.12s; }
main > section:nth-of-type(4) { animation-delay: 0.16s; }
main > section:nth-of-type(5) { animation-delay: 0.2s; }
main > section:nth-of-type(6) { animation-delay: 0.24s; }
main > section:nth-of-type(7) { animation-delay: 0.28s; }
main > section:nth-of-type(8) { animation-delay: 0.32s; }
main > section:nth-of-type(9) { animation-delay: 0.36s; }
main > section:nth-of-type(10) { animation-delay: 0.4s; }
main > section:nth-of-type(11) { animation-delay: 0.44s; }
main > section:nth-of-type(12) { animation-delay: 0.48s; }
main > section:nth-of-type(13) { animation-delay: 0.52s; }
main > section:nth-of-type(14) { animation-delay: 0.56s; }
main > section:nth-of-type(15) { animation-delay: 0.6s; }
main > section:nth-of-type(16) { animation-delay: 0.64s; }
main > section:nth-of-type(17) { animation-delay: 0.68s; }
main > section:nth-of-type(18) { animation-delay: 0.72s; }
main > section:nth-of-type(19) { animation-delay: 0.76s; }
main > section:nth-of-type(20) { animation-delay: 0.8s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  main > section {
    animation: none;
    opacity: 1;
    transform: none;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}

/* ============ 首屏 Banner ============ */
#hero {
  position: relative;
  margin-top: 26px;
  padding: clamp(34px, 6vw, 68px) clamp(20px, 4vw, 52px);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(700px 340px at 8% 0%, rgba(79, 140, 255, 0.5), transparent 62%),
    radial-gradient(620px 320px at 96% 10%, rgba(124, 92, 255, 0.46), transparent 60%),
    radial-gradient(560px 300px at 60% 110%, rgba(34, 211, 238, 0.34), transparent 62%),
    linear-gradient(135deg, #101a34 0%, #16224a 48%, #0e1730 100%);
  box-shadow: 0 26px 70px rgba(4, 10, 25, 0.5);
  animation-delay: 0s;
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 42%);
  pointer-events: none;
}

#hero h1 {
  position: relative;
  z-index: 1;
  color: #f4f8ff;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.35);
  max-width: 900px;
}

#hero p {
  position: relative;
  z-index: 1;
  color: rgba(230, 238, 255, 0.86);
  max-width: 860px;
  font-size: 1.02rem;
}

#hero strong {
  color: #ffffff;
  background: linear-gradient(92deg, #8ab4ff, #b79cff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#hero a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 10px 12px 0 0;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(96deg, var(--accent), var(--accent-2));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 30px rgba(79, 140, 255, 0.4);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

#hero a:last-of-type {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#hero a:hover {
  transform: translateY(-3px) scale(1.02);
  filter: brightness(1.08);
  box-shadow: 0 18px 40px rgba(79, 140, 255, 0.5);
}

/* ============ 面包屑 ============ */
main > nav[aria-label="面包屑导航"] {
  margin: 22px 0 0;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

main > nav[aria-label="面包屑导航"] ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

main > nav[aria-label="面包屑导航"] ol li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

/* ============ 卡片网格 ============ */
#products,
#advantages,
#solutions,
#applications,
#cases,
#reviews,
#knowledge,
#faq {
  display: block;
}

#products h3,
#advantages h3,
#solutions h3,
#applications h3,
#cases h3,
#knowledge h3,
#faq h3,
#howto h3,
#howto h4,
#history h3,
#culture h3,
#contact h3 {
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.32s var(--ease), border-color 0.32s var(--ease), box-shadow 0.32s var(--ease), background 0.32s var(--ease);
}

#products h3:hover,
#advantages h3:hover,
#solutions h3:hover,
#applications h3:hover,
#cases h3:hover,
#knowledge h3:hover,
#faq h3:hover,
#howto h3:hover,
#howto h4:hover,
#history h3:hover,
#culture h3:hover,
#contact h3:hover {
  transform: translateX(6px);
  border-color: rgba(79, 140, 255, 0.45);
  box-shadow: 0 10px 26px rgba(79, 140, 255, 0.16);
}

#products h3 + p,
#advantages h3 + p,
#solutions h3 + p,
#applications h3 + p,
#cases h3 + p,
#knowledge h3 + p,
#faq h3 + p,
#history h3 + p,
#culture h3 + p,
#contact h3 + p {
  padding: 0 4px;
}

/* ============ 新闻 / 文章 ============ */
#news article,
#articles article {
  position: relative;
  margin: 16px 0;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  transition: transform 0.34s var(--ease), box-shadow 0.34s var(--ease), border-color 0.34s var(--ease);
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-3));
  opacity: 0.85;
}

#news article:hover,
#articles article:hover {
  transform: translateY(-5px);
  border-color: rgba(79, 140, 255, 0.42);
  box-shadow: var(--shadow);
}

#news article h3,
#articles article h3 {
  margin: 0 0 6px;
  padding: 0;
  background: none;
  border: none;
  font-size: 1.1rem;
}

#news article h3:hover,
#articles article h3:hover {
  transform: none;
  box-shadow: none;
}

#news article a,
#articles article a {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  transition: background 0.28s var(--ease), color 0.28s var(--ease), transform 0.28s var(--ease), border-color 0.28s var(--ease);
}

#news article a:hover,
#articles article a:hover {
  background: linear-gradient(96deg, var(--accent), var(--accent-2));
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-2px);
}

/* ============ 评价 ============ */
#reviews blockquote {
  margin: 16px 0;
}

/* ============ 教程步骤 ============ */
#howto h4 {
  margin-top: 16px;
  font-size: 1rem;
}

#howto ol,
#howto ul {
  padding-left: 4px;
}

/* ============ 网站地图 / 友情链接 ============ */
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

#sitemap ul li a,
#links ul li a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.28s var(--ease), background 0.28s var(--ease), color 0.28s var(--ease), border-color 0.28s var(--ease);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  transform: translateY(-3px);
  color: var(--text);
  background: var(--surface-strong);
  border-color: rgba(79, 140, 255, 0.45);
}

/* ============ 页脚 ============ */
footer {
  margin-top: 40px;
  padding: 44px 20px 30px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.85));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

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

footer > section {
  max-width: var(--maxw);
  margin: 0 auto 26px;
  padding: 24px clamp(18px, 3vw, 30px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

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

footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

footer > p {
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

#legal h2:not(:first-child) {
  margin-top: 22px;
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  header nav {
    padding: 10px 16px;
    gap: 10px;
  }

  header nav ul {
    gap: 2px;
  }

  header nav ul li a {
    padding: 5px 9px;
    font-size: 0.82rem;
  }

  main {
    padding: 0 14px 48px;
  }

  main > section {
    padding: 24px 18px;
    border-radius: var(--radius-md);
    margin: 24px 0;
  }

  #hero {
    border-radius: 22px;
    padding: 30px 20px;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 76px;
  }

  body {
    font-size: 15px;
    line-height: 1.7;
  }

  header nav {
    flex-direction: column;
    align-items: flex-start;
  }

  header nav ul {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  header nav ul::-webkit-scrollbar {
    display: none;
  }

  header nav ul li {
    flex: 0 0 auto;
  }

  #hero a {
    display: flex;
    width: 100%;
    margin: 10px 0 0;
    justify-content: center;
  }

  #news article,
  #articles article {
    padding: 18px 16px 18px 20px;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  footer {
    padding: 30px 14px 24px;
  }

  footer > section {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }
}

/* ============ 滚动条 ============ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-2), var(--accent-3));
  background-clip: padding-box;
}

::selection {
  background: rgba(79, 140, 255, 0.35);
  color: var(--text);
}