:root {
  --brand-primary: #6C4CF1;
  --brand-primary-dark: #4A2FD4;
  --brand-secondary: #FF4DA6;
  --brand-accent: #21D4FD;
  --brand-accent-2: #B721FF;
  --gradient-hero: linear-gradient(135deg, #6C4CF1 0%, #B721FF 45%, #FF4DA6 100%);
  --gradient-soft: linear-gradient(135deg, rgba(108, 76, 241, 0.12), rgba(255, 77, 166, 0.12));
  --bg-page: #F6F4FF;
  --bg-elevated: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.62);
  --bg-glass-strong: rgba(255, 255, 255, 0.82);
  --text-primary: #1B1533;
  --text-secondary: #4B4468;
  --text-muted: #7A7395;
  --border-soft: rgba(108, 76, 241, 0.14);
  --border-glass: rgba(255, 255, 255, 0.55);
  --shadow-sm: 0 4px 14px rgba(76, 52, 168, 0.08);
  --shadow-md: 0 12px 32px rgba(76, 52, 168, 0.12);
  --shadow-lg: 0 24px 60px rgba(76, 52, 168, 0.18);
  --shadow-glow: 0 0 0 4px rgba(108, 76, 241, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --max-width: 1180px;
  --header-h: 64px;
  --transition-fast: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: #0E0A1F;
    --bg-elevated: #171130;
    --bg-glass: rgba(30, 22, 60, 0.55);
    --bg-glass-strong: rgba(34, 26, 66, 0.82);
    --text-primary: #F1EEFF;
    --text-secondary: #C4BDE0;
    --text-muted: #8F87B0;
    --border-soft: rgba(140, 116, 255, 0.22);
    --border-glass: rgba(160, 140, 255, 0.22);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 0 4px rgba(140, 116, 255, 0.24);
    --gradient-soft: linear-gradient(135deg, rgba(108, 76, 241, 0.22), rgba(255, 77, 166, 0.18));
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-primary);
  background-color: var(--bg-page);
  background-image:
    radial-gradient(1200px 600px at 8% -8%, rgba(108, 76, 241, 0.18), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(255, 77, 166, 0.14), transparent 55%),
    radial-gradient(800px 600px at 50% 100%, rgba(33, 212, 253, 0.1), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--brand-secondary);
}

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--shadow-glow);
  border-radius: var(--radius-sm);
}

strong {
  color: var(--text-primary);
  font-weight: 700;
}

h1,
h2,
h3,
h4 {
  color: var(--text-primary);
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  font-weight: 800;
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.9rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem);
  position: relative;
  padding-bottom: 0.5em;
}

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

h3 {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  color: var(--text-primary);
}

p {
  margin: 0 0 1em;
  color: var(--text-secondary);
}

ul,
ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.45em;
}

li::marker {
  color: var(--brand-primary);
  font-weight: 700;
}

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.35em;
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--gradient-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-secondary);
  font-style: normal;
}

blockquote p {
  margin: 0.4em 0;
}

blockquote p:first-child {
  margin-top: 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

time {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-glass);
  border: 1px solid var(--border-soft);
  padding: 0.15em 0.75em;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

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

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

@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108, 76, 241, 0.35); }
  50% { box-shadow: 0 0 0 12px rgba(108, 76, 241, 0); }
}

header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
}

.brand-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem 0.35rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-bar > a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-name {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradientShift 8s ease infinite;
  transition: transform var(--transition-fast);
}

.brand-bar > a:hover .brand-name {
  transform: scale(1.04);
}

.brand-slogan {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

nav[role="navigation"] {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem 0.6rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

nav[role="navigation"]::-webkit-scrollbar {
  display: none;
}

nav[role="navigation"] ul {
  list-style: none;
  display: flex;
  gap: 0.4rem;
  margin: 0;
  padding: 0.25rem 0;
  flex-wrap: nowrap;
}

nav[role="navigation"] li {
  margin: 0;
  flex: 0 0 auto;
}

nav[role="navigation"] a {
  display: inline-block;
  padding: 0.42rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

nav[role="navigation"] a:hover {
  color: #fff;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

main > section {
  margin-bottom: 1.5rem;
  padding: 1.75rem 1.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
}

main > section::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
}

main > section:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(108, 76, 241, 0.3);
}

main > section:nth-child(1) { animation-delay: 0.02s; }
main > section:nth-child(2) { animation-delay: 0.06s; }
main > section:nth-child(3) { animation-delay: 0.1s; }
main > section:nth-child(4) { animation-delay: 0.14s; }
main > section:nth-child(5) { animation-delay: 0.18s; }
main > section:nth-child(6) { animation-delay: 0.22s; }
main > section:nth-child(7) { animation-delay: 0.26s; }
main > section:nth-child(8) { animation-delay: 0.3s; }
main > section:nth-child(9) { animation-delay: 0.34s; }
main > section:nth-child(10) { animation-delay: 0.38s; }
main > section:nth-child(11) { animation-delay: 0.42s; }
main > section:nth-child(12) { animation-delay: 0.46s; }
main > section:nth-child(13) { animation-delay: 0.5s; }
main > section:nth-child(14) { animation-delay: 0.54s; }
main > section:nth-child(15) { animation-delay: 0.58s; }

#hero {
  background: var(--gradient-hero);
  background-size: 220% 220%;
  animation: gradientShift 12s ease infinite, fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  color: #fff;
  border: none;
  padding: 2.5rem 1.75rem;
  box-shadow: 0 24px 60px rgba(108, 76, 241, 0.35);
  overflow: hidden;
}

#hero::before {
  opacity: 0.35;
}

