/* ==========================================================================
   VPNWing — iplookup.css
   页面专属样式：出口检测（IP / 归属地 / ISP / 代理检测）
   颜色、圆角、阴影全部引用 base.css 的 :root 令牌，组件内不写死颜色。
   ========================================================================== */

/* ==========================================================================
   首屏
   ========================================================================== */

.lookup-hero{
  position: relative;
  overflow-x: clip;
  padding-block: 34px 10px;
}

.lookup-hero::before{
  content: "";
  position: absolute;
  inset: -60px 0 auto 0;
  height: 340px;
  background: radial-gradient(70% 100% at 16% 0%, var(--hero-wash), transparent 72%);
  pointer-events: none;
}

.lookup-hero .wrap{
  position: relative;
  z-index: 1;
}

.lookup-hero h1{
  margin-top: 18px;
}

.lookup-hero .hero-lead{
  max-width: 620px;
}

.lookup-hero .chip-row{
  margin-top: 18px;
}

/* 装饰：同心脉冲环（纯装饰，不承载任何数据） */

.pulse-deco{
  position: absolute;
  top: 14px;
  right: 10px;
  width: 200px;
  height: 200px;
  z-index: 0;
  pointer-events: none;
}

.pulse-ring{
  position: absolute;
  inset: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.pulse-ring--mid{
  inset: 36px;
  border-color: var(--accent-tint);
}

.pulse-ring--inner{
  inset: 68px;
  border-color: var(--accent-tint);
}

.pulse-core{
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-tint);
}

/* ==========================================================================
   结果区布局
   ========================================================================== */

.lookup-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* ---- 结果卡 ---- */

.ip-card{
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-panel);
  overflow: hidden;
  box-shadow: inset 0 1px 0 var(--hi-white), var(--shadow-card);
}

.ip-state{
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  white-space: nowrap;
  flex: none;
}

.ip-body{
  padding: 20px 22px 22px;
}

.ip-main{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.ip-main-text{
  min-width: 0;
  flex: 1 1 200px;
}

.ip-label{
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.ip-value{
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ip-rows{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
  margin: 18px 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.ip-row{
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.ip-row dt{
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.ip-row dd{
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  overflow-wrap: anywhere;
}

.ip-foot{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.ip-status{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

.ip-status .live-dot{
  background: var(--text-muted);
  box-shadow: 0 0 0 3px var(--bg-panel-2);
  animation: none;
}

.ip-status.is-loading .live-dot{
  background: var(--warn);
  box-shadow: 0 0 0 3px var(--warn-tint);
}

.ip-status.is-ok .live-dot{
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-tint);
  animation: breathe 2.4s ease-in-out infinite;
}

.ip-status.is-error .live-dot{
  background: var(--error);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.ip-note{
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--warn);
  border-radius: var(--radius-md);
  background: var(--bg-panel-2);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-muted);
}

.ip-note[hidden]{
  display: none;
}

.ip-card .btn[disabled]{
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* 复制兜底用的隐藏文本域 */

.ip-copy-sink{
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* ---- 说明侧栏 ---- */

.lookup-aside{
  display: grid;
  gap: 16px;
}

.aside-title{
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.aside-list{
  counter-reset: aside-step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.aside-list li{
  counter-increment: aside-step;
  position: relative;
  padding-left: 26px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
}

.aside-list li::before{
  content: counter(aside-step);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.aside-fact{
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-panel-2);
}

.aside-fact .mono{
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.aside-fact span:last-child{
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ==========================================================================
   结果解读卡组
   ========================================================================== */

.read-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.read-card{
  min-width: 0;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  box-shadow: inset 0 1px 0 var(--hi-white), var(--shadow-card);
}

.read-card h3{
  font-size: 17px;
}

.read-card p{
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.75;
}

/* ==========================================================================
   DNS 自查
   ========================================================================== */

.dns-table-wrap{
  margin-top: 24px;
}

/* ==========================================================================
   隐私卡
   ========================================================================== */

.privacy-card{
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.privacy-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: var(--radius-md);
  background: var(--accent-tint);
  color: var(--accent);
  box-shadow: inset 0 1px 0 var(--hi-white);
}

.privacy-copy{
  min-width: 0;
}

.privacy-copy > * + *{
  margin-top: 8px;
}

.privacy-copy .kicker{
  margin-top: 0;
}

.privacy-copy .section-title{
  font-size: clamp(22px, 2.4vw, 28px);
}

.privacy-copy p{
  font-size: 13.5px;
  line-height: 1.75;
}

/* ==========================================================================
   相关页面
   ========================================================================== */

.related-links{
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.related-label{
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.chip a{
  color: inherit;
  text-decoration: none;
}

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

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

@media (max-width: 1080px){
  .lookup-grid{ grid-template-columns: minmax(0, 1fr); }
  .pulse-deco{ display: none; }
}

@media (max-width: 860px){
  .read-grid{ grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px){
  .lookup-hero{ padding-block: 24px 6px; }
  .ip-body{ padding: 16px 16px 18px; }
  .ip-rows{ grid-template-columns: minmax(0, 1fr); }
  .ip-foot{ align-items: flex-start; }
  .ip-foot .btn{ width: 100%; }
  .privacy-card{ flex-direction: column; gap: 14px; }
  .read-card{ padding: 20px 18px; }
}

@media (prefers-reduced-motion: reduce){
  .ip-status.is-ok .live-dot{ animation: none; }
}