:root {
  --bg: #0d0d1a;
  --bg-soft: #14142b;
  --bg-card: rgba(30, 30, 60, 0.55);
  --bg-glass: rgba(255, 255, 255, 0.06);
  --border: rgba(140, 120, 255, 0.18);
  --border-strong: rgba(140, 120, 255, 0.4);
  --text: #e8e8f5;
  --text-soft: #b4b4cc;
  --text-dim: #8a8aa8;
  --primary: #7c5cff;
  --primary-2: #b45cff;
  --accent: #22d3ee;
  --accent-2: #f472b6;
  --grad-hero: linear-gradient(135deg, #1a1a3e 0%, #2d1b5e 35%, #4a1d6e 65%, #1b2a5e 100%);
  --grad-btn: linear-gradient(135deg, #7c5cff 0%, #b45cff 50%, #f472b6 100%);
  --grad-line: linear-gradient(90deg, transparent, #7c5cff, #22d3ee, transparent);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 24px rgba(124, 92, 255, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --maxw: 1180px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 10%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(180, 92, 255, 0.1), transparent 65%);
  background-attachment: fixed;
}

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

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4 {
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  background: linear-gradient(120deg, #ffffff 0%, #c4b5fd 45%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

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

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

h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: #dcd6ff;
  margin-bottom: 0.6rem;
}

h4 {
  font-size: 1.05rem;
  color: var(--accent);
  margin: 1.2rem 0 0.6rem;
}

p {
  color: var(--text-soft);
  margin-bottom: 1rem;
}

/* ============ Header / Nav ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 26, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

header nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

header nav > a {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--grad-btn);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
  transition: filter var(--transition);
}

header nav > a:hover {
  filter: brightness(1.25);
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

header nav ul li a {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  transition: all var(--transition);
  position: relative;
}

header nav ul li a:hover {
  color: #fff;
  background: var(--bg-glass);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

/* ============ Breadcrumb ============ */
nav[aria-label="面包屑导航"] {
  max-width: var(--maxw);
  margin: 1.25rem auto 0;
  padding: 0 1.25rem;
}

nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

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

nav[aria-label="面包屑导航"] ol li + li::before {
  content: "/";
  margin-right: 0.35rem;
  color: var(--text-dim);
}

nav[aria-label="面包屑导航"] ol li:last-child {
  color: var(--text-soft);
}

/* ============ Main / Sections ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

section {
  margin-top: 3.5rem;
  animation: fadeUp 0.7s ease both;
}

section > h2 {
  margin-top: 0;
}

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

/* 通用卡片化：把 section 内容做成毛玻璃圆角卡片 */
#brand,
#products,
#solutions,
#cases,
#news,
#articles,
#knowledge,
#faq,
#howto,
#contact,
#sitemap,
#links {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem clamp(1.1rem, 3vw, 2.5rem);
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

#brand:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#knowledge:hover,
#faq:hover,
#howto:hover,
#contact:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow), var(--shadow-glow);
}

/* ============ Hero ============ */
#hero {
  margin-top: 2rem;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  border-radius: calc(var(--radius) + 8px);
  background: var(--grad-hero);
  background-size: 200% 200%;
  animation: heroShift 14s ease infinite, fadeUp 0.7s ease both;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow), 0 0 60px rgba(124, 92, 255, 0.25);
  position: relative;
  overflow: hidden;
  text-align: center;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.25), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(244, 114, 182, 0.22), transparent 45%);
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
  pointer-events: none;
}

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

#hero h1 {
  position: relative;
  margin-bottom: 1.25rem;
  text-shadow: 0 4px 30px rgba(124, 92, 255, 0.4);
}

#hero p {
  position: relative;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  color: #cfcbe8;
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
}

#hero > a {
  position: relative;
  display: inline-block;
  margin: 0.6rem 0.5rem 0;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: var(--grad-btn);
  background-size: 180% 180%;
  box-shadow: 0 6px 24px rgba(124, 92, 255, 0.5);
  transition: transform var(--transition), box-shadow var(--transition), background-position var(--transition);
}

#hero > a:nth-of-type(2) {
  background: transparent;
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#hero > a:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 34px rgba(180, 92, 255, 0.6);
  background-position: 100% 50%;
  color: #fff;
}

