:root {
  --bg-primary: #0f1020;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #23233f;
  --bg-card: rgba(35, 35, 63, 0.55);
  --bg-glass: rgba(26, 26, 46, 0.65);
  --border-color: rgba(120, 120, 200, 0.18);
  --border-hover: rgba(150, 130, 255, 0.45);
  --text-primary: #f0eefc;
  --text-secondary: #b8b4d8;
  --text-muted: #8a86ad;
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --accent-3: #22d3ee;
  --gradient-main: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 35%, #ec4899 70%, #f59e0b 100%);
  --gradient-soft: linear-gradient(135deg, rgba(109, 40, 217, 0.22), rgba(236, 72, 153, 0.16));
  --gradient-text: linear-gradient(120deg, #c4b5fd 0%, #f0abfc 50%, #67e8f9 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.25);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  --max-width: 1200px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f6f5ff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eeecfb;
    --bg-card: rgba(255, 255, 255, 0.72);
    --bg-glass: rgba(255, 255, 255, 0.6);
    --border-color: rgba(109, 40, 217, 0.12);
    --border-hover: rgba(109, 40, 217, 0.35);
    --text-primary: #1e1b3a;
    --text-secondary: #4a4570;
    --text-muted: #7a7599;
    --gradient-soft: linear-gradient(135deg, rgba(109, 40, 217, 0.1), rgba(236, 72, 153, 0.08));
    --shadow-sm: 0 2px 8px rgba(80, 60, 160, 0.08);
    --shadow-md: 0 10px 30px rgba(80, 60, 160, 0.12);
    --shadow-lg: 0 20px 60px rgba(80, 60, 160, 0.16);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.15);
  }
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 12% 8%, rgba(109, 40, 217, 0.22), transparent 45%),
    radial-gradient(circle at 88% 12%, rgba(236, 72, 153, 0.16), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(34, 211, 238, 0.12), transparent 50%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
}

::selection {
  background: rgba(139, 92, 246, 0.4);
  color: #fff;
}

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #6d28d9, #ec4899);
  border-radius: 8px;
  border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #8b5cf6, #f472b6);
}

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

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

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

ul {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin-bottom: 1.4rem;
  position: relative;
  padding-left: 1.1rem;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 4px;
  background: var(--gradient-main);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.6);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  margin-top: 1.8rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

h4 {
  font-size: 1.08rem;
  margin-top: 1.4rem;
  margin-bottom: 0.6rem;
  color: var(--accent-3);
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1rem;
}

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

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

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

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

nav > a:hover {
  transform: scale(1.04);
}

nav ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

nav ul li a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}

nav ul li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition);
}

nav ul li a:hover {
  color: var(--text-primary);
  background: var(--gradient-soft);
}

nav ul li a:hover::after {
  width: 60%;
}

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

section {
  margin: 2.5rem 0;
  padding: 2rem 2.2rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent);
  opacity: 0.6;
}

section:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

#home {
  margin-top: 2.5rem;
  padding: 3.5rem 2.5rem;
  background: var(--gradient-soft), var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

#home::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(139, 92, 246, 0.18), transparent 30%, rgba(236, 72, 153, 0.15), transparent 60%);
  animation: spin 18s linear infinite;
  z-index: 0;
  opacity: 0.7;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#home > * {
  position: relative;
  z-index: 1;
}

#home h1 {
  margin-bottom: 1.5rem;
  animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#home p {
  max-width: 820px;
  margin: 0 auto;
  font-size: 1.06rem;
  color: var(--text-secondary);
  animation: fadeUp 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#about,
#concept,
#industry,
#products,
#solutions,
#scenarios,
#cases,
#news,
#articles,
#howto,
#faq,
#notes,
#contact,
#sitemap,
#links {
  scroll-margin-top: 90px;
}

#articles article {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.2rem;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
}

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

#articles article:hover {
  transform: translateX(6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  background: var(--bg-tertiary);
}

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

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

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

#articles article p:first-of-type {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

#articles article a {
  display: inline-block;
  margin-top: 0.4rem;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--gradient-soft);
  border: 1px solid var(--border-color);
  transition: all var(--transition);
}

#articles article a:hover {
  background: var(--gradient-main);
  color: #fff;
  border-color: transparent;
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

#faq h3 {
  padding: 1rem 1.3rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 0.9rem;
  margin-bottom: 0;
  font-size: 1.02rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  padding-right: 2.8rem;
}

#faq h3::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform var(--transition), color var(--transition);
}

#faq h3:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary);
  transform: translateX(4px);
}

#faq h3:hover::after {
  color: var(--accent-2);
  transform: translateY(-50%) rotate(90deg);
}

#faq h3 + p {
  padding: 0.9rem 1.3rem 0.2rem;
  margin-bottom: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.96rem;
  border-left: 2px solid var(--border-color);
  margin-left: 0.6rem;
  animation: fadeIn 0.5s ease both;
}

#howto h4 {
  padding-left: 0.9rem;
  border-left: 3px solid var(--accent);
  color: var(--text-primary);
}

#howto h4:nth-of-type(odd) {
  border-left-color: var(--accent-2);
}

#contact p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.98rem;
}

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

#contact h3 {
  margin-top: 1.6rem;
}

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

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: #fff;
  background: var(--gradient-main);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.4);
}

footer {
  margin-top: 3rem;
  padding: 3rem 1.5rem 2.5rem;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-main);
  background-size: 200% 100%;
  animation: shimmer 6s ease infinite;
}

footer section {
  max-width: var(--max-width);
  margin: 0 auto 1.8rem;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
  animation: none;
}

footer section:hover {
  box-shadow: none;
  border: none;
}

footer section h2 {
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
  padding-left: 0.9rem;
}

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

footer section p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 900px;
}

#copyright {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  margin-bottom: 0;
}

#copyright p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
}

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

@supports (animation-timeline: view()) {
  section {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }
}

@media (max-width: 900px) {
  nav {
    padding: 0.75rem 1.1rem;
    gap: 0.8rem;
  }

  nav ul {
    gap: 0.2rem;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.3rem;
    scrollbar-width: none;
  }

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

  nav ul li a {
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  main {
    padding: 0 1rem 2rem;
  }

  section {
    padding: 1.6rem 1.3rem;
    margin: 1.6rem 0;
    border-radius: var(--radius-md);
  }

  #home {
    padding: 2.4rem 1.4rem;
    margin-top: 1.6rem;
    border-radius: var(--radius-lg);
  }

  h2 {
    padding-left: 0.9rem;
  }

  h2::before {
    width: 4px;
  }

  #articles article {
    padding: 1.2rem 1.1rem;
  }

  #articles article:hover {
    transform: translateY(-3px);
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

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

  section {
    padding: 1.3rem 1rem;
    margin: 1.2rem 0;
  }

  #home {
    padding: 2rem 1.1rem;
  }

  #home p {
    font-size: 0.98rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  h3 {
    font-size: 1.08rem;
  }

  #faq h3 {
    padding: 0.85rem 2.5rem 0.85rem 1rem;
    font-size: 0.96rem;
  }

  #faq h3 + p {
    padding: 0.7rem 1rem 0.1rem;
    font-size: 0.92rem;
  }

  #sitemap ul li a,
  #links ul li a {
    padding: 0.42rem 0.85rem;
    font-size: 0.84rem;
  }

  footer {
    padding: 2rem 1rem 1.8rem;
  }
}

@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 {
  body::before,
  body::after,
  header,
  footer::before {
    display: none;
  }

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

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