/* === RESET & BASE === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --font: 'SF Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #999999;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.15);
  --card-bg: #ffffff;
  --card-border: #e5e7eb;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.1);
  --border: #e5e7eb;
  --surface: #f9fafb;
  --surface-hover: #f3f4f6;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --glow: 0 0 20px rgba(37, 99, 235, 0.15);
  --anim-stagger: 80ms;
  --pricing-free: #16a34a;
  --pricing-freemium: #2563eb;
  --pricing-paid: #ea580c;
  --pricing-opensource: #7c3aed;
  --star: #f59e0b;
  --gradient-1: #2563eb;
  --gradient-2: #7c3aed;
  --header-bg: rgba(255, 255, 255, 0.85);
}

/* === DARK MODE === */
[data-theme="dark"] {
  --bg: #0a0a0a;
  --text: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --card-bg: #141414;
  --card-border: #252525;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.5);
  --border: #252525;
  --surface: #1a1a1a;
  --surface-hover: #222222;
  --header-bg: rgba(10, 10, 10, 0.85);
  --accent-glow: rgba(37, 99, 235, 0.2);
}

html {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  scroll-behavior: smooth;
  transition: background var(--transition-slow), color var(--transition-slow);
}

html::-webkit-scrollbar { display: none; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--accent-hover); }

main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* === HEADER === */
.header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
  transition: background var(--transition-slow), border-color var(--transition-slow);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo:hover { color: var(--text); }

.logo-icon { font-size: 20px; }

.nav { display: flex; gap: 16px; align-items: center; }

.nav-link {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav-link:hover,
.nav-link.active { color: var(--text); }

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all var(--transition);
}

.theme-toggle:hover {
  border-color: var(--text-secondary);
  transform: rotate(20deg);
}

.theme-icon { line-height: 1; }

/* === HERO === */
.hero {
  text-align: center;
  padding: 72px 0 48px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  animation: fadeUp 500ms ease both;
  background: var(--surface);
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 20px;
  animation: fadeUp 500ms 80ms ease both;
}

.hero-gradient {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.7;
  animation: fadeUp 500ms 160ms ease both;
}

.search-wrap {
  max-width: 560px;
  margin: 0 auto;
  animation: fadeUp 500ms 240ms ease both;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 18px;
  font-size: 16px;
  pointer-events: none;
  opacity: 0.5;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 46px;
  font-family: var(--font);
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition-slow);
}

.search-ai-status {
  text-align: center;
  font-size: 13px;
  color: var(--accent);
  margin-top: 10px;
  animation: pulse 1.5s ease-in-out infinite;
}

.ai-search-btn {
  margin-top: 12px;
  padding: 10px 24px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-bounce);
  animation: ctaPulse 3s ease-in-out infinite;
}

.ai-search-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  animation: none;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background: var(--bg);
}

.search-input::placeholder { color: var(--text-muted); }

.search-kbd {
  position: absolute;
  right: 14px;
  padding: 3px 8px;
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  pointer-events: none;
  transition: opacity var(--transition);
}

.search-input:focus ~ .search-kbd { opacity: 0; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 28px;
  animation: fadeUp 500ms 320ms ease both;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-stat-value {
  font-size: 22px;
  font-weight: 700;
}

.hero-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === SECTION TITLES === */
.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

/* === FILTERS === */
.filters {
  padding: 0 0 32px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.filter-secondary {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.filter-group { display: flex; flex-direction: column; gap: 6px; }

.filter-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pill {
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.pill:hover {
  border-color: var(--text-secondary);
  color: var(--text);
  background: var(--surface-hover);
}

.pill.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.sort-select {
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition), background var(--transition-slow);
}

.sort-select:focus {
  border-color: var(--accent);
}

/* === TOOLS GRID === */
.tools-section { padding-bottom: 80px; }

.tools-count {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.tools-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* === TOOL CARD === */
.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--text-muted);
}

.tool-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform var(--transition);
}

.tool-card:hover .tool-logo { transform: scale(1.08); }

.tool-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.tool-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tag {
  padding: 3px 10px;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  transition: background var(--transition);
}

.pricing-badge {
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 999px;
  font-weight: 600;
  color: white;
}

.pricing-badge.free { background: var(--pricing-free); }
.pricing-badge.freemium { background: var(--pricing-freemium); }
.pricing-badge.paid { background: var(--pricing-paid); }
.pricing-badge.open-source { background: var(--pricing-opensource); }

.tool-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
}

