/* ============================================================
   姿调云 WHOIS · 改版样式
   参考：whois.west.cn（西部数码）设计语言
   风格：橙主色 / 灰阶标签表 / 紧凑工具感 / 弱装饰
   ============================================================ */

:root{
  --primary:#f26522;        /* 西部数码橙 */
  --primary-d:#d9510f;
  --primary-l:#fff3ec;      /* 浅橙底 */
  --bg:#f4f5f7;             /* 页面底色 */
  --panel:#ffffff;
  --text:#2b2f36;
  --muted:#8a929e;
  --border:#e7e9ee;
  --label-bg:#f7f8fa;       /* 标签列底色 */
  --link:#2b6cb0;
  --ok:#2e9e5b;
  --ok-bg:#eaf6ef;
  --warn:#e0533d;
  --warn-bg:#fdecea;
  --blue:#2b6cb0;
  --blue-bg:#eaf1fb;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei","Hiragino Sans GB",sans-serif;
  background:var(--bg);
  color:var(--text);
  font-size:14px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--link);text-decoration:none;}
a:hover{text-decoration:underline;}
img{max-width:100%;}
.wrap{max-width:1000px;margin:0 auto;padding:0 16px;}

/* ---------------- 顶部导航 ---------------- */
.site-header{
  background:#fff;
  border-top:3px solid var(--primary);
  border-bottom:1px solid var(--border);
}
.site-header .wrap{
  display:flex;flex-direction:column;align-items:center;gap:12px;
  padding:14px 16px 12px;
}
.brand{display:flex;align-items:center;justify-content:center;}
.brand span{
  font-size:12px;font-weight:600;color:var(--primary);
  margin-left:6px;padding:2px 7px;border:1px solid var(--primary);
  border-radius:3px;vertical-align:middle;
}
.brand img{height:48px;width:auto;display:block;}
.site-header nav{display:flex;justify-content:center;gap:24px;flex-wrap:wrap;}
.site-header nav a{
  color:#5a626d;font-size:14px;
}
.site-header nav a:hover{color:var(--primary);text-decoration:none;}

/* ---------------- 搜索区（工具带） ---------------- */
.hero{
  background:#fff;
  border-bottom:1px solid var(--border);
  padding:30px 16px 28px;
  text-align:center;
}
.hero h1{
  font-size:21px;font-weight:700;margin:0 0 6px;color:var(--text);
}
.hero .sub{color:var(--muted);font-size:13px;margin:0 0 18px;}
.search{
  display:flex;max-width:660px;margin:0 auto;
}
.search.small{max-width:100%;}
.search input{
  flex:1;height:46px;padding:0 16px;font-size:15px;color:var(--text);
  border:1px solid #d6dae1;border-right:none;
  border-radius:4px 0 0 4px;outline:none;transition:.15s;
  min-width:0;
}
.search input:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(242,101,34,.12);
}
.search button{
  height:46px;padding:0 30px;border:none;border-radius:0 4px 4px 0;
  background:var(--primary);color:#fff;font-size:15px;font-weight:600;
  cursor:pointer;transition:.15s;white-space:nowrap;
}
.search button:hover{background:var(--primary-d);}
.hint{color:var(--muted);font-size:12px;margin-top:10px;}

/* ---------------- 卡片 ---------------- */
.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:6px;
  padding:20px;
  margin:16px 0;
}
.card h2{margin:0 0 14px;font-size:18px;font-weight:700;color:var(--text);}
.card h3{
  margin:18px 0 10px;font-size:14px;font-weight:700;color:#4a5159;
  padding-left:9px;border-left:3px solid var(--primary);
}

