/* ==========================================================================
   SynapseAI - Ultra-Modern Glassmorphism & High-Converting Design System
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-main: #070913;
  --bg-secondary: #0d111f;
  --bg-card: rgba(18, 24, 43, 0.75);
  --bg-card-hover: rgba(26, 35, 62, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-active: rgba(99, 102, 241, 0.15);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --border-glow: rgba(99, 102, 241, 0.3);

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #818cf8;
  --accent-cyan: #06b6d4;
  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Typography */
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;

  /* Elevations & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.25);
  --shadow-glow-cyan: 0 0 30px rgba(6, 182, 212, 0.25);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Backdrops */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  animation: pulseAmbient 12s infinite alternate ease-in-out;
}

.glow-top-left {
  top: -150px;
  left: -100px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35), transparent 70%);
}

.glow-top-right {
  top: -100px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25), transparent 70%);
}

.glow-bottom-center {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.15), transparent 70%);
}

@keyframes pulseAmbient {
  0% { transform: scale(1) translate(0, 0); opacity: 0.35; }
  100% { transform: scale(1.15) translate(30px, 20px); opacity: 0.55; }
}

/* Layout Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Typography Helpers */
.text-gradient {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle-gradient {
  background: linear-gradient(135deg, #f8fafc 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-center { text-align: center; }
.max-w-2xl { max-width: 46rem; margin-left: auto; margin-right: auto; }

/* Top Ticker Status Bar */
.engine-ticker {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(30, 27, 75, 0.95), rgba(15, 23, 42, 0.95));
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.ticker-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-muted);
}

.ticker-pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #a5b4fc;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

.ticker-divider {
  color: rgba(255, 255, 255, 0.2);
}

.ticker-action {
  color: #38bdf8;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition-fast);
}
.ticker-action:hover {
  text-decoration: underline;
  color: #7dd3fc;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 35px;
  z-index: 90;
  backdrop-filter: blur(16px);
  background: rgba(7, 9, 19, 0.7);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 0;
  transition: var(--transition-smooth);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-glow);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.brand-tagline {
  display: block;
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: -3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background: var(--bg-glass-active);
}

.nav-ai-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.3));
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 999px;
  color: #d8b4fe;
  font-weight: 700;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge-revenue {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
  margin-left: 0.4rem;
}

/* Buttons */
.btn {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.6rem 1.15rem;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
}

.btn-gradient {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #06b6d4 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.3);
}
.btn-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(236, 72, 153, 0.5);
}

.btn-glass {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  backdrop-filter: blur(12px);
}
.btn-glass:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
.btn-outline:hover {
  border-color: var(--border-focus);
  color: var(--text-main);
  background: var(--bg-glass);
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
}

.btn-large {
  padding: 0.9rem 1.6rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

.btn-danger-ghost {
  background: transparent;
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: #fb7185;
}
.btn-danger-ghost:hover {
  background: rgba(244, 63, 94, 0.1);
  border-color: #f43f5e;
}

/* Hero Section */
.hero-section {
  padding: 4.5rem 0 2.5rem;
  text-align: center;
  position: relative;
}

.hero-content {
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 999px;
  font-size: 0.82rem;
  color: #c7d2fe;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-description strong {
  color: #e2e8f0;
}

/* Hero Stats Grid */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0 3rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.25rem 1rem;
  text-align: left;
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-sm);
}

