:root {
  --bg: #050505;
  --bg-elevated: #0c0c0c;
  --bg-hover: #121212;
  --border: #1f1f1f;
  --border-strong: #2a2a2a;
  --text: #e8e8e8;
  --text-muted: #8a8a8a;
  --text-dim: #5c5c5c;
  --accent: #ffffff;
  --danger: #b0b0b0;
  --radius: 6px;
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(ellipse 120% 80% at 50% -20%, #141414 0%, transparent 55%);
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.header {
  margin-bottom: 1.75rem;
}

.title {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 1.5rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--text-dim);
  background: var(--bg-hover);
  outline: none;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.dropzone-inner {
  text-align: center;
}

.dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.dropzone-text {
  margin: 0 0 0.25rem;
  font-weight: 500;
  color: var(--text);
}

.dropzone-hint {
  margin: 0;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.toolbar-stats {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.toolbar-stats .dot {
  margin: 0 0.35rem;
  color: var(--text-dim);
}

.toolbar-actions {
  display: flex;
  gap: 0.5rem;
}

.btn {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-primary {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  background: #e0e0e0;
  border-color: #e0e0e0;
}

.btn-ghost {
  color: var(--text-muted);
  background: transparent;
  border-color: var(--border);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--text-dim);
}

.file-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  max-height: min(50vh, 420px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.file-list:empty {
  display: none;
}

.file-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.file-item:last-child {
  border-bottom: none;
}

.file-name {
  margin: 0;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--text);
  word-break: break-all;
}

.file-meta {
  margin: 0;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.file-status {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-align: right;
  white-space: nowrap;
  color: var(--text-muted);
}

.file-status.done {
  color: var(--text);
}

.file-status.err {
  color: var(--danger);
}

.progress-track {
  grid-column: 1 / -1;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.08s linear;
}

.footer {
  margin-top: 2rem;
}

.footer-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-dim);
  max-width: 36em;
}

@media (max-width: 520px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions {
    justify-content: stretch;
  }

  .toolbar-actions .btn {
    flex: 1;
  }
}