/* ============ Lists in products / howto ============ */
#products ul,
#howto ul,
#howto ol,
#contact ul,
#sitemap ul,
#links ul {
  margin: 0.75rem 0 1rem;
}

#products ul li,
#howto ul li,
#contact ul li,
#sitemap ul li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.75rem;
  color: var(--text-soft);
  border-bottom: 1px dashed rgba(140, 120, 255, 0.12);
  transition: color var(--transition), padding-left var(--transition);
}

#products ul li:hover,
#howto ul li:hover,
#contact ul li:hover {
  color: #fff;
  padding-left: 2rem;
}

#products ul li::before,
#howto ul li::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 1.05rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-btn);
  box-shadow: 0 0 10px rgba(124, 92, 255, 0.7);
}

#howto ol {
  counter-reset: step;
}

#howto ol li {
  position: relative;
  padding: 0.65rem 0 0.65rem 3rem;
  color: var(--text-soft);
  counter-increment: step;
  border-bottom: 1px dashed rgba(140, 120, 255, 0.12);
  transition: color var(--transition);
}

#howto ol li:hover {
  color: #fff;
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  background: var(--grad-btn);
  box-shadow: 0 0 14px rgba(124, 92, 255, 0.5);
}

/* ============ Cases / Blockquote ============ */
#cases blockquote {
  margin: 1.25rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform var(--transition), border-color var(--transition);
}

#cases blockquote:hover {
  transform: translateX(6px);
  border-left-color: var(--accent-2);
}

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

/* ============ News / Articles ============ */
#news article,
#articles article {
  position: relative;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.35rem;
  bottom: 1.35rem;
  width: 3px;
  border-radius: 3px;
  background: var(--grad-btn);
  opacity: 0;
  transition: opacity var(--transition);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 20px rgba(124, 92, 255, 0.2);
}

#news article:hover::before,
#articles article:hover::before {
  opacity: 1;
}

#news article h3,
#articles article h3 {
  margin-bottom: 0.4rem;
}

#articles article h3 a {
  color: #e6e2ff;
  transition: color var(--transition);
}

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

#news time,
#articles time {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 0.15rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid var(--border);
  margin-bottom: 0.6rem;
}

#articles article > a:last-child {
  display: inline-block;
  margin-top: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.35rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-glass);
  transition: all var(--transition);
}

#articles article > a:last-child:hover {
  background: var(--grad-btn);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

/* ============ FAQ ============ */
#faq details {
  margin-bottom: 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#faq details:hover {
  border-color: var(--border-strong);
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.18);
}

#faq details[open] {
  border-color: var(--border-strong);
  box-shadow: 0 0 24px rgba(124, 92, 255, 0.25);
}

#faq summary {
  cursor: pointer;
  padding: 1rem 1.25rem 1rem 2.75rem;
  font-weight: 600;
  color: #e6e2ff;
  position: relative;
  list-style: none;
  transition: color var(--transition), background var(--transition);
}

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

#faq summary::before {
  content: "+";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.4rem;
  height: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  background: var(--grad-btn);
  transition: transform var(--transition);
}

#faq details[open] summary::before {
  transform: translateY(-50%) rotate(45deg);
}

#faq summary:hover {
  color: #fff;
  background: rgba(124, 92, 255, 0.08);
}

#faq details p {
  padding: 0 1.25rem 1.1rem 2.75rem;
  margin: 0;
  color: var(--text-soft);
  animation: fadeIn 0.35s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ Contact / Sitemap / Links ============ */
#contact ul li {
  color: var(--text-soft);
}

#sitemap ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#sitemap ul li {
  padding: 0;
  border: none;
}

#sitemap ul li a {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: 0.88rem;
  border-radius: var(--radius-pill);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: all var(--transition);
}

#sitemap ul li a:hover {
  background: var(--grad-btn);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#links ul li a {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: 0.88rem;
  border-radius: var(--radius-pill);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: all var(--transition);
}

#links ul li a:hover {
  background: var(--grad-btn);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

/* ============ Footer ============ */
footer {
  margin-top: 2rem;
  padding: 3rem 1.25rem 2rem;
  background: linear-gradient(180deg, rgba(20, 20, 43, 0.6), rgba(10, 10, 22, 0.95));
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

footer section {
  max-width: var(--maxw);
  margin: 0 auto 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  animation: fadeUp 0.7s ease both;
  transition: border-color var(--transition);
}

footer section:hover {
  border-color: var(--border-strong);
}

footer h2 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.35rem;
}

