:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #d1d5db;
  --dashed: #cfd8e3;
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --error: #dc2626;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-weight: 700; }
.top-nav .link {
  margin-left: 16px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
.top-nav .link:hover { color: var(--text); }

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}
.hero { text-align: center; margin-bottom: 16px; }
.hero h1 { margin: 0 0 8px; font-size: 40px; }
.hero .sub { color: var(--muted); margin: 0; }

.dashed {
  border: 2px dashed var(--dashed);
  border-radius: 12px;
  background: #fff;
}
.ad-space {
  margin: 24px auto;
  padding: 28px;
  text-align: center;
}
.ad-icon { font-size: 28px; }
.ad-text { color: var(--muted); margin-top: 8px; }

.uploader {
  margin: 24px auto;
  padding: 32px 24px;
  text-align: center;
}
.upload-icon { font-size: 40px; margin-bottom: 8px; }
.upload-title { margin: 0; font-weight: 600; }
.upload-sub { margin: 4px 0 16px; color: var(--muted); }
.btn-row { display: flex; gap: 12px; justify-content: center; margin-bottom: 12px; }

.upload-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 8px 0 8px;
}
.slot {
  padding: 16px;
  background: #fff;
  border: 2px dashed var(--dashed);
  border-radius: 10px;
}
.slot.dragover {
  background: #f1f5ff;
  border-color: var(--primary);
}
.slot-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
}
.btn:hover { background: #f8fafc; }
.btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn.primary:hover { background: var(--primary-600); }

.file-list { font-size: 14px; color: var(--muted); }
.file-list .file-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin: 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
}
.error {
  color: #fff;
  background: var(--error);
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 12px;
  text-align: left;
}

.results {
  margin-top: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.stats { color: var(--muted); margin-bottom: 8px; }
.preview {
  border: 1px dashed var(--dashed);
  border-radius: 8px;
  padding: 8px;
  background: #fbfdff;
  max-height: 360px;
  overflow: auto;
}
.preview-item {
  padding: 8px 6px;
  border-bottom: 1px solid #eef2f7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}
.preview-item:last-child { border-bottom: none; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #fee2e2;
  color: #991b1b;
  margin-right: 8px;
}

.site-footer {
  color: var(--muted);
  text-align: center;
  padding: 24px 16px 48px;
}