.stars {
  font-size: 14px;
  color: var(--star);
  letter-spacing: 1px;
}

.stars .empty { color: var(--border); }

.visit-btn {
  padding: 8px 20px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.visit-btn:hover {
  background: var(--accent);
  transform: scale(1.05);
}

/* === TOOL DETAIL === */
.tool-detail {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 80px;
  position: relative;
}

/* Gradient accent bar at top */
.tool-detail::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2), var(--pricing-opensource));
  z-index: 200;
}

/* Page load blur-to-clear */
.tool-detail.page-reveal {
  animation: pageReveal 600ms ease both;
}

@keyframes pageReveal {
  from { opacity: 0; filter: blur(6px); transform: translateY(8px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  margin-top: 32px;
  transition: color var(--transition), gap var(--transition-bounce);
}

.back-link:hover {
  color: var(--text);
  gap: 10px;
}

.back-link .back-arrow {
  display: inline-block;
  transition: transform var(--transition-bounce);
}

.back-link:hover .back-arrow {
  transform: translateX(-4px);
}

.tool-loading {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
}

.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
}

.detail-logo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
  overflow: hidden;
}

.detail-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info { flex: 1; }

.detail-name {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 4px;
  background: linear-gradient(135deg, var(--text) 60%, var(--gradient-1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gradient accent line under name */
.detail-name-accent {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
  border-radius: 2px;
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.detail-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

.detail-section {
  margin-bottom: 32px;
}

.detail-section h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-pricing {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Screenshot section */
.detail-screenshots-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-screenshots-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(transparent 0%, var(--bg) 100%);
  pointer-events: none;
  z-index: 1;
}

.detail-screenshots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 16px;
  scrollbar-width: none;
  margin-bottom: 8px;
}

.detail-screenshots::-webkit-scrollbar { display: none; }

.detail-screenshots img {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  scroll-snap-align: start;
  background: var(--surface);
  cursor: pointer;
  transition: transform var(--transition-bounce), box-shadow var(--transition), opacity var(--transition);
}

.detail-screenshots img:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

/* CTA button with pulse glow */
.detail-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 40px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-bounce);
  text-decoration: none;
  position: relative;
  animation: ctaPulse 3s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
  50% { box-shadow: 0 0 24px 4px rgba(37, 99, 235, 0.2); }
}

.detail-cta:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.35);
  animation: none;
}

.detail-cta:active {
  transform: translateY(-1px) scale(0.98);
}

/* === ENHANCED TOOL DETAIL === */

.detail-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.detail-logo-large {
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform var(--transition-bounce), box-shadow var(--transition);
}

.detail-logo-large:hover {
  transform: scale(1.05);
  box-shadow: var(--glow);
}

.detail-logo-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-logo-fallback {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-muted);
}

.detail-hero-info {
  flex: 1;
  min-width: 0;
}

.detail-hero-info .detail-name {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 4px;
  line-height: 1.1;
}

.detail-hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 8px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.detail-category-badge {
  padding: 3px 10px;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.detail-category-badge:hover {
  background: var(--surface-hover);
}

.detail-tags-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

/* Quick comparison bar */
.detail-comparison-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
}

.comparison-item {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--border);
}

.comparison-item:last-child {
  border-right: none;
}

.comparison-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.comparison-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Compare badges */
.compare-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.compare-top {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.compare-above {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.compare-avg {
  background: rgba(153, 153, 153, 0.12);
  color: var(--text-muted);
}

/* "What's Good" pills */
.detail-good-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.good-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(22, 163, 74, 0.08);
  color: #16a34a;
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 999px;
  transition: all var(--transition);
}

[data-theme="dark"] .good-pill {
  background: rgba(22, 163, 74, 0.15);
  color: #4ade80;
  border-color: rgba(22, 163, 74, 0.3);
}

.detail-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 32px;
}

.detail-cta-secondary {
  padding: 12px 24px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.detail-cta-secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text);
}

.detail-cta-secondary .ext-icon {
  font-size: 11px;
  opacity: 0.6;
  transition: transform var(--transition);
}

.detail-cta-secondary:hover .ext-icon {
  transform: translate(2px, -2px);
}

.detail-section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.detail-about {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.9;
}

.detail-about p {
  margin-bottom: 20px;
}

