:root {
  --bg0: #07090f;
  --bg1: #0d1220;
  --glass: rgba(18, 24, 40, 0.62);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text: #e8edf7;
  --muted: #93a0b8;
  --accent: #6ee7ff;
  --accent2: #a78bfa;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --chip: rgba(255, 255, 255, 0.06);
  --radius: 22px;
  --font: "Noto Sans SC", "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 10% -10%, #15203a 0%, transparent 55%),
    radial-gradient(900px 600px at 90% 0%, #1a1030 0%, transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x: hidden;
}

.bg-orb {
  position: fixed; border-radius: 50%; filter: blur(60px); opacity: 0.35;
  pointer-events: none; z-index: 0;
}
.orb-a { width: 420px; height: 420px; background: #2266ff; top: -80px; left: -60px; }
.orb-b { width: 360px; height: 360px; background: #7c3aed; top: 20%; right: -80px; }
.orb-c { width: 280px; height: 280px; background: #06b6d4; bottom: 5%; left: 30%; opacity: 0.22; }

.topbar, .layout, .foot { position: relative; z-index: 1; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 28px 8px; max-width: 960px; margin: 0 auto;
}
.brand { display: flex; gap: 14px; align-items: center; }
.logo {
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center; font-weight: 700; font-size: 14px; letter-spacing: 1px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #061018; box-shadow: 0 10px 30px rgba(110, 231, 255, 0.25);
  flex-shrink: 0;
}
.topbar h1 { margin: 0; font-size: 1.2rem; font-weight: 700; letter-spacing: 0.02em; }
.tagline { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.pill {
  font-family: var(--mono); font-size: 12px; padding: 6px 10px; border-radius: 999px;
  background: rgba(52, 211, 153, 0.12); color: var(--good);
  border: 1px solid rgba(52, 211, 153, 0.25); white-space: nowrap;
}
.pill.soft {
  background: rgba(110, 231, 255, 0.1); color: var(--accent);
  border-color: rgba(110, 231, 255, 0.25);
}

.layout {
  max-width: 960px; margin: 0 auto; padding: 12px 28px 40px;
  display: grid; gap: 18px;
}

.banner {
  display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap;
  padding: 14px 18px; font-size: 0.9rem; line-height: 1.55; color: #c7d2fe;
}
.banner strong {
  color: var(--accent); font-size: 0.78rem; letter-spacing: 0.06em;
  text-transform: uppercase; padding-top: 2px;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow);
}
.glass-inner {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

.panel { padding: 22px 24px 24px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 10px; flex-wrap: wrap;
}
.panel-head h2 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.progress-meta { display: flex; gap: 8px; align-items: center; }

.ethics {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 16px; margin-bottom: 16px;
  background: rgba(251, 113, 133, 0.08); border: 1px solid rgba(251, 113, 133, 0.22);
  color: #fecdd3; font-size: 0.92rem; line-height: 1.5; cursor: pointer;
}
.ethics input { margin-top: 4px; accent-color: var(--bad); width: 16px; height: 16px; flex-shrink: 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) {
  .grid2 { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 18px 6px; }
  .layout { padding: 10px 16px 32px; }
  .panel { padding: 18px 16px 20px; }
}

.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.field input {
  border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(0, 0, 0, 0.28);
  color: var(--text); border-radius: 14px; padding: 12px 14px; font: inherit; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s; width: 100%;
}
.field input:focus {
  border-color: rgba(110, 231, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(110, 231, 255, 0.12);
}

.run-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.primary {
  border: 0; cursor: pointer; font: inherit; font-weight: 600;
  padding: 12px 22px; border-radius: 14px; color: #041018;
  background: linear-gradient(135deg, #67e8f9, #a78bfa 70%);
  box-shadow: 0 12px 30px rgba(103, 232, 249, 0.25);
  transition: transform 0.12s, opacity 0.12s, filter 0.12s;
}
.primary:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.05); }
.primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

.ghost-btn, .text-btn, .link-btn, .copy-btn {
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04);
  color: var(--text); border-radius: 12px; padding: 8px 12px; font: inherit; cursor: pointer;
  text-decoration: none; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
}
.text-btn { border: 0; background: transparent; color: var(--accent); padding: 4px 6px; }
.link-btn {
  background: rgba(110, 231, 255, 0.1); border-color: rgba(110, 231, 255, 0.28); color: var(--accent);
}
.link-btn:hover { filter: brightness(1.1); }
.copy-btn { color: var(--muted); }
.copy-btn:hover { color: var(--accent); }
.status { color: var(--muted); font-size: 0.9rem; flex: 1; min-width: 160px; }

.progress-wrap { margin-bottom: 16px; }
.progress-bar {
  height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.25s ease;
}
.hint { margin: 10px 0 0; color: var(--muted); font-size: 0.85rem; line-height: 1.45; }

.tip-box {
  background: rgba(52, 211, 153, 0.07); border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 16px; padding: 14px 16px; margin-bottom: 18px;
}
.tip-box h4 { margin: 0 0 8px; color: var(--good); font-size: 0.92rem; }
.tip-box ol { margin: 0; padding-left: 18px; color: #d1fae5; }
.tip-box li { margin: 4px 0; line-height: 1.45; font-size: 0.9rem; }

.cat-block { margin-bottom: 18px; }
.cat-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.cat-head h3 { margin: 0; font-size: 0.98rem; font-weight: 600; }
.cat-head .cat-desc { color: var(--muted); font-size: 0.82rem; }

.action-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.action-list li {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.action-list li.done { opacity: 0.55; }
.action-list li.done .action-title { text-decoration: line-through; }
.action-list label {
  display: flex; gap: 10px; align-items: flex-start; flex: 1; cursor: pointer; min-width: 0;
}
.action-list input[type="checkbox"] {
  margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0;
}
.action-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.action-title { font-weight: 600; font-size: 0.92rem; }
.action-main small { color: var(--muted); line-height: 1.45; font-size: 0.82rem; }
.action-btns { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.tag {
  display: inline-block; font-family: var(--mono); font-size: 10px; padding: 2px 7px;
  border-radius: 6px; margin-right: 6px; vertical-align: middle;
}
.tag-cn { background: rgba(52, 211, 153, 0.15); color: #a7f3d0; }
.tag-breach { background: rgba(251, 113, 133, 0.15); color: #fda4af; }
.tag-guide { background: rgba(110, 231, 255, 0.12); color: #a5f3fc; }
.tag-phone { background: rgba(251, 191, 36, 0.14); color: #fcd34d; }

.tag-email { background: rgba(251, 113, 133, 0.14); color: #fda4af; }
.tag-app { background: rgba(96, 165, 250, 0.16); color: #93c5fd; }
.tag-delete { background: rgba(251, 191, 36, 0.14); color: #fcd34d; }
.family-toggle { margin-top: 8px; opacity: 0.95; }
.family-toggle strong { color: var(--accent2, #a78bfa); }







.muted-inline { color: var(--muted); font-size: 0.82rem; font-weight: 400; }

.foot {
  max-width: 960px; margin: 0 auto 30px; padding: 0 28px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--muted); font-size: 0.78rem;
}
@media (max-width: 720px) {
  .foot { padding: 0 16px; }
  .action-list li { flex-direction: column; }
  .action-btns { flex-direction: row; align-items: center; width: 100%; justify-content: flex-end; }
}

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.92); color: var(--text); border: 1px solid rgba(110, 231, 255, 0.35);
  padding: 10px 16px; border-radius: 12px; font-size: 0.85rem; z-index: 50;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
  backdrop-filter: blur(12px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* —— v2.0 国内一键自查 —— */
.ghost-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(110, 231, 255, 0.2);
  border-top-color: var(--accent);
  animation: df-spin 0.7s linear infinite; flex-shrink: 0;
}
@keyframes df-spin { to { transform: rotate(360deg); } }

.scan-loading {
  display: flex; flex-direction: column; align-items: stretch; gap: 12px;
  padding: 18px 14px; margin-bottom: 12px;
  color: var(--muted); font-size: 0.92rem;
}
.scan-progress-head {
  display: flex; align-items: center; gap: 12px;
}
.scan-progress-copy {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.scan-progress-copy strong {
  color: var(--text, #e2e8f0); font-size: 0.95rem; font-weight: 600;
}
.scan-progress-copy span {
  color: var(--muted); font-size: 0.8rem;
}
.scan-progress-wrap { width: 100%; }
.scan-progress-bar {
  height: 8px; border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}
.scan-progress-fill {
  height: 100%; width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #818cf8, #34d399);
  background-size: 200% 100%;
  transition: width 0.35s ease;
  animation: df-sheen 1.6s linear infinite;
}
@keyframes df-sheen {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.scan-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 6px;
}
.scan-steps li {
  font-size: 0.72rem; padding: 6px 8px; border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted); text-align: center;
}
.scan-steps li.active {
  color: #a5f3fc;
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.1);
}
.scan-steps li.done {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.08);
}

.findings-list { margin-bottom: 4px; }
.empty-finding {
  padding: 14px; border-radius: 14px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  list-style: none;
}

.tag-found { background: rgba(52, 211, 153, 0.18); color: #6ee7b7; }
.tag-miss { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }
.tag-blocked { background: rgba(251, 191, 36, 0.16); color: #fcd34d; }
.tag-guided { background: rgba(167, 139, 250, 0.16); color: #ddd6fe; }
.tag-error { background: rgba(251, 113, 133, 0.16); color: #fda4af; }

#scanNote {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(110, 231, 255, 0.06);
  border: 1px solid rgba(110, 231, 255, 0.14);
  color: #c7d2fe;
  font-size: 0.85rem;
  line-height: 1.5;
}
#scanNote:empty { display: none; }
