*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #5a6170;
  --accent: #1e5eb7;
  --accent-hover: #174a94;
  --border: #e2e5ea;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 48px 16px 32px;
}

.container { width: 100%; max-width: 620px; }

/* ---- Header ---- */
.header { text-align: center; margin-bottom: 32px; }
.header h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.3px; color: var(--text); }
.subtitle { color: var(--text-secondary); font-size: .9rem; margin-top: 6px; }

/* ---- Card ---- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 16px;
}

/* ---- Drop zone ---- */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: #f0f4fa;
}
.drop-icon { color: var(--accent); margin-bottom: 12px; opacity: .7; }
.drop-text { font-size: .95rem; color: var(--text); margin-bottom: 4px; }
.drop-hint { font-size: .8rem; color: var(--text-secondary); }
.browse-btn {
  background: none; border: none; color: var(--accent); font-size: .95rem;
  cursor: pointer; text-decoration: underline; font-family: inherit;
}

/* ---- File list ---- */
.file-list { margin-top: 16px; }
.file-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: #f8f9fb; border-radius: 6px;
  margin-bottom: 6px; font-size: .88rem;
}
.file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--text-secondary); font-size: .8rem; flex-shrink: 0; }
.file-remove {
  background: none; border: none; color: #c44; font-size: 1.2rem;
  cursor: pointer; padding: 0 4px; line-height: 1; flex-shrink: 0;
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  width: 100%; justify-content: center;
  margin-top: 16px; padding: 12px 24px;
  background: var(--accent); color: #fff; border: none;
  border-radius: 8px; font-size: .95rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.file-count { font-weight: 400; opacity: .8; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; padding: 10px 24px;
  background: var(--surface); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 8px;
  font-size: .9rem; cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.btn-secondary:hover { background: #f4f5f7; }

/* ---- Result card ---- */
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.result-header h2 { font-size: 1.1rem; font-weight: 600; }
.status-badge {
  font-size: .78rem; padding: 3px 10px; border-radius: 12px; font-weight: 500;
}
.status-pending { background: #fff3cd; color: #856404; }
.status-processing { background: #cce5ff; color: #004085; }
.status-done { background: #d4edda; color: #155724; }
.status-failed { background: #f8d7da; color: #721c24; }

/* ---- Progress bar ---- */
.progress-bar-container {
  width: 100%; height: 6px; background: #e9ecef; border-radius: 3px;
  margin: 12px 0 16px; overflow: hidden;
}
.progress-bar {
  height: 100%; background: var(--accent); border-radius: 3px;
  width: 0%; transition: width .3s ease;
}

/* ---- Result files ---- */
.result-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.result-file {
  font-size: .82rem; padding: 3px 10px; background: #f0f4fa;
  border-radius: 4px; color: var(--accent);
}

/* ---- Error ---- */
.result-error {
  background: #fff5f5; color: #c44; padding: 12px 16px;
  border-radius: 6px; font-size: .88rem; margin-top: 8px;
}

/* ---- Footer ---- */
.footer { text-align: center; margin-top: 24px; }
.footer p { font-size: .78rem; color: var(--text-secondary); }

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .card { padding: 20px 16px; }
  .drop-zone { padding: 28px 12px; }
  .header h1 { font-size: 1.25rem; }
}
