/* 博客风格主样式 */
:root {
  --primary-color: #006fff;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --text-color: #333;
  --light-text: #777;
  --background-color: #fff;
  --light-bg: #f9f9f9;
  --border-color: #eee;
  --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
  --overlay-bg: rgba(0, 0, 0, 0.7);
  --title-bg: rgba(255, 255, 255, 0.85);
  --link-icon-size: 40px;
  --link-icon-spacing: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  /*background-color: var(--background-color);*/
}

/* 导航栏样式 */
.navbar {
  background-color: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(1px);
 /* border-bottom: 1px solid var(--border-color);*/
  padding: 15px 0;
  transition: var(--transition);
}

.navbar-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
}

.navbar-brand:hover {
  color: var(--primary-color);
}

.navbar-nav .nav-link {
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 16px !important;
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color);
}

.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  font-weight: 600;
}

.navbar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* 博客容器 */
.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 博客头部 */
.blog-header {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e4e4 100%);
  border-radius: 12px;
  margin-bottom: 40px;
}

.blog-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--secondary-color);
  margin-bottom: 15px;
  line-height: 1.2;
}

.blog-description {
  font-size: 1.1rem;
  color: var(--light-text);
  max-width: 700px;
  margin: 0 auto;
}

/* 博客内容区 */
.blog-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 992px) {
  .blog-content {
    grid-template-columns: 3fr 1fr;
  }
}

/* 文章卡片网格布局 */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

.sm\:grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.lg\:grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.gap-5 {
  gap: 1.25rem;
}

/* 文章卡片 */
.article-card {
  background-color: var(--background-color);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 文章卡片图片容器 - 4:3比例 */
.article-card-image-container {
  position: relative;
  width: 100%;
  padding-bottom: 75%; /* 4:3比例 */
  overflow: hidden;
}

.article-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* 图片悬停放大效果 */
.article-card-image-container:hover .article-card-image {
  transform: scale(1.05);
}

/* 图片底部遮罩层 */
.article-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, var(--overlay-bg), transparent);
  color: white;
  padding: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  pointer-events: none;
}

.article-card-image-container:hover .article-card-overlay {
  opacity: 1;
  transform: translateY(0);
}
/* 文章卡片摘要 */
.article-card-summary {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 全局滚动条样式 */
/* 滚动条轨道 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

/* 滚动条轨道 */
::-webkit-scrollbar-track {
  background: var(--light-bg);
  border-radius: 4px;
}

/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
  background: #690358;
  border-radius: 4px;
  transition: var(--transition);
}

/* 滚动条滑块悬停状态 */
::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* 滚动条滑块激活状态 */
::-webkit-scrollbar-thumb:active {
  background: var(--primary-color);
}

/* Firefox滚动条样式 */
* {
  scrollbar-width: thin;
  scrollbar-color: #ccc var(--light-bg);
}



/* 文章卡片内容区域 */
.article-card-content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 发布日期与统计信息容器 */
.article-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

/* 发布日期 */
.article-card-date {
  font-size: 0.75rem;
  color: var(--light-text);
}

/* 阅读数和评论数 */
.article-card-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--light-text);
}

.article-card-views,
.article-card-comments {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease;
}

.article-card-views:hover,
.article-card-comments:hover {
  color: var(--primary-color);
}

/* 文章标题 - 自动隐藏超出内容和磨砂背景 */
.article-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.75rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  padding-bottom: 0.25rem;
  transition: color 0.3s ease, transform 0.2s ease;
}

/* 标题链接样式 */
.article-card-title-link {
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  z-index: 1;
}

/* 标题悬停效果 */
.article-card-title:hover {
  color: #9c27b0;
  transform: translateX(2px);
}

/* 自定义完整标题提示 - 简化实现确保显示 */
.article-card-title {
  /* 确保标题元素可以容纳伪元素 */
  position: relative;
}

/* 文章标题悬停提示效果 */
.article-card-title::after {
  content: attr(data-title);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 5px);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  font-size: 14px;
  transition: opacity 0.3s ease;
}

.article-card-title::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 100%;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.article-card-title:hover::after,
.article-card-title:hover::before {
  opacity: 1;
}

