/* Fur Missile Labs skin for SearXNG. Keep this as an overlay on top of the stock simple theme. */
:root {
  --fml-bg: #050604;
  --fml-panel: rgba(15, 18, 12, 0.78);
  --fml-panel-strong: rgba(20, 22, 15, 0.92);
  --fml-border: rgba(202, 164, 101, 0.34);
  --fml-border-olive: rgba(111, 118, 80, 0.48);
  --fml-text: #f3efe4;
  --fml-muted: #b7ad97;
  --fml-gold: #caa465;
  --fml-amber: #e59b24;
  --fml-olive: #6f7650;
  --color-base-font: var(--fml-text);
  --color-base-background: var(--fml-bg);
  --color-url-font: #d6b36f;
  --color-result-link-font: #f4c978;
  --color-result-vim-arrow: var(--fml-amber);
  --color-search-background: rgba(5, 6, 4, 0.84);
  --color-search-border: var(--fml-border);
  --color-search-shadow: 0 24px 90px rgba(0, 0, 0, 0.55);
  --color-btn-background: linear-gradient(135deg, #7d6b3f, #caa465);
  --color-btn-font: #080906;
}

html,
body {
  min-height: 100%;
  color: var(--fml-text);
  background:
    radial-gradient(circle at 18% 18%, rgba(202, 164, 101, 0.18), transparent 34rem),
    radial-gradient(circle at 82% 8%, rgba(111, 118, 80, 0.22), transparent 32rem),
    linear-gradient(135deg, rgba(5, 6, 4, 0.98), rgba(11, 13, 9, 0.98));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(202, 164, 101, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(202, 164, 101, 0.035) 1px, transparent 1px),
    radial-gradient(circle at center, transparent 0 46%, rgba(111, 118, 80, 0.08) 47%, transparent 48%);
  background-size: 46px 46px, 46px 46px, 760px 760px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.95), rgba(0,0,0,0.35));
}

body::after {
  content: "FUR MISSILE LABS // PRIVACY SEARCH";
  position: fixed;
  right: 1.2rem;
  bottom: 0.9rem;
  z-index: -1;
  color: rgba(202, 164, 101, 0.13);
  font-size: clamp(0.72rem, 1.7vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  pointer-events: none;
}

a,
a:visited {
  color: #f0c978;
}

a:hover {
  color: #ffd891;
}

#links_on_top {
  top: 1rem;
  right: 1rem;
}

#links_on_top a {
  color: var(--fml-muted);
  background: rgba(5, 6, 4, 0.48);
  border: 1px solid rgba(202, 164, 101, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

#links_on_top a:hover {
  color: var(--fml-text);
  border-color: rgba(202, 164, 101, 0.45);
}

.fml-index-brand {
  width: min(520px, 82vw);
  margin: 0 auto 1.65rem;
  display: grid;
  place-items: center;
  gap: 0.65rem;
  text-align: center;
}

.fml-index-brand img.fml-wordmark {
  width: min(460px, 78vw);
  height: auto;
  filter: drop-shadow(0 18px 34px rgba(0,0,0,0.62));
}

.fml-index-brand .fml-tagline,
.fml-results-tagline {
  color: var(--fml-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  line-height: 1.45;
  text-transform: uppercase;
}

.index .title {
  display: none;
}

.index {
  border: 1px solid var(--fml-border);
  background: linear-gradient(180deg, rgba(12, 14, 9, 0.58), rgba(5, 6, 4, 0.16));
  border-radius: 30px;
  padding: clamp(1.4rem, 4vw, 3rem);
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(14px);
}

#search_header,
.search_filters,
#categories,
#urls article,
.result,
.infobox,
.suggestion_item,
.dialog-error,
#preferences,
#stats,
#backToTop {
  border-color: var(--fml-border) !important;
}

#search_view .search_box,
.search_box {
  background: rgba(7, 8, 5, 0.9);
  border: 1px solid var(--fml-border);
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.045);
  overflow: hidden;
}

#q {
  color: var(--fml-text) !important;
  background: transparent !important;
}

#q::placeholder {
  color: rgba(183, 173, 151, 0.72);
}

#send_search,
#clear_search {
  color: #080906;
  background: linear-gradient(135deg, #7d6b3f, var(--fml-gold));
}

#clear_search {
  background: transparent;
  color: var(--fml-muted);
}

#search_logo {
  display: flex !important;
  align-items: center;
  gap: 0.7rem;
}

#search_logo::before,
.fml-header-brand::before {
  content: "";
  display: inline-block;
  width: 2.45rem;
  height: 2.45rem;
  background: url("./badge.png") center / contain no-repeat;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.5));
}

#search_logo svg {
  display: none;
}

#search_logo::after {
  content: "Fur Missile Labs";
  color: var(--fml-text);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.fml-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--fml-text);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fml-header-brand img {
  width: min(230px, 44vw);
  height: auto;
  object-fit: contain;
}

.page_with_header > header,
#main_results > header,
main.page_with_header > a:first-of-type {
  display: inline-flex;
  align-items: center;
  margin: 1rem 0 0 1rem;
}

#categories,
.search_filters,
#urls article,
.result,
.infobox,
#sidebar_results > div,
#search_url,
#preferences,
#stats {
  background: var(--fml-panel);
  border: 1px solid var(--fml-border);
  border-radius: 20px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(12px);
}

#categories label,
.search_filters select,
.search_filters button,
#preferences select,
#preferences input,
#preferences button {
  background-color: rgba(5, 6, 4, 0.72);
  color: var(--fml-text);
  border-color: var(--fml-border-olive);
}

