:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #4a90e2;
  --accent: #ff6b9d;
  --accent-2: #7c4dff;
  --accent-3: #00d4aa;
  --bg: #f5f7fb;
  --bg-alt: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #1a1d24;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --shadow-sm: 0 2px 8px rgba(26, 115, 232, 0.06);
  --shadow: 0 8px 30px rgba(26, 115, 232, 0.1);
  --shadow-lg: 0 20px 50px rgba(26, 115, 232, 0.16);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --gradient-banner: linear-gradient(135deg, #667eea 0%, #764ba2 40%, #f093fb 100%);
  --gradient-card: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(240, 147, 251, 0.08));
  --gradient-accent: linear-gradient(135deg, #ff6b9d, #7c4dff);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --max-width: 1200px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #5b9bff;
    --primary-dark: #4a90e2;
    --primary-light: #7cb3ff;
    --bg: #0d1117;
    --bg-alt: #161b22;
    --surface: rgba(22, 27, 34, 0.72);
    --surface-solid: #161b22;
    --text: #e6edf3;
    --text-secondary: #b0b8c4;
    --text-muted: #8b949e;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 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 20px 50px rgba(0, 0, 0, 0.5);
    --gradient-banner: linear-gradient(135deg, #1a1f3a 0%, #2d1b4e 40%, #3d1f3d 100%);
    --gradient-card: linear-gradient(135deg, rgba(91, 155, 255, 0.06), rgba(240, 147, 251, 0.06));
  }
}

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

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(102, 126, 234, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(240, 147, 251, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(0, 212, 170, 0.06), transparent);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

::selection {
  background: var(--primary);
  color: #fff;
}

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

body > header > div {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

body > header > div > a {
  font-size: 1.4rem;
  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;
  position: relative;
  transition: transform var(--transition);
}

body > header > div > a:hover {
  transform: scale(1.04);
}

body > header nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

body > header nav a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
}

body > header nav 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);
}

body > header nav a:hover {
  color: var(--primary);
  background: rgba(26, 115, 232, 0.06);
}

body > header nav a:hover::after {
  width: 60%;
}

/* ===== Breadcrumb ===== */
body > nav[aria-label="面包屑导航"] {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px 0;
}

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

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

body > nav[aria-label="面包屑导航"] li + li::before {
  content: "›";
  color: var(--text-muted);
  font-size: 1.1rem;
  opacity: 0.6;
}

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

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

body > nav[aria-label="面包屑导航"] li[aria-current="page"] {
  color: var(--primary);
  font-weight: 600;
}

/* ===== Main ===== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 60px;
}

section {
  margin-top: 48px;
  scroll-margin-top: 80px;
}

/* ===== Hero ===== */
#hero {
  position: relative;
  margin-top: 32px;
  padding: 64px 48px;
  border-radius: var(--radius-xl);
  background: var(--gradient-banner);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.15), transparent 40%);
  z-index: -1;
}

#hero::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
  z-index: -1;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 30px) scale(1.1); }
}

#hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
  animation: fadeUp 0.8s ease both;
}

#hero p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.92);
  max-width: 900px;
  animation: fadeUp 0.8s ease 0.15s both;
}

#hero p + p {
  margin-top: 16px;
  animation-delay: 0.3s;
}

#hero strong {
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
}

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

/* ===== Section headings ===== */
section > h2 {
  position: relative;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 24px;
  padding-left: 20px;
  line-height: 1.35;
}

section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 5px;
  border-radius: 4px;
  background: var(--gradient-accent);
}

section > h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 12px;
  line-height: 1.45;
  transition: color var(--transition);
}

section > h3:hover {
  color: var(--primary);
}

section > h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 18px;
  margin-bottom: 8px;
}

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

section > p strong {
  color: var(--text);
  font-weight: 600;
}

/* ===== Generic card-like sections ===== */
#about,
#products,
#services,
#scenarios,
#cases,
#news,
#articles,
#faq,
#howto,
#contact,
#sitemap,
#links,
#legal,
#author {
  background: var(--surface);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  animation: fadeUp 0.7s ease both;
}

#about:hover,
#products:hover,
#services:hover,
#scenarios:hover,
#cases:hover,
#news:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#contact:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

/* ===== About ===== */
#about h3 {
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

/* ===== Products ===== */
#products h3 {
  padding: 16px 20px;
  background: var(--gradient-card);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  transition: transform var(--transition), border-color var(--transition);
}

#products h3:hover {
  transform: translateX(6px);
  border-left-color: var(--accent);
}

#products h4 {
  padding-left: 20px;
  position: relative;
}

#products h4::before {
  content: "◆";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
  top: 0.35em;
}

/* ===== Services ===== */
#services h3 {
  position: relative;
  padding-left: 24px;
}

#services h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gradient-accent);
  box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.12);
}

#services h3:hover::before {
  animation: pulse 1.2s ease infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.12); }
  50% { box-shadow: 0 0 0 8px rgba(124, 77, 255, 0.05); }
}

/* ===== Scenarios ===== */
#scenarios h3 {
  padding: 14px 18px;
  background: var(--surface-solid);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