/* 博主名字样式 */
.blogger-name {
  margin: 10px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

/* 悬停时显示工具提示 */
.article-card-title:hover::before,
.article-card-title:hover::after {
  opacity: 1;
  visibility: visible;
}

/* 优化标题链接悬停时的文字效果 - 移除下划线 */
.article-card-title:hover .article-card-title-link {
  text-decoration: none;
}



/* 分类和标签 */
.article-card-meta {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.article-card-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--primary-color);
  color: white;
  border-radius: 1rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.article-card-tags {
  display: flex;
  /* 移除换行，确保标签在同一行显示 */
  white-space: nowrap;
  overflow: hidden;
  gap: 0.5rem;
  flex: 1;
}

.article-card-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background-color: var(--light-bg);
  color: var(--light-text);
  border-radius: 1rem;
  font-size: 0.7rem;
  border: 1px solid var(--border-color);
}

/* 响应式调整 */
@media (max-width: 991px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .sm\:grid-cols-2,
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(1, 1fr);
  }
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.article-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

.article-card-body {
  padding: 25px;
}

.article-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 15px;
  transition: var(--transition);
}

.article-card-title:hover {
  color: var(--primary-color);
}

.article-card-meta {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 0.85rem;
  color: var(--light-text);
}

.article-card-meta-item {
  display: flex;
  align-items: center;
  margin-right: 15px;
}

.article-card-meta-item i {
  margin-right: 5px;
}

.article-card-excerpt {
  color: var(--text-color);
  margin-bottom: 20px;
  line-height: 1.7;
}

.article-card-readmore {
  display: inline-block;
  padding: 8px 20px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9rem;
}

.article-card-readmore:hover {
  background-color: #2980b9;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

/* 侧边栏 */
.sidebar {
  position: sticky;
  top: 90px;
}

.sidebar-widget {
  background-color: var(--background-color);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
}

.sidebar-widget-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

/* 搜索框 */
.search-form {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 12px 40px 12px 20px;
  border: 1px solid var(--border-color);
  border-radius: 25px;
  font-size: 0.95rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 侧边栏搜索按钮 */
.sidebar .search-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--light-text);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 5px;
}

/* 主页面搜索按钮 */
.blog-header .search-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0 8px 8px 0;
  padding: 0 20px;
  cursor: pointer;
  transition: var(--transition);
}

.blog-header .search-button:hover {
  background-color: #2980b9;
}

.blog-header .search-button i {
  font-size: 1.2rem;
  vertical-align: middle;
}

/* 分类列表 */
.category-list {
  list-style: none;
}

.category-item {
  margin-bottom: 12px;
}

.category-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
  padding: 5px 0;
}

.category-link:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.category-count {
  background-color: var(--light-bg);
  color: var(--light-text);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-link {
  display: inline-block;
  padding: 5px 12px;
  background-color: var(--light-bg);
  color: var(--text-color);
  border-radius: 15px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition);
}

.tag-link:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* 文章详情页 */
.article-detail {
  background-color: var(--background-color);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 40px;
  border: 1px solid var(--border-color);
}

.article-detail-header {
  margin-bottom: 30px;
}

.article-detail-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--secondary-color);
  margin-bottom: 20px;
  line-height: 1.3;
}

.article-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--light-text);
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.article-detail-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-color);
}

.article-detail-content p {
  margin-bottom: 20px;
}

.article-detail-content h2 {
  font-size: 1.8rem;
  color: var(--secondary-color);
  margin: 30px 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

.article-detail-content h3 {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin: 25px 0 15px;
}

.article-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: var(--card-shadow);
}

/* 文章分页 */
.article-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
}

.article-pagination-link {
  display: flex;
  align-items: center;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.article-pagination-link:hover {
  transform: translateY(-2px);
}

.article-pagination-link i {
  margin: 0 5px;
}

/* 页脚 */
.footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 40px 0;
  margin-top: 80px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 991px) {
  .blog-title {
    font-size: 2rem;
  }
  
  .article-detail {
    padding: 30px 20px;
  }
  
  .article-detail-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  .blog-header {
    padding: 40px 15px;
  }
  
  .blog-title {
    font-size: 1.8rem;
  }
  
  .blog-description {
    font-size: 1rem;
  }
  
  .article-card-body {
    padding: 20px;
  }
  
  .article-card-title {
    font-size: 1.3rem;
  }
  
  .sidebar-widget {
    padding: 20px;
  }
}

