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

:root {
  --primary: #0a192f;
  --primary-light: #112240;
  --primary-dark: #060f1e;
  --accent: #64ffda;
  --accent-hover: #45e0be;
  --text: #ccd6f6;
  --text-light: #8892b0;
  --text-dark: #233554;
  --bg-card: rgba(17, 34, 64, 0.7);
  --bg-glass: rgba(17, 34, 64, 0.4);
  --border: rgba(100, 255, 218, 0.2);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-hover);
  text-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
}

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

ul, ol {
  list-style: none;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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

/* ===== 滚动动画（通用） ===== */
section {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 0.8s ease forwards;
}

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

/* 每个 section 依次延迟 */
section:nth-of-type(1) { animation-delay: 0.1s; }
section:nth-of-type(2) { animation-delay: 0.2s; }
section:nth-of-type(3) { animation-delay: 0.3s; }
section:nth-of-type(4) { animation-delay: 0.4s; }
section:nth-of-type(5) { animation-delay: 0.5s; }
section:nth-of-type(6) { animation-delay: 0.6s; }
section:nth-of-type(7) { animation-delay: 0.7s; }
section:nth-of-type(8) { animation-delay: 0.8s; }
section:nth-of-type(9) { animation-delay: 0.9s; }
section:nth-of-type(10) { animation-delay: 1.0s; }
section:nth-of-type(11) { animation-delay: 1.1s; }
section:nth-of-type(12) { animation-delay: 1.2s; }
section:nth-of-type(13) { animation-delay: 1.3s; }

/* ===== 头部导航 ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  transition: var(--transition);
}

header:hover {
  background: rgba(10, 25, 47, 0.95);
}

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

nav > a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 1px;
}

nav > a span {
  background: linear-gradient(135deg, var(--accent), #45e0be);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav ul {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav ul li a {
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: var(--transition);
}

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

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

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

#darkModeToggle,
#menuToggle {
  background: none;
  border: 2px solid var(--border);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

#darkModeToggle:hover,
#menuToggle:hover {
  background: var(--accent);
  color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
}

#menuToggle {
  display: none;
}

/* ===== Hero ===== */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 30%, var(--primary-light) 70%, var(--primary-dark) 100%);
}

#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(100, 255, 218, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(100, 255, 218, 0.05) 0%, transparent 40%);
  animation: gradientShift 15s ease infinite;
  pointer-events: none;
}

@keyframes gradientShift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(5%, 5%) rotate(2deg); }
  50% { transform: translate(-5%, -2%) rotate(-1deg); }
  75% { transform: translate(3%, -5%) rotate(1deg); }
}

#hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #45e0be, #a8ffec);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 40px rgba(100, 255, 218, 0.2);
}

#hero p {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-light);
  max-width: 700px;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

#hero a[role="button"] {
  display: inline-block;
  padding: 14px 40px;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 50px;
  transition: var(--transition);
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 20px rgba(100, 255, 218, 0.3);
}

#hero a[role="button"]:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 40px rgba(100, 255, 218, 0.5);
  background: var(--accent-hover);
}

/* ===== 通用 Section ===== */
section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 2rem;
}

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

section h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 4px;
}

section p {
  color: var(--text-light);
  max-width: 800px;
  margin-bottom: 1.2rem;
}

section ul, section ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

section ul li, section ol li {
  color: var(--text-light);
  margin-bottom: 0.6rem;
  position: relative;
  padding-left: 1.2rem;
}

section ul li::before {
  content: '▸';
  position: absolute;
  left: -0.5rem;
  color: var(--accent);
  font-weight: 700;
}

section ol li {
  counter-increment: step;
  padding-left: 0.5rem;
}

section ol li::before {
  content: counter(step) '.';
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.5rem;
}

/* ===== 圆角卡片（通用） ===== */
section > div,
section article,
blockquote,
details {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

section > div:hover,
section article:hover,
details:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
}

/* ===== About ===== */
#about {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius);
  margin: 2rem auto;
  padding: 3rem 2rem;
  border: 1px solid var(--border);
}

#about p strong {
  color: var(--accent);
}

#about p em {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ===== Products ===== */
#products > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  background: none;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
  padding: 0;
}

#products > div:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

#products article {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
}

#products article h3 {
  color: var(--accent);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

