/* ==================== 前端公共样式 ==================== */

/* 红色渐变背景 */
.red-gradient {
  background: linear-gradient(145deg, #b10e0e 0%, #d42e2e 50%, #a80808 100%);
  position: relative;
  overflow: hidden;
}

.red-gradient::after {
  content: "";
  position: absolute;
  top: -30%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle, rgba(255, 200, 200, 0.2) 0%, transparent 70%);
  animation: pulseRed 12s infinite alternate;
  pointer-events: none;
}

@keyframes pulseRed {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 0.3;
  }

  100% {
    transform: scale(1.2) rotate(3deg);
    opacity: 0.7;
  }
}

/* 文字光晕效果 */
.text-glow-white {
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.5);
}

/* 卡片红色悬停效果 */
.card-hover-red {
  transition: all 0.25s ease;
  border: 1px solid rgba(220, 53, 69, 0.1);
}

.card-hover-red:hover {
  transform: translateY(-6px);
  border-color: #dc3545;
  box-shadow: 0 20px 30px -10px rgba(220, 53, 69, 0.4) !important;
}

/* 列表项红色边框悬停效果 */
.list-group-item-red-border {
  border-left: 4px solid #dc3545;
  transition: all 0.2s ease;
}

.list-group-item-red-border:hover {
  background-color: #fff1f0;
  padding-left: 1.5rem;
}

/* 红色轮廓按钮 */
.btn-red-outline {
  border: 1px solid #dc3545;
  color: #dc3545;
  background: white;
  transition: all 0.2s ease;
}

.btn-red-outline:hover {
  background: #dc3545;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* 深红色Footer */
.footer-red-dark {
  background: #2d0a0a;
}

/* 自定义红色导航栏 */
.navbar-red-custom {
  background: linear-gradient(135deg, #a51717, #c02121, #9b0e0e);
}

.navbar-red-custom .nav-link {
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

.navbar-red-custom .nav-link:hover,
.navbar-red-custom .nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  border-bottom-color: #fff;
}

/* 红色软徽章 */
.badge-red-soft {
  background: #ffd9d9;
  color: #a80808;
  font-weight: 500;
}

/* 红色边框 */
.border-red-200 {
  border-color: #f5c6cb !important;
}

/* 分类卡片链接 */
.category-card-link {
  text-decoration: none;
  transition: all 0.2s ease;
}

.category-card-link:hover {
  transform: translateX(3px);
  color: #dc3545;
}

/* 文章内容样式 */
.article-content {
  line-height: 1.8;
  color: #333;
}

.article-content p {
  margin-bottom: 1rem;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.article-content th,
.article-content td {
  border: 1px solid #dee2e6;
  padding: 0.75rem;
  text-align: left;
}

.article-content th {
  background-color: #f8f9fa;
  font-weight: 600;
}

/* 页码样式 */
.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.pagination li {
  display: inline-block;
}

.pagination li a,
.pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0.5rem 0.75rem;
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
  border-radius: 0.375rem;
  background-color: white;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.25s ease;
  font-size: 0.875rem;
}

.pagination li a:hover,
.pagination li:not(.disabled):not(.active) span:hover {
  background: linear-gradient(135deg, #dc3545, #c82333);
  border-color: #dc3545;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.pagination li.active span {
  background: linear-gradient(135deg, #dc3545, #c82333);
  border-color: #dc3545;
  color: white;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
  cursor: default;
}

.pagination li.disabled span {
  background-color: #f8f9fa;
  border-color: #dee2e6;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

/* 响应式分页 */
@media (max-width: 576px) {
  .pagination {
    gap: 0.15rem;
  }

  .pagination li a,
  .pagination li span {
    min-width: 2rem;
    height: 2rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.8125rem;
  }
}

