:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --primary-dark: #4834d4;
  --accent: #fd79a8;
  --accent-light: #fab1c4;
  --bg: #f0f2f8;
  --bg-alt: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.72);
  --card-border: rgba(255, 255, 255, 0.45);
  --text: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888a8;
  --shadow: 0 8px 32px rgba(108, 92, 231, 0.10);
  --shadow-hover: 0 16px 48px rgba(108, 92, 231, 0.20);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f1a;
    --bg-alt: #1a1a2e;
    --card-bg: rgba(30, 30, 50, 0.68);
    --card-border: rgba(255, 255, 255, 0.08);
    --text: #e8e8f0;
    --text-secondary: #b0b0c8;
    --text-muted: #7878a0;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 16px 48px rgba(108, 92, 231, 0.25);
  }
}

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

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

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

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(108, 92, 231, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(253, 121, 168, 0.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

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

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

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

ul, ol {
  list-style: none;
}

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(240, 242, 248, 0.75);
  border-bottom: 1px solid rgba(108, 92, 231, 0.08);
  transition: background var(--transition), box-shadow var(--transition);
}

@media (prefers-color-scheme: dark) {
  header {
    background: rgba(15, 15, 26, 0.78);
    border-bottom-color: rgba(255, 255, 255, 0.06);
  }
}

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

header nav > a:first-child {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

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

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);
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
}

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

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

header nav ul li a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* ===== MAIN ===== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
  position: relative;
  z-index: 1;
}

/* ===== HERO ===== */
#hero {
  position: relative;
  margin: 32px 0 48px;
  padding: 72px 48px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 30%, #fd79a8 70%, #fab1c4 100%);
  background-size: 200% 200%;
  animation: heroGradient 8s ease infinite;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(108, 92, 231, 0.30);
}

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

#hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.10), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

#hero p {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  line-height: 1.85;
  max-width: 720px;
  opacity: 0.94;
  position: relative;
  z-index: 1;
}

/* ===== BREADCRUMB ===== */
nav[aria-label="面包屑导航"] {
  margin-bottom: 40px;
}

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

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

nav[aria-label="面包屑导航"] ol li:not(:last-child)::after {
  content: "›";
  font-size: 1.1rem;
  color: var(--text-muted);
  opacity: 0.6;
}

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

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

/* ===== SECTIONS ===== */
section {
  margin-bottom: 56px;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

section > h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 28px;
  padding-bottom: 14px;
  position: relative;
  letter-spacing: -0.01em;
}

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

section > h3 {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 14px;
  padding-left: 16px;
  position: relative;
}

section > h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

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

/* ===== CARD SECTIONS ===== */
#about,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#contact,
#sitemap,
#links,
#legal {
  background: var(--card-bg);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}

#about:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#contact:hover,
#sitemap:hover,
#links:hover,
#legal:hover {
  box-shadow: var(--shadow-hover);
}

/* ===== LISTS ===== */
#products ul,
#solutions ul,
#howto ul,
#howto ol,
#news ul,
#sitemap ul,
#links ul {
  padding-left: 0;
}

#products ul li,
#solutions ul li,
#howto ul li,
#howto ol li {
  position: relative;
  padding: 10px 0 10px 28px;
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.8;
  border-bottom: 1px solid rgba(108, 92, 231, 0.06);
  transition: color var(--transition), padding-left var(--transition);
}

#products ul li:last-child,
#solutions ul li:last-child,
#howto ul li:last-child,
#howto ol li:last-child {
  border-bottom: none;
}

#products ul li::before,
#solutions ul li::before,
#howto ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 8px rgba(108, 92, 231, 0.35);
}

#howto ol {
  counter-reset: howto-counter;
}

#howto ol li {
  counter-increment: howto-counter;
  padding-left: 40px;
}

#howto ol li::before {
  content: counter(howto-counter);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.30);
}

#products ul li:hover,
#solutions ul li:hover,
#howto ul li:hover,
#howto ol li:hover {
  color: var(--text);
  padding-left: 34px;
}

#howto ol li:hover {
  padding-left: 46px;
}

/* ===== NEWS ===== */
#news ul li {
  position: relative;
  padding: 14px 0 14px 28px;
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.8;
  border-bottom: 1px solid rgba(108, 92, 231, 0.06);
  transition: all var(--transition);
}

#news ul li:last-child {
  border-bottom: none;
}

#news ul li::before {
  content: "📰";
  position: absolute;
  left: 0;
  top: 14px;
  font-size: 0.85rem;
}

#news ul li time {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(108, 92, 231, 0.08);
  padding: 2px 10px;
  border-radius: 20px;
  margin-right: 10px;
  vertical-align: middle;
}

#news ul li:hover {
  color: var(--text);
  padding-left: 34px;
}

/* ===== ARTICLES ===== */
#articles article {
  padding: 24px 0;
  border-bottom: 1px solid rgba(108, 92, 231, 0.08);
  transition: all var(--transition);
}

#articles article:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

#articles article:first-child {
  padding-top: 0;
}

#articles article h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  padding-left: 0;
  transition: color var(--transition);
}

#articles article h3::before {
  display: none;
}

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

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

