:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #12122a;
  --bg-tertiary: #1a1a3e;
  --bg-card: rgba(26, 26, 62, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.06);
  --bg-glass-hover: rgba(255, 255, 255, 0.1);
  --text-primary: #f0f0ff;
  --text-secondary: #b8b8d4;
  --text-muted: #7a7a9e;
  --accent-primary: #7c5cfc;
  --accent-secondary: #00d4ff;
  --accent-tertiary: #ff6b9d;
  --accent-glow: rgba(124, 92, 252, 0.4);
  --border-color: rgba(124, 92, 252, 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 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(124, 92, 252, 0.25);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --max-width: 1200px;
  --header-height: 72px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f5f5ff;
    --bg-secondary: #eeeef8;
    --bg-tertiary: #e4e4f4;
    --bg-card: rgba(255, 255, 255, 0.78);
    --bg-glass: rgba(255, 255, 255, 0.55);
    --bg-glass-hover: rgba(255, 255, 255, 0.75);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888a8;
    --border-color: rgba(124, 92, 252, 0.15);
    --border-glass: rgba(124, 92, 252, 0.12);
    --shadow-sm: 0 2px 8px rgba(124, 92, 252, 0.08);
    --shadow-md: 0 8px 32px rgba(124, 92, 252, 0.1);
    --shadow-lg: 0 16px 64px rgba(124, 92, 252, 0.12);
    --shadow-glow: 0 0 40px rgba(124, 92, 252, 0.15);
  }
}

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

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;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(124, 92, 252, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(0, 212, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 107, 157, 0.04) 0%, transparent 70%);
  background-attachment: fixed;
}

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

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 4px;
}

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

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

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

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

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

ul {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(1.75rem, 4.5vw, 3.2rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.75rem;
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 3px;
  transition: width var(--transition-smooth);
}

section:hover > h2::after {
  width: 96px;
}

h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: clamp(0.9rem, 1.8vw, 1rem);
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 26, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
  transition: background var(--transition-smooth), box-shadow var(--transition-smooth);
}

@media (prefers-color-scheme: light) {
  header {
    background: rgba(245, 245, 255, 0.78);
  }
}

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

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

nav > a:first-child {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradientShift 6s ease infinite;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform var(--transition-bounce), filter var(--transition-fast);
}

nav > a:first-child:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

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

nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav ul li a {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition-smooth);
}

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

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

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

section {
  margin-bottom: 3.5rem;
  padding: 2.5rem 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
  opacity: 0;
  transform: translateY(32px);
  animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

section:nth-child(1) { animation-delay: 0.05s; }
section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.15s; }
section:nth-child(4) { animation-delay: 0.2s; }
section:nth-child(5) { animation-delay: 0.25s; }
section:nth-child(6) { animation-delay: 0.3s; }
section:nth-child(7) { animation-delay: 0.35s; }
section:nth-child(8) { animation-delay: 0.4s; }
section:nth-child(9) { animation-delay: 0.45s; }
section:nth-child(10) { animation-delay: 0.5s; }
section:nth-child(11) { animation-delay: 0.55s; }
section:nth-child(12) { animation-delay: 0.6s; }
section:nth-child(13) { animation-delay: 0.65s; }
section:nth-child(14) { animation-delay: 0.7s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

#hero {
  margin-top: 2.5rem;
  padding: 4rem 2.5rem;
  background:
    linear-gradient(135deg, rgba(124, 92, 252, 0.35) 0%, rgba(0, 212, 255, 0.2) 50%, rgba(255, 107, 157, 0.25) 100%),
    var(--bg-card);
  border: 1px solid rgba(124, 92, 252, 0.3);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
  text-align: center;
}

#hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(124, 92, 252, 0.08), transparent, rgba(0, 212, 255, 0.08), transparent);
  animation: rotateGlow 12s linear infinite;
  pointer-events: none;
}

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

#hero h1 {
  position: relative;
  z-index: 1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-secondary) 50%, var(--accent-primary) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradientShift 8s ease infinite;
  filter: drop-shadow(0 0 30px rgba(124, 92, 252, 0.3));
}

#hero p {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.85;
}

#hero p + p {
  margin-top: 0.5rem;
}

#brand,
#products,
#solutions,
#cases,
#news,
#articles,
#howto,
#faq,
#contact {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

#brand h3,
#products h3,
#solutions h3,
#cases h3,
#news h3,
#howto h3,
#contact h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--accent-primary);
  transition: border-color var(--transition-fast), padding-left var(--transition-fast);
}

#brand h3:hover,
#products h3:hover,
#solutions h3:hover,
#cases h3:hover,
#news h3:hover,
#howto h3:hover,
#contact h3:hover {
  border-left-color: var(--accent-secondary);
  padding-left: 1rem;
}

