:root {
  --primary: #1a73e8;
  --primary-light: #4d9aff;
  --primary-dark: #0d47a1;
  --accent: #ff6b6b;
  --accent-light: #ff9a9e;
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #1a73e8 0%, #4d9aff 50%, #a855f7 100%);
  --gradient-3: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-hero: linear-gradient(135deg, #0d47a1 0%, #1a73e8 40%, #4d9aff 70%, #a855f7 100%);
  --bg: #f0f4f8;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-border: rgba(255, 255, 255, 0.4);
  --text: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888a0;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(26, 115, 232, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(26, 115, 232, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(26, 115, 232, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 30px rgba(26, 115, 232, 0.25);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: 0.6s 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", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-glass: rgba(26, 26, 46, 0.78);
    --bg-glass-border: rgba(255, 255, 255, 0.08);
    --text: #e8e8f0;
    --text-secondary: #b0b0c8;
    --text-muted: #7070 90;
    --text-muted: #707090;
    --border: #2a2a40;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(77, 154, 255, 0.2);
    --gradient-hero: linear-gradient(135deg, #0a0a1a 0%, #0d47a1 30%, #1a73e8 60%, #7c3aed 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);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(26, 115, 232, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(168, 85, 247, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

@media (prefers-color-scheme: dark) {
  body::before {
    background:
      radial-gradient(ellipse at 20% 0%, rgba(26, 115, 232, 0.12) 0%, transparent 60%),
      radial-gradient(ellipse at 80% 100%, rgba(168, 85, 247, 0.1) 0%, transparent 60%);
  }
}

/* ==================== HEADER ==================== */
header[role="banner"] {
  position: fixed;
  top: 0;
  left: 0;
  right: 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(--bg-glass-border);
  transition: background var(--transition), box-shadow var(--transition);
}

header[role="banner"]:hover {
  box-shadow: var(--shadow-md);
}

nav[aria-label="主导航"] {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

nav[aria-label="主导航"] > a {
  font-size: 1.35rem;
  font-weight: 800;
  text-decoration: none;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  position: relative;
  transition: transform var(--transition);
  flex-shrink: 0;
}

nav[aria-label="主导航"] > a:hover {
  transform: scale(1.05);
}

nav[aria-label="主导航"] > a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-2);
  border-radius: 2px;
  transition: width var(--transition);
}

nav[aria-label="主导航"] > a:hover::after {
  width: 100%;
}

nav[aria-label="主导航"] ul {
  display: flex;
  list-style: none;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

nav[aria-label="主导航"] ul li a {
  display: block;
  padding: 6px 14px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
  font-weight: 500;
}

nav[aria-label="主导航"] ul li a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  background: var(--gradient-2);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: -1;
}

nav[aria-label="主导航"] ul li a:hover {
  color: #fff;
  transform: translateY(-1px);
}

nav[aria-label="主导航"] ul li a:hover::before {
  opacity: 1;
}

/* ==================== MAIN ==================== */
main {
  position: relative;
  z-index: 1;
  padding-top: 64px;
}

section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
  position: relative;
}

section + section {
  border-top: 1px solid var(--border);
}

/* ==================== HERO ==================== */
#hero {
  max-width: 100%;
  padding: 0;
  margin: 0;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  border-top: none !important;
}

#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.12) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  animation: heroFloat 20s ease-in-out infinite;
  pointer-events: none;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
  pointer-events: none;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, -2%) rotate(1deg); }
  66% { transform: translate(-1%, 1%) rotate(-1deg); }
}

#hero h1 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px 24px;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
  animation: fadeInUp 0.8s ease-out both;
  position: relative;
  z-index: 1;
}

#hero p {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.85;
  animation: fadeInUp 0.8s ease-out both;
  position: relative;
  z-index: 1;
}

#hero p:first-of-type {
  animation-delay: 0.15s;
}

#hero p:last-of-type {
  padding-bottom: 100px;
  animation-delay: 0.3s;
}

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

section > h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 4px;
  background: var(--gradient-2);
  border-radius: 4px;
}

section h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

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

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

/* ==================== CARDS ==================== */
#brand,
#product,
#solution,
#application,
#case,
#news,
#knowledge,
#faq,
#howto,
#contact,
#sitemap,
#links,
#footer-info,
#author-info {
  position: relative;
}

#brand h3,
#product h3,
#solution h3,
#application h3,
#case h3,
#knowledge h3,
#faq h3,
#howto h3,
#contact h3 {
  padding: 16px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#brand h3::before,
#product h3::before,
#solution h3::before,
#application h3::before,
#case h3::before,
#knowledge h3::before,
#faq h3::before,
#howto h3::before,
#contact h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-2);
  border-radius: 0 3px 3px 0;
  transition: width var(--transition);
}

#brand h3:hover,
#product h3:hover,
#solution h3:hover,
#application h3:hover,
#case h3:hover,
#knowledge h3:hover,
#faq h3:hover,
#howto h3:hover,
#contact h3:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

#brand h3:hover::before,
#product h3:hover::before,
#solution h3:hover::before,
#application h3:hover::before,
#case h3:hover::before,
#knowledge h3:hover::before,
#faq h3:hover::before,
#howto h3:hover::before,
#contact h3:hover::before {
  width: 6px;
}

/* ==================== PRODUCT MODULES ==================== */
#product p {
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#product p::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--gradient-2);
  opacity: 0.06;
  transition: width var(--transition-slow);
}

#product p:hover::before {
  width: 100%;
}

#product p:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

