:root {
  --google-blue: #1a0dab;
  --google-blue-hover: #174ea6;
  --google-text: #202124;
  --google-muted: #4d5156;
  --google-url: #5f6368;
  --google-border: #dfe1e5;
  --google-shadow: rgba(32, 33, 36, 0.28);
  --results-width: 720px;
}

html {
  background-color: transparent;
}

body {
  background-color: transparent;
  color: var(--google-text);
}

#bg-rotator,
#bg-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#bg-rotator {
  z-index: 0;
  background-position: center;
  background-image: url("/static/interviewsquatch.png");
  background-size: cover;
  background-repeat: no-repeat;
  transition: opacity 800ms ease;
  opacity: 1;
}

#bg-overlay {
  z-index: 1;
  background: linear-gradient(180deg, rgba(6, 10, 16, 0.5), rgba(6, 10, 16, 0.45));
  backdrop-filter: blur(0px);
}

main {
  position: relative;
  z-index: 2;
}

#links_on_top a {
  color: var(--google-muted);
}

#search_header {
  padding-top: 18px;
}

#search .search_box {
  border: 1px solid var(--google-border);
  border-radius: 24px;
  box-shadow: 0 1px 6px var(--google-shadow);
  background: #ffffff;
}

#search .search_box:focus-within {
  border-color: #c6dafc;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.35), 0 0 0 2px rgba(66, 133, 244, 0.2);
}

#search #q {
  font-size: 16px;
  padding: 14px 12px;
}

#search #send_search,
#search #clear_search {
  border-radius: 999px;
}

#search #send_search {
  width: 40px;
  height: 40px;
  margin-right: 6px;
}

#search #clear_search {
  width: 34px;
  height: 34px;
}

#results {
  display: grid;
  grid-template-columns: minmax(0, var(--results-width)) minmax(220px, 320px);
  gap: 32px;
}

#urls.results-list {
  max-width: var(--results-width);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  padding: 12px 16px;
}

#urls .result {
  margin: 0 0 22px 0;
}

#urls .result:last-child {
  margin-bottom: 8px;
}

#urls .url_header {
  font-size: 12px;
  color: var(--google-url);
  text-decoration: none;
}

#urls .url_wrapper {
  color: var(--google-url);
}

#urls .result h3 a {
  color: var(--google-blue);
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
}

#urls .result h3 a:hover {
  color: var(--google-blue-hover);
  text-decoration: underline;
}

#urls .result .content {
  color: var(--google-muted);
  font-size: 14px;
  line-height: 1.5;
}

#urls .engines,
#urls .cache_link {
  display: none;
}

#sidebar {
  position: sticky;
  top: 16px;
}

#urls .template_group_images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

#urls .template_group_images .result-images {
  margin: 0;
}

.result-images a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(32, 33, 36, 0.2);
}

.result-images img.image_thumbnail {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.result-images .title {
  display: block;
  font-size: 12px;
  color: #3c4043;
  padding: 8px 10px 0 10px;
}

.result-images .source {
  display: block;
  font-size: 11px;
  color: var(--google-url);
  padding: 0 10px 10px 10px;
}

@media (max-width: 980px) {
  #results {
    grid-template-columns: 1fr;
  }

  #sidebar {
    position: static;
  }

  #urls.results-list {
    padding: 10px 12px;
  }
}

.neon-logo {
  color: #ff8f1f;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-shadow: 0 0 4px #ff8f1f, 0 0 12px #ff8f1f, 0 0 24px #c13cff, 0 0 42px #7b00ff;
}

#search_logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

#search_logo .neon-logo {
  font-size: 20px;
}

.footer-brand {
  margin: 8px 0 4px 0;
  text-align: center;
}

.footer-links {
  text-align: center;
  color: var(--google-muted);
}

#brand-corner {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  opacity: 0.95;
}

#brand-corner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(255, 143, 31, 0.55)) drop-shadow(0 0 10px rgba(123, 0, 255, 0.45));
}

footer {
  position: relative;
  z-index: 2;
}