#categories input[type="checkbox"]:checked + label,
#categories label:hover {
  color: #080906;
  background: linear-gradient(135deg, #a27f45, #e0b76d);
  border-color: rgba(255, 216, 145, 0.6);
}

.result h3 a,
.result_header a,
#urls h3 a {
  color: #f4c978 !important;
}

.result .content,
.result-content,
#urls article,
#urls p,
#urls span,
#urls time,
footer {
  color: var(--fml-muted);
}

footer {
  border-top: 1px solid rgba(202, 164, 101, 0.12);
  background: rgba(5, 6, 4, 0.36);
  backdrop-filter: blur(10px);
}

code,
pre,
.url_wrapper,
.result_url {
  color: #d6b36f !important;
}

@media (max-width: 700px) {
  .index {
    border-radius: 22px;
    padding: 1.1rem;
  }

  #search_logo::after {
    content: "FML Search";
  }

  body::after {
    display: none;
  }
}

/* Public tune: result page readability and branded states. */
#main_results,
.results_endpoint main {
  max-width: 1180px;
}

.results_endpoint #search_header {
  margin: 0.9rem auto 1rem;
  padding: 0.75rem;
  background: rgba(5, 6, 4, 0.72);
  border: 1px solid rgba(202, 164, 101, 0.22);
  border-radius: 24px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.36);
}

.results_endpoint #search_view .search_box {
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  min-height: 3.1rem;
  margin-inline: auto;
}

#urls article,
.result {
  margin-block: 0.95rem;
  padding: 1rem 1.1rem;
  transition: border-color 160ms ease, transform 160ms ease, background-color 160ms ease;
}

#urls article:hover,
.result:hover {
  transform: translateY(-1px);
  border-color: rgba(229, 155, 36, 0.5) !important;
  background: rgba(18, 20, 13, 0.9);
}

#urls .result_header,
.result_header {
  border-bottom: 1px solid rgba(202, 164, 101, 0.13);
  padding-bottom: 0.35rem;
}

#urls .result-content,
#urls .content,
.result-content,
.result .content {
  line-height: 1.55;
}

.engines,
.result .engine,
#urls .engine {
  color: rgba(243, 239, 228, 0.72) !important;
  background: rgba(111, 118, 80, 0.18);
  border: 1px solid rgba(111, 118, 80, 0.28);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}

.fml-no-results,
.dialog-error-block.fml-no-results {
  max-width: 760px;
  margin: 2rem auto;
  padding: 1.25rem 1.4rem;
  color: var(--fml-text);
  background: linear-gradient(180deg, rgba(20, 22, 15, 0.88), rgba(5, 6, 4, 0.82));
  border: 1px solid rgba(229, 155, 36, 0.42);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.fml-no-results strong {
  color: #f4c978;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .results_endpoint #search_header {
    border-radius: 18px;
  }

  #urls article,
  .result {
    padding: 0.85rem;
  }
}

/* Results-page layout fix: center the page and keep the compact brand out of the search input. */
.results_endpoint #main_results,
.results_endpoint main {
  max-width: none !important;
}

.results_endpoint #search,
.results_endpoint #results {
  width: min(1180px, calc(100vw - 2rem));
  margin-inline: auto !important;
}

.results_endpoint #search_header {
  position: relative;
  width: 100%;
  display: grid !important;
  grid-template-columns: 1fr;
  grid-template-areas:
    "search"
    "categories";
  gap: 0.72rem;
  align-items: center;
  justify-items: center;
}

.results_endpoint #search_logo {
  position: absolute;
  top: 0.78rem;
  left: max(0.75rem, calc(50% - 25rem));
  width: 2.8rem !important;
  height: 2.8rem;
  min-width: 2.8rem;
  margin: 0 !important;
  padding: 0 !important;
  justify-content: center;
  overflow: visible !important;
}

.results_endpoint #search_logo::before {
  width: 2.25rem;
  height: 2.25rem;
}

.results_endpoint #search_logo::after {
  content: none !important;
}

.results_endpoint #search_view {
  grid-area: search;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
  width: min(680px, calc(100vw - 8rem));
  min-width: 0;
  margin-inline: auto;
  padding-inline: 0 !important;
}

.results_endpoint #categories {
  grid-area: categories;
  width: min(1050px, calc(100vw - 4rem));
  margin-inline: auto;
  overflow-x: auto;
}

.results_endpoint .search_filters {
  width: min(1050px, calc(100vw - 4rem));
  max-width: none;
  margin-inline: auto !important;
  margin-bottom: 1.75rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.results_endpoint #results {
  display: grid !important;
  grid-template-columns: minmax(0, 680px) minmax(260px, 360px);
  grid-template-areas: "urls sidebar";
  gap: 1.8rem;
  justify-content: center;
  align-items: start;
}

.results_endpoint #urls {
  grid-area: urls;
  min-width: 0;
}

.results_endpoint #sidebar {
  grid-area: sidebar;
  min-width: 0;
}

.results_endpoint #pagination,
.results_endpoint #backToTop {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .results_endpoint #results {
    display: block !important;
  }
}

@media (max-width: 760px) {
  .results_endpoint #search,
  .results_endpoint #results,
  .results_endpoint .search_filters {
    width: min(100vw - 1rem, 100%);
  }

  .results_endpoint #search_header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "search"
      "categories";
  }

  .results_endpoint #search_logo {
    display: none !important;
  }
}