#scenarios h3:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
  color: var(--primary);
}

/* ===== Cases ===== */
#cases h3 {
  padding-left: 16px;
  border-left: 3px solid var(--accent-2);
  transition: border-color var(--transition), padding-left var(--transition);
}

#cases h3:hover {
  border-left-color: var(--accent);
  padding-left: 22px;
}

#cases p {
  position: relative;
}

#cases p:has(+ p):last-of-type,
#cases h3 + p {
  font-style: normal;
}

#cases h3 ~ p:last-of-type {
  padding: 16px 20px;
  background: var(--gradient-card);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent-3);
  color: var(--text-secondary);
  font-style: italic;
}

/* ===== News ===== */
#news ul {
  list-style: none;
  display: grid;
  gap: 12px;
}

#news li {
  padding: 16px 20px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  line-height: 1.7;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#news li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition);
}

#news li:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

#news li:hover::before {
  transform: scaleY(1);
}

#news li strong {
  color: var(--primary);
  font-weight: 700;
}

/* ===== Articles ===== */
#articles {
  display: block;
}

#articles > p {
  margin-bottom: 24px;
}

#articles article {
  padding: 24px 28px;
  margin-bottom: 20px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#articles article::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

#articles article:hover::after {
  transform: scaleX(1);
}

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

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

#articles article p:nth-of-type(1) {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

#articles article p:nth-of-type(2) {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 14px;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(26, 115, 232, 0.08);
  transition: all var(--transition);
}

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

#articles article a:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(26, 115, 232, 0.3);
}

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

/* ===== FAQ ===== */
#faq h3 {
  padding: 14px 18px;
  background: var(--gradient-card);
  border-radius: var(--radius-sm);
  font-size: 1.02rem;
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: default;
}

#faq h3:hover {
  border-color: var(--primary-light);
  transform: translateX(4px);
  color: var(--primary);
}

#faq p {
  padding: 0 18px 4px;
  margin-bottom: 16px;
  border-left: 2px solid transparent;
  transition: border-color var(--transition);
}

#faq h3:hover + p {
  border-left-color: var(--accent);
}

/* ===== HowTo ===== */
#howto ol {
  counter-reset: step;
  list-style: none;
  display: grid;
  gap: 14px;
  margin: 16px 0 24px;
}

#howto ol li {
  position: relative;
  padding: 16px 20px 16px 60px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  line-height: 1.7;
  transition: all var(--transition);
}

#howto ol li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(124, 77, 255, 0.3);
  transition: transform var(--transition);
}

#howto ol li:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

#howto ol li:hover::before {
  transform: translateY(-50%) scale(1.12) rotate(-8deg);
}

#howto h3 {
  color: var(--primary);
}

/* ===== Contact ===== */
#contact ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

#contact li {
  padding: 16px 20px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#contact li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--transition);
}

#contact li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

#contact li:hover::before {
  opacity: 1;
}

#contact > p:last-of-type {
  padding: 16px 20px;
  background: var(--gradient-card);
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Sitemap & Links ===== */
#sitemap ul,
#links ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#sitemap li,
#links li {
  margin: 0;
}

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all var(--transition);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(26, 115, 232, 0.3);
}

/* ===== Legal ===== */
#legal h3 {
  color: var(--primary);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

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

/* ===== Author ===== */
#author p {
  font-size: 0.92rem;
  color: var(--text-muted);
  padding: 12px 16px;
  background: var(--gradient-card);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-3);
}

/* ===== Footer ===== */
footer {
  margin-top: 60px;
  padding: 48px 24px 32px;
  background: var(--gradient-banner);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

footer p {
  max-width: var(--max-width);
  margin: 0 auto 10px;
  font-size: 0.88rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.82);
}

footer p:first-child {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}

footer nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

footer nav a {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  transition: all var(--transition);
}

footer nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* ===== Scroll reveal ===== */
@media (prefers-reduced-motion: no-preference) {
  section {
    animation: reveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }

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

/* ===== Responsive ===== */
@media (max-width: 900px) {
  body > header > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
  }

  body > header nav ul {
    gap: 2px;
    width: 100%;
  }

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

  #hero {
    padding: 44px 28px;
    border-radius: var(--radius-lg);
  }

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

@media (max-width: 600px) {
  html {
    scroll-padding-top: 130px;
  }

  body {
    font-size: 15px;
  }

  body > header nav ul {
    justify-content: flex-start;
  }

  body > header nav a {
    font-size: 0.78rem;
    padding: 5px 8px;
  }

  body > header > div > a {
    font-size: 1.2rem;
  }

  main {
    padding: 0 14px 40px;
  }

  section {
    margin-top: 32px;
  }

  #hero {
    padding: 36px 20px;
    margin-top: 20px;
  }

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

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

  section > h2 {
    font-size: 1.3rem;
    padding-left: 16px;
  }

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

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

  #howto ol li {
    padding: 14px 14px 14px 52px;
  }

  #howto ol li::before {
    left: 12px;
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

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

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

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

/* ===== Print ===== */
@media print {
  body > header,
  footer,
  #sitemap,
  #links {
    display: none;
  }

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

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