.detail-about p:last-child {
  margin-bottom: 0;
}

/* Pricing details callout */
.detail-pricing-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 8px;
}

/* Key Details Grid */
.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.detail-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform var(--transition-bounce), border-color var(--transition), box-shadow var(--transition);
}

.detail-info-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.detail-info-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.detail-info-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-info-sub {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.detail-rating-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.detail-rating-num-small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* Stars shimmer */
.stars {
  font-size: 14px;
  color: var(--star);
  letter-spacing: 1px;
}

.tool-detail .stars {
  animation: starShimmer 2s ease-in-out infinite;
}

@keyframes starShimmer {
  0%, 100% { filter: brightness(1); text-shadow: none; }
  50% { filter: brightness(1.2); text-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
}

.stars .empty { color: var(--border); }

/* Pricing badge bounce on load */
.tool-detail .pricing-badge {
  animation: badgeBounce 500ms var(--transition-bounce) both;
  animation-delay: 300ms;
}

@keyframes badgeBounce {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

/* Tags */
.detail-tag {
  padding: 5px 14px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  transition: all var(--transition-bounce);
  text-decoration: none;
}

.detail-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  transform: scale(1.08);
}

/* Tag color variations based on nth-child */
.detail-tag:nth-child(6n+1) { border-color: rgba(37, 99, 235, 0.2); }
.detail-tag:nth-child(6n+2) { border-color: rgba(124, 58, 237, 0.2); }
.detail-tag:nth-child(6n+3) { border-color: rgba(22, 163, 74, 0.2); }
.detail-tag:nth-child(6n+4) { border-color: rgba(234, 88, 12, 0.2); }
.detail-tag:nth-child(6n+5) { border-color: rgba(219, 39, 119, 0.2); }
.detail-tag:nth-child(6n+6) { border-color: rgba(14, 165, 233, 0.2); }

/* Preview card (browser mockup) */
.detail-preview-card {
  max-width: 600px;
}

.preview-browser {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
}

.preview-browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.preview-dot:first-child { background: #ff5f57; }
.preview-dot:nth-child(2) { background: #febc2e; }
.preview-dot:nth-child(3) { background: #28c840; }

.preview-url {
  margin-left: 10px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex: 1;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-body {
  padding: 40px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.preview-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  overflow: hidden;
}

.preview-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-body h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.preview-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 400px;
}

/* Two-column layout */
.detail-two-col {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* Glass morphism sidebar */
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(249, 250, 251, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: 80px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  transition: box-shadow var(--transition), transform var(--transition);
}

[data-theme="dark"] .detail-sidebar {
  background: rgba(26, 26, 26, 0.7);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.detail-sidebar:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .detail-sidebar:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.detail-sidebar .detail-info-card {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  transition: background var(--transition), transform var(--transition-bounce), box-shadow 0s;
}

.detail-sidebar .detail-info-card:hover {
  background: var(--surface-hover);
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

.detail-sidebar .detail-info-card:last-child {
  border-bottom: none;
}

.detail-info-link {
  font-size: 13px;
  color: var(--accent);
  word-break: break-all;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.detail-info-link .ext-icon {
  font-size: 10px;
  opacity: 0.5;
  transition: transform var(--transition);
}

.detail-info-link:hover .ext-icon {
  transform: translate(2px, -2px);
}

/* CTA Section — gradient background */
.detail-cta-section {
  margin-top: 16px;
  margin-bottom: 32px;
}

.detail-cta-box {
  text-align: center;
  padding: 56px 32px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.detail-cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(37, 99, 235, 0.15), transparent 60%),
              radial-gradient(circle at 70% 50%, rgba(124, 58, 237, 0.1), transparent 60%);
  pointer-events: none;
}

.detail-cta-box h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: #f5f5f5;
  position: relative;
}

.detail-cta-box p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
  position: relative;
}

.detail-cta-box .detail-cta {
  background: white;
  color: #1a1a2e;
  position: relative;
}

.detail-cta-box .detail-cta:hover {
  background: var(--accent);
  color: white;
}

.detail-cta-lg {
  padding: 18px 48px;
  font-size: 17px;
}

/* Google Trends Section */
.detail-trends-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  min-height: 300px;
  transition: opacity 300ms ease;
}

.detail-trends-wrap.loading {
  opacity: 0.3;
}

.detail-trends-wrap iframe {
  border: none !important;
  border-radius: var(--radius);
}

.trends-time-btns {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.trends-btn {
  padding: 6px 14px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.trends-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text);
}

.trends-btn.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.trends-source {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: right;
}

/* Similar Tools Section */
.detail-similar {
  margin-bottom: 32px;
}

.detail-similar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.similar-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: transform var(--transition-bounce), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.similar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--accent);
  color: var(--text);
}

.similar-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.similar-card-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}

.similar-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.similar-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.similar-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.similar-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

/* === COMPANY INFO === */
.detail-company-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.company-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.company-info-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.company-info-label {
  color: var(--text-muted);
  font-size: 12px;
  min-width: 80px;
}

.company-info-value {
  color: var(--text);
  font-weight: 600;
}

/* === TRENDING / POPULARITY === */
.trending-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}

.trending-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
}

