.news-item-title,
.popular-news-title,
.product-name,
.related-news-title,
.view-all-link {
  position: relative;
  transition: all 0.3s ease;
}

.news-item-title:before,
.popular-news-title:before,
.product-name:before,
.related-news-title:before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #1e88e5;
  transition: width 0.3s ease;
}

.news-item-title:hover:before,
.popular-news-title:hover:before,
.product-name:hover:before,
.related-news-title:hover:before {
  width: 100%;
}

/* 按钮悬停特效 */
.category-btn,
.page-item,
.view-all-link,
.share-btn {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.category-btn:hover,
.page-item:hover:not(.disabled):not(.active),
.view-all-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 点击波纹效果 */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple:after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform .5s, opacity 1s;
}

.ripple:active:after {
  transform: scale(0, 0);
  opacity: .3;
  transition: 0s;
}

/* 卡片悬停效果 */
.news-item,
.related-news-card,
.popular-news-item,
.product-item {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.news-item:hover,
.related-news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
}

.popular-news-item:hover,
.product-item:hover {
  transform: translateX(8px);
}

/* 加载动画 */
.loading-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, transparent, #1e88e5, transparent);
  z-index: 9999;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* 菜单项光标特效 */
.category-btn {
  position: relative;
}

.category-btn:before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #1e88e5;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateX(-50%);
}

.category-btn:hover:before {
  width: 70%;
  opacity: 1;
}

.category-btn.active:before {
  width: 70%;
  opacity: 1;
  background-color: #fff;
}

/* 图片悬停效果 */
.news-detail-content img,
.related-news-img img,
.product-image {
  transition: all 0.5s ease;
}

.news-detail-content img:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 滚动动画 */
.scroll-animated {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.scroll-animated.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 点赞按钮效果 */
.like-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background-color: #f5f5f5;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  margin-top: 20px;
}

.like-button i {
  margin-right: 6px;
  transition: all 0.3s ease;
}

.like-button:hover {
  background-color: #e3f2fd;
  color: #1565c0;
}

.like-button.liked {
  background-color: #e3f2fd;
  color: #1565c0;
}

.like-button.liked i {
  color: #1565c0;
  transform: scale(1.2);
}

/* 文章阅读进度 */
.reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #f0f0f0;
  z-index: 9999;
}

.reading-progress-bar {
  height: 100%;
  background: linear-gradient(to right, #1e88e5, #64b5f6);
  width: 0;
  transition: width 0.1s ease;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #1e88e5;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: #1565c0;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 页面加载动画 */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-transition.loaded {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top: 3px solid #1e88e5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* 文章图片间距 */
.news-detail-content img {
  display: block;
  margin: 30px auto;
}

/* 分类标签悬停效果 */
.news-detail-category {
  transition: all 0.3s ease;
}

.news-detail-category:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* 链接图标 */
a[target="_blank"]:after {
  content: "\f35d";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-left: 5px;
  font-size: 0.8em;
  opacity: 0.7;
}

/* 图片加载效果 */
.lazy-load {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.lazy-load.loaded {
  opacity: 1;
}

/* 标签滑动样式 */
.tags-container.active {
  cursor: grabbing;
}

.tags-scroll-indicator {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  padding: 0 10px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #999;
  opacity: 0.8;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.tags-scroll-indicator i {
  animation: scrollIndicator 1.5s infinite;
}

.tags-scroll-indicator.hide {
  opacity: 0;
}

@keyframes scrollIndicator {
  0% {
    transform: translateX(-5px);
  }

  50% {
    transform: translateX(5px);
  }

  100% {
    transform: translateX(-5px);
  }
}

/* 上一篇/下一篇导航交互效果 */
.nav-link {
  position: relative;
  overflow: hidden;
}

.nav-link-decor {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
}

.nav-link.prev .nav-title,
.nav-link.next .nav-title {
  transition: all 0.3s ease-out;
}

.nav-link.nav-hover {
  background-color: #f5faff;
}

.nav-link .nav-title {
  position: relative;
}

.nav-link.prev .nav-title:before,
.nav-link.next .nav-title:after {
  content: '';
  position: absolute;
  background: rgba(30, 136, 229, 0.1);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s ease;
}

.nav-link.prev .nav-title:before {
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
}

.nav-link.next .nav-title:after {
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
}

.nav-link.nav-hover.prev .nav-title:before,
.nav-link.nav-hover.next .nav-title:after {
  opacity: 1;
}

.nav-link.nav-hover.prev .nav-title:before {
  animation: pulseLeft 1.5s infinite;
}

.nav-link.nav-hover.next .nav-title:after {
  animation: pulseRight 1.5s infinite;
}

@keyframes pulseLeft {
  0% {
    left: -10px;
    opacity: 0.3;
  }

  50% {
    left: -25px;
    opacity: 0.6;
  }

  100% {
    left: -10px;
    opacity: 0.3;
  }
}

@keyframes pulseRight {
  0% {
    right: -10px;
    opacity: 0.3;
  }

  50% {
    right: -25px;
    opacity: 0.6;
  }

  100% {
    right: -10px;
    opacity: 0.3;
  }
}

/* 页面滑动过渡效果 */
.page-slide {
  position: fixed;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(30, 136, 229, 0.05);
  z-index: 9999;
  pointer-events: none;
}

.slide-from-left {
  left: -100%;
  animation: slideInFromLeft 0.3s forwards;
}

.slide-from-right {
  right: -100%;
  animation: slideInFromRight 0.3s forwards;
}

@keyframes slideInFromLeft {
  0% {
    left: -100%;
  }

  100% {
    left: 0;
  }
}

@keyframes slideInFromRight {
  0% {
    right: -100%;
  }

  100% {
    right: 0;
  }
}

/* 浮动点赞心形动画 */
.floating-heart {
  position: fixed;
  font-size: 24px;
  color: #f44336;
  animation: floatUp 1s ease-out forwards;
  z-index: 999;
  pointer-events: none;
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: scale(0.8) translateY(0);
  }

  100% {
    opacity: 0;
    transform: scale(1.5) translateY(-100px);
  }
}

/* 优化移动端体验 */
@media (max-width: 768px) {
  .news-detail-share {
    margin-top: 15px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }

  .news-item-title {
    font-size: 18px;
  }

  .news-detail-content h2 {
    font-size: 20px;
  }
}