:root {
  --bg-0: #09111d;
  --bg-1: #131e31;
  --ink: #e8f1ff;
  --ink-dim: #9bb0ce;
  --line: rgba(126, 170, 255, 0.24);
  --card: rgba(14, 26, 46, 0.74);
  --accent: #5de1b5;
  --accent-2: #70b8ff;
  --danger: #ff8d8d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: "Space Grotesk", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1000px 520px at -10% -10%, rgba(112, 184, 255, 0.23), transparent 56%),
    radial-gradient(900px 520px at 110% 0%, rgba(93, 225, 181, 0.19), transparent 58%),
    linear-gradient(140deg, var(--bg-0), var(--bg-1));
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.62;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 5px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.014), rgba(255, 255, 255, 0.014) 1px, transparent 1px, transparent 5px);
  mask-image: radial-gradient(circle at center, black 48%, transparent 92%);
}

.page {
  width: min(1080px, 94vw);
  margin: 22px auto 30px;
  display: grid;
  gap: 14px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 14px 34px rgba(5, 12, 24, 0.4);
  backdrop-filter: blur(9px);
}

.hero {
  padding: 18px 18px 16px;
}

.eyebrow {
  margin: 0;
  color: #93c5ff;
  letter-spacing: 0.14em;
  font-size: 11px;
}

.hero h1 {
  margin: 6px 0 8px;
  line-height: 1.04;
  font-size: clamp(28px, 4vw, 46px);
}

.sub {
  margin: 0;
  color: var(--ink-dim);
}

.hint {
  margin: 8px 0 0;
  color: #ffd88f;
  font-size: 13px;
}

.panel {
  padding: 12px;
}

.dropzone {
  border: 1px dashed rgba(126, 170, 255, 0.46);
  border-radius: 14px;
  min-height: 148px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  background: linear-gradient(180deg, rgba(18, 35, 63, 0.52), rgba(7, 18, 35, 0.44));
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.dropzone:hover,
.dropzone.dragover {
  transform: translateY(-1px);
  border-color: rgba(93, 225, 181, 0.72);
  background: linear-gradient(180deg, rgba(24, 50, 85, 0.64), rgba(10, 22, 42, 0.54));
}

.dropzone strong {
  font-size: clamp(18px, 2vw, 26px);
}

.dropzone span {
  color: var(--ink-dim);
  font-size: 13px;
}

.dropzone input {
  display: none;
}

.toolbar {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn {
  height: 38px;
  border: 1px solid rgba(126, 170, 255, 0.42);
  border-radius: 11px;
  background: rgba(8, 19, 37, 0.78);
  color: var(--ink);
  font: inherit;
  padding: 0 14px;
  cursor: pointer;
}

.select {
  height: 38px;
  border: 1px solid rgba(126, 170, 255, 0.42);
  border-radius: 11px;
  background: rgba(8, 19, 37, 0.78);
  color: var(--ink);
  font: inherit;
  padding: 0 10px;
}

.inline-label {
  color: var(--ink-dim);
  font-size: 12px;
}

.btn.primary {
  border: none;
  color: #081a2f;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}

.btn.danger {
  border-color: rgba(255, 141, 141, 0.55);
  color: #ffb8b8;
}

.btn:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.status {
  margin-left: auto;
  color: var(--ink-dim);
  font-size: 13px;
}

.stats {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric {
  border: 1px solid rgba(126, 170, 255, 0.2);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.metric span {
  color: var(--ink-dim);
  font-size: 12px;
}

.metric strong {
  color: #a6ffd8;
  font-size: 24px;
  line-height: 1;
}

.results {
  padding: 12px;
}

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.results-head h2 {
  margin: 0;
  font-size: 17px;
}

#resultTip {
  color: var(--ink-dim);
  font-size: 12px;
}

.result-list {
  display: grid;
  gap: 8px;
}

.result-item {
  border: 1px solid rgba(126, 170, 255, 0.22);
  border-radius: 12px;
  padding: 10px;
  background: rgba(8, 18, 33, 0.55);
}

.row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.row-name {
  font-weight: 700;
  word-break: break-all;
}

.badge {
  border-radius: 999px;
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid rgba(126, 170, 255, 0.38);
}

.badge.ok {
  color: #a6ffd8;
  border-color: rgba(93, 225, 181, 0.55);
}

.badge.err {
  color: #ffb8b8;
  border-color: rgba(255, 141, 141, 0.58);
}

.badge.wait {
  color: #c8ddff;
}

.row-meta {
  margin-top: 6px;
  color: var(--ink-dim);
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.row-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9fe5ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(159, 229, 255, 0.5);
}

.cover {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(126, 170, 255, 0.28);
}

.empty {
  margin: 0;
  border: 1px dashed rgba(126, 170, 255, 0.35);
  border-radius: 12px;
  padding: 24px;
  color: var(--ink-dim);
  text-align: center;
}

.meta-code {
  font-family: "IBM Plex Mono", monospace;
}

@media (max-width: 760px) {
  .status {
    margin-left: 0;
    width: 100%;
  }

  .inline-label {
    margin-left: 0;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}
