/* ============================================================
   AI Tools Directory — style.css
   Premium dark theme with indigo/cyan accent palette
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --accent: #6366f1;
  --accent2: #22d3ee;
  --gold: #fbbf24;
  --green: #10b981;
  --red: #f43f5e;
  --amber: #f59e0b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

a {
  color: inherit;
}

/* ============================================================
   Scrollbar
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg2);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5558e3;
}

/* ============================================================
   Utilities
   ============================================================ */
.text-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.highlight {
  background: rgba(99, 102, 241, 0.25);
  color: var(--text);
  border-radius: 3px;
  padding: 0 2px;
}

/* ============================================================
   Keyframe Animations
   ============================================================ */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

/* ============================================================
   Header
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 1000;
  height: 64px;
}

.header-inner {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 200ms ease;
}

.nav-link:hover {
  color: var(--text);
}

.header-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  margin-left: auto;
  flex: 1;
  max-width: 300px;
}

.header-search input {
  background: transparent;
  border: none;
  padding: 0.5rem 1rem;
  color: var(--text);
  outline: none;
  width: 100%;
  font-size: 0.875rem;
  font-family: inherit;
}

.header-search input::placeholder {
  color: var(--muted);
}

.saved-count {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(-45deg, #0a0a0f, #1a0a2e, #081a2e, #0f0a20, #1a1a0a);
  background-size: 400% 400%;
  animation: gradientShift 18s ease infinite;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: var(--accent2);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-search {
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  position: relative;
}

.hero-search-input {
  width: 100%;
  padding: 1rem 6rem 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.hero-search-input::placeholder {
  color: var(--muted);
}

.hero-search-input:focus {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.hero-search-btn {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.25rem;
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  font-family: inherit;
  transition: background 150ms ease;
}

.hero-search-btn:hover {
  background: #5558e3;
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.trust-badge::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-count {
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
}

.hero-count span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-cats {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-cat-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  transition: all 200ms ease;
}

.hero-cat-btn:hover,
.hero-cat-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--text);
}

/* ============================================================
   Tool of the Day
   ============================================================ */
.totd-section {
  padding: 0 1.5rem 3rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.totd-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
}

.totd-label::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 1s ease-in-out infinite;
}

.totd-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(34, 211, 238, 0.05));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}

.totd-left {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.totd-emoji-wrap {
  width: 80px;
  height: 80px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.totd-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.totd-right {
  min-width: 280px;
  max-width: 380px;
}

.totd-features {
  list-style: none;
  margin-bottom: 0.75rem;
}

.totd-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
}

.totd-why {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1rem;
  font-style: italic;
}

.totd-cta-btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 150ms ease, filter 150ms ease;
  font-family: inherit;
}

.totd-cta-btn:hover {
  background: #5558e3;
  filter: brightness(1.1);
}

/* ============================================================
   Filter Bar
   ============================================================ */
.filter-bar {
  position: sticky;
  top: 64px;
  z-index: 900;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.875rem 1.5rem;
}

.filter-bar-inner,
.filter-inner {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.375rem 0.75rem;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  transition: all 150ms ease;
  white-space: nowrap;
}

.filter-btn:hover {
  color: var(--text);
}

.filter-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--text);
}

.filter-btn-free.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--green);
}

.filter-btn-freemium.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--amber);
}

.filter-btn-trial.active {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--red);
}

/* SEA Toggle */
.sea-toggle,
.sea-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.sea-toggle input[type="checkbox"],
.sea-toggle-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.sea-toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.sea-toggle-switch::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transition: background 200ms ease;
}

.sea-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 200ms ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.sea-toggle input:checked + .sea-toggle-switch::before,
.sea-toggle-label input:checked + .sea-toggle-switch::before {
  background: var(--green);
}

.sea-toggle input:checked + .sea-toggle-switch::after,
.sea-toggle-label input:checked + .sea-toggle-switch::after {
  transform: translateX(18px);
}

.sort-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.375rem 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: all 150ms ease;
}

.sort-select:hover {
  color: var(--text);
}

.sort-select option {
  background: var(--bg2);
  color: var(--text);
}

.results-count {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.results-count strong {
  color: var(--text);
}

/* ============================================================
   Main Content
   ============================================================ */
.main {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 1.5rem;
}

/* ============================================================
   Saved Tools Section
   ============================================================ */
.saved-section {
  display: none;
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.saved-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.saved-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.clear-saved {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 150ms ease;
}

.clear-saved:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

.saved-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* ============================================================
   Tools Grid
   ============================================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.tools-grid.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================================
   Tool Card
   ============================================================ */
.tool-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  animation: fadeIn 300ms ease both;
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.25);
}