#articles article p time {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

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

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

/* ===== CASES BLOCKQUOTE ===== */
#cases blockquote {
  position: relative;
  margin: 16px 0;
  padding: 20px 24px 20px 28px;
  background: rgba(108, 92, 231, 0.05);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: background var(--transition), transform var(--transition);
}

#cases blockquote:hover {
  background: rgba(108, 92, 231, 0.10);
  transform: translateX(4px);
}

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

/* ===== FAQ ===== */
#faq dl {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#faq dt {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  padding: 16px 20px 16px 44px;
  background: rgba(108, 92, 231, 0.06);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
  line-height: 1.6;
}

#faq dt::before {
  content: "Q";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

#faq dt:hover {
  background: rgba(108, 92, 231, 0.12);
}

#faq dd {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.85;
  padding: 16px 20px 16px 44px;
  background: rgba(108, 92, 231, 0.02);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border-top: 1px solid rgba(108, 92, 231, 0.06);
  position: relative;
  margin-bottom: 4px;
}

#faq dd::before {
  content: "A";
  position: absolute;
  left: 16px;
  top: 18px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(108, 92, 231, 0.15);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== CONTACT ===== */
#contact p {
  padding: 10px 0;
  border-bottom: 1px solid rgba(108, 92, 231, 0.06);
  font-size: 0.925rem;
  color: var(--text-secondary);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

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

#contact p:first-of-type {
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}

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

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

#sitemap ul li a {
  display: block;
  padding: 10px 16px;
  background: rgba(108, 92, 231, 0.06);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  transition: all var(--transition);
}

#sitemap ul li a:hover {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.30);
}

/* ===== LINKS ===== */
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

#links ul li a {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.25);
}

#links ul li a:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 28px rgba(108, 92, 231, 0.40);
  color: #fff;
}

/* ===== LEGAL ===== */
#legal h2 {
  font-size: 1.1rem;
  margin-top: 28px;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

#legal h2:first-child {
  margin-top: 0;
}

#legal h2::after {
  width: 40px;
  height: 3px;
}

#legal p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.85;
}

/* ===== FOOTER ===== */
footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 48px;
  text-align: center;
  position: relative;
  z-index: 1;
}

footer::before {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  margin: 0 auto 28px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

footer p {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 2;
}

footer p:first-child {
  font-weight: 600;
  color: var(--text-secondary);
}

/* ===== SCROLL ANIMATION ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

section {
  animation: fadeInUp 0.7s ease both;
}

section:nth-child(1) { animation-delay: 0.05s; }
section:nth-child(2) { animation-delay: 0.10s; }
section:nth-child(3) { animation-delay: 0.15s; }
section:nth-child(4) { animation-delay: 0.20s; }
section:nth-child(5) { animation-delay: 0.25s; }
section:nth-child(6) { animation-delay: 0.30s; }
section:nth-child(7) { animation-delay: 0.35s; }
section:nth-child(8) { animation-delay: 0.40s; }
section:nth-child(9) { animation-delay: 0.45s; }
section:nth-child(10) { animation-delay: 0.50s; }
section:nth-child(11) { animation-delay: 0.55s; }
section:nth-child(12) { animation-delay: 0.60s; }

#hero {
  animation: fadeInUp 0.8s ease both;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  header nav {
    flex-direction: column;
    height: auto;
    padding: 14px 20px;
    gap: 10px;
  }

  header nav ul {
    justify-content: center;
    gap: 2px;
  }

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

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

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

  section {
    margin-bottom: 36px;
  }
}

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

  main {
    padding: 0 14px 56px;
  }

  header nav {
    padding: 12px 14px;
  }

  header nav > a:first-child {
    font-size: 1.1rem;
  }

  header nav ul {
    gap: 0;
  }

  header nav ul li a {
    padding: 5px 8px;
    font-size: 0.75rem;
  }

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

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

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

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

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

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

  section > p {
    font-size: 0.875rem;
  }

  #products ul li,
  #solutions ul li,
  #howto ul li,
  #howto ol li {
    font-size: 0.85rem;
    padding: 8px 0 8px 24px;
  }

  #howto ol li {
    padding-left: 34px;
  }

  #howto ol li::before {
    width: 22px;
    height: 22px;
    font-size: 0.68rem;
  }

  #faq dt {
    font-size: 0.875rem;
    padding: 14px 16px 14px 38px;
  }

  #faq dt::before {
    left: 12px;
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
  }

  #faq dd {
    font-size: 0.825rem;
    padding: 14px 16px 14px 38px;
  }

  #faq dd::before {
    left: 12px;
    top: 16px;
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
  }

  #contact p {
    font-size: 0.85rem;
    flex-direction: column;
    gap: 2px;
  }

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

  #sitemap ul li a {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

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

  #articles article p {
    font-size: 0.825rem;
  }

  footer {
    padding: 28px 14px 36px;
  }

  footer p {
    font-size: 0.75rem;
  }
}

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

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

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

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

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

::-webkit-scrollbar-thumb {
  background: rgba(108, 92, 231, 0.25);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(108, 92, 231, 0.45);
}