:root {
  --primary: #6C5CE7;
  --primary-dark: #5A4BD1;
  --primary-light: #A29BFE;
  --accent: #FD79A8;
  --accent2: #00CEC9;
  --bg: #F8F9FE;
  --bg-alt: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --text: #2D3436;
  --text-secondary: #636E72;
  --text-light: #B2BEC3;
  --border: rgba(108, 92, 231, 0.12);
  --shadow: 0 8px 32px rgba(108, 92, 231, 0.10);
  --shadow-hover: 0 16px 48px rgba(108, 92, 231, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: 0.35s 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;
  --gradient: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 40%, #FD79A8 100%);
  --gradient-hero: linear-gradient(135deg, #6C5CE7 0%, #8B7CF6 30%, #A29BFE 60%, #FD79A8 100%);
  --gradient-accent: linear-gradient(135deg, #00CEC9 0%, #6C5CE7 100%);
}

[data-theme="dark"] {
  --primary: #A29BFE;
  --primary-dark: #8B7CF6;
  --primary-light: #6C5CE7;
  --accent: #FD79A8;
  --accent2: #00CEC9;
  --bg: #0F0E17;
  --bg-alt: #1A1A2E;
  --bg-card: rgba(26, 26, 46, 0.78);
  --bg-glass: rgba(26, 26, 46, 0.62);
  --text: #EDEDF0;
  --text-secondary: #A7A9BE;
  --text-light: #6B6D7E;
  --border: rgba(162, 155, 254, 0.15);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.5);
  --gradient-hero: linear-gradient(135deg, #2D1B69 0%, #3D2C8D 30%, #4A3AA8 60%, #6C5CE7 100%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #A29BFE;
    --primary-dark: #8B7CF6;
    --primary-light: #6C5CE7;
    --accent: #FD79A8;
    --accent2: #00CEC9;
    --bg: #0F0E17;
    --bg-alt: #1A1A2E;
    --bg-card: rgba(26, 26, 46, 0.78);
    --bg-glass: rgba(26, 26, 46, 0.62);
    --text: #EDEDF0;
    --text-secondary: #A7A9BE;
    --text-light: #6B6D7E;
    --border: rgba(162, 155, 254, 0.15);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.5);
    --gradient-hero: linear-gradient(135deg, #2D1B69 0%, #3D2C8D 30%, #4A3AA8 60%, #6C5CE7 100%);
  }
}

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

img, svg {
  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);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
}

::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);
}

/* ==================== 顶部导航栏 ==================== */

#siteHeader {
  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(--border);
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

#siteHeader.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.logo-area a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.logo-area a:hover {
  color: var(--primary);
}

.logo-area svg {
  border-radius: 12px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.logo-area a:hover svg {
  transform: rotate(-6deg) scale(1.08);
}

.logo-text {
  white-space: nowrap;
}

#mainNav {
  display: flex;
  align-items: center;
}

#mainNav ul {
  display: flex;
  gap: 4px;
}

#mainNav a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
}

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

#mainNav a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transition: transform var(--transition);
}

#mainNav a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.header-actions button:hover {
  color: var(--primary);
  background: rgba(108, 92, 231, 0.1);
  transform: scale(1.08);
}

.header-actions button:active {
  transform: scale(0.95);
}

#mobileMenuToggle {
  display: none;
}

/* 搜索框 */
.search-box {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 16px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-box form {
  display: flex;
  gap: 8px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 6px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.search-box input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-light);
}

.search-box button {
  padding: 10px 24px;
  background: var(--gradient);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.search-box button:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* ==================== 面包屑 ==================== */

.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 88px 24px 0;
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: 8px;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--text-secondary);
}

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

.breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

/* ==================== 主内容 ==================== */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ==================== 首屏 Banner ==================== */

.hero {
  position: relative;
  margin-top: 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gradient-hero);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(108, 92, 231, 0.3);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(253,121,168,0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-slider {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 60px 48px;
  z-index: 1;
}

.slide {
  display: none;
  animation: fadeInUp 0.6s ease;
  max-width: 720px;
}

.slide.active {
  display: block;
}

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

.slide h1,
.slide h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.slide p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
  margin-bottom: 28px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.1);
}

.btn-primary {
  display: inline-block;
  padding: 14px 36px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary) !important;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(108,92,231,0.1), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  color: var(--primary-dark) !important;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(-1px);
}

.slider-dots {
  display: flex;
  gap: 10px;
  padding: 0 48px 32px;
  z-index: 1;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all var(--transition);
  padding: 0;
}

.dot.active {
  width: 32px;
  border-radius: 5px;
  background: #fff;
}

.dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* ==================== 数据统计 ==================== */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
  padding: 0 16px;
}