.trending-hot { background: linear-gradient(90deg, #16a34a, #22c55e); }
.trending-popular { background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2)); }
.trending-growing { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.trending-niche { background: var(--text-muted); }

.trending-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 999px;
  font-weight: 600;
}

.trending-badge.hot {
  background: rgba(22, 163, 74, 0.15);
  color: #16a34a;
}

.trending-badge.popular {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.trending-badge.growing {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.trending-badge.niche {
  background: rgba(153, 153, 153, 0.12);
  color: var(--text-muted);
}

.monthly-visits-big {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.hero-trending-badge {
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(22, 163, 74, 0.15);
  color: #16a34a;
  animation: badgeBounce 400ms var(--transition-bounce) both;
}

[data-theme="dark"] .hero-trending-badge {
  background: rgba(22, 163, 74, 0.25);
  color: #4ade80;
}

[data-theme="dark"] .trending-badge.hot {
  background: rgba(22, 163, 74, 0.25);
  color: #4ade80;
}

[data-theme="dark"] .trending-badge.popular {
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
}

[data-theme="dark"] .trending-badge.growing {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Toast */
.detail-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  z-index: 400;
  opacity: 0;
  transition: all var(--transition-bounce);
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.detail-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 24px;
  animation: fadeUp 200ms ease both;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

/* Responsive overrides for detail */
@media (max-width: 640px) {
  .detail-hero {
    flex-direction: column;
    padding: 0;
    gap: 20px;
  }

  .detail-logo-large {
    width: 72px;
    height: 72px;
    font-size: 36px;
  }

  .detail-hero-info .detail-name {
    font-size: 28px;
  }

  .detail-screenshots img {
    width: 100%;
    max-width: 100%;
  }

  .detail-two-col {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

  .detail-hero-actions {
    flex-direction: column;
  }

  .detail-hero-actions a {
    width: 100%;
    text-align: center;
  }

  .detail-cta-box {
    padding: 32px 20px;
  }

  .detail-cta-box h2 {
    font-size: 20px;
  }

  .detail-cta-lg {
    padding: 14px 32px;
    font-size: 15px;
  }

  .detail-similar-grid {
    grid-template-columns: 1fr;
  }

  .pros-cons-grid { grid-template-columns: 1fr; }

  .detail-rating-num {
    font-size: 16px;
  }

  .detail-comparison-bar {
    flex-direction: column;
  }

  .comparison-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .comparison-item:last-child {
    border-bottom: none;
  }
}

/* === ADMIN === */
.admin-auth {
  text-align: center;
  padding: 120px 0;
}

.admin-auth h2 {
  font-size: 24px;
  margin-bottom: 24px;
}

.admin-panel {
  padding: 40px 0 80px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.admin-header h2 {
  font-size: 24px;
  font-weight: 700;
}

.admin-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex: 1;
  transition: transform var(--transition);
}

.stat-card:hover { transform: translateY(-1px); }

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.admin-table tr:hover td { background: var(--surface); }

.admin-table .actions {
  display: flex;
  gap: 8px;
}

/* === BUTTONS === */
.btn {
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg);
  color: var(--text);
}

.btn:hover { border-color: var(--text-secondary); }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-secondary { background: var(--surface); }

.btn-danger {
  color: #dc2626;
  border-color: #fca5a5;
}

.btn-danger:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* === MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 32px;
  animation: scaleUp 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal::-webkit-scrollbar { display: none; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h3 { font-size: 20px; }

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  transition: color var(--transition);
}

.modal-close:hover { color: var(--text); }

.tool-form { display: flex; flex-direction: column; gap: 16px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), background var(--transition-slow);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea { resize: vertical; }

.form-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

/* === FOOTER === */
.footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
  transition: border-color var(--transition-slow);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 24px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* === BACK TO TOP === */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 50;
  box-shadow: var(--card-shadow);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  transform: translateY(-2px);
}

/* === ANIMATIONS === */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* === COMMAND-K SEARCH === */
.cmdk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  animation: fadeIn 150ms ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cmdk-modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 640px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: scaleUp 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.cmdk-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.cmdk-icon {
  font-size: 18px;
  color: var(--text-muted);
  opacity: 0.5;
}

.cmdk-input {
  flex: 1;
  font-family: var(--font);
  font-size: 16px;
  background: none;
  border: none;
  color: var(--text);
  outline: none;
}

.cmdk-input::placeholder {
  color: var(--text-muted);
}

.cmdk-esc {
  padding: 3px 8px;
  font-family: var(--font);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.cmdk-results {
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 8px;
}

.cmdk-results::-webkit-scrollbar { display: none; }

.cmdk-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 8px 12px 4px;
}

.cmdk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: background 100ms ease;
}

.cmdk-item:hover,
.cmdk-selected {
  background: var(--surface);
}

.cmdk-item-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}

.cmdk-item-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cmdk-item-info {
  flex: 1;
  min-width: 0;
}

.cmdk-item-name {
  font-size: 14px;
  font-weight: 600;
  display: block;
}

.cmdk-item-desc {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmdk-item-meta {
  flex-shrink: 0;
}

.cmdk-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 14px;
}

.cmdk-footer {
  display: flex;
  gap: 16px;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

.cmdk-ai-divider {
  text-align: center;
  padding: 12px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.cmdk-ai-btn {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.cmdk-ai-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.cmdk-loading {
  text-align: center;
  padding: 32px;
  color: var(--accent);
  font-size: 14px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.search-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

.search-hint kbd {
  padding: 2px 6px;
  font-family: var(--font);
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

@media (max-width: 640px) {
  .cmdk-overlay { padding-top: 5vh; padding: 5vh 16px 0; }
  .cmdk-modal { max-width: 100%; }
}

/* === RICH CONTENT: Pros & Cons === */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pros-item {
  font-size: 14px;
  color: #16a34a;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.cons-item {
  font-size: 14px;
  color: #dc2626;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

/* Best For */
.bestfor-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bestfor-badge {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all var(--transition);
}

.bestfor-badge:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

/* Use Cases */
.usecases-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.usecase-item {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 0;
}

/* Platforms */
.platforms-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.platform-badge {
  padding: 4px 10px;
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
}

/* Free Trial Banner */
.free-trial-banner {
  padding: 14px 20px;
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.3);
  border-radius: var(--radius);
  color: #16a34a;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}

/* Integrations */
.integrations-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.integration-pill {
  padding: 3px 8px;
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
}

/* Card badges */
.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-badge.trending {
  background: rgba(22, 163, 74, 0.15);
  color: #16a34a;
}

.card-bestfor {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* === FOCUS STATES === */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* === ADMIN PANEL === */
.admin-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 4px;
  border: 1px solid var(--border);
}

.admin-tab {
  flex: 1;
  padding: 12px 20px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  background: none;
  border: none;
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.admin-tab:hover { color: var(--text); background: var(--surface-hover); }
.admin-tab.active { color: var(--bg); background: var(--text); }

.admin-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-search-wrap { flex: 1; min-width: 200px; }

.admin-search {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.admin-search:focus { border-color: var(--accent); }

.admin-result-count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.sortable {
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}

.sortable:hover { color: var(--text); }

.sortable::after {
  content: ' \u2195';
  font-size: 10px;
  opacity: 0.3;
}

.sortable.sort-active::after { content: ' \u2191'; opacity: 1; color: var(--accent); }
.sortable.sort-active.sort-desc::after { content: ' \u2193'; }

.admin-pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  padding: 20px 0;
  align-items: center;
}

/* AI Usage */
.usage-budgets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.usage-budget-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
}

.usage-budget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 12px;
}

.usage-budget-header span { color: var(--text-muted); font-size: 12px; }

.usage-budget-bar {
  height: 12px;
  background: var(--surface);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}

.usage-budget-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
  transition: width 600ms ease;
  min-width: 2px;
}

.usage-budget-fill.warn {
  background: linear-gradient(90deg, var(--pricing-paid), #dc2626);
}

.usage-budget-models {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.8;
}

.usage-query {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--surface);
  gap: 16px;
}

.usage-query-text {
  font-size: 13px;
  color: var(--text);
  font-style: italic;
}

.usage-query-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Analytics */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.analytics-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
}

.analytics-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.analytics-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
}

.analytics-bar-label {
  width: 140px;
  min-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analytics-bar {
  flex: 1;
  height: 8px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  min-width: 60px;
}

.analytics-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
  min-width: 2px;
}

.analytics-bar-value {
  width: 60px;
  min-width: 60px;
  text-align: right;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.analytics-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.analytics-list-item:last-child { border-bottom: none; }

.analytics-rank {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* === CHART === */
.chart-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 0;
}

.chart-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}

.chart-pills {
  display: flex;
  gap: 0;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 3px;
  border: 1px solid var(--border);
}

.chart-pill {
  padding: 6px 14px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.chart-pill:hover { color: var(--text); }
.chart-pill.active { background: var(--text); color: var(--bg); }

.chart-area {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 220px;
  padding-top: 20px;
  position: relative;
}

.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  min-width: 0;
  position: relative;
}

.chart-bar {
  width: 100%;
  max-width: 40px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--gradient-1), var(--gradient-2));
  transition: height 400ms ease, opacity var(--transition);
  min-height: 2px;
  position: relative;
  cursor: pointer;
  opacity: 0.8;
}

.chart-bar:hover { opacity: 1; }

.chart-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  margin-bottom: 6px;
  z-index: 5;
}