.stat-label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.stat-value-group {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.35rem 0 0.2rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-value.highlight {
  background: linear-gradient(135deg, #10b981, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-change.positive {
  font-size: 0.74rem;
  color: #34d399;
  font-weight: 600;
}

.stat-badge-pulse {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  border-radius: 999px;
  font-weight: 600;
}

.stat-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Search Box Wrapper */
.search-box-wrapper {
  max-width: 680px;
  margin: 0 auto;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(18, 24, 43, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 0.4rem 1rem;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow), 0 0 0 2px rgba(99, 102, 241, 0.3);
  background: rgba(22, 30, 54, 0.95);
}

.search-icon {
  color: var(--text-dim);
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.search-box input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-main);
  padding: 0.7rem 0;
}

.search-box input::placeholder {
  color: var(--text-dim);
}

.clear-search-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.clear-search-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Controls Section (Categories & Sorting) */
.controls-section {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.categories-scroll {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.category-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition-fast);
}

.category-chip:hover {
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.category-chip.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
  border-color: var(--primary);
  color: #e0e7ff;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

.category-count {
  font-size: 0.72rem;
  opacity: 0.7;
}

.filter-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.filter-group, .sort-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.select-control {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.5rem 0.9rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.select-control:focus {
  border-color: var(--primary);
}

/* Spotlight Section (Featured Sponsored Hero Placement) */
.spotlight-section {
  padding: 2rem 0 1rem;
}

.spotlight-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.6) 0%, rgba(20, 28, 55, 0.75) 100%);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 20px;
  padding: 1.75rem 2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md), 0 0 40px rgba(168, 85, 247, 0.15);
  backdrop-filter: blur(16px);
}

.spotlight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #ec4899, #8b5cf6, #06b6d4);
}

.spotlight-badge {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(236, 72, 153, 0.4);
  border-radius: 999px;
  color: #f472b6;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.spotlight-icon-box {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
}

.spotlight-title-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.35rem;
}

.spotlight-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
}

.spotlight-tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text-muted);
}

.spotlight-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.spotlight-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.spotlight-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.spotlight-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-end;
}

/* Tools Grid Section */
.tools-grid-section {
  padding: 3rem 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.live-sort-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  background: var(--bg-card);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.dot-online {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

/* Tools Grid & Card Component */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(14px);
  position: relative;
  transition: var(--transition-smooth);
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(99, 102, 241, 0.15);
  background: var(--bg-card-hover);
}

.tool-card.card-sponsored {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(180deg, rgba(30, 24, 45, 0.8) 0%, rgba(18, 24, 43, 0.8) 100%);
}
.tool-card.card-sponsored:hover {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(245, 158, 11, 0.15);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-icon-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.tool-title-group h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.category-tag {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* Upvote Pill */
.upvote-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.35rem 0.65rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition-fast);
  line-height: 1;
}

.upvote-btn:hover {
  border-color: var(--primary);
  color: var(--text-main);
  background: rgba(99, 102, 241, 0.15);
  transform: translateY(-1px);
}

.upvote-btn.upvoted {
  border-color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
}

.upvote-arrow {
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.tool-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.15rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Metrics Badge Bar */
.card-badges-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}

.badge-pricing {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-weight: 600;
}

.badge-free {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-freemium {
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-paid {
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-ai-rank {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-sponsored {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-weight: 700;
  text-transform: uppercase;
}

.badge-ab-test {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

/* Card Actions */
.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.affiliate-cta-btn {
  width: 100%;
  font-size: 0.84rem;
  padding: 0.6rem 0.85rem;
  justify-content: space-between;
}

.info-modal-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.info-modal-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-focus);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: 20px;
  max-width: 580px;
  margin: 2rem auto;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

/* Blueprint / Monetization Architecture Section */
.blueprint-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, transparent 0%, rgba(13, 17, 31, 0.6) 100%);
}

.badge-glow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #38bdf8;
  padding: 0.25rem 0.85rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 999px;
  margin-bottom: 1rem;
}

.blueprint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-top: 3rem;
}

.blueprint-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(14px);
  position: relative;
  transition: var(--transition-smooth);
}

.blueprint-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-md);
}

