:root {
  --bg: #0f0e10;
  --bg-glow: rgba(111, 65, 210, 0.32);
  --panel: #0e0a13;
  --panel-border: #3a3642;
  --header-border: #2d2c2f;
  --text: #ffffff;
  --muted: #9a96a3;
  --purple: #6f41d2;
  --purple-hover: #7d52e0;
  --good: #22c55e;
  --disable: #ef4444;
  --unknown: #3b82f6;
  --verify: #eab308;
  --not-exist: #f97316;
  --radius-lg: 12px;
  --radius-md: 6px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 46% at 50% -8%, var(--bg-glow), transparent 58%),
    var(--bg);
}

button,
textarea,
input {
  font-family: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

[hidden] {
  display: none !important;
}

.site-header {
  border-bottom: 1px solid var(--header-border);
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(135deg, #8b5cf6, #6f41d2);
  box-shadow: 0 0 16px rgba(111, 65, 210, 0.7);
}

.nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  color: #d7d4de;
  text-decoration: none;
  font-size: 15px;
}

.nav-link.is-active {
  color: #fff;
  font-weight: 600;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
}

.lang-switch {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(14, 10, 19, 0.8);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-width: 40px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.lang-btn.is-active {
  background: var(--purple);
  color: #fff;
}

.workspace {
  max-width: 1180px;
  margin: 28px auto 0;
  padding: 0 24px 40px;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.io-box {
  width: 100%;
  height: 500px;
  min-height: 500px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  color: #fff;
}

.input-box {
  resize: none;
  padding: 16px 18px;
  outline: none;
  font-size: 14px;
  line-height: 1.6;
}

.input-box::placeholder {
  color: #8d8796;
}

.input-box:focus {
  border-color: #6b5a8f;
  box-shadow: 0 0 0 3px rgba(111, 65, 210, 0.16);
}

.result-box {
  position: relative;
  padding: 18px 18px 16px;
  overflow: auto;
}

.icon-copy {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: transparent;
  color: #cfc9db;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.icon-copy:hover {
  color: #fff;
  border-color: #6b5a8f;
}

.result-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: #7d7788;
  font-size: 14px;
}

.result-empty[hidden],
.result-list[hidden] {
  display: none !important;
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 36px;
  font-size: 13px;
  line-height: 1.5;
}

.result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.result-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-status,
.result-msg {
  font-weight: 600;
  white-space: nowrap;
}

.status-good {
  color: var(--good);
}

.status-disable {
  color: var(--disable);
}

.status-unknown {
  color: var(--unknown);
}

.status-verify {
  color: var(--verify);
}

.status-not_exist {
  color: var(--not-exist);
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 72px;
  border: 1px dashed #5a5566;
  border-radius: 10px;
  color: #d8d4e0;
  cursor: pointer;
  background: rgba(14, 10, 19, 0.55);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone.is-hover {
  border-color: var(--purple);
  background: rgba(111, 65, 210, 0.12);
}

.dropzone-title {
  font-size: 13px;
}

.dropzone-hint {
  color: var(--muted);
  font-size: 12px;
}

.meta-row {
  display: flex;
  align-items: center;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  color: #bdb7c8;
  font-size: 12px;
  background: rgba(14, 10, 19, 0.8);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-spacer {
  flex: 1;
}

.btn {
  border: 1px solid var(--panel-border);
  background: transparent;
  color: #fff;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-ghost {
  height: 30px;
  border-radius: 12px;
  font-size: 13px;
  color: #ece8f4;
}

.btn-clear:hover,
.btn-ghost:hover:not(:disabled) {
  border-color: #6b5a8f;
}

.btn-primary {
  min-width: 108px;
  border: 0;
  background: var(--purple);
}

.btn-primary:hover:not(:disabled) {
  background: var(--purple-hover);
}

.btn-primary.is-loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-primary.is-loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress {
  display: grid;
  gap: 6px;
}

.progress-bar {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple), #a78bfa);
  width: 0;
  transition: width 0.25s ease;
}

.progress-text {
  margin: 0;
  color: #b7b1c4;
  font-size: 12px;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px 0 12px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
  font-size: 13px;
  font-weight: 600;
}

.status-chip[data-status="good"] {
  color: var(--good);
}

.status-chip[data-status="disable"] {
  color: var(--disable);
}

.status-chip[data-status="unknown"] {
  color: var(--unknown);
}

.status-chip[data-status="verify"] {
  color: var(--verify);
}

.status-chip[data-status="not_exist"] {
  color: var(--not-exist);
}

.chip-action {
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 4px;
}

.chip-action:hover {
  background: rgba(255, 255, 255, 0.08);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 10px;
  background: #1c1726;
  border: 1px solid #4c3d73;
  color: #fff;
  font-size: 13px;
  z-index: 20;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: #7e7888;
  font-size: 12px;
}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .nav {
    display: none;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }

  .io-box {
    height: 280px;
    min-height: 280px;
  }

  .toolbar-spacer {
    display: none;
  }
}
