:root {
  --primary: #6d28d9;
  --primary-light: #8b5cf6;
  --primary-dark: #4c1d95;
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --bg-body: #f5f3ff;
  --bg-card: #ffffff;
  --bg-card-hover: #faf5ff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-border: rgba(255, 255, 255, 0.35);
  --text-primary: #1e1b4b;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(109, 40, 217, 0.06);
  --shadow-md: 0 4px 16px rgba(109, 40, 217, 0.1);
  --shadow-lg: 0 12px 40px rgba(109, 40, 217, 0.15);
  --shadow-glass: 0 8px 32px rgba(109, 40, 217, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 30%, #0f3460 60%, #6d28d9 100%);
  --gradient-accent: linear-gradient(135deg, #6d28d9 0%, #06b6d4 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(245,243,255,0.95) 100%);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --bg-glass: rgba(26, 26, 46, 0.78);
    --bg-glass-border: rgba(139, 92, 246, 0.18);
    --text-primary: #e8e6f0;
    --text-secondary: #a8a5b8;
    --text-muted: #7a7790;
    --border-color: #2d2b45;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4);
    --gradient-hero: linear-gradient(135deg, #0a0a14 0%, #12122a 30%, #1a1a3e 60%, #3b1a7a 100%);
    --gradient-card: linear-gradient(145deg, rgba(26,26,46,0.9) 0%, rgba(15,15,26,0.95) 100%);
  }
}

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

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

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

body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 20%, rgba(109, 40, 217, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: bgFloat 20s ease-in-out infinite alternate;
}

@keyframes bgFloat {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-2%, -2%) rotate(2deg); }
}

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

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

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

ul, ol {
  list-style: none;
}

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

nav[aria-label="主导航"] {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

nav[aria-label="主导航"] > a {
  font-size: 1.35rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  letter-spacing: -0.02em;
  transition: transform var(--transition-fast);
}

nav[aria-label="主导航"] > a:hover {
  transform: scale(1.04);
  -webkit-text-fill-color: transparent;
}

nav[aria-label="主导航"] > ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

nav[aria-label="主导航"] > ul > li > a {
  display: block;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

nav[aria-label="主导航"] > ul > li > a::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition-smooth);
}

nav[aria-label="主导航"] > ul > li > a:hover {
  color: var(--primary-light);
  background: rgba(109, 40, 217, 0.06);
}

nav[aria-label="主导航"] > ul > li > a:hover::after {
  width: 60%;
}

/* ============ MAIN ============ */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
  position: relative;
  z-index: 1;
}

/* ============ HERO ============ */
#hero {
  margin: 32px 0 40px;
  padding: 64px 48px;
  background: var(--gradient-hero);
  border-radius: var(--radius-xl);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: heroFadeIn 0.8s ease-out both;
}

#hero::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, transparent 70%);
  border-radius: 50%;
  animation: heroGlow 8s ease-in-out infinite alternate;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  animation: heroGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes heroGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.6; }
  100% { transform: scale(1.2) translate(-20px, 20px); opacity: 1; }
}

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

#hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

#hero p {
  font-size: 1.05rem;
  line-height: 1.9;
  opacity: 0.92;
  max-width: 820px;
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.88);
}

/* ============ BREADCRUMB ============ */
nav[aria-label="面包屑导航"] {
  margin-bottom: 32px;
  animation: fadeSlideUp 0.6s ease-out both;
}

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

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

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

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

nav[aria-label="面包屑导航"] ol li a:hover {
  color: var(--primary-light);
}

/* ============ SECTIONS ============ */
section {
  margin-bottom: 48px;
  animation: fadeSlideUp 0.6s ease-out both;
}

section:nth-child(2) { animation-delay: 0.05s; }
section:nth-child(3) { animation-delay: 0.1s; }
section:nth-child(4) { animation-delay: 0.15s; }
section:nth-child(5) { animation-delay: 0.2s; }

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

section > h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 28px;
  padding-bottom: 14px;
  position: relative;
  letter-spacing: -0.02em;
}

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

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

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

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

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

/* ============ CARDS ============ */
#about,
#products,
#advantages,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#contact,
#sitemap,
#links {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: box-shadow var(--transition-smooth), transform var(--transition-smooth), background var(--transition-smooth);
}

#about:hover,
#products:hover,
#advantages:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#contact:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ============ ADVANTAGES GRID ============ */
#advantages {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 32px;
}

#advantages > h2 {
  grid-column: 1 / -1;
}

#advantages > h3 {
  margin-top: 20px;
}

/* ============ CASES BLOCKQUOTE ============ */
#cases blockquote {
  background: var(--gradient-card);
  border-left: 4px solid var(--primary-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin: 16px 0;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

#cases blockquote:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}

#cases blockquote p {
  color: var(--text-secondary);
  font-style: italic;
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.8;
}

#cases blockquote::before {
  content: "\201C";
  position: absolute;
  top: -4px;
  left: 12px;
  font-size: 3rem;
  color: var(--primary-light);
  opacity: 0.25;
  font-family: Georgia, serif;
  line-height: 1;
}

/* ============ NEWS & ARTICLES ============ */
#news article,
#articles article {
  background: var(--bg-card-hover);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

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

#news article:hover::before,
#articles article:hover::before {
  transform: scaleY(1);
}

