/* DeepSearch Pro — 主题与组件
 * 配色沿用深紫方案：面板 #3a2a5c→#221636，主色 #a855f7→#7c3aed，强调 #c084fc
 */
:root {
  --accent: #c084fc;
  --accent-2: #a855f7;
  --accent-3: #7c3aed;
  --text: #ffffff;
  --text-2: #e5daf7;
  --text-3: #c4bbe0;
  --muted: #a99cc9;
  --panel-1: #3a2a5c;
  --panel-2: #221636;
  --line: rgba(192, 132, 252, 0.3);
  --danger: #ef4444;
  --ok: #22c55e;
  --radius: 16px;
  --maxw: 460px;
  --shadow: 0 10px 32px rgba(0, 0, 0, .55), 0 0 0 1px rgba(168, 85, 247, .08),
            inset 0 1px 0 rgba(255, 255, 255, .05);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', 'PingFang SC', 'Hiragino Sans', 'Noto Sans KR',
               'Noto Naskh Arabic', Arial, sans-serif;
  color: var(--text);
  background-color: rgb(12, 8, 20);
  background-image: radial-gradient(at center top,
    rgb(52, 32, 84) 0%, rgb(40, 22, 60) 40%, rgb(28, 14, 38) 75%, rgb(12, 8, 20) 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  transition: opacity .25s ease;
}
body.is-ready { opacity: 1; }

/* ---------------- 布局 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 64px;
  padding: 0 16px;
  background: rgba(20, 12, 32, .72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(150deg, #2a2140, #14101f);
  border: 1px solid rgba(192, 132, 252, .35);
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
}
.logo-mark svg { width: 19px; height: 19px; color: #fff; }
.logo-text { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.logo-text em { font-style: normal; color: var(--accent); }

#lang-picker { position: absolute; inset-inline-end: 12px; }
.lang-select {
  appearance: none;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--text-3);
  font: inherit; font-size: 12px;
  padding: 6px 26px 6px 10px; border-radius: 8px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a99cc9' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 12px;
}
[dir='rtl'] .lang-select { padding: 6px 10px 6px 26px; background-position: left 7px center; }
.lang-select option { background: #221636; color: #fff; }

.main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 16px 132px;
}

.screen { opacity: 0; transform: translateY(8px); transition: opacity .32s ease, transform .32s ease; }
.screen.is-in { opacity: 1; transform: none; }

/* ---------------- 排版 ---------------- */
.scr-title {
  margin: 4px 0 14px;
  font-size: 27px; font-weight: 800; line-height: 1.18;
  letter-spacing: -.02em; text-align: center;
}
.scr-title.sm { font-size: 23px; text-align: start; margin-bottom: 8px; }
.scr-title span { color: var(--accent); }
.scr-sub { margin: 0 0 18px; font-size: 14px; line-height: 1.45; color: var(--text-3); text-align: start; }
.scr-sub.after { margin-top: 14px; }

/* ---------------- 卡片 ---------------- */
.card {
  background: linear-gradient(160deg, var(--panel-1) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px;
  margin: 0 0 20px;
}
.search-card { border-width: 1.5px; border-color: rgba(192, 132, 252, .5); border-radius: 20px; padding: 24px; }
.search-heading { font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 18px; letter-spacing: -.2px; }
.discreet {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  margin-top: 10px; font-size: 12.5px; color: var(--muted);
}
.discreet svg { width: 13px; height: 13px; }

/* ---------------- 输入框 ---------------- */
.input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 17px 16px; margin-bottom: 14px;
  background: rgba(0, 0, 0, .22);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.input-wrap.outline { background: rgba(0, 0, 0, .35); border-radius: 14px; border-color: rgba(192, 132, 252, .35); }
.input-wrap:focus-within { border-color: rgba(192, 132, 252, .65); box-shadow: 0 0 0 3px rgba(168, 85, 247, .16); }
.input-wrap svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.txt {
  flex: 1; min-width: 0; width: 100%;
  border: 0; background: transparent; outline: none;
  font: inherit; font-size: 16px; color: #fff;
}
.txt::placeholder { color: #7a6e9c; }
.err { color: #ff8b8b; font-size: 13px; margin: -6px 0 12px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 16px 18px;
  border: 0; border-radius: 12px;
  font: inherit; font-size: 15px; font-weight: 700; color: #fff;
  cursor: pointer; text-transform: uppercase; letter-spacing: .3px;
  transition: transform .16s, box-shadow .2s, background .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow: 0 6px 20px rgba(168, 85, 247, .4);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(168, 85, 247, .5); }
.btn.is-disabled {
  background: rgba(255, 255, 255, .06);
  color: #6b6386; box-shadow: none; pointer-events: none; transform: none;
}

/* 底部固定 CTA */
.cta-wrap {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(12, 8, 20, .96) 55%, rgba(12, 8, 20, 0));
}
.cta-inner { max-width: var(--maxw); margin: 0 auto; }

/* ---------------- 选项 ---------------- */
.options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.opt {
  display: block; width: 100%; text-align: start;
  padding: 17px 20px;
  background: #fff; color: #16111f;
  border: 2px solid transparent; border-radius: 14px;
  font: inherit; font-size: 16px; font-weight: 700; line-height: 1.35;
  cursor: pointer;
  transition: transform .14s, box-shadow .2s, border-color .2s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.opt:hover { transform: translateY(-1px); }
.opt.is-on {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, .25), 0 4px 14px rgba(0, 0, 0, .3);
}
.opt span { display: block; }

/* ---------------- 提示条 ---------------- */
.tip {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; margin: 4px 0 8px;
  background: linear-gradient(160deg, rgba(58, 42, 92, .85), rgba(34, 22, 54, .85));
  border: 1px solid rgba(192, 132, 252, .28);
  border-radius: 14px;
}
.tip p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--text-3); text-align: start; }
.tip p b { color: #fff; }
.tip-ic {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(192, 132, 252, .14); border: 1px solid rgba(192, 132, 252, .3);
}
.tip-ic svg { width: 15px; height: 15px; color: var(--accent); }
.tip.danger { border-color: rgba(239, 68, 68, .35); }
.tip.danger .tip-ic { background: rgba(239, 68, 68, .14); border-color: rgba(239, 68, 68, .4); }
.tip.danger .tip-ic svg { color: #ff6b6b; }

/* ---------------- 实时数字卡 ---------------- */
.pill {
  display: flex; align-items: center; gap: 6px; width: fit-content;
  margin: 0 auto 13px; padding: 4px 10px;
  background: rgba(239, 68, 68, .16); border: 1px solid rgba(239, 68, 68, .45);
  border-radius: 999px;
}
.pill span { font-size: 10px; font-weight: 700; letter-spacing: .16em; color: #f87171; text-transform: uppercase; }
.dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--danger);
  box-shadow: 0 0 8px var(--danger); animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.stats-row { display: flex; gap: 8px; align-items: center; }
.stat { display: flex; align-items: center; justify-content: center; gap: 5px; flex: 1; min-width: 0; }
.stat svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--accent); }
.stat b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat b.accent { color: var(--accent); }
.stat span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stats-hero { margin-top: 14px; text-align: center; }
.big-num {
  font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #fff, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 22px rgba(168, 85, 247, .4);
}
.big-label { font-size: 13px; color: var(--text-3); margin-top: 6px; }
.avatars-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 13px; }
.avatars { display: flex; flex-shrink: 0; }
.avatars img {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--panel-2); margin-inline-start: -8px; background: #2a2046;
}
.avatars img:first-child { margin-inline-start: 0; }
.avatars-row span { font-size: 12px; color: var(--muted); }

