:root {
  --bg-body: #f5f8fc;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.78);
  --bg-glass-strong: rgba(255, 255, 255, 0.92);
  --text-primary: #0b1e33;
  --text-secondary: #3f566e;
  --accent: #1e6f9f;
  --accent-2: #2fa4d8;
  --accent-light: #e1eef8;
  --border: #d4e0ea;
  --shadow: 0 8px 24px rgba(11, 30, 51, 0.08);
  --shadow-lg: 0 16px 44px rgba(11, 30, 51, 0.14);
  --radius: 16px;
  --radius-sm: 12px;
  --nav-height: 68px;
  --gradient-hero: linear-gradient(135deg, #0b1e33 0%, #14456b 48%, #1e6f9f 100%);
  --gradient-banner: linear-gradient(135deg, #e1eef8 0%, #f5f8fc 55%, #dcecf9 100%);
  --gradient-accent: linear-gradient(135deg, #1e6f9f 0%, #2fa4d8 100%);
}

[data-theme="dark"] {
  --bg-body: #0d141c;
  --bg-card: #16212e;
  --bg-glass: rgba(13, 20, 28, 0.72);
  --bg-glass-strong: rgba(13, 20, 28, 0.92);
  --text-primary: #e8f0f8;
  --text-secondary: #a6b8cc;
  --accent: #4a9edd;
  --accent-2: #6fc0f0;
  --accent-light: #1a2a3a;
  --border: #2a3b4e;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.62);
  --gradient-hero: linear-gradient(135deg, #06101b 0%, #0e2a44 52%, #16405f 100%);
  --gradient-banner: linear-gradient(135deg, #1a2a3a 0%, #16212e 55%, #1d3247 100%);
  --gradient-accent: linear-gradient(135deg, #2f7fb8 0%, #4a9edd 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

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

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ===== 导航吸顶 · 毛玻璃 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-glass-strong);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header:hover {
  box-shadow: 0 4px 20px rgba(11, 30, 51, 0.06);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo:hover {
  text-decoration: none;
  opacity: 0.88;
}

.logo svg {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(30, 111, 159, 0.28);
  transition: transform 0.3s ease;
}

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

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
  font-weight: 500;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
  text-decoration: none;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-accent);
  transition: width 0.28s ease;
}

.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 4px 4px 4px 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 111, 159, 0.14);
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  width: 140px;
}

.search-box input::placeholder {
  color: var(--text-secondary);
  opacity: 0.75;
}

.search-box button {
  background: var(--gradient-accent);
  border: none;
  color: #fff;
  border-radius: 40px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.search-box button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.theme-toggle,
.mobile-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.theme-toggle:hover,
.mobile-toggle:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.theme-toggle:active,
.mobile-toggle:active {
  transform: translateY(0) scale(0.94);
}

.mobile-toggle {
  display: none;
}

/* ===== 移动菜单 ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--nav-height));
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 999;
  padding: 24px;
  flex-direction: column;
  gap: 18px;
  border-top: 1px solid var(--border);
  overflow-y: auto;
  animation: menuSlide 0.28s ease;
}

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

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 1.1rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-menu a:hover {
  color: var(--accent);
  padding-left: 8px;
  text-decoration: none;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 6px;
  color: var(--text-secondary);
}

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

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

/* ===== 首屏 ===== */
.hero {
  background: var(--gradient-hero);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 48px 0 56px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126, 200, 255, 0.28) 0%, transparent 68%);
  z-index: 0;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -8%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 164, 216, 0.22) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
  max-width: 800px;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.22);
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.92;
  max-width: 700px;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 24px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: #7ec8ff;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.82;
}