#brand h3:first-of-type,
#products h3:first-of-type,
#solutions h3:first-of-type,
#cases h3:first-of-type,
#news h3:first-of-type,
#howto h3:first-of-type,
#contact h3:first-of-type {
  margin-top: 0.5rem;
}

#news h3 {
  color: var(--accent-secondary);
}

#news p:first-of-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

#articles article {
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: transform var(--transition-smooth), background var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition-smooth);
}

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

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

#articles article h3 {
  border: none;
  padding-left: 0;
  margin-top: 0;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

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

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

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-primary);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(124, 92, 252, 0.1);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

#articles article a:hover {
  background: var(--accent-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

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

#howto {
  background:
    linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(124, 92, 252, 0.08) 100%),
    var(--bg-card);
}

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

#faq {
  background:
    linear-gradient(180deg, rgba(124, 92, 252, 0.06) 0%, transparent 100%),
    var(--bg-card);
}

#faq h3 {
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  margin-bottom: 0;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-left: 3px solid var(--accent-primary);
  cursor: default;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

#faq h3:hover {
  background: var(--bg-glass-hover);
  border-left-color: var(--accent-secondary);
}

#faq h3 + p {
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.925rem;
  transition: background var(--transition-fast);
}

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

#contact {
  background:
    linear-gradient(135deg, rgba(255, 107, 157, 0.08) 0%, rgba(124, 92, 252, 0.08) 100%),
    var(--bg-card);
}

#contact p {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

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

#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  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 {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 6px 24px var(--accent-glow);
}

footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-glass);
  padding: 3rem 1.5rem 2rem;
  margin-top: 2rem;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
}

footer section {
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  padding: 1.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: none;
  opacity: 1;
  transform: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

footer section:hover {
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
  transform: none;
}

footer section h2 {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
}

footer section h2::after {
  width: 40px;
  height: 2px;
}

footer section p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

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

#copyright p:first-of-type {
  color: var(--text-secondary);
  font-weight: 500;
}

#copyright p:last-of-type {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-glass);
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  nav {
    padding: 0 1rem;
  }

  nav ul li a {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }

  main {
    padding: 0 1rem 3rem;
  }

  section {
    padding: 2rem 1.5rem;
  }

  #hero {
    padding: 3rem 1.75rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: auto;
  }

  header {
    position: relative;
  }

  nav {
    flex-direction: column;
    height: auto;
    padding: 1rem;
    gap: 0.75rem;
  }

  nav > a:first-child {
    font-size: 1.25rem;
    align-self: flex-start;
  }

  nav ul {
    width: 100%;
    justify-content: flex-start;
    gap: 0.15rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
  }

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

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

  main {
    padding: 0 0.85rem 3rem;
  }

  section {
    padding: 1.75rem 1.15rem;
    margin-bottom: 2rem;
    border-radius: var(--radius-md);
  }

  #hero {
    margin-top: 1.5rem;
    padding: 2.5rem 1.25rem;
    border-radius: var(--radius-lg);
  }

  #hero h1 {
    margin-bottom: 1rem;
  }

  #articles article {
    padding: 1.15rem;
  }

  #faq h3 {
    padding: 0.85rem 1rem;
  }

  #faq h3 + p {
    padding: 0.85rem 1rem;
  }

  #sitemap ul,
  #links ul {
    gap: 0.5rem;
  }

  #sitemap ul li a,
  #links ul li a {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  footer {
    padding: 2rem 0.85rem 1.5rem;
  }

  footer section {
    padding: 1.15rem;
    margin-bottom: 1.25rem;
  }
}

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

  nav > a:first-child {
    font-size: 1.15rem;
  }

  nav ul li a {
    padding: 0.4rem 0.55rem;
    font-size: 0.75rem;
  }

  section {
    padding: 1.5rem 1rem;
    border-radius: var(--radius-sm);
  }

  #hero {
    padding: 2rem 1rem;
  }

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

  #brand h3,
  #products h3,
  #solutions h3,
  #cases h3,
  #news h3,
  #howto h3,
  #contact h3 {
    margin-top: 1.25rem;
    font-size: 1rem;
  }

  #articles article {
    padding: 1rem;
  }

  #articles article a {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
  }

  #faq h3 {
    font-size: 0.95rem;
    padding: 0.75rem 0.85rem;
  }

  #faq h3 + p {
    font-size: 0.85rem;
    padding: 0.75rem 0.85rem;
  }
}

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

  section {
    opacity: 1;
    transform: none;
  }
}

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

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

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

  a {
    color: #000;
    text-decoration: underline;
  }
}

@supports not (backdrop-filter: blur(20px)) {
  header {
    background: var(--bg-secondary);
  }

  section {
    background: var(--bg-tertiary);
  }

  footer section {
    background: var(--bg-tertiary);
  }
}