:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #13213a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #4f7cff;
  --primary-soft: #e8eeff;
  --video-chip: #dbeafe;
  --text-chip: #dcfce7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.site-header {
  padding: 28px 16px 12px;
  text-align: center;
}

.site-header h1 {
  margin: 0;
  font-size: 24px;
}

.site-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.container {
  max-width: 1220px;
  margin: 0 auto 40px;
  padding: 0 16px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  justify-content: center;
}

.tab-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
}

.tab-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.search-wrap {
  margin-bottom: 14px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
}

.search-box input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 14px;
  background: transparent;
}

.search-icon {
  color: var(--muted);
}

.filter-section,
.picked-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 16px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.cat-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  text-align: left;
}

.cat-btn.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.cat-title {
  font-size: 14px;
  font-weight: 600;
}

.cat-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.btn-primary {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

.picked-panel {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.picked-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.picked-tag {
  font-size: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid #cfd9ff;
  border-radius: 999px;
  padding: 2px 8px;
}

.picked-actions {
  display: flex;
  gap: 8px;
}

.cards-count {
  margin: 4px 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.prompt-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(8, 15, 35, 0.04);
}

.prompt-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.prompt-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.prompt-meta {
  color: var(--muted);
  font-size: 12px;
}

.prompt-text {
  margin: 0;
  line-height: 1.6;
  white-space: pre-wrap;
}

.prompt-actions {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.check-label {
  font-size: 12px;
  color: var(--muted);
}

.copy-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #111827;
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1023px) {
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .site-header h1 {
    font-size: 20px;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .picked-panel {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .picked-actions {
    width: 100%;
  }

  .picked-actions button {
    flex: 1;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .prompt-top,
  .prompt-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