.chart-bar:hover .chart-tooltip { display: block; }

.chart-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 14px;
}

.chart-y-axis {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.chart-y-line {
  border-top: 1px dashed var(--border);
  position: relative;
}

.chart-y-label {
  position: absolute;
  right: 100%;
  top: -7px;
  font-size: 10px;
  color: var(--text-muted);
  padding-right: 8px;
  font-variant-numeric: tabular-nums;
}

/* Traffic chart bar (horizontal fallback) */
.traffic-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.traffic-bar-date {
  width: 80px;
  min-width: 80px;
  font-size: 12px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.traffic-bar {
  flex: 1;
  height: 24px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.traffic-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  min-width: 2px;
}

.traffic-bar-num {
  font-size: 11px;
  font-weight: 700;
  color: white;
}

.rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.rate-row:last-child { border-bottom: none; }

.rate-label { font-size: 13px; color: var(--text-secondary); }

.rate-value {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rate-value.good { color: var(--pricing-free); }
.rate-value.warn { color: var(--pricing-paid); }

@media (max-width: 640px) {
  .admin-tabs { flex-direction: column; }
  .admin-toolbar { flex-direction: column; }
  .usage-budgets { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-bar-label { width: 100px; min-width: 100px; }
  .chart-controls { flex-direction: column; align-items: flex-start; }
  .chart-area { height: 160px; }
  .chart-label { font-size: 8px; }
}

/* === HOMEPAGE SECTIONS === */
.homepage-section {
  padding: 0 0 48px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* Scroll row container */
.scroll-row-wrap {
  position: relative;
}

.scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0 16px;
}

.scroll-row::-webkit-scrollbar { display: none; }

.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  opacity: 0;
  box-shadow: var(--card-shadow);
}

.scroll-row-wrap:hover .scroll-arrow { opacity: 1; }
.scroll-arrow:hover { border-color: var(--text-secondary); background: var(--surface-hover); }
.scroll-arrow-left { left: -12px; }
.scroll-arrow-right { right: -12px; }

/* Featured card */
.featured-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 3px solid transparent;
  background-image: linear-gradient(var(--card-bg), var(--card-bg)), linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.featured-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.featured-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  overflow: hidden;
}

.featured-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.featured-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.featured-bestfor {
  padding: 3px 10px;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  background: var(--surface);
}

.featured-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 4px;
}

/* Trending card */
.trending-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trending-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.trending-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trending-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}

