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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f8f9fa;
  transition: background 0.3s, color 0.3s;
}

body.dark {
  background: #1a1a2e;
  color: #e0e0e0;
}

a {
  color: #1a73e8;
  text-decoration: none;
  transition: color 0.3s;
}

body.dark a {
  color: #66b0ff;
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===== 头部 ===== */
header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s, box-shadow 0.3s;
}

body.dark header {
  background: #16213e;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo svg {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.logo span {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark .logo span {
  background: linear-gradient(135deg, #66b0ff, #1a73e8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== 导航 ===== */
nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
  align-items: center;
}

nav ul li a {
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.3s, color 0.3s;
  white-space: nowrap;
}

nav ul li a:hover {
  background: #e8f0fe;
}

body.dark nav ul li a:hover {
  background: #2a3a5c;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #333;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.3s;
}

body.dark .menu-toggle {
  color: #e0e0e0;
}

.menu-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.dark .menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    gap: 10px;
  }

  body.dark nav ul {
    background: #16213e;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  }

  nav ul.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

/* ===== 暗色切换按钮 ===== */
.dark-toggle {
  background: none;
  border: 2px solid #ccc;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  color: #333;
  padding: 0;
  line-height: 1;
}

body.dark .dark-toggle {
  color: #e0e0e0;
  border-color: #666;
}

.dark-toggle:hover {
  background: #e8f0fe;
}

body.dark .dark-toggle:hover {
  background: #2a3a5c;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  background: transparent;
  padding: 10px 0;
  font-size: 0.9rem;
  color: #666;
}

body.dark .breadcrumb {
  color: #aaa;
}

.breadcrumb a {
  color: #1a73e8;
}

body.dark .breadcrumb a {
  color: #66b0ff;
}

.breadcrumb span {
  margin: 0 5px;
  color: #999;
}

/* ===== Hero 区域 ===== */
.hero {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  color: #fff;
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  animation: heroGlow 10s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroGlow {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(30px, 30px);
  }
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #fff, #a8d0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 30px;
  position: relative;
  z-index: 1;
  opacity: 0.9;
}

.hero .btn-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hero .btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  cursor: pointer;
  text-decoration: none;
}

.hero .btn-primary {
  background: #1a73e8;
  color: #fff;
  border: 2px solid transparent;
}

.hero .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(26, 115, 232, 0.4);
}

.hero .btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .hero {
    padding: 60px 20px;
  }

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

  .hero p {
    font-size: 1rem;
  }

  .hero .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }
}

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

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 50px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #1a73e8, #0d47a1);
  margin: 15px auto 0;
  border-radius: 2px;
}

@media (max-width: 480px) {
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
  }
}