.stat-item {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.stat-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 6px;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==================== 通用 Section ==================== */

main > section:not(.hero):not(.stats) {
  margin-top: 80px;
  animation: fadeInUp 0.6s ease both;
}

main > section > h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 32px;
  position: relative;
  padding-left: 20px;
  letter-spacing: -0.01em;
}

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

main > section > h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
  line-height: 1.4;
}

main > section > p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

main > section > ul,
main > section > ol {
  margin-bottom: 16px;
  padding-left: 0;
}

main > section > ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

main > section > ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient);
}

main > section > ol {
  counter-reset: ol-counter;
}

main > section > ol li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  counter-increment: ol-counter;
}

main > section > ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

main > section strong {
  color: var(--text);
  font-weight: 600;
}

/* ==================== 卡片式内容块 ==================== */

#about,
#products,
#solutions,
#applications,
#cases,
#news,
#tech,
#knowledge,
#howto,
#contact {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

#about:hover,
#products:hover,
#solutions:hover,
#applications:hover,
#cases:hover,
#news:hover,
#tech:hover,
#knowledge:hover,
#howto:hover,
#contact:hover {
  box-shadow: var(--shadow-hover);
}

#faq {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow);
}

/* ==================== 新闻文章 ==================== */

#news article {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

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

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

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

#news article h3 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 1.05rem;
  line-height: 1.5;
}

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

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

#news article time {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 10px;
  font-weight: 500;
}

#news article p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 12px;
  line-height: 1.7;
}

#news article > a:last-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  transition: all var(--transition);
}

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

#news article > a:last-child:hover {
  color: var(--primary-dark);
}

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

/* ==================== 客户评价 ==================== */

#cases blockquote {
  background: var(--bg-alt);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin-bottom: 14px;
  transition: all var(--transition);
  position: relative;
}

#cases blockquote::before {
  content: '"';
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 3rem;
  color: var(--primary-light);
  opacity: 0.3;
  font-family: Georgia, serif;
  line-height: 1;
}

#cases blockquote:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

#cases blockquote p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-style: italic;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* ==================== FAQ ==================== */

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-alt);
  transition: all var(--transition);
}

.faq-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
}

.faq-question {
  padding: 18px 24px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  position: relative;
  padding-right: 48px;
  transition: color var(--transition);
  margin: 0;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--primary);
  transition: transform var(--transition);
}

.faq-item:hover .faq-question {
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 24px;
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.8;
  padding-bottom: 18px;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-item.open .faq-question::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-item.open .faq-question {
  color: var(--primary);
}

/* ==================== 网站地图 & 友情链接 ==================== */

#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#sitemap li,
#links li {
  margin: 0;
}

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 18px;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

#sitemap a:hover,
#links a:hover {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.3);
}

/* ==================== 联系我们 ==================== */

#contact ul li {
  padding-left: 0;
}

#contact ul li::before {
  display: none;
}

#contact ul li strong {
  display: inline-block;
  min-width: 80px;
  color: var(--text);
}

#contact a {
  color: var(--primary);
  font-weight: 500;
}

#contact a:hover {
  text-decoration: underline;
}

/* ==================== 页脚 ==================== */

footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 64px 24px 0;
  margin-top: 80px;
  transition: background var(--transition);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-col h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--gradient);
}

.footer-col p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.8;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: all var(--transition);
  display: inline-block;
}

.footer-col ul a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.footer-col ul li:not(:has(a)) {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer-legal {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 40px;
}

.footer-legal h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.footer-legal p {
  color: var(--text-light);
  font-size: 0.82rem;
  line-height: 1.7;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-light);
  font-size: 0.82rem;
  margin-bottom: 4px;
}

/* ==================== 返回顶部 ==================== */

#backToTop {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(108, 92, 231, 0.4);
  transition: all var(--transition);
  z-index: 999;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  pointer-events: none;
}

#backToTop:not([hidden]) {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#backToTop:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 36px rgba(108, 92, 231, 0.55);
}

#backToTop:active {
  transform: translateY(-2px) scale(1.02);
}

/* ==================== 滚动动画 ==================== */

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }

/* ==================== 响应式 - 平板 ==================== */

