/* 全局重置与基础样式 - 标准化配置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.7;
}

a {
  text-decoration: none;
  color: #1a73e8;
  transition: all 0.3s ease;
}

a:hover {
  color: #0d5bcd;
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 容器样式 - 居中适配 */
.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
}

/* 头部导航 - 固定顶部，样式清晰 */
.header {
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 999;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 42px;
  width: auto;
}

.logo h1 {
  font-size: 20px;
  color: #1a73e8;
  font-weight: 600;
}

/* 桌面端导航 */
.nav {
  display: block;
}

.nav ul {
  display: flex;
  gap: 28px;
}

.nav a {
  font-size: 15px;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

.nav a.active {
  color: #0d5bcd;
}

.nav a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #0d5bcd;
}
.tag{
	background-color: #f5f7fa; 
	padding: 0px 6px; 
	border-radius: 16px; 
	font-size: 13px; 
}
.tag a:hover{
	text-decoration:none;
}

/* 移动端导航切换按钮 */
.nav-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: #1a73e8;
  padding: 4px;
}

/* 横幅区域 - 自适应高度 */
.banner {
  width: 100%;
  overflow: hidden;
  margin: 16px 0 24px;
  border-radius: 8px;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 主内容区域 - 弹性布局，清晰分栏 */
.main {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
}

/* 左侧内容区 */
.content {
  flex: 3;
}

/* 右侧侧边栏 */
.sidebar {
  flex: 1;
}
.tupian img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
}
.article-content h2, .article-content h3, .article-content h4, .article-content h5, .article-content h6 {
    font-size: 16px;
    margin: 20px 0;
    position: relative;
    padding-left: 10px;
	font-weight: bold;
}
.article-content h2:before, .article-content h3:before, .article-content h4:before, .article-content h5:before, .article-content h6:before {
    position: absolute;
    content: "";
    background: #1487f4;
    width: 3px;
    height: 100%;
    left: 0;
    bottom: 0;
}
/* 卡片通用样式 - 统一视觉风格 */
.card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 18px;
  color: #1a73e8;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

/* 文章列表样式 - 网格布局，适配性强 */
.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.article-item {
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease;
}

.article-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.article-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.article-info {
  padding: 16px;
}

.article-info h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.article-info p {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
}

/* 栏目分类样式 */
.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-item {
  background-color: #f5f7fa;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.category-item:hover {
  background-color: #1a73e8;
}

.category-item:hover a {
  color: #ffffff;
  text-decoration: none;
}

/* 侧边栏热门文章样式 */
.hot-article-list li {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #f0f0f0;
}

.hot-article-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.hot-article-list img {
  width: 70px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

.hot-article-list h4 {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 6px;
}

.hot-article-list span {
  font-size: 12px;
  color: #999;
}

/* 详情页专属样式 */
.article-detail h1 {
  font-size: 24px;
  color: #222;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
}

.article-meta-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #999;
  font-size: 13px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.article-content {
  font-size: 15px;
  color: #333;
  line-height: 1.8;
}

.article-content p {
  margin-bottom: 18px;
  text-align: justify;
}

.article-content img {
  margin: 20px auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 相关文章、上一篇下一篇样式 */
.related-articles {
  margin-top: 30px;
}

.prev-next {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.prev-next a {
  font-size: 14px;
}

/* 积分榜样式 */
.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

.league-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.league-table th {
  background-color: #f5f7fa;
  padding: 10px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #e0e0e0;
}

.league-table td {
  padding: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.league-table tr:hover td {
  background-color: #fafbfc;
}

.league-table .league-title td {
  font-weight: 600;
  color: #1a73e8;
  background-color: #f5f7fa;
}

/* 底部样式 */
.footer {
  background-color: #2d3748;
  color: #e2e8f0;
  padding: 30px 0;
  margin-top: 20px;
}

.footer .container {
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 18px;
}

.footer-links a {
  color: #e2e8f0;
  font-size: 14px;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer p {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 8px;
}

/* 自适应媒体查询 - 分断点适配 */
/* 平板端 */
@media (max-width: 768px) {
  .main {
    flex-direction: column;
    gap: 20px;
  }

  .nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  /* 移动端导航菜单 */
  .nav.mobile-active {
    display: block;
    position: fixed;
    top: 66px;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 998;
  }

  .nav.mobile-active ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
  }

  .nav.mobile-active li {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
  }

  .nav.mobile-active a {
    display: block;
    font-size: 16px;
  }

  .article-list {
    grid-template-columns: 1fr;
  }

  .article-detail h1 {
    font-size: 20px;
  }
}

/* 手机端 */
@media (max-width: 480px) {
  .logo h1 {
    font-size: 16px;
  }

  .logo img {
    height: 36px;
  }

  .banner {
    height: clamp(120px, 25vh, 200px);
    margin: 12px 0 20px;
  }

  .card {
    padding: 16px;
  }

  .card-title {
    font-size: 16px;
    margin-bottom: 12px;
    padding-bottom: 8px;
  }

  .article-info {
    padding: 12px;
  }

  .article-meta-detail {
    gap: 10px;
    flex-direction: column;
  }

  .prev-next {
    flex-direction: column;
    gap: 10px;
  }
}