#hero::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -60px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent 70%);
  animation: floatSoft 6s ease-in-out infinite;
  pointer-events: none;
}

#hero h1,
#hero h2 {
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

#hero h1::after {
  display: none;
}

#hero p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 72ch;
}

#hero strong {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  padding: 0.05em 0.4em;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#hero:hover {
  transform: translateY(-2px);
}

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

#hero a:hover {
  color: #FFE4F3;
}

#products ul,
#solutions ul,
#applications ul,
#news ul,
#contact ul,
#sitemap ul,
#friend-links ul,
#knowledge ul {
  list-style: none;
  padding-left: 0;
}

#products ul li,
#solutions ul li,
#applications ul li,
#news ul li,
#contact ul li,
#sitemap ul li,
#friend-links ul li,
#knowledge ul li {
  position: relative;
  padding: 0.65rem 0.9rem 0.65rem 2.1rem;
  margin-bottom: 0.6rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

#products ul li::before,
#solutions ul li::before,
#applications ul li::before,
#news ul li::before,
#contact ul li::before,
#sitemap ul li::before,
#friend-links ul li::before,
#knowledge ul li::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-hero);
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px rgba(108, 76, 241, 0.15);
}

#products ul li:hover,
#solutions ul li:hover,
#applications ul li:hover,
#news ul li:hover,
#contact ul li:hover,
#sitemap ul li:hover,
#friend-links ul li:hover,
#knowledge ul li:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  background: var(--bg-glass-strong);
}

#articles {
  display: grid;
  gap: 1rem;
}

#articles article {
  padding: 1.25rem 1.35rem;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
}

#articles article::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-hero);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

#articles article:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(108, 76, 241, 0.35);
}

#articles article:hover::after {
  opacity: 1;
}

#articles article h3 {
  margin-bottom: 0.4em;
  font-size: 1.08rem;
}

#articles article h3::before {
  content: "✦";
  color: var(--brand-secondary);
  margin-right: 0.4em;
  font-size: 0.9em;
}

#articles article p {
  margin-bottom: 0.5em;
  font-size: 0.94rem;
}

#articles article p:last-child {
  margin-bottom: 0;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.35em 0.9em;
  border-radius: var(--radius-pill);
  background: var(--gradient-soft);
  border: 1px solid var(--border-soft);
  transition: all var(--transition-fast);
}

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

#articles article a:hover {
  color: #fff;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

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

#faq h3 {
  position: relative;
  padding: 0.9rem 1rem 0.9rem 2.6rem;
  margin-bottom: 0.6rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  font-size: 1.02rem;
  cursor: default;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(108, 76, 241, 0.35);
}

#faq h3:hover {
  background: var(--bg-glass-strong);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

#faq p {
  padding: 0 0.5rem 0 2.6rem;
  margin-bottom: 1.1rem;
  font-size: 0.94rem;
  color: var(--text-secondary);
}

#howto ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 0.9rem 1rem 0.9rem 3.2rem;
  margin-bottom: 0.7rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--transition-fast);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  border-radius: 50%;
  animation: gradientShift 6s ease infinite;
  box-shadow: 0 2px 10px rgba(108, 76, 241, 0.35);
}

#howto ol li:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}

#howto h3 {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--gradient-soft);
  border: 1px solid var(--border-soft);
  font-size: 0.98rem;
  margin-top: 0.6rem;
}

#contact ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.7rem;
}

#contact ul li {
  margin-bottom: 0;
}

#contact a {
  font-weight: 700;
  word-break: break-all;
}

#sitemap ul,
#friend-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

#sitemap ul li,
#friend-links ul li {
  margin-bottom: 0;
  padding: 0.45rem 1rem 0.45rem 1.6rem;
  flex: 0 0 auto;
}

#sitemap ul li::before,
#friend-links ul li::before {
  left: 0.6rem;
  width: 6px;
  height: 6px;
}

#friend-links ul li a {
  font-weight: 700;
}

#legal h3 {
  font-size: 1.02rem;
  color: var(--brand-primary);
}

footer[role="contentinfo"] {
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  padding: 1.5rem 1.5rem;
  text-align: center;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  position: relative;
  overflow: hidden;
}

footer[role="contentinfo"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}

footer[role="contentinfo"] p {
  margin: 0.35rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

footer[role="contentinfo"] a {
  font-weight: 600;
  margin: 0 0.25rem;
}

footer[role="contentinfo"] a:hover {
  color: var(--brand-secondary);
}

@media (max-width: 900px) {
  .brand-bar {
    padding: 0.7rem 1rem 0.3rem;
  }

  .brand-slogan {
    font-size: 0.78rem;
    width: 100%;
  }

  main {
    padding: 1.1rem 0.9rem 2.5rem;
  }

  main > section {
    padding: 1.35rem 1.1rem;
    border-radius: var(--radius-md);
  }

  #hero {
    padding: 1.9rem 1.2rem;
  }

  #hero::after {
    width: 180px;
    height: 180px;
    right: -40px;
    top: -50px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
    background-attachment: scroll;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  nav[role="navigation"] ul {
    gap: 0.3rem;
  }

  nav[role="navigation"] a {
    padding: 0.38rem 0.75rem;
    font-size: 0.84rem;
  }

  main > section {
    padding: 1.2rem 0.95rem;
    margin-bottom: 1.1rem;
  }

  h2::after {
    width: 48px;
    height: 3px;
  }

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

  #faq h3 {
    padding-left: 2.4rem;
  }

  #faq p {
    padding-left: 1rem;
  }

  #howto ol li {
    padding-left: 2.9rem;
  }

  blockquote {
    padding: 0.85rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  header[role="banner"],
  footer[role="contentinfo"] {
    position: static;
  }

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

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