/* ===== Services & Solutions ===== */
#services ul li,
#solutions ul li {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  margin-bottom: 0.8rem;
  border: 1px solid var(--border);
  transition: var(--transition);
}

#services ul li:hover,
#solutions ul li:hover {
  background: rgba(100, 255, 218, 0.1);
  border-color: var(--accent);
  transform: translateX(8px);
}

#services ul li::before,
#solutions ul li::before {
  display: none;
}

/* ===== Features ===== */
#features ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  padding-left: 0;
}

#features ul li {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  text-align: center;
}

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

#features ul li strong {
  display: block;
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

#features ul li:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
}

/* ===== Testimonials ===== */
#testimonials blockquote {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 4px solid var(--accent);
  padding: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
}

#testimonials blockquote p {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text);
}

#testimonials blockquote footer {
  color: var(--accent);
  font-weight: 600;
  margin-top: 1rem;
  font-style: normal;
}

/* ===== Knowledge Base ===== */
#knowledge-base article {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

#knowledge-base article h3 {
  color: var(--accent);
  margin-bottom: 0.8rem;
}

/* ===== FAQ ===== */
#faq details {
  margin-bottom: 1rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

#faq details[open] {
  border-color: var(--accent);
  background: rgba(100, 255, 218, 0.05);
}

#faq summary {
  font-weight: 600;
  color: var(--text);
  font-size: 1.05rem;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

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

#faq details p {
  margin-top: 1rem;
  color: var(--text-light);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ===== HowTo ===== */
#howto ol {
  padding-left: 1.5rem;
  counter-reset: step;
}

#howto ol li {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  margin-bottom: 0.8rem;
  border: 1px solid var(--border);
  transition: var(--transition);
}

#howto ol li:hover {
  background: rgba(100, 255, 218, 0.1);
  border-color: var(--accent);
  transform: translateX(8px);
}

#howto ol li::before {
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.8rem;
}

/* ===== Articles ===== */
#articles ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  padding-left: 0;
}

#articles ul li {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  transition: var(--transition);
}

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

#articles ul li a {
  color: var(--text-light);
  font-weight: 500;
}

#articles ul li a:hover {
  color: var(--accent);
}

#articles ul li:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ===== Resources ===== */
#resources ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  padding-left: 0;
}

#resources ul li {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}

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

#resources ul li strong {
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

#resources ul li:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ===== Contact ===== */
#contact address {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  font-style: normal;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

#contact address p {
  color: var(--text-light);
  padding: 0.8rem 1rem;
  background: rgba(100, 255, 218, 0.05);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

#contact address p:hover {
  border-color: var(--accent);
  background: rgba(100, 255, 218, 0.1);
}

/* ===== Footer ===== */
footer {
  background: var(--primary-dark);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 3rem;
}

footer nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding-left: 0;
}

footer nav ul li {
  padding-left: 0;
}

footer nav ul li::before {
  display: none;
}

footer nav ul li a {
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
}

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

footer p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

footer p:last-child {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 1px;
}

/* ===== Back to Top ===== */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(100, 255, 218, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backToTop:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 40px rgba(100, 255, 218, 0.5);
  background: var(--accent-hover);
}

/* ===== 暗色模式（额外增强） ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #0a192f;
    --primary-light: #112240;
    --primary-dark: #060f1e;
    --text: #ccd6f6;
    --text-light: #8892b0;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  section {
    padding: 4rem 1.5rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 0 1rem;
  }

  nav ul {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
  }

  nav ul.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  #menuToggle {
    display: block;
  }

  #hero {
    padding: 5rem 1.5rem 3rem;
  }

  #hero h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
  }

  section {
    padding: 3rem 1.2rem;
  }

  #products > div {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  #backToTop {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
}

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

  nav > a {
    font-size: 1.2rem;
  }

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

  section {
    padding: 2rem 1rem;
  }

  #about {
    padding: 2rem 1rem;
  }
}

/* ===== 工具类 ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== 暗黑模式切换效果（body 类） ===== */
body.dark {
  --primary: #0a192f;
  --primary-light: #112240;
  --primary-dark: #060f1e;
  --text: #ccd6f6;
  --text-light: #8892b0;
}

body.light {
  --primary: #f0f4f8;
  --primary-light: #ffffff;
  --primary-dark: #d9e2ec;
  --text: #1a202c;
  --text-light: #4a5568;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.4);
  --border: rgba(100, 255, 218, 0.4);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}