.tool-card-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.tool-emoji-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.tool-card-meta {
  flex: 1;
  min-width: 0;
}

.tool-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Badges */
.badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-free {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-freemium {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-trial {
  background: rgba(244, 63, 94, 0.15);
  color: var(--red);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.badge-sea {
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent2);
  border: 1px solid rgba(34, 211, 238, 0.2);
}

.badge-cat {
  background: rgba(99, 102, 241, 0.12);
  color: rgba(148, 163, 184, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.badge-featured {
  background: rgba(251, 191, 36, 0.15);
  color: var(--gold);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.tool-stats-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tool-stars {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.tool-users {
  font-size: 0.72rem;
  color: var(--muted);
}

.badge-new {
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent2);
  border: 1px solid rgba(34, 211, 238, 0.28);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: pulse-new 2s ease-in-out infinite;
}

@keyframes pulse-new {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

.tool-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.feature-tags {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.feature-tag {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  color: var(--muted);
}

/* ── Details toggle ─────────────────────────────────────────── */
.details-toggle {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: color 150ms, border-color 150ms, background 150ms;
}

.details-toggle:hover {
  color: var(--accent);
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.06);
}

/* Expandable panel */
.tool-details {
  display: none;
  flex-direction: column;
  gap: 0.875rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  font-size: 0.8rem;
}

.tool-details.open {
  display: flex;
}

.details-section {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.details-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

.pros-heading { color: var(--green); }
.cons-heading { color: var(--red); }

.details-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.details-list li {
  color: var(--muted);
  line-height: 1.45;
  padding-left: 1rem;
  position: relative;
}

.details-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--green);
}

.cons-list li::before {
  color: var(--red);
}

.details-alts {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.details-alts span {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.alt-link {
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  transition: background 150ms, border-color 150ms;
  white-space: nowrap;
}

.alt-link:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
}

/* ── Compare page alternatives ───────────────────────────────── */
.compare-alts {
  margin-top: 2.5rem;
  padding: 1.75rem;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 14px;
}

.compare-alts-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem;
}

.compare-alts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.compare-alt-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.5rem 0.875rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  transition: border-color 200ms, background 200ms;
}

.compare-alt-chip:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.1);
}

.compare-alt-name {
  font-weight: 600;
}

/* ── Tool card footer ────────────────────────────────────────── */
.tool-card-footer {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  align-items: center;
}

.btn-visit {
  flex: 1;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: block;
  font-family: inherit;
  transition: background 150ms ease;
}

.btn-visit:hover {
  background: #5558e3;
}

.btn-save {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 150ms ease;
}

.btn-save:hover {
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--red);
}

.btn-save.saved {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--red);
}

.btn-compare {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  font-weight: 700;
  font-family: inherit;
  transition: all 150ms ease;
}

.btn-compare:hover {
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--accent);
}

.btn-compare.in-compare {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--accent);
}

/* ============================================================
   No Results
   ============================================================ */
.no-results {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--muted);
}

.no-results h3 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.no-results p {
  margin-top: 0.5rem;
}

/* ============================================================
   Section Headers
   ============================================================ */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.section-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ============================================================
   Categories Section
   ============================================================ */
.cats-section {
  margin-top: 3rem;
}

.cats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 200ms ease, border-color 200ms ease;
}

.cat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.3);
}

.cat-emoji {
  width: 48px;
  height: 48px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.cat-info {
  flex: 1;
  min-width: 0;
}

.cat-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.cat-count {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.cat-arrow {
  margin-left: auto;
  color: var(--muted);
  font-size: 1rem;
  flex-shrink: 0;
}

/* ============================================================
   Recently Viewed
   ============================================================ */
.recently-section {
  margin-top: 3rem;
}

.recent-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg2);
}

.recent-grid .tool-card {
  min-width: 280px;
  flex-shrink: 0;
}

/* ============================================================
   Comparison Tray
   ============================================================ */
.comparison-tray {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(17, 17, 24, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateY(100%);
  transition: transform 300ms ease;
}

.comparison-tray.visible {
  transform: translateY(0);
}

.tray-items {
  display: flex;
  gap: 0.75rem;
  flex: 1;
  flex-wrap: wrap;
}

.tray-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text);
}

.tray-item button {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  margin-left: 0.25rem;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  transition: color 150ms ease;
}

.tray-item button:hover {
  color: var(--red);
}

