* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f0f2f5;
  color: #1a1a1a;
  min-height: 100vh;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 20px 24px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1 {
  font-size: 1.35rem;
  font-weight: 700;
}

.subtitle {
  color: #6b7280;
  font-size: 0.9rem;
  margin-top: 4px;
}

.toolbar {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.toolbar input,
.toolbar select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
}

.toolbar input {
  flex: 1;
  min-width: 200px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.thumb-wrap {
  position: relative;
  aspect-ratio: 9 / 16;
  background: linear-gradient(145deg, #e8eaed, #dfe3e8);
  overflow: hidden;
}

.thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  display: block;
  background: #1a1a1a;
}

.thumb-wrap.no-img::after {
  content: "预览生成中";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.85rem;
}

.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  text-transform: uppercase;
}

.badge.new {
  background: #2563eb;
}

.badge.hot {
  background: #dc2626;
  right: 52px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 14px 4px;
  line-height: 1.3;
}

.card-meta {
  font-size: 0.78rem;
  color: #9ca3af;
  padding: 0 14px 14px;
}

@media (max-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px;
  }
}
