:root {
  color-scheme: dark;
  --bg: #070b12;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-2: rgba(17, 28, 50, 0.9);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #38bdf8;
  --accent-2: #22c55e;
  --danger: #fb7185;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.1), transparent 28rem),
    var(--bg);
}

.site-nav {
  position: sticky;
  top: 14px;
  z-index: 100;
  width: min(1080px, calc(100% - 40px));
  margin: 18px auto 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.brand {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
  color: var(--text);
}

.wrap {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 68px;
}

.hero {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(7, 11, 18, 0.72));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.badge {
  width: fit-content;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.sub {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.search-card {
  position: sticky;
  top: 86px;
  z-index: 10;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.84);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px auto;
  gap: 12px;
}

.radar-filters {
  grid-template-columns: repeat(6, minmax(130px, 1fr)) auto;
  align-items: center;
}

input,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 16px;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  outline: none;
}

select {
  cursor: pointer;
  color-scheme: dark;
  appearance: auto;
}

input:focus,
select:focus {
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

button {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  padding: 0 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04111f;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
button:disabled { opacity: 0.55; cursor: not-allowed; }
button.secondary {
  width: 100%;
  margin-top: 16px;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
}

.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  min-height: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.radar-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.64);
}
.stat strong {
  display: block;
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.1;
}
.stat span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.status { min-height: 24px; margin: 18px 0; color: var(--muted); line-height: 1.5; }
.status.ok { color: #86efac; }
.status.error { color: var(--danger); }

.group {
  margin: 14px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
}
.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.group-head h2 { margin: 0; min-width: 0; font-size: 16px; line-height: 1.3; }
.count { flex: 0 0 auto; color: var(--muted); font-size: 13px; }

.group-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.64);
}
.card > div { min-width: 0; }
.card p { margin: 6px 0 0; color: var(--muted); }
.domain { color: #dbeafe; font-weight: 800; text-decoration: none; overflow-wrap: anywhere; }
.whois { flex: 0 0 auto; color: var(--accent); text-decoration: none; white-space: nowrap; }

.table-wrap { width: 100%; overflow-x: auto; }
.radar-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 14px;
}
.radar-table th,
.radar-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.radar-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(17, 28, 50, 0.96);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.radar-table tr:hover td { background: rgba(56, 189, 248, 0.06); }
.samples { min-width: 230px; }
.sample-domain,
.sample-title {
  display: inline-block;
  max-width: 260px;
  margin: 0 6px 6px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #dbeafe;
}
.actions { min-width: 220px; }
.mini-link,
.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 6px 6px 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.mini-link:hover,
.mini-btn:hover {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.12);
}
footer { margin-top: 40px; color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .site-nav { border-radius: 24px; align-items: flex-start; flex-direction: column; }
  .nav-links { width: 100%; justify-content: flex-start; }
  .search-row,
  .radar-filters { grid-template-columns: 1fr; }
  .meta,
  .radar-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-card { position: static; }
  .group-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .site-nav,
  .wrap { width: min(100% - 24px, 1080px); }
  .wrap { padding-top: 28px; }
  .hero { padding: 22px; }
  .meta,
  .radar-summary { grid-template-columns: 1fr; }
  .nav-links a { flex: 1 1 auto; }
  .group-list { grid-template-columns: 1fr; padding: 10px; }
}
