/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 自定义属性 */
:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: rgba(255, 255, 255, 0.05);
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0b0;
  --accent: #4fc3f7;
  --accent2: #81c784;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius: 20px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 亮色模式 */
[data-theme="light"] {
  --bg-primary: #f5f5f9;
  --bg-secondary: #ffffff;
  --bg-card: rgba(0, 0, 0, 0.03);
  --text-primary: #1a1a2e;
  --text-secondary: #555;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* 基础样式 */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background 0.5s, color 0.5s;
  scroll-behavior: smooth;
}

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

a:hover {
  color: var(--accent2);
}

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

/* 容器 */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 头部 */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.5s, box-shadow 0.3s;
}

header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.logo svg {
  width: 40px;
  height: 40px;
}

/* 导航 */
nav ul {
  display: flex;
  list-style: none;
  gap: 28px;
}

nav ul li a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 15px;
  padding: 6px 0;
  position: relative;
  transition: color 0.3s;
}

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

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

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

/* 头部操作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border-radius: 30px;
  padding: 6px 16px;
  border: 1px solid var(--glass-border);
  transition: border 0.3s;
}

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

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

.search-box button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
}

.theme-toggle, .menu-toggle {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 18px;
  transition: background 0.3s, transform 0.3s;
}

.theme-toggle:hover, .menu-toggle:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
}

.menu-toggle {
  display: none;
}

/* 响应式导航 */
@media (max-width: 900px) {
  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--glass-border);
  }
  nav ul.open {
    display: flex;
  }
  .menu-toggle {
    display: flex;
  }
  .search-box input {
    width: 100px;
  }
}

/* 英雄区 */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 24px 80px;
  background: linear-gradient(135deg, var(--bg-primary) 0%, #16213e 50%, #0f3460 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79, 195, 247, 0.15), transparent);
  top: -200px;
  right: -200px;
  border-radius: 50%;
  animation: float 20s infinite alternate;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(129, 199, 132, 0.1), transparent);
  bottom: -100px;
  left: -100px;
  border-radius: 50%;
  animation: float 25s infinite alternate-reverse;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* 按钮 */
.btn {
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #0288d1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(79, 195, 247, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(79, 195, 247, 0.4);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

/* Banner轮播 */
.banner-carousel {
  margin-top: 48px;
  position: relative;
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.banner-slide {
  display: none;
  animation: fadeIn 0.8s ease;
}

.banner-slide.active {
  display: block;
}

.banner-slide svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 章节样式 */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

/* 网格布局 */
.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: 28px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* 卡片 */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  backdrop-filter: blur(10px);
  transition: transform 0.4s, box-shadow 0.4s, background 0.4s;
  cursor: default;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  background: var(--bg-card);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}

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

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

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 40px;
  margin: 40px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
  padding-left: 20px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
}

.timeline-item h4 {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 4px;
}

.timeline-item p {
  color: var(--text-secondary);
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--glass-border);
  padding: 16px 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 8px 0;
  color: var(--text-primary);
  transition: color 0.3s;
}

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

.faq-question .icon {
  transition: transform 0.3s;
  font-size: 1.2rem;
}

.faq-item.open .faq-question .icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 16px;
  color: var(--text-secondary);
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding: 12px 16px 16px;
}

/* 文章卡片 */
.article-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.4s, box-shadow 0.4s;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

.article-card .date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.article-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.article-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.article-card .read-more {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  transition: color 0.3s;
}

.article-card .read-more:hover {
  color: var(--accent2);
}

/* 合作伙伴logo */
.partner-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  padding: 20px 0;
}

.partner-logos svg {
  width: 120px;
  height: 60px;
  opacity: 0.6;
  transition: opacity 0.3s, transform 0.3s;
}

.partner-logos svg:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* 联系信息 */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

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

.contact-item .label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.contact-item .value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.map-placeholder {
  width: 100%;
  height: 300px;
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* 页脚 */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: 48px 24px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
}

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

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

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

.footer-col ul li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.3s;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

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

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

/* 返回顶部 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 22px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(79, 195, 247, 0.3);
  transition: transform 0.3s, opacity 0.3s;
  z-index: 999;
}

.back-to-top.visible {
  display: flex;
}

.back-to-top:hover {
  transform: scale(1.1);
}

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

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

/* 数字计数器 */
.number-counter {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-block;
}

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

.breadcrumb li + li::before {
  content: '/';
  margin-right: 8px;
  color: var(--text-secondary);
}

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

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

/* HowTo步骤 */
.howto-steps {
  counter-reset: step;
  margin: 24px 0;
}

.howto-step {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.howto-step::before {
  counter-increment: step;
  content: counter(step);
  background: var(--accent);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.howto-step div {
  flex: 1;
}

.howto-step h4 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.howto-step p {
  color: var(--text-secondary);
}

/* 移动端响应式 */
@media (max-width: 600px) {
  .header-inner {
    padding: 10px 16px;
  }
  .hero {
    padding: 100px 16px 60px;
  }
  section {
    padding: 48px 0;
  }
  .grid-2, .grid-3, .grid-4 {
    gap: 16px;
  }
  .card {
    padding: 20px 16px;
  }
}