/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #fff;
  color: #111;
  line-height: 1.6;
}

/* ── Nav ── */
nav {
  padding: 14px 40px;
  border-bottom: 1px solid #e5e5e5;
  font-size: 0.9rem;
}
nav a { color: #444; text-decoration: none; }
nav a:hover { color: #111; text-decoration: underline; }

/* ── Page Header ── */
.page-header {
  background: white;
  border-bottom: 1px solid #e5e5e5;
  padding: 40px 0 32px;
}
.page-header h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 6px; }
.subtitle { color: #444; font-size: 1rem; }

/* ── Progress bar (top line) ── */
.progress-bar-outer {
  height: 4px;
  background: #e5e5e5;
  width: 100%;
}
.progress-bar-inner {
  height: 100%;
  background: #2563eb;
  transition: width 0.4s ease;
  width: 0%;
}

.progress-meta {
  padding-top: 10px;
  padding-bottom: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
}

/* ── Container ── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px;
}

.main-content {
  padding-top: 32px;
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Step Card ── */
.step-card {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.step-card.done {
  border-color: #16a34a;
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px 18px;
  background: white;
  border-bottom: 1px solid #e5e5e5;
}
.step-card.done .step-header {
  background: #f0fdf4;
  border-bottom-color: #bbf7d0;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: background 0.2s;
}
.step-card.done .step-number {
  background: #16a34a;
}
.step-card.done .step-number::before {
  content: '✓';
}
.step-card.done .step-number.original-hidden { display: none; }

.step-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.step-desc {
  font-size: 0.88rem;
  color: #444;
}

.step-body {
  padding: 20px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Code blocks ── */
.code-block-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 7px;
  padding: 10px 14px;
}
.code-block {
  flex: 1;
  font-family: 'Menlo','Monaco',monospace;
  font-size: 0.85rem;
  color: #111;
  white-space: pre;
  overflow-x: auto;
}
.code-block code { font-family: inherit; }

/* ── Copy Button ── */
.copy-btn {
  font-size: 0.75rem;
  font-family: system-ui, -apple-system, sans-serif;
  padding: 4px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  background: #fff;
  color: #444;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.copy-btn:hover { background: #f0f0f0; }
.copy-btn.copied {
  background: #dcfce7;
  border-color: #16a34a;
  color: #16a34a;
}

/* ── Checkbox label ── */
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #444;
  padding: 10px 14px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 7px;
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}
.check-label:hover { background: #f0f0f0; }
.check-label input[type="checkbox"] { display: none; }

.check-box {
  width: 20px;
  height: 20px;
  border: 2px solid #e5e5e5;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  font-size: 0.75rem;
}
.check-label input:checked ~ .check-box {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}
.check-label input:checked ~ .check-box::after {
  content: '✓';
  color: #fff;
  font-weight: 700;
}
.check-label input:checked ~ span:last-child {
  color: #111;
  text-decoration: line-through;
  color: #888;
}

/* ── Mockup card ── */
.mockup-card {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  max-width: 480px;
}

.mockup-header-bar {
  background: #f0f0f0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  flex-shrink: 0;
}
.mockup-url {
  font-family: 'Menlo','Monaco',monospace;
  font-size: 0.72rem;
  color: #888;
  margin-left: 8px;
}

.mockup-body {
  padding: 20px 22px 22px;
  background: #fff;
}

.mockup-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
}
.mockup-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: #111;
}

.mockup-btn-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 280px;
  position: relative;
}

.mockup-highlight-arrow {
  font-size: 0.8rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 2px;
}

.mockup-btn {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
  cursor: default;
  text-align: center;
}
.mockup-btn-dark {
  background: #111;
  color: #fff;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.35);
}
.mockup-btn-outline {
  background: #fff;
  color: #444;
}
.mockup-btn-sm { padding: 6px 16px; font-size: 0.82rem; }

/* Import mockup */
.mockup-section-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.mockup-repo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e5e5e5;
  border-radius: 7px;
  padding: 10px 14px;
}
.mockup-repo-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #111;
}
.mockup-repo-icon { font-size: 1rem; }
.mockup-import-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mockup-arrow-left {
  margin-bottom: 0;
  white-space: nowrap;
}

/* ── Step list ── */
.step-list {
  list-style: none;
  counter-reset: item;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.step-list li {
  counter-increment: item;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: #444;
}
.step-list li::before {
  content: counter(item);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e5e5e5;
  color: #444;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-list li .note { color: #888; font-size: 0.82rem; }

/* ── URL box ── */
.url-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.url-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.url-link {
  font-family: 'Menlo','Monaco',monospace;
  font-size: 0.9rem;
  color: #2563eb;
  text-decoration: none;
  word-break: break-all;
}
.url-link:hover { text-decoration: underline; }

.url-note {
  font-size: 0.85rem;
  color: #444;
}
.url-note code {
  font-family: 'Menlo','Monaco',monospace;
  font-size: 0.82rem;
  background: #f0f0f0;
  border-radius: 3px;
  padding: 1px 5px;
}

/* ── Completion banner ── */
.completion-banner {
  position: relative;
  overflow: hidden;
  background: #dcfce7;
  border: 1px solid #16a34a;
  border-radius: 10px;
  padding: 22px 24px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #14532d;
  text-align: center;
  animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Confetti dots */
.confetti-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.confetti-dot {
  position: absolute;
  top: -10px;
  left: var(--x, 50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color, #2563eb);
  animation: confettiFall 1.2s var(--delay, 0s) ease-in forwards;
}
@keyframes confettiFall {
  0%   { top: -10px; opacity: 1; transform: rotate(0deg) scale(1); }
  100% { top: 110%; opacity: 0; transform: rotate(360deg) scale(0.6); }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  nav { padding: 14px 20px; }
  .container { padding: 0 20px; }
  .step-header { padding: 16px 18px; }
  .step-body { padding: 16px 18px; }
  .mockup-card { max-width: 100%; }
}
