:root {
  --primary: #007bff;
  --danger: #dc3545;
  --transition: all 0.3s ease;
}

body {
  font-family: "Microsoft YaHei", sans-serif;
  margin: 0;
  padding: 20px;
  background: #f8f9fa;
  scroll-behavior: smooth;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* 头部动画 */
.header {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 导航栏动画 */
.nav {
  background: #fff;
  padding: 1.2rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  display: flex;
  gap: 2rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 20px;
  z-index: 100;
}

.nav a {
  text-decoration: none;
  color: #444;
  font-weight: 500;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.nav a.active {
  color: var(--primary);
  background: #f0f6ff;
}

.nav a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--primary);
  transition: var(--transition);
}

.nav a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.nav a:hover::before {
  width: 80%;
  left: 10%;
}

/* 卡片动画 */
.section-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(20px);
  animation: cardAppear 0.6s forwards;
  animation-delay: calc(var(--delay) * 0.1s);
}

@keyframes cardAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 增强图片效果 */
.image-container {
  margin: 1.5rem 0;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1rem;
  transition: var(--transition);
  overflow: hidden;
  position: relative;
  background: #f8f9fa;
}

.image-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 123, 255, 0.05);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.image-container:hover::before {
  opacity: 1;
}

.image-container img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.5s ease, opacity 0.5s ease;
  opacity: 1;
  transform: scale(0.98);
}

.image-container.visible img {
  opacity: 1;
  transform: scale(1);
}

/* 按钮动画 */
.btn {
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.btn:hover::after {
  width: 150px;
  height: 150px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

/* 系统介绍模块 */
.intro-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-left: 4px solid var(--primary);
  padding: 2.5rem;
  margin-bottom: 3rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.innovation-badge {
  background: var(--primary);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.95em;
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* 新增移动端适配样式 */
@media (max-width: 768px) {
  .container {
    padding: 10px;
    width: 100%;
  }

  .header {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .nav {
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 1rem;
  }

  .nav a {
    padding: 0.6rem 1rem;
    font-size: 0.9em;
  }

  .section-card {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
  }

  .image-container {
    margin: 1rem 0;
    padding: 0.8rem;
  }

  footer {
    font-size: 0.9rem;
  }
}

/* 新增页脚样式 */
footer {
  background: #fff;
  padding: 2rem;
  text-align: center;
  margin-top: 3rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  transition: var(--transition);
}

.github-link:hover {
  background: #f0f6ff;
}

.github-icon {
  width: 24px;
  height: 24px;
}
