:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #e2e5ea;
  --text: #1a1d23;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --success: #16a34a;
  --error: #dc2626;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a21;
    --border: #2a2e37;
    --text: #e7e9ee;
    --text-muted: #9aa1ac;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.topbar .logo {
  height: 36px;
  width: auto;
}

.topbar h1 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

.dropzone-text {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.dropzone-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.dropzone-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

button {
  font: inherit;
  cursor: pointer;
}

#browseFilesBtn, #browseFolderBtn {
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

#browseFilesBtn:hover, #browseFolderBtn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.queue {
  margin-top: 28px;
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.queue-header h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  padding: 0;
}

.queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.queue-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.queue-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.queue-item-name {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item-status {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.queue-item-status.success { color: var(--success); }
.queue-item-status.error { color: var(--error); }

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.15s ease;
}

.queue-item.success .progress-fill { background: var(--success); }
.queue-item.error .progress-fill { background: var(--error); }
