.blog-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.blog-controls h2 {
  margin: 0;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-tab {
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(24, 34, 46, 0.96);
  color: #dce6f2;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  font-size: 0.875rem;
}

.category-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.category-tab.active {
  background: linear-gradient(135deg, #26b8f6, #5ce4a0);
  border-color: transparent;
  color: #0a1018;
  font-weight: 600;
}

.controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.controls input,
.controls select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 34, 46, 0.96);
  color: #f0f6fc;
  font-size: 0.875rem;
}

.controls select option {
  color: #0c1118;
  background: #e8eff8;
}

.controls input::placeholder {
  color: var(--muted);
}

.controls input {
  min-width: 200px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.blog-card {
  border: 1px solid color-mix(in srgb, var(--line) 80%, #5a7a96);
  background: rgba(24, 34, 46, 0.96);
  border-radius: 12px;
  padding: 1rem 1.05rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.blog-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
}

.blog-card .blog-category {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  background: rgba(59, 196, 255, 0.18);
  color: #7dd3ff;
  border-radius: 4px;
  align-self: flex-start;
  font-weight: 600;
}

#blog-meta {
  color: #b8cadc;
  line-height: 1.6;
}

.blog-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.5;
  font-weight: 600;
}

.blog-card h3 a {
  color: #f3f8ff;
  text-decoration: none;
}

.blog-card h3 a:hover {
  color: var(--primary);
}

.blog-card .blog-excerpt {
  color: #c8d6e4;
  font-size: 0.925rem;
  line-height: 1.65;
  margin: 0;
  flex-grow: 1;
}

.blog-card .blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #b8cadc;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.blog-card .blog-source {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-card .wechat-icon {
  width: 14px;
  height: 14px;
  background: #07c160;
  border-radius: 2px;
  display: inline-block;
}

.load-more-container {
  text-align: center;
  margin-top: 1.5rem;
}

.sync-sources {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-top: 0.75rem;
}

.source-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, #5a7a96);
  background: rgba(24, 34, 46, 0.96);
  border-radius: 12px;
}

.source-item .source-name {
  color: #f3f8ff;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
}

.source-item a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.875rem;
  white-space: nowrap;
}

.source-item a:hover {
  text-decoration: underline;
}

.error-message {
  padding: 1rem 0;
  color: var(--muted);
  line-height: 1.6;
}

.error-message a {
  color: var(--primary);
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .controls {
    width: 100%;
  }

  .controls input {
    min-width: 150px;
    flex: 1;
  }

  .sync-sources {
    grid-template-columns: 1fr;
  }
}