.badges {
  display: flex; align-items: center; justify-content: space-around; gap: 8px;
  padding: 13px 10px; border-radius: 14px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07);
}
.badges span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.badges svg { width: 14px; height: 14px; color: var(--accent); }

/* ---------------- 扫描卡 ---------------- */
.scan-head { display: flex; align-items: center; gap: 9px; }
.scan-head span { font-size: 16px; font-weight: 700; }
.spinner, .mini {
  border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(192, 132, 252, .25); border-top-color: var(--accent);
  animation: rot .8s linear infinite;
}
.spinner { width: 16px; height: 16px; }
.mini { width: 14px; height: 14px; display: block; }
@keyframes rot { to { transform: rotate(360deg); } }

.scan-sub { font-size: 12.5px; color: var(--muted); margin: 2px 0 16px; }
.scan-sub span { color: var(--text-3); }
.scan-rows { display: flex; flex-direction: column; gap: 11px; }
.scan-row {
  display: flex; align-items: center; gap: 11px;
  opacity: 0; transform: translateY(-6px);
  transition: opacity .4s ease, transform .4s ease;
}
.scan-row.is-in { opacity: 1; transform: none; }
.scan-ic {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(192, 132, 252, .12); border: 1px solid rgba(192, 132, 252, .25);
}
.scan-ic svg { width: 13px; height: 13px; }
.scan-row.is-running .scan-ic { background: transparent; border-color: transparent; }
.scan-row.is-done .scan-ic { background: rgba(34, 197, 94, .15); border-color: rgba(34, 197, 94, .5); }
.scan-row.is-done .scan-ic svg { color: var(--ok); }
.scan-txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; color: var(--text-2); text-align: start; }
.scan-row.is-running .scan-txt { color: var(--text-3); }
.scan-tag { font-size: 13px; font-weight: 700; white-space: nowrap; }
.scan-tag em { font-style: normal; color: #fff; }
.scan-tag em.hit { color: var(--accent); }
.scan-tag em.ellip { display: inline-block; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.scan-tag .blink { color: var(--muted); animation: blink 1.3s infinite ease-in-out; }
@keyframes blink { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.badge {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  font-size: 12px; font-weight: 700; color: #fff;
  box-shadow: 0 3px 12px rgba(168, 85, 247, .4);
}
.scan-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 13px; color: var(--text-3);
}
.scan-foot b { color: #fff; font-weight: 600; }

/* ---------------- 档案卡 ---------------- */
.dossier { position: relative; padding-top: 16px; margin-bottom: 22px; opacity: 0; transform: translateY(-10px); transition: opacity .45s ease, transform .45s ease; }
.dossier.is-in { opacity: 1; transform: none; }
.dossier .sheet {
  position: absolute; left: 50%; border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #efeaf7, #ddd4ec);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
  transform-origin: bottom center; padding: 16px 18px; filter: blur(.4px);
}
.dossier .sheet.s1 { width: 86%; height: 74%; top: 2px; transform: translateX(-50%) rotate(-3.2deg); }
.dossier .sheet.s2 { width: 88%; height: 76%; top: 6px; transform: translateX(-50%) rotate(2.4deg); }
.dossier .ln { display: block; height: 6px; border-radius: 3px; background: rgba(124, 58, 237, .16); margin-bottom: 8px; }
.dossier .ln.a { width: 70%; } .dossier .ln.b { width: 90%; } .dossier .ln.c { width: 55%; }

.folder {
  position: relative; z-index: 3;
  background: linear-gradient(165deg, #46336e 0%, #2a1c44 100%);
  border: 1px solid rgba(192, 132, 252, .32);
  border-radius: 6px 14px 14px 14px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  padding: 20px 20px 18px;
}
.folder-tab {
  position: absolute; top: -15px; inset-inline-start: 18px;
  background: linear-gradient(165deg, #46336e, #2a1c44);
  border: 1px solid rgba(192, 132, 252, .32); border-bottom: none;
  border-radius: 8px 8px 0 0; padding: 5px 16px 7px;
  font-size: 10px; font-weight: 800; letter-spacing: .18em; color: #c9b8e8; text-transform: uppercase;
}
.folder-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kicker { font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; margin-bottom: 5px; }
.subject { font-size: 20px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stamp {
  flex-shrink: 0; transform: rotate(9deg); opacity: 0;
  border: 2px solid var(--danger); color: #ff6b6b; border-radius: 6px;
  padding: 4px 9px; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  line-height: 1.25; text-align: center;
  box-shadow: 0 0 12px rgba(239, 68, 68, .25);
  transition: opacity .3s ease;
}
.stamp.is-in { opacity: .95; }

.photo-row {
  display: flex; align-items: center; gap: 14px; margin-top: 16px;
  padding: 13px; border-radius: 12px;
  background: rgba(0, 0, 0, .18); border: 1px solid rgba(192, 132, 252, .14);
}
.ava-blur { position: relative; width: 54px; height: 54px; flex-shrink: 0; }
.ava-blur img { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; filter: blur(6px); background: #2a2046; transition: opacity .35s ease; }
.ava-lock { position: absolute; inset: 0; display: grid; place-items: center; }
.ava-lock svg { width: 18px; height: 18px; color: #fff; opacity: .92; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)); }
.redact { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.redact .rl { display: block; height: 11px; border-radius: 4px; filter: blur(1.5px); background: linear-gradient(90deg, rgba(192, 132, 252, .5), rgba(192, 132, 252, .15)); }
.redact .w90 { width: 90%; } .redact .w70 { width: 70%; } .redact .w50 { width: 50%; }

.folder-rows { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.frow { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #d7cdee; }
.fk { flex: 1; min-width: 0; text-align: start; }
.fv { font-weight: 700; color: #fff; white-space: nowrap; }
.fv.locked { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.fv.locked svg { width: 11px; height: 11px; }
.folder-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 16px; padding-top: 13px; border-top: 1px solid rgba(255, 255, 255, .08);
}
.findings { display: flex; align-items: baseline; gap: 6px; }
.findings b { font-size: 22px; font-weight: 800; color: var(--accent); line-height: 1; }
.findings span { font-size: 12px; color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--danger); letter-spacing: .06em; }

/* ---------------- 邮箱卡 ---------------- */
.email-card h2 { margin: 12px 0 8px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.email-card p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--text-3); }
.email-card p b { color: #fff; }
.email-card .tip { margin-bottom: 16px; }
.email-card .hint { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.chip.ok { background: rgba(34, 197, 94, .14); border: 1px solid rgba(34, 197, 94, .45); color: #4ade80; }
.chip svg { width: 12px; height: 12px; }

/* ---------------- 页脚 ---------------- */
.foot {
  max-width: var(--maxw); margin: 0 auto; padding: 26px 16px 40px;
  font-size: 11.5px; line-height: 1.55; color: #7f7499; text-align: center;
}
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-bottom: 12px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* ---------------- RTL ---------------- */
[dir='rtl'] .folder { border-radius: 14px 6px 14px 14px; }
[dir='rtl'] .stamp { transform: rotate(-9deg); }
[dir='rtl'] .dossier .sheet.s1 { transform: translateX(-50%) rotate(3.2deg); }
[dir='rtl'] .dossier .sheet.s2 { transform: translateX(-50%) rotate(-2.4deg); }
[dir='rtl'] .redact .rl { background: linear-gradient(270deg, rgba(192, 132, 252, .5), rgba(192, 132, 252, .15)); }
[dir='rtl'] .big-num { background: linear-gradient(270deg, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; }

@media (max-width: 400px) {
  .scr-title { font-size: 24px; }
  .scr-title.sm { font-size: 21px; }
  .opt { padding: 15px 16px; font-size: 15px; }
}
