/* ── 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; }

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

.main-content {
  padding-top: 32px;
  padding-bottom: 60px;
}

/* ── Progress ── */
.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.progress-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  white-space: nowrap;
  min-width: 80px;
}
.progress-track {
  flex: 1;
  height: 6px;
  background: #e5e5e5;
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: #2563eb;
  border-radius: 99px;
  transition: width 0.4s ease;
  width: 16.67%;
}

/* ── Demo Layout ── */
.demo-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px;
  align-items: start;
}

/* ── Terminal Window ── */
.terminal-window {
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

.terminal-titlebar {
  background: #2d2d2d;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.terminal-label {
  font-family: 'Menlo','Monaco',monospace;
  font-size: 0.75rem;
  color: #888;
  margin-left: 8px;
}

.terminal-output {
  font-family: 'Menlo','Monaco',monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #e5e5e5;
  padding: 20px 20px 20px;
  min-height: 340px;
  white-space: pre-wrap;
  word-break: break-all;
}

.out-green  { color: #4ade80; }
.out-yellow { color: #fde047; }
.out-cyan   { color: #67e8f9; }
.out-dim    { color: #888; }
.out-prompt { color: #4ade80; }
.out-bold   { font-weight: 700; }

/* Framework selection list */
.select-list {
  list-style: none;
  margin: 4px 0 4px 2px;
}
.select-list li {
  padding: 1px 0;
  color: #888;
}
.select-list li.active {
  color: #e5e5e5;
  font-weight: 600;
}
.select-list li.active::before {
  content: '❯  ';
  color: #67e8f9;
}
.select-list li:not(.active)::before {
  content: '   ';
}

/* ── Success Banner ── */
.success-banner {
  margin-top: 16px;
  background: #dcfce7;
  border: 1px solid #16a34a;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.95rem;
  color: #14532d;
  animation: fadeSlideIn 0.4s ease;
}

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

/* ── Step Controls ── */
.step-controls {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.btn-next {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 22px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-next:hover { background: #1d4ed8; }
.btn-next:disabled {
  background: #e5e5e5;
  color: #888;
  cursor: default;
}

/* ── File Tree Panel ── */
.filetree-panel {
  animation: fadeIn 0.5s ease;
}

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

.panel-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.filetree {
  list-style: none;
  font-family: 'Menlo','Monaco',monospace;
  font-size: 0.82rem;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 14px 16px;
}
.filetree ul {
  list-style: none;
  padding-left: 20px;
  margin-top: 4px;
}

.tree-folder > .tree-name {
  color: #111;
  font-weight: 600;
}

.tree-file {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 4px;
  margin: 1px 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s;
}
.tree-file:hover { background: #e5e5e5; }
.tree-file.active {
  background: #eff6ff;
  outline: 1px solid #2563eb;
}
.tree-file .tree-name { color: #444; }
.tree-file:hover .tree-name,
.tree-file.active .tree-name { color: #2563eb; }

.tree-folder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 3px 4px;
  margin: 1px 0;
}
.tree-info-inline {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  color: #888;
  font-style: italic;
  margin-left: 4px;
}

.filetree ul .tree-folder { display: flex; }
.filetree ul .tree-folder > ul { width: 100%; }

/* ── File Tooltip ── */
.file-tooltip {
  margin-top: 12px;
  background: #fff;
  border: 1px solid #2563eb;
  border-radius: 8px;
  padding: 12px 14px;
  animation: fadeSlideIn 0.25s ease;
}
.file-tooltip-name {
  font-family: 'Menlo','Monaco',monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 6px;
}
.file-tooltip-desc {
  font-size: 0.85rem;
  color: #444;
  line-height: 1.55;
}

/* ── Tip box ── */
.tip-box {
  margin-top: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #1e40af;
}

/* ── Mobile ── */
@media (max-width: 640px) {
  nav { padding: 14px 20px; }
  .container { padding: 0 20px; }
  .demo-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .terminal-output { min-height: 260px; }
}