.trending-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trending-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.trending-cat {
  font-size: 11px;
  color: var(--text-muted);
}

.trending-score-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trending-bar {
  flex: 1;
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
}

.trending-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
  transition: width 600ms ease;
}

.trending-score-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  min-width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.trending-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

/* Use case cards */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.usecase-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  align-items: center;
  gap: 14px;
}

.usecase-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--accent);
}

.usecase-emoji {
  font-size: 28px;
  flex-shrink: 0;
}

.usecase-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.usecase-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.usecase-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* Comparison cards */
.comparisons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.comparison-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--text);
}

.comparison-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  color: var(--text);
}

.comparison-logos {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.comparison-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.comparison-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comparison-vs {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.comparison-label {
  font-size: 14px;
  font-weight: 600;
}

.comparison-arrow {
  margin-left: auto;
  font-size: 14px;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.comparison-card:hover .comparison-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* Enhanced tool card additions */
.card-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.card-platforms {
  display: flex;
  gap: 4px;
}

.card-platform {
  padding: 2px 6px;
  font-size: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.card-freetrial {
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.card-integrations {
  font-size: 11px;
  color: var(--text-muted);
}

.card-compare-btn {
  padding: 4px 12px;
  font-family: var(--font);
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  margin-left: auto;
}

.card-compare-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.card-compare-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Load more */
.load-more-wrap {
  text-align: center;
  padding: 32px 0 0;
}

.load-more-btn {
  padding: 12px 32px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}

.load-more-btn:hover {
  border-color: var(--text-secondary);
  background: var(--surface-hover);
}

/* Compare bar */
.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  animation: slideUp 300ms ease both;
}

[data-theme="dark"] .compare-bar {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.compare-bar-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}

.compare-bar-tool {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  color: var(--text);
}

.compare-bar-tool img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
}

.compare-bar-tool-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  transition: color var(--transition);
}

.compare-bar-tool-remove:hover { color: var(--text); }

.compare-bar-btn {
  padding: 8px 24px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.compare-bar-btn:hover {
  background: var(--accent);
  color: white;
}

.compare-bar-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  transition: color var(--transition);
}

.compare-bar-close:hover { color: var(--text); }

/* Newsletter */
.newsletter-section {
  padding: 48px 0;
  text-align: center;
}

.newsletter-inner {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.newsletter-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.newsletter-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-input {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.newsletter-input:focus {
  border-color: var(--accent);
}

.newsletter-btn {
  padding: 12px 24px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.newsletter-btn:hover {
  background: var(--accent);
  color: white;
}

/* Submit a Tool */
.submit-tool-section {
  text-align: center;
  padding: 0 0 64px;
}

.submit-tool-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.submit-tool-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.submit-tool-btn {
  display: inline-block;
  padding: 10px 24px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: all var(--transition);
}

.submit-tool-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text);
  background: var(--surface-hover);
}

/* === COMPARE PAGE === */
.compare-page {
  padding: 32px 0 80px;
}

.compare-selector {
  margin-bottom: 32px;
}

.compare-selector-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.compare-selector-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.compare-search-wrap {
  position: relative;
  max-width: 400px;
}

.compare-search {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.compare-search:focus { border-color: var(--accent); }

.compare-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: var(--card-shadow-hover);
  scrollbar-width: none;
}

.compare-dropdown::-webkit-scrollbar { display: none; }

.compare-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition);
  font-size: 13px;
  color: var(--text);
}

.compare-dropdown-item:hover { background: var(--surface-hover); }

.compare-dropdown-item img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.compare-selected {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.compare-selected-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
}

.compare-selected-pill img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.compare-selected-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0 2px;
}

