:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #4834D4;
  --accent: #00CEC9;
  --accent-light: #55EFC4;
  --bg: #F8F9FE;
  --bg-alt: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --text: #1A1A2E;
  --text-secondary: #4A4A6A;
  --text-muted: #8888A0;
  --border: rgba(108, 92, 231, 0.12);
  --shadow-sm: 0 2px 8px rgba(108, 92, 231, 0.08);
  --shadow-md: 0 8px 24px rgba(108, 92, 231, 0.12);
  --shadow-lg: 0 16px 48px rgba(108, 92, 231, 0.18);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --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: #0F0F1A;
    --bg-alt: #16162A;
    --bg-card: #1C1C32;
    --bg-glass: rgba(28, 28, 50, 0.72);
    --text: #EAEAF2;
    --text-secondary: #B0B0C8;
    --text-muted: #70708A;
    --border: rgba(108, 92, 231, 0.2);
    --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);
  }
}

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

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

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

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

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

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

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

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

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

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

a:hover {
  color: var(--primary-dark);
  opacity: 0.85;
}

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

ul,
ol {
  list-style: none;
}

/* ========== HEADER ========== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

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

header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

header nav > a {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  white-space: nowrap;
  transition: transform var(--transition);
}

header nav > a:hover {
  transform: scale(1.05);
  opacity: 1;
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

header nav ul li a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
}

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

header nav ul li a:hover {
  color: var(--primary);
  background: rgba(108, 92, 231, 0.08);
  opacity: 1;
}

header nav ul li a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

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

/* ========== SECTIONS ========== */
section {
  padding: 64px 0;
  opacity: 0;
  transform: translateY(32px);
  animation: fadeInUp 0.8s ease 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; }
section:nth-child(15) { animation-delay: 0.75s; }
section:nth-child(16) { animation-delay: 0.8s; }
section:nth-child(17) { animation-delay: 0.85s; }
section:nth-child(18) { animation-delay: 0.9s; }
section:nth-child(19) { animation-delay: 0.95s; }
section:nth-child(20) { animation-delay: 1s; }
section:nth-child(21) { animation-delay: 1.05s; }
section:nth-child(22) { animation-delay: 1.1s; }
section:nth-child(23) { animation-delay: 1.15s; }
section:nth-child(24) { animation-delay: 1.2s; }
section:nth-child(25) { animation-delay: 1.25s; }

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

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

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

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

/* ========== HERO ========== */
#hero {
  position: relative;
  padding: 80px 40px;
  margin: 32px 0;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 30%, #00CEC9 70%, #55EFC4 100%);
  background-size: 300% 300%;
  animation: gradientShift 12s ease infinite, fadeInUp 0.8s ease forwards;
  overflow: hidden;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

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

#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.15) 0%, transparent 60%),
              radial-gradient(circle at 70% 60%, rgba(255,255,255,0.1) 0%, transparent 50%);
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  animation: pulse 6s ease-in-out infinite;
  pointer-events: none;
}

#hero h1 {
  position: relative;
  z-index: 1;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

#hero p {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 16px;
  max-width: 800px;
  color: rgba(255, 255, 255, 0.92);
}

#hero p:last-child {
  margin-top: 32px;
  margin-bottom: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

#hero p:last-child a {
  display: inline-block;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-dark);
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

#hero p:last-child a:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  background: #fff;
  color: var(--primary-dark);
  opacity: 1;
}

#hero p:last-child a:last-child {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: #fff;
}

#hero p:last-child a:last-child:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  color: #fff;
}

/* ========== HEADINGS ========== */
h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 32px;
  position: relative;
  padding-left: 20px;
  letter-spacing: -0.3px;
}

h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 28px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

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

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

p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 12px;
}

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

/* ========== CARD STYLES ========== */
#about,
#products,
#advantages,
#solutions,
#applications,
#cases,
#testimonials,
#news,
#articles,
#knowledge,
#faq,
#howto,
#contact,
#sitemap,
#links,
#copyright,
#privacy,
#disclaimer,
#security,
#service,
#support,
#editorial {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

#about:hover,
#products:hover,
#advantages:hover,
#solutions:hover,
#applications:hover,
#cases:hover,
#testimonials:hover,
#news:hover,
#articles:hover,
#knowledge:hover,
#faq:hover,
#howto:hover,
#contact:hover,
#sitemap:hover,
#links:hover,
#copyright:hover,
#privacy:hover,
#disclaimer:hover,
#security:hover,
#service:hover,
#support:hover,
#editorial:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(108, 92, 231, 0.25);
}

/* ========== TESTIMONIALS ========== */
#testimonials blockquote {
  position: relative;
  padding: 24px 28px 24px 56px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(0, 206, 201, 0.05));
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
  transition: transform var(--transition), box-shadow var(--transition);
}

#testimonials blockquote:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

#testimonials blockquote::before {
  content: '\201C';
  position: absolute;
  left: 16px;
  top: 8px;
  font-size: 3rem;
  font-family: Georgia, serif;
  color: var(--primary-light);
  line-height: 1;
  opacity: 0.6;
}

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

