:root {
  --bg-1: #f4f5f7;
  --bg-2: #e9ebef;
  --card-bg: #ffffff;
  --text: #1a1d24;
  --text-muted: #6b7280;
  --border: #e2e4e9;
  --accent: #5b5bf6;
  --accent-hover: #4747e0;
  --accent-soft: #eeeeff;
  --success: #16a34a;
  --success-soft: #ecfdf3;
  --error: #dc2626;
  --error-soft: #fef2f2;
  --shadow: 0 20px 50px -20px rgba(20, 20, 43, 0.25);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-1: #14151c;
    --bg-2: #1b1d27;
    --card-bg: #1e2029;
    --text: #f1f2f6;
    --text-muted: #9598a6;
    --border: #2c2f3a;
    --accent: #7c7cf9;
    --accent-hover: #9191fb;
    --accent-soft: #2a2a4a;
    --success: #4ade80;
    --success-soft: #0f2b1c;
    --error: #f87171;
    --error-soft: #2b1414;
    --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, var(--bg-2), var(--bg-1) 60%);
}

.card {
  width: 100%;
  max-width: 460px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

h1 {
  font-size: 18px;
  margin: 0;
}

.subtitle {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
  color: var(--text-muted);
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  color: var(--accent);
}

.drop-title {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

.drop-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
}

.file-info {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.file-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  color: var(--accent);
}

.file-meta {
  flex: 1;
  min-width: 0;
}

.file-name {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  line-height: 1;
}

.btn-icon:hover {
  background: var(--bg-2);
  color: var(--text);
}

.btn-primary {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

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

.btn-secondary {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--bg-2);
}

.steps {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  opacity: 0;
  transform: translateY(4px);
  animation: step-in 0.3s ease forwards;
}

@keyframes step-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.step-name {
  flex: 1;
  color: var(--text);
}

.step-count {
  color: var(--text-muted);
  font-size: 12px;
}

.result {
  text-align: center;
}

.result-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.result-title {
  font-weight: 600;
  margin: 0 0 16px;
}

.error {
  border: 1px solid var(--error);
  background: var(--error-soft);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

#error-message {
  color: var(--error);
  font-size: 13px;
  margin: 0 0 10px;
}
