@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7SUc.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/fonts/L0x5DF4xlVMF-BfR8bXMIjhFq3-OXg.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/fonts/L0x5DF4xlVMF-BfR8bXMIjhLq38.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html { zoom: 1.2; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d1117;
  --surface: #0d1520;
  --border: #1a2a3a;
  --text: #e6edf3;
  --muted: #4a6a8a;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --success: #3fb950;
  --error: #f85149;
  --warn: #e3b341;
  --radius: 0;
  --mono: "Roboto Mono", monospace;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Logo ---- */

.logo {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  padding: 40px 0 32px;
  letter-spacing: .03em;
}

.cursor {
  display: inline-block;
  width: 11px;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

/* ---- Layout ---- */

main {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 32px 40px;
}

/* ---- Tabs ---- */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  justify-content: center;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  margin-bottom: -1px;
  transition: color .1s;
  letter-spacing: .02em;
}

.tab-btn::before { content: '[ '; }
.tab-btn::after  { content: ' ]'; }

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-btn.active::before { content: '> '; }
.tab-btn.active::after  { content: ''; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- Forms ---- */

form { display: flex; flex-direction: column; gap: 18px; max-width: 620px; margin: 0 auto; }

.field { display: flex; flex-direction: column; gap: 5px; }

label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .05em;
  font-family: var(--mono);
}

/* ---- Input wrap with $ prompt ---- */

.input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color .1s;
}

.input-wrap:focus-within { border-color: var(--accent); }

.input-wrap::before {
  content: '$';
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  padding: 9px 8px 9px 12px;
  flex-shrink: 0;
  user-select: none;
  line-height: 1;
}

.input-wrap input,
.input-wrap select {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  padding: 9px 12px 9px 6px;
  outline: none;
  width: 100%;
  min-width: 0;
}

.input-wrap input::placeholder { color: var(--muted); }

.input-wrap select {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 28px;
}

.input-wrap select option { background: #0d1520; }

/* ---- Select dropdown arrow ---- */

.select-wrap { position: relative; }

.select-wrap::after {
  content: '▾';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  pointer-events: none;
  font-size: 12px;
}

/* ---- Submit button ---- */

button[type="submit"] {
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 0;
  color: var(--accent);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 28px;
  transition: background .1s, color .1s;
  letter-spacing: .04em;
}

button[type="submit"]:hover {
  background: var(--accent);
  color: var(--bg);
}

button[type="submit"]:disabled { opacity: .4; cursor: not-allowed; }

/* ---- Results section ---- */

.results-section {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Status bar ---- */

.status-bar {
  font-size: 13px;
  font-family: var(--mono);
  color: var(--muted);
  margin-bottom: 12px;
  min-height: 20px;
}

.status-bar:not(:empty)::before { content: '$ '; color: var(--muted); }
.status-bar.busy { color: var(--warn); }
.status-bar.busy::before { color: var(--warn); }
.status-bar.ok   { color: var(--success); }
.status-bar.ok::before { color: var(--success); }
.status-bar.err  { color: var(--error); }
.status-bar.err::before { color: var(--error); }

/* ---- Action bar ---- */

.result-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.result-actions[hidden] { display: none; }

.action-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  transition: color .1s, border-color .1s;
  letter-spacing: .03em;
}

.action-btn:hover { color: var(--text); border-color: var(--muted); }
.action-btn.copied { color: var(--success); border-color: var(--success); }

#results { min-height: 40px; }

/* ---- DNS results ---- */

.record-group { margin-bottom: 22px; }

.record-type-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.type-badge {
  background: var(--accent);
  color: #0d1117;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 2px 7px;
  border-radius: 0;
}

.type-badge.type-aaaa  { background: #79b8ff; }
.type-badge.type-mx    { background: #56d364; }
.type-badge.type-txt   { background: #bc8cff; }
.type-badge.type-ns    { background: #e3b341; }
.type-badge.type-cname { background: #39d0d8; }
.type-badge.type-soa   { background: var(--muted); }
.type-badge.type-caa   { background: #f78166; }
.type-badge.type-ds    { background: #d2a8ff; }
.type-badge.type-ptr   { background: #79c0ff; }
.type-badge.type-srv   { background: #ffa657; }

.record-count { font-size: 12px; color: var(--muted); }

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--mono);
}

.result-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 7px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.result-table th:first-child { border-radius: 0; }
.result-table th:last-child  { border-radius: 0; }

.result-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 13px;
  vertical-align: top;
  word-break: break-all;
}

.result-table tr:last-child td { border-bottom: none; }
.result-table tr:hover td { background: rgba(88,166,255,.04); }

.result-table tbody {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
}

.ttl-cell  { color: var(--muted); white-space: nowrap; }
.val-cell  { color: var(--text); cursor: pointer; user-select: all; }
.val-cell:hover { color: var(--accent); }
.val-cell.val-copied { color: var(--green, #3fb950); }
.name-cell { color: var(--muted); }

.no-records { color: var(--muted); font-size: 13px; padding: 12px 0; font-family: var(--mono); }

/* ---- Probe cards ---- */

.probe-cards { display: flex; flex-direction: column; gap: 14px; }

.probe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
}

.probe-header {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(88,166,255,.04);
}

.probe-header::before {
  content: '>>';
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  flex-shrink: 0;
}

.probe-location { font-size: 13px; font-weight: 600; color: var(--accent); }
.probe-meta     { font-size: 12px; color: var(--muted); }
.probe-export-btn { margin-left: auto; font-size: 11px; padding: 3px 10px; }
.probe-body     { padding: 12px; }

/* Ping stats */
.ping-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.stat-item  { display: flex; flex-direction: column; gap: 1px; }
.stat-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-family: var(--mono); font-size: 17px; color: var(--text); }
.stat-value.loss-high { color: var(--error); }
.stat-value.loss-ok   { color: var(--success); }

.ping-rtts { display: flex; gap: 6px; flex-wrap: wrap; }

.rtt-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  color: var(--muted);
}

/* Hop table */
.hop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--mono);
}

.hop-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
}

.hop-table td {
  padding: 6px 12px;
  border-bottom: 1px solid rgba(30,46,30,.6);
  font-family: var(--mono);
  vertical-align: middle;
}

.hop-table tr:last-child td { border-bottom: none; }
.hop-table tr:hover td { background: rgba(88,166,255,.04); }

.hop-num  { color: var(--muted); width: 32px; text-align: right; }
.hop-host { color: var(--text); }
.hop-ip   { color: var(--muted); }
.hop-rtt  { color: var(--accent); white-space: nowrap; text-align: right; }
.hop-star { color: var(--muted); }

/* ---- IP Lookup ---- */

.ip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  max-width: 620px;
  margin: 0 auto;
}

.ip-address {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.ip-address::before {
  content: '$ ';
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
}

.ip-section {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
}

.ip-section:last-child { border-bottom: none; }

.ip-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 4px 0;
}

.ip-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  min-width: 110px;
  flex-shrink: 0;
}

.ip-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
}


/* ---- Responsive ---- */

@media (max-width: 600px) {
  .logo { font-size: 14px; padding: 28px 16px 22px; }
  main { padding: 0 16px 24px; }
  .tab-btn { padding: 8px 10px; font-size: 12px; }
  .ping-stats { gap: 16px; }
}
