/* ═══════════════════════════════════════════════════════════
   DesignForge — Premium Dark Theme CSS
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --bg-primary: #06060b;
  --bg-secondary: #0c0c14;
  --bg-card: rgba(255, 255, 255, 0.025);
  --bg-card-hover: rgba(255, 255, 255, 0.045);
  --bg-input: rgba(255, 255, 255, 0.04);
  --bg-input-focus: rgba(255, 255, 255, 0.065);

  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --border-focus: rgba(124, 58, 237, 0.5);
  --border-active: rgba(124, 58, 237, 0.8);

  --text-primary: #e8ecf4;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #c4b5fd;

  --accent: #7c3aed;
  --accent-light: #a855f7;
  --accent-glow: rgba(124, 58, 237, 0.15);
  --accent-gradient: linear-gradient(135deg, #7c3aed, #a855f7);

  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.15);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(124, 58, 237, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Navigation ─── */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 64px;
  background: rgba(6, 6, 11, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-icon {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.12);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 1px;
}

/* ─── Pages ─── */
.page {
  display: none;
  position: relative;
  z-index: 1;
  padding-top: 88px;
  min-height: 100vh;
  animation: fadeIn 0.4s ease;
}

.page.active {
  display: block;
}

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

/* ─── Wizard ─── */
.wizard {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px 120px;
}

/* ─── Progress Bar ─── */
.wizard-progress {
  margin-bottom: 48px;
  position: relative;
}

.progress-track {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 20px;
}

.progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 2px;
  transition: width var(--transition-slow);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.4);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.progress-step span {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  border: 2px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-primary);
  transition: all var(--transition-base);
}

.progress-step p {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-base);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.progress-step.active span {
  border-color: var(--accent);
  color: white;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.4);
}

.progress-step.active p {
  color: var(--text-accent);
}

.progress-step.completed span {
  border-color: var(--success);
  color: white;
  background: var(--success);
}

.progress-step.completed p {
  color: var(--text-secondary);
}

/* ─── Wizard Steps ─── */
.wizard-step {
  display: none;
  animation: stepIn 0.35s ease;
}

.wizard-step.active {
  display: block;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.step-header {
  margin-bottom: 36px;
}

.step-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.step-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ─── Form Elements ─── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.form-sublabel {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: -2px;
}

.text-input,
.text-area,
.select-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: all var(--transition-base);
  outline: none;
}

.text-input::placeholder,
.text-area::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.text-input:hover,
.text-area:hover {
  border-color: var(--border-hover);
  background: var(--bg-input-focus);
}

