*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --bg: #050505;
  --surface: rgba(255,255,255,0.03);
  --surface-2: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);
  --text-1: #f0f0f0;
  --text-2: #7a7a7a;
  --text-3: #3a3a3a;
  --accent: #ffffff;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

#particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5; }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(5,5,5,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 900px; margin: 0 auto; padding: 0 24px;
  height: 56px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px; color: var(--text-1);
}
.nav-logo-text { font-size: 11px; font-weight: 700; letter-spacing: 3px; }
.nav-step-indicator {
  font-size: 12px; color: var(--text-2); font-weight: 500;
  background: var(--surface-2); padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--border);
}

/* Builder */
.builder {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 80px 20px 40px;
}
.builder-inner {
  width: 100%; max-width: 680px;
}

/* Progress */
.progress-bar {
  width: 100%; height: 3px; background: var(--surface-2);
  border-radius: 3px; margin-bottom: 32px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--accent); border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Steps */
.step { display: none; animation: fadeIn 0.3s ease; }
.step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.step-header { margin-bottom: 28px; }
.step-number {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 2px;
  color: var(--text-3); margin-bottom: 8px;
}
.step-header h2 { font-size: 24px; font-weight: 700; }
.step-desc { font-size: 14px; color: var(--text-2); margin-top: 6px; }

/* Fields */
.step-fields { display: flex; flex-direction: column; gap: 20px; }
.field label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text-2); margin-bottom: 8px;
}
.field-hint { font-size: 11px; color: var(--text-3); margin-top: 6px; }
.field-hint code {
  background: var(--surface-2); padding: 2px 6px; border-radius: 4px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
}
.field-row { display: flex; align-items: center; gap: 10px; }

/* Inputs */
.glass-input {
  width: 100%; padding: 12px 16px; font-size: 14px; font-family: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-1); outline: none; transition: border-color 0.2s, background 0.2s;
  resize: vertical;
}
.glass-input:focus { border-color: var(--border-hover); background: var(--surface-2); }
.glass-input.small { padding: 8px 12px; font-size: 13px; }
.glass-input::placeholder { color: var(--text-3); }

.glass-select {
  width: 100%; padding: 12px 16px; font-size: 14px; font-family: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-1); outline: none; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7a7a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.glass-select:focus { border-color: var(--border-hover); }
.glass-select option { background: #111; color: #eee; }

/* Chips */
.chip-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 16px; font-size: 13px; font-family: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  color: var(--text-2); cursor: pointer; transition: all 0.2s;
}
.chip:hover { border-color: var(--border-hover); color: var(--text-1); }
.chip.active {
  background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2);
  color: var(--text-1); font-weight: 500;
}

/* Color Swatches */
/* Claude Motion Field */
.claude-motion-field {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px;
}
.claude-motion-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.claude-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  color: #fff; background: rgba(255,255,255,0.08);
  padding: 3px 9px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1);
}
.claude-motion-header label { font-size: 13px !important; font-weight: 500; margin: 0 !important; }

.color-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.color-swatch {
  padding: 14px 10px; border-radius: var(--radius-sm); cursor: pointer;
  border: 2px solid transparent; transition: all 0.2s; text-align: center;
}
.color-swatch:hover { transform: scale(1.03); }
.color-swatch.active { border-width: 2px; box-shadow: 0 0 20px rgba(255,255,255,0.05); }
.color-swatch span { font-size: 12px; font-weight: 600; }
.color-picker {
  width: 36px; height: 36px; border: none; background: none; cursor: pointer;
  border-radius: 8px; overflow: hidden;
}

/* Radio Cards */
.logo-options { display: flex; gap: 10px; }
.radio-card { flex: 1; cursor: pointer; }
.radio-card input { display: none; }
.radio-card-inner {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 10px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 12px; color: var(--text-2); transition: all 0.2s;
}
.radio-card input:checked + .radio-card-inner {
  background: var(--surface-2); border-color: var(--border-hover);
  color: var(--text-1);
}
.radio-icon { font-size: 20px; }
.logo-preview {
  margin-top: 10px; padding: 20px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border); text-align: center;
}
.logo-preview img { max-width: 80px; max-height: 80px; }

/* Toggle */
.toggle-row { display: flex; align-items: center; gap: 12px; }
.toggle { position: relative; width: 44px; height: 24px; cursor: pointer; }
.toggle input { display: none; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--surface-2); border-radius: 12px;
  border: 1px solid var(--border); transition: background 0.2s;
}
.toggle-slider::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-2); transition: transform 0.2s, background 0.2s;
}
.toggle input:checked + .toggle-slider { background: rgba(255,255,255,0.15); }
.toggle input:checked + .toggle-slider::after {
  transform: translateX(20px); background: var(--text-1);
}

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; font-size: 14px; font-weight: 600; font-family: inherit;
  background: var(--accent); color: #000; border: none; border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(255,255,255,0.1); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; font-size: 14px; font-weight: 500; font-family: inherit;
  background: transparent; color: var(--text-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text-1); }

/* Step Nav */
.step-nav {
  display: flex; justify-content: space-between; margin-top: 32px;
  padding-top: 24px; border-top: 1px solid var(--border);
}

/* Summary */
.summary-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px;
}
.summary-card h3 { font-size: 16px; margin-bottom: 16px; }
.summary-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.summary-row:last-child { border-bottom: none; }
.summary-label { color: var(--text-2); }
.summary-value { color: var(--text-1); font-weight: 500; text-align: right; max-width: 60%; }

/* Generate Actions */
.generate-actions { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }

/* Preview */
.preview-frame {
  width: 100%; height: 500px; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); margin-top: 16px;
}
.preview-frame iframe { width: 100%; height: 100%; border: none; background: #000; }

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 600px) {
  .color-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-options { flex-direction: column; }
  .step-header h2 { font-size: 20px; }
}
