:root {
  --accent: #f59e0b;
  --accent-dark: #b45309;
  --bg: #f8f7f4;
  --card-bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 10px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.site-header {
  text-align: center;
  padding: 3rem 1rem 1.5rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.back-link:hover {
  text-decoration: underline;
}

.site-header h1 {
  margin: 0.25rem 0 0.5rem;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}

.tagline {
  margin: 0 auto;
  max-width: 640px;
  color: var(--muted);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.search-box {
  width: 100%;
  max-width: 560px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  outline: none;
}

.search-box:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.filter-btn .count {
  color: var(--muted);
  font-size: 0.8rem;
}

.filter-btn:hover {
  border-color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.filter-btn.active .count {
  color: rgba(255, 255, 255, 0.85);
}

.results-info {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 1rem 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.tag {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  color: #fff;
  background: var(--accent);
}

.tag-writing { background: #f59e0b; }
.tag-coding { background: #3b82f6; }
.tag-data-analysis { background: #10b981; }
.tag-education-tutoring { background: #8b5cf6; }
.tag-summarization { background: #ef4444; }
.tag-translation { background: #06b6d4; }

.prompt-text {
  flex: 1;
  margin: 0;
  padding: 1rem;
  background: #1f2937;
  color: #f9fafb;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.copy-btn {
  align-self: flex-start;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.copy-btn:hover {
  background: var(--accent-dark);
}

.copy-btn:active {
  transform: scale(0.97);
}

.copy-btn.copied {
  background: #16a34a;
}

.use-case {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.use-case strong {
  color: var(--text);
}

.site-footer {
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--accent-dark);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

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