:root {
  --bg: #0b1020;
  --card: #141b2e;
  --card-brd: #263049;
  --text: #eef2fb;
  --muted: #9aa6c2;
  --accent: #6ea8fe;
  --accent-2: #7ef0c0;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: #0b1020;
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background-image:
    radial-gradient(900px 500px at 50% -12%, rgba(110,168,254,0.18), transparent 60%),
    radial-gradient(700px 400px at 90% 10%, rgba(126,240,192,0.10), transparent 55%);
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .sub {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
  background-color: var(--card);
  border: 1px solid var(--card-brd);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

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

.card-head h2 {
  font-size: 18px;
  margin: 0;
  letter-spacing: -0.01em;
}

.badge {
  font-size: 12px;
  color: var(--accent-2);
  background: rgba(126,240,192,0.12);
  border: 1px solid rgba(126,240,192,0.3);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.ip-hero {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: rgba(110,168,254,0.08);
  border: 1px solid rgba(110,168,254,0.25);
}

.ip-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.ip-value {
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 0;
  background: var(--card-brd);
  border: 1px solid var(--card-brd);
  border-radius: 12px;
  overflow: hidden;
}

.row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: var(--card);
  min-width: 0;
}

.row dt {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.row dd {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  word-break: break-word;
}

.ua-block {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ua-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ua {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  padding: 12px 14px;
  border-radius: 10px;
  background: #0d1424;
  border: 1px solid var(--card-brd);
  color: var(--accent);
  word-break: break-all;
  white-space: pre-wrap;
}

.badge-optional {
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.14);
}

.fam-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  background: rgba(126,240,192,0.14);
  border: 1px solid rgba(126,240,192,0.32);
  padding: 1px 8px;
  border-radius: 999px;
  vertical-align: middle;
}

.map-box {
  margin-top: 16px;
  border: 1px solid var(--card-brd);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.map-canvas {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: #0d1424;
}

.map-canvas img {
  position: absolute;
  display: block;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.map-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: #2b7fff;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.5);
  z-index: 2;
}

.map-attr {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  font-size: 11px;
  color: #1a1a1a;
  background: rgba(255,255,255,0.78);
  padding: 1px 7px;
  border-top-left-radius: 8px;
}

.note {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 16px;
  line-height: 1.55;
}

.note strong { color: var(--text); font-weight: 600; }

.btn {
  appearance: none;
  border: 1px solid rgba(110,168,254,0.5);
  background: rgba(110,168,254,0.14);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.btn:hover { background: rgba(110,168,254,0.24); border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; }

.geo-status {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--accent-2);
}

#geo-grid { margin-top: 16px; }

.geo-map { margin: 14px 0 0; }

.maplink {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.maplink:hover { text-decoration: underline; }

.foot {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.foot code, .sub code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(255,255,255,0.06);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 0.92em;
}

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