:root {
  --nwl-accent: #b48bff;
  --nwl-fg: #eef1ff;
  --nwl-muted: rgba(238, 241, 255, 0.62);
  --nwl-bg: #0e1228;
  --nwl-card: rgba(255, 255, 255, 0.04);
  --nwl-edge: rgba(255, 255, 255, 0.14);
  --nwl-bar: rgba(255, 255, 255, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--nwl-fg);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(180, 139, 255, 0.18), transparent 60%),
    var(--nwl-bg);
  min-height: 100vh;
  line-height: 1.55;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 16px 64px;
}

.head { text-align: center; margin-bottom: 28px; }
.logo { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em; }
.tag { color: var(--nwl-muted); margin: 10px auto 0; max-width: 46ch; }

.card {
  background: var(--nwl-card);
  border: 1px solid var(--nwl-edge);
  border-radius: 16px;
  padding: 22px;
  margin: 16px 0;
}

.card h2 { margin: 0 0 12px; font-size: 1.2rem; }
.card h3 { margin: 20px 0 8px; font-size: 1rem; color: var(--nwl-muted); }
.card p { margin: 0 0 12px; }

form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#ip {
  flex: 1 1 220px;
  min-width: 0;
  padding: 12px 14px;
  font: inherit;
  color: var(--nwl-fg);
  background: var(--nwl-bar);
  border: 1px solid var(--nwl-edge);
  border-radius: 10px;
}

#ip:focus { outline: 2px solid var(--nwl-accent); outline-offset: 1px; }

button {
  padding: 12px 20px;
  font: inherit;
  font-weight: 700;
  color: #1a1030;
  background: var(--nwl-accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

button:hover { filter: brightness(1.08); }

.hint { color: var(--nwl-muted); font-size: 0.9rem; margin: 10px 0 14px; }

.result {
  margin-top: 4px;
  border: 1px solid var(--nwl-edge);
  border-radius: 12px;
  overflow: hidden;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px;
  border-bottom: 1px solid var(--nwl-bar);
  background: var(--nwl-bar);
}

.result-head .ip {
  font-weight: 800;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #58e08a;
  box-shadow: 0 0 0 3px rgba(88, 224, 138, 0.18);
}

.toggle {
  display: inline-flex;
  border: 1px solid var(--nwl-edge);
  border-radius: 9px;
  overflow: hidden;
}

.toggle button {
  padding: 7px 14px;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--nwl-muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.toggle button.on { color: #1a1030; background: var(--nwl-accent); }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--nwl-bar);
}

.grid .f {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  background: var(--nwl-bg);
}

.grid .k { color: var(--nwl-muted); font-size: 0.82rem; }
.grid .v { font-weight: 700; word-break: break-word; }

.more {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  font: inherit;
  color: var(--nwl-muted);
  background: transparent;
  border: 0;
  border-top: 1px solid var(--nwl-bar);
  cursor: pointer;
}

.more::after { content: " ▾"; }
.more.open::after { content: " ▴"; }

.more-grid { border-top: 1px solid var(--nwl-bar); }

.result-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--nwl-bar);
}

.result-foot .copy {
  padding: 8px 14px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--nwl-fg);
  background: var(--nwl-bar);
  border: 1px solid var(--nwl-edge);
  border-radius: 8px;
  cursor: pointer;
}

.result-foot .src { color: var(--nwl-muted); font-size: 0.82rem; }

.result .empty { padding: 16px 14px; color: var(--nwl-muted); }

@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
}

pre {
  background: #090c1c;
  border: 1px solid var(--nwl-edge);
  border-radius: 10px;
  padding: 14px;
  overflow-x: auto;
  margin: 0 0 4px;
}

code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.88rem; }

.credit ul { margin: 0 0 12px; padding-left: 20px; }
.credit li { margin: 6px 0; }
.fine { color: var(--nwl-muted); font-size: 0.9rem; }

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

.foot {
  text-align: center;
  color: var(--nwl-muted);
  margin-top: 28px;
  font-size: 0.9rem;
}
