/* Prompt Armory — Marketplace Styles */

:root {
  --bg: #0a0a0f;
  --surface: #13131a;
  --surface2: #1a1a24;
  --border: #22222e;
  --text: #f0f0f5;
  --text-muted: #8888a0;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --green: #22c55e;
  --amber: #f59e0b;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 24px 0;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-inner a { color: var(--text-muted); text-decoration: none; }
.footer-inner a:hover { color: var(--text); }

/* HERO */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 64px 24px;
  text-align: center;
}
.hero-inner { max-width: 600px; margin: 0 auto; }
.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 28px;
}

.search-bar {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto;
}
.search-bar input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}
.search-bar input:focus { border-color: var(--accent); }
.search-bar button {
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.search-bar button:hover { background: var(--accent-hover); }

/* CATEGORIES BAR */
.categories-bar {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: auto;
  flex-wrap: wrap;
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: all 0.15s;
}
.cat-chip:hover, .cat-chip.active {
  border-color: var(--accent);
  color: var(--text);
}
.cat-chip .count {
  background: var(--surface2);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.75rem;
}
.submit-chip {
  border-color: var(--accent);
  color: var(--accent);
  margin-left: auto;
}
.submit-chip:hover {
  background: var(--accent);
  color: white;
}

/* MAIN CONTENT */
main { flex: 1; }

/* PROMPTS SECTION */
.prompts-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}
.prompts-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}
.prompts-header h2 { font-size: 1.4rem; font-weight: 600; }
.result-count { color: var(--text-muted); font-size: 0.9rem; }

/* GRID */
.prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* PROMPT CARD */
.prompt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, transform 0.15s;
}
.prompt-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-category {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.card-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}
.card-price.free { color: var(--green); }
.card-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 4px;
}
.card-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.card-score {
  display: flex;
  align-items: center;
  gap: 2px;
}
.star { color: var(--border); font-size: 0.85rem; }
.star.filled { color: var(--amber); }
.score-num { font-size: 0.8rem; color: var(--text-muted); margin-left: 4px; }
.card-models { display: flex; gap: 4px; }
.model-tag {
  font-size: 0.7rem;
  background: var(--surface2);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
.empty-state a { color: var(--accent); }

/* DETAIL PAGE */
.detail-page { padding: 32px 24px; }
.detail-container { max-width: 760px; margin: 0 auto; }
.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 24px;
}
.back-link:hover { color: var(--text); }
.detail-header { margin-bottom: 32px; }
.detail-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: center;
}
.detail-category {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.detail-price {
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--surface2);
  padding: 2px 10px;
  border-radius: 999px;
}
.detail-price.free { color: var(--green); }
.detail-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.detail-description { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 16px; }
.detail-info {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.detail-info a { color: var(--accent); }
.detail-info strong { color: var(--text); }

.detail-section { margin-bottom: 32px; }
.detail-section h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
}
.models-list { display: flex; gap: 8px; flex-wrap: wrap; }
.model-badge {
  background: var(--surface2);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.prompt-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.prompt-text {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 16px;
  color: var(--text);
}
.copy-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.copy-btn:hover {
  background: var(--accent);
  color: white;
}

.sample-output {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  font-size: 0.85rem;
  line-height: 1.7;
  white-space: pre-wrap;
  color: var(--text-muted);
  max-height: 400px;
  overflow-y: auto;
}

.tags-list { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-chip {
  background: var(--surface2);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.15s;
}
.tag-chip:hover { color: var(--accent); border-color: var(--accent); }

.detail-cta {
  margin-top: 40px;
  text-align: center;
}
.detail-cta a {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.15s;
}
.detail-cta a:hover { background: var(--accent-hover); }

/* SUBMIT PAGE */
.submit-page { padding: 32px 24px; }
.submit-container { max-width: 640px; margin: 0 auto; }
.submit-container h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.submit-intro { color: var(--text-muted); margin-bottom: 32px; }
.submit-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.form-group input, .form-group textarea, .form-group select {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { margin-top: 8px; }
.submit-btn {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.submit-btn:hover:not(:disabled) { background: var(--accent-hover); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.form-note { font-size: 0.8rem; color: var(--text-muted); text-align: center; margin-top: 4px; }
.success-msg {
  text-align: center;
  padding: 48px 24px;
}
.success-msg h2 { font-size: 1.5rem; margin-bottom: 12px; }
.success-msg p { color: var(--text-muted); margin-bottom: 24px; }
.success-msg .submit-btn {
  width: auto;
  padding: 12px 28px;
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
}

/* 404 */
body > .placeholder { flex: 1; display: flex; align-items: center; justify-content: center; }