:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #22223b;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-primary: #f0f0f5;
  --text-secondary: #b8b8cc;
  --text-muted: #8888a0;
  --accent: #7c5cff;
  --accent-2: #ff4d8d;
  --accent-3: #00d4ff;
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 40%, #4a1d5c 70%, #1a1a2e 100%);
  --gradient-accent: linear-gradient(135deg, #7c5cff 0%, #ff4d8d 100%);
  --gradient-card: linear-gradient(145deg, rgba(124, 92, 255, 0.12) 0%, rgba(255, 77, 141, 0.06) 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 32px rgba(124, 92, 255, 0.25);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f5f5fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eeeef5;
    --surface: rgba(0, 0, 0, 0.03);
    --surface-hover: rgba(0, 0, 0, 0.06);
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a60;
    --text-muted: #8888a0;
    --gradient-hero: linear-gradient(135deg, #e8e4ff 0%, #f0e0f5 40%, #ffe0ec 70%, #e8e4ff 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 32px rgba(124, 92, 255, 0.12);
  }
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul, ol {
  list-style: none;
}

/* ============ Header / Nav ============ */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition), box-shadow var(--transition);
}

header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

header nav > a {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-accent);
  -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.2);
}

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

header nav ul li a {
  display: block;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--transition), background var(--transition);
}

header nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition);
}

header nav ul li a:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

header nav ul li a:hover::after {
  width: 60%;
}

/* ============ Main ============ */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ============ Breadcrumb ============ */
main > div[aria-label="面包屑导航"] {
  padding: 20px 0 8px;
}

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

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

main > div[aria-label="面包屑导航"] ol li:not(:last-child)::after {
  content: "/";
  color: var(--text-muted);
  opacity: 0.5;
}

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

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

/* ============ Hero ============ */
#hero {
  position: relative;
  margin: 16px 0 40px;
  padding: 72px 48px;
  border-radius: var(--radius-xl);
  background: var(--gradient-hero);
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: heroFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(124, 92, 255, 0.35) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 77, 141, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 60%);
  z-index: -1;
  animation: heroGlow 8s ease-in-out infinite alternate;
}

#hero::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(124, 92, 255, 0.06), transparent, rgba(255, 77, 141, 0.06), transparent);
  animation: heroRotate 20s linear infinite;
  z-index: -1;
  pointer-events: none;
}

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

@keyframes heroGlow {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

@keyframes heroRotate {
  to { transform: rotate(360deg); }
}

#hero h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #c8b8ff 50%, #ffb8d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  max-width: 900px;
}

#hero p {
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  color: var(--text-secondary);
  max-width: 780px;
  line-height: 1.85;
}

@media (prefers-color-scheme: light) {
  #hero h1 {
    background: linear-gradient(135deg, #1a1a2e 0%, #5c3d99 50%, #c2306e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

/* ============ Sections ============ */
section {
  margin-bottom: 56px;
  scroll-margin-top: 88px;
}

section > h2 {
  font-size: clamp(1.375rem, 2.5vw, 1.875rem);
  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;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: var(--gradient-accent);
  transition: width var(--transition);
}

section > h2:hover::after {
  width: 96px;
}

section h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 12px;
  letter-spacing: -0.01em;
}

section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin: 20px 0 8px;
}

section p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-size: 0.9375rem;
  line-height: 1.85;
}

section ul {
  margin: 14px 0;
  padding-left: 0;
}

section ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.75;
}

section ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-accent);
  box-shadow: 0 0 8px rgba(124, 92, 255, 0.5);
}

/* ============ Card-like sections ============ */
#about,
#products,
#services,
#scenarios,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#knowledge,
#notice,
#contact,
#sitemap,
#links,
#legal,
#author {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

#about:hover,
#products:hover,
#services:hover,
#scenarios:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#knowledge:hover,
#notice:hover,
#contact:hover,
#sitemap:hover,
#links:hover,
#legal:hover,
#author:hover {
  border-color: rgba(124, 92, 255, 0.3);
  box-shadow: var(--shadow-md), 0 0 24px rgba(124, 92, 255, 0.08);
}

/* ============ Scroll reveal animation ============ */
#about,
#products,
#services,
#scenarios,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#knowledge,
#notice,
#contact,
#sitemap,
#links,
#legal,
#author {
  animation: revealUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}

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

@supports not (animation-timeline: view()) {
  #about,
  #products,
  #services,
  #scenarios,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #knowledge,
  #notice,
  #contact,
  #sitemap,
  #links,
  #legal,
  #author {
    animation: revealUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
  }
}

/* ============ Articles ============ */
#articles article {
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  margin-bottom: 16px;
  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: 3px;
  height: 0;
  background: var(--gradient-accent);
  border-radius: 0 0 3px 0;
  transition: height var(--transition);
}

