/* PromptJectManager — prompt directory. Cream-Coffee theme. */
:root {
  --bg: #FFFDF8;
  --bg-card: #FFFFFF;
  --bg-soft: #FAF6EF;
  --border: rgba(196,122,58,0.18);
  --border-hi: rgba(196,122,58,0.35);
  --text: #3D2B1F;
  --text-muted: #9C8C7C;
  --faint: #C4B5A0;
  --accent: #C47A3A;
  --accent-hi: #D4884A;
  --accent-2: #A0715E;
  --accent-lt: rgba(196,122,58,0.10);
  --success: #2D6A4F;
  --radius: 12px;
  --maxw: 1180px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent); }
img, svg { display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,253,248,0.9);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header .row { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); font-size: 18px; }
.brand svg { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 18px; margin-left: auto; align-items: center; }
.nav a { color: var(--text-muted); font-weight: 500; font-size: 14px; }
.nav a:hover, .nav a.active { color: var(--accent); }
.btn { display: inline-block; background: var(--accent); color: #fff; padding: 9px 16px;
  border-radius: var(--radius); font-weight: 600; font-size: 14px; border: none; cursor: pointer; }
.btn:hover { background: var(--accent-hi); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--border-hi); }
.btn-ghost:hover { background: var(--accent-lt); color: var(--accent); }

/* Hero */
.hero { text-align: center; padding: 72px 0 40px; }
.hero h1 { font-size: 42px; line-height: 1.1; letter-spacing: -0.02em; }
.hero p { color: var(--text-muted); font-size: 18px; max-width: 640px; margin: 16px auto 28px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Search box */
.searchbar { display: flex; gap: 10px; max-width: 560px; margin: 0 auto; }
.searchbar input { flex: 1; padding: 12px 16px; border: 1px solid var(--border-hi);
  border-radius: var(--radius); font-size: 15px; background: var(--bg-card); color: var(--text); }
.searchbar input:focus { outline: none; border-color: var(--accent); }

/* Featured categories */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; }
.cat-tile { display: block; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; transition: border-color .15s, transform .15s; }
.cat-tile:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.cat-tile h3 { font-size: 16px; color: var(--text); }
.cat-tile p { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.cat-tile .count { font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 10px; }

/* Listing layout */
.listing { display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding: 32px 0 64px; }
.sidebar h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 10px; }
.sidebar ul { list-style: none; }
.sidebar li a { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 8px;
  color: var(--text-muted); font-size: 14px; }
.sidebar li a:hover { background: var(--accent-lt); color: var(--accent); }
.sidebar li a.active { background: var(--accent); color: #fff; }
.sidebar li a.active .badge { color: #fff; }
.badge { color: var(--faint); font-size: 12px; }

.controls { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.controls input[type=search] { flex: 1; min-width: 200px; padding: 10px 14px;
  border: 1px solid var(--border-hi); border-radius: var(--radius); background: var(--bg-card); color: var(--text); font-size: 14px; }
.controls select { padding: 10px 12px; border: 1px solid var(--border-hi); border-radius: var(--radius);
  background: var(--bg-card); color: var(--text); font-size: 14px; }
.result-meta { color: var(--text-muted); font-size: 13px; margin-bottom: 14px; }

/* Cards */
.cards { display: grid; gap: 14px; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card:hover { border-color: var(--border-hi); }
.card .top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.card h3 { font-size: 17px; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent); }
.cat-pill { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--accent-lt); color: var(--accent); white-space: nowrap; }
.card p.desc { color: var(--text-muted); font-size: 14px; margin: 8px 0 12px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tag { font-size: 11px; color: var(--text-muted); background: var(--bg-soft); padding: 2px 8px; border-radius: 6px; }
.card .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 26px; }
.pagination button, .pagination a { padding: 8px 14px; border: 1px solid var(--border-hi);
  border-radius: 8px; background: var(--bg-card); color: var(--text); font-size: 14px; cursor: pointer; }
.pagination button[disabled] { opacity: .4; cursor: default; }
.pagination .page-info { color: var(--text-muted); border: none; background: none; }

/* Detail */
.detail { padding: 32px 0 64px; max-width: 820px; }
.detail .crumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.detail h1 { font-size: 32px; letter-spacing: -0.01em; }
.detail .meta { display: flex; gap: 10px; align-items: center; margin: 12px 0 20px; flex-wrap: wrap; }
.promptbox { position: relative; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; white-space: pre-wrap; font-size: 14.5px; line-height: 1.6; }
.copy-btn { position: absolute; top: 12px; right: 12px; }
.related { margin-top: 40px; }
.related h2 { font-size: 18px; margin-bottom: 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--text-muted); font-size: 13px; }
.site-footer .row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Animated coffee background (decorative, behind everything) */
.coffee-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; color: var(--accent); }
.cbg-cup { position: absolute; opacity: .10; animation-name: cbg-float;
  animation-timing-function: ease-in-out; animation-iteration-count: infinite; will-change: transform; }
.cbg-steam { animation: cbg-steam 3.4s ease-in-out infinite; transform-origin: center; }
@keyframes cbg-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-16px) rotate(3deg); } }
@keyframes cbg-steam { 0% { opacity: 0; transform: translateY(3px) scaleY(.6); } 45% { opacity: .8; } 100% { opacity: 0; transform: translateY(-9px) scaleY(1.1); } }
@media (prefers-reduced-motion: reduce) { .cbg-cup, .cbg-steam { animation: none; } }

/* Responsive */
@media (max-width: 800px) {
  .listing { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .hero h1 { font-size: 32px; }
}
