/* Flat dark color on html (not a gradient) so iOS Safari tints the status bar
   and home-indicator areas correctly. */
:root {
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
  --safe-right: env(safe-area-inset-right);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: #0f172a;
}

body {
  margin: 0;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family:
    'Inter var',
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  color: #e2e8f0;
  -webkit-text-size-adjust: 100%;
}

.card {
  width: 100%;
  max-width: 34rem;
  margin: 1.5rem 1rem;
  padding: 2rem 1.5rem;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  text-align: center;
}

h1 {
  margin: 1rem 0 0.5rem;
  font-size: 1.5rem;
  line-height: 1.3;
  color: #f8fafc;
}

.lead {
  margin: 0 0 1.5rem;
  color: #94a3b8;
  line-height: 1.5;
}

.dropzone {
  padding: 2rem 1rem;
  border: 2px dashed #475569;
  border-radius: 0.75rem;
  background: #0f172a;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background-color 0.15s;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-dragging {
  border-color: #818cf8;
  background: #1e1b4b;
  outline: none;
}

.dropzone p {
  margin: 0;
}

.dropzone-title {
  font-weight: 600;
  color: #f8fafc;
}

.dropzone-sub {
  margin-top: 0.25rem;
  color: #a5b4fc;
}

.hint {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
}

.file-list {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.file-row {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.5rem;
}

.file-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f8fafc;
}

.file-status {
  flex-shrink: 0;
  color: #94a3b8;
}

.file-status.is-done {
  color: #4ade80;
}

.file-status.is-error {
  color: #f87171;
}

.bar {
  margin-top: 0.5rem;
  height: 0.375rem;
  overflow: hidden;
  background: #334155;
  border-radius: 999px;
}

.bar-fill {
  width: 0;
  height: 100%;
  background: #6366f1;
  transition: width 0.1s linear;
}

.message {
  min-height: 1.25rem;
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.message.is-done {
  color: #4ade80;
  font-weight: 600;
}

.message.is-error {
  color: #f87171;
}