/* ===== 卡片 ===== */
.card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.dark .card {
  background: rgba(30, 40, 70, 0.9);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

body.dark .card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.card h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.card p {
  color: #555;
  line-height: 1.7;
}

body.dark .card p {
  color: #bbb;
}

/* ===== 网格布局 ===== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 25px;
}

@media (max-width: 992px) {
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ===== 轮播 ===== */
.carousel {
  overflow: hidden;
  position: relative;
  border-radius: 16px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  padding: 40px;
  background: linear-gradient(135deg, #e8f0fe, #fff);
  text-align: center;
}

body.dark .carousel-slide {
  background: linear-gradient(135deg, #1a2a4a, #16213e);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 10;
  transition: background 0.3s, transform 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.05);
}

.carousel-btn.prev {
  left: 15px;
}

.carousel-btn.next {
  right: 15px;
}

@media (max-width: 768px) {
  .carousel-slide {
    padding: 30px 20px;
  }

  .carousel-btn {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
}

/* ===== 滚动动画 ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== 计数器 ===== */
.counter-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.counter-item {
  text-align: center;
  padding: 20px;
}

.counter-item .number {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

body.dark .counter-item .number {
  background: linear-gradient(135deg, #66b0ff, #1a73e8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.counter-item .label {
  font-size: 1rem;
  color: #666;
  margin-top: 8px;
}

body.dark .counter-item .label {
  color: #aaa;
}

@media (max-width: 480px) {
  .counter-item .number {
    font-size: 2rem;
  }

  .counter-grid {
    gap: 20px;
  }
}

/* ===== FAQ ===== */
.faq-item {
  border-bottom: 1px solid #e0e0e0;
  padding: 15px 0;
}

body.dark .faq-item {
  border-color: #333;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 10px 0;
  user-select: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 10px;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 10px;
  color: #555;
  line-height: 1.7;
}

body.dark .faq-answer {
  color: #bbb;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 10px;
}

/* ===== HowTo ===== */
.howto-step {
  padding: 20px;
  border-left: 4px solid #1a73e8;
  margin-bottom: 20px;
  border-radius: 0 12px 12px 0;
  background: rgba(26, 115, 232, 0.05);
}

body.dark .howto-step {
  background: rgba(26, 115, 232, 0.1);
}

.howto-step h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.howto-step p {
  color: #555;
  line-height: 1.7;
}

body.dark .howto-step p {
  color: #bbb;
}

/* ===== 文章卡片 ===== */
.article-card img,
.article-card svg {
  border-radius: 12px;
  margin-bottom: 15px;
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #e0e0e0;
}

.article-card h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.article-card .date {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 10px;
}

body.dark .article-card .date {
  color: #aaa;
}

.article-card p {
  margin-bottom: 15px;
  color: #555;
  line-height: 1.6;
}

body.dark .article-card p {
  color: #bbb;
}

.article-card .read-more {
  color: #1a73e8;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.3s;
}

.article-card .read-more:hover {
  gap: 10px;
}

/* ===== 评价卡片 ===== */
.testimonial-card {
  text-align: center;
  padding: 30px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.dark .testimonial-card {
  background: rgba(30, 40, 70, 0.8);
}

.testimonial-card .avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin: 0 auto 15px;
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
}

.testimonial-card .name {
  font-weight: 600;
  margin-bottom: 5px;
}

.testimonial-card .role {
  color: #888;
  font-size: 0.9rem;
}

body.dark .testimonial-card .role {
  color: #aaa;
}

.testimonial-card p {
  font-style: italic;
  margin-bottom: 15px;
  line-height: 1.6;
}

/* ===== 合作伙伴 ===== */
.partner-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

.partner-item {
  padding: 15px 25px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  font-weight: 600;
  color: #555;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: transform 0.3s, background 0.3s;
}

body.dark .partner-item {
  background: rgba(30, 40, 70, 0.7);
  color: #ccc;
}

.partner-item:hover {
  transform: scale(1.05);
}

/* ===== 搜索框 ===== */
.search-box {
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 20px auto;
}

.search-box input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}

body.dark .search-box input {
  background: #2a3a5c;
  border-color: #444;
  color: #e0e0e0;
}

.search-box input:focus {
  border-color: #1a73e8;
}

.search-box button {
  padding: 12px 25px;
  border-radius: 50px;
  background: #1a73e8;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s, transform 0.3s;
  white-space: nowrap;
}

.search-box button:hover {
  background: #0d47a1;
  transform: translateY(-2px);
}

/* ===== 返回顶部 ===== */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #1a73e8;
  color: #fff;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.3s;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

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

#back-to-top:hover {
  transform: translateY(-3px);
  background: #0d47a1;
}

@media (max-width: 768px) {
  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

/* ===== 页脚 ===== */
footer {
  background: #1a1a2e;
  color: #ccc;
  padding: 50px 20px 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-grid h4 {
  color: #fff;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

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

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

.footer-grid ul li a {
  color: #aaa;
  transition: color 0.3s;
}

.footer-grid ul li a:hover {
  color: #fff;
}

.footer-grid p {
  color: #aaa;
  line-height: 1.6;
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  margin-top: 30px;
  text-align: center;
  font-size: 0.9rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-bottom a {
  color: #66b0ff;
}

.footer-bottom p {
  margin-bottom: 5px;
  color: #aaa;
}

/* ===== 额外背景色 ===== */
section[style*="background:#f0f4ff"] {
  background: #f0f4ff;
}

body.dark section[style*="background:#f0f4ff"] {
  background: #12182b;
}

/* ===== 导航高亮（JS辅助类） ===== */
nav ul li a.active {
  background: #e8f0fe;
}

body.dark nav ul li a.active {
  background: #2a3a5c;
}

/* ===== 响应式微调 ===== */
@media (max-width: 768px) {
  section {
    padding: 40px 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .card {
    padding: 20px;
  }

  .hero .btn-group {
    flex-direction: column;
    align-items: center;
  }

  .hero .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
}

/* ===== 打印样式 ===== */
@media print {
  header,
  footer,
  #back-to-top,
  .menu-toggle,
  .dark-toggle,
  .carousel-btn,
  .search-box {
    display: none !important;
  }

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

  .card {
    box-shadow: none !important;
    border: 1px solid #ddd;
  }

  .hero {
    background: #f0f4ff !important;
    color: #333 !important;
    padding: 40px 20px;
  }

  .hero h1 {
    -webkit-text-fill-color: #1a73e8 !important;
    color: #1a73e8 !important;
  }

  .hero p {
    color: #555 !important;
  }
}