/* 全局重置与基础 */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #0b1a2e;
  --secondary: #1e3a5f;
  --accent: #f0c040;
  --accent-light: #f5d870;
  --bg-dark: #0d1117;
  --bg-card: rgba(255,255,255,0.06);
  --bg-glass: rgba(255,255,255,0.08);
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --border-glass: rgba(255,255,255,0.12);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --radius-card: 20px;
  --radius-btn: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 暗色模式（默认已是暗色，但保留变量以支持未来切换） */
@media (prefers-color-scheme: light) {
  :root {
    --bg-dark: #f5f7fa;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --bg-card: rgba(0,0,0,0.03);
    --bg-glass: rgba(255,255,255,0.7);
    --border-glass: rgba(0,0,0,0.08);
    --shadow-card: 0 8px 32px rgba(0,0,0,0.08);
  }
}

/* 滚动动画基础 */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

/* 渐变Banner (hero) */
#hero {
  position: relative;
  padding: 6rem 2rem 5rem;
  text-align: center;
  background: linear-gradient(135deg, #0b1a2e 0%, #1e3a5f 30%, #2a4a7f 60%, #0b1a2e 100%);
  background-size: 300% 300%;
  animation: gradientShift 12s ease infinite;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(240,192,64,0.08) 0%, transparent 60%),
              radial-gradient(circle at 70% 60%, rgba(255,255,255,0.04) 0%, transparent 50%);
  pointer-events: none;
}

#hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  animation: fadeInUp 0.8s ease forwards;
}

#hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.85);
  max-width: 640px;
  margin: 0.5rem auto 1.5rem;
  animation: fadeInUp 0.8s ease 0.15s forwards;
  opacity: 0;
}

#hero a {
  display: inline-block;
  padding: 0.9rem 2.4rem;
  background: var(--accent);
  color: #0b1a2e;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: var(--radius-btn);
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(240,192,64,0.3);
  animation: fadeInUp 0.8s ease 0.3s forwards;
  opacity: 0;
}

#hero a:hover {
  background: var(--accent-light);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(240,192,64,0.4);
}

/* 导航 */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background: rgba(11,26,46,0.75);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 2rem;
}

nav > a {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: var(--transition);
}

nav > a:hover { color: var(--accent-light); transform: scale(1.02); }

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0;
  position: relative;
  transition: var(--transition);
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

nav ul li a:hover {
  color: var(--text-primary);
}

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

/* 通用section样式 */
section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
  animation-timeline: view();
  animation-range: entry 0% entry 20%;
}

section h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin-top: 0.5rem;
  border-radius: 2px;
}

/* 圆角卡片通用 */
section ul, section ol {
  list-style: none;
  display: grid;
  gap: 1.5rem;
}

section li {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  padding: 1.8rem;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

section li:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  border-color: rgba(240,192,64,0.3);
}

section li h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--accent);
}

section li p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* 产品服务 - 4列 */
#products ul {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* 平台优势 - 3列 */
#features ul {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* 知识中心 - 两列 */
#knowledge-base ul {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

#knowledge-base ul li {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}

#knowledge-base ul li a {
  display: block;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

#knowledge-base ul li a:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: rgba(240,192,64,0.08);
}

/* FAQ 手风琴 */
#faq details {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

#faq details[open] {
  border-color: rgba(240,192,64,0.3);
}

#faq summary {
  padding: 1.2rem 1.8rem;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-primary);
  transition: var(--transition);
}

#faq summary::-webkit-details-marker { display: none; }

#faq summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--accent);
  transition: var(--transition);
}

#faq details[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}

#faq details[open] summary {
  border-bottom: 1px solid var(--border-glass);
}

#faq details p {
  padding: 1rem 1.8rem 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* HowTo 有序列表 */
#howto ol {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1.2rem;
}

#howto ol li {
  counter-increment: step;
  padding: 1.2rem 1.8rem 1.2rem 3.5rem;
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

#howto ol li:hover {
  transform: translateX(4px);
  border-color: rgba(240,192,64,0.3);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 1.2rem;
  top: 1.2rem;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #0b1a2e;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

#howto ol li strong {
  color: var(--accent);
}

#howto > p {
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 1rem 1.5rem;
  background: var(--bg-glass);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-glass);
}

/* 联系我们 */
#contact ul {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

#contact ul li {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  padding: 1.2rem 1.5rem;
  box-shadow: var(--shadow-card);
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
}

#contact ul li:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

/* 关于我们 - 段落样式 */
#about p {
  max-width: 800px;
  margin: 0 auto 1.2rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  text-align: center;
}

#about p:first-of-type {
  font-size: 1.1rem;
  color: var(--text-primary);
}

/* 页脚 */
footer {
  background: rgba(11,26,46,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-glass);
  padding: 2rem;
  text-align: center;
}

footer nav ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin-bottom: 1rem;
}

footer nav ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

footer nav ul li a:hover {
  color: var(--accent);
}

footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* 响应式布局 */
@media (max-width: 768px) {
  header { padding: 0; }
  nav {
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
  }
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
  }
  nav ul li a { font-size: 0.9rem; }

  section {
    padding: 3rem 1.2rem;
  }

  #hero {
    padding: 4rem 1.2rem 3.5rem;
  }

  #hero h1 { font-size: 1.9rem; }
  #hero p { font-size: 1rem; }

  #products ul,
  #features ul,
  #knowledge-base ul {
    grid-template-columns: 1fr;
  }

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

  section li {
    padding: 1.2rem;
  }

  #howto ol li {
    padding: 1rem 1.2rem 1rem 3rem;
  }

  #howto ol li::before {
    left: 0.8rem;
    top: 1rem;
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }

  footer nav ul {
    flex-direction: column;
    gap: 0.6rem;
  }
}

@media (max-width: 480px) {
  html { font-size: 15px; }
  #hero h1 { font-size: 1.6rem; }
  nav ul { gap: 0.8rem; }
  nav ul li a { font-size: 0.85rem; }
}

/* 滚动动画支持（渐进增强） */
@supports (animation-timeline: view()) {
  section {
    animation: fadeInUp 0.6s ease forwards;
    animation-timeline: view();
    animation-range: entry 0% entry 20%;
  }
}

@supports not (animation-timeline: view()) {
  section {
    opacity: 1;
    animation: none;
  }
}

/* 毛玻璃效果通用类（已在各元素中应用） */
/* 额外hover微交互 */
a, button, summary { cursor: pointer; }
::selection { background: rgba(240,192,64,0.3); color: #fff; }