@media (max-width: 1024px) {
  .header-inner {
    padding: 0 20px;
  }

  #mainNav a {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  .hero-slider {
    padding: 48px 36px;
  }

  .slide h1,
  .slide h2 {
    font-size: 1.8rem;
  }

  .slider-dots {
    padding: 0 36px 28px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 900px) {
  #mainNav {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px 24px;
    box-shadow: var(--shadow);
    animation: slideDown 0.3s ease;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }

  #mainNav.open {
    display: block;
  }

  #mainNav ul {
    flex-direction: column;
    gap: 2px;
  }

  #mainNav a {
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
  }

  #mainNav a::after {
    display: none;
  }

  #mobileMenuToggle {
    display: flex;
  }

  .hero {
    min-height: 360px;
    border-radius: var(--radius);
  }

  .hero-slider {
    padding: 40px 28px;
  }

  .slide h1,
  .slide h2 {
    font-size: 1.55rem;
  }

  .slide p {
    font-size: 0.95rem;
  }

  .btn-primary {
    padding: 12px 28px;
    font-size: 0.9rem;
  }

  .slider-dots {
    padding: 0 28px 24px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: -30px;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  main > section:not(.hero):not(.stats) {
    margin-top: 56px;
  }

  main > section > h2 {
    font-size: 1.4rem;
    margin-bottom: 24px;
  }

  #about,
  #products,
  #solutions,
  #applications,
  #cases,
  #news,
  #tech,
  #knowledge,
  #howto,
  #contact,
  #faq {
    padding: 32px 24px;
    border-radius: var(--radius);
  }

  .footer-legal {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ==================== 响应式 - 手机 ==================== */

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

  .header-inner {
    padding: 0 16px;
    height: 60px;
  }

  .logo-area svg {
    width: 34px;
    height: 34px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .header-actions button {
    width: 36px;
    height: 36px;
  }

  #mainNav {
    top: 60px;
    max-height: calc(100vh - 60px);
  }

  .breadcrumb {
    padding: 76px 16px 0;
    font-size: 0.8rem;
  }

  main {
    padding: 0 16px 60px;
  }

  .hero {
    min-height: 320px;
    border-radius: var(--radius-sm);
    margin-top: 16px;
  }

  .hero-slider {
    padding: 32px 20px;
  }

  .slide h1,
  .slide h2 {
    font-size: 1.3rem;
    margin-bottom: 12px;
  }

  .slide p {
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .btn-primary {
    padding: 11px 24px;
    font-size: 0.85rem;
  }

  .slider-dots {
    padding: 0 20px 20px;
    gap: 8px;
  }

  .dot {
    width: 8px;
    height: 8px;
  }

  .dot.active {
    width: 24px;
  }

  .stats {
    gap: 10px;
    padding: 0 8px;
    margin-top: -24px;
  }

  .stat-item {
    padding: 20px 12px;
    border-radius: var(--radius-sm);
  }

  .stat-number {
    font-size: 1.35rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  main > section:not(.hero):not(.stats) {
    margin-top: 40px;
  }

  main > section > h2 {
    font-size: 1.2rem;
    padding-left: 16px;
    margin-bottom: 20px;
  }

  main > section > h2::before {
    width: 4px;
  }

  main > section > h3 {
    font-size: 1.02rem;
    margin-top: 24px;
  }

  main > section > p {
    font-size: 0.88rem;
  }

  main > section > ul li,
  main > section > ol li {
    font-size: 0.88rem;
  }

  #about,
  #products,
  #solutions,
  #applications,
  #cases,
  #news,
  #tech,
  #knowledge,
  #howto,
  #contact,
  #faq {
    padding: 24px 18px;
    border-radius: var(--radius-sm);
  }

  #news article {
    padding: 18px 20px;
    border-radius: var(--radius-sm);
  }

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

  #news article p {
    font-size: 0.84rem;
  }

  #cases blockquote {
    padding: 16px 18px;
  }

  .faq-question {
    padding: 14px 18px;
    padding-right: 42px;
    font-size: 0.9rem;
  }

  .faq-question::after {
    right: 18px;
  }

  .faq-answer {
    padding: 0 18px;
  }

  .faq-answer p {
    font-size: 0.86rem;
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 32px;
  }

  footer {
    padding: 40px 16px 0;
    margin-top: 56px;
  }

  .footer-legal {
    padding: 28px 0;
    gap: 20px;
  }

  .footer-legal p {
    font-size: 0.78rem;
  }

  #backToTop {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  .search-box {
    padding: 0 16px 12px;
  }

  .search-box input {
    padding: 8px 12px;
    font-size: 0.88rem;
  }

  .search-box button {
    padding: 8px 18px;
    font-size: 0.85rem;
  }
}

@media (max-width: 360px) {
  .slide h1,
  .slide h2 {
    font-size: 1.15rem;
  }

  .slide p {
    font-size: 0.82rem;
  }

  .stat-number {
    font-size: 1.2rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

/* ==================== 无障碍与动效偏好 ==================== */

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

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}

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

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* ==================== 打印样式 ==================== */

@media print {
  #siteHeader,
  #backToTop,
  .slider-dots,
  .search-box,
  .header-actions {
    display: none !important;
  }

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

  .hero {
    background: #f0f0f0;
    min-height: auto;
    box-shadow: none;
  }

  .slide h1,
  .slide h2,
  .slide p {
    color: #000;
    text-shadow: none;
  }

  .btn-primary {
    display: none;
  }

  main > section:not(.hero):not(.stats) {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}