*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg: #f6f7f9;
  --bg-grad: radial-gradient(1200px 600px at 50% -10%, rgba(91,108,255,0.10), transparent 60%);
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --text: #0f1320;
  --text-muted: #6b7280;
  --border: rgba(15,19,32,0.08);
  --accent: #5b6cff;
  --accent-soft: rgba(91,108,255,0.10);
  --shadow: 0 1px 2px rgba(15,19,32,0.04), 0 8px 24px rgba(15,19,32,0.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0c12;
    --bg-grad: radial-gradient(1200px 600px at 50% -10%, rgba(124,140,255,0.18), transparent 60%);
    --surface: #12151d;
    --surface-2: #161a23;
    --text: #e8eaed;
    --text-muted: #8a8f99;
    --border: rgba(255,255,255,0.08);
    --accent: #8a9bff;
    --accent-soft: rgba(138,155,255,0.14);
    --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 12px 32px rgba(0,0,0,0.35);
  }
}
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--bg-grad), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 56px 20px 40px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  margin-bottom: 28px;
}
.brand .logo {
  width: 32px;
  height: 32px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
}
.brand .logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.brand .name { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.brand .name .lite { color: var(--text-muted); font-weight: 400; margin-left: 4px; }

.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 24px 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.hero .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.hero .ip {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  word-break: break-all;
}
.hero .meta {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hero .flag { font-size: 20px; line-height: 1; }

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}
.section h3 {
  margin: 0;
  padding: 14px 20px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 20px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.row .k { color: var(--text-muted); flex-shrink: 0; }
.row .v {
  color: var(--text);
  text-align: right;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}
.row .v.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent);
}
.badge.muted { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

footer {
  text-align: center;
  margin-top: 28px;
  color: var(--text-muted);
  font-size: 13px;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

button {
  font: inherit;
}

.ip-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.icon-button,
#refresh-button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
}

.icon-button {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
}

.icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#refresh-button {
  min-height: 30px;
  margin-left: 8px;
  padding: 0 12px;
}

button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.is-hidden {
  display: none;
}

@media (max-width: 560px) {
  .wrap {
    padding: 32px 14px 28px;
  }

  .hero {
    padding: 20px 18px 18px;
  }

  .row {
    align-items: flex-start;
    gap: 12px;
    padding: 11px 16px;
  }

  .section h3 {
    padding-left: 16px;
    padding-right: 16px;
  }

  footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  #refresh-button {
    margin-left: 0;
  }
}
