/* ── Promptor — Design System ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

/* ── Theme Variables ─────────────────────────────────────── */
:root, [data-theme="dark"] {
  --bg: #0a0a12; --bg-2: #12121e; --bg-3: #1a1a2e; --bg-card: #14142a;
  --border: #2a2a4a; --border-hover: #3d3d6b;
  --text: #e8e8f0; --text-2: #a0a0b8; --text-3: #6b6b88;
  --primary: #a855f7; --primary-hover: #9333ea; --primary-glow: rgba(168,85,247,.25);
  --accent: #06b6d4; --accent-glow: rgba(6,182,212,.2);
  --gradient: linear-gradient(135deg, #a855f7, #06b6d4);
  --card-shadow: 0 4px 24px rgba(0,0,0,.4);
  --glass: rgba(20,20,42,.85);
  --glass-border: rgba(255,255,255,.06);
  --success: #4ade80; --danger: #ef4444;
  --hero-overlay: rgba(10,10,18,.6);
}

[data-theme="light"] {
  --bg: #f5f5fa; --bg-2: #eeeef4; --bg-3: #e4e4ec; --bg-card: #ffffff;
  --border: #d4d4e0; --border-hover: #b8b8cc;
  --text: #1a1a2e; --text-2: #555570; --text-3: #8888a0;
  --primary: #7c3aed; --primary-hover: #6d28d9; --primary-glow: rgba(124,58,237,.15);
  --accent: #0891b2; --accent-glow: rgba(8,145,178,.12);
  --gradient: linear-gradient(135deg, #7c3aed, #0891b2);
  --card-shadow: 0 4px 24px rgba(0,0,0,.08);
  --glass: rgba(255,255,255,.92);
  --glass-border: rgba(0,0,0,.06);
  --success: #16a34a; --danger: #dc2626;
  --hero-overlay: rgba(245,245,250,.5);
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.6; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background .35s, color .35s;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Ad Modal ────────────────────────────────────────────── */
.ad-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.78); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; opacity: 0; pointer-events: none;
  transition: opacity .35s cubic-bezier(.16,1,.3,1);
}
.ad-overlay.open { opacity: 1; pointer-events: all; }

.ad-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 22px;
  width: 100%; max-width: 480px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px var(--glass-border);
  animation: adPopIn .4s cubic-bezier(.16,1,.3,1);
  position: relative;
}
.ad-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(168,85,247,.06), rgba(6,182,212,.04));
  pointer-events: none;
}
@keyframes adPopIn {
  from { opacity: 0; transform: scale(.9) translateY(30px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Header bar */
.ad-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1.2rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}
.ad-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-3);
  background: var(--bg-2); border: 1px solid var(--border);
  padding: .2rem .6rem; border-radius: 6px;
}
.ad-skip-btn {
  display: flex; align-items: center; gap: .35rem;
  padding: .4rem 1rem; border-radius: 8px; font-size: .82rem;
  font-weight: 700; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text-3);
  transition: all .25s; cursor: pointer;
}
.ad-skip-btn:not(:disabled) {
  background: var(--gradient); color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px var(--primary-glow);
  cursor: pointer;
}
.ad-skip-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}
.ad-skip-btn:disabled { cursor: not-allowed; opacity: .7; }

