:root {
  --bg: #050508;
  --bg-soft: #0a0a12;
  --card: #0e0e1a;
  --card-2: #14141f;
  --ink: #ffffff;
  --body: #aeb5c7;
  --muted: #6f7789;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --primary: #3758f9;
  --primary-hover: #2c49d4;
  --green: #22c55e;
  --red: #f43f5e;
  --amber: #f59e0b;
  --gray: #64748b;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { background: var(--bg); }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* subtle glow like the maildog hero */
  background-image:
    radial-gradient(1000px 500px at 50% -10%, rgba(55, 88, 249, 0.14), transparent 60%);
  background-repeat: no-repeat;
}
h1, h2, h3 { color: var(--ink); }
a { color: inherit; }

/* Header */
.ud-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(8, 8, 15, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1160px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 20px; color: #fff; text-decoration: none; letter-spacing: -.01em;
}
.brand-icon { width: 26px; height: 26px; object-fit: contain; }
.brand-acc { color: var(--primary); }
.main-nav { display: flex; align-items: center; gap: 26px; margin-left: 14px; }
.main-nav a {
  color: var(--body); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color .15s;
}
.main-nav a:hover { color: #fff; }
.main-nav a.active { color: #fff; position: relative; }
.main-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -20px; height: 2px;
  background: var(--primary); border-radius: 2px;
}
.header-cta { margin-left: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid transparent; border-radius: 10px; padding: 10px 18px;
  font: inherit; font-weight: 600; text-decoration: none; transition: all .15s;
}
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 6px 20px rgba(55,88,249,.35); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.ghost { background: transparent; color: var(--body); border-color: var(--border-strong); }
.btn.ghost:hover { color: #fff; border-color: #fff; }

.container { max-width: 1040px; width: 100%; margin: 0 auto; padding: 40px 24px 60px; flex: 1; }

/* Hero */
.hero { text-align: center; margin-bottom: 34px; }
.hero h1 { font-size: 38px; margin: 0 0 12px; letter-spacing: -.02em; font-weight: 800; }
.sub { color: var(--muted); margin: 0; }
.hero .sub { max-width: 640px; margin: 0 auto; font-size: 16px; color: var(--body); }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; margin-bottom: 24px;
}

/* Upload */
.upload { max-width: 620px; margin: 0 auto 24px; }
.upload .field { display: block; margin-bottom: 16px; }
.upload .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; color: #fff; }
.upload .label em { color: var(--muted); font-weight: 400; font-style: normal; }
.upload input[type=file],
.upload textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border-strong);
  border-radius: 10px; font: inherit; background: var(--bg-soft); color: #fff;
}
.upload input[type=file] { color: var(--body); }
.upload textarea { resize: vertical; }
.upload textarea::placeholder { color: #565e70; }
.upload textarea:focus, .upload input[type=file]:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(55,88,249,.2);
}
.or { text-align: center; color: var(--muted); margin: 10px 0; font-size: 13px; }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.hint { color: var(--muted); font-size: 13px; }
.alert {
  background: rgba(244,63,94,.1); border: 1px solid rgba(244,63,94,.35); color: #fda4af;
  padding: 12px 16px; border-radius: 10px; margin: 0 auto 20px; max-width: 620px;
}

/* Results header */
.results-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.results-head h1 { margin: 0 0 4px; font-size: 26px; }

