:root {
  --bg: #0f1620;
  --panel: #161f2c;
  --panel-border: #263244;
  --text: #e8edf4;
  --muted: #8a97a8;
  --accent: #3b82f6;
  --accent-bright: #60a5fa;
  --success: #34d399;
  --danger: #f87171;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, #15202c 0%, #0b1118 60%);
  color: var(--text);
  min-height: 100vh;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

header h1 {
  font-size: 28px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

header .sub {
  color: var(--muted);
  margin: 0 0 28px;
  line-height: 1.5;
}

/* ── Cards ── */
.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.6);
}

/* ── Dropzone ── */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px dashed var(--panel-border);
  border-radius: 12px;
  padding: 40px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-align: center;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.06);
}

.dz-title {
  font-size: 15px;
  font-weight: 600;
}

.dz-hint {
  font-size: 13px;
  color: var(--muted);
}

/* ── Buttons ── */
button[type="submit"],
.download-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 13px 18px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

button[type="submit"]:hover:not(:disabled),
.download-btn:hover {
  background: var(--accent-bright);
}

button[type="submit"]:disabled {
  background: #2a3441;
  color: var(--muted);
  cursor: not-allowed;
}

.download-btn--secondary {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  margin-top: 10px;
}

.download-btn--secondary:hover {
  background: var(--accent);
  color: white;
}

.link-btn {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

/* ── Progress ── */
.progress-track {
  height: 10px;
  border-radius: 6px;
  background: #20293a;
  overflow: hidden;
  margin: 16px 0 10px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transition: width 0.3s ease;
}

.progress-detail {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

#progress-title,
#result-card h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

/* ── Result ── */
.result-summary {
  color: var(--muted);
  margin: 6px 0 18px;
  font-size: 14px;
  line-height: 1.5;
}

.error-message {
  color: var(--danger);
  font-size: 14px;
  line-height: 1.5;
}