/* ========== NEWS & ARTICLES ========== */
#news article,
#articles article {
  padding: 24px;
  margin-bottom: 16px;
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

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

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(108, 92, 231, 0.3);
}

#news article h3,
#articles article h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

#news article h3 a,
#articles article h3 a {
  color: var(--text);
}

#news article h3 a:hover,
#articles article h3 a:hover {
  color: var(--primary);
  opacity: 1;
}

#news article p:nth-of-type(1),
#articles article p:nth-of-type(1) {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

#news article a[href^="#article"],
#articles article a[href^="#article"] {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 8px;
  transition: gap var(--transition);
}

#news article a[href^="#article"]:hover,
#articles article a[href^="#article"]:hover {
  gap: 8px;
  opacity: 1;
}

#news article a[href^="#article"]::after,
#articles article a[href^="#article"]::after {
  content: '→';
  transition: transform var(--transition);
}

#news article a[href^="#article"]:hover::after,
#articles article a[href^="#article"]:hover::after {
  transform: translateX(4px);
}

/* ========== FAQ ========== */
#faq h3 {
  position: relative;
  padding: 16px 20px;
  margin: 0 0 8px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.05rem;
  transition: background var(--transition), color var(--transition);
}

#faq h3:hover {
  background: rgba(108, 92, 231, 0.08);
  color: var(--primary);
}

#faq h3 + p {
  padding: 0 20px 16px;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--border);
}

#faq h3 + p:last-child {
  border-bottom: none;
}

/* ========== HOWTO ========== */
#howto h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

#howto h3::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  flex-shrink: 0;
}

/* ========== CONTACT ========== */
#contact ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

#contact ul li {
  padding: 14px 18px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-left: 3px solid var(--primary-light);
  transition: transform var(--transition), box-shadow var(--transition);
}

#contact ul li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

/* ========== 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;
  background: var(--bg);
  border-radius: 50px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
  opacity: 1;
}

/* ========== FOOTER ========== */
footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 48px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 32px;
}

footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.7;
}

footer p:last-child {
  margin-bottom: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

footer a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color var(--transition);
}

footer a:hover {
  color: var(--primary);
  opacity: 1;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  header nav {
    height: auto;
    padding: 12px 20px;
    flex-direction: column;
    gap: 10px;
  }

  header nav ul {
    justify-content: center;
    gap: 2px;
  }

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

  #hero {
    padding: 56px 28px;
    margin: 20px 0;
  }

  #hero h1 {
    font-size: 2rem;
  }

  section {
    padding: 48px 0;
  }

  #about,
  #products,
  #advantages,
  #solutions,
  #applications,
  #cases,
  #testimonials,
  #news,
  #articles,
  #knowledge,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links,
  #copyright,
  #privacy,
  #disclaimer,
  #security,
  #service,
  #support,
  #editorial {
    padding: 32px 24px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  main {
    padding: 0 16px;
  }

  header nav {
    padding: 10px 16px;
  }

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

  header nav ul li a {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  #hero {
    padding: 40px 20px;
    margin: 16px 0;
    border-radius: var(--radius-lg);
  }

  #hero h1 {
    font-size: 1.5rem;
  }

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

  #hero p:last-child {
    flex-direction: column;
    align-items: stretch;
  }

  #hero p:last-child a {
    text-align: center;
    padding: 12px 20px;
  }

  h2 {
    font-size: 1.35rem;
    margin-bottom: 24px;
  }

  h3 {
    font-size: 1.05rem;
  }

  section {
    padding: 36px 0;
  }

  #about,
  #products,
  #advantages,
  #solutions,
  #applications,
  #cases,
  #testimonials,
  #news,
  #articles,
  #knowledge,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links,
  #copyright,
  #privacy,
  #disclaimer,
  #security,
  #service,
  #support,
  #editorial {
    padding: 24px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
  }

  #testimonials blockquote {
    padding: 18px 18px 18px 44px;
  }

  #testimonials blockquote::before {
    font-size: 2.2rem;
    left: 12px;
  }

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

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

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

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  header nav ul {
    gap: 0;
  }

  header nav ul li a {
    padding: 3px 6px;
    font-size: 0.7rem;
  }

  #hero {
    padding: 32px 16px;
  }

  #hero h1 {
    font-size: 1.3rem;
  }

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

  h2 {
    font-size: 1.2rem;
    padding-left: 16px;
  }

  h2::before {
    height: 22px;
    width: 4px;
  }

  #sitemap ul,
  #links ul {
    gap: 8px;
  }

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

/* ========== 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;
  }

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

/* ========== PRINT ========== */
@media print {
  header {
    position: static;
    background: #fff;
  }

  #hero {
    background: #f0f0f0;
    color: #000;
    box-shadow: none;
  }

  #hero h1,
  #hero p {
    color: #000;
    text-shadow: none;
  }

  section {
    opacity: 1;
    transform: none;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}