/* 宏创 外贸站SEO 工具箱 */
:root {
    --primary: #2f6fed;
    --primary-dark: #1e56c8;
    --primary-soft: #eaf1ff;
    --teal: #12a594;
    --ink: #16233a;
    --muted: #6b7c95;
    --line: #e3eaf4;
    --bg: #eef2f8;
    --card: #ffffff;
    --ok: #12a594;
    --warn: #d98b16;
    --bad: #d9453d;
    --radius: 12px;
    --shadow: 0 6px 20px rgba(24, 44, 80, .07);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 14px;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 顶栏 */
.topbar {
    background: linear-gradient(100deg, #10203a, #1b3a63 60%, #234c7d);
    color: #fff;
    box-shadow: 0 2px 10px rgba(12, 28, 52, .22);
}
.topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    height: 58px;
    display: flex;
    align-items: center;
    gap: 26px;
}
.brand { display: flex; align-items: center; gap: 9px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark { color: #6fb0ff; display: flex; }
/* 当前目标条 */
.target-bar { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 8px rgba(24, 44, 80, .04); }
.target-bar .topbar-inner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.tb-label { font-size: 12px; color: var(--muted); }
.tb-host { font-size: 13px; font-weight: 700; color: var(--ink); background: var(--primary-soft); border-radius: 999px; padding: 3px 10px; }
.tb-links { display: flex; gap: 2px; flex-wrap: wrap; }
.tb-links a { font-size: 12.5px; color: #39506f; text-decoration: none; padding: 3px 8px; border-radius: 8px; }
.tb-links a:hover { background: var(--primary-soft); color: var(--primary); }
.tb-clear { margin-left: auto; font-size: 12px; color: var(--muted); }

.brand-text { font-size: 16px; font-weight: 600; letter-spacing: .4px; }
.brand-ver {
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 999px;
    color: #bcd8ff;
    background: rgba(111, 176, 255, .18);
    border: 1px solid rgba(111, 176, 255, .35);
    letter-spacing: .3px;
}
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
    color: rgba(255, 255, 255, .78);
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 13.5px;
    transition: .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(111, 176, 255, .22); color: #fff; box-shadow: inset 0 0 0 1px rgba(111, 176, 255, .4); }

/* 接入会员区后：压缩导航并允许横向滚动，避免顶栏拥挤 */
.topbar-inner { gap: 14px; }
.nav { gap: 2px; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 7px 9px; font-size: 13px; white-space: nowrap; }
.member-box { flex: 0 0 auto; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 40px; }

/* 头部区 */
.hero { margin-bottom: 20px; }
.hero h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: .3px; }
.hero p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* 卡片 */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 18px;
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.card-head h2 { font-size: 15.5px; margin: 0; }
.card-head .sub { color: var(--muted); font-size: 12.5px; }

/* 表单 */
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
input[type=text], input[type=url], input[type=number], select, textarea {
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cfdaea;
    border-radius: 9px;
    padding: 9px 12px;
    outline: none;
    transition: .15s;
    max-width: 100%;
}
input[type=text]:focus, input[type=url]:focus, input[type=number]:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(47, 111, 237, .13);
}
.url-input { flex: 1 1 380px; min-width: 240px; }
.ports-input { flex: 0 1 210px; min-width: 160px; }
textarea { width: 100%; min-height: 70px; resize: vertical; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: inherit;
    font-size: 13.5px;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 9px 18px;
    cursor: pointer;
    background: #eef3fb;
    color: var(--ink);
    transition: .15s;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(47, 111, 237, .26); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.teal { background: var(--teal); color: #fff; }
.btn.ghost { background: #fff; border-color: #cfdaea; color: var(--ink); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }
.btn.danger { background: #fdecec; color: var(--bad); border-color: #f8d3d0; }

.hint { color: var(--muted); font-size: 12.5px; }
.row-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 提示条 */
.flash { border-radius: 10px; padding: 11px 15px; margin-bottom: 14px; font-size: 13.5px; }
.flash-ok { background: #e8f8f4; border: 1px solid #bce9de; color: #0c7c6d; }
.flash-err { background: #fdeceb; border: 1px solid #f7cdc9; color: #b3382f; }
.flash-warn { background: #fff7e6; border: 1px solid #f6e0b4; color: #93620d; }

.tip-box {
    background: #f7fafe;
    border: 1px dashed #cddcef;
    border-radius: 10px;
    padding: 12px 15px;
    color: var(--muted);
    font-size: 12.8px;
}
.tip-box b { color: var(--ink); }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12.5px; }

/* 评分 */
.score {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    font-size: 26px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.score small { font-size: 12px; font-weight: 400; }
.score-good { color: var(--ok); }
.score-mid { color: var(--warn); }
.score-bad { color: var(--bad); }

.score-ring {
    width: 116px; height: 116px; border-radius: 50%;
    display: grid; place-items: center;
    background: conic-gradient(var(--ring-color) calc(var(--ring-pct) * 1%), #e9eff8 0);
    position: relative;
}
.score-ring::after {
    content: "";
    position: absolute; inset: 9px;
    background: #fff; border-radius: 50%;
}
.score-ring .inner { position: relative; z-index: 1; text-align: center; }
.score-ring .inner b { display: block; font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.score-ring .inner span { font-size: 11.5px; color: var(--muted); }

/* 标签 */
.tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    line-height: 1.7;
    border: 1px solid transparent;
    white-space: nowrap;
}
.tag-ok { background: #e8f8f4; color: #0c7c6d; border-color: #bce9de; }
.tag-warn { background: #fff7e6; color: #93620d; border-color: #f6e0b4; }
.tag-bad { background: #fdeceb; color: #b3382f; border-color: #f7cdc9; }
.tag-gray { background: #eef2f8; color: var(--muted); border-color: #dfe7f2; }

/* 表格 */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: #f6f9fe; color: var(--muted); font-weight: 600; white-space: nowrap; font-size: 12.5px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #f9fbff; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: Consolas, "Courier New", monospace; font-size: 12.3px; word-break: break-all; }
.trunc { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.center { text-align: center; }

/* 列表 */
.list { display: grid; gap: 10px; }
.list-item {
    display: flex; gap: 12px; align-items: center;
    border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff;
}
.list-item .grow { flex: 1; min-width: 0; }
.list-item .t { font-weight: 500; }
.list-item .s { color: var(--muted); font-size: 12.4px; }

/* 检查项列表 */
.checks { display: grid; gap: 8px; }
.check-item {
    display: flex; gap: 12px; align-items: flex-start;
    border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; background: #fff;
}
.check-item .grow { flex: 1; min-width: 0; }
.check-item .name { font-weight: 600; font-size: 13.4px; }
.check-item .detail { color: #41536d; font-size: 12.8px; }
.check-item .hintline { color: var(--muted); font-size: 12.3px; margin-top: 3px; }
.check-item.pass { border-left: 3px solid var(--ok); }
.check-item.warn { border-left: 3px solid var(--warn); }
.check-item.fail { border-left: 3px solid var(--bad); }

/* 关键词条 */
.kw-bar { display: flex; align-items: center; gap: 10px; }
.kw-bar .bar { flex: 1; height: 7px; background: #eef3fa; border-radius: 999px; overflow: hidden; min-width: 60px; }
.kw-bar .bar i { display: block; height: 100%; background: linear-gradient(90deg, #6fb0ff, #2f6fed); border-radius: 999px; }
.chip {
    display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11px;
    background: var(--primary-soft); color: var(--primary-dark); margin-right: 4px;
}
.chip.gray { background: #eef2f8; color: var(--muted); }

/* IP 检测结果（沿用站内卡片 + 键值表语言） */
.ip-block + .ip-block { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.ip-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ip-name { font-size: 15px; font-weight: 700; letter-spacing: .2px; }
.ip-sub { color: var(--muted); font-size: 12.4px; margin-top: 2px; }
.ip-head .tag { margin-top: 2px; }
.ip-block .kv th { width: 96px; }
.ip-block .kv td { word-break: break-word; }
.ip-block .kv .table-wrap { margin: 0; }
.ip-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.ip-links .chip { margin-right: 0; }

/* 双列布局 */
.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.cols-even { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

/* 页脚 */
.foot { border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12.4px; }
.foot .wrap-inner {
    max-width: 1180px; margin: 0 auto; padding: 14px 20px;
    display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between;
}
.foot-note { color: #93a2b8; }
.foot-links { display: flex; gap: 14px; flex-wrap: wrap; }
.foot-links a { color: #39506f; }
.foot-links a:hover { color: var(--primary); }

@media (max-width: 860px) {
    .cols, .cols-even { grid-template-columns: 1fr; }
    .topbar-inner { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
    .nav { margin-left: 0; width: 100%; }
    .wrap { padding: 16px 14px 30px; }
    .trunc { max-width: 220px; }
}
