/* 全局样式 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card h3 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.card h3 a {
  color: inherit;
  text-decoration: none;
}

.card h3 a:hover {
  color: #667eea;
}

.card .meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.card .one-line {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
}

.rank-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.rank-item:last-child {
  border-bottom: none;
}

.rank-num {
  font-size: 1.5rem;
  font-weight: bold;
  color: #667eea;
  margin-right: 1rem;
  min-width: 40px;
}

.rank-item a {
  flex: 1;
  color: #2c3e50;
  text-decoration: none;
}

.rank-item a:hover {
  color: #667eea;
}

.rank-item .year {
  color: #999;
  font-size: 0.9rem;
}

/* 列表页样式 */
.list-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.list-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.list-card .index-num,
.list-card .rank-badge,
.list-card .new-badge {
  flex-shrink: 0;
  font-weight: bold;
  font-size: 1.2rem;
  color: #667eea;
  min-width: 50px;
  text-align: center;
}

.list-card .rank-badge {
  background: #667eea;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.list-card .rank-badge.top-three {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.list-card .new-badge {
  background: #e74c3c;
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.list-content {
  flex: 1;
}

.list-content h3 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
  font-size: 1.2rem;
}

.list-content h3 a {
  color: inherit;
  text-decoration: none;
}

.list-content h3 a:hover {
  color: #667eea;
}

.list-content .meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.list-content .summary {
  color: #555;
  line-height: 1.6;
  font-size: 0.95rem;
}

.list-content .tags {
  margin: 0.5rem 0;
}

.tag {
  display: inline-block;
  background: #e8f0fe;
  color: #1967d2;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.85rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* 详情页样式 */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.related-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.related-card h4 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.related-card h4 a {
  color: inherit;
  text-decoration: none;
}

.related-card h4 a:hover {
  color: #667eea;
}

.related-card .meta {
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.related-card .one-line {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* 响应式 */
@media (max-width: 768px) {
  .card-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .list-card {
    flex-direction: column;
    align-items: stretch;
  }

  .list-card .index-num,
  .list-card .rank-badge,
  .list-card .new-badge {
    align-self: flex-start;
  }
}