/* Live pill */
.live-pill {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  margin-left: 10px; font-size: 11px; font-weight: 700; letter-spacing: .07em;
  color: #93a5ff; background: rgba(55,88,249,.16); padding: 4px 10px; border-radius: 999px;
}
.live-pill.finished { color: #6ee7a8; background: rgba(34,197,94,.16); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .3; transform: scale(.7); } }

/* Progress card */
.progress-card { padding: 24px; }
.progress-top { display: flex; align-items: center; gap: 24px; margin-bottom: 18px; }
.pct-big { font-size: 48px; font-weight: 800; line-height: 1; color: #fff; letter-spacing: -.02em; }
.pct-sign { font-size: 24px; font-weight: 700; margin-left: 2px; color: var(--primary); }
.progress-card.complete .pct-sign { color: var(--green); }
.progress-meta .meta-line { font-size: 16px; color: var(--body); }
.progress-meta .meta-line b { font-size: 20px; color: #fff; }
.meta-sub { color: var(--muted); font-size: 13px; margin-top: 5px; }
.meta-sub .dot-sep { margin-left: 4px; }

.progress-bar { height: 10px; background: rgba(255,255,255,.07); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #3758f9, #6d86ff);
  transition: width .5s cubic-bezier(.4,0,.2,1);
  background-size: 40px 40px;
  animation: stripes 1s linear infinite;
  background-image: linear-gradient(45deg, rgba(255,255,255,.16) 25%, transparent 25%,
    transparent 50%, rgba(255,255,255,.16) 50%, rgba(255,255,255,.16) 75%, transparent 75%, transparent);
}
.progress-card.complete .progress-fill { background: var(--green); animation: none; }
@keyframes stripes { from { background-position: 0 0; } to { background-position: 40px 0; } }

/* Category colors */
:root {
  --c-good: #22c55e;
  --c-wrong_format: #f59e0b;
  --c-disable: #f97316;
  --c-verify: #3758f9;
  --c-not_exist: #f43f5e;
  --c-uncertain: #64748b;
}

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 15px 16px; border-top: 3px solid var(--gray);
}
.stat-card.cat-good { border-top-color: var(--c-good); }
.stat-card.cat-wrong_format { border-top-color: var(--c-wrong_format); }
.stat-card.cat-disable { border-top-color: var(--c-disable); }
.stat-card.cat-verify { border-top-color: var(--c-verify); }
.stat-card.cat-not_exist { border-top-color: var(--c-not_exist); }
.stat-card.cat-uncertain { border-top-color: var(--c-uncertain); }
.stat-top { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.stat-num { font-size: 28px; font-weight: 800; margin-top: 8px; line-height: 1; color: #fff; }
.stat-pct { color: var(--muted); font-size: 12px; margin-top: 4px; display: flex; flex-direction: column; }
.stat-note { color: #565e70; font-size: 11px; }

/* Donut + legend */
.summary h2, .card h2 { margin: 0 0 16px; font-size: 17px; }
.muted { color: var(--muted); font-weight: 400; font-size: 13px; }
.donut-row { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.donut {
  width: 150px; height: 150px; border-radius: 50%;
  background: conic-gradient(#20202e 0% 100%);
  display: grid; place-items: center; position: relative;
}
.donut::after {
  content: ""; position: absolute; width: 96px; height: 96px;
  background: var(--card); border-radius: 50%;
}
.donut span { position: relative; z-index: 1; font-size: 30px; font-weight: 800; color: #fff; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 240px; }
.legend li { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.legend li:last-child { border-bottom: none; }
.legend b { margin-left: auto; color: #fff; }
.dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.dot.cat-good { background: var(--c-good); }
.dot.cat-wrong_format { background: var(--c-wrong_format); }
.dot.cat-disable { background: var(--c-disable); }
.dot.cat-verify { background: var(--c-verify); }
.dot.cat-not_exist { background: var(--c-not_exist); }
.dot.cat-uncertain { background: var(--c-uncertain); }

/* Table */
.table-scroll { overflow-x: auto; }
.results-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.results-table th, .results-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.results-table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.results-table .email { font-weight: 500; color: #e6e9f2; }

.badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.cat-good { background: rgba(34,197,94,.15); color: #4ade80; }
.badge.cat-wrong_format { background: rgba(245,158,11,.15); color: #fbbf24; }
.badge.cat-disable { background: rgba(249,115,22,.15); color: #fdba74; }
.badge.cat-verify { background: rgba(55,88,249,.16); color: #93a5ff; }
.badge.cat-not_exist { background: rgba(244,63,94,.15); color: #fb7185; }
.badge.cat-uncertain { background: rgba(100,116,139,.18); color: #94a3b8; }

.results-table .detail {
  max-width: 340px; overflow: hidden; text-overflow: ellipsis;
  cursor: help; border-bottom: 1px dotted transparent;
}
.results-table td.detail:hover { color: #e6e9f2; }

/* Floating full-detail tooltip */
.tooltip {
  position: fixed; z-index: 100; left: 0; top: 0;
  max-width: 360px; white-space: normal; word-break: break-word;
  background: #16161f; border: 1px solid var(--border-strong);
  color: #e6e9f2; font-size: 12.5px; line-height: 1.5;
  padding: 8px 11px; border-radius: 8px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
  pointer-events: none; opacity: 0; transition: opacity .12s;
}
.tooltip.show { opacity: 1; }

.row-enter { animation: rowIn .45s ease; }
@keyframes rowIn {
  from { opacity: 0; transform: translateY(-6px); background: rgba(55,88,249,.08); }
  to { opacity: 1; transform: translateY(0); }
}

/* Table toolbar: filter chips + download */
.table-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 16px; flex-wrap: wrap;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg-soft); color: var(--body);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 13px; font-size: 13px; font-weight: 500; transition: all .15s;
}
.chip:hover { border-color: var(--border-strong); color: #fff; }
.chip.active { background: rgba(55,88,249,.16); border-color: var(--primary); color: #fff; }
.chip-count {
  font-size: 12px; font-weight: 700; color: var(--muted);
  background: rgba(255,255,255,.06); padding: 1px 7px; border-radius: 999px;
}
.chip.active .chip-count { color: #93a5ff; background: rgba(55,88,249,.22); }

.btn.ghost.sm, .btn.sm { padding: 7px 13px; font-size: 13px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

.pager {
  display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px;
}
.pager-info { color: var(--muted); font-size: 13px; }
.results-table .empty { text-align: center; color: var(--muted); padding: 28px; }

/* Column picker */
.select-card { max-width: 820px; margin: 0 auto 24px; }
.header-toggle {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  font-size: 14px; font-weight: 500; color: #fff; cursor: pointer;
}
.header-toggle input { width: 16px; height: 16px; accent-color: var(--primary); }
.preview-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.preview-table th, .preview-table td {
  padding: 9px 12px; border: 1px solid var(--border); text-align: left; white-space: nowrap;
}
.preview-table .col-head {
  cursor: pointer; color: var(--body); font-weight: 600; user-select: none;
  background: var(--bg-soft); transition: all .12s;
}
.preview-table .col-head:hover { color: #fff; }
.preview-table .col-head .radio {
  display: inline-block; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--muted); margin-right: 7px; vertical-align: -2px; transition: all .12s;
}
.preview-table .col-head.sel { color: #fff; background: rgba(55,88,249,.14); border-color: var(--primary); }
.preview-table .col-head.sel .radio { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 2px var(--card); }
.preview-table td.sel { background: rgba(55,88,249,.07); color: #e6e9f2; }
.preview-table tbody td { color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); padding: 22px 24px; text-align: center;
  color: var(--muted); font-size: 13px; display: flex; gap: 8px; justify-content: center;
}
.site-footer a { color: var(--body); text-decoration: none; }
.site-footer a:hover { color: #fff; }

@media (max-width: 980px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) {
  .main-nav { display: none; }
}
@media (max-width: 640px) {
  .results-head { flex-direction: column; align-items: flex-start; }
  .donut-row { gap: 24px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .progress-top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero h1 { font-size: 30px; }
}
