:root {
  --bg-primary: #f7f5f2;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0ece7;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a5a;
  --text-tertiary: #7a7a8a;
  --accent-1: #ff6b6b;
  --accent-2: #ffa502;
  --accent-3: #7c5cbf;
  --accent-4: #2ed573;
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.08);
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
  --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-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max-width: 1200px;
}

[data-theme="dark"] {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --text-primary: #eaeaea;
  --text-secondary: #b0b0c0;
  --text-tertiary: #7a7a8a;
  --glass-bg: rgba(26, 26, 46, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.5);
  --gradient-card: linear-gradient(145deg, rgba(26,26,46,0.9), rgba(22,33,62,0.8));
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --text-primary: #eaeaea;
    --text-secondary: #b0b0c0;
    --text-tertiary: #7a7a8a;
    --glass-bg: rgba(26, 26, 46, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.5);
    --gradient-card: linear-gradient(145deg, rgba(26,26,46,0.9), rgba(22,33,62,0.8));
    --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  }
}

*,
*::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;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
  overflow-x: hidden;
}

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

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

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

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

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

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

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

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

header nav > a:hover {
  opacity: 0.8;
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex-wrap: wrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

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

header nav ul li a:hover,
header nav ul li a:focus-visible {
  color: var(--accent-3);
  background: rgba(124, 92, 191, 0.08);
  transform: translateY(-1px);
}

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

main > h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin: 48px 0 20px;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 0.8s ease both;
}

main > p:first-of-type {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 800px;
  margin-bottom: 48px;
  animation: fadeInUp 0.8s ease 0.1s both;
}

section {
  margin-bottom: 56px;
  animation: fadeInUp 0.7s ease both;
}

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 h2 {
  font-size: clamp(1.375rem, 3.5vw, 1.75rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  position: relative;
  letter-spacing: -0.02em;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--gradient-hero);
}

section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 28px 0 10px;
}

section p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 0.9375rem;
}

section a {
  color: var(--accent-3);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color var(--transition-fast);
}

section a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent-3);
  transition: width var(--transition-fast);
}

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

section a:hover::after {
  width: 100%;
  background: var(--accent-1);
}

section ul,
section ol {
  padding-left: 24px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

section ul li,
section ol li {
  margin-bottom: 8px;
  font-size: 0.9375rem;
}

section ol li {
  padding-left: 4px;
}

section ol li::marker {
  color: var(--accent-3);
  font-weight: 700;
}

section ul li::marker {
  color: var(--accent-2);
}

#brand,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#contact,
#sitemap,
#links,
#legal {
  background: var(--gradient-card);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition-smooth), transform var(--transition-smooth);
}

#brand:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#contact:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

#articles article {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 16px;
  transition: transform var(--transition-bounce), box-shadow var(--transition-smooth), border-color var(--transition-fast);
}

#articles article:hover {
  transform: translateY(-4px) scale(1.008);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--accent-3);
}

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

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

#articles article p:first-of-type {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

#news h3 {
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  margin: 20px 0 0;
  border: 1px solid var(--glass-border);
  border-bottom: none;
  transition: background var(--transition-fast);
}

#news h3 + p {
  padding: 8px 20px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--glass-border);
  border-right: 1px solid var(--glass-border);
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

#news h3 + p + p {
  padding: 12px 20px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  margin: 0 0 4px;
  transition: box-shadow var(--transition-smooth);
}

#news > div:hover h3,
#news h3:hover {
  background: var(--bg-tertiary);
}

#faq h3 {
  cursor: pointer;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin: 12px 0 0;
  border: 1px solid var(--glass-border);
  font-size: 1rem;
  position: relative;
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}

#faq h3::before {
  content: '▸';
  display: inline-block;
  margin-right: 8px;
  color: var(--accent-3);
  transition: transform var(--transition-fast);
}

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

#faq h3:hover::before {
  transform: rotate(90deg);
}

#faq h3 + p {
  padding: 0 18px 14px;
  margin: -4px 0 0;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-secondary);
  animation: fadeIn 0.3s ease;
}

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

#howto ol li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin-bottom: 14px;
  min-height: 32px;
  display: flex;
  align-items: center;
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-hero);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(124, 92, 191, 0.3);
}

#howto ul li {
  padding-left: 8px;
}

#contact h3 {
  color: var(--accent-3);
  font-size: 1rem;
  margin-top: 24px;
}

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

#contact p {
  padding-left: 8px;
  border-left: 2px solid var(--bg-tertiary);
  margin-bottom: 8px;
  transition: border-color var(--transition-fast);
}

#contact p:hover {
  border-color: var(--accent-3);
}

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

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 8px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

#sitemap ul li a::after,
#links ul li a::after {
  display: none;
}

#sitemap ul li a:hover,
#links ul li a:hover {
  background: var(--accent-3);
  color: #fff;
  border-color: var(--accent-3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 92, 191, 0.3);
}

#links ul li a[rel="nofollow"]:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  box-shadow: 0 4px 12px rgba(255, 165, 2, 0.3);
}

#legal h2 {
  font-size: 1.125rem;
  margin-top: 24px;
}

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

#legal p {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: 32px 24px;
  text-align: center;
  transition: background var(--transition-smooth);
}

footer p {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

footer p:first-child {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

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

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

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

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

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

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

  main {
    padding: 0 16px 60px;
  }

  main > h1 {
    margin-top: 28px;
    font-size: 1.5rem;
  }

  main > p:first-of-type {
    font-size: 0.9375rem;
    margin-bottom: 32px;
  }

  section {
    margin-bottom: 36px;
    padding: 22px 18px;
    border-radius: var(--radius-md);
  }

  #brand,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links,
  #legal {
    padding: 22px 18px;
    border-radius: var(--radius-md);
  }

  section h2 {
    font-size: 1.25rem;
    margin-bottom: 18px;
  }

  section h3 {
    font-size: 1rem;
  }

  #articles article {
    padding: 16px 14px;
  }

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

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

  #howto ol li {
    padding-left: 38px;
  }

  #howto ol li::before {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

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

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

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

  main > h1 {
    font-size: 1.375rem;
  }

  section h2 {
    font-size: 1.125rem;
  }

  #news h3 {
    padding: 12px 14px;
    font-size: 0.9375rem;
  }

  #news h3 + p,
  #news h3 + p + p {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@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 {
    display: none;
  }

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

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