:root {
  --bg: #0b1021;
  --card: #111832;
  --muted: #a6b0c3;
  --text: #e6ecff;
  --accent: #ffd166;
  --accent-2: #7ad7f0;
  --border: #1f2847;
  --shadow: 0 15px 40px rgba(0,0,0,0.35);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(255,209,102,0.07), transparent 25%),
              radial-gradient(circle at 80% 0%, rgba(122,215,240,0.08), transparent 25%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-top: 84px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(11,16,33,0.9);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.nav-left { display: flex; align-items: center; gap: 12px; }
.logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.brand { display: flex; flex-direction: column; }
.brand-top { font-weight: 700; letter-spacing: 0.4px; }
.brand-sub { color: var(--muted); font-size: 13px; }

.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-menu { display: flex; align-items: center; gap: 14px; }
.nav-links { display: flex; gap: 16px; }
.nav-links a { color: var(--text); font-weight: 600; padding: 8px 10px; border-radius: 8px; }
.nav-links a:hover { background: rgba(255,255,255,0.06); }

.menu-toggle { display: none; }

.search-dropdown { position: relative; }
.search-toggle { height: 38px; }
.search-panel {
  position: absolute;
  right: 0;
  top: 110%;
  background: rgba(17,24,50,0.97);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  width: min(320px, 90vw);
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}
.search-panel label { font-weight: 700; }
.search-panel input { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: #0f1630; color: var(--text); }
.search-panel.open { animation: fadeIn .15s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  max-width: 1200px;
  margin: 12px auto 0;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.hero-text { background: rgba(17,24,50,0.9); padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-text.compact { display: grid; gap: 12px; }
.sample-card { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.sample-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sample-label { background: rgba(122,215,240,0.1); color: var(--accent-2); padding: 6px 10px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.sample-text { margin: 0; background: #0f1630; border: 1px solid var(--border); border-radius: 10px; padding: 10px; color: var(--text); font-family: 'Inter', monospace; white-space: pre-wrap; }

.eyebrow { color: var(--accent-2); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; margin: 0 0 8px; }
.hero h1 { margin: 0 0 12px; font-size: clamp(28px, 4vw, 36px); }
.subtext { margin: 0 0 12px; color: var(--muted); }
.cta-group { display: flex; flex-wrap: wrap; gap: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; font-weight: 700; transition: all .2s ease; color: var(--text); background: rgba(255,255,255,0.06); }
.btn.primary { background: linear-gradient(135deg, #ffd166, #ffae42); color: #0b1021; }
.btn.primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.ghost { background: rgba(255,255,255,0.05); border-color: var(--border); }

.controls {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.control-block { background: rgba(17,24,50,0.9); padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.control-block label { display: block; margin-bottom: 8px; font-weight: 700; }
.control-block input, .control-block select { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: #0f1630; color: var(--text); }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }

.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-header h2 { margin: 0; }
.section-header .muted { margin: 0; color: var(--muted); }

.prompt-list { max-width: 1200px; margin: 12px auto 40px; padding: 0 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { background: rgba(17,24,50,0.9); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.card img { width: 100%; border-radius: 12px; object-fit: cover; height: 190px; }
.card h3 { margin: 0; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { background: rgba(255,255,255,0.05); color: var(--accent-2); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; }
.actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: auto; }
.actions .btn { width: 100%; }

.empty { text-align: center; margin: 20px 0; color: var(--muted); }

.load-more {
  width: 100%;
  margin: 18px 0;
  position: relative;
  overflow: hidden;
  animation: loadMorePulse 1.8s ease-in-out infinite;
}

@keyframes loadMorePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 209, 102, 0.35); transform: translateY(0); }
  50% { box-shadow: 0 0 0 10px rgba(255, 209, 102, 0); transform: translateY(-1px); }
  100% { box-shadow: 0 0 0 0 rgba(255, 209, 102, 0); transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .load-more { animation: none; }
}

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 15;
}

.back-to-top.visible { display: inline-flex; }

.about { max-width: 900px; margin: 32px auto; padding: 0 24px; }
.about-card { background: rgba(17,24,50,0.9); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }

.footer { background: #090d1c; border-top: 1px solid var(--border); padding: 24px; color: var(--muted); }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.footer-brand { color: var(--text); margin: 0 0 6px; }
.footnote { margin-top: 10px; color: var(--muted); font-size: 14px; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 20; }
.modal.show { display: flex; }
.modal-content { background: rgba(17,24,50,0.97); border: 1px solid var(--border); border-radius: var(--radius); max-width: 1100px; width: 100%; max-height: 90vh; overflow: auto; position: relative; box-shadow: var(--shadow); }
.close { position: absolute; right: 12px; top: 12px; background: rgba(255,255,255,0.08); border: 1px solid var(--border); color: var(--text); font-size: 20px; border-radius: 50%; width: 36px; height: 36px; cursor: pointer; }
.modal-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; padding: 20px; }
.modal-images { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-images.single { grid-template-columns: 1fr; }
.modal-images img { width: 100%; border-radius: 12px; object-fit: cover; cursor: zoom-in; }
.modal-text h3 { margin: 0 0 6px; }
.modal-text .muted { margin: 0 0 12px; }
.prompt-block { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-top: 10px; }
.prompt-block pre { white-space: pre-wrap; word-break: break-word; background: #0f1630; padding: 10px; border-radius: 10px; border: 1px solid var(--border); color: var(--text); font-family: 'Inter', monospace; }
.tagline { color: var(--muted); margin: 0 0 10px; }

.image-viewer { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 30; }
.image-viewer.show { display: flex; }
.image-viewer__content { position: relative; max-width: 100%; max-height: 100%; }
.image-viewer__content img { max-width: min(100vw, 1100px); max-height: 80vh; border-radius: 14px; box-shadow: var(--shadow); }
.image-viewer__close { top: -10px; right: -10px; background: rgba(11,16,33,0.9); }

@media (max-width: 768px) {
  body { padding-top: 120px; }
  .navbar { flex-wrap: wrap; height: auto; gap: 12px; padding: 12px 16px; }
  .nav-right { width: 100%; justify-content: space-between; align-items: flex-start; }
  .menu-toggle { display: inline-flex; }
  .nav-menu { width: 100%; flex-direction: column; gap: 10px; display: none; }
  .nav-menu.open { display: flex; }
  .nav-links { width: 100%; flex-direction: column; gap: 8px; }
  .nav-links a { width: 100%; background: rgba(255,255,255,0.04); }
  .search-dropdown { width: 100%; }
  .search-panel { position: static; width: 100%; margin-top: 6px; }
  .modal-images { grid-template-columns: 1fr; }
  .cta-group { flex-direction: column; }
  .hero { padding: 12px 18px; }
  .hero-text { padding: 18px; }
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #18c29c;
  color: #0b1021;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-weight: 700;
  z-index: 30;
}