.blueprint-card.highlighted-border {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: var(--shadow-glow-cyan);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.bg-indigo { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.bg-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.bg-cyan   { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }

.blueprint-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.blueprint-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.blueprint-perk {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 0.82rem;
  color: #e2e8f0;
}

.blueprint-perk strong {
  color: #38bdf8;
}

/* Engine HUD (Interactive Self-Improving Control Room) */
.engine-hud-section {
  padding: 3rem 0 5rem;
}

.hud-panel {
  background: rgba(11, 15, 28, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 24px;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(99, 102, 241, 0.12);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.hud-header {
  padding: 1.5rem 2rem;
  background: rgba(18, 24, 43, 0.6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.hud-title-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-indicator {
  width: 14px;
  height: 14px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--accent-emerald);
  animation: pulseDot 1.8s infinite;
}

.hud-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.hud-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hud-body {
  padding: 2rem;
}

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

.hud-col-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  color: #c7d2fe;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.formula-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.82rem;
  color: #38bdf8;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.hud-stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hud-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.hud-stat-item strong {
  color: var(--text-main);
}

.event-log-container {
  height: 220px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-family: monospace;
}

.log-entry {
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  gap: 0.5rem;
  animation: fadeIn 0.25s ease;
}

.log-time { color: var(--text-dim); }
.log-text { color: #cbd5e1; }
.log-text.highlight { color: #38bdf8; font-weight: 600; }
.log-text.revenue   { color: #34d399; font-weight: 600; }

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

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 5, 12, 0.8);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: #0f1424;
  border: 1px solid var(--border-focus);
  border-radius: 22px;
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  position: relative;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(99, 102, 241, 0.25);
}

.modal-sponsor {
  max-width: 820px;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

/* Sponsor Form & Pricing Tiers in Modal */
.sponsor-header {
  text-align: center;
  margin-bottom: 2rem;
}

.sponsor-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.sponsor-header h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin-bottom: 0.4rem;
}

.sponsor-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pricing-tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.tier-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: var(--transition-smooth);
}

.tier-card.active-tier {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

.popular-ribbon {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  color: white;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.tier-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.tier-price {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  margin: 0.35rem 0 0.5rem;
}

.tier-price .period {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-dim);
}

.tier-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.tier-features {
  list-style: none;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sponsor-form {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.5rem;
}

.form-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: #e2e8f0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
  background: rgba(14, 18, 33, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  color: white;
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

/* Simulated Stripe Preview */
.stripe-preview-box {
  background: rgba(10, 14, 25, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 1.15rem;
  margin: 1.25rem 0 1.5rem;
}

.stripe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.stripe-badge-secure {
  color: #34d399;
}

.checkout-amount-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.75rem;
}

.checkout-total strong {
  font-size: 1.15rem;
  color: #38bdf8;
}

.simulated-card-input {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-size: 0.84rem;
  font-family: monospace;
  color: var(--text-muted);
}

.simulated-card-input input {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-family: monospace;
  width: 100%;
}

/* Tool Detail Modal Content */
.detail-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.detail-icon {
  width: 64px;
  height: 64px;
  font-size: 2.2rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-title h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.detail-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.detail-section {
  margin-bottom: 1.5rem;
}

.detail-section h4 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}

.pros-card, .cons-card {
  padding: 1rem;
  border-radius: 12px;
  font-size: 0.84rem;
}

.pros-card {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.cons-card {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.pros-card h5 { color: #34d399; margin-bottom: 0.5rem; }
.cons-card h5 { color: #fb7185; margin-bottom: 0.5rem; }

.pros-card ul, .cons-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: rgba(15, 20, 36, 0.95);
  border: 1px solid var(--border-focus);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(99, 102, 241, 0.3);
  backdrop-filter: blur(16px);
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  color: white;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 360px;
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
  background: rgba(7, 9, 19, 0.9);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: white;
  margin-bottom: 0.75rem;
}

.footer-copy {
  max-width: 480px;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.affiliate-disclosure {
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--primary);
  padding: 0.65rem 0.85rem;
  font-size: 0.74rem;
  color: var(--text-dim);
  border-radius: 0 8px 8px 0;
}

.footer-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-tech-stack {
  font-family: monospace;
  font-size: 0.75rem;
  color: #38bdf8;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .hud-columns {
    grid-template-columns: 1fr;
  }
  .pricing-tiers-grid {
    grid-template-columns: 1fr;
  }
  .spotlight-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .spotlight-actions {
    align-items: center;
  }
  .spotlight-title-row {
    justify-content: center;
  }
  .spotlight-meta {
    justify-content: center;
  }
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-right {
    text-align: center;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .pros-cons-grid {
    grid-template-columns: 1fr;
  }
}
