/* === Variables & Theme === */
:root {
  --bg: #fafafa;
  --bg-card: #ffffff;
  --bg-hero: linear-gradient(135deg, #4f46e5, #7c3aed, #a855f7);
  --text: #1e1e2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --dev: #3b82f6; --solo: #f59e0b; --creator: #ec4899; --career: #10b981; --biz: #f97316; --auto: #8b5cf6;
}
[data-theme="dark"] {
  --bg: #0f0f1a;
  --bg-card: #1a1a2e;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #2d2d44;
  --shadow: 0 1px 3px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.4);
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; transition: background .3s, color .3s; }
a { color: var(--primary); text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* === Header === */
.header { position: sticky; top: 0; z-index: 100; background: var(--bg-card); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; color: var(--text); }
.logo-icon { font-size: 1.5rem; }
.header-nav { display: flex; align-items: center; gap: 24px; }
.nav-link { color: var(--text-muted); font-weight: 500; font-size: .9rem; transition: color .2s; }
.nav-link:hover { color: var(--text); }
.theme-toggle { background: none; border: 2px solid var(--border); border-radius: 50%; width: 36px; height: 36px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: border-color .2s; color: var(--text); }
.theme-toggle:hover { border-color: var(--primary); }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }

/* === Hero === */
.hero { background: var(--bg-hero); padding: 80px 0 60px; text-align: center; color: #fff; }
.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.hero-highlight { background: linear-gradient(90deg, #fbbf24, #f59e0b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { font-size: 1.1rem; opacity: .9; max-width: 600px; margin: 0 auto 32px; }
.hero-search { max-width: 560px; margin: 0 auto; position: relative; }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-input { width: 100%; padding: 14px 16px 14px 48px; border: none; border-radius: 50px; font-size: 1rem; font-family: var(--font); background: var(--bg-card); color: var(--text); box-shadow: var(--shadow-lg); outline: none; }
.search-input::placeholder { color: var(--text-muted); }

/* === Gallery === */
.gallery { padding: 48px 0 64px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 32px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 8px 18px; border-radius: 50px; border: 1.5px solid var(--border); background: var(--bg-card); color: var(--text-muted); font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all .2s; font-family: var(--font); }
.tab:hover { border-color: var(--primary); color: var(--primary); }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.prompt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
@media (max-width: 480px) { .prompt-grid { grid-template-columns: 1fr; } }

/* === Prompt Card === */
.prompt-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; overflow: hidden; }
.prompt-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.card-category { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 4px 10px; border-radius: 50px; margin-bottom: 12px; }
.cat-developer { background: #dbeafe; color: #1d4ed8; }
.cat-solopreneur { background: #fef3c7; color: #b45309; }
.cat-content-creator { background: #fce7f3; color: #be185d; }
.cat-career { background: #d1fae5; color: #065f46; }
.cat-small-business { background: #ffedd5; color: #c2410c; }
.cat-automation { background: #ede9fe; color: #6d28d9; }
[data-theme="dark"] .cat-developer { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .cat-solopreneur { background: #451a03; color: #fcd34d; }
[data-theme="dark"] .cat-content-creator { background: #500724; color: #f9a8d4; }
[data-theme="dark"] .cat-career { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .cat-small-business { background: #431407; color: #fdba74; }
[data-theme="dark"] .cat-automation { background: #2e1065; color: #c4b5fd; }
.card-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.card-preview { font-size: .87rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-preview .var { color: var(--primary); font-weight: 600; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.card-vars { font-size: .75rem; color: var(--text-muted); }
.card-copy { background: none; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 6px 12px; font-size: .78rem; font-weight: 600; color: var(--primary); cursor: pointer; transition: all .2s; font-family: var(--font); }
.card-copy:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.card-copy.copied { background: #10b981; color: #fff; border-color: #10b981; }

/* === No Results === */
.no-results { text-align: center; padding: 60px 0; }
.no-results-icon { font-size: 3rem; margin-bottom: 12px; }
.no-results-text { color: var(--text-muted); font-size: 1.1rem; }

/* === Bundle === */
.bundle { background: var(--bg-hero); padding: 64px 0; text-align: center; color: #fff; }
.bundle-inner { max-width: 600px; margin: 0 auto; }
.bundle-badge { display: inline-block; background: rgba(255,255,255,.2); color: #fff; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 4px 14px; border-radius: 50px; margin-bottom: 16px; }
.bundle-title { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.bundle-subtitle { opacity: .9; margin-bottom: 24px; }
.bundle-price { margin-bottom: 24px; }
.bundle-amount { font-size: 3rem; font-weight: 800; }
.bundle-note { display: block; font-size: .9rem; opacity: .8; margin-top: 4px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 50px; font-weight: 700; font-size: 1rem; cursor: pointer; border: none; transition: transform .2s, box-shadow .2s; font-family: var(--font); text-decoration: none; }
.btn-bundle { background: #fff; color: #4f46e5; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.btn-bundle:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.2); }

/* === Footer === */
.footer { padding: 24px 0; text-align: center; color: var(--text-muted); font-size: .85rem; border-top: 1px solid var(--border); }
.footer a { color: var(--primary); }

/* === Modal === */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity .25s; padding: 20px; }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal { background: var(--bg-card); border-radius: var(--radius); max-width: 640px; width: 100%; max-height: 85vh; overflow-y: auto; padding: 32px; position: relative; transform: translateY(20px); transition: transform .25s; box-shadow: var(--shadow-lg); }
.modal-overlay.open .modal { transform: translateY(0); }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background .2s; }
.modal-close:hover { background: var(--border); }
.modal-category-badge { display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 4px 10px; border-radius: 50px; margin-bottom: 12px; }
.modal-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 20px; }
.modal-label { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 8px; }
.modal-prompt { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; font-size: .9rem; line-height: 1.7; margin-bottom: 20px; white-space: pre-wrap; }
.modal-prompt .var { color: var(--primary); font-weight: 600; background: rgba(99,102,241,.1); padding: 2px 4px; border-radius: 4px; }
.variable-fields { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.var-field { display: flex; flex-direction: column; gap: 4px; }
.var-field label { font-size: .8rem; color: var(--text-muted); font-weight: 600; }
.var-field input { padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: .9rem; font-family: var(--font); background: var(--bg); color: var(--text); outline: none; transition: border-color .2s; }
.var-field input:focus { border-color: var(--primary); }
.modal-preview { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; font-size: .9rem; line-height: 1.7; white-space: pre-wrap; min-height: 60px; margin-bottom: 20px; }
.modal-preview .filled { color: var(--primary); font-weight: 600; }
.modal-actions { display: flex; gap: 12px; }
.btn-copy { background: var(--primary); color: #fff; flex: 1; justify-content: center; }
.btn-copy:hover { background: var(--primary-hover); }
.btn-copy.copied { background: #10b981; }
.btn-pack { background: var(--bg); color: var(--primary); border: 1.5px solid var(--border); flex: 1; justify-content: center; }
.btn-pack:hover { border-color: var(--primary); }

/* === Animations === */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.prompt-card { animation: fadeInUp .4s ease both; }
.prompt-card:nth-child(2) { animation-delay: .05s; }
.prompt-card:nth-child(3) { animation-delay: .1s; }
.prompt-card:nth-child(4) { animation-delay: .15s; }
.prompt-card:nth-child(5) { animation-delay: .2s; }
.prompt-card:nth-child(6) { animation-delay: .25s; }
