:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #4a90e2;
  --accent: #ff6b9d;
  --accent-2: #7c4dff;
  --gradient-1: linear-gradient(135deg, #1a73e8 0%, #7c4dff 50%, #ff6b9d 100%);
  --gradient-2: linear-gradient(120deg, #0d47a1 0%, #1a73e8 40%, #4a90e2 70%, #7c4dff 100%);
  --gradient-banner: linear-gradient(135deg, #0a2540 0%, #1a73e8 35%, #7c4dff 70%, #ff6b9d 100%);
  --bg: #f5f7fb;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.65);
  --bg-glass-strong: rgba(255, 255, 255, 0.82);
  --text: #1a2332;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: rgba(26, 115, 232, 0.12);
  --border-glass: rgba(255, 255, 255, 0.5);
  --shadow-sm: 0 2px 8px rgba(26, 35, 50, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 35, 50, 0.1);
  --shadow-lg: 0 16px 48px rgba(26, 35, 50, 0.14);
  --shadow-glow: 0 8px 32px rgba(26, 115, 232, 0.25);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --header-h: 68px;
  --transition: cubic-bezier(0.4, 0, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --bg-elevated: #131c2e;
    --bg-glass: rgba(19, 28, 46, 0.65);
    --bg-glass-strong: rgba(19, 28, 46, 0.85);
    --text: #e8edf5;
    --text-secondary: #a8b4c8;
    --text-muted: #6b7a91;
    --border: rgba(74, 144, 226, 0.18);
    --border-glass: rgba(255, 255, 255, 0.08);
    --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 8px 32px rgba(74, 144, 226, 0.3);
  }
}

*,
*::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(ellipse 80% 50% at 20% -10%, rgba(26, 115, 232, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(124, 77, 255, 0.07), transparent);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

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

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

ul,
ol {
  list-style: none;
}

/* ============ Header ============ */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass-strong);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
  transition: background 0.3s var(--transition), box-shadow 0.3s var(--transition);
}

header[role="banner"] nav[aria-label="主导航"] {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

header[role="banner"] nav[aria-label="主导航"] > a {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
  background: var(--gradient-1);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transition: background-position 0.5s var(--transition), transform 0.3s var(--transition);
}

header[role="banner"] nav[aria-label="主导航"] > a:hover {
  background-position: right center;
  transform: scale(1.03);
}

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

header[role="banner"] nav[aria-label="主导航"] > ul li a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 999px;
  position: relative;
  transition: color 0.25s var(--transition), background 0.25s var(--transition), transform 0.25s var(--transition);
}

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

header[role="banner"] nav[aria-label="主导航"] > ul li a:hover {
  color: var(--primary);
  background: rgba(26, 115, 232, 0.08);
  transform: translateY(-1px);
}

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

/* Breadcrumb */
header[role="banner"] nav[aria-label="面包屑导航"] {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  border-top: 1px solid var(--border);
}

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

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

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

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

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

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

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

/* Hero / H1 Banner */
main > h1 {
  position: relative;
  margin: 40px 0 24px;
  padding: 64px 48px;
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: #fff;
  text-align: center;
  border-radius: var(--radius-xl);
  background: var(--gradient-banner);
  background-size: 200% 200%;
  box-shadow: var(--shadow-glow);
  overflow: hidden;
  animation: gradientShift 12s ease infinite;
  isolation: isolate;
}

main > h1::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.12), transparent 50%);
  z-index: -1;
}

main > h1::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%);
  animation: shimmer 6s linear infinite;
  z-index: -1;
}

main > h1 + p {
  max-width: 900px;
  margin: 0 auto 56px;
  padding: 28px 32px;
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--text-secondary);
  text-align: left;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ============ Sections ============ */
main > section {
  margin-bottom: 56px;
  padding: 40px 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--transition), transform 0.4s var(--transition), border-color 0.4s var(--transition);
  animation: fadeUp 0.7s var(--transition) both;
}

main > section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(26, 115, 232, 0.25);
  transform: translateY(-2px);
}

main > section:nth-of-type(2) { animation-delay: 0.05s; }
main > section:nth-of-type(3) { animation-delay: 0.1s; }
main > section:nth-of-type(4) { animation-delay: 0.15s; }
main > section:nth-of-type(5) { animation-delay: 0.2s; }
main > section:nth-of-type(6) { animation-delay: 0.25s; }
main > section:nth-of-type(7) { animation-delay: 0.3s; }
main > section:nth-of-type(8) { animation-delay: 0.35s; }

main > section h2 {
  position: relative;
  margin-bottom: 28px;
  padding-bottom: 16px;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
  line-height: 1.3;
}

main > section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: var(--gradient-1);
  background-size: 200% auto;
  animation: gradientShift 6s ease infinite;
}

main > section h3 {
  margin: 28px 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}

main > section h3:first-of-type {
  margin-top: 0;
}

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

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

main > section p:last-child {
  margin-bottom: 0;
}

/* ============ Products / Feature Cards ============ */
#products h4 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(26, 115, 232, 0.08);
  border-radius: 999px;
  font-size: 0.92rem;
}

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

