:root {
  color-scheme: dark;
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  background: #05090e;
  color: #e7f1f6;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #05090e; }
button, input, select { font: inherit; }
.shell { width: min(960px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: #d9e7ed; margin-bottom: 28px; letter-spacing: 0; }
.brand small { margin-left: auto; color: #718591; }
.signal { width: 10px; height: 10px; background: #2ad39b; box-shadow: 0 0 18px rgba(42, 211, 155, .8); }
nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; color: #9fb1bb; }
nav form { margin: 0; }
.panel { border: 1px solid #1b3542; border-radius: 6px; background: #09131b; padding: 26px; box-shadow: 0 14px 44px rgba(0, 0, 0, .28); }
.panel + .panel { margin-top: 16px; }
.compact { max-width: 480px; margin: 10vh auto 0; }
.eyebrow { color: #42c9eb; font-size: 12px; font-weight: 800; margin: 0 0 10px; }
h1, h2 { margin: 0; letter-spacing: 0; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
.muted { color: #8ca0aa; margin: 10px 0 24px; }
.form-grid, .upload-grid { display: grid; gap: 18px; }
.upload-grid { grid-template-columns: 180px 1fr auto; align-items: end; }
label { display: grid; gap: 8px; color: #aebfc7; font-size: 14px; }
input, select { width: 100%; min-height: 46px; border: 1px solid #29434f; border-radius: 4px; background: #050c12; color: #eef7fa; padding: 10px 12px; outline: none; }
input:focus, select:focus { border-color: #2ad39b; box-shadow: 0 0 0 3px rgba(42, 211, 155, .12); }
input[type="file"] { padding: 8px; }
button { min-height: 46px; border: 1px solid #2ad39b; border-radius: 4px; background: #2ad39b; color: #03130d; font-weight: 800; padding: 0 22px; cursor: pointer; }
button:hover { background: #5be5b6; }
.ghost { min-height: 36px; background: transparent; border-color: #294654; color: #a9bac2; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.status { border: 1px solid #1f8f6a; color: #49d9a8; padding: 6px 10px; font-size: 13px; }
.result-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 18px; color: #9fb1bb; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin: 24px 0 0; background: #17303c; }
.stats div { background: #071019; padding: 18px; }
.stats dt { color: #81959f; font-size: 13px; }
.stats dd { margin: 8px 0 0; font-size: 24px; font-weight: 800; }
.success { color: #42dda8; }
.danger { color: #ff8585; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.blacklist-result { border-color: #6f3439; }
.blacklist-result .status { border-color: #843f47; color: #ff9a9a; }
.blacklist-note { display: flex; gap: 10px; align-items: center; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid #172c36; color: #899da7; font-size: 13px; }
.blacklist-note strong { color: #ff9a9a; }
.download-link { min-height: 40px; display: inline-flex; align-items: center; border: 1px solid #2b6578; color: #8ee7fb; padding: 0 14px; text-decoration: none; font-weight: 700; }
.download-link:hover, .download-link:focus-visible { border-color: #42c9eb; background: #0b202b; outline: none; }
.whitelist-panel { margin-bottom: 16px; }
.whitelist-add { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; margin-top: 20px; }
.whitelist-list { margin-top: 18px; border-top: 1px solid #183645; }
.whitelist-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; padding: 14px 0; border-bottom: 1px solid #142d39; }
.whitelist-edit { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; gap: 10px; align-items: end; }
.binding-status { min-height: 46px; display: inline-flex; align-items: center; color: #8299a4; font-size: 13px; white-space: nowrap; }
.danger-button { border-color: #743f46; background: #251216; color: #ffaaaa; }
.danger-button:hover { background: #3a181e; }
.empty-row { color: #718591; margin: 16px 0 0; }
.alert { padding: 12px 14px; margin: 0 0 18px; border: 1px solid; border-radius: 4px; }
.alert strong, .alert span { display: block; }
.alert span { margin-top: 6px; }
.error { color: #ffaaaa; border-color: #773f46; background: #241014; }

@media (max-width: 760px) {
  .shell { width: min(100% - 20px, 920px); padding-top: 18px; }
  .panel { padding: 20px; }
  .upload-grid { grid-template-columns: 1fr; }
  .whitelist-add, .whitelist-row, .whitelist-edit { grid-template-columns: 1fr; }
  .binding-status { min-height: auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .blacklist-note { align-items: flex-start; flex-direction: column; gap: 4px; }
  .brand small { display: none; }
  h1 { font-size: 30px; }
}
