/* 全局样式重置和基础样式 */ :root {
  --primary-color: #3498db;
  --secondary-color: #f8f9fa;
  --card-bg: #ffffff;
  --section-bg: #f8f9fa;
  --text-color: #333;
  --border-radius: 8px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}
body {
  font-family: 'Microsoft YaHei', sans-serif;
  padding-top: 90px;
  background-color: #f5f5f5;
  color: var(--text-color);
  margin: 0;
}
a {
  text-decoration: none;
  color: inherit;
}
/* 通用容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
/* 导航栏样式 */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: var(--shadow);
  z-index: 1000;
  padding: 12px 0;
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.logo img {
  height: 40px;
}
nav ul {
  display: flex;
  list-style: none;
}
nav li {
  margin: 0 10px;
  position: relative;
}
nav a {
  padding: 8px 4px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #606266;
}
nav a:hover, nav a.active {
  color: var(--primary-color);
}
nav a.active:after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--primary-color);
}
/* 侧边导航样式 */
.side-nav {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 15px 10px;
  z-index: 1000;
}
.side-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.side-nav li {
  margin-bottom: 10px;
  text-align: center;
}
.side-nav a {
  display: block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  color: #666;
  transition: var(--transition);
}
.side-nav a:hover, .side-nav a.active {
  background: var(--primary-color);
  color: white;
}
/* 内容区域样式 */
main {
  padding: 20px 0;
}
section {
  background: white;
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.section-title {
  position: relative;
  padding-bottom: 15px;
  margin-bottom: 30px;
  border-bottom: 1px solid #eee;
}
.section-title h2 {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}
.section-title a {
  position: absolute;
  right: 0;
  top: 0;
  color: var(--primary-color);
}
/* 卡片布局 - 使用网格布局 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  overflow: hidden;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.card-img {
  position: relative;
  padding-top: 56.25%; /* 16:9 比例 */
  overflow: hidden;
}
.card-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-content {
  padding: 15px;
}
.card-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
}
.card-content p {
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.keywords a {
  font-size: 0.7rem;
  padding: 2px 8px;
  background: #f0f0f0;
  border-radius: 4px;
  color: #666;
}
/* 页脚样式 */
footer {
  background: #343a40;
  color: white;
  padding: 10px 0;
}
footer a {
  color: #6c757d;
  transition: var(--transition);
}
footer a:hover {
  color: white;
}
.copyright {
  text-align: center;
  padding: 10px 0;
  color: #bdc3c7;
  font-size: 1rem;
}
/* 汉堡菜单 - 移动端导航 */
.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 5px 10px;
}
/* 响应式设计 */
@media (max-width: 576px) {
  body {
    padding-top: 200px; /* 调整顶部间距 */
  }
  .logo {
    margin: 0 auto;
  }
  nav ul {
    flex-wrap: wrap;
  }
  nav li {
    margin: 5px;
  }
}
@media (max-width: 992px) {
  .side-nav {
    display: none;
  }
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
  }
  .menu-toggle {
    display: block;
  }
  nav {
    display: none;
  }
  nav.active {
    display: flex;
  }
  nav ul {
    justify-content: center;
  }
  nav {
    margin: 8px 0; /* 缩小导航菜单边距 */
    width: 100%;
  }
  body {
    padding-top: 140px; /* 调整顶部间距 */
  }
  .card-img {
    padding-top: 75%; /* 调整为4:3比例 */
  }
}