/* 黑猫工具 · IP 查询 —— 极简深浅色自适应 */
:root {
  --bg: #f6f7f9;
  --card-bg: #ffffff;
  --text: #1f2329;
  --text-dim: #8a919e;
  --border: #e8eaee;
  --accent: #1a73e8;
  --badge-bg: #e8f5ec;
  --badge-text: #1a9e4b;
  --btn-bg: #f0f2f5;
  --btn-text: #4a5058;
  --shadow: 0 1px 3px rgba(20, 30, 50, .06);
}
html[data-theme="dark"] {
  --bg: #14161a;
  --card-bg: #1d2026;
  --text: #e6e8eb;
  --text-dim: #7c838e;
  --border: #2c313a;
  --accent: #5b9bff;
  --badge-bg: #14301f;
  --badge-text: #4cd07d;
  --btn-bg: #2a2f37;
  --btn-text: #c3c9d1;
  --shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* 头部 */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo {
  background: var(--text); color: var(--card-bg);
  font-size: 12px; font-weight: 800; padding: 2px 6px; border-radius: 5px;
}
.theme-btn {
  border: 1px solid var(--border); background: var(--btn-bg); color: var(--btn-text);
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 16px; line-height: 1;
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }

/* 标题 */
.page-title { font-size: 24px; font-weight: 700; margin: 28px 0 4px; }
.page-sub { color: var(--text-dim); font-size: 13px; margin-bottom: 20px; }

/* 卡片 */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}
.card-head h2 { font-size: 15px; font-weight: 600; }
.badge {
  font-size: 12px; font-weight: 600;
  color: var(--badge-text); background: var(--badge-bg);
  padding: 2px 10px; border-radius: 20px;
}
.rows { list-style: none; }
.rows li {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
}
.rows li:last-child { border-bottom: none; }
.k { width: 92px; flex-shrink: 0; color: var(--text-dim); font-size: 13px; }
.v { flex: 1; word-break: break-all; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }
.small { font-size: 12px; color: var(--text-dim); }
.upper { text-transform: uppercase; }

.copy-btn {
  flex-shrink: 0;
  border: none; background: var(--btn-bg); color: var(--btn-text);
  font-size: 12px; padding: 3px 12px; border-radius: 20px; cursor: pointer;
  transition: all .15s;
}
.copy-btn:hover { background: var(--accent); color: #fff; }
.copy-btn.ok { background: var(--badge-text); color: #fff; }

.loading { text-align: center; color: var(--text-dim); padding: 40px 0; }
.error-box {
  background: #fdecea; color: #c0392b;
  border: 1px solid #f5c6c0; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 18px; font-size: 14px;
}
html[data-theme="dark"] .error-box { background: #3a1d1a; border-color: #5c2b25; color: #ff8a75; }

/* 页脚 */
.site-footer {
  text-align: center; color: var(--text-dim); font-size: 12px;
  padding: 30px 16px 40px;
}

@media (max-width: 560px) {
  .page-title { font-size: 20px; margin-top: 20px; }
  .k { width: 76px; }
  .rows li { padding: 10px 14px; }
}
