/* Core */
* { box-sizing: border-box; }

.gradient-text {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-gradient {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}
.btn-gradient:not(:disabled):hover {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.3);
}

/* Mode toggle */
.mode-btn { cursor: pointer; }
.active-mode {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(124, 58, 237, 0.3));
  color: white;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

/* Goal chips */
.goal-chip {
  cursor: pointer;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid #1f2937;
  background: #111827;
  color: #9ca3af;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}
.goal-chip:hover {
  border-color: #374151;
  color: #d1d5db;
  background: #1a2333;
}
.goal-chip.selected {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(124, 58, 237, 0.15));
  border-color: rgba(99, 102, 241, 0.5);
  color: #c4b5fd;
}

/* Step indicator dots */
.step-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1f2937;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s;
}
.step-dot.active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
}
.step-dot.done {
  background: #1e3a5f;
  color: #60a5fa;
}
.step-line { color: #374151; font-size: 10px; }

/* Textarea */
.profile-textarea {
  width: 100%;
  min-height: 220px;
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 1rem;
  padding: 1rem;
  color: #e2e8f0;
  font-size: 0.8125rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.profile-textarea:focus {
  border-color: rgba(99, 102, 241, 0.5);
}
.profile-textarea::placeholder {
  color: #374151;
}

/* Loading spinner */
.loader {
  width: 44px;
  height: 44px;
  border: 3px solid #1f2937;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Results markdown */
.results-markdown { line-height: 1.7; }

.results-markdown h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #1f2937;
}
.results-markdown h2:first-child { margin-top: 0; }

.results-markdown h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #a5b4fc;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.results-markdown p {
  color: #cbd5e1;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.results-markdown ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem 0;
  space-y: 0.5rem;
}
.results-markdown li {
  color: #cbd5e1;
  font-size: 0.875rem;
  padding-left: 1.25rem;
  position: relative;
  margin-bottom: 0.5rem;
}
.results-markdown li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: #6366f1;
  font-weight: 700;
}

.results-markdown ol {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}
.results-markdown ol li {
  padding-left: 0;
  color: #cbd5e1;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}
.results-markdown ol li::before { content: none; }

.results-markdown strong {
  color: #e2e8f0;
  font-weight: 600;
}

.results-markdown em {
  color: #94a3b8;
  font-style: italic;
}

.results-markdown blockquote {
  border-left: 3px solid #4f46e5;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #94a3b8;
  font-style: italic;
}

/* Percentile highlight */
.results-markdown p strong:first-child {
  display: inline-block;
}

/* Error toast */
#error-toast.show {
  display: block;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Transitions */
section { transition: opacity 0.15s ease; }