.compare-selected-remove:hover { color: var(--text); }

/* Compare table */
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.compare-table th,
.compare-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 13px;
}

.compare-table th {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  width: 140px;
}

.compare-tool-header {
  text-align: center;
  padding: 24px 16px;
}

.compare-tool-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  margin: 0 auto 12px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.compare-tool-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-tool-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.compare-tool-visit {
  display: inline-block;
  padding: 6px 16px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition);
}

.compare-tool-visit:hover {
  background: var(--accent);
  color: white;
}

.compare-pros li { color: #16a34a; }
.compare-cons li { color: #ea580c; }

.compare-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.compare-list li {
  font-size: 13px;
  line-height: 1.5;
}

.compare-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
}

.compare-empty-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .hero { padding: 48px 0 32px; }
  .hero-title { font-size: 34px; letter-spacing: -1px; }
  .hero-subtitle { font-size: 14px; }

  .hero-stats { gap: 20px; }
  .hero-stat-value { font-size: 18px; }

  .search-input { padding: 14px 16px 14px 42px; font-size: 14px; }

  .filter-secondary { flex-direction: column; align-items: flex-start; gap: 12px; }

  .tools-grid { grid-template-columns: 1fr; }

  .tool-card { padding: 20px; }

  .detail-header { flex-direction: column; }
  .detail-name { font-size: 24px; }

  .form-row { grid-template-columns: 1fr; }

  .admin-stats { flex-direction: column; }

  .admin-table { font-size: 12px; }
  .admin-table th,
  .admin-table td { padding: 8px 10px; }

  .modal { padding: 20px; }

  .pill { padding: 6px 12px; min-height: 44px; display: flex; align-items: center; }
  .visit-btn { min-height: 44px; display: flex; align-items: center; }
  .btn { min-height: 44px; }

  .footer-top { flex-direction: column; gap: 24px; }

  .featured-card { flex: 0 0 260px; padding: 20px; }
  .featured-logo { width: 44px; height: 44px; }
  .trending-card { flex: 0 0 240px; }
  .usecases-grid { grid-template-columns: 1fr 1fr; }
  .comparisons-grid { grid-template-columns: 1fr; }
  .scroll-arrow { display: none; }

  .compare-bar { flex-wrap: wrap; gap: 8px; padding: 10px 16px; }
  .compare-bar-tools { flex-wrap: wrap; }

  .newsletter-inner { padding: 28px 20px; }
  .newsletter-form { flex-direction: column; }

  .compare-table { font-size: 12px; }
  .compare-table th,
  .compare-table td { padding: 10px 8px; }
  .compare-tool-header { padding: 16px 8px; }
  .compare-table th { width: 80px; }
}

