:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: rgba(30, 30, 50, 0.6);
  --bg-card-hover: rgba(40, 40, 65, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(120, 130, 255, 0.4);
  --text-primary: #eef0f6;
  --text-secondary: #a8adc0;
  --text-muted: #6c7190;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-secondary: #00cec9;
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 30%, #0f3460 60%, #6c5ce7 100%);
  --gradient-accent: linear-gradient(135deg, #6c5ce7, #00cec9);
  --gradient-card: linear-gradient(145deg, rgba(108, 92, 231, 0.08), rgba(0, 206, 201, 0.04));
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(108, 92, 231, 0.25);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --header-height: 64px;
  --blur-glass: blur(20px);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f5f6fa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.6);
    --border-color: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(108, 92, 231, 0.35);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4d65;
    --text-muted: #8a8fa8;
    --gradient-hero: linear-gradient(135deg, #eef0ff 0%, #dce4ff 30%, #c3d0ff 60%, #a29bfe 100%);
    --gradient-card: linear-gradient(145deg, rgba(108, 92, 231, 0.06), rgba(0, 206, 201, 0.03));
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 24px rgba(108, 92, 231, 0.12);
  }
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--transition-base), color var(--transition-base);
}

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

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

ul, ol {
  padding-left: 1.5em;
}

li {
  margin-bottom: 0.5em;
}

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

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-light);
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

header:hover {
  box-shadow: var(--shadow-sm);
}

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: 24px;
}

nav > a {
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  letter-spacing: -0.02em;
  transition: opacity var(--transition-fast);
}

nav > a:hover {
  opacity: 0.85;
  -webkit-text-fill-color: transparent;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

nav ul li {
  margin: 0;
  flex-shrink: 0;
}

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);
  white-space: nowrap;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

nav ul li a:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
  transform: translateY(-1px);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border-color);
}

section:last-child {
  border-bottom: none;
}

section > h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
  position: relative;
  padding-left: 20px;
  line-height: 1.3;
}

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

h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text-primary);
  line-height: 1.4;
}

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

p {
  margin-bottom: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
}

section > p {
  max-width: 900px;
}

#hero {
  position: relative;
  padding: 96px 0 80px;
  border-bottom: none;
  overflow: hidden;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  margin-bottom: 16px;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: -2;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(108, 92, 231, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 206, 201, 0.2) 0%, transparent 50%);
  z-index: -1;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

#hero h1 {
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  max-width: 900px;
  background: linear-gradient(135deg, #ffffff 0%, #c3d0ff 50%, #a29bfe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp 0.8s ease-out both;
}

@media (prefers-color-scheme: light) {
  #hero h1 {
    background: linear-gradient(135deg, #1a1a2e 0%, #3a3a6e 50%, #6c5ce7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

#hero p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  max-width: 820px;
  color: rgba(255, 255, 255, 0.82);
  animation: fadeUp 0.8s ease-out 0.15s both;
}

@media (prefers-color-scheme: light) {
  #hero p {
    color: var(--text-secondary);
  }
}

#hero p:last-child {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

@media (prefers-color-scheme: light) {
  #hero p:last-child {
    color: var(--text-muted);
  }
}

#about,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#contact,
#sitemap,
#links {
  animation: fadeUp 0.7s ease-out both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}

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

@supports not (animation-timeline: view()) {
  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links {
    animation: none;
  }
}

#products ul,
#solutions ul,
#howto ul,
#howto ol {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}

#products ul li,
#solutions ul li,
#howto ul li,
#howto ol li {
  position: relative;
  padding: 16px 20px 16px 52px;
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  line-height: 1.7;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  counter-increment: item;
}

#products ul li::before,
#solutions ul li::before,
#howto ul li::before {
  content: "✦";
  position: absolute;
  left: 20px;
  top: 16px;
  color: var(--accent-light);
  font-size: 0.9rem;
  line-height: 1.7;
}

#howto ol {
  counter-reset: item;
}

#howto ol li::before {
  content: counter(item);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50%;
  line-height: 1;
}

#products ul li:hover,
#solutions ul li:hover,
#howto ul li:hover,
#howto ol li:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  background: var(--bg-card-hover);
}

#cases blockquote {
  margin: 24px 0;
  padding: 24px 28px;
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  position: relative;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