#articles article:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 92, 255, 0.35);
  box-shadow: var(--shadow-md), 0 0 20px rgba(124, 92, 255, 0.1);
  background: linear-gradient(145deg, rgba(124, 92, 255, 0.18) 0%, rgba(255, 77, 141, 0.1) 100%);
}

#articles article:hover::before {
  height: 100%;
}

#articles article h3 {
  margin-top: 0;
  font-size: 1.0625rem;
  transition: color var(--transition);
}

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

#articles article p:first-of-type {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

#articles article p:nth-of-type(2) {
  margin-bottom: 12px;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 0;
  position: relative;
}

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

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

/* ============ FAQ ============ */
#faq h3 {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-left: 3px solid var(--accent);
  cursor: default;
  transition: background var(--transition), border-color var(--transition);
  font-size: 1rem;
}

#faq h3:hover {
  background: var(--surface-hover);
  border-left-color: var(--accent-2);
}

#faq h3 + p {
  padding: 16px 20px;
  background: var(--surface);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  margin-top: 0;
  margin-bottom: 8px;
  border-left: 3px solid transparent;
  transition: background var(--transition);
}

#faq h3 + p:hover {
  background: var(--surface-hover);
}

/* ============ HowTo ============ */
#howto h4 {
  position: relative;
  padding-left: 28px;
  margin-top: 24px;
}

#howto h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gradient-accent);
  box-shadow: 0 0 12px rgba(124, 92, 255, 0.4);
}

#howto h4::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

/* ============ Contact ============ */
#contact p {
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.9375rem;
}

#contact p:last-child {
  border-bottom: none;
}

#contact p a {
  font-weight: 600;
}

/* ============ Sitemap / Links ============ */
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

#sitemap ul li,
#links ul li {
  padding-left: 0;
  margin-bottom: 0;
}

#sitemap ul li::before,
#links ul li::before {
  display: none;
}

#sitemap ul li a,
#links ul li a {
  display: block;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  font-size: 0.875rem;
  text-align: center;
  transition: all var(--transition);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  background: var(--surface-hover);
  border-color: rgba(124, 92, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.15);
}

/* ============ Legal ============ */
#legal h3 {
  color: var(--accent);
  font-size: 1rem;
}

/* ============ Author ============ */
#author p {
  padding: 8px 0;
  font-size: 0.9375rem;
}

#author p:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

/* ============ Footer ============ */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: 48px 24px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: var(--gradient-accent);
  box-shadow: 0 0 24px rgba(124, 92, 255, 0.5);
}

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

footer p:first-child {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
}

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

footer a {
  color: var(--text-muted);
  font-size: 0.8125rem;
  transition: color var(--transition);
}

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

footer p:last-child a {
  padding: 0 4px;
}

/* ============ Focus visible ============ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============ Selection ============ */
::selection {
  background: rgba(124, 92, 255, 0.35);
  color: var(--text-primary);
}

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 5px;
  border: 2px solid var(--bg-primary);
}

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

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  header nav {
    padding: 0 20px;
    min-height: 60px;
  }

  header nav ul li a {
    padding: 6px 10px;
    font-size: 0.8125rem;
  }

  main {
    padding: 0 20px 64px;
  }

  #hero {
    padding: 56px 32px;
  }
}

@media (max-width: 768px) {
  header nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    min-height: auto;
  }

  header nav > a {
    font-size: 1.125rem;
  }

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

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

  header nav ul li a {
    white-space: nowrap;
    padding: 6px 10px;
    font-size: 0.8125rem;
  }

  main {
    padding: 0 16px 48px;
  }

  #hero {
    padding: 40px 24px;
    border-radius: var(--radius-lg);
    margin: 12px 0 32px;
  }

  #hero h1 {
    font-size: clamp(1.375rem, 6vw, 1.875rem);
  }

  section {
    margin-bottom: 36px;
  }

  #about,
  #products,
  #services,
  #scenarios,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #knowledge,
  #notice,
  #contact,
  #sitemap,
  #links,
  #legal,
  #author {
    padding: 24px 20px;
    border-radius: var(--radius-md);
  }

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

  section h3 {
    font-size: 1.0625rem;
  }

  #articles article {
    padding: 20px;
  }

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

  #faq h3 + p {
    padding: 14px 16px;
  }

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

  #sitemap ul li a,
  #links ul li a {
    padding: 8px 12px;
    font-size: 0.8125rem;
  }

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

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

  #hero {
    padding: 32px 18px;
  }

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

  #about,
  #products,
  #services,
  #scenarios,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #knowledge,
  #notice,
  #contact,
  #sitemap,
  #links,
  #legal,
  #author {
    padding: 20px 16px;
  }

  section p,
  section ul li {
    font-size: 0.875rem;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(2, 1fr);
  }

  footer p:last-child {
    flex-direction: column;
    gap: 6px;
  }

  footer p:last-child a {
    padding: 4px 0;
  }
}

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

  #hero::after {
    animation: none;
  }
}

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

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

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