/* ---------------- 查询结果头部 ---------------- */
.result-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px;padding-bottom:12px;border-bottom:1px dashed var(--border);}
.result-head h2{margin:0;font-size:22px;font-weight:700;word-break:break-all;}
.badge{font-size:12px;padding:3px 9px;border-radius:3px;font-weight:600;}
.badge-reg{background:#2f3a45;color:#fff;}      /* 已注册：深颜色（已存在） */
.badge-free{background:var(--ok-bg);color:var(--ok);}   /* 未注册·可注册：绿色（可以） */
.badge-ban{background:#fdecea;color:#c0392b;}
.badge-cache{background:var(--blue-bg);color:var(--blue);}

/* ---------------- 键值表（对标 west.cn 结果表） ---------------- */
.facts{
  display:block;border:1px solid var(--border);border-radius:6px;
  overflow:hidden;margin:4px 0 2px;
}
.fact{display:flex;align-items:center;border-bottom:1px solid var(--border);}
.fact:last-child{border-bottom:none;}
.fact span{
  width:128px;flex:none;background:var(--label-bg);color:var(--muted);
  font-size:13px;text-align:right;padding:11px 14px;
  border-right:1px solid var(--border);
}
.fact b{
  flex:1;font-size:14px;font-weight:600;color:var(--text);
  padding:11px 14px;word-break:break-all;font-weight:400;
}

/* ---------------- 状态 / DNS ---------------- */
.status-list{display:flex;flex-wrap:wrap;gap:8px;}
.ns-list{display:block;}
.status{
  background:#fff;border:1px solid var(--border);border-radius:4px;
  padding:6px 11px;font-size:13px;color:#475569;
  border-left:3px solid #cbd5e1;
}
.status small{display:block;color:#94a3b8;font-weight:400;font-size:12px;margin-top:2px;line-height:1.5;}
.status.s-ok{border-left-color:#3aa76d;background:#f3faf6;}
.status.s-lock{border-left-color:#e0a000;background:#fff9ec;}
.status.s-pending{border-left-color:#f59e0b;background:#fff5e6;}
.status.s-warn{border-left-color:#dc4e41;background:#fdecea;}
.status-tip{font-size:12px;color:#a0a8b3;margin:8px 0 0;line-height:1.6;}
.ns-list .ns-block{
  display:block;background:var(--label-bg);border:1px solid var(--border);border-radius:4px;
  padding:10px 12px;font-size:13px;line-height:1.9;color:#1f2937;
  font-family:"SFMono-Regular",Consolas,Menlo,monospace;white-space:pre-wrap;word-break:break-all;
}

/* ---------------- 提示框 ---------------- */
.notice{
  background:var(--primary-l);border:1px solid #ffd9c2;color:#9a3b12;
  border-radius:5px;padding:12px 14px;font-size:14px;margin:6px 0;line-height:1.7;
}
.notice strong{color:var(--primary-d);}
.notice-avail{background:var(--ok-bg);border:1px solid #bfe6cf;color:#1f7a45;}
.notice-avail strong{color:var(--ok);}
.notice-ban{background:#fdecea;border:1px solid #f5c2b8;color:#a1260d;}
.notice-ban strong{color:#c0392b;}
.raw-text{
  background:#f7f8fa;border:1px solid var(--border);border-radius:5px;
  padding:12px 14px;font-size:13px;line-height:1.7;color:#444;white-space:pre-wrap;
  word-break:break-all;margin:0;
}
.notice-error{
  background:var(--warn-bg);border:1px solid #f5c2b8;color:#a1260d;
  padding:13px 15px;border-radius:5px;font-size:14px;
}

/* ---------------- 反查入口 ---------------- */
.reverse-entry .reverse-links{display:flex;flex-wrap:wrap;gap:10px;}
.rbtn{
  background:var(--blue-bg);border:1px solid #cfe0f7;color:var(--blue);
  border-radius:4px;padding:8px 13px;font-size:13px;
}
.rbtn:hover{background:#ddeafb;text-decoration:none;}

/* ---------------- 原始信息 / 反查结果表 ---------------- */
.raw-table{overflow-x:auto;border:1px solid var(--border);border-radius:6px;}
.raw-table table{width:100%;border-collapse:collapse;font-size:13px;}
.raw-table th,.raw-table td{
  text-align:left;padding:9px 13px;border-bottom:1px solid var(--border);vertical-align:top;
}
.raw-table th{background:var(--label-bg);color:#5a626d;font-weight:600;white-space:nowrap;}
.raw-table tr:last-child td{border-bottom:none;}
.raw-table td.k{width:34%;color:var(--muted);word-break:break-all;background:#fcfcfd;}
.raw-table td.k small{color:#aab2bd;font-weight:400;}
.raw-table td.v{word-break:break-all;}

/* WHOIS 详情头部：获取时间 + 更新按钮（靠在一起） */
.detail-head{
  display:flex;align-items:center;justify-content:flex-start;gap:10px;
  margin-bottom:12px;flex-wrap:wrap;
}
.detail-head .fetch-time{font-size:13px;color:var(--muted);}
.btn-update{
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--primary);color:#fff;border:1px solid var(--primary-d);
  border-radius:4px;padding:6px 16px;font-size:13px;font-weight:600;
  text-decoration:none;transition:background .15s;
}
.btn-update:hover{background:var(--primary-d);}

/* ---------------- 推荐 / 标签 ---------------- */
.suggest,.chips{display:flex;flex-wrap:wrap;gap:8px;}
.chip{
  display:inline-flex;align-items:center;gap:6px;
  background:#fff;border:1px solid var(--border);border-radius:4px;
  padding:6px 12px;font-size:13px;color:#475569;
}
.chip:hover{background:var(--primary-l);border-color:var(--primary);color:var(--primary-d);text-decoration:none;}
.chip em.free{font-style:normal;font-size:11px;color:#fff;background:var(--ok);border-radius:3px;padding:1px 6px;}

/* ---------------- 最新查询 ---------------- */
.latest h2{font-size:17px;}

/* ---------------- 反查页 ---------------- */
.reverse-box .search.small{max-width:none;}
.reverse-box .rev-tabs{
  display:flex;height:46px;
  border:1px solid #d6dae1;border-right:none;
  border-radius:4px 0 0 4px;background:#fff;overflow:hidden;
}
.reverse-box .rev-tab{
  display:flex;align-items:center;padding:0 20px;
  font-size:14px;color:var(--text);cursor:pointer;
  border-right:1px solid #d6dae1;user-select:none;white-space:nowrap;
}
.reverse-box .rev-tab:last-child{border-right:none;}
.reverse-box .rev-tab input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;}
.reverse-box .rev-tab.active,
.reverse-box .rev-tab:has(input:checked){
  background:var(--primary);color:#fff;font-weight:600;
}
.reverse-box .tip{color:var(--muted);font-size:13px;margin:12px 0 0;}
.reverse-count{margin:16px 0 8px;font-size:14px;color:#5a626d;}
.reverse-count b{color:var(--primary);}

/* ---------------- 介绍 ---------------- */
.intro h2{font-size:16px;margin-top:20px;}
.intro h2:first-child{margin-top:0;}
.intro p{color:#4a5159;font-size:14px;line-height:1.8;}
.intro ul{color:#4a5159;font-size:14px;padding-left:20px;line-height:1.8;}
.intro li{margin:6px 0;}

/* ---------------- 页脚 ---------------- */
.site-footer{margin-top:26px;border-top:1px solid var(--border);background:#fff;}
.site-footer .wrap{
  display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;
  padding:18px 16px;color:var(--muted);font-size:13px;
}

/* ---------------- 响应式 ---------------- */
@media (max-width:600px){
  .hero h1{font-size:18px;}
  .search{flex-direction:column;}
  .search input{border-right:1px solid #d6dae1;border-radius:4px;}
  .search button{border-radius:4px;margin-top:10px;height:44px;}
  .reverse-box .rev-tabs{border-radius:4px;border-right:1px solid #d6dae1;}
  .fact span{width:96px;padding:10px 10px;}
  .result-head h2{font-size:19px;}
}