@media (max-width: 576px) {
  body {
   /* padding-top: 60px;*/
  }
  
  .blog-header {
    padding: 30px 10px;
  }
  
  .blog-title {
    font-size: 1.5rem;
  }
  
  .article-card-img {
    height: 180px;
  }
  
  .article-detail-title {
    font-size: 1.5rem;
  }
  
  .article-detail-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* 右侧边栏模块基础样式和悬停效果 */
.sidebar-module {
  background-color: var(--background-color);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  overflow: hidden;
  margin-bottom: 40px;
  padding: 5px 10px;
}

/* 侧边栏模块标题样式 */
.sidebar-module h3,
.col-lg-3 h3 {
  margin-top: 5px !important;
  margin-bottom: 15px !important;
  position: relative;
}

.sidebar-module h3::after,
.col-lg-3 h3::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--border-color) 50%, transparent 50%);
  background-size: 10px 1px;
  background-repeat: repeat-x;
}

.sidebar-module:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 为已有右侧边栏模块添加相同样式和效果 */
.col-lg-3 > div.bg-light,
.col-lg-3 > div.mb-6 {
  background-color: var(--background-color);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  overflow: hidden;
  margin-bottom: 40px !important;
  padding: 10px 10px;
}

.col-lg-3 > div.bg-light:hover,
.col-lg-3 > div.mb-6:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 加载动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-card {
  animation: fadeIn 0.5s ease-out;
}

/* 滚动动画 */
.scroll-top {
  position: fixed;
  bottom: 70px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background-color: #2980b9;
  color: white;
  transform: translateY(-5px);
}

/* 博主头像样式 - 横排 */
.blogger-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
}

/* 博主头像样式 - 竖排容器居中 */
.blogger-info-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* 博主头像样式 - 竖排 */
.blogger-info-vertical img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 10px;
  object-fit: cover;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
  display: block;
}

/* 博主链接区域样式 */
.blogger-links {
  margin-top: 20px;
  padding: 5px;
  background-color: var(--light-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}

.blogger-links-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--link-icon-spacing);
  padding: 10px 0;
}

/* 链接图标样式 - 圆形 */
.blogger-link-icon {
  display: inline-block;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--background-color);
  border: 2px solid var(--border-color);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 链接图标图片样式 - 固定尺寸35x35像素 */
.blogger-link-icon img {
  width: 35px;
  height: 35px;
  object-fit: contain;
  transition: transform 0.3s ease;
  background-color: white;
  padding: 2px;
}

/* 悬停动画效果 */
.blogger-link-icon:hover {
  transform: translateY(-5px) scale(1.1);
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(0, 111, 255, 0.2);
}

.blogger-link-icon:hover img {
  transform: scale(1.2);
}

/* 竖排显示的链接样式 */
.blogger-links-vertical .blogger-links-container {
  justify-content: center;
}

/* 链接标题美化效果 */
.blogger-link-icon::after {
  content: attr(data-title);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 10px);
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.blogger-link-icon::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 100%;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(0, 0, 0, 0.85);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: all 0.3s ease;
}

.blogger-link-icon:hover::after,
.blogger-link-icon:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
  visibility: visible;
}



/* 响应式设计 */
@media (max-width: 768px) {
  :root {
    --link-icon-spacing: 10px;
  }
  
  .blogger-link-icon {
    width: 35px;
    height: 35px;
  }
  
  .blogger-link-icon::after {
    font-size: 12px;
    padding: 6px 10px;
  }
}

@media (max-width: 576px) {
  :root {
    --link-icon-spacing: 8px;
  }
  
  .blogger-link-icon {
    width: 35px;
    height: 35px;
  }
  
  .blogger-links {
    padding: 10px;
  }
  
  .blogger-link-icon::after {
    font-size: 11px;
    padding: 5px 8px;
  }
}