#products h4 + p {
  margin-left: 4px;
  padding: 12px 16px;
  background: var(--bg-glass);
  border-left: 3px solid var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ============ News Articles ============ */
#news article {
  position: relative;
  margin-bottom: 18px;
  padding: 24px 26px;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.35s var(--transition), box-shadow 0.35s var(--transition), border-color 0.35s var(--transition);
  overflow: hidden;
}

#news article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-1);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--transition);
}

#news article:hover {
  transform: translateY(-4px) translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(26, 115, 232, 0.3);
}

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

#news article h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
  transition: color 0.25s var(--transition);
}

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

#news article p {
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

#news article p:first-of-type {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.78rem;
  color: var(--primary);
  background: rgba(26, 115, 232, 0.08);
  border-radius: 999px;
  margin-bottom: 10px;
}

#news article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

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

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

/* ============ HowTo ============ */
#howto h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

#howto h3::before {
  counter-increment: howto-step;
  content: counter(howto-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-1);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

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

#howto h3 + p {
  padding-left: 38px;
  color: var(--text-secondary);
}

/* ============ FAQ ============ */
#faq {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: start;
}

#faq h2 {
  grid-column: 1 / -1;
}

#faq h3 {
  position: relative;
  margin: 0;
  padding: 18px 20px 18px 48px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: default;
  transition: background 0.3s var(--transition), border-color 0.3s var(--transition), transform 0.3s var(--transition), box-shadow 0.3s var(--transition);
}

#faq h3::before {
  content: "?";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  background: var(--gradient-1);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(26, 115, 232, 0.3);
}

#faq h3:hover {
  background: var(--bg-glass-strong);
  border-color: rgba(26, 115, 232, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

#faq h3 + p {
  margin: 0 0 4px;
  padding: 14px 20px 14px 48px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: transparent;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border: 1px solid transparent;
  border-top: none;
}

/* ============ Contact ============ */
#contact {
  background: var(--gradient-banner);
  background-size: 200% 200%;
  animation: gradientShift 14s ease infinite;
  color: #fff;
  border: none;
  position: relative;
  overflow: hidden;
}

#contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15), transparent 50%);
  pointer-events: none;
}

#contact h2 {
  color: #fff;
  position: relative;
}

#contact h2::after {
  background: rgba(255, 255, 255, 0.9);
}

#contact p {
  position: relative;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
}

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

#contact p a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#contact p a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ============ 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;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.3s var(--transition);
}

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

/* ============ Legal ============ */
#legal {
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

#legal p {
  padding: 12px 16px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: rgba(26, 115, 232, 0.04);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary-light);
}

/* ============ Footer ============ */
footer {
  position: relative;
  padding: 48px 24px 40px;
  text-align: center;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

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

footer p {
  max-width: 1200px;
  margin: 0 auto 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

footer p:first-child {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* ============ Animations ============ */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%) rotate(0deg); }
  100% { transform: translateX(100%) rotate(0deg); }
}

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

/* ============ Scroll Reveal (progressive enhancement) ============ */
@supports (animation-timeline: view()) {
  main > section {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  header[role="banner"] nav[aria-label="主导航"] {
    gap: 20px;
    padding: 0 18px;
  }

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

  main {
    padding: 0 18px 64px;
  }

  main > section {
    padding: 32px 26px;
  }

  main > h1 {
    padding: 52px 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }

  header[role="banner"] nav[aria-label="主导航"] {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--header-h);
    padding: 12px 16px;
    gap: 10px;
  }

  header[role="banner"] nav[aria-label="主导航"] > ul {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  header[role="banner"] nav[aria-label="主导航"] > ul::-webkit-scrollbar {
    display: none;
  }

  header[role="banner"] nav[aria-label="主导航"] > ul li a {
    white-space: nowrap;
    padding: 6px 12px;
  }

  header[role="banner"] nav[aria-label="面包屑导航"] {
    padding: 8px 16px;
  }

  main {
    padding: 0 14px 56px;
  }

  main > h1 {
    margin: 24px 0 18px;
    padding: 40px 22px;
    border-radius: var(--radius-lg);
    font-size: clamp(1.4rem, 6vw, 2rem);
  }

  main > h1 + p {
    margin-bottom: 36px;
    padding: 20px 20px;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
  }

  main > section {
    padding: 26px 20px;
    margin-bottom: 32px;
    border-radius: var(--radius-md);
  }

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

  #faq {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

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

  #news article {
    padding: 18px 18px;
  }

  #news article h3 {
    font-size: 1rem;
  }

  #contact p {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.92rem;
  }

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

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

@media (max-width: 480px) {
  main > h1 {
    padding: 32px 16px;
    letter-spacing: -0.2px;
  }

  main > section {
    padding: 22px 16px;
  }

  main > section h3 {
    font-size: 1.02rem;
  }

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

  #news article p:first-of-type {
    font-size: 0.74rem;
  }
}

/* ============ 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[role="banner"],
  footer,
  #contact {
    display: none;
  }

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

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