/* 全局样式重置和基础样式 */ :root {
  --primary-color: #409EFF;
  --primary-hover: #66b1ff;
  --secondary-color: #f8f9fa;
  --card-bg: #ffffff;
  --text-color: #333;
  --text-light: #666;
  --border-color: #ebeef5;
  --border-radius: 6px;
  --shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f7fa;
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
img {
  max-width: 100%;
  height: auto;
}
.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 {
  display: flex;
  align-items: center;
}
.logo img {
  height: 40px;
  margin-right: 10px;
}
.logo span {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
}
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);
}
/* 主要内容区 */
.main-content {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
  flex: 1;
}
/* 左侧列表区 */
.list-section {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.section-title {
  padding-bottom: 15px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
.section-title h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}
.section-title h2 i {
  margin-right: 8px;
}
/* 卡片列表样式 - 修改部分 */
.card-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}
.card {
  border-radius: var(--border-radius);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  padding: 12px;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
/* 图片、标题和简介在同一行 */
.card-content {
  display: flex;
  gap: 12px;
}
.card-img {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
  border-radius: 8px;
  overflow: hidden;
}
.card-img img {
  max-width: 60%;
  max-height: 60%;
  object-fit: contain;
}
/* 标题和简介上下排列 */
.card-text {
  flex: 1;
  min-width: 0;
}
.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title a:hover {
  color: var(--primary-color);
}
.card-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
/* 标签单独一行 */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}
.card-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  background: #f0f2f5;
  border-radius: 4px;
  color: #666;
}
.card-tag:hover {
  background: var(--primary-color);
  color: white;
}
/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}
.page-list {
  display: flex;
  list-style: none;
}
.page-item {
  margin: 0 4px;
}
.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  height: 36px;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #606266;
  background: white;
  border: 1px solid var(--border-color);
}
.page-link:hover, .page-item.active .page-link {
  color: white;
  background: var(--primary-color);
  border-color: var(--primary-color);
}
.page-item.disabled .page-link {
  color: #c0c4cc;
  cursor: not-allowed;
  background: #f5f7fa;
}
/* 右侧边栏 */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar-widget {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.widget-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  color: var(--primary-color);
  display: flex;
  align-items: center;
}
.widget-title i {
  margin-right: 8px;
  font-size: 0.9rem;
}
/* 热门推荐 */
.hot-list {
  list-style: none;
}
.hot-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
}
.hot-item:last-child {
  border-bottom: none;
}
.hot-rank {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  margin-right: 10px;
}
.hot-content {
  flex: 1;
  min-width: 0;
}
.hot-title {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hot-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-cloud a{
 font-size: 0.8rem;
  padding: 4px 10px;
  background: #f0f2f5;
  border-radius: 4px;
  color: #666;
  transition: var(--transition);
}
.card-tags a{
  font-size: 0.7rem;
  padding: 2px 8px;
  background: #f0f0f0;
  border-radius: 4px;
  color: #666;
}
.tag {
  font-size: 0.8rem;
  padding: 4px 10px;
  background: #f0f2f5;
  border-radius: 4px;
  color: #666;
  transition: var(--transition);
}
.tag:hover {
  background: var(--primary-color);
  color: white;
}
#tags {
  margin: 10px 0;
  word-wrap: break-word; /* 旧版浏览器 */
  overflow-wrap: break-word; /* 新版标准 */
  word-break: keep-all; /* 中文环境下保持单词完整 */
}
#tags a {
  line-height: 30px;
}
#tags h2 {
  padding-bottom: 10px;
  margin: 20px 0 10px;
  border-bottom: 1px solid var(--border-color);
}
/* 页脚 */
footer {
  background: #2c3e50;
  color: white;
  padding: 10px 0;
}
.copyright {
  text-align: center;
  padding: 10px 0;
  color: #bdc3c7;
  font-size: 1rem;
}
/* 响应式设计 */
@media (max-width: 992px) {
  .card-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  .card-list {
    grid-template-columns: 1fr;
  }
  .nav-container {
    flex-direction: column;
  }
  nav {
    margin: 10px 0;
    width: 100%;
  }
  nav ul {
    justify-content: center;
  }
}
@media (max-width: 576px) {
  .logo {
    margin: 0 auto;
  }
  nav ul {
    flex-wrap: wrap;
  }
  nav li {
    margin: 5px;
  }
  .card-img {
    margin-bottom: 8px;
  }
}
/* 汉堡菜单 */
.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 5px 10px;
}
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  nav {
    display: none;
  }
  nav.active {
    display: flex;
  }
}
.main-content {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
/* 响应式设计调整 */
@media (max-width: 992px) {
  .card-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  header {
    padding: 8px 0; /* 缩小导航栏内边距 */
  }
  .card-list {
    grid-template-columns: 1fr;
  }
  .nav-container {
    flex-direction: column;
  }
  nav {
    margin: 8px 0; /* 缩小导航菜单边距 */
    width: 100%;
  }
  nav ul {
    justify-content: center;
  }
}
@media (max-width: 576px) {
  .main-content {}
  nav ul {
    flex-wrap: wrap;
  }
  nav li {
    margin: 4px; /* 缩小导航项边距 */
  }
  .card-content {
    display: flex;
    gap: 12px;
  }
  .section-title {
    padding-bottom: 12px;
    margin-bottom: 16px;
  }
}
/* 面包屑导航样式 */
.breadcrumb-container {
  padding: 15px 0;
  margin-top: 70px; /* 与header固定定位配合 */
  max-width: 1200px;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 0.9rem;
  align-items: center;
}
.breadcrumb-item {
  display: flex;
  align-items: center;
}
.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  padding: 0 8px;
  color: #c0c4cc;
  font-size: 0.8rem;
}
.breadcrumb-item a {
  color: var(--text-light);
  transition: var(--transition);
}
.breadcrumb-item a:hover {
  color: var(--primary-color);
  text-decoration: none;
}
.breadcrumb-item.active {
  color: var(--primary-color);
  font-weight: 500;
}
/* 响应式调整 */
@media (max-width: 768px) {
  .breadcrumb-container {
    margin-top: 110px;
    padding: 10px 0;
  }
  .breadcrumb {
    font-size: 0.85rem;
    padding: 0 10px;
  }
  .breadcrumb-item + .breadcrumb-item::before {
    padding: 0 6px;
  }
}
@media (max-width: 576px) {
  .breadcrumb {
    font-size: 0.8rem;
  }
  .breadcrumb-item + .breadcrumb-item::before {
    padding: 0 4px;
  }
}