/* Dark glass overrides */
:root {
  --glass-bg: rgba(8, 12, 18, 0.66);
  --glass-bg-strong: rgba(8, 12, 18, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-bright: #eaf0f6;
  --text-muted: #aeb7c2;
  --accent: #7dd3fc;
  --accent-strong: #38bdf8;
}

body {
  color: var(--text-bright);
}

#bg-overlay {
  background: linear-gradient(180deg, rgba(6, 10, 16, 0.28), rgba(6, 10, 16, 0.38));
  backdrop-filter: blur(1px);
}

#links_on_top a {
  color: var(--text-muted);
}

.index .title {
  text-align: center;
  margin: 36px 0 18px;
}

.index .title h1 {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.65);
  border: 1px solid rgba(125, 211, 252, 0.25);
  color: #f8fbff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
  letter-spacing: 1.6px;
}

#search .search_box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

#search .search_box:focus-within {
  border-color: rgba(125, 211, 252, 0.55);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(56, 189, 248, 0.25);
}

#search #q {
  color: var(--text-bright);
}

#search #q::placeholder {
  color: var(--text-muted);
}

#search #send_search,
#search #clear_search {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#search #clear_search {
  display: none;
}

#search #send_search svg {
  color: var(--accent-strong);
}

#urls.results-list {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

#urls .result h3 a {
  color: var(--accent);
}

#urls .result h3 a:hover {
  color: #ffffff;
}

#urls .result .content,
#urls .url_header,
#urls .url_wrapper {
  color: var(--text-muted);
}

footer {
  color: var(--text-muted);
}

footer a {
  color: var(--accent);
}

#search #send_search {
  display: none !important;
}

.index .title {
  display: block;
  text-align: center;
  margin: 32px 0 18px;
}

.index .title h1 {
  font-size: 34px;
}

#brand-corner {
  width: 72px;
  height: 72px;
}

/* Final overrides for branding + search */
#bg-overlay {
  background: linear-gradient(180deg, rgba(6, 10, 16, 0.4), rgba(6, 10, 16, 0.35)) !important;
}

#bg-rotator {
  filter: saturate(1.25) contrast(1.08) brightness(1.18) !important;
}

.index {
  padding-top: 120px;
}

.index .title h1 {
  position: relative;
  color: transparent !important;
  font-size: 44px !important;
  letter-spacing: 2px;
}

.index .title h1::after {
  content: "Squatch Searx";
  color: #f8fbff;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.75);
}

#search #send_search,
#search #clear_search {
  display: none !important;
}

#search .search_box {
  padding-right: 16px;
}

#brand-corner {
  width: 96px;
  height: 96px;
  top: 18px;
  left: 50%;
  bottom: auto;
  transform: translateX(-50%);
  z-index: 3;
}

/* Override: restore title + corner logo placement */
.index { padding-top: 40px !important; }
.index .title { display: block !important; text-align: center; margin: 28px 0 18px; }
.index .title h1 {
  color: #f8fbff !important;
  font-size: 40px !important;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.75) !important;
}
.index .title h1::after { content: none !important; }

#brand-corner {
  left: 16px !important;
  bottom: 16px !important;
  top: auto !important;
  transform: none !important;
  width: 72px !important;
  height: 72px !important;
}

/* Force title text + hide default buttons */
.index .title h1 {
  color: transparent !important;
  text-shadow: none !important;
  font-size: 42px !important;
  letter-spacing: 2px !important;
}

.index .title h1::after {
  content: "Squatch Searx";
  color: #f8fbff;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.75);
}

#search #clear_search,
#search #send_search {
  display: none !important;
}

/* Force title replacement (hide any original text) */
.index .title h1 {
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  text-shadow: none !important;
  background: none !important;
}

.index .title h1::before {
  content: none !important;
}

.index .title h1::after {
  content: "Squatch Searx";
  display: inline-block;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: 2px;
  color: #f8fbff;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.75);
}

/* Remove default SearXNG logo background */
.title {
  background: none !important;
  min-height: 0 !important;
}