footer h2::after {
  width: 40px;
  height: 3px;
}

footer p {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

footer > p {
  max-width: var(--maxw);
  margin: 0 auto 0.4rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
}

footer small {
  font-size: 0.82rem;
  color: var(--text-dim);
}

footer > p small {
  display: inline-block;
  padding: 0.2rem 0;
}

/* ============ Scrollbar ============ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7c5cff, #b45cff);
  border-radius: 10px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #b45cff, #f472b6);
}

/* ============ Selection / Focus ============ */
::selection {
  background: rgba(124, 92, 255, 0.45);
  color: #fff;
}

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

/* ============ Responsive ============ */
@media (max-width: 900px) {
  header nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  header nav ul {
    width: 100%;
    justify-content: flex-start;
    gap: 0.15rem;
  }

  header nav ul li a {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
  }

  #hero {
    text-align: left;
  }

  #hero p {
    margin-left: 0;
    margin-right: 0;
  }
}

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

  html {
    scroll-padding-top: 130px;
  }

  main {
    padding: 0 0.9rem 3rem;
  }

  section {
    margin-top: 2.25rem;
  }

  #brand,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #knowledge,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links {
    padding: 1.4rem 1.1rem;
    border-radius: var(--radius-sm);
  }

  #hero {
    padding: 2rem 1.25rem;
    border-radius: var(--radius);
  }

  #hero > a {
    display: block;
    margin: 0.6rem 0 0;
    text-align: center;
  }

  #news article,
  #articles article {
    padding: 1.1rem 1.1rem;
  }

  #news article::before,
  #articles article::before {
    display: none;
  }

  #faq summary {
    padding: 0.9rem 1rem 0.9rem 2.5rem;
    font-size: 0.95rem;
  }

  #faq details p {
    padding: 0 1rem 1rem 2.5rem;
  }

  footer {
    padding: 2rem 0.9rem 1.5rem;
  }

  footer section {
    padding: 1rem 1.1rem;
  }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============ Light mode support ============ */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f2fc;
    --bg-soft: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.72);
    --bg-glass: rgba(124, 92, 255, 0.06);
    --border: rgba(124, 92, 255, 0.2);
    --border-strong: rgba(124, 92, 255, 0.45);
    --text: #1a1533;
    --text-soft: #4a4468;
    --text-dim: #7a7498;
    --shadow: 0 8px 32px rgba(90, 70, 180, 0.12);
    --shadow-glow: 0 0 24px rgba(124, 92, 255, 0.22);
  }

  body {
    background-image:
      radial-gradient(ellipse 60% 40% at 15% 0%, rgba(124, 92, 255, 0.14), transparent 60%),
      radial-gradient(ellipse 50% 40% at 85% 10%, rgba(34, 211, 238, 0.12), transparent 60%),
      radial-gradient(ellipse 70% 50% at 50% 100%, rgba(180, 92, 255, 0.1), transparent 65%);
  }

  header {
    background: rgba(255, 255, 255, 0.72);
  }

  h1 {
    background: linear-gradient(120deg, #4c1d95 0%, #7c3aed 50%, #0891b2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  h3 {
    color: #3b2d6e;
  }

  #hero {
    background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 35%, #fae8ff 65%, #cffafe 100%);
    background-size: 200% 200%;
  }

  #hero h1 {
    text-shadow: 0 2px 18px rgba(124, 92, 255, 0.25);
  }

  #hero p {
    color: #4a4468;
  }

  #hero > a {
    color: #fff;
  }

  #hero > a:nth-of-type(2) {
    color: #4c1d95;
    border-color: rgba(124, 92, 255, 0.4);
  }

  #hero > a:nth-of-type(2):hover {
    color: #fff;
  }

  #products ul li:hover,
  #howto ul li:hover,
  #howto ol li:hover,
  #contact ul li:hover,
  #faq summary:hover {
    color: #1a1533;
  }

  #faq summary {
    color: #3b2d6e;
  }

  #articles article h3 a {
    color: #3b2d6e;
  }

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

  #cases blockquote p {
    color: #4a4468;
  }

  footer {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(240, 238, 252, 0.95));
  }

  ::-webkit-scrollbar-thumb {
    border-color: var(--bg);
  }
}