.tray-compare-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.625rem 1.5rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms ease;
  font-size: 0.875rem;
}

.tray-compare-btn:hover:not(:disabled) {
  background: #5558e3;
}

.tray-compare-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tray-clear {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: color 150ms ease;
}

.tray-clear:hover {
  color: var(--text);
}

/* ============================================================
   Blog Styles
   ============================================================ */
.blog-hero {
  padding: 3rem 1.5rem;
  text-align: center;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: transform 200ms ease, border-color 200ms ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.25);
}

.blog-card-img {
  height: 180px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(34, 211, 238, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.blog-card-body {
  padding: 1.5rem;
}

.blog-tag {
  display: inline-block;
  background: rgba(99, 102, 241, 0.12);
  color: rgba(148, 163, 184, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.blog-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.blog-excerpt {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

.blog-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1rem;
}

/* ============================================================
   Article Page
   ============================================================ */
.article-header {
  padding: 3rem 1.5rem 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.article-content {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem 4rem;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-content p {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
  color: var(--muted);
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.article-content li {
  margin-bottom: 0.4rem;
}

.article-content strong {
  color: var(--text);
}

.article-content a {
  color: var(--accent);
  text-decoration: none;
  transition: text-decoration 150ms ease;
}

.article-content a:hover {
  text-decoration: underline;
}

.tool-mention {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.85em;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.tool-mention:hover {
  background: rgba(99, 102, 241, 0.2);
}

.article-cta {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
  text-align: center;
}

/* ============================================================
   Compare Page
   ============================================================ */
.compare-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 1.5rem;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
}

.compare-table th {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text);
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.compare-table td {
  padding: 0.875rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  text-align: center;
  font-size: 0.875rem;
  vertical-align: middle;
}

.compare-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.check-yes {
  color: var(--green);
}

.check-no {
  color: var(--red);
}

.check-partial {
  color: var(--amber);
}

.compare-tool-header {
  text-align: center;
  min-width: 200px;
}

/* ============================================================
   Submit / Secondary Pages
   ============================================================ */
.page-hero {
  padding: 4rem 1.5rem;
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.form-container {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group select option {
  background: var(--bg2);
  color: var(--text);
}

.btn-submit {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  transition: background 150ms ease;
}

.btn-submit:hover {
  background: #5558e3;
}

.success-msg {
  display: none;
  text-align: center;
  padding: 2rem;
  color: var(--green);
}

.prose {
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 1.5rem;
}

.prose h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.prose p {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--bg2);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.footer-desc {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  line-height: 1.6;
  max-width: 280px;
}

.footer-heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 150ms ease;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 2.5rem;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ============================================================
   Ad Slots — hidden
   ============================================================ */
.ad-slot {
  display: none !important;
}

/* ============================================================
   Responsive — 1024px (Tablet)
   ============================================================ */
@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .saved-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-search {
    max-width: 200px;
  }

  .totd-card {
    grid-template-columns: 1fr;
  }

  .totd-right {
    max-width: 100%;
  }
}

/* ============================================================
   Responsive — 768px (Mobile)
   ============================================================ */
@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .saved-grid {
    grid-template-columns: 1fr;
  }

  .cats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .nav {
    display: none;
  }

  .header-search {
    max-width: 180px;
    flex: 1;
  }

  .filter-bar-inner {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-bar-inner::-webkit-scrollbar {
    display: none;
  }

  .filter-group {
    flex-wrap: nowrap;
    flex-shrink: 0;
  }

  .results-count {
    display: none;
  }

  .totd-left {
    flex-direction: column;
    align-items: flex-start;
  }

  .tray-items {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .comparison-tray {
    flex-wrap: wrap;
  }

  .footer-desc {
    max-width: 100%;
  }
}

/* ============================================================
   Responsive — 480px (Small Mobile)
   ============================================================ */
@media (max-width: 480px) {
  .cats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .cat-card {
    padding: 1rem;
    gap: 0.75rem;
  }

  .cat-emoji {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .hero-search-input {
    padding: 0.875rem 5rem 0.875rem 1.25rem;
    font-size: 0.9rem;
  }

  .trust-badges {
    gap: 0.75rem;
  }

  .hero-cats {
    gap: 0.5rem;
  }

  .hero-cat-btn {
    padding: 0.4rem 0.875rem;
    font-size: 0.8rem;
  }

  .filter-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }

  .totd-name {
    font-size: 1.5rem;
  }

  .header-inner {
    gap: 1rem;
  }

  .logo span {
    display: none;
  }
}
