:root {
  --primary: #6c5ce7;
  --primary-dark: #5a4bd4;
  --primary-light: #a29bfe;
  --accent: #fd79a8;
  --accent-2: #00cec9;
  --gradient-1: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #fd79a8 100%);
  --gradient-2: linear-gradient(120deg, #6c5ce7 0%, #00cec9 100%);
  --gradient-3: linear-gradient(135deg, #fd79a8 0%, #6c5ce7 100%);
  --bg: #f7f7fc;
  --bg-alt: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.65);
  --bg-glass-strong: rgba(255, 255, 255, 0.85);
  --text: #2d3436;
  --text-soft: #636e72;
  --text-light: #b2bec3;
  --border: rgba(108, 92, 231, 0.12);
  --shadow-sm: 0 2px 8px rgba(108, 92, 231, 0.08);
  --shadow: 0 8px 30px rgba(108, 92, 231, 0.12);
  --shadow-lg: 0 16px 50px rgba(108, 92, 231, 0.18);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e17;
    --bg-alt: #1a1927;
    --bg-glass: rgba(26, 25, 39, 0.65);
    --bg-glass-strong: rgba(26, 25, 39, 0.9);
    --text: #f0eef9;
    --text-soft: #a8a6bd;
    --text-light: #6b6980;
    --border: rgba(162, 155, 254, 0.16);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 50px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 10% 0%, rgba(108, 92, 231, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(253, 121, 168, 0.07) 0%, transparent 35%),
    radial-gradient(circle at 50% 100%, rgba(0, 206, 201, 0.06) 0%, transparent 40%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

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

ul,
ol {
  list-style: none;
}

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

header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

header nav > a[aria-label] {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
  padding: 8px 0;
  transition: transform 0.3s var(--ease);
}

header nav > a[aria-label]:hover {
  transform: scale(1.04);
}

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

header nav ul li a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: var(--radius-full);
  position: relative;
  transition: all 0.3s var(--ease);
}

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

header nav ul li a:hover {
  color: var(--primary);
  background: rgba(108, 92, 231, 0.08);
  transform: translateY(-1px);
}

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

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

/* ============ Breadcrumb ============ */
main > nav[aria-label="面包屑导航"] {
  margin-bottom: 20px;
}

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

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

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

main > nav[aria-label="面包屑导航"] ol li a {
  color: var(--text-soft);
  padding: 2px 4px;
  border-radius: 4px;
}

main > nav[aria-label="面包屑导航"] ol li a:hover {
  color: var(--primary);
  background: rgba(108, 92, 231, 0.08);
}

/* ============ Sections ============ */
section {
  margin-bottom: 56px;
  animation: fadeUp 0.8s var(--ease) both;
}

section:nth-of-type(1) { animation-delay: 0.05s; }
section:nth-of-type(2) { animation-delay: 0.1s; }
section:nth-of-type(3) { animation-delay: 0.15s; }
section:nth-of-type(4) { animation-delay: 0.2s; }
section:nth-of-type(5) { animation-delay: 0.25s; }
section:nth-of-type(6) { animation-delay: 0.3s; }
section:nth-of-type(7) { animation-delay: 0.35s; }
section:nth-of-type(8) { animation-delay: 0.4s; }
section:nth-of-type(9) { animation-delay: 0.45s; }
section:nth-of-type(10) { animation-delay: 0.5s; }
section:nth-of-type(11) { animation-delay: 0.55s; }
section:nth-of-type(12) { animation-delay: 0.6s; }
section:nth-of-type(13) { animation-delay: 0.65s; }
section:nth-of-type(14) { animation-delay: 0.7s; }
section:nth-of-type(15) { animation-delay: 0.75s; }

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

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

/* ============ Headings ============ */
h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  line-height: 1.4;
  font-weight: 700;
  margin-bottom: 20px;
  padding-left: 16px;
  position: relative;
  color: var(--text);
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  border-radius: var(--radius-full);
  background: var(--gradient-1);
}

h3 {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.5;
  margin: 28px 0 12px;
  color: var(--text);
}

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

p {
  margin-bottom: 14px;
  color: var(--text-soft);
}

/* ============ Hero ============ */
#hero {
  position: relative;
  padding: 56px 40px;
  border-radius: var(--radius-lg);
  background: var(--gradient-1);
  background-size: 200% 200%;
  animation: shimmer 12s ease infinite, floatIn 0.9s var(--ease) both;
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 56px;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.25) 0%, transparent 40%),
    radial-gradient(circle at 15% 90%, rgba(255, 255, 255, 0.15) 0%, transparent 45%);
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

#hero h1 {
  position: relative;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
  z-index: 1;
}

#hero p {
  position: relative;
  color: rgba(255, 255, 255, 0.92);
  max-width: 820px;
  z-index: 1;
  font-size: 1.02rem;
}

