/* 博客相关样式 */
.nav-links a.active {
  color: #1a73e8;
}

.nav-links a.active::after {
  width: 24px;
}

/* 代码高亮样式 */
.blog-content pre {
  background: #202124;
  color: #e8eaed;
  padding: 24px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.5;
  border-left: 4px solid #1a73e8;
}

.blog-content code {
  background: #f8f9fa;
  color: #d93025;
  padding: 3px 6px;
  border-radius: 4px;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 0.9em;
}

.blog-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* 表格样式 */
.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #dadce0;
}

.blog-content th,
.blog-content td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #dadce0;
}

.blog-content th {
  background: #f8f9fa;
  font-weight: 600;
  color: #202124;
}

/* 引用样式 */
.blog-content blockquote {
  background: #f8f9fa;
  border-left: 4px solid #1a73e8;
  padding: 24px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #5f6368;
}

/* 链接样式 */
.blog-content a {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.blog-content a:hover {
  color: #0d47a1;
  text-decoration: underline;
}

/* 列表样式 */
.blog-content ul,
.blog-content ol {
  margin: 16px 0;
  padding-left: 32px;
}

.blog-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

/* 图片样式 */
.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 24px 0;
}

/* 标题样式 */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
  margin: 32px 0 16px;
  color: #1e293b;
  font-weight: 600;
  line-height: 1.4;
}

.blog-content h1 {
  font-size: 32px;
}
.blog-content h2 {
  font-size: 24px;
}
.blog-content h3 {
  font-size: 20.8px;
}
.blog-content h4 {
  font-size: 17.6px;
}

/* 段落样式 */
.blog-content p {
  margin-bottom: 24px;
  line-height: 1.8;
  color: #475569;
}

/* 首页博客模块样式 */
.home-blogs {
  padding: 80px 0;
  background: #f8f9fa;
}

.home-blogs .section-title {
  text-align: center;
  margin-bottom: 48px;
}

.home-blogs-grid {
  width: 100%;
  max-width: 100%;
}

.home-blog-item {
  background: #ffffff;
  padding: 24px;
  margin-bottom: 16px;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
  border-left: 4px solid #1a73e8;
  border: 1px solid #dadce0;
}

.home-blog-item:hover {
  border-color: #1a73e8;
}

.home-blog-item h3 {
  font-size: 19px;
  font-weight: 600;
  color: #202124;
  margin-bottom: 8px;
}

.home-blog-item .blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 14px;
  color: #5f6368;
}

.home-blog-item .blog-date {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-blog-item .blog-tags {
  display: flex;
  gap: 8px;
}

.home-blog-item .tag {
  background: rgba(26, 115, 232, 0.08);
  color: #1a73e8;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
}

.no-blogs {
  text-align: center;
  padding: 48px 0;
  color: #5f6368;
  font-size: 18px;
}

.view-more-btn {
  text-align: center;
  margin-top: 32px;
}

.view-more-btn .btn {
  background: #3b82f6;
  color: white;
  padding: 12px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
}

.view-more-btn .btn:hover {
  background: #1d4ed8;
}

/* 博客列表页面样式 */
.blogs-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 20px 60px;
  min-height: 80vh;
}

.blogs-header {
  text-align: center;
  margin-bottom: 60px;
}

.blogs-header h1 {
  font-size: 40px;
  color: #333;
  margin-bottom: 10px;
  font-weight: 500;
}

.blogs-header p {
  font-size: 16px;
  color: #666;
}

.blogs-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 48px;
}

.blog-card {
  background: #fff;
  padding: 24px 16px;
  transition: background-color 0.2s ease;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  border-radius: 0;
  border: none;
}

.blog-card:hover {
  background-color: #fafafa;
  border-color: #f0f0f0;
}

.blog-card h3 {
  font-size: 20.8px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 16px;
  line-height: 1.4;
}

.blog-card .blog-summary {
  color: #64748b;
  margin-bottom: 24px;
  line-height: 1.6;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card .blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14.4px;
  color: #64748b;
}

.blog-card .blog-date {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-card .blog-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.blog-card .blog-tags {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.blog-card .tag {
  background: #e0f2fe;
  color: #0c4a6e;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12.8px;
  font-weight: 500;
}

.loading {
  text-align: center;
  padding: 48px;
  color: #64748b;
  font-size: 17.6px;
}

.error {
  text-align: center;
  padding: 48px;
  color: #dc2626;
  font-size: 17.6px;
}

.back-to-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #3b82f6;
  text-decoration: none;
  margin-bottom: 30px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.back-to-home:hover {
  color: #0056b3;
}

.back-to-blogs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #3b82f6;
  text-decoration: none;
  margin-bottom: 30px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.back-to-blogs:hover {
  color: #0056b3;
}

/* 博客详情页面样式 */
.blog-detail-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 120px 20px 60px;
  min-height: 80vh;
}

.blog-detail-header {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 2px solid #e2e8f0;
}

.blog-detail-header h1 {
  font-size: 40px;
  color: #1e293b;
  margin-bottom: 16px;
  line-height: 1.3;
}

.blog-detail-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  color: #64748b;
  font-size: 15.2px;
  flex-wrap: wrap;
}

.blog-detail-content {
  background: #fff;
  padding: 48px;
  border-radius: 12px;
  margin-bottom: 32px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #3b82f6;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-bottom: 32px;
}

.back-btn:hover {
  background: #1d4ed8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .blogs-grid {
    flex-direction: column;
    gap: 1px;
  }

  .blogs-container {
    padding: 100px 15px 40px;
  }

  .blogs-header h1 {
    font-size: 32px;
  }

  .blog-detail-container {
    padding: 100px 15px 40px;
  }

  .blog-detail-header h1 {
    font-size: 28.8px;
  }

  .blog-detail-meta {
    font-size: 12.8px;
    gap: 15px;
  }

  .blog-detail-content {
    padding: 32px;
    font-size: 15.2px;
  }

  .home-blogs-grid {
    padding: 0 16px;
  }

  .home-blog-item {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .blogs-container,
  .blog-detail-container {
    padding: 16px;
  }

  .blog-card {
    padding: 16px 8px;
  }

  .blog-detail-content {
    padding: 24px;
  }

  .blog-detail-meta {
    gap: 16px;
  }
}
