/* ── Search Code Custom Theme ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --color-base-font: 'Inter', -apple-system, sans-serif;
  --color-url-font:  'Inter', -apple-system, sans-serif;
}

/* Indigo/Cyan palette override */
:root, .theme-dark, .theme-auto {
  --color-search-border:         #6366f1;
  --color-search-shadow:         rgba(99,102,241,.35);
  --color-btn-background:        #6366f1;
  --color-btn-foreground:        #fff;
  --color-text-url:              #818cf8;
  --color-result-link-color:     #818cf8;
  --color-result-link-color-visited: #a78bfa;
  --color-categories-item:       #6366f1;
  --color-autocomplete-border:   #6366f1;
}

/* Font */
body, input, button, select { font-family: 'Inter', -apple-system, sans-serif !important; }

/* ── Replace logo with "Search Code" text ── */
#main_index h1,
.title_logo,
[class*="logo"],
[class*="wordmark"],
img[src*="searxng"],
img[src*="logo"],
img[alt*="searx"],
img[alt*="SearX"],
svg[class*="logo"] { display: none !important; }

/* Search header branding */
#main_results .search_header .logo,
#links_on_top .logo { display: none !important; }

/* Style the native instance name heading */
#main_index h1,
.title_logo { display: none !important; }

/* ── Search input ── */
#q, .search-bar__input, input[name="q"] {
  border-radius: 14px !important;
  border-color: rgba(99,102,241,.3) !important;
  transition: border-color .3s, box-shadow .3s !important;
}
#q:focus, .search-bar__input:focus, input[name="q"]:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,.2) !important;
  outline: none !important;
}

/* Search button */
button[type="submit"], .search-bar__button {
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  border: none !important;
  border-radius: 12px !important;
  transition: transform .2s, box-shadow .2s !important;
}
button[type="submit"]:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(99,102,241,.4) !important;
}

/* ── Results page header ── */
#main_results #search_header,
#main_results .search_header {
  border-bottom: 1px solid rgba(99,102,241,.15);
}

/* Result links */
article.result h3 a,
.result_header a {
  color: #818cf8 !important;
}
article.result h3 a:hover,
.result_header a:hover {
  color: #a5b4fc !important;
  text-decoration: underline;
}

/* ── Hide SearXNG footer references ── */
footer a[href*="searxng"],
footer a[href*="github.com/searxng"],
footer a[href*="searx.space"],
.footer a[href*="searxng"],
[href*="searxng.org"],
.instance_url,
#main_about { display: none !important; }

/* Footer cleanup */
footer, .footer {
  border-top: 1px solid rgba(99,102,241,.12) !important;
  opacity: .7;
}

/* ── Category tabs ── */
.category_btn, .category-btn {
  border-radius: 20px !important;
  transition: background .2s, border-color .2s !important;
}
.category_btn.active,
.category-btn.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  border-color: transparent !important;
  color: #fff !important;
}

/* ── Paging ── */
.page_number.active, .page-number.active {
  background: #6366f1 !important;
  color: #fff !important;
  border-radius: 8px !important;
}

/* ── Dark mode adjustments ── */
.theme-dark body,
.theme-auto body {
  --color-bg:          #05050f;
  --color-bg-2:        #0a0a1e;
  --color-card:        rgba(255,255,255,.04);
}
