/* ===== 导航 ===== */
.nav-link.active {
  color: #0d9488;
  background-color: #f0fdfa;
  font-weight: 600;
}

/* ===== 文章卡片 ===== */
.article-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
  list-style: none;
}

.article-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: #d1d5db;
}

.article-card .card-category {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

.article-card .card-category.ranking {
  background: #fef3c7;
  color: #d97706;
}

.article-card .card-category.review {
  background: #fce7f3;
  color: #db2777;
}

.article-card .card-category.expert {
  background: #ede9fe;
  color: #7c3aed;
}

.article-card .card-category.knowledge {
  background: #d1fae5;
  color: #059669;
}

.article-card .card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1f2937;
  text-decoration: none;
  margin-bottom: 0.5rem;
  line-height: 1.5;
  min-height: 3.15rem;
}

.article-card .card-title:hover {
  color: #0d9488;
}

.article-card .card-summary {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.6;
  min-height: 3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card .card-meta {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #9ca3af;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== 排行标识 ===== */
.rank-badge,
[class*="-rank-badge"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.rank-badge.rank-1,
[class*="-rank-badge"].rank-1 { background: #f59e0b; }
.rank-badge.rank-2,
[class*="-rank-badge"].rank-2 { background: #94a3b8; }
.rank-badge.rank-3,
[class*="-rank-badge"].rank-3 { background: #b45309; }
.rank-badge.rank-other,
[class*="-rank-badge"].rank-other { background: #d1d5db; color: #6b7280; }

/* ===== 排行榜列表项（支持动态站点前缀） ===== */
[class*="-article-item"] {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: box-shadow 0.25s;
}

[class*="-article-item"]:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

[class*="-article-item"] [class*="-item-content"] {
  flex: 1;
  min-width: 0;
}

[class*="-article-item"] [class*="-item-title"] {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  text-decoration: none;
  margin-bottom: 0.35rem;
}

[class*="-article-item"] [class*="-item-title"]:hover {
  color: #0d9488;
}

[class*="-article-item"] [class*="-item-summary"] {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.6;
}

[class*="-article-item"] [class*="-item-meta"] {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

[class*="-article-item"] [class*="-item-score"] {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #f0fdfa;
  color: #0d9488;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

[class*="-article-item"] [class*="-empty-item"] {
  text-align: center;
  padding: 40px;
  color: #999;
}

/* ===== 全列表样式 ===== */
.full-list-item {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: box-shadow 0.25s;
}

.full-list-item:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.full-list-item .item-content {
  flex: 1;
  min-width: 0;
}

.full-list-item .item-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  text-decoration: none;
  margin-bottom: 0.35rem;
}

.full-list-item .item-title:hover {
  color: #0d9488;
}

.full-list-item .item-summary {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.6;
}

.full-list-item .item-meta {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

.full-list-item .item-score {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #f0fdfa;
  color: #0d9488;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ===== 文章详情 ===== */
.detail-header {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.detail-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #9ca3af;
}

.detail-body {
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.9;
}

.detail-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1f2937;
  margin: 1.5rem 0 0.75rem;
}

.detail-body p {
  margin-bottom: 0.75rem;
}

.detail-body ul,
.detail-body ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.detail-body ul li,
.detail-body ol li {
  margin-bottom: 0.4rem;
  line-height: 1.8;
}

.detail-body ul {
  list-style-type: disc;
}

.detail-body ol {
  list-style-type: decimal;
}

.detail-body ul ul,
.detail-body ol ol,
.detail-body ul ol,
.detail-body ol ul {
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
}

/* ===== 回到顶部 ===== */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 2.75rem;
  height: 2.75rem;
  background: #0d9488;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(13,148,136,0.3);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 40;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

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

#back-to-top:hover {
  background: #0f766e;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  #main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    gap: 0.25rem;
  }

  #main-nav.open {
    display: flex;
  }

  .detail-header h1 {
    font-size: 1.35rem;
  }

  .article-card .card-title {
    font-size: 0.95rem;
  }
}

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

.animate-in {
  animation: fadeInUp 0.35s ease-out forwards;
}

/* ===== 分页器 ===== */
.pagination-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.pagination-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination-item {
  list-style: none;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  background: #fff;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-link:hover:not(.disabled):not(.active) {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #1f2937;
}

.pagination-link.active {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
  cursor: default;
}

.pagination-link.disabled {
  color: #d1d5db;
  cursor: not-allowed;
  background: #f9fafb;
}

.pagination-info {
  font-size: 0.8rem;
  color: #9ca3af;
}

@media (max-width: 640px) {
  .pagination-link {
    min-width: 2rem;
    height: 2rem;
    font-size: 0.8rem;
    padding: 0 0.4rem;
  }
}