/* 跨境电商环境检测 - 视觉风格：深色专业 + 动态滚动 */

/* 浅色页面底 + 多色光晕 + 暗点纹理，让 .ed-app 深色卡片"漂浮"在浅色背景上 */
html, body {
  background: #eef1f5;
  color: #000;
}
body {
  background-color: #eef1f5;
  background-image:
    radial-gradient(at 18% 12%, rgba(88, 166, 255, 0.28) 0, transparent 45%),
    radial-gradient(at 85% 8%,  rgba(210, 168, 255, 0.24) 0, transparent 50%),
    radial-gradient(at 78% 88%, rgba(46, 204, 113, 0.20) 0, transparent 45%),
    radial-gradient(at 12% 92%, rgba(241, 196, 15, 0.18) 0, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
}
/* 暗点纹理：圆点而非网格，浅色底上更精致 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(20, 30, 50, 0.08) 1px, transparent 1.5px);
  background-size: 22px 22px;
}
/* 慢速漂移光团：给静态光晕加一层 30s 呼吸的动效，PC 上更生动 */
body::after {
  content: '';
  position: fixed;
  inset: -25%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(88, 166, 255, 0.18) 0, transparent 35%),
    radial-gradient(circle at 70% 70%, rgba(210, 168, 255, 0.15) 0, transparent 35%),
    radial-gradient(circle at 80% 25%, rgba(46, 204, 113, 0.12) 0, transparent 35%);
  animation: ed-bg-drift 30s ease-in-out infinite;
  filter: blur(20px);
}
@keyframes ed-bg-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-30px, 20px) scale(1.03); }
  66%      { transform: translate(25px, -15px) scale(0.98); }
}