#cases blockquote::before {
  content: "\201C";
  position: absolute;
  top: -8px;
  left: 16px;
  font-size: 3.5rem;
  color: var(--accent);
  opacity: 0.25;
  font-family: Georgia, serif;
  line-height: 1;
}

#cases blockquote:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-glow);
  border-color: var(--border-hover);
}

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

#cases blockquote p + p {
  margin-top: 12px;
}

#news h3,
#articles h3 {
  position: relative;
}

#news p,
#articles p {
  font-size: 0.95rem;
}

#news h3 + p,
#articles h3 + p {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

#articles article {
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 20px;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  position: relative;
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

#articles article:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  background: var(--bg-card-hover);
}

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

#articles article h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-light);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-glass);
  transition: all var(--transition-fast);
  position: relative;
  z-index: 1;
}

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

#articles article a:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

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

#faq h3 {
  cursor: default;
  padding: 16px 20px;
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  margin: 0;
  font-size: 0.975rem;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
}

#faq h3::before {
  content: "Q";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--gradient-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 6px;
  flex-shrink: 0;
}

#faq h3 + p {
  padding: 16px 20px 16px 54px;
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

#faq h3:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

#faq h3:hover + p {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

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

#contact p:nth-of-type(1),
#contact p:nth-of-type(2),
#contact p:nth-of-type(3),
#contact p:nth-of-type(4),
#contact p:nth-of-type(5) {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  max-width: 560px;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

#contact p:nth-of-type(1):hover,
#contact p:nth-of-type(2):hover,
#contact p:nth-of-type(3):hover,
#contact p:nth-of-type(4):hover,
#contact p:nth-of-type(5):hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 10px 20px;
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

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

footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: 32px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
}

#legal {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  border-bottom: none;
}

#legal h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 24px 0 8px;
  padding-left: 0;
  color: var(--text-primary);
}

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

#legal h2::before {
  display: none;
}

#legal p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 800px;
}

#legal p:last-child {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  nav {
    padding: 0 16px;
    gap: 12px;
  }

  nav ul {
    gap: 2px;
  }

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

  main {
    padding: 0 16px;
  }

  section {
    padding: 48px 0;
  }

  #hero {
    padding: 72px 0 64px;
  }

  #articles article {
    padding: 20px 20px;
  }
}

@media (max-width: 640px) {
  nav {
    flex-direction: column;
    height: auto;
    padding: 10px 12px;
    gap: 8px;
  }

  nav > a {
    font-size: 1.1rem;
    align-self: flex-start;
  }

  nav ul {
    width: 100%;
    justify-content: flex-start;
    padding-bottom: 4px;
  }

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

  :root {
    --header-height: 96px;
  }

  main {
    padding: 0 12px;
  }

  section {
    padding: 40px 0;
  }

  section > h2 {
    font-size: 1.25rem;
    margin-bottom: 24px;
    padding-left: 16px;
  }

  section > h2::before {
    width: 4px;
  }

  #hero {
    padding: 56px 0 48px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  #hero::before,
  #hero::after {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  h3 {
    font-size: 1rem;
    margin-top: 20px;
  }

  p {
    font-size: 0.9rem;
  }

  #products ul li,
  #solutions ul li,
  #howto ul li,
  #howto ol li {
    padding: 12px 14px 12px 44px;
    font-size: 0.875rem;
  }

  #products ul li::before,
  #solutions ul li::before,
  #howto ul li::before {
    left: 14px;
    top: 12px;
  }

  #howto ol li::before {
    left: 10px;
    top: 10px;
    width: 22px;
    height: 22px;
    font-size: 0.72rem;
  }

  #articles article {
    padding: 16px 16px;
    border-radius: var(--radius-md);
  }

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

  #articles article a {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

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

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

  #contact p:nth-of-type(1),
  #contact p:nth-of-type(2),
  #contact p:nth-of-type(3),
  #contact p:nth-of-type(4),
  #contact p:nth-of-type(5) {
    font-size: 0.85rem;
    padding: 8px 12px;
  }

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

  #legal {
    padding: 32px 12px;
  }

  #cases blockquote {
    padding: 18px 18px 18px 22px;
  }
}

@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;
  }
}

@media print {
  header,
  footer,
  #sitemap,
  #links,
  nav {
    display: none;
  }

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

  section {
    break-inside: avoid;
  }
}