*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #faf5ff; --surface: #fff; --surface2: #faf5ff;
  --border: #e9d5ff; --accent: #7c3aed; --accent2: #6d28d9;
  --accent-light: #f5f3ff; --text: #1e1b4b; --muted: #6b7280; --label: #5b21b6;
  --success: #16a34a; --tag-bg: #f3e8ff; --tag-text: #7c3aed;
}
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; font-size: 15px; }

/* HEADER */
.site-header { background: var(--accent); color: white; padding: 32px 16px 0; text-align: center; }
.site-header h1 { font-size: 28px; font-weight: 900; letter-spacing: -1px; }
.site-header h1 span { opacity: .7; }
.site-header p { font-size: 14px; opacity: .85; margin: 6px 0 16px; }
.header-nav { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; padding-bottom: 0; }
.header-nav a { color: rgba(255,255,255,.8); font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 8px 8px 0 0; text-decoration: none; white-space: nowrap; }
.header-nav a.active, .header-nav a:hover { background: rgba(255,255,255,.2); color: white; }

.container { max-width: 1040px; margin: 0 auto; padding: 24px 16px 60px; }

/* SEARCH + FILTER */
.toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.search-box { position: relative; }
.search-box input { width: 100%; padding: 12px 16px 12px 42px; border: 1.5px solid var(--border); border-radius: 12px; font-size: 15px; background: var(--surface); outline: none; color: var(--text); }
.search-box input:focus { border-color: var(--accent); }
.search-box span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 16px; }
.filter-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.filter-chips::-webkit-scrollbar { height: 3px; }
.chip { padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--surface); font-size: 12px; font-weight: 700; cursor: pointer; color: var(--muted); white-space: nowrap; transition: all .15s; }
.chip.active { background: var(--accent); color: white; border-color: var(--accent); }
.chip:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

/* STATS */
.stats-row { font-size: 12px; color: var(--muted); margin-bottom: 16px; }

/* GRID */
.prompt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
@media (max-width: 640px) { .prompt-grid { grid-template-columns: 1fr; } }

/* PROMPT CARD */
.prompt-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, box-shadow .15s; }
.prompt-card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(124,58,237,.08); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-category { font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: 12px; background: var(--tag-bg); color: var(--tag-text); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.fav-btn { background: none; border: none; font-size: 16px; cursor: pointer; opacity: .4; transition: opacity .15s; flex-shrink: 0; }
.fav-btn.active { opacity: 1; }
.card-title { font-size: 14px; font-weight: 800; color: var(--text); line-height: 1.3; }
.card-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
.prompt-box { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-size: 12px; color: #374151; line-height: 1.7; font-family: inherit; position: relative; max-height: 100px; overflow: hidden; transition: max-height .3s; }
.prompt-box.expanded { max-height: 600px; }
.prompt-text { white-space: pre-wrap; word-break: break-word; }
.expand-btn { background: none; border: none; font-size: 11px; color: var(--accent); cursor: pointer; font-weight: 700; margin-top: 4px; padding: 0; }
.card-actions { display: flex; gap: 8px; }
.copy-btn { flex: 1; padding: 9px; background: var(--accent); color: white; border: none; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s; }
.copy-btn:hover { background: var(--accent2); }
.copy-btn.copied { background: var(--success); }

/* CATEGORY PAGES HERO */
.cat-hero { background: var(--accent); color: white; padding: 28px 16px; text-align: center; }
.cat-hero h1 { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.cat-hero p { font-size: 14px; opacity: .85; max-width: 520px; margin: 0 auto; }

/* SEO */
.seo { margin-top: 36px; }
.seo h2 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.seo h3 { font-size: 14px; font-weight: 700; margin: 14px 0 6px; color: var(--label); }
.seo p, .seo li { font-size: 14px; color: #5b21b6; line-height: 1.7; }
.seo ul, .seo ol { padding-left: 20px; margin-bottom: 10px; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 8px; }
summary { font-weight: 700; font-size: 14px; cursor: pointer; color: var(--text); }
details p { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.6; }

footer { text-align: center; padding: 20px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); }
footer a { color: var(--accent); text-decoration: none; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state div:first-child { font-size: 36px; margin-bottom: 8px; }
