/* AI Prompt Library — v3 Styles */

.pl-app { max-width: 960px; margin: 0 auto; padding: 0 1.5rem 4rem }

/* Hero — punchy, minimal */
.pl-hero { text-align: center; padding: 2rem 0 1rem }
.pl-hero h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; margin-bottom: 0.5rem; color: #1e293b }
.pl-hero h1 span { color: #2563eb }
.pl-hero p { color: #64748b; max-width: 520px; margin: 0 auto; font-size: 0.9rem; line-height: 1.6 }

/* Sticky search */
.pl-search-wrap { position: sticky; top: 50px; z-index: 50; background: var(--background-color, #f5f5f5); padding: 0.8rem 0 0.6rem }
.pl-search { width: 100%; padding: 0.75rem 1rem 0.75rem 2.6rem; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 0.95rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 0.8rem center no-repeat; transition: border-color 0.2s }
.pl-search:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1) }

/* ─── FEATURED PROMPTS — instant value ─── */
.pl-featured { margin-bottom: 2.5rem }
.pl-section-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.8rem; color: #1e293b; display: flex; align-items: center; gap: 0.4rem }
.pl-section-count { font-size: 0.75rem; color: #94a3b8; font-weight: 500 }

.pl-featured-grid { display: grid; grid-template-columns: 1fr; gap: 0.8rem }
@media(min-width: 640px) { .pl-featured-grid { grid-template-columns: 1fr 1fr } }
@media(min-width: 860px) { .pl-featured-grid { grid-template-columns: 1fr 1fr 1fr } }

.pl-feat-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 1rem 1.2rem; transition: border-color 0.2s, box-shadow 0.2s;
}
.pl-feat-card:hover { border-color: #2563eb; box-shadow: 0 2px 12px rgba(37,99,235,0.08) }
.pl-feat-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem }
.pl-feat-cat { font-size: 0.7rem; color: #64748b }
.pl-feat-card h3 { font-size: 0.95rem; font-weight: 600; margin: 0 0 0.35rem; color: #1e293b }
.pl-feat-preview { font-size: 0.8rem; color: #64748b; line-height: 1.5; margin-bottom: 0.6rem }
.pl-feat-actions { display: flex; gap: 0.4rem }
.pl-feat-full { margin-top: 0.8rem; border-top: 1px solid #f1f5f9; padding-top: 0.8rem }

/* ─── CATEGORY SECTIONS ─── */
.pl-cat-section { margin-bottom: 2rem }
.pl-cat-section .pl-section-title { font-size: 1.1rem; padding-bottom: 0.4rem; border-bottom: 2px solid #e2e8f0; margin-bottom: 0.8rem }

/* ─── ACCORDION PROMPT CARDS ─── */
.pl-prompt-list { display: flex; flex-direction: column; gap: 0.4rem }

.pl-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  overflow: hidden; transition: border-color 0.15s;
}
.pl-card:hover { border-color: #cbd5e1 }
.pl-card.open { border-color: #2563eb }

.pl-card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 1rem; cursor: pointer; user-select: none;
}
.pl-card-header h3 { font-size: 0.88rem; font-weight: 600; margin: 0; color: #334155 }
.pl-card-header .meta { display: flex; gap: 0.3rem; align-items: center; flex-shrink: 0 }

.pl-tag { font-size: 0.6rem; font-weight: 600; padding: 0.12rem 0.4rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.3px }
.pl-tag.diff-beginner { background: #dcfce7; color: #15803d }
.pl-tag.diff-intermediate { background: #fef3c7; color: #b45309 }
.pl-tag.diff-advanced { background: #fce7f3; color: #be185d }

.pl-card-arrow { font-size: 0.65rem; color: #94a3b8; transition: transform 0.2s; margin-left: 0.4rem }
.pl-card.open .pl-card-arrow { transform: rotate(180deg) }

.pl-card-body { display: none; padding: 0 1rem 0.8rem; border-top: 1px solid #f1f5f9 }
.pl-card.open .pl-card-body { display: block; padding-top: 0.7rem }

.pl-model-tags { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-bottom: 0.5rem }
.pl-model-tag { font-size: 0.6rem; font-weight: 500; padding: 0.1rem 0.35rem; border-radius: 3px; background: #f0fdf4; color: #16a34a }

.pl-prompt-text {
  font-size: 0.78rem; line-height: 1.7; color: #334155;
  background: #f8fafc; border-radius: 6px; padding: 0.8rem 0.9rem;
  margin-bottom: 0.6rem; white-space: pre-wrap; word-break: break-word;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.pl-card-actions { display: flex; gap: 0.5rem; align-items: center; justify-content: space-between }
.pl-btn { padding: 0.4rem 0.85rem; border-radius: 6px; font-size: 0.78rem; font-weight: 600; border: 1px solid #e2e8f0; background: #fff; cursor: pointer; transition: all 0.15s; display: inline-flex; align-items: center; gap: 0.3rem }
.pl-btn:hover { border-color: #2563eb; color: #2563eb }
.pl-btn.primary { background: #2563eb; color: #fff; border-color: #2563eb }
.pl-btn.primary:hover { background: #1d4ed8 }
.pl-btn.copied { background: #16a34a; color: #fff; border-color: #16a34a }

.pl-tip { font-size: 0.72rem; color: #94a3b8; line-height: 1.45 }

/* ─── BACK & SEARCH RESULTS ─── */
.pl-back { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; color: #2563eb; cursor: pointer; background: none; border: none; font-weight: 500; padding: 0.3rem 0; margin-bottom: 1rem }
.pl-back:hover { text-decoration: underline }
.pl-results-info { font-size: 0.82rem; color: #94a3b8; margin-bottom: 0.8rem }

/* ─── IDEAS ─── */
.pl-ideas { margin-top: 2rem; padding-top: 1.5rem; border-top: 2px solid #e2e8f0 }
.pl-ideas h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.3rem }
.pl-ideas > p { color: #64748b; font-size: 0.85rem; margin-bottom: 1rem; line-height: 1.6 }
.pl-ideas-grid { display: grid; grid-template-columns: 1fr; gap: 0.5rem }
@media(min-width: 640px) { .pl-ideas-grid { grid-template-columns: 1fr 1fr } }
.pl-idea-card { background: linear-gradient(135deg, #eff6ff, #f0fdf4); border: 1px solid #e2e8f0; border-radius: 8px; padding: 0.9rem 1rem }
.pl-idea-card h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.15rem }
.pl-idea-card p { font-size: 0.78rem; color: #475569; line-height: 1.5 }

/* ─── UTILITY ─── */
.pl-empty { text-align: center; padding: 3rem 1rem; color: #94a3b8 }
.pl-empty .icon { font-size: 2.5rem; margin-bottom: 0.5rem }
.pl-empty p { font-size: 0.92rem }

.pl-top-btn { position: fixed; bottom: 2rem; right: 2rem; width: 40px; height: 40px; border-radius: 50%; background: #2563eb; color: #fff; border: none; cursor: pointer; font-size: 1.2rem; display: none; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.15); z-index: 100 }
.pl-top-btn.visible { display: flex }

.hidden { display: none !important }
.fade-in { animation: fadeIn 0.2s ease-out }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px) } to { opacity: 1; transform: translateY(0) } }
