:root {
  color-scheme: dark;
  --bg: #080a14;
  --panel: #0d1020;
  --panel-2: #111726;
  --line: rgba(255, 255, 255, 0.09);
  --fg: #f8fbff;
  --muted: #9ba5b8;
  --dim: #657088;
  --lime: #b6ff22;
  --lime-2: #83d61d;
  --blue: #91b7ff;
  --shadow: 0 26px 88px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at center 315px, rgba(164, 255, 47, 0.14), transparent 260px),
    radial-gradient(circle at center 330px, rgba(71, 113, 255, 0.12), transparent 360px),
    var(--bg);
  color: var(--fg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.35;
  text-rendering: optimizeLegibility;
}

a,
button {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  min-height: 56px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 20, 0.86);
  padding: 0 54px;
  backdrop-filter: blur(18px);
}

.logo,
.main-nav,
.tools {
  display: flex;
  align-items: center;
}

.logo {
  gap: 9px;
  text-decoration: none;
}

.logo span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  background: var(--lime);
  color: #071100;
  font-size: 14px;
  font-weight: 950;
}

.logo strong {
  font-size: 18px;
  font-weight: 920;
  letter-spacing: 0;
}

.main-nav {
  gap: 28px;
}

.main-nav a,
.tools button {
  border: 0;
  background: transparent;
  color: #cfd5e2;
  font-size: 14px;
  font-weight: 780;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.tools button:hover,
.tools button:focus-visible {
  color: var(--lime);
}

.tools {
  justify-content: flex-end;
  gap: 18px;
}

main {
  max-width: 1710px;
  margin: 0 auto;
  padding: 76px 64px 44px;
}

.finder {
  position: relative;
  display: grid;
  justify-items: center;
  margin: 0 auto 28px;
  overflow: hidden;
  padding: 4px 0 0;
  text-align: center;
}

.search-glow {
  position: absolute;
  top: 165px;
  width: min(900px, 78vw);
  height: 250px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(182, 255, 34, 0.15), transparent 54%),
    radial-gradient(circle, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: auto, 18px 18px;
  filter: blur(0.2px);
  opacity: 0.85;
  pointer-events: none;
}

.finder h1 {
  position: relative;
  max-width: 820px;
  margin: 0 0 24px;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 940;
  letter-spacing: 0;
  line-height: 1.12;
}

.search-box {
  position: relative;
  display: grid;
  width: min(900px, 100%);
  height: 60px;
  grid-template-columns: 48px 1fr 54px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-box:focus-within {
  border-color: rgba(182, 255, 34, 0.72);
  box-shadow: 0 0 0 4px rgba(182, 255, 34, 0.12), var(--shadow);
}

.search-icon {
  color: var(--muted);
  font-size: 30px;
  line-height: 1;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font-size: 16px;
  font-weight: 760;
}

.search-box input::placeholder {
  color: #858d9d;
}

.camera-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #c9d2e2;
  font-size: 25px;
}

.mode-row,
.stats {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.mode-row {
  margin-top: 30px;
}

.mode-row button {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #edf4ff;
  font-size: 13px;
  font-weight: 850;
  padding: 0 17px;
}

.mode-row button:hover,
.mode-row button:focus-visible {
  border-color: var(--lime);
  color: var(--lime);
}

.mode-row button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.stats {
  margin: 38px 0 22px;
}

.stats div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stats dt {
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 900;
}

.stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.matrix {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 26px 0 16px;
}

.matrix-label {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  min-height: 74px;
  color: var(--lime);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.grid-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(182, 255, 34, 0.45);
  border-radius: 9px;
  background: rgba(182, 255, 34, 0.12);
  color: var(--lime);
  font-size: 30px;
  line-height: 1;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 20px 18px;
}

.icon-card {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  text-align: center;
}

.icon-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #edf2ff;
  font-size: 30px;
  font-weight: 930;
  line-height: 1;
}

.brand-grid .icon-mark,
.agent-grid .icon-mark {
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--fg);
  font-size: 15px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.agent-grid .icon-mark {
  background: linear-gradient(135deg, var(--brand-color, #242b3c), rgba(255, 255, 255, 0.08));
}

.icon-card span:last-child {
  display: -webkit-box;
  overflow: hidden;
  width: 100%;
  color: #eef2ff;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.1;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.icon-card small {
  color: #68748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.icon-card:hover .icon-mark,
.icon-card:focus-visible .icon-mark {
  color: var(--lime);
  transform: translateY(-2px);
}

.results {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.results-head p {
  margin: 0;
  color: var(--fg);
  font-size: 18px;
  font-weight: 880;
}

.results-head button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  padding: 0 14px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.result-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  text-decoration: none;
}

.result-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #121827;
}

.result-info {
  display: grid;
  gap: 7px;
  padding: 11px;
}

.result-info strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 34px;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-info span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding-inline: 18px;
  }

  .main-nav {
    display: none;
  }

  .tools button:nth-child(n + 2) {
    display: none;
  }

  main {
    padding: 54px 18px 34px;
  }

  .matrix {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .matrix-label {
    display: flex;
    min-height: auto;
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .finder h1 {
    font-size: 34px;
  }

  .search-box {
    height: 56px;
    grid-template-columns: 42px 1fr 44px;
  }

  .icon-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 10px;
  }

  .icon-mark {
    width: 42px;
    height: 42px;
    font-size: 25px;
  }

  .icon-card span:last-child {
    font-size: 11px;
  }
}
