/* ===== 全局重置与基础 ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --primary: #1e3a5f;
  --primary-light: #2a5298;
  --accent: #ff6b35;
  --accent-hover: #e55a2b;
  --bg: #f5f7fa;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-glass: rgba(255, 255, 255, 0.2);
  --text: #1a1a2e;
  --text-secondary: #4a4a6a;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
}
[data-theme="dark"] {
  --primary: #2a5298;
  --primary-light: #3b6cb5;
  --accent: #ff8c42;
  --accent-hover: #e67330;
  --bg: #0d0d1a;
  --bg-card: rgba(30, 30, 47, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --text: #e8e8f0;
  --text-secondary: #a0a0c0;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
ul, ol {
  list-style: none;
}
img, svg {
  display: block;
  max-width: 100%;
}
button {
  cursor: pointer;
  font: inherit;
  border: none;
  background: none;
}
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
p { margin-bottom: 0.75rem; }
section {
  padding: 4rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.7s ease forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }
section:nth-child(7) { animation-delay: 0.6s; }
section:nth-child(8) { animation-delay: 0.7s; }
section:nth-child(9) { animation-delay: 0.8s; }
section:nth-child(10) { animation-delay: 0.9s; }
/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* ===== 头部导航 ===== */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  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);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  gap: 1rem;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-text {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
}
.nav-list {
  display: flex;
  gap: 1.5rem;
}
.nav-list a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}
.nav-list a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-list a:hover { color: var(--accent); }
.nav-list a:hover::after { width: 100%; }
.dark-mode-toggle, .mobile-nav-toggle {
  font-size: 1.4rem;
  padding: 0.3rem;
  border-radius: 50%;
  transition: background var(--transition);
  color: var(--text);
}
.dark-mode-toggle:hover, .mobile-nav-toggle:hover {
  background: var(--border);
}
.mobile-nav-toggle { display: none; }

/* ===== Hero ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 5rem;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  position: relative;
  overflow: hidden;
  max-width: 100%;
  border-radius: 0;
  margin: 0;
  opacity: 1;
  transform: none;
  animation: none;
}
#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(255,107,53,0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(42,82,152,0.2) 0%, transparent 50%);
  animation: heroGlow 10s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 5%) scale(1.05); }
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
  max-width: 700px;
}
#hero h1 {
  color: #fff;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-sub {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255,107,53,0.4);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(255,107,53,0.5);
}
.btn-secondary {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-3px);
}
.hero-trust {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 1px;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.about-grid article {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.about-grid article:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

/* ===== Products ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.products-grid article {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.products-grid article:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}
.products-grid a {
  margin-top: auto;
  color: var(--accent);
  font-weight: 600;
  transition: gap var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.products-grid a:hover { gap: 0.6rem; }

/* ===== Services ===== */
.services-list {
  display: grid;
  gap: 1rem;
}
.services-list li {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.5rem;
  border: 1px solid var(--border);
  transition: transform var(--transition), background var(--transition);
}
.services-list li:hover {
  transform: translateX(6px);
  background: var(--bg-glass);
}
.services-list strong {
  color: var(--accent);
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.features-grid > div {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.features-grid > div:hover {
  transform: translateY(-8px) rotate(0.5deg);
  box-shadow: 0 16px 48px rgba(0,0,0,0.08);
}
.feature-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

/* ===== Testimonials ===== */
#testimonials blockquote {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
#testimonials blockquote:hover {
  transform: scale(1.01);
}
#testimonials footer {
  margin-top: 0.5rem;
  font-style: italic;
  color: var(--text-secondary);
}

/* ===== FAQ ===== */
details {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
details:hover {
  box-shadow: var(--shadow);
}
summary {
  padding: 1rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 1.4rem;
  transition: transform var(--transition);
  color: var(--accent);
}
details[open] summary::after {
  content: '−';
}
details[open] summary {
  background: var(--bg-glass);
}
details p {
  padding: 0 1.5rem 1.2rem;
}

/* ===== HowTo ===== */
#howto ol {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}
#howto li {
  counter-increment: step;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.5rem 1.2rem 3.5rem;
  position: relative;
  border: 1px solid var(--border);
  transition: transform var(--transition);
}
#howto li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
#howto li:hover {
  transform: translateX(4px);
}

/* ===== Contact ===== */
#contact address {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-style: normal;
  display: grid;
  gap: 0.5rem;
}
#contact p {
  margin: 0;
  padding: 0.3rem 0;
}

/* ===== Footer ===== */
footer {
  background: var(--primary);
  color: #e0e0f0;
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 2rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.footer-col ul li {
  margin-bottom: 0.4rem;
}
.footer-col a {
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }
.footer-copy {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
  margin: 0;
}

/* ===== 移动导航覆盖 ===== */
#mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.3s;
}
#mobile-nav-overlay[hidden] {
  display: none;
}
.close-nav {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2rem;
  color: #fff;
}
#mobile-nav-overlay ul {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
#mobile-nav-overlay a {
  font-size: 1.5rem;
  color: #fff;
  font-weight: 500;
  transition: color var(--transition);
}
#mobile-nav-overlay a:hover { color: var(--accent); }

/* ===== 回到顶部 ===== */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 4px 16px rgba(255,107,53,0.4);
  z-index: 999;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
#back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255,107,53,0.5);
}
#back-to-top[hidden] {
  display: none;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .nav-list { display: none; }
  .mobile-nav-toggle { display: block; }
  section { padding: 3rem 1rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary { width: 100%; max-width: 280px; justify-content: center; }
  .about-grid, .products-grid, .features-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
  #hero h1 { font-size: 1.8rem; }
  .hero-sub { font-size: 1rem; }
}