:root {
  --bg-primary: #0d0d1a;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --bg-card: rgba(26, 26, 46, 0.72);
  --bg-card-hover: rgba(34, 34, 60, 0.9);
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text-primary: #f0f0f5;
  --text-secondary: #b8b8cc;
  --text-muted: #7a7a94;
  --accent: #e94560;
  --accent-2: #7b5ea7;
  --accent-3: #0f9bd7;
  --accent-glow: rgba(233, 69, 96, 0.35);
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #e94560 100%);
  --gradient-accent: linear-gradient(135deg, #e94560 0%, #7b5ea7 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 16px 48px rgba(233, 69, 96, 0.18);
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  --font-stack: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f5f6fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef0f7;
    --bg-card: rgba(255, 255, 255, 0.78);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(26, 26, 46, 0.08);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a66;
    --text-muted: #8a8aa0;
    --accent: #d63354;
    --accent-2: #6a4d9e;
    --accent-3: #0a7fb8;
    --accent-glow: rgba(214, 51, 84, 0.22);
    --gradient-hero: linear-gradient(135deg, #eef0f7 0%, #dce3f5 40%, #c3d4f0 70%, #f0c4d0 100%);
    --shadow-card: 0 8px 32px rgba(26, 26, 46, 0.08);
    --shadow-hover: 0 16px 48px rgba(214, 51, 84, 0.15);
  }
}

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

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

body {
  font-family: var(--font-stack);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(123, 94, 167, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(233, 69, 96, 0.12), transparent),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(15, 155, 215, 0.08), transparent);
  background-attachment: fixed;
  transition: background-color var(--transition), color var(--transition);
}

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

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

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

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

ul {
  list-style: none;
}

/* ============ 头部导航 ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.brand-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 24px 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-logo {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  position: relative;
  padding-right: 4px;
}

.brand-logo::after {
  content: "";
  position: absolute;
  inset: auto 0 -4px 0;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--gradient-accent);
  opacity: 0.7;
}

.brand-slogan {
  font-size: 0.9rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  font-weight: 500;
}

nav[aria-label="主导航"] {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 14px;
}

nav[aria-label="主导航"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

nav[aria-label="主导航"] a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

nav[aria-label="主导航"] a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
  z-index: -1;
}

nav[aria-label="主导航"] a:hover,
nav[aria-label="主导航"] a:focus-visible {
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

nav[aria-label="主导航"] a:hover::before,
nav[aria-label="主导航"] a:focus-visible::before {
  opacity: 1;
}

/* ============ 主内容区 ============ */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 64px;
}

section {
  margin-top: 56px;
  scroll-margin-top: 96px;
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
  padding-bottom: 14px;
  position: relative;
  color: var(--text-primary);
}

section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--gradient-accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 12px;
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}

section h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  bottom: 0.28em;
  width: 4px;
  border-radius: var(--radius-pill);
  background: var(--gradient-accent);
}

section p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-size: 0.98rem;
  text-align: justify;
}

/* ============ Hero 区域 ============ */
#hero {
  margin-top: 32px;
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: gradientShift 14s ease infinite;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card);
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12), transparent 50%);
  pointer-events: none;
}

#hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
  color: var(--text-primary);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  position: relative;
}

#hero > p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 760px;
  position: relative;
}

.hero-banner {
  margin-top: 28px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.hero-banner:hover {
  transform: scale(1.012);
  box-shadow: 0 20px 56px var(--accent-glow);
}

.hero-banner svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ============ 卡片通用样式 ============ */
#about,
#products,
#solutions,
#cases,
#news,
#knowledge,
#howto,
#contact,
#privacy,
#disclaimer {
  background: var(--bg-card);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

#about:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#knowledge:hover,
#howto:hover,
#contact:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(233, 69, 96, 0.28);
}

/* ============ 文章区域 ============ */
#articles > p {
  margin-bottom: 28px;
  padding: 14px 20px;
  background: var(--glass-bg);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

#articles {
  display: block;
}

#articles article {
  background: var(--bg-card);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

#articles article:hover {
  transform: translateY(-4px) translateX(2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(233, 69, 96, 0.32);
  background: var(--bg-card-hover);
}

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

#articles article h3 {
  margin-top: 0;
  font-size: 1.12rem;
  padding-left: 0;
  margin-bottom: 10px;
}

#articles article h3::before {
  display: none;
}

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

#articles article > p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
  display: inline-block;
  padding: 2px 12px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

#articles article > p {
  color: var(--text-secondary);
  font-size: 0.94rem;
  margin-bottom: 14px;
}