/* Body — your ad content goes here */
.ad-body {
  min-height: 260px;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.ad-placeholder {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  width: 100%;
}
.ad-placeholder-icon {
  width: 72px; height: 72px; border-radius: 20px;
  background: var(--bg-3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .25rem;
}
.ad-placeholder-text {
  font-size: 1.3rem; font-weight: 800; color: var(--text);
  letter-spacing: -.02em;
}
.ad-placeholder-sub {
  font-size: .88rem; color: var(--text-3); margin-top: -.25rem;
}
.ad-cta-btn {
  display: inline-block;
  margin-top: .5rem;
  padding: .6rem 1.6rem;
  border-radius: 10px;
  background: var(--gradient); color: #fff;
  font-size: .9rem; font-weight: 700;
  text-decoration: none;
  transition: all .25s;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.ad-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
  color: #fff;
}

/* Footer */
.ad-footer {
  padding: .75rem 1.2rem;
  background: var(--bg-3);
  border-top: 1px solid var(--border);
  text-align: center;
}
.ad-prompt-ready {
  font-size: .82rem; color: var(--text-2); font-weight: 500;
}

@media (max-width: 480px) {
  .ad-card { border-radius: 16px; }
  .ad-body { min-height: 200px; padding: 1.5rem 1rem; }
  .ad-placeholder-text { font-size: 1.1rem; }
}

/* ── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--success); color: #000; padding: .7rem 1.4rem;
  border-radius: 12px; font-size: .88rem; font-weight: 600;
  display: flex; align-items: center; gap: .5rem; z-index: 2000;
  box-shadow: 0 8px 30px rgba(74,222,128,.3);
  opacity: 0; transition: all .4s cubic-bezier(.16,1,.3,1);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Header ──────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--glass); backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transition: background .35s;
}
.header-inner {
  max-width: 1320px; margin: 0 auto; padding: .8rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.logo { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.logo-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
}
.logo-icon.small { width: 32px; height: 32px; border-radius: 10px; }
.logo-icon svg { stroke: #fff !important; }
.logo-text { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.header-actions { display: flex; align-items: center; gap: .75rem; }

/* Search */
.search-box {
  display: flex; align-items: center; gap: .5rem;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 12px; padding: .5rem 1rem; width: 320px;
  transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.search-icon { color: var(--text-3); flex-shrink: 0; }
.search-box input {
  border: none; background: none; color: var(--text);
  font-size: .88rem; width: 100%; outline: none;
}
.search-box input::placeholder { color: var(--text-3); }
.search-kbd {
  font-size: .7rem; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 6px; padding: .15rem .4rem; color: var(--text-3);
  font-family: inherit; flex-shrink: 0;
}

/* Theme Toggle */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--border); display: flex;
  align-items: center; justify-content: center;
  color: var(--text-2); transition: all .25s;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-glow); }
[data-theme="dark"] .theme-icon.moon { display: none; }
[data-theme="light"] .theme-icon.sun { display: none; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative; padding: 5rem 1.5rem 3rem; text-align: center;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(80px);
  animation: orbFloat 8s ease-in-out infinite;
}
.hero-orb-1 { width: 400px; height: 400px; background: rgba(168,85,247,.15); top: -100px; left: -100px; }
.hero-orb-2 { width: 350px; height: 350px; background: rgba(6,182,212,.12); bottom: -80px; right: -80px; animation-delay: 2s; }
.hero-orb-3 { width: 250px; height: 250px; background: rgba(236,72,153,.08); top: 50%; left: 60%; animation-delay: 4s; }
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.05); }
}
.hero-content { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--primary-glow); border: 1px solid rgba(168,85,247,.25);
  border-radius: 100px; padding: .4rem 1rem; font-size: .8rem;
  font-weight: 600; color: var(--primary); margin-bottom: 1.5rem;
}
.hero-title { font-size: 3rem; font-weight: 900; line-height: 1.15; letter-spacing: -.03em; margin-bottom: 1rem; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { color: var(--text-2); font-size: 1.1rem; max-width: 520px; margin: 0 auto 2rem; line-height: 1.6; }
.hero-stats { display: flex; align-items: center; justify-content: center; gap: 2rem; }
.hero-stat { text-align: center; }
.hero-stat-value { display: block; font-size: 1.6rem; font-weight: 800; }
.hero-stat-label { font-size: .78rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.hero-stat-divider { width: 1px; height: 36px; background: var(--border); }

/* ── Categories ──────────────────────────────────────────── */
.categories-bar {
  position: sticky; top: 57px; z-index: 90;
  background: var(--glass); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border); transition: background .35s;
}
.categories-inner {
  max-width: 1320px; margin: 0 auto; padding: .8rem 1.5rem;
  display: flex; gap: .5rem; overflow-x: auto;
  scrollbar-width: none;
}
.categories-inner::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0; display: flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; border-radius: 100px; font-size: .84rem;
  font-weight: 600; color: var(--text-2); border: 1px solid var(--border);
  background: var(--bg-2); transition: all .25s; white-space: nowrap;
}
.cat-chip:hover { border-color: var(--primary); color: var(--primary); }
.cat-chip.active {
  background: var(--gradient); color: #fff;
  border-color: transparent; box-shadow: 0 4px 15px var(--primary-glow);
}