/* ==================== SOLUTION CARDS ==================== */
#solution h3 + p {
  padding: 20px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#solution h3 + p::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: var(--gradient-2);
  opacity: 0.04;
  border-radius: 50%;
  transform: translate(40%, -40%);
  transition: all var(--transition-slow);
}

#solution h3 + p:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

#solution h3 + p:hover::after {
  transform: translate(20%, -20%) scale(1.5);
  opacity: 0.08;
}

/* ==================== CASE CARDS ==================== */
#case h3 + p {
  padding: 20px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#case h3 + p:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
}

/* ==================== NEWS ARTICLES ==================== */
#news article {
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

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

#news article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

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

#news article h3 {
  margin: 0 0 8px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

#news article h3::before {
  display: none;
}

#news article h3 a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
  transition: color var(--transition);
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size var(--transition), color var(--transition);
}

#news article h3 a:hover {
  color: var(--primary);
  background-size: 100% 2px;
}

#news article p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

#news article p:nth-of-type(2) {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

#news article p:last-child a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(26, 115, 232, 0.08);
  transition: all var(--transition);
}

#news article p:last-child a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

#news article p:last-child a::after {
  content: '→';
  transition: transform var(--transition);
}

#news article p:last-child a:hover::after {
  transform: translateX(3px);
}

/* ==================== FAQ ==================== */
#faq h3 + p {
  padding: 16px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#faq h3 + p::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-2);
  transition: width var(--transition);
}

#faq h3 + p:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

#faq h3 + p:hover::before {
  width: 6px;
}

/* ==================== HOWTO ==================== */
#howto h3 + p {
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  transition: all var(--transition);
  position: relative;
  counter-increment: howto-step;
}

#howto h3 + p::before {
  content: counter(howto-step, decimal-leading-zero);
  display: inline-block;
  font-weight: 800;
  font-size: 0.75rem;
  color: var(--primary);
  background: rgba(26, 115, 232, 0.1);
  padding: 2px 8px;
  border-radius: 100px;
  margin-right: 10px;
  vertical-align: middle;
}

#howto h3 + p:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

/* ==================== CONTACT ==================== */
#contact p {
  padding: 10px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: all var(--transition);
}

#contact p:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-light);
}

/* ==================== SITEMAP & LINKS ==================== */
#sitemap ul,
#links ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#sitemap ul li a::before,
#links ul li a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-2);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: -1;
}

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

#sitemap ul li a:hover::before,
#links ul li a:hover::before {
  opacity: 1;
}

/* ==================== FOOTER INFO ==================== */
#footer-info h2 {
  font-size: 1.15rem;
  margin-top: 32px;
  margin-bottom: 12px;
  padding-left: 16px;
}

#footer-info h2::before {
  width: 3px;
}

#footer-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ==================== AUTHOR INFO ==================== */
#author-info p {
  padding: 8px 14px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  font-size: 0.875rem;
  transition: all var(--transition);
}

#author-info p:hover {
  transform: translateX(4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

/* ==================== FOOTER ==================== */
footer[role="contentinfo"] {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}

footer[role="contentinfo"] p {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}

footer[role="contentinfo"] a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

footer[role="contentinfo"] a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width var(--transition);
}

footer[role="contentinfo"] a:hover {
  color: var(--primary);
}

footer[role="contentinfo"] a:hover::after {
  width: 100%;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

section:not(#hero) {
  animation: fadeInUp 0.7s ease-out both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}

/* Fallback for browsers without animation-timeline */
@supports not (animation-timeline: view()) {
  section:not(#hero) {
    animation: fadeInUp 0.7s ease-out both;
    opacity: 0;
  }

  section:not(#hero).visible {
    opacity: 1;
  }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  section {
    padding: 48px 20px;
  }

  nav[aria-label="主导航"] {
    padding: 0 16px;
  }

  nav[aria-label="主导航"] ul {
    gap: 2px;
  }

  nav[aria-label="主导航"] ul li a {
    padding: 5px 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  nav[aria-label="主导航"] {
    height: 56px;
    padding: 0 12px;
  }

  nav[aria-label="主导航"] > a {
    font-size: 1.1rem;
  }

  nav[aria-label="主导航"] ul {
    display: none;
  }

  main {
    padding-top: 56px;
  }

  #hero h1 {
    padding: 72px 16px 16px;
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  #hero p {
    padding: 0 16px;
    font-size: 0.9rem;
  }

  #hero p:last-of-type {
    padding-bottom: 72px;
  }

  section {
    padding: 40px 16px;
  }

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

  section h3 {
    font-size: 1.05rem;
    padding: 12px 16px;
    margin: 24px 0 10px;
  }

  section p {
    font-size: 0.9rem;
  }

  #news article {
    padding: 18px;
  }

  #news article h3 a {
    font-size: 0.95rem;
  }

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

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

  footer[role="contentinfo"] {
    padding: 24px 16px;
  }
}

@media (max-width: 480px) {
  #hero h1 {
    font-size: 1.35rem;
    padding: 64px 14px 12px;
  }

  #hero p:last-of-type {
    padding-bottom: 64px;
  }

  section {
    padding: 32px 14px;
  }

  section > h2 {
    font-size: 1.15rem;
  }

  section h3 {
    font-size: 0.95rem;
  }

  #product p,
  #faq h3 + p,
  #howto h3 + p {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 100px;
  border: 2px solid var(--bg);
}

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

/* ==================== SELECTION ==================== */
::selection {
  background: rgba(26, 115, 232, 0.2);
  color: var(--text);
}

/* ==================== FOCUS ==================== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

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