:root {
  --bg-primary: #0d0a1a;
  --bg-secondary: #1a1033;
  --bg-card: rgba(30, 20, 60, 0.55);
  --bg-card-hover: rgba(45, 30, 90, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.06);
  --bg-glass-border: rgba(255, 255, 255, 0.12);
  --text-primary: #f0ecff;
  --text-secondary: #b8aede;
  --text-muted: #8a7fb8;
  --accent-pink: #ff6ec7;
  --accent-blue: #6ec7ff;
  --accent-purple: #a78bfa;
  --accent-cyan: #22d3ee;
  --gradient-hero: linear-gradient(135deg, #1a1033 0%, #2d1b69 35%, #4a2c8a 60%, #1a1033 100%);
  --gradient-accent: linear-gradient(135deg, #ff6ec7, #a78bfa, #6ec7ff);
  --gradient-card: linear-gradient(145deg, rgba(255, 110, 199, 0.08), rgba(110, 199, 255, 0.08));
  --gradient-btn: linear-gradient(135deg, #ff6ec7, #a78bfa);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 40px rgba(167, 139, 250, 0.15);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: "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: #f5f2ff;
    --bg-secondary: #ede8ff;
    --bg-card: rgba(255, 255, 255, 0.65);
    --bg-card-hover: rgba(255, 255, 255, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.45);
    --bg-glass-border: rgba(167, 139, 250, 0.18);
    --text-primary: #1a1033;
    --text-secondary: #4a3a7a;
    --text-muted: #7a6aa8;
    --gradient-hero: linear-gradient(135deg, #ede8ff 0%, #d8ccff 35%, #c4b0ff 60%, #ede8ff 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 110, 199, 0.06), rgba(110, 199, 255, 0.06));
    --shadow-card: 0 8px 32px rgba(100, 80, 180, 0.12);
    --shadow-glow: 0 0 40px rgba(167, 139, 250, 0.1);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(255, 110, 199, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 90%, rgba(110, 199, 255, 0.08), transparent),
    radial-gradient(ellipse 50% 60% at 50% 50%, rgba(167, 139, 250, 0.05), transparent);
  pointer-events: none;
}

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

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

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

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.75rem;
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: var(--gradient-accent);
}

h3 {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  margin-bottom: 0.75rem;
  color: var(--accent-purple);
}

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

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

time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

blockquote {
  border-left: 3px solid var(--accent-purple);
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  background: var(--bg-glass);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

blockquote p {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

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

/* ============ HEADER / NAV ============ */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 10, 26, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--bg-glass-border);
  transition: background var(--transition-smooth);
}

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

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

header nav > a {
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

header nav > a:hover {
  -webkit-text-fill-color: transparent;
  filter: brightness(1.2);
}

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

header nav ul li a {
  display: block;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

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

/* ============ BREADCRUMB ============ */
main > nav[aria-label="面包屑"] {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem 0;
}

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

main > nav[aria-label="面包屑"] ol li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

main > nav[aria-label="面包屑"] ol li a:hover {
  color: var(--accent-pink);
}

/* ============ MAIN / SECTIONS ============ */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

section {
  padding: 3rem 0;
  animation: fadeInUp 0.6s ease both;
}

section:nth-child(even) {
  animation-delay: 0.05s;
}

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

/* ============ HERO ============ */
#hero {
  position: relative;
  padding: 4rem 2.5rem;
  margin-top: 1rem;
  border-radius: var(--radius-xl);
  background: var(--gradient-hero);
  border: 1px solid var(--bg-glass-border);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

#hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 110, 199, 0.25), transparent 70%);
  filter: blur(60px);
  animation: floatGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 199, 255, 0.2), transparent 70%);
  filter: blur(60px);
  animation: floatGlow 10s ease-in-out infinite alternate-reverse;
  pointer-events: none;
}

@keyframes floatGlow {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(40px, 30px) scale(1.15);
  }
}

#hero h1 {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

#hero > p {
  position: relative;
  z-index: 1;
  max-width: 780px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

#hero figure {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-smooth);
}

#hero figure:hover {
  transform: scale(1.015);
}

#hero figure svg {
  width: 100%;
  border-radius: var(--radius-lg);
}

#hero figcaption {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--bg-glass-border);
  text-align: center;
}

/* ============ CARDS (generic section content) ============ */
#intro,
#products,
#solutions,
#cases,
#news,
#articles,
#knowledge,
#faq,
#howto,
#contact,
#sitemap,
#links {
  position: relative;
}

#products ul,
#solutions ul,
#knowledge ul,
#howto ul,
#contact ul,
#sitemap ul,
#links ul {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

#products ul li,
#solutions ul li,
#knowledge ul li,
#howto ul li {
  position: relative;
  padding: 0.85rem 1.25rem 0.85rem 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-secondary);
  transition: all var(--transition-smooth);
}

#products ul li::before,
#solutions ul li::before,
#knowledge ul li::before,
#howto ul li::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-accent);
  box-shadow: 0 0 8px rgba(255, 110, 199, 0.5);
}

#products ul li:hover,
#solutions ul li:hover,
#knowledge ul li:hover,
#howto ul li:hover {
  background: var(--bg-card-hover);
  border-color: rgba(167, 139, 250, 0.35);
  transform: translateX(4px);
  box-shadow: var(--shadow-card);
}