#hero p a {
  color: #fff;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.3s var(--ease);
  display: inline-block;
}

#hero p a:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  color: #fff;
}

/* ============ Cards: content sections ============ */
#intro,
#industry,
#products,
#features,
#solutions,
#cases,
#testimonials,
#news,
#articles,
#howto,
#knowledge,
#faq,
#contact,
#sitemap,
#links {
  background: var(--bg-glass-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 32px;
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

#intro:hover,
#industry:hover,
#products:hover,
#features:hover,
#solutions:hover,
#cases:hover,
#testimonials:hover,
#news:hover,
#articles:hover,
#howto:hover,
#knowledge:hover,
#faq:hover,
#contact:hover,
#sitemap:hover,
#links:hover {
  box-shadow: var(--shadow-lg);
}

/* ============ News / Articles cards ============ */
#news article,
#articles article {
  padding: 20px 22px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-1);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(108, 92, 231, 0.3);
}

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

#news article h3,
#articles article h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.08rem;
  line-height: 1.5;
  transition: color 0.3s var(--ease);
}

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

#news article time,
#articles article time {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-light);
  padding: 2px 10px;
  background: rgba(108, 92, 231, 0.08);
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(108, 92, 231, 0.1);
  transition: all 0.3s var(--ease);
}

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

#articles article a:hover {
  background: var(--gradient-1);
  color: #fff;
  transform: translateX(2px);
}

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

/* ============ Testimonials ============ */
#testimonials blockquote {
  position: relative;
  margin-bottom: 16px;
  padding: 20px 24px 20px 56px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#testimonials blockquote::before {
  content: "\201C";
  position: absolute;
  left: 18px;
  top: 6px;
  font-size: 3rem;
  line-height: 1;
  font-family: Georgia, serif;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

#testimonials blockquote:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

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

/* ============ Lists ============ */
#contact ul,
#sitemap ul,
#links ul {
  display: grid;
  gap: 10px;
}

#contact ul li {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact ul li:hover {
  transform: translateX(4px);
  border-color: var(--primary-light);
}

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

#sitemap ul li a {
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-soft);
  transition: all 0.3s var(--ease);
}

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

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

#links ul li a {
  display: block;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-weight: 500;
  text-align: center;
  transition: all 0.35s var(--ease);
}

#links ul li a:hover {
  background: var(--gradient-2);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow);
}

/* ============ FAQ ============ */
#faq h3 {
  padding: 14px 18px;
  margin: 0 0 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-bottom: none;
  font-size: 1rem;
  color: var(--text);
  cursor: default;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

#faq h3 + p {
  margin: 0 0 14px;
  padding: 14px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-top: none;
  font-size: 0.95rem;
  transition: background 0.3s var(--ease);
}

#faq h3:hover {
  color: var(--primary);
  background: rgba(108, 92, 231, 0.06);
}

#faq h3:hover + p {
  background: rgba(108, 92, 231, 0.04);
}

/* ============ Footer ============ */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 48px 20px 32px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-1);
  background-size: 200% 100%;
  animation: shimmer 8s linear infinite;
}

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

footer h2 {
  font-size: 1.1rem;
  padding-left: 14px;
  margin-bottom: 12px;
}

footer h2::before {
  width: 3px;
}

footer p {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.8;
}

#meta-info {
  text-align: center;
  padding-top: 24px;
  border-top: 1px dashed var(--border);
  margin-bottom: 0;
}

#meta-info p {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 6px;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  header nav {
    padding: 10px 16px;
    gap: 8px;
  }

  header nav ul {
    gap: 2px;
  }

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

  main {
    padding: 20px 16px 60px;
  }

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

  #intro,
  #industry,
  #products,
  #features,
  #solutions,
  #cases,
  #testimonials,
  #news,
  #articles,
  #howto,
  #knowledge,
  #faq,
  #contact,
  #sitemap,
  #links {
    padding: 24px 20px;
    border-radius: var(--radius);
  }

  section {
    margin-bottom: 40px;
  }
}

@media (max-width: 600px) {
  :root {
    --header-h: auto;
  }

  header nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
  }

  header nav > a[aria-label] {
    font-size: 1.15rem;
  }

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

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

  header nav ul li a {
    white-space: nowrap;
  }

  #hero {
    padding: 32px 20px;
  }

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

  h2 {
    padding-left: 14px;
    margin-bottom: 16px;
  }

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

  #testimonials blockquote {
    padding: 18px 18px 18px 46px;
  }

  #testimonials blockquote::before {
    left: 14px;
    font-size: 2.4rem;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr 1fr;
  }

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

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

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

@media (max-width: 380px) {
  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr;
  }
}

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

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

::selection {
  background: rgba(108, 92, 231, 0.25);
  color: var(--text);
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}
</style>