/* ── Reset & base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0a0a14;
  --surface:  #12121f;
  --card:     #1a1a2e;
  --border:   #2a2a40;
  --primary:  #7c6fff;
  --accent:   #ff6ec7;
  --green:    #4fffb0;
  --text:     #e8e8f0;
  --muted:    #7878a0;
  --radius:   10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Navbar ───────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
}
.logo span { color: var(--primary); }
.logo-sub { font-size: 0.75rem; color: var(--muted); font-weight: 400; margin-left: 6px; }

.nav-tagline {
  font-size: 0.8rem;
  color: var(--muted);
  display: none;
}

/* ── Hero ──────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 80px 24px 64px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(124, 111, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(124, 111, 255, 0.15);
  border: 1px solid rgba(124, 111, 255, 0.3);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 40px;
}
.hero-img {
  width: 100%;
  max-width: 760px;
  border-radius: 16px;
  border: 1px solid var(--border);
  margin: 0 auto;
  display: block;
  object-fit: cover;
  max-height: 380px;
}

/* ── Filters / Search ─────────────────────────── */
.controls {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  padding: 9px 12px 9px 38px;
  outline: none;
  transition: border-color 0.15s;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--primary); }

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-btn:hover { border-color: var(--primary); color: var(--text); }
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── Tool Grid ─────────────────────────────────── */
.grid-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s, transform 0.2s;
}
.tool-card:hover { border-color: rgba(124, 111, 255, 0.5); transform: translateY(-2px); }

.tool-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tool-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  flex-shrink: 0;
  text-transform: uppercase;
}
.tool-meta { flex: 1; min-width: 0; }
.tool-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-vendor {
  font-size: 0.75rem;
  color: var(--muted);
}
.tool-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: #fbbf24;
  font-weight: 600;
  flex-shrink: 0;
}
.tool-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(124, 111, 255, 0.12);
  color: var(--primary);
  border: 1px solid rgba(124, 111, 255, 0.2);
}
.tag-free { background: rgba(79, 255, 176, 0.1); color: var(--green); border-color: rgba(79, 255, 176, 0.2); }
.tag-paid { background: rgba(255, 110, 199, 0.1); color: var(--accent); border-color: rgba(255, 110, 199, 0.2); }

.tool-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.pricing-label {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}
.pricing-free { background: rgba(79, 255, 176, 0.12); color: var(--green); }
.pricing-paid { background: rgba(255, 110, 199, 0.12); color: var(--accent); }
.pricing-freemium { background: rgba(124, 111, 255, 0.12); color: var(--primary); }

.cta-btn {
  background: var(--primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.cta-btn:hover { opacity: 0.85; }

/* ── Empty state ──────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
}
.empty-state p { font-size: 1rem; margin-bottom: 8px; }
.empty-state small { font-size: 0.82rem; }

/* ── Footer ───────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 8px; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 56px 20px 48px; }
  .controls { padding: 0 16px 20px; }
  .grid-wrap { padding: 0 16px 60px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { padding: 18px; }
}