.text-input:focus,
.text-area:focus {
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.text-area {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.select-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.select-input option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* ─── Upload Area ─── */
.upload-area {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--bg-input);
  overflow: hidden;
}

.upload-area:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.upload-area.dragover {
  border-color: var(--accent-light);
  background: rgba(124, 58, 237, 0.1);
  transform: scale(1.01);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
}

.upload-placeholder svg {
  opacity: 0.5;
}

.upload-placeholder span {
  font-size: 14px;
}

.upload-placeholder em {
  color: var(--text-accent);
  font-style: normal;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.upload-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-preview img {
  max-width: 200px;
  max-height: 120px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.remove-logo {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--error);
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
  z-index: 2;
}

.remove-logo:hover {
  transform: scale(1.15);
}

.hidden {
  display: none !important;
}

/* ─── Card Select ─── */
.card-select {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.card-select-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card-select-4 {
  grid-template-columns: repeat(4, 1fr);
}

.select-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  text-align: center;
}

.select-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.select-card.active {
  background: rgba(124, 58, 237, 0.08);
  border-color: var(--border-active);
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
}

.select-card .card-icon {
  opacity: 0.6;
  transition: opacity var(--transition-base);
}

.select-card.active .card-icon {
  opacity: 1;
  color: var(--accent-light);
}

.select-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.select-card p {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

.select-card.active p {
  color: var(--text-secondary);
}

.select-card.compact {
  padding: 16px 10px;
  gap: 8px;
}

.select-card.compact span {
  font-size: 12px;
  font-weight: 500;
}

/* ─── Density Previews ─── */
.density-preview {
  width: 100%;
  height: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 4px;
}

.density-preview div {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.density-minimal div {
  flex: 1 1 45%;
  height: 16px;
}

.density-balanced div {
  flex: 1 1 40%;
  height: 10px;
}

.density-dense div {
  flex: 1 1 22%;
  height: 8px;
}

/* ─── Motion Preview ─── */
.motion-preview {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 4px;
}

/* ─── Color Swatches ─── */
.card-swatch {
  width: 48px;
  height: 32px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.swatch-light {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.swatch-dark {
  background: linear-gradient(135deg, #1e1b4b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.swatch-both {
  background: linear-gradient(135deg, #f8fafc 50%, #0f172a 50%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─── Radius Preview ─── */
.radius-preview {
  width: 36px;
  height: 36px;
  background: rgba(124, 58, 237, 0.2);
  border: 2px solid rgba(124, 58, 237, 0.4);
  margin-bottom: 4px;
}

/* ─── Shadow Preview ─── */
.shadow-preview {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

/* ─── Chip Group ─── */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  user-select: none;
}

.chip:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.chip.active {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.15);
  color: var(--text-accent);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.15);
}

/* ─── Two Column Layout ─── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ─── Wizard Navigation ─── */
.wizard-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  background: rgba(6, 6, 11, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--border);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.btn-next {
  background: var(--accent-gradient);
  border-color: transparent;
  color: white;
  font-weight: 600;
}

.btn-next:hover {
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
  border-color: transparent;
  background: var(--accent-gradient);
  filter: brightness(1.1);
}

.btn-generate {
  background: var(--accent-gradient);
  border: none;
  color: white;
  font-weight: 600;
  padding: 16px 36px;
  font-size: 15px;
  border-radius: var(--radius-lg);
  width: 100%;
  justify-content: center;
}

.btn-generate:hover {
  box-shadow: 0 4px 30px rgba(124, 58, 237, 0.5);
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}

.generate-actions {
  margin-top: 32px;
}

/* ─── Review Container ─── */
.review-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  transition: all var(--transition-base);
}

.review-section:hover {
  border-color: var(--border-hover);
}

.review-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-section-title::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.review-item {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.review-item:last-child {
  margin-bottom: 0;
}

.review-item-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 140px;
  flex-shrink: 0;
}

.review-item-value {
  font-size: 13px;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.review-item-value.empty {
  color: var(--text-muted);
  font-style: italic;
}

.review-logo-preview {
  max-width: 80px;
  max-height: 60px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.review-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.review-chip {
  padding: 2px 10px;
  border-radius: 100px;
  background: rgba(124, 58, 237, 0.12);
  color: var(--text-accent);
  font-size: 12px;
  font-weight: 500;
}

/* ─── Toast ─── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  color: #6ee7b7;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 200;
  opacity: 0;
  transition: all var(--transition-slow);
  pointer-events: none;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-bar {
    padding: 0 16px;
  }

  .nav-brand span {
    display: none;
  }

  .nav-link {
    padding: 8px 12px;
    font-size: 13px;
  }

  .wizard {
    padding: 0 16px 120px;
  }

  .card-select {
    grid-template-columns: 1fr;
  }

  .card-select-3 {
    grid-template-columns: 1fr;
  }

  .card-select-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .progress-steps {
    gap: 2px;
  }

  .progress-step p {
    display: none;
  }

  .step-title {
    font-size: 22px;
  }

  .review-item {
    flex-direction: column;
    gap: 2px;
  }

  .review-item-label {
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .wizard-nav {
    padding: 12px 16px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 13px;
  }

  .upload-area {
    padding: 24px;
  }

  .card-select-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── Focus Visible ─── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Selection ─── */
::selection {
  background: rgba(124, 58, 237, 0.3);
  color: white;
}

/* ─── Range Slider ─── */
.range-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: background var(--transition-base);
}

.range-slider:hover {
  background: var(--border-hover);
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent), 0 2px 8px rgba(124, 58, 237, 0.3);
  cursor: grab;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px var(--accent-light), 0 4px 14px rgba(124, 58, 237, 0.4);
}

.range-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.05);
}

.range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent), 0 2px 8px rgba(124, 58, 237, 0.3);
  cursor: grab;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.range-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
}

.range-slider::-moz-range-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  border: none;
}

/* ─── Color Swatch Grid ─── */
.color-swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-swatch {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid transparent;
  background: var(--swatch);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.color-swatch:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.color-swatch.active {
  border-color: white;
  transform: scale(1.15);
  box-shadow: 0 0 0 3px var(--swatch), 0 4px 20px color-mix(in srgb, var(--swatch) 40%, transparent);
}

.color-swatch.active::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ─── Neutral Swatch ─── */
.neutral-swatch {
  width: 36px;
  height: 24px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

/* ─── Large Chips ─── */
.chip-lg {
  padding: 12px 22px;
  font-size: 14px;
  border-radius: var(--radius-md);
}

.chip-group-lg {
  gap: 10px;
}

/* ═══════════════════════════════════════
   PROMPT BUILDER PAGE
   ═══════════════════════════════════════ */

.prompt-builder {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ─── Sections ─── */
.pb-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--transition-base);
}

.pb-section:hover {
  border-color: var(--border-hover);
}

.pb-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.pb-section-header h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pb-section-header svg {
  color: var(--accent-light);
  flex-shrink: 0;
}

.pb-badge {
  padding: 2px 10px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pb-link {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.pb-link:hover {
  color: var(--accent-light);
}

.pb-section code {
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(124, 58, 237, 0.12);
  color: var(--text-accent);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ─── File Upload (small variant) ─── */
.upload-area-sm {
  padding: 24px;
}

.upload-area-sm .upload-placeholder {
  flex-direction: row;
  gap: 12px;
}

.upload-area-sm .upload-placeholder svg {
  width: 28px;
  height: 28px;
}

.file-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-accent);
  font-size: 14px;
  font-weight: 500;
}

.file-badge svg {
  color: var(--accent-light);
}

/* ─── Component Entry ─── */
#pb-components-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.component-entry {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  animation: stepIn 0.3s ease;
}

.component-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.component-entry-number {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.component-entry-number::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.btn-remove-component {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-remove-component:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--error);
}

.component-entry .text-input {
  font-size: 13px;
}

.component-entry .text-area {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  min-height: 120px;
  tab-size: 2;
  white-space: pre;
  overflow-x: auto;
}

/* ─── Add Component Button ─── */
.btn-add-component {
  width: 100%;
  justify-content: center;
  border-style: dashed;
  background: transparent;
  color: var(--text-secondary);
  padding: 14px;
}

.btn-add-component:hover {
  border-color: var(--accent);
  color: var(--text-accent);
  background: var(--accent-glow);
}

/* ─── Output Area ─── */
.pb-output {
  background: var(--bg-card);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-xl);
  overflow: hidden;
  animation: fadeIn 0.4s ease;
}

.pb-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(16, 185, 129, 0.06);
  border-bottom: 1px solid rgba(16, 185, 129, 0.12);
}

.pb-output-header span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #6ee7b7;
}

.pb-output-header span svg {
  color: #6ee7b7;
}

.btn-copy {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
  gap: 6px;
}

.btn-copy:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  transform: none;
}

.btn-copy.copied {
  background: rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

.pb-output-text {
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 500px;
  overflow-y: auto;
  margin: 0;
}
