/* 基础布局样式 */
.article-footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid #f0f0f0;
  margin-top: 30px;
}

/* 标签样式 */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.article-tags a {
  display: inline-block;
  padding: 6px 12px;
  background: #f8f9fa;
  color: #495057;
  text-decoration: none;
  border-radius: 16px;
  font-size: 14px;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.article-tags a:hover {
  background: #e9ecef;
  color: #212529;
  transform: translateY(-1px);
}

/* 操作按钮区域 */
.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

/* 操作按钮样式 */
.action-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px; 
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.action-btn:hover {
  background: #f8f9fa;
  border-color: #dee2e6;
  color: #495057;
  transform: translateY(-1px);
}

.action-btn:active {
  transform: translateY(0);
}

/* 点赞计数 */
.action-btn .count {
  font-weight: 500;
  color: #495057;
}

/* 工具提示 */
.action-btn .tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.action-btn:hover .tooltip {
  opacity: 1;
  visibility: visible;
  bottom: calc(100% + 8px);
}

/* 分享弹窗相关样式确保最高层级 */
.popup-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999 !important;
}

.share-popup {
  display: none;
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 10000 !important;
  max-width: 90vw;
  width: 400px;
  max-height: 80vh;
  overflow-y: auto;
}

.share-popup h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  color: #212529;
  text-align: center;
  font-weight: 600;
}

/* 分享平台网格 */
.share-platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.share-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.share-platform:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.share-platform i {
  font-size: 24px;
  margin-bottom: 4px;
}

.share-platform .name {
  font-size: 12px;
  color: #495057;
}

/* 平台特定颜色 */
.share-platform.wechat i { color: #07c160; }
.share-platform.weibo i { color: #e6162d; }
.share-platform.qq i { color: #12b7f5; }
.share-platform.qzone i { color: #f7b500; }
.share-platform.tieba i { color: #2d64b3; }
.share-platform.email i { color: #ea4335; }
.share-platform.whatsapp i { color: #25d366; }
.share-platform.facebook i { color: #1877f2; }
.share-platform.twitter i { color: #1da1f2; }
.share-platform.link i { color: #6c757d; }

/* 微信模态框 - 提高 z-index */
.wechat-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001 !important;
  align-items: center;
  justify-content: center;
}

.wechat-modal-content {
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 90vw;
  width: 320px;
  text-align: center;
  /* 确保在视口内 */
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.wechat-modal-header {
  margin-bottom: 20px;
}

.wechat-modal-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: #212529;
  font-weight: 600;
}

.wechat-modal-subtitle {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
}

.wechat-qrcode {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 20px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wechat-qrcode img {
  max-width: 100%;
  height: auto;
}

.wechat-close-btn {
  padding: 10px 24px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 14px;
}

.wechat-close-btn:hover {
  background: #5a6268;
}

/* 点赞状态样式 */
.liked {
  background: #fff5f5 !important;
  border-color: #ff6b6b !important;
  color: #ff6b6b !important;
}

.favorited {
  background: #fff9db !important;
  border-color: #ffd43b !important;
  color: #f08c00 !important;
}

/* 模态框打开时的body样式 */
body.modal-open {
  overflow: hidden;
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to { 
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.share-popup {
  animation: slideUp 0.3s ease;
}

.popup-backdrop,
.wechat-modal {
  animation: fadeIn 0.3s ease;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .article-footer {
    padding: 16px 0;
    margin-top: 20px;
    gap: 16px;
  }
  
  .article-tags {
    gap: 8px;
  }
  
  .article-tags a {
    padding: 5px 10px;
    font-size: 13px;
  }
  
  .article-actions {
    gap: 12px;
    justify-content: space-between;
  }
  
  .action-btn {
    padding: 8px 12px;
    font-size: 13px;
    flex: 1;
    min-width: 0;
    justify-content: center;
  }
  
  .action-btn .count {
    font-size: 12px;
  }
  
  .share-popup {
    width: 95vw;
    padding: 20px;
    /* 移动端确保居中 */
    left: 50%;
    transform: translateX(-50%);
    top: 100px;
    max-height: calc(100vh - 40px);
  }
  
  .share-platforms {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .share-platform {
    padding: 12px 6px;
  }
  
  .share-platform i {
    font-size: 20px;
  }
  
  .share-platform .name {
    font-size: 11px;
  }
  
  .wechat-modal-content {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .article-actions {
    gap: 8px;
  }
  
  .action-btn {
    padding: 8px;
    gap: 4px;
  }
  
  .action-btn i {
    font-size: 14px;
  }
  
  .share-platforms {
    grid-template-columns: repeat(2, 1fr);
  }
}