/* ============ NEWS & ARTICLES ============ */
#news article,
#articles article {
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all var(--transition-smooth);
}

#news article:hover,
#articles article:hover {
  background: var(--bg-card-hover);
  border-color: rgba(167, 139, 250, 0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

#news article h3,
#articles article h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

#news article:hover h3,
#articles article:hover h3 {
  color: var(--accent-pink);
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-btn);
  border-radius: 999px;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 16px rgba(255, 110, 199, 0.25);
}

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

#articles article a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 110, 199, 0.4);
  color: #fff;
}

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

/* ============ CASES ============ */
#cases h3 {
  margin-top: 1.5rem;
}

#cases h3:first-of-type {
  margin-top: 0;
}

#cases blockquote {
  margin: 1.25rem 0;
  border-left-color: var(--accent-pink);
  transition: all var(--transition-smooth);
}

#cases blockquote:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

/* ============ FAQ (DETAILS) ============ */
#faq details {
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: all var(--transition-smooth);
}

#faq details:hover {
  border-color: rgba(167, 139, 250, 0.35);
}

#faq details[open] {
  background: var(--bg-card-hover);
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: var(--shadow-card);
}

#faq summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color var(--transition-fast);
  user-select: none;
}

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

#faq summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--accent-purple);
  transition: transform var(--transition-smooth);
  flex-shrink: 0;
  line-height: 1;
}

#faq details[open] summary::after {
  transform: rotate(45deg);
}

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

#faq details p {
  padding: 0 1.25rem 1.15rem;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-secondary);
  animation: fadeInUp 0.3s ease both;
}

/* ============ HOWTO ============ */
#howto ol {
  counter-reset: howto;
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0;
}

#howto ol li {
  counter-increment: howto;
  position: relative;
  padding: 1rem 1.25rem 1rem 3.5rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-secondary);
  transition: all var(--transition-smooth);
}

#howto ol li::before {
  content: counter(howto);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-btn);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(255, 110, 199, 0.3);
}

#howto ol li:hover {
  background: var(--bg-card-hover);
  border-color: rgba(167, 139, 250, 0.35);
  transform: translateX(4px);
  box-shadow: var(--shadow-card);
}

/* ============ CONTACT ============ */
#contact ul {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

#contact ul li {
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition-smooth);
}

#contact ul li:hover {
  background: var(--bg-card-hover);
  border-color: rgba(167, 139, 250, 0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

/* ============ SITEMAP & LINKS ============ */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: #fff;
  background: var(--gradient-btn);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 110, 199, 0.3);
}

/* ============ FOOTER ============ */
footer {
  margin-top: 2rem;
  padding: 3rem 1.5rem 2rem;
  background: linear-gradient(180deg, transparent, rgba(13, 10, 26, 0.6));
  border-top: 1px solid var(--bg-glass-border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (prefers-color-scheme: light) {
  footer {
    background: linear-gradient(180deg, transparent, rgba(237, 232, 255, 0.6));
  }
}

footer > section {
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  padding: 0;
}

footer > section h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

footer > section h2::after {
  width: 32px;
  height: 2px;
}

footer > section p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

footer > p {
  max-width: var(--max-width);
  margin: 0 auto 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

footer > p a {
  color: var(--accent-purple);
}

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

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-purple), var(--accent-blue));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-pink), var(--accent-purple));
}

/* ============ SELECTION ============ */
::selection {
  background: rgba(255, 110, 199, 0.35);
  color: var(--text-primary);
}

/* ============ FOCUS VISIBLE ============ */
:focus-visible {
  outline: 2px solid var(--accent-pink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  header nav {
    padding: 0.65rem 1rem;
  }

  header nav ul {
    gap: 0.15rem;
  }

  header nav ul li a {
    padding: 0.35rem 0.55rem;
    font-size: 0.8rem;
  }

  main {
    padding: 0 1rem 3rem;
  }

  #hero {
    padding: 3rem 1.75rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

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

  header nav ul {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

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

  header nav ul li a {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.4rem 0.65rem;
  }

  main > nav[aria-label="面包屑"] {
    padding: 0.75rem 1rem 0;
  }

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

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

  section {
    padding: 2.25rem 0;
  }

  #contact ul {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  #hero {
    padding: 1.75rem 1rem;
    border-radius: var(--radius-md);
  }

  #hero h1 {
    font-size: 1.35rem;
  }

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

  #products ul li,
  #solutions ul li,
  #knowledge ul li {
    padding: 0.75rem 1rem 0.75rem 2.25rem;
    font-size: 0.875rem;
  }

  #howto ol li {
    padding: 0.85rem 1rem 0.85rem 3rem;
    font-size: 0.875rem;
  }

  #howto ol li::before {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    left: 0.75rem;
  }

  #faq summary {
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
  }

  #faq details p {
    padding: 0 1rem 1rem;
    font-size: 0.85rem;
  }

  #sitemap ul li a,
  #links ul li a {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
  }
}

/* ============ REDUCED MOTION ============ */
@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;
  }
}

/* ============ PRINT ============ */
@media print {
  header,
  footer,
  #hero::before,
  #hero::after {
    display: none;
  }

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

  section {
    animation: none;
  }
}