#articles article > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(233, 69, 96, 0.4);
  background: rgba(233, 69, 96, 0.08);
  transition: all var(--transition);
}

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

#articles article > a:hover {
  background: var(--gradient-accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px var(--accent-glow);
  transform: translateY(-2px);
}

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

/* ============ FAQ 区域 ============ */
#faq {
  background: var(--bg-card);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
}

#faq h3 {
  margin-top: 20px;
  padding: 16px 20px 16px 44px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-size: 1.02rem;
  position: relative;
  transition: background var(--transition), color var(--transition);
  cursor: default;
}

#faq h3::before {
  content: "?";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 8px var(--accent-glow);
}

#faq h3:hover {
  background: var(--bg-card-hover);
  color: var(--accent);
}

#faq h3 + p {
  margin: 0 0 8px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 0.94rem;
  transition: border-color var(--transition);
}

#faq h3 + p:hover {
  border-color: rgba(233, 69, 96, 0.24);
}

/* ============ 网站地图 & 友情链接 ============ */
#sitemap,
#links {
  background: var(--bg-card);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
}

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

#sitemap li,
#links li {
  list-style: none;
}

#sitemap a,
#links a {
  display: block;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#sitemap a::before,
#links a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 0;
}

#sitemap a span,
#links a span {
  position: relative;
  z-index: 1;
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

#sitemap a:hover::before,
#links a:hover::before {
  opacity: 1;
}

/* ============ 页脚 ============ */
footer {
  margin-top: 48px;
  padding: 48px 24px 40px;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--glass-border);
  text-align: center;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, 80%);
  height: 2px;
  background: var(--gradient-accent);
  border-radius: var(--radius-pill);
  opacity: 0.6;
}

footer p {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin-bottom: 8px;
  line-height: 1.7;
}

footer p:first-child {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 12px;
}

footer a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition);
}

footer a:hover {
  color: var(--accent);
}

footer p:last-child {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* ============ 响应式布局 ============ */
@media (max-width: 900px) {
  :root {
    --max-width: 100%;
  }

  .brand-bar {
    padding: 14px 18px 10px;
    gap: 10px;
  }

  .brand-logo {
    font-size: 1.35rem;
  }

  .brand-slogan {
    font-size: 0.8rem;
  }

  nav[aria-label="主导航"] {
    padding: 0 18px 12px;
  }

  nav[aria-label="主导航"] ul {
    gap: 4px;
  }

  nav[aria-label="主导航"] a {
    padding: 7px 12px;
    font-size: 0.84rem;
  }

  main {
    padding: 0 16px 48px;
  }

  section {
    margin-top: 40px;
  }

  #hero {
    padding: 28px 22px;
    margin-top: 24px;
  }

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #knowledge,
  #howto,
  #contact,
  #privacy,
  #disclaimer,
  #faq,
  #sitemap,
  #links {
    padding: 26px 20px;
  }

  #articles article {
    padding: 20px 20px;
  }

  section h3 {
    font-size: 1.05rem;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .brand-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  nav[aria-label="主导航"] ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  nav[aria-label="主导航"] ul::-webkit-scrollbar {
    display: none;
  }

  nav[aria-label="主导航"] a {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 7px 14px;
    font-size: 0.82rem;
  }

  #hero {
    padding: 24px 18px;
    border-radius: var(--radius-md);
  }

  #hero h1 {
    font-size: 1.45rem;
    line-height: 1.4;
  }

  #hero > p {
    font-size: 0.92rem;
  }

  section h2 {
    font-size: 1.3rem;
    margin-bottom: 18px;
  }

  section h2::after {
    width: 48px;
    height: 3px;
  }

  section p {
    font-size: 0.92rem;
    text-align: left;
  }

  #articles article {
    padding: 18px 16px;
  }

  #articles article h3 {
    font-size: 1rem;
  }

  #articles article > p {
    font-size: 0.88rem;
  }

  #faq h3 {
    padding: 14px 16px 14px 40px;
    font-size: 0.95rem;
  }

  #faq h3 + p {
    padding: 14px 16px;
    font-size: 0.88rem;
  }

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

  #sitemap a,
  #links a {
    padding: 10px 12px;
    font-size: 0.84rem;
  }

  footer {
    padding: 36px 16px 32px;
  }

  footer p {
    font-size: 0.8rem;
  }
}

/* ============ 滚动动画 (渐进增强) ============ */
@supports (animation-timeline: view()) {
  section {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }

  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ============ 减少动画偏好 ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  #hero {
    animation: none;
  }
}

/* ============ 打印样式 ============ */
@media print {
  header,
  footer,
  nav,
  .hero-banner {
    display: none;
  }

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

  section {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}