/* 文章列表动画效果 - 不改变现有排版 */

/* 定义基础动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* 文章卡片进入动画 */
.excerpt {
  animation: fadeInUp 0.6s ease-out;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* 文章卡片悬停效果 */
.excerpt:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: #e0e0e0;
}

/* 卡片装饰线条 */
.excerpt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  transform: scaleY(0);
  transition: transform 0.3s ease;
  z-index: 1;
}

.excerpt:hover::before {
  transform: scaleY(1);
}

/* 标题动画 */
.excerpt h2 {
  transition: all 0.3s ease;
  position: relative;
}

.excerpt:hover h2 {
  color: #667eea;
  transform: translateX(5px);
}

/* 标题下划线动画 */
.excerpt h2 a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
}

.excerpt:hover h2 a::after {
  width: 100%;
}

/* 图片悬停效果 */
.excerpt .focus {
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.excerpt:hover .focus {
  transform: scale(1.02);
}

.excerpt .focus img {
  transition: all 0.5s ease;
}

.excerpt:hover .focus img {
  transform: scale(1.1);
}

/* 标签动画 */
.excerpt .label {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.excerpt:hover .label {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 标签箭头动画 */
.excerpt .label-arrow {
  transition: all 0.3s ease;
}

.excerpt:hover .label-arrow {
  transform: translateX(3px);
}

/* 摘要文字动画 */
.excerpt .note {
  transition: all 0.3s ease;
  opacity: 0.8;
}

.excerpt:hover .note {
  opacity: 1;
}

/* 元信息动画 */
.excerpt .auth-span {
  transition: all 0.3s ease;
}

.excerpt:hover .auth-span {
  color: #666;
}

.excerpt .auth-span .muted {
  transition: all 0.3s ease;
}

.excerpt:hover .auth-span .muted {
  transform: translateY(-2px);
}

/* 元信息图标动画 */
.excerpt .auth-span i {
  transition: all 0.3s ease;
  color: #667eea;
}

.excerpt:hover .auth-span i {
  transform: scale(1.2) rotate(5deg);
}

/* 列表项依次进入动画 */
.excerpt:nth-child(1) { animation-delay: 0.1s; }
.excerpt:nth-child(2) { animation-delay: 0.2s; }
.excerpt:nth-child(3) { animation-delay: 0.3s; }
.excerpt:nth-child(4) { animation-delay: 0.4s; }
.excerpt:nth-child(5) { animation-delay: 0.5s; }
.excerpt:nth-child(6) { animation-delay: 0.6s; }

/* 滚动加载动画 */
.pagination {
  animation: fadeIn 0.6s ease-out;
}

/* 侧边栏动画 */
.sidebar .widget {
  animation: fadeInRight 0.8s ease-out;
  transition: all 0.3s ease;
}

.sidebar .widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 所有widget标题样式统一 - 应用友情链接标题样式 */
.sidebar .widget .title {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 12px 15px !important;
  margin: 0 !important;
  border-radius: 8px 8px 0 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.sidebar .widget .title h2 {
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  margin: 0 !important;
  float: none !important;
  display: inline-block !important;
  transition: all 0.3s ease;
  position: relative;
}

/* 标题链接样式 */
.sidebar .widget .title h2 a.zj-titles {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* 标题链接悬停效果 */
.sidebar .widget .title h2 a.zj-titles:hover {
  color: #ffffff !important;
  text-decoration: underline;
  transform: translateX(3px);
}

/* 标签云动画 */
.d_tags a {
  transition: all 0.3s ease;
  display: inline-block;
}

.d_tags a:hover {
  transform: scale(1.1) rotate(2deg);
  color: #667eea;
  background: #f0f0f0;
}

/* 友情链接容器样式优化 */
.widget_links {
  animation: fadeInRight 0.8s ease-out;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  border-radius: 8px;
  overflow: hidden;
}

/* 友情链接列表样式优化 - 固定两列布局 */
.widget_links .xoxo.blogroll {
  padding: 15px 12px !important;
  margin: 0 !important;
  list-style: none !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  /* 使用flex-start确保左对齐 */
  width: 100% !important;
  box-sizing: border-box !important;
}

/* 固定两列宽度计算 - 带间距 */
.widget_links .xoxo.blogroll li {
  width: 50% !important;
  margin: 0 !important;
  padding: 5px !important;
  float: none !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  box-sizing: border-box !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* 友情链接样式优化 - 美观间距 */
.widget_links .xoxo.blogroll li a {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  width: 100%;
  padding: 10px 15px;
  text-align: center;
  background: #ffffff;
  color: #333333;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  word-break: break-word;
  line-height: 1.4;
  /* 去掉margin，使用padding控制间距 */
  margin: 0 !important;
}

/* 友情链接悬停效果 */
.widget_links .xoxo.blogroll li a:hover {
  transform: translateY(-2px);
  color: #667eea;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

/* 友情链接装饰效果 */
.widget_links .xoxo.blogroll li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: all 0.5s ease;
}

.widget_links .xoxo.blogroll li a:hover::before {
  left: 100%;
}

/* 友情链接进入动画 */
.widget_links .xoxo.blogroll li {
  animation: fadeInUp 0.4s ease-out;
}

.widget_links .xoxo.blogroll li:nth-child(1) { animation-delay: 0.1s; }
.widget_links .xoxo.blogroll li:nth-child(2) { animation-delay: 0.2s; }
.widget_links .xoxo.blogroll li:nth-child(3) { animation-delay: 0.3s; }
.widget_links .xoxo.blogroll li:nth-child(4) { animation-delay: 0.4s; }
.widget_links .xoxo.blogroll li:nth-child(5) { animation-delay: 0.5s; }
.widget_links .xoxo.blogroll li:nth-child(6) { animation-delay: 0.6s; }
.widget_links .xoxo.blogroll li:nth-child(7) { animation-delay: 0.7s; }
.widget_links .xoxo.blogroll li:nth-child(8) { animation-delay: 0.8s; }

/* 导航栏动画 */
#nav-menu ul li a {
  transition: all 0.3s ease;
  position: relative;
}

#nav-menu ul li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #667eea;
  transition: width 0.3s ease;
}

#nav-menu ul li a:hover::after {
  width: 100%;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #764ba2 0%, #667eea 100%);
}

/* 选中文本样式 */
::selection {
  background: rgba(102, 126, 234, 0.2);
  color: #667eea;
}

::-moz-selection {
  background: rgba(102, 126, 234, 0.2);
  color: #667eea;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 加载动画 */
.loading {
  animation: pulse 1.5s infinite;
}

/* 按钮悬停效果 */
.btn {
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 输入框焦点效果 */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #667eea !important;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1) !important;
}
