/* IP 详情页样式 */

.ipd-search-card .card-body { background: #fff; }

/* 主信息卡片 */
.ipd-hero-card { overflow: visible; }
.ipd-hero-card .card-body { padding: 28px 28px 24px; }

.ipd-ip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.ipd-ip {
  font-family: ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
  word-break: break-all;
}
.ipd-ver-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.ipd-manual-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 600;
}

.ipd-location {
  font-size: 18px;
  font-weight: 500;
  color: #334155;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line2, #e7edf5);
}

.ipd-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
@media (max-width: 600px) {
  .ipd-meta-grid { grid-template-columns: 1fr 1fr; }
}

.ipd-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ipd-meta-label {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 500;
}
.ipd-meta-val {
  font-size: 14px;
  color: #0f172a;
  font-weight: 500;
  word-break: break-all;
}

/* 快捷工具按钮 */
.ipd-tools-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 20px !important;
}
.ipd-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #d0d9e5;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.ipd-tool-btn:hover {
  background: #eef2ff;
  border-color: var(--blue, #4b82ff);
  color: var(--blue, #4b82ff);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(75,130,255,0.12);
}
.ipd-tool-btn svg { opacity: 0.6; transition: opacity 0.15s; }
.ipd-tool-btn:hover svg { opacity: 1; }

.ipd-tool-correct {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}
.ipd-tool-correct:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #78350f;
}

/* 纠正历史 */
.ipd-corrections { padding: 0; }
.ipd-corr-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line2, #e7edf5);
}
.ipd-corr-item:last-child { border-bottom: none; }

.ipd-corr-row1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.ipd-corr-detail {
  font-size: 13px;
  line-height: 1.6;
}

.ipd-corr-time {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

/* 复用 ip-correct.css 的状态样式 */
.ipc-range {
  font-family: ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 14px;
  color: #0f172a;
  font-weight: 500;
  word-break: break-all;
}
.ipc-status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ipc-status.s-pending { background: #fef3c7; color: #92400e; }
.ipc-status.s-ok      { background: #dcfce7; color: #15803d; }
.ipc-status.s-no      { background: #fee2e2; color: #b91c1c; }

/* 免责声明 */
.ipd-disclaimer {
  margin-top: 8px;
  padding: 14px 20px;
  background: #f8fafc;
  border: 1px solid var(--line2, #e7edf5);
  border-radius: 8px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.6;
}
.ipd-disclaimer a {
  color: var(--blue, #4b82ff);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}
.ipd-disclaimer a:hover { text-decoration-style: solid; }

/* 空状态：统计行 */
.ipd-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.ipd-stat-card {
  background: var(--card, #fff);
  border: 1px solid #d5dce8;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.ipd-stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--blue, #4b82ff);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.ipd-stat-label {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

/* 空状态：双列布局 */
.ipd-home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* 热门 IP 列表 */
.ipd-hot-list { padding: 0; }
.ipd-hot-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line2, #e7edf5);
  text-decoration: none;
  transition: background 0.12s;
}
.ipd-hot-item:last-child { border-bottom: none; }
.ipd-hot-item:hover { background: #f8fafc; }
.ipd-hot-ip {
  font-family: ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--blue, #4b82ff);
  font-weight: 500;
}
.ipd-hot-loc {
  font-size: 12px;
  color: #64748b;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 纠正记录 link 样式 */
.ipd-corr-link {
  display: block;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line2, #e7edf5);
  text-decoration: none;
  transition: background 0.12s;
}
.ipd-corr-link:last-child { border-bottom: none; }
.ipd-corr-link:hover { background: #f8fafc; }

@media (max-width: 700px) {
  .ipd-stat-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .ipd-stat-card { padding: 14px 10px; }
  .ipd-stat-num { font-size: 22px; }
  .ipd-home-grid { grid-template-columns: 1fr; }
}

/* 响应式 */
@media (max-width: 600px) {
  .ipd-hero-card .card-body { padding: 20px 16px; }
  .ipd-ip { font-size: 20px; }
  .ipd-location { font-size: 15px; }
  .ipd-tools-grid { gap: 8px; }
  .ipd-tool-btn { padding: 6px 12px; font-size: 12px; }
}

/* 骨架屏动画 */
.ipd-skeleton {
  display: inline-block;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e7edf5 25%, #f0f4f8 50%, #e7edf5 75%);
  background-size: 200% 100%;
  animation: ipd-shimmer 1.5s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes ipd-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
