:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #059669;
  --error: #dc2626;
  --border: #e5e7eb;
  --radius: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px;
}

h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
h2 { font-size: 20px; font-weight: 600; margin: 24px 0 16px; }

.subtitle { color: var(--text-muted); margin-bottom: 32px; }

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--surface);
}
.upload-zone:hover,
.upload-zone.dragover { border-color: var(--primary); background: #eff6ff; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.field input[type="text"],
.field input[type="email"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 15px; transition: border-color 0.2s;
}
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

.piece-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.piece-card h3 { font-size: 16px; margin-bottom: 4px; }
.piece-card .file-count { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

.btn {
  display: inline-block; padding: 12px 24px; border: none;
  border-radius: 8px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background 0.2s; text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #047857; }

.progress-bar {
  width: 100%; height: 8px; background: var(--border);
  border-radius: 4px; overflow: hidden; margin: 16px 0;
}
.progress-bar .fill {
  height: 100%; background: var(--primary);
  border-radius: 4px; transition: width 0.3s;
}

.status-badge {
  display: inline-block; padding: 4px 12px;
  border-radius: 9999px; font-size: 13px; font-weight: 600;
}
.status-uploading { background: #fef3c7; color: #92400e; }
.status-processing { background: #dbeafe; color: #1e40af; }
.status-assembling { background: #e0e7ff; color: #3730a3; }
.status-complete { background: #d1fae5; color: #065f46; }
.status-failed { background: #fee2e2; color: #991b1b; }

.error-message {
  background: #fee2e2; color: var(--error);
  padding: 12px 16px; border-radius: 8px; margin: 16px 0;
}
