:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #152238;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #059669;
  --red: #dc2626;
  --amber: #d97706;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top right, #e0ebff 0, transparent 35%), var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
button, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 64px; }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.04em; }
h2 { margin: 0 0 6px; font-size: 19px; }
p { line-height: 1.6; }
.subtitle, .section-heading p { margin: 8px 0 0; color: var(--muted); }
.limit-badge { padding: 12px 18px; border: 1px solid #cfddfb; border-radius: 14px; background: #edf4ff; color: #475569; white-space: nowrap; }
.limit-badge strong { color: var(--blue); font-size: 22px; margin-left: 6px; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.hero-buttons { display: flex; align-items: center; gap: 10px; }
.account-box { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.account-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #334155; font-size: 13px; font-weight: 650; }
.account-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.account-chip strong { color: var(--blue); font-size: 15px; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; padding: 5px; width: fit-content; border: 1px solid var(--line); border-radius: 12px; background: #e9eef6; }
.tab { border: 0; border-radius: 9px; padding: 10px 20px; background: transparent; color: #526179; cursor: pointer; font-weight: 650; }
.tab.active { background: white; color: var(--blue); box-shadow: 0 2px 8px #1e293b12; }
.card { margin-bottom: 18px; padding: 24px; border: 1px solid #e4eaf2; border-radius: 18px; background: var(--card); box-shadow: 0 10px 35px #243b6410; }
.section-heading, .job-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.textarea { display: block; width: 100%; resize: vertical; border: 1px solid #ccd7e5; border-radius: 12px; outline: none; background: #fbfdff; color: var(--text); line-height: 1.65; transition: .2s; }
.textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #2563eb18; background: white; }
.textarea.usernames { min-height: 250px; padding: 16px; }
.file-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.file-button { padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; cursor: pointer; color: #334155; font-size: 13px; }
.file-button:hover { border-color: #a8b8cc; }
.file-name { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.counter { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 650; white-space: nowrap; }
.counter.over { color: var(--red); }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 16px; border: 0; border-radius: 9px; cursor: pointer; text-decoration: none; font-weight: 650; transition: .18s; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button.primary { background: var(--blue); color: white; }
.button.primary:hover:not(:disabled) { background: var(--blue-dark); }
.button.secondary { border: 1px solid var(--line); background: white; color: #334155; }
.button.danger { border: 1px solid #fecaca; background: #fff5f5; color: var(--red); }
.button.danger-solid { background: var(--red); color: white; }
.button.danger-solid:hover:not(:disabled) { background: #b91c1c; }
.button.success { background: var(--green); color: white; margin-top: 18px; }
.hint { color: var(--muted); font-size: 13px; }
.dialog { width: min(92vw, 380px); padding: 22px 24px; border: 0; border-radius: 14px; box-shadow: 0 20px 60px rgba(15, 23, 42, .28); }
.dialog::backdrop { background: rgba(15, 23, 42, .45); }
.dialog h3 { margin: 0 0 8px; font-size: 17px; }
.dialog p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.message { min-height: 20px; margin: 12px 0 0; color: var(--muted); font-size: 14px; white-space: pre-line; }
.message.error, #job-error { color: var(--red); }
.message.success { color: var(--green); }
.status-pill { align-self: flex-start; padding: 5px 10px; border-radius: 30px; font-size: 12px; font-weight: 750; }
.status-pill.running { background: #e0eaff; color: var(--blue); }
.status-pill.done { background: #d9f8ea; color: var(--green); }
.status-pill.error { background: #fee2e2; color: var(--red); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.muted { color: var(--muted); }
.progress-track { height: 10px; overflow: hidden; border-radius: 20px; background: #e8edf4; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #60a5fa); transition: width .35s; }
.progress-text { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 13px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.stat { padding: 16px; border-radius: 12px; background: #f8fafc; }
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat strong { display: block; margin-top: 5px; font-size: 26px; }
.stat.alive strong { color: var(--green); }
.stat.not-found strong { color: #475569; }
.stat.failed strong { color: var(--red); }
.stat.invalid strong { color: var(--amber); }
.toolbar-actions { display: flex; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.select { min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: white; color: #334155; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 12px 14px; background: #f8fafc; color: #526179; text-align: left; white-space: nowrap; }
td { max-width: 240px; padding: 13px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.record-time { color: #475569; white-space: nowrap; }
.record-username { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 650; }
.count-alive { color: var(--green); font-weight: 700; }
.count-banned { color: #475569; font-weight: 700; }
.link-button { padding: 0; border: 0; background: none; color: var(--blue); cursor: pointer; font-weight: 650; }
.link-button:hover { text-decoration: underline; }
.result-tag { display: inline-block; padding: 3px 9px; border-radius: 20px; background: #edf1f6; color: #475569; font-size: 12px; font-weight: 700; white-space: nowrap; }
.result-tag.alive { background: #d9f8ea; color: var(--green); }
.result-tag.failed { background: #fee2e2; color: var(--red); }
.result-tag.invalid { background: #fef3c7; color: var(--amber); }
.empty-row { padding: 30px; color: var(--muted); text-align: center; }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .container { width: min(100% - 20px, 1180px); padding-top: 24px; }
  .hero, .section-heading, .job-heading { flex-direction: column; }
  .limit-badge { align-self: flex-start; }
  .card { padding: 18px; border-radius: 14px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .toolbar-actions { justify-content: flex-start; }
  .file-row { flex-wrap: wrap; }
  .counter { width: 100%; margin-left: 0; }
  .actions { align-items: flex-start; flex-direction: column; }
  .hero-actions, .account-box { align-items: flex-start; }
}
