/* ===== IP 综合检测中心 · 工具中心 / 工具页样式 ===== */
/* 参考 socks5ip 检测中心的卡片配色与落地布局，并接入子比主题变量作为回退。 */

.ipcheck-page,
.ipcheck-toolpage {
	--ipc-red: #f1404b;
	--ipc-blue: #2563eb;
	--ipc-green: #16a34a;
	--ipc-purple: #7c3aed;
	--ipc-ink: #1a1d24;
	--ipc-text: #1f2430;
	--ipc-body: #4b5563;
	--ipc-muted: #6b7280;
	--ipc-bg: #f6f7f9;
	--ipc-card: #ffffff;
	--ipc-line: #eef0f4;
	--ipc-shadow: 0 8px 28px rgba(31, 35, 48, 0.07);
	--ipc-shadow-lg: 0 12px 40px rgba(31, 35, 48, 0.12);
	--ipc-primary: var(--theme-color, var(--ipc-red));
	font-family: var(--key-color, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif);
	color: var(--ipc-text);
	line-height: 1.7;
	background: linear-gradient(180deg, #fef2f3 0%, #f6f7f9 320px);
	-webkit-font-smoothing: antialiased;
}

.ipcheck-page *,
.ipcheck-toolpage * { box-sizing: border-box; }
.ipcheck-page a,
.ipcheck-toolpage a { text-decoration: none; }

.ipcheck-wrap { max-width: 1120px; margin: 0 auto; padding: 16px 18px 28px; }

/* ===== 头部 ===== */
.ipcheck-hero { text-align: center; padding: 6px 0 16px; }
.ipcheck-headline { display: flex; align-items: flex-start; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ipcheck-badge { display: inline-flex; align-items: center; gap: 5px; background: #fff; border: 1px solid #ffd9db; color: var(--ipc-red); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; margin-top: 8px; }
.ipcheck-headline h1 { font-size: 28px; font-weight: 800; margin: 0; letter-spacing: 0; color: var(--ipc-ink); }
.ipcheck-headline h1 b { color: var(--ipc-red); }
.ipcheck-sub { font-size: 15px; color: var(--ipc-muted); max-width: 680px; margin: 0 auto 14px; }
.ipcheck-trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.ipcheck-trust span { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ipc-body); background: #fff; border: 1px solid var(--ipc-line); border-radius: 999px; padding: 6px 13px; }
.ipcheck-trust .ic { color: var(--ipc-red); font-style: normal; font-weight: 700; }

/* ===== 工具卡片 2x2 ===== */
.ipcheck-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 6px 0 30px; }
.ipcheck-card { background: var(--ipc-card); border: 1px solid var(--ipc-line); border-radius: 16px; padding: 22px 24px 20px; position: relative; box-shadow: var(--ipc-shadow); transition: transform 0.18s ease, box-shadow 0.18s ease; display: flex; flex-direction: column; }
.ipcheck-card:hover { transform: translateY(-4px); box-shadow: var(--ipc-shadow-lg); }
.ipcheck-card .top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.ipcheck-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.ipcheck-icon svg { width: 28px; height: 28px; }
.ipcheck-card .tt { flex: 1; min-width: 0; }
.ipcheck-card .nm { font-size: 18px; font-weight: 800; color: var(--ipc-ink); margin: 1px 0 3px; }
.ipcheck-card .tagline { font-size: 13px; color: var(--ipc-muted); }
.ipcheck-free { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 700; color: #fff; background: var(--ipc-red); border-radius: 999px; padding: 3px 10px; letter-spacing: 0; }
.ipcheck-detail summary { display: none; }
.ipcheck-card .lbl { font-size: 13px; font-weight: 700; color: #374151; margin: 0 0 5px; display: flex; align-items: center; gap: 6px; }
.ipcheck-card .lbl::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--ac, var(--ipc-red)); display: inline-block; }
.ipcheck-card .fn { font-size: 14px; color: #374151; margin: 0 0 12px; }
.ipcheck-card ul { list-style: none; margin: 0 0 4px; padding: 0; }
.ipcheck-card ul li { font-size: 13.5px; color: var(--ipc-body); padding: 3px 0 3px 20px; position: relative; }
.ipcheck-card ul li::before { content: "✓"; position: absolute; left: 0; top: 3px; font-size: 12px; font-weight: 700; color: var(--ac, var(--ipc-red)); }
.ipcheck-card .fit { font-size: 13px; color: var(--ipc-muted); background: #f8f9fb; border-radius: 10px; padding: 8px 12px; margin: 12px 0 0; }
.ipcheck-card .fit b { color: #374151; }
.ipcheck-go { margin-top: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--ac, var(--ipc-red)); color: #fff; font-size: 14px; font-weight: 700; border-radius: 10px; padding: 11px 16px; width: 100%; transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease; }
.ipcheck-go:hover { opacity: 0.9; color: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2); }
.ipcheck-go svg { width: 16px; height: 16px; }
@media (hover: none) { .ipcheck-go:hover { transform: none; box-shadow: none; } }

/* ===== 区块 ===== */
.ipcheck-sec { background: var(--ipc-card); border: 1px solid var(--ipc-line); border-radius: 16px; padding: 26px 24px; margin-bottom: 20px; box-shadow: var(--ipc-shadow); }
.ipcheck-sec h2 { font-size: 20px; font-weight: 800; margin: 0 0 4px; color: var(--ipc-ink); text-align: center; }
.ipcheck-sec .ipcheck-h2sub { font-size: 13px; color: var(--ipc-muted); text-align: center; margin: 0 0 20px; }
.ipcheck-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ipcheck-step { text-align: center; position: relative; }
.ipcheck-step .num { width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 2px solid var(--ipc-red); color: var(--ipc-red); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.ipcheck-step .sn { font-size: 14.5px; font-weight: 700; color: var(--ipc-ink); margin-bottom: 3px; }
.ipcheck-step .sd { font-size: 12.5px; color: var(--ipc-muted); padding: 0 4px; }
.ipcheck-arrow { position: absolute; top: 15px; right: -12px; color: #d1d5db; font-size: 18px; }
.ipcheck-step:last-child .ipcheck-arrow { display: none; }

/* ===== FAQ ===== */
.ipcheck-faq details { border: 1px solid var(--ipc-line); border-radius: 12px; margin-bottom: 10px; background: #fff; overflow: hidden; }
.ipcheck-faq summary { list-style: none; cursor: pointer; padding: 10px 16px; font-size: 14.5px; font-weight: 700; color: var(--ipc-text); display: flex; align-items: center; gap: 10px; }
.ipcheck-faq summary::-webkit-details-marker { display: none; }
.ipcheck-faq summary::after { content: "+"; margin-left: auto; font-size: 20px; color: var(--ipc-red); font-weight: 600; transition: transform 0.2s; }
.ipcheck-faq details[open] summary::after { transform: rotate(45deg); }
.ipcheck-faq .ipcheck-a { padding: 2px 16px 13px; font-size: 13.5px; color: var(--ipc-body); }

/* ===== 底部帮助 ===== */
.ipcheck-help { font-size: 14px; color: #374151; }
.ipcheck-help p { margin: 8px 0; }
.ipcheck-help a { color: var(--ipc-blue); font-weight: 600; }
.ipcheck-help a:hover { text-decoration: underline; }

/* ===== 返回链接 / 工具页头部 ===== */
.ipcheck-back { margin-bottom: 12px; }
.ipcheck-back a { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--ipc-blue); }
.ipcheck-back a:hover { text-decoration: underline; }
.ipcheck-toolpage { background: var(--ipc-card); border: 1px solid var(--ipc-line); border-radius: 16px; box-shadow: var(--ipc-shadow); padding: 24px; margin-top: 8px; }
.ipcheck-toolhead { margin-bottom: 18px; }
.ipcheck-toolhead h1 { font-size: 24px; font-weight: 800; margin: 0 0 4px; color: var(--ipc-ink); }
.ipcheck-toolhead p { margin: 0; font-size: 13.5px; color: var(--ipc-muted); }

/* ===== 各工具通用 ===== */
.ipcheck-tool { background: transparent; }
.ipcheck-probe { margin: 0 0 14px; padding: 8px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--ipc-line); font-size: 12.5px; color: var(--ipc-muted); }
.ipcheck-probe-status { font-weight: 600; color: var(--ipc-body); }

.ipcheck-form,
.proxy-form,
.biz-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.proxy-form { flex-direction: column; align-items: stretch; }
.ipcheck-ip-input, .proxy-lines, .biz-line, .biz-scene, .proxy-mode {
	border: 1px solid var(--ipc-line); border-radius: 10px; padding: 9px 12px; font-size: 14px; color: var(--ipc-text); background: #fff; }
.ipcheck-ip-input { flex: 1; min-width: 200px; }
.proxy-lines { width: 100%; resize: vertical; font-family: inherit; }
.proxy-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.biz-line { flex: 1; min-width: 180px; }
.ipcheck-ip-input:focus, .proxy-lines:focus, .biz-line:focus, .biz-scene:focus, .proxy-mode:focus {
	border-color: var(--ipc-blue); outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.ipcheck-run, .ipcheck-start, .proxy-run, .speed-run, .biz-run {
	border: 0; border-radius: 10px; padding: 9px 18px; background: var(--ipc-primary); color: #fff; cursor: pointer; font-size: 14px; font-weight: 700; transition: opacity 0.15s ease; }
.ipcheck-run:hover, .ipcheck-start:hover, .proxy-run:hover, .speed-run:hover, .biz-run:hover { opacity: 0.9; }
.ipcheck-run:disabled, .ipcheck-start:disabled, .proxy-run:disabled, .speed-run:disabled, .biz-run:disabled { opacity: 0.6; cursor: default; }
.status, .proxy-status, .speed-status, .biz-status { color: var(--ipc-muted); font-size: 13px; }

/* ===== 进度动画 ===== */
.ipcheck-progress { position: relative; height: 6px; background: var(--ipc-line); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.ipcheck-progress::after { content: ''; position: absolute; top: 0; left: 0; height: 100%; width: 38%; border-radius: 999px; background: linear-gradient(90deg, var(--ipc-red), var(--ipc-blue)); animation: ipcSlide 1.1s ease-in-out infinite; }
@keyframes ipcSlide { 0% { transform: translateX(-120%); } 100% { transform: translateX(330%); } }
.ipcheck-spinner { width: 16px; height: 16px; border: 2px solid #cbd5e1; border-top-color: var(--ipc-blue); border-radius: 50%; display: inline-block; vertical-align: -3px; animation: ipcSpin 0.8s linear infinite; }
@keyframes ipcSpin { to { transform: rotate(360deg); } }
.ipcheck-loading { color: var(--ipc-muted); font-size: 13px; margin: 8px 0; }

/* ===== IP 质量结果 ===== */
.ipcheck-result { margin-top: 14px; }
.ipcheck-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.ipcheck-result-grid > div { background: #f8fafc; border: 1px solid var(--ipc-line); border-radius: 10px; padding: 12px; }
.ipcheck-label { display: block; font-size: 12px; color: var(--ipc-muted); margin-bottom: 2px; }
.ipcheck-value { font-weight: 600; color: var(--ipc-text); word-break: break-all; }
.ipcheck-risk { background: #f8fafc; border: 1px solid var(--ipc-line); border-radius: 10px; padding: 12px; }
.ipcheck-risk-score { font-size: 26px; font-weight: 800; }
.ipcheck-risk-label { font-size: 14px; font-weight: 600; }
.ipcheck-signals { margin-top: 8px; }
.ipcheck-tag { display: inline-block; margin: 2px 6px 2px 0; padding: 3px 10px; border-radius: 999px; background: #eef2ff; color: var(--ipc-blue); font-size: 12px; font-weight: 600; }
.ipcheck-rec { margin-top: 10px; font-weight: 600; color: var(--ipc-text); }
.ipcheck-err { color: #dc2626; font-size: 14px; }
.ipcheck-map-wrap { margin-top: 14px; }
.ipcheck-map { width: 100%; min-height: 240px; border: 1px solid var(--ipc-line); border-radius: 10px; overflow: hidden; background: #f1f5f9; }
.ipcheck-extra { margin-top: 14px; background: #f8fafc; border: 1px solid var(--ipc-line); border-radius: 10px; padding: 12px; }
.ipcheck-extra-title { font-weight: 600; margin-bottom: 8px; color: var(--ipc-text); }
.ipcheck-extra-item { margin: 6px 0; font-size: 13px; color: var(--ipc-body); }

/* ===== 测速 ===== */
.speed-top { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.speed-gauge { max-width: 240px; }
.speed-ctrl { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.speed-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.speed-metric { background: #f8fafc; border: 1px solid var(--ipc-line); border-radius: 10px; padding: 12px; }
.speed-num { display: block; font-size: 22px; font-weight: 700; color: var(--ipc-text); }
.speed-metric small { color: var(--ipc-muted); }
.speed-targets { margin-top: 12px; }
.speed-target-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.speed-target { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.speed-target.ok { background: #dcfce7; color: var(--ipc-green); }
.speed-target.fail { background: #fee2e2; color: #dc2626; }

/* ===== 代理检测 ===== */
.proxy-progress { color: var(--ipc-muted); font-size: 13px; margin-top: 8px; }
.proxy-table { border: 1px solid var(--ipc-line); border-radius: 10px; overflow: hidden; margin-top: 12px; }
.proxy-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr 1.5fr; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--ipc-line); font-size: 13px; color: var(--ipc-body); }
.proxy-head { background: #f8fafc; font-weight: 600; color: var(--ipc-text); }
.proxy-row:last-child { border-bottom: 0; }
.proxy-line { word-break: break-all; }
.tier-green { color: var(--ipc-green); font-weight: 600; }
.tier-yellow { color: #d97706; font-weight: 600; }
.tier-red { color: #dc2626; font-weight: 600; }

/* ===== 业务场景 ===== */
.biz-result { margin-top: 14px; }
.biz-score { display: flex; align-items: baseline; gap: 10px; }
.biz-score-num { font-size: 44px; font-weight: 800; }
.biz-score-tier { font-size: 18px; font-weight: 600; }
.biz-stars { color: #f59e0b; font-size: 18px; letter-spacing: 2px; }
.biz-advice { margin-top: 6px; color: var(--ipc-text); }
.biz-meta { margin-top: 6px; color: var(--ipc-body); font-size: 13px; }
.biz-targets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.biz-target { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.biz-target.ok { background: #dcfce7; color: var(--ipc-green); }
.biz-target.fail { background: #fee2e2; color: #dc2626; }

.ipcheck-note { margin-top: 10px; font-size: 12px; color: var(--ipc-muted); }

/* ===== 响应式 ===== */
@media (max-width: 960px) {
	.ipcheck-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
	.ipcheck-flow { grid-template-columns: 1fr 1fr; gap: 18px; }
	.ipcheck-arrow { display: none; }
}
@media (max-width: 640px) {
	.ipcheck-wrap { padding: 12px 12px 20px; }
	.ipcheck-headline h1 { font-size: 24px; }
	.ipcheck-sub { font-size: 13.5px; }
	.ipcheck-badge { margin-top: 7px; }
	.ipcheck-trust { flex-wrap: nowrap; gap: 5px; }
	.ipcheck-trust span { font-size: 11px; padding: 4px 8px; gap: 3px; white-space: nowrap; }
	.ipcheck-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
	.ipcheck-card { padding: 12px 10px 12px; border-radius: 12px; }
	.ipcheck-card .top { gap: 8px; margin-bottom: 8px; }
	.ipcheck-icon { width: 38px; height: 38px; border-radius: 10px; }
	.ipcheck-icon svg { width: 22px; height: 22px; }
	.ipcheck-card .nm { font-size: 14px; }
	.ipcheck-card .tagline { font-size: 11.5px; }
	.ipcheck-free { top: 10px; right: 8px; font-size: 10px; padding: 2px 7px; }
	.ipcheck-detail summary { display: flex; align-items: center; gap: 4px; cursor: pointer; list-style: none; font-size: 12px; font-weight: 600; color: var(--ipc-red); padding: 5px 0; }
	.ipcheck-detail summary::-webkit-details-marker { display: none; }
	.ipcheck-detail summary::after { content: "▾"; margin-left: 2px; transition: transform 0.2s; }
	.ipcheck-detail[open] summary::after { transform: rotate(180deg); }
	.ipcheck-card .lbl { font-size: 12px; margin-bottom: 3px; }
	.ipcheck-card .fn { font-size: 12.5px; margin-bottom: 8px; }
	.ipcheck-card ul li { font-size: 12.5px; padding: 2px 0 2px 16px; }
	.ipcheck-card ul li::before { font-size: 11px; top: 2px; }
	.ipcheck-card .fit { font-size: 11.5px; padding: 6px 8px; margin-top: 8px; }
	.ipcheck-go { font-size: 13px; padding: 9px 10px; margin-top: 10px; border-radius: 8px; }
	.ipcheck-sec { padding: 20px 16px; }
	.ipcheck-flow { grid-template-columns: 1fr 1fr; }
	.ipcheck-result-grid { grid-template-columns: 1fr; }
	.proxy-row { grid-template-columns: 1fr 1fr; }
	.proxy-head { display: none; }
}