/* ── Main / Grid ─────────────────────────────────────────── */
.main-content { max-width: 1320px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}

/* ── Prompt Card ─────────────────────────────────────────── */
.prompt-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; cursor: pointer;
  transition: all .3s cubic-bezier(.16,1,.3,1);
  position: relative;
}
.prompt-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--card-shadow);
}
.prompt-card:hover .card-img img { transform: scale(1.05); }
.card-img { position: relative; overflow: hidden; height: 200px; background: var(--bg-3); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.6) 100%);
}
.card-badge {
  position: absolute; top: .75rem; left: .75rem;
  background: var(--glass); backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  padding: .25rem .65rem; border-radius: 8px;
  font-size: .72rem; font-weight: 700; color: var(--text);
}
.card-featured {
  position: absolute; top: .75rem; right: .75rem;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  padding: .2rem .55rem; border-radius: 6px;
  font-size: .68rem; font-weight: 700; color: #fff;
}
.card-body { padding: 1rem 1.2rem 1.2rem; }
.card-title { font-size: .95rem; font-weight: 700; margin-bottom: .4rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-desc { font-size: .82rem; color: var(--text-2); margin-bottom: .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-model { font-size: .75rem; color: var(--accent); font-weight: 600; background: var(--accent-glow); padding: .2rem .6rem; border-radius: 6px; }
.card-copy-btn {
  display: flex; align-items: center; gap: .35rem;
  padding: .4rem .8rem; border-radius: 8px; font-size: .78rem;
  font-weight: 600; color: var(--primary);
  background: var(--primary-glow); border: 1px solid rgba(168,85,247,.2);
  transition: all .2s;
}
.card-copy-btn:hover { background: var(--primary); color: #fff; }

/* ── Loading / Empty ─────────────────────────────────────── */
.loading-indicator {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding: 3rem; color: var(--text-3); font-size: .9rem;
}
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-3); }
.empty-state h3 { font-size: 1.2rem; color: var(--text-2); margin: 1rem 0 .4rem; }
.load-more-wrap { text-align: center; padding: 2rem; }
.load-more-btn {
  padding: .7rem 2rem; border-radius: 12px; font-size: .9rem; font-weight: 600;
  color: var(--primary); border: 1px solid var(--primary);
  background: var(--primary-glow); transition: all .25s;
}
.load-more-btn:hover { background: var(--primary); color: #fff; }

/* ── Detail Modal ────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.7); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; width: 100%; max-width: 620px;
  max-height: 90vh; overflow-y: auto; position: relative;
  animation: modalIn .35s cubic-bezier(.16,1,.3,1);
}
@keyframes modalIn { from { transform: scale(.94) translateY(20px); opacity: 0; } }
.modal-close-btn {
  position: absolute; top: 1rem; right: 1rem; z-index: 10;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--glass); backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  color: var(--text); display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.modal-close-btn:hover { background: var(--danger); color: #fff; }
.modal-media { height: 280px; background: var(--bg-3); overflow: hidden; }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 1.5rem; }
.modal-meta { display: flex; gap: .5rem; margin-bottom: .8rem; flex-wrap: wrap; }
.modal-category {
  font-size: .78rem; font-weight: 700; color: var(--primary);
  background: var(--primary-glow); padding: .25rem .7rem; border-radius: 8px;
}
.modal-model {
  font-size: .78rem; font-weight: 700; color: var(--accent);
  background: var(--accent-glow); padding: .25rem .7rem; border-radius: 8px;
}
.modal-title { font-size: 1.3rem; font-weight: 800; margin-bottom: .5rem; }
.modal-desc { color: var(--text-2); font-size: .9rem; margin-bottom: 1.2rem; line-height: 1.6; }
.modal-prompt-section {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; margin-bottom: 1rem;
}
.modal-prompt-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1rem; border-bottom: 1px solid var(--border);
  font-size: .85rem; font-weight: 600;
}
.copy-btn {
  display: flex; align-items: center; gap: .35rem;
  padding: .35rem .8rem; border-radius: 8px; font-size: .8rem;
  font-weight: 600; color: var(--primary); background: var(--primary-glow);
  border: 1px solid rgba(168,85,247,.2); transition: all .2s;
}
.copy-btn:hover { background: var(--primary); color: #fff; }
.modal-prompt-text {
  padding: 1rem; font-size: .88rem; line-height: 1.7; color: var(--text);
  font-family: 'Courier New', monospace; white-space: pre-wrap; word-break: break-word;
  max-height: 200px; overflow-y: auto;
}
.modal-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.modal-tags .tag {
  font-size: .75rem; padding: .2rem .55rem; border-radius: 6px;
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text-3); font-weight: 500;
}
.modal-stats { display: flex; gap: 1.5rem; color: var(--text-3); font-size: .84rem; }
.modal-stat { display: flex; align-items: center; gap: .35rem; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border); padding: 2.5rem 1.5rem;
  text-align: center; background: var(--bg-2); transition: background .35s;
}
.footer-inner { max-width: 1320px; margin: 0 auto; }
.footer-brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; margin-bottom: .6rem; }
.footer-text { color: var(--text-2); font-size: .88rem; margin-bottom: .3rem; }
.footer-copy { color: var(--text-3); font-size: .78rem; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: .95rem; }
  .search-box { width: 180px; }
  .search-kbd { display: none; }
  .prompts-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .hero-stats { gap: 1rem; }
  .hero-stat-value { font-size: 1.2rem; }
  .modal-media { height: 200px; }
}
@media (max-width: 480px) {
  .header-inner { padding: .7rem 1rem; }
  .hero { padding: 3rem 1rem 2rem; }
  .hero-title { font-size: 1.7rem; }
  .search-box { width: 140px; padding: .4rem .7rem; }
  .prompts-grid { grid-template-columns: 1fr; }
  .main-content { padding: 1.5rem 1rem 3rem; }
  .categories-inner { padding: .6rem 1rem; }
}

/* ── Sticky Banner Ad Bar ─────────────────────────────────── */
.banner-bar {
  position: fixed; left: 0; right: 0; z-index: 600;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,.25);
  display: flex; align-items: center;
  animation: bannerSlide .4s cubic-bezier(.16,1,.3,1);
  min-height: 60px;
}
.banner-bar[style*="top: 0"] {
  border-top: none; border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  animation: bannerSlideDown .4s cubic-bezier(.16,1,.3,1);
}
@keyframes bannerSlide     { from { transform: translateY(100%); } }
@keyframes bannerSlideDown { from { transform: translateY(-100%); } }

.banner-bar-inner {
  width: 100%; max-width: 1320px; margin: 0 auto;
  padding: .5rem 1rem;
  display: flex; align-items: center; gap: .75rem;
}
.banner-ad-label {
  font-size: .65rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3);
  border: 1px solid var(--border); border-radius: 4px;
  padding: .15rem .4rem; flex-shrink: 0;
  background: var(--bg-3);
}
.banner-close-btn {
  flex-shrink: 0; width: 28px; height: 28px;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-3); color: var(--text-3);
  font-size: 1.1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; cursor: pointer;
}
.banner-close-btn:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

@media (max-width: 480px) {
  .banner-bar { min-height: 52px; }
  .banner-bar-inner { padding: .4rem .75rem; }
}

