/* ==========================================================================
   VPNAY · iplookup.css —— 「我的 IP」查询页专属样式
   只写本页增量;颜色 / 圆角 / 阴影一律引用 base.css 的 :root 令牌
   ========================================================================== */

/* ---------- 页头装饰:线路折线 + 节点(aria-hidden,draw-lines 描线目标) ---------- */
.ip-doodle{
  position:absolute;
  right:max(24px,calc(50% - var(--wrap) / 2 + 24px));
  top:50%;
  width:132px;
  height:auto;
  transform:translateY(-50%);
  color:var(--doodle);
  pointer-events:none;
}
.ip-doodle path,
.ip-doodle circle{
  fill:none;
  stroke:currentColor;
  stroke-width:1.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* ---------- 结果区栅格:左结果卡 + 右自查侧栏 ---------- */
.ip-grid{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);
  gap:20px;
  align-items:start;
}

/* ---------- 结果卡 ---------- */
.ip-card{
  display:flex;
  flex-direction:column;
  gap:18px;
  background:linear-gradient(180deg,var(--accent-08),transparent 40%),var(--panel);
}
.ip-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.ip-state{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:28px;
  padding:4px 12px 4px 10px;
  border:1px solid var(--border);
  border-radius:var(--r-pill);
  background:var(--panel);
  font-size:12.5px;
  font-weight:600;
  color:var(--muted);
  white-space:nowrap;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ip-state i{
  flex:none;
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--muted);
}
.ip-state[data-state="loading"] i{
  background:var(--accent);
  animation:ip-pulse 1.6s ease-in-out infinite;
}
.ip-state[data-state="ok"]{
  color:var(--success);
  border-color:var(--success-12);
}
.ip-state[data-state="ok"] i{background:var(--success)}
.ip-state[data-state="error"]{
  color:var(--warn);
  border-color:var(--warn-12);
}
.ip-state[data-state="error"] i{background:var(--warn)}
@keyframes ip-pulse{
  0%,100%{transform:scale(1);opacity:1}
  50%{transform:scale(.72);opacity:.35}
}

.ip-main{
  display:grid;
  gap:8px;
  justify-items:start;
}
.ip-main-label{
  font-family:var(--font-mono);
  font-size:11.5px;
  letter-spacing:.06em;
  color:var(--muted);
}
.ip-value{
  margin:0;
  font-family:var(--font-mono);
  font-size:clamp(26px,4.2vw,40px);
  font-weight:700;
  letter-spacing:-.02em;
  line-height:1.15;
  color:var(--ink);
  overflow-wrap:anywhere;
  word-break:break-word;
  max-width:100%;
}
.ip-value.is-missing{
  font-size:clamp(20px,3vw,26px);
  color:var(--muted);
  font-weight:600;
}
.ip-copy-ico{
  fill:none;
  stroke:currentColor;
  stroke-width:1.4;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.ip-rows{
  margin:0;
  display:grid;
  border-top:1px solid var(--border);
}
.ip-row{
  display:grid;
  grid-template-columns:minmax(0,150px) minmax(0,1fr);
  gap:12px;
  align-items:baseline;
  padding:14px 0;
  border-bottom:1px solid var(--border);
}
.ip-row dt{
  font-size:13px;
  color:var(--muted);
}
.ip-row dd{
  margin:0;
  font-size:15px;
  font-weight:600;
  color:var(--ink);
  overflow-wrap:anywhere;
  word-break:break-word;
}
.ip-row dd.is-muted{
  font-weight:500;
  color:var(--muted);
}

.ip-error[hidden]{display:none}

.ip-stamp{
  margin:0;
  font-size:12.5px;
  line-height:1.7;
  color:var(--muted);
}

/* ---------- 侧栏:三步自查 ---------- */
.ip-side{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.ip-side h2{
  font-size:18px;
  font-weight:800;
  letter-spacing:-.01em;
}
.ip-steps{
  margin:0;
  padding:0;
  list-style:none;
  counter-reset:ip-step;
  display:grid;
  gap:12px;
}
.ip-steps li{
  position:relative;
  counter-increment:ip-step;
  padding-left:34px;
  font-size:14px;
  line-height:1.75;
  color:var(--muted);
}
.ip-steps li b{
  color:var(--ink);
  font-weight:600;
}
.ip-steps li::before{
  content:counter(ip-step);
  position:absolute;
  left:0;
  top:1px;
  display:grid;
  place-items:center;
  width:22px;
  height:22px;
  border:1px solid var(--accent-22);
  border-radius:50%;
  background:var(--accent-08);
  color:var(--accent);
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:700;
}
.ip-side-note{
  margin-top:auto;
  padding-top:14px;
  border-top:1px dashed var(--border);
  font-size:12.5px;
  line-height:1.75;
  color:var(--muted);
}

/* ---------- 结果解读:术语表 ---------- */
.ip-gloss{
  margin:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.ip-gloss-item{
  min-width:0;
  padding:20px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  box-shadow:var(--shadow-soft);
}
.ip-gloss-item dt{
  font-family:var(--font-display);
  font-size:16px;
  font-weight:700;
  letter-spacing:-.01em;
  color:var(--ink);
}
.ip-gloss-item dd{
  margin:10px 0 0;
  font-size:14px;
  line-height:1.8;
  color:var(--muted);
}

/* ---------- DNS 自查三卡 ---------- */
.ip-dns{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.ip-dns-card{
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width:0;
}
.ip-dns-card h3{font-size:16px}
.ip-dns-card p{
  font-size:14px;
  line-height:1.8;
  color:var(--muted);
}
.ip-dns-card ol,
.ip-dns-card ul{
  margin:0;
  padding-left:20px;
  display:grid;
  gap:8px;
  font-size:14px;
  line-height:1.75;
  color:var(--muted);
}
.ip-dns-card code{
  padding:1px 5px;
  border:1px solid var(--border);
  border-radius:var(--r-sm);
  background:var(--panel-2);
  font-size:12.5px;
  color:var(--ink);
}
.ip-dns-note{margin-bottom:0}

/* ---------- 隐私卡 ---------- */
.ip-privacy{
  display:grid;
  gap:12px;
  max-width:56em;
}
.ip-privacy h2{
  font-size:22px;
  font-weight:800;
  letter-spacing:-.02em;
}
.ip-privacy p{
  font-size:14.5px;
  line-height:1.85;
  color:var(--muted);
}
.ip-privacy strong{color:var(--ink)}

/* ---------- 复制回落用的隐藏输入框(不参与布局,不影响滚动宽度) ---------- */
.ip-copy-sink{
  position:fixed;
  top:0;
  left:0;
  width:1px;
  height:1px;
  padding:0;
  border:0;
  opacity:0;
  pointer-events:none;
  z-index:-1;
}

/* ---------- 响应式 ---------- */
@media (max-width:1100px){
  .ip-doodle{width:104px}
}
@media (max-width:980px){
  .ip-grid{grid-template-columns:1fr}
  .ip-dns{grid-template-columns:1fr}
}
@media (max-width:768px){
  .ip-doodle{display:none}
  .ip-gloss{grid-template-columns:1fr}
}
@media (max-width:640px){
  .ip-row{grid-template-columns:1fr;gap:4px}
  .ip-value{font-size:22px}
  .ip-value.is-missing{font-size:18px}
  .ip-gloss-item{padding:16px}
}
@media (prefers-reduced-motion:reduce){
  .ip-state[data-state="loading"] i{animation:none}
}