:root {
  --accent: #2563eb;
  --border: #d1d5db;
  --bg: #f8fafc;
  --text: #1f2937;
}

* { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

main {
  width: 100%;
  max-width: 480px;
  padding: 3rem 1.5rem;
}

h1 { margin: 0 0 0.25rem; }

.subtitle {
  color: #6b7280;
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
}

#dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}

#dropzone:hover, #dropzone:focus, #dropzone.dragover {
  border-color: var(--accent);
  background: #eff6ff;
  outline: none;
}

#dropzone p { margin: 0; color: #6b7280; }
#dropzone strong { color: var(--text); word-break: break-all; }

fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  background: #fff;
}

legend { font-size: 0.85rem; color: #6b7280; padding: 0 0.4rem; }

fieldset label { display: block; padding: 0.3rem 0; cursor: pointer; }
fieldset small { color: #9ca3af; }

button {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

button:hover:not(:disabled) { background: #1d4ed8; }
button:disabled { background: #9ca3af; cursor: not-allowed; }

#status {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

#status.success { background: #dcfce7; color: #166534; }
#status.error { background: #fee2e2; color: #991b1b; }
#status.working { background: #e0e7ff; color: #3730a3; }

.spinner {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -0.1em;
}

@keyframes spin { to { transform: rotate(360deg); } }