#news article:hover,
#articles article:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(109, 40, 217, 0.2);
}

#news article h3,
#articles article h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
  padding: 0;
  border: none;
  line-height: 1.5;
  transition: color var(--transition-fast);
}

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

#news article time,
#articles article time {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding: 2px 10px;
  background: rgba(109, 40, 217, 0.07);
  border-radius: 20px;
  font-weight: 500;
}

#news article p,
#articles article p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 8px;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  padding: 4px 0;
  transition: all var(--transition-fast);
}

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

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

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

/* ============ FAQ ============ */
#faq h3 {
  cursor: pointer;
  padding: 16px 20px;
  background: var(--bg-card-hover);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary-light);
  margin: 12px 0 0;
  font-size: 1rem;
  transition: all var(--transition-smooth);
  position: relative;
}

#faq h3::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--primary-light);
  transition: transform var(--transition-smooth);
}

#faq h3:hover {
  background: rgba(109, 40, 217, 0.06);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

#faq h3:hover::after {
  transform: translateY(-50%) rotate(90deg);
}

#faq h3 + p {
  padding: 0 20px 16px 20px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.85;
  border-left: 3px solid transparent;
}

/* ============ HOWTO ============ */
#howto h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--gradient-card);
  border-radius: var(--radius-sm);
  margin: 16px 0 8px;
  font-size: 0.95rem;
  color: var(--primary-light);
  border: 1px solid var(--border-color);
  transition: all var(--transition-smooth);
}

#howto h4:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(109, 40, 217, 0.25);
}

#howto h4::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-accent);
  flex-shrink: 0;
}

/* ============ CONTACT ============ */
#contact p {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

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

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

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 8px 18px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-smooth);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  background: var(--gradient-accent);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.3);
}

/* ============ FOOTER ============ */
footer {
  background: var(--gradient-hero);
  color: rgba(255, 255, 255, 0.85);
  padding: 48px 24px 32px;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
}

footer section {
  max-width: 1200px;
  margin: 0 auto 28px;
  animation: none;
}

footer section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}

footer section h2::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

footer section p {
  font-size: 0.85rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
  max-width: 800px;
}

footer > p {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

footer > p + p {
  border-top: none;
  padding-top: 6px;
}

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-light), var(--accent));
  border-radius: 10px;
}

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

/* ============ SELECTION ============ */
::selection {
  background: rgba(109, 40, 217, 0.25);
  color: var(--text-primary);
}

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

/* ============ RESPONSIVE - TABLET ============ */
@media (max-width: 900px) {
  nav[aria-label="主导航"] {
    height: auto;
    padding: 12px 20px;
    flex-direction: column;
    gap: 10px;
  }

  nav[aria-label="主导航"] > ul {
    justify-content: center;
    gap: 2px;
  }

  nav[aria-label="主导航"] > ul > li > a {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  main {
    padding: 0 20px 48px;
  }

  #hero {
    padding: 48px 32px;
    margin: 24px 0 32px;
  }

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

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

  #advantages {
    grid-template-columns: 1fr;
  }

  #about,
  #products,
  #advantages,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links {
    padding: 28px 24px;
  }

  section > h2 {
    font-size: 1.4rem;
  }
}

/* ============ RESPONSIVE - MOBILE ============ */
@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  nav[aria-label="主导航"] {
    padding: 10px 16px;
  }

  nav[aria-label="主导航"] > a {
    font-size: 1.15rem;
  }

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

  nav[aria-label="主导航"] > ul > li > a {
    padding: 5px 8px;
    font-size: 0.75rem;
  }

  main {
    padding: 0 16px 40px;
  }

  #hero {
    padding: 36px 24px;
    margin: 20px 0 28px;
    border-radius: var(--radius-lg);
  }

  #hero h1 {
    font-size: 1.45rem;
    line-height: 1.35;
    margin-bottom: 14px;
  }

  #hero p {
    font-size: 0.88rem;
    line-height: 1.8;
  }

  section {
    margin-bottom: 32px;
  }

  section > h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
  }

  section > h2::after {
    width: 40px;
    height: 3px;
  }

  section > h3 {
    font-size: 1.02rem;
    margin: 22px 0 10px;
    padding-left: 10px;
  }

  section > p {
    font-size: 0.88rem;
    line-height: 1.8;
  }

  #about,
  #products,
  #advantages,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links {
    padding: 22px 18px;
    border-radius: var(--radius-md);
  }

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

  #news article h3,
  #articles article h3 {
    font-size: 0.95rem;
  }

  #faq h3 {
    padding: 12px 16px;
    font-size: 0.92rem;
  }

  #faq h3::after {
    right: 14px;
    font-size: 1.1rem;
  }

  #faq h3 + p {
    padding: 0 16px 12px 16px;
    font-size: 0.85rem;
  }

  #howto h4 {
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  #sitemap ul li a,
  #links ul li a {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

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

  footer section h2 {
    font-size: 1rem;
  }

  footer section p {
    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,
  nav[aria-label="面包屑导航"],
  #sitemap,
  #links {
    display: none;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 12pt;
  }

  #hero {
    background: none;
    color: #000000;
    padding: 0;
    margin: 0 0 20px;
    box-shadow: none;
  }

  #hero h1 {
    color: #000000;
    text-shadow: none;
  }

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

  a {
    color: #000000;
    text-decoration: underline;
  }
}