@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg:         #0a0f1e;
  --surface:    #111827;
  --surface2:   #1a2236;
  --surface3:   #1f2d45;
  --border:     rgba(255,255,255,0.07);
  --border-md:  rgba(255,255,255,0.12);
  --amber:      #f59e0b;
  --amber-dim:  rgba(245,158,11,0.15);
  --amber-glow: rgba(245,158,11,0.25);
  --text:       #f1f5f9;
  --text-muted: #64748b;
  --text-dim:   #94a3b8;
  --success:    #22c55e;
  --radius:     12px;
  --radius-lg:  18px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAVBAR ─────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,15,30,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}
.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo span { color: var(--amber); }
.nav-center {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--surface2); }
.nav-link.active { color: var(--amber); }
.nav-right { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.badge-connected {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 600;
  color: var(--success);
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
}
.badge-connected::before { content: ''; width: 6px; height: 6px; background: var(--success); border-radius: 50%; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1.3rem;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-amber {
  background: var(--amber);
  color: #0a0f1e;
}
.btn-amber:hover { background: #fbbf24; transform: translateY(-1px); box-shadow: 0 4px 20px var(--amber-glow); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-md);
  color: var(--text-dim);
}
.btn-outline:hover { border-color: var(--amber); color: var(--amber); background: var(--amber-dim); }
.btn-ghost { background: var(--surface2); color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface3); color: var(--text); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; border-radius: 10px; }
.btn-xl { padding: 1rem 2.5rem; font-size: 1.05rem; border-radius: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 2rem; }

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  padding: 6rem 2rem 4rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid rgba(245,158,11,0.3);
  padding: 0.35rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.hero h1 em { font-style: normal; color: var(--amber); }
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

/* ── SEARCH BAR ──────────────────────────────────────────────── */
.search-wrap {
  max-width: 680px;
  margin: 0 auto 1rem;
  display: flex;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: 14px;
  padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap:focus-within {
  border-color: rgba(245,158,11,0.5);
  box-shadow: 0 0 0 3px var(--amber-dim);
}
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  padding: 0.35rem 0;
}
.search-input::placeholder { color: var(--text-muted); }

/* ── FEATURE CARDS ───────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 1000px;
  margin: 4rem auto 0;
  padding: 0 2rem;
}
@media (max-width: 768px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: rgba(245,158,11,0.3); transform: translateY(-2px); }
.feature-icon {
  width: 44px; height: 44px;
  background: var(--amber-dim);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.feature-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.feature-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.55; }

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.card-sm { padding: 1.25rem; }
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ── STAT GRID ───────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: rgba(245,158,11,0.3); }
.stat-value {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.2rem, 3.5vw, 2rem);
  font-weight: 800;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }

/* ── TAGS ────────────────────────────────────────────────────── */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: transparent;
  border: 1px solid rgba(245,158,11,0.3);
  color: var(--text-dim);
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.tag:hover { background: var(--amber-dim); color: var(--amber); }
.tag .count {
  color: var(--amber);
  font-weight: 700;
  font-size: 0.75rem;
}
.tag-gap {
  border-color: rgba(34,197,94,0.3);
  color: #86efac;
}
.tag-gap:hover { background: rgba(34,197,94,0.1); color: var(--success); }

/* ── OPPORTUNITY CARDS ───────────────────────────────────────── */
.opportunity-list { display: flex; flex-direction: column; gap: 0.6rem; }
.opp-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  transition: border-color 0.15s;
}
.opp-card:hover { border-color: rgba(245,158,11,0.3); }
.opp-rank {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem; font-weight: 700;
  color: var(--text-muted);
  width: 24px; flex-shrink: 0; text-align: center;
}
.opp-title {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-dim);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.opp-title:hover { color: var(--amber); }
.opp-price {
  font-family: 'Syne', sans-serif;
  font-weight: 700; font-size: 0.95rem;
  color: var(--amber);
  flex-shrink: 0;
}
.opp-meta {
  font-size: 0.78rem; color: var(--text-muted);
  flex-shrink: 0; white-space: nowrap;
}

/* ── RESULTS SECTIONS ────────────────────────────────────────── */
.results-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

/* ── FORMS ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 0.45rem;
}
.form-hint { font-weight: 400; color: var(--text-muted); }
.form-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border-md);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: rgba(245,158,11,0.5);
  box-shadow: 0 0 0 3px var(--amber-dim);
}
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { resize: vertical; min-height: 100px; }

/* ── CHECKBOXES ──────────────────────────────────────────────── */
.checkbox-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.checkbox-item {
  display: flex; align-items: center; gap: 0.45rem;
  background: var(--surface2);
  border: 1px solid var(--border-md);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem; font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.checkbox-item:hover { border-color: rgba(245,158,11,0.4); background: var(--surface3); }
.checkbox-item input { accent-color: var(--amber); }

/* ── COPY OUTPUT ─────────────────────────────────────────────── */
.copy-section { margin-bottom: 1.75rem; }
.copy-label {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  display: flex; align-items: center; justify-content: space-between;
}
.copy-meta { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text-muted); font-size: 0.75rem; }
.copy-box {
  background: var(--surface2);
  border: 1px solid var(--border-md);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 0.5rem;
  color: var(--text-dim);
}
.copy-title-box { color: var(--text); font-weight: 500; font-size: 1rem; }
.copy-bullets { list-style: none; padding: 0; }
.copy-bullets li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-dim);
  display: flex; align-items: flex-start; gap: 0.5rem;
}
.copy-bullets li:last-child { border-bottom: none; }
.copy-bullets li::before { content: '✓'; color: var(--amber); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.price-box {
  display: flex; align-items: center; gap: 1.5rem;
  background: var(--surface2);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}
.price-amount {
  font-family: 'Syne', sans-serif;
  font-size: 2rem; font-weight: 800;
  color: var(--amber);
  flex-shrink: 0;
}
.price-rationale { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }

/* ── UPLOAD ──────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-md);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--amber);
  background: var(--amber-dim);
}
.upload-zone.has-preview { padding: 1.5rem; }
.upload-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.upload-text { font-size: 0.95rem; color: var(--text-dim); margin-bottom: 0.25rem; }
.upload-link { color: var(--amber); text-decoration: underline; }
.upload-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }
.upload-preview { max-width: 100%; max-height: 220px; border-radius: 8px; margin-top: 1rem; object-fit: contain; }

/* ── MOCKUP GRID ─────────────────────────────────────────────── */
.mockup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.mockup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex; flex-direction: column; align-items: center;
  transition: border-color 0.2s, transform 0.2s;
}
.mockup-card:hover { border-color: rgba(245,158,11,0.3); transform: translateY(-2px); }
.mockup-label {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.mockup-img { width: 100%; border-radius: 8px; object-fit: contain; }

/* Mockup Guide */
.tool-grid { display: flex; flex-direction: column; gap: 0.6rem; }
.tool-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  text-decoration: none;
  color: var(--text-dim);
  transition: border-color 0.15s, background 0.15s;
}
.tool-card:hover { border-color: var(--amber); background: var(--surface3); color: var(--text); }
.tool-best { border-color: rgba(245,158,11,0.3); }
.tool-name { flex: 1; font-size: 0.9rem; font-weight: 600; color: var(--text); }
.tool-price { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.tool-arrow { color: var(--amber); font-weight: 700; }

/* ── LOADING ─────────────────────────────────────────────────── */
.loading { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.spinner {
  display: inline-block; width: 36px; height: 36px;
  border: 3px solid var(--border-md);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ALERT ───────────────────────────────────────────────────── */
.alert {
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
.alert-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  color: #fca5a5;
}

/* ── PAGE SECTIONS ───────────────────────────────────────────── */
.page-wrap { padding: 3rem 0 5rem; }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem;
}
.page-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem; font-weight: 800;
  letter-spacing: -0.02em;
}
.hidden { display: none !important; }

/* ── DIVIDER ─────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}