/* === BLOG === */

.blog-hero {
  text-align: center;
  padding: 60px 0 32px;
}

.blog-hero-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.blog-hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

.blog-search-wrap {
  max-width: 520px;
  margin: 20px auto 0;
  position: relative;
}

.blog-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  pointer-events: none;
}

.blog-search-input {
  width: 100%;
  padding: 13px 20px 13px 42px;
  font-family: var(--font);
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}

.blog-search-input:focus {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.blog-search-input::placeholder { color: var(--text-muted); }

.blog-ai-status {
  text-align: center;
  font-size: 13px;
  color: var(--accent);
  margin-top: 10px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.blog-filters {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow var(--transition), transform var(--transition);
  animation: fadeUp 400ms ease both;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
  color: var(--text);
}

.blog-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--surface);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.blog-card-category {
  background: var(--accent-glow);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.3px;
}

.blog-card-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.blog-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.blog-card-tag {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 4px;
}

.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 20px 0 60px;
}

.blog-page-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.blog-page-btn:hover {
  background: var(--surface-hover);
}

.blog-page-info {
  font-size: 13px;
  color: var(--text-muted);
}

.blog-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

/* === BLOG POST DETAIL === */

.breadcrumbs {
  padding: 24px 0 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumb-sep { margin: 0 6px; }
.breadcrumb-current { color: var(--text-secondary); }

.blog-post {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.post-header {
  padding: 24px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.post-category {
  background: var(--accent-glow);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.post-excerpt {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.post-featured-image {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
  max-height: 420px;
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}

.post-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 14px;
  letter-spacing: -0.5px;
}

.post-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 10px;
}

.post-content p {
  margin-bottom: 18px;
}

.post-content ul, .post-content ol {
  margin: 0 0 18px 20px;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.post-content code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.post-content pre {
  background: var(--surface);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 24px 0;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 24px 0;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

.post-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.post-tag {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--surface);
  padding: 4px 12px;
  border-radius: 4px;
  text-decoration: none;
}

.post-tag:hover { background: var(--surface-hover); color: var(--text); }

.post-share {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-share-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.post-share-link {
  font-size: 12px;
  font-family: var(--font);
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface);
  padding: 4px 12px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.post-share-link:hover { background: var(--surface-hover); color: var(--text); }

.post-read-time { font-style: italic; }

.related-posts {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.related-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .blog-hero-title { font-size: 26px; }
  .blog-grid { grid-template-columns: 1fr; }
  .post-title { font-size: 24px; }
  .post-content { font-size: 14px; }
  .post-footer { flex-direction: column; }
}