.ed-app {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  color: #e6edf3;
  background: linear-gradient(180deg, #0d1117 0%, #161b22 100%);
  min-height: calc(100vh - 200px);
  padding: 20px;
  margin: 16px auto;
  max-width: 1400px;
  border-radius: 12px;
  box-shadow:
    0 20px 60px rgba(20, 30, 50, 0.18),
    0 8px 24px rgba(20, 30, 50, 0.10),
    0 0 0 1px rgba(88, 166, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  z-index: 1;
  --green: #2ecc71;
  --yellow: #f1c40f;
  --red: #e74c3c;
  --critical: #c0392b;
  --info: #58a6ff;
  --pulse: #58a6ff;
  --bg-card: #161b22;
  --bg-card-hover: #1c232b;
  --border: #30363d;
}

/* ============================================================ 状态条 */

.ed-statusbar {
  background: linear-gradient(90deg, #161b22 0%, #1c232b 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.ed-statusbar-inner {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  gap: 20px;
}

.ed-status-text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.ed-status-text strong { font-size: 15px; }

.ed-status-detail {
  color: #8b949e;
  font-size: 13px;
  margin-left: 6px;
}

.ed-status-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-size: 14px;
  font-weight: bold;
}
.ed-status-icon.running {
  background: var(--info);
  color: #fff;
  animation: ed-spin 1s linear infinite;
}
.ed-status-icon.done   { background: var(--green); color: #fff; }
.ed-status-icon.error  { background: var(--red);   color: #fff; }

.ed-progress {
  flex: 1;
  position: relative;
  height: 8px;
  background: #21262d;
  border-radius: 4px;
  overflow: hidden;
}
.ed-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #58a6ff, #2ecc71);
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.ed-progress-bar::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; width: 30px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
  animation: ed-shine 1.5s linear infinite;
}
.ed-progress-pct {
  position: absolute;
  right: 8px;
  top: -22px;
  font-size: 11px;
  color: #8b949e;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* Ticker — 实时滚动检测日志 */
.ed-ticker {
  background: #0a0e13;
  border-top: 1px solid var(--border);
  padding: 0;
  height: 90px;
  overflow-y: auto;
  overscroll-behavior: contain;
  position: relative;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
}
.ed-ticker::-webkit-scrollbar { width: 6px; }
.ed-ticker::-webkit-scrollbar-thumb { background: #21262d; border-radius: 3px; }
.ed-ticker::-webkit-scrollbar-thumb:hover { background: #30363d; }
.ed-ticker-track {
  display: flex;
  flex-direction: column-reverse;
  padding: 6px 14px;
}
.ed-ticker-line {
  display: flex;
  gap: 10px;
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ed-ticker-time { color: #6e7681; flex: 0 0 60px; }
.ed-ticker-tag  { color: #d29922; flex: 0 0 100px; }
.ed-ticker-msg  { color: #c9d1d9; flex: 1; overflow: hidden; text-overflow: ellipsis; }

.ed-ticker-line.ok   .ed-ticker-tag { color: var(--green); }
.ed-ticker-line.warn .ed-ticker-tag { color: var(--yellow); }
.ed-ticker-line.fail .ed-ticker-tag { color: var(--red); }

.ed-ticker-fade-enter-active { transition: all 0.3s ease-out; }
.ed-ticker-fade-leave-active { transition: all 0.3s ease-in; }
.ed-ticker-fade-enter-from   { opacity: 0; transform: translateY(-10px); }
.ed-ticker-fade-leave-to     { opacity: 0; }

/* ============================================================ 主区 */

.ed-main {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
}

.ed-side { display: flex; flex-direction: column; gap: 16px; }
.ed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; align-content: flex-start; }

/* ============================================================ IPv4 / IPv6 专属卡片 */
.ed-cat-ipv4 { border-left: 3px solid #58a6ff; }
.ed-cat-ipv6 { border-left: 3px solid #d2a8ff; }
.ed-ipcard-body { padding: 4px 0; }
.ed-ipcard-pending,
.ed-ipcard-none {
  padding: 18px 20px;
  color: #6e7681;
  font-size: 13px;
  text-align: center;
}

.ed-ipline {
  display: flex;
  padding: 8px 14px;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(48, 54, 61, 0.4);
  align-items: flex-start;
  gap: 12px;
  line-height: 1.5;
}
.ed-ipline:last-child { border-bottom: none; }
.ed-ipline-name {
  flex: 0 0 80px;
  color: #8b949e;
  font-size: 12px;
}
.ed-ipline-content {
  flex: 1;
  color: #c9d1d9;
  word-break: break-all;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.ed-ipline-content a { color: #58a6ff; text-decoration: none; }
.ed-ipline-content a:hover { text-decoration: underline; }
.ed-ipline-domain { color: #6e7681; font-size: 11.5px; }

.ed-ipline-ip .ed-ipline-name { color: #c9d1d9; font-weight: 600; }
.ed-ipline-ipval {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 14px;
  color: #c9d1d9;
}
.ed-ipline-flag {
  width: 16px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}

/* ASN/orgtype 小标签 */
.ed-ip-tag {
  display: inline-block;
  color: white;
  border-radius: 3px;
  margin-right: 3px;
  display: inline-block;
  cursor: default;
  padding: 1px 8px;
  transform: scale(0.7);
  font-size: 12px;
  text-align: center;
}
.ed-ip-tag-idc { background: #ff7b72; }
.ed-ip-tag-isp { background: #2ea043; }
.ed-ip-tag-bus { background: #82a282; }
.ed-ip-tag-gov { background: #32cd32; }
.ed-ip-tag-edu { background: #2ea043; }

/* 大彩色 label —— 对齐 check.css */
.ed-ip-label {
  display: inline-block;
  padding: 2.5px 13px;
  font-size: 10px;
  color: #fff;
  border-radius: 3px;
  margin-right: 3px;
  cursor: default;
}
.ed-ip-label-green  { background: #2ea043; }
.ed-ip-label-orange { background: lightcoral; }
.ed-ip-label-red    { background: red; }
.ed-ip-label-lightgreen { background: #2ea043; }
.ed-ip-label-yellow { background: orange; }

/* 风控值 riskbar —— 对齐 check.css */
.ed-riskbar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4px 0;
}
.ed-riskitem {
  width: 12px;
  height: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 12px;
}
.ed-riskitem-current {
  width: 138px;
  height: 20px;
  border-radius: 3px;
  padding: 0 10px;
  margin: 0 5px;
  cursor: default;
}
.ed-riskitem .value { }
.ed-riskitem-current .lab { margin-left: 10px; }

/* 共享人数 */
.ed-usecount-bar {
  display: inline-block;
  padding: 2.5px 20px;
  font-size: 10px;
  font-weight: 400;
  color: #fff;
  border-radius: 3px;
  background: #2ea043;
}
/* 不同区段着色（class 名由 usecount 字段中的字母组合而成） */
.ed-usecount-bar[class*="10000"] { background: #da3633; }
.ed-usecount-bar[class*="1000"]  { background: #d2a106; }
.ed-usecount-bar[class*="100"]   { background: #d2a106; }

/* 卡片内嵌 Turnstile widget */
.ed-ipline-captcha .ed-ipline-name { color: #d2a8ff; }
.ed-inline-captcha {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
}
.ed-inline-captcha-loading {
  color: #6e7681;
  font-size: 12px;
}
.ed-inline-captcha-err {
  color: #ff7b72;
  font-size: 12px;
}

/* ============================================================ 评分卡 */

.ed-score-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ed-score-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  background: linear-gradient(135deg, transparent, rgba(88,166,255,0.15), transparent);
  z-index: 0;
  pointer-events: none;
  animation: ed-rotate 8s linear infinite;
}
.ed-score-card > * { position: relative; z-index: 1; }

.ed-score-label { color: #8b949e; font-size: 12px; }
.ed-score-num {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  margin: 8px 0 4px 0;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: linear-gradient(135deg, #58a6ff, #2ecc71);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.4s;
}
.ed-score-level { font-size: 14px; font-weight: 500; padding: 4px 10px; border-radius: 4px; display: inline-block; margin-top: 6px; }

.ed-level-green    .ed-score-level { background: rgba(46,204,113,0.18); color: var(--green); }
.ed-level-green    .ed-score-num   { background: linear-gradient(135deg, #2ecc71, #27ae60); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ed-level-yellow   .ed-score-level { background: rgba(241,196,15,0.18); color: var(--yellow); }
.ed-level-yellow   .ed-score-num   { background: linear-gradient(135deg, #f1c40f, #f39c12); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ed-level-red      .ed-score-level { background: rgba(231,76,60,0.18); color: var(--red); }
.ed-level-red      .ed-score-num   { background: linear-gradient(135deg, #e74c3c, #c0392b); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ed-level-critical .ed-score-level { background: rgba(192,57,43,0.25); color: #fff; }
.ed-level-critical .ed-score-num   { color: var(--critical); -webkit-text-fill-color: var(--critical); }

.ed-score-bar {
  height: 4px;
  background: #21262d;
  border-radius: 2px;
  margin: 14px 0 8px 0;
  overflow: hidden;
}
.ed-score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #58a6ff, #2ecc71);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.ed-level-yellow   .ed-score-bar-fill { background: linear-gradient(90deg, #f1c40f, #f39c12); }
.ed-level-red      .ed-score-bar-fill { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.ed-level-critical .ed-score-bar-fill { background: linear-gradient(90deg, #c0392b, #922b21); }

.ed-score-meta {
  display: flex;
  justify-content: space-between;
  color: #8b949e;
  font-size: 11px;
  margin-top: 8px;
}
.ed-score-meta strong { color: var(--red); }

/* ============================================================ 异常面板 */

.ed-anomaly-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.ed-anomaly-title {
  font-weight: 600;
  font-size: 13px;
  color: #c9d1d9;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.ed-anomaly-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: ed-pulse 1.4s ease-in-out infinite;
}
.ed-anomaly-count {
  margin-left: auto;
  background: rgba(231,76,60,0.2);
  color: var(--red);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}

.ed-anomaly-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #30363d transparent;
}
.ed-anomaly-list::-webkit-scrollbar { width: 6px; }
.ed-anomaly-list::-webkit-scrollbar-thumb { background: #30363d; border-radius: 3px; }

.ed-anomaly-item {
  display: flex;
  align-items: stretch;
  background: rgba(231, 76, 60, 0.06);
  border: 1px solid rgba(231, 76, 60, 0.25);
  border-radius: 6px;
  padding: 0 0 0 8px;
  margin-bottom: 6px;
  overflow: hidden;
}
.ed-anomaly-item.ed-sev-warn   { background: rgba(241,196,15,0.06); border-color: rgba(241,196,15,0.25); }
.ed-anomaly-item.ed-sev-danger { background: rgba(231,76,60,0.10);  border-color: rgba(231,76,60,0.35); }
.ed-anomaly-item.ed-sev-critical { background: rgba(192,57,43,0.18); border-color: rgba(192,57,43,0.5); }

.ed-anomaly-bar {
  width: 3px;
  background: var(--red);
  margin-right: 10px;
}
.ed-sev-warn   .ed-anomaly-bar { background: var(--yellow); }
.ed-sev-danger .ed-anomaly-bar { background: var(--red); }
.ed-sev-critical .ed-anomaly-bar { background: var(--critical); animation: ed-flash 1s ease-in-out infinite; }

.ed-anomaly-body { flex: 1; padding: 8px 4px; }
.ed-anomaly-id   { font-weight: 600; font-size: 12px; color: #c9d1d9; }
.ed-anomaly-desc { font-size: 11px; color: #8b949e; margin-top: 2px; }
.ed-anomaly-value {
  font-size: 11px;
  color: #d2a8ff;
  margin-top: 3px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  word-break: break-all;
}

.ed-anomaly-sev {
  flex: 0 0 70px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  padding: 8px 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  align-self: center;
}
.ed-sev-warn     .ed-anomaly-sev { color: var(--yellow); }
.ed-sev-danger   .ed-anomaly-sev { color: var(--red); }
.ed-sev-critical .ed-anomaly-sev { color: #fff; }

.ed-anomaly-empty {
  text-align: center;
  color: #6e7681;
  font-size: 12px;
  padding: 40px 0;
}

.ed-anomaly-slide-enter-active { transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.ed-anomaly-slide-leave-active { transition: all 0.3s ease-out; }
.ed-anomaly-slide-enter-from   { transform: translateX(-30px); opacity: 0; }
.ed-anomaly-slide-leave-to     { transform: translateX(30px); opacity: 0; }
.ed-anomaly-slide-move         { transition: transform 0.4s ease; }

/* ============================================================ 操作按钮 */

.ed-action-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-btn {
  flex: 1 0 calc(50% - 3px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: #c9d1d9;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.ed-btn:hover:not(:disabled) { background: var(--bg-card-hover); border-color: #58a6ff; color: #fff; }
.ed-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.ed-btn-primary {
  background: linear-gradient(135deg, #2ea043, #238636);
  border-color: #2ea043;
  color: #fff;
}
.ed-btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #2ecc71, #2ea043); }

/* ============================================================ 检测卡片 */

.ed-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.ed-card:hover { border-color: #58a6ff; }

.ed-cat-state-running { animation: ed-card-pulse 2s ease-in-out infinite; }
.ed-cat-state-fail    { border-color: rgba(231,76,60,0.5); }
.ed-cat-state-warn    { border-color: rgba(241,196,15,0.5); }
.ed-cat-state-pass    { border-color: rgba(46,204,113,0.4); }

.ed-card-head {
  background: rgba(255,255,255,0.02);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.ed-card-icon { font-size: 18px; }
.ed-card-title { flex: 1; font-weight: 600; font-size: 14px; }
.ed-card-state { font-size: 14px; }
.ed-pulse {
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--info);
  border-radius: 50%;
  animation: ed-pulse 1s ease-in-out infinite;
}
.ed-x    { color: var(--red);    font-weight: 700; }
.ed-w    { color: var(--yellow); font-weight: 700; }
.ed-tick { color: var(--green);  font-weight: 700; }

.ed-card-body { padding: 6px 0; flex: 1; }

.ed-row {
  padding: 7px 14px;
  display: flex;
  gap: 10px;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(48, 54, 61, 0.4);
  align-items: flex-start;
  transition: background 0.2s;
}
.ed-row:last-child { border-bottom: none; }
.ed-row:hover { background: rgba(255,255,255,0.02); }

.ed-row-key {
  flex: 0 0 140px;
  color: #8b949e;
  font-size: 12px;
}
.ed-row-val {
  flex: 1;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  word-break: break-all;
  color: #c9d1d9;
}

.ed-row-pending .ed-row-val { color: #6e7681; }
.ed-row-pending-text::after {
  content: '';
  display: inline-block;
  width: 4px; height: 4px;
  background: currentColor;
  border-radius: 50%;
  margin-left: 4px;
  animation: ed-blink 1s linear infinite;
}

.ed-row-fail .ed-row-key { color: #ff7b72; font-weight: 600; }
.ed-row-fail .ed-row-val { color: #ff7b72; }
.ed-row-fail.ed-sev-critical .ed-row-key { color: #ff4444; text-shadow: 0 0 6px rgba(255, 80, 80, 0.4); }

.ed-row-fail-text {
  background: rgba(231,76,60,0.12);
  padding: 1px 6px;
  border-radius: 3px;
}

/* API 能力卡片：是/否 状态值靠右，方便竖向扫读 */
.ed-cat-api .ed-row-val { text-align: right; }

/* DNS 解析器多行展示 */
.ed-row-fullwidth { padding: 6px 8px; }
.ed-row-fullwidth .ed-row-val { flex: 1; }
.ed-resolver-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ed-resolver-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 3px;
  background: rgba(255,255,255,0.02);
  font-size: 12px;
  line-height: 1.4;
}
.ed-resolver-flag {
  flex: 0 0 auto;
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}
.ed-resolver-ip {
  flex: 0 0 auto;
  color: #c9d1d9;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.ed-resolver-loc {
  flex: 1;
  color: #8b949e;
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ed-resolver-asn {
  flex: 0 0 auto;
  color: #6e7681;
  font-size: 11px;
}
.ed-resolver-provider {
  flex: 0 0 auto;
  color: #d2a8ff;
  font-size: 11.5px;
  font-weight: 600;
  min-width: 96px;
}
.ed-resolver-region {
  flex: 0 0 auto;
  color: #6e7681;
  font-size: 10.5px;
  letter-spacing: 0.4px;
}
.ed-resolver-empty {
  color: #484f58;
  font-style: italic;
}
.ed-resolver-flag-placeholder {
  flex: 0 0 auto;
  width: 16px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #484f58;
  font-size: 14px;
  line-height: 14px;
}
/* DNS 卡片：国家名 + 国旗整组贴右对齐 */
.ed-resolver-country-group {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.ed-resolver-country-name {
  color: #8b949e;
  font-size: 11.5px;
}
/* 多出口检测：IP+国旗整组贴右对齐（IP 在前，国旗在后） */
.ed-cat-multigeo .ed-resolver-ip {
  margin-left: auto;
  text-align: right;
}

/* IP 超链接：默认看起来像普通文本，hover 才显示链接特征 */
.ed-iplink {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: color 0.15s, border-color 0.15s;
}
.ed-iplink:hover {
  color: #58a6ff;
  border-bottom-color: rgba(88, 166, 255, 0.6);
}
.ed-iplink-fail {
  color: var(--red);
  border-bottom: 1px dashed rgba(231, 76, 60, 0.6);
}
.ed-iplink-fail:hover {
  color: #ff7b72;
  border-bottom-color: rgba(231, 76, 60, 0.9);
}
.ed-resolver-foreign {
  background: rgba(231, 76, 60, 0.12);
  border-left: 2px solid #ff7b72;
}
.ed-resolver-foreign .ed-resolver-ip { color: #ff7b72; }
.ed-resolver-foreign .ed-resolver-loc { color: #ff9f95; }

/* ============================================================ 静态报告 */

.ed-app-static .ed-statusbar-static { padding: 0; }

/* ============================================================ 动画 */

@keyframes ed-spin   { from{transform:rotate(0)} to{transform:rotate(360deg)} }
@keyframes ed-rotate { from{transform:rotate(0)} to{transform:rotate(360deg)} }
@keyframes ed-shine  { from{transform:translateX(-30px)} to{transform:translateX(30px)} }
@keyframes ed-pulse  { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.3);opacity:0.6} }
@keyframes ed-flash  { 0%,100%{opacity:1} 50%{opacity:0.4} }
@keyframes ed-blink  { 0%,100%{opacity:1} 50%{opacity:0.2} }
@keyframes ed-card-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.3); }
  50%     { box-shadow: 0 0 0 4px rgba(88, 166, 255, 0); }
}

/* ============================================================ 页底说明框 */

.ed-info-panel {
  max-width: 1400px;
  margin: 30px auto 16px auto;
  background: linear-gradient(180deg, #161b22 0%, #1c232b 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  color: #c9d1d9;
  font-size: 13px;
  line-height: 1.7;
  box-shadow:
    0 20px 60px rgba(20, 30, 50, 0.18),
    0 8px 24px rgba(20, 30, 50, 0.10),
    0 0 0 1px rgba(88, 166, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  z-index: 1;
}
.ed-info-title {
  font-size: 14px;
  font-weight: 600;
  color: #e6edf3;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ed-info-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 14px;
  background: linear-gradient(180deg, #58a6ff, #2ecc71);
  border-radius: 2px;
}
.ed-info-section + .ed-info-section { margin-top: 12px; }
.ed-info-panel p { margin: 4px 0; color: #c9d1d9; }
.ed-info-panel ul { margin: 4px 0 4px 18px; padding: 0; color: #c9d1d9; }
.ed-info-panel li { margin: 2px 0; }
.ed-info-panel strong { color: #f1c40f; }
.ed-info-panel .ed-info-warn { color: #ff7b72; }
.ed-info-disclaimer {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(88, 166, 255, 0.06);
  border-left: 3px solid #58a6ff;
  border-radius: 4px;
  color: #8b949e;
  font-size: 12px;
  line-height: 1.65;
}

/* ============================================================ 响应式 */

@media (max-width: 980px) {
  .ed-main { grid-template-columns: 1fr; }
  .ed-side { flex-direction: row; flex-wrap: wrap; }
  .ed-score-card, .ed-anomaly-card { flex: 1 1 280px; }
  .ed-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

@media (max-width: 768px) {
  .ed-app { padding: 12px; margin: 8px; max-width: 100%; }
  .ed-grid { grid-template-columns: 1fr; gap: 12px; }
  .ed-side { flex-direction: column; }
  .ed-score-card, .ed-anomaly-card { flex: none; min-height: auto; }
  .ed-anomaly-card { min-height: 180px; }
  .ed-statusbar-inner { padding: 12px 14px; gap: 12px; }
  .ed-status-detail { font-size: 12px; }
  .ed-progress-pct { top: -18px; }
  .ed-ticker { height: 70px; font-size: 11px; }
  .ed-ticker-time { flex: 0 0 50px; }
  .ed-ticker-tag  { flex: 0 0 80px; }
  .ed-card-head { padding: 10px 12px; }
  .ed-card-title { font-size: 13px; }
  .ed-row { padding: 6px 10px; font-size: 12px; }
  .ed-row-key { flex: 0 0 100px; font-size: 11px; }
  .ed-row-val { font-size: 12px; }
  .ed-ipline { padding: 7px 10px; gap: 8px; font-size: 12px; }
  .ed-ipline-name { flex: 0 0 70px; font-size: 11px; }
  .ed-ipline-ipval { font-size: 13px; }
  .ed-anomaly-item { flex-wrap: wrap; padding-left: 6px; }
  .ed-anomaly-bar { width: 3px; margin-right: 8px; }
  .ed-anomaly-body { flex: 1 1 60%; padding: 6px 4px; min-width: 0; }
  .ed-anomaly-sev { flex: 0 0 auto; padding: 4px 6px; font-size: 9px; align-self: flex-start; margin-top: 6px; }
  .ed-anomaly-id { word-break: break-all; }
  .ed-anomaly-desc, .ed-anomaly-value { word-break: break-word; overflow-wrap: anywhere; }
  /* DNS / multigeo 列表：缩字体，省略 loc，断行 */
  .ed-resolver-item { padding: 4px 6px; font-size: 11.5px; gap: 6px; flex-wrap: wrap; }
  .ed-resolver-loc { flex: 1 1 100%; font-size: 10.5px; padding-left: 22px; }
  .ed-resolver-asn { font-size: 10px; }
  .ed-resolver-provider { font-size: 11px; min-width: 0; flex: 0 0 auto; }
  .ed-resolver-region { display: none; } /* 移动端省掉服务器位置标签 */
  .ed-cat-multigeo .ed-resolver-ip { font-size: 11.5px; }
  /* 风控值 riskbar 在窄屏强制单行铺满 */
  .ed-riskbar { flex-wrap: nowrap; }
  .ed-riskitem-current { width: auto; flex: 1; min-width: 70px; padding: 0 6px; font-size: 11px; }
  .ed-riskitem-current .lab { display: none; } /* 移动端只显示百分比 */
  /* IP card 标签缩小 */
  .ed-ip-tag { transform: scale(0.65); padding: 1px 6px; }
  .ed-ip-label { padding: 2px 8px; font-size: 9px; }
  .ed-usecount-bar { padding: 2px 12px; font-size: 9px; }
}

@media (max-width: 480px) {
  .ed-app { padding: 8px 6px; margin: 4px 0; border-radius: 8px; }
  .ed-statusbar-inner { padding: 10px 12px; }
  .ed-status-text strong { font-size: 14px; }
  .ed-status-detail { font-size: 11px; margin-left: 0; }
  .ed-status-icon { width: 20px; height: 20px; line-height: 20px; font-size: 12px; }
  .ed-score-card { padding: 16px 12px; }
  .ed-score-num { font-size: 48px; }
  .ed-score-level { font-size: 12px; }
  .ed-score-meta { font-size: 10px; }
  .ed-anomaly-card { padding: 10px 12px; min-height: 140px; }
  .ed-anomaly-title { font-size: 12px; }
  .ed-anomaly-id { font-size: 11.5px; }
  .ed-anomaly-desc { font-size: 10.5px; }
  .ed-anomaly-value { font-size: 10.5px; }
  .ed-card-head { padding: 8px 10px; gap: 8px; }
  .ed-card-icon { font-size: 16px; }
  .ed-card-title { font-size: 12.5px; }
  .ed-row { padding: 5px 8px; }
  .ed-row-key { flex: 0 0 80px; font-size: 10.5px; }
  .ed-row-val { font-size: 11.5px; }
  .ed-ipline { padding: 6px 8px; }
  .ed-ipline-name { flex: 0 0 56px; font-size: 10.5px; }
  .ed-ipline-content { font-size: 11.5px; }
  .ed-ipline-ipval { font-size: 12px; }
  .ed-btn { font-size: 12px; padding: 7px 8px; flex: 1 1 calc(50% - 3px); }
  .ed-resolver-item { padding: 4px 5px; }
  .ed-resolver-loc { padding-left: 0; font-size: 10px; }
  .ed-resolver-flag { width: 14px; height: 10px; }
  /* 占满父容器宽度，避免滚动 */
  .ed-row-fullwidth { padding: 4px 6px; }
}

/* 触屏设备：禁用 hover 高亮，改用 active */
@media (hover: none) {
  .ed-card:hover { border-color: var(--border); }
  .ed-row:hover { background: transparent; }
  .ed-btn:hover:not(:disabled) { background: var(--bg-card); border-color: var(--border); color: #c9d1d9; }
  .ed-btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #2ea043, #238636); }
}