/* ===== Banner 轮播 ===== */
.banner-carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 32px 0;
  box-shadow: var(--shadow-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.banner-slides {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

.banner-slide {
  min-width: 100%;
  padding: 40px 32px;
  background: var(--gradient-banner);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.banner-slide h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 700;
}

.banner-slide p {
  color: var(--text-secondary);
  max-width: 600px;
  font-size: 0.98rem;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
}

.banner-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, width 0.25s ease;
}

.banner-dots span:hover {
  transform: scale(1.25);
}

.banner-dots span.active {
  background: var(--gradient-accent);
  width: 26px;
  border-radius: 6px;
}

/* ===== 通用 Section ===== */
.section {
  padding: 48px 0;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: var(--gradient-accent);
}

.section-sub {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1rem;
}

/* ===== 卡片网格 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.card:hover::before {
  transform: scaleX(1);
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.card ul {
  list-style: none;
  padding: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 2;
}

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

.card ul a:hover {
  color: var(--accent);
}

/* ===== 文章列表 ===== */
.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.article-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow 0.28s ease, transform 0.28s ease, border-color 0.28s ease;
  display: flex;
  flex-direction: column;
}

.article-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--accent);
}

.article-item h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--text-primary);
  line-height: 1.5;
}

.article-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  opacity: 0.85;
}

.article-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  flex-grow: 1;
}

.read-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  align-self: flex-start;
  transition: transform 0.2s ease, letter-spacing 0.2s ease;
}

.read-more:hover {
  text-decoration: none;
  transform: translateX(4px);
  letter-spacing: 0.3px;
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

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

.faq-question {
  padding: 18px 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  user-select: none;
  gap: 16px;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: var(--accent-light);
}

.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  line-height: 1;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding: 0 20px 20px;
}

/* ===== HowTo 步骤 ===== */
.howto-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  counter-reset: step;
}

.howto-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius-sm);
  transition: background 0.25s ease, transform 0.25s ease;
}

.howto-step:hover {
  background: var(--accent-light);
  transform: translateX(4px);
}

.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(30, 111, 159, 0.3);
}

.step-content h4 {
  font-size: 1.05rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== 联系 ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.contact-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.contact-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.contact-item svg {
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  color: var(--accent);
  transition: transform 0.3s ease;
}

.contact-item:hover svg {
  transform: scale(1.15) rotate(-4deg);
}

.contact-item h4 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.contact-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  word-break: break-word;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 48px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.footer-col ul {
  list-style: none;
}

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

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-col a:hover {
  color: var(--accent);
  padding-left: 4px;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  gap: 12px;
}

/* ===== 返回顶部 ===== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(30, 111, 159, 0.42);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.25s ease, filter 0.25s ease;
  z-index: 900;
  font-size: 1.2rem;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
  filter: brightness(1.1);
}

.back-to-top:active {
  transform: translateY(-2px) scale(0.98);
}

/* ===== 滚动动画 ===== */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: opacity, transform;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 焦点可见性（无障碍） ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .nav-links {
    gap: 18px;
    font-size: 0.9rem;
  }
  .search-box input {
    width: 110px;
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
  .search-box {
    display: none;
  }
  .hero h1 {
    font-size: 1.6rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .hero-stats {
    gap: 20px;
  }
  .stat-number {
    font-size: 1.5rem;
  }
  .banner-slide {
    padding: 32px 24px;
  }
  .banner-slide h3 {
    font-size: 1.3rem;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }
  .hero {
    padding: 32px 0 40px;
    border-radius: 0 0 12px 12px;
  }
  .hero h1 {
    font-size: 1.4rem;
  }
  .hero p {
    font-size: 0.95rem;
  }
  .hero-stats {
    gap: 16px;
  }
  .stat-item {
    min-width: 40%;
  }
  .section {
    padding: 32px 0;
  }
  .section-title {
    font-size: 1.4rem;
  }
  .section-sub {
    font-size: 0.92rem;
    margin-bottom: 24px;
  }
  .card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .article-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .footer-grid {
    gap: 24px;
  }
  .banner-slide {
    padding: 26px 18px;
  }
  .banner-slide h3 {
    font-size: 1.15rem;
  }
  .banner-slide p {
    font-size: 0.9rem;
  }
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
  .howto-step {
    padding: 12px 8px;
  }
  .step-num {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    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;
  }
  .fade-up {
    opacity: 1;
    transform: none;
  }
}

/* ===== 打印样式 ===== */
@media print {
  .site-header,
  .mobile-menu,
  .back-to-top,
  .banner-carousel,
  .search-box {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .card,
  .article-item,
  .faq-item {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}