/* ===== CREATE PAGE — Portrait Creator Flow ===== */

/* Creator container */
.creator {
  min-height: calc(100vh - 72px);
  padding: var(--space-8) var(--space-4) var(--space-16);
}
.creator__inner {
  max-width: 960px;
  margin-inline: auto;
}

/* ===== PROGRESS INDICATOR ===== */
.creator__progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-12);
  padding: var(--space-6) 0;
}
.creator__step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  opacity: 0.35;
  transition: opacity 300ms ease;
}
.creator__step.is-active {
  opacity: 1;
}
.creator__step.is-complete {
  opacity: 0.7;
}
.creator__step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  border: 2px solid var(--color-border);
  transition: all 300ms ease;
}
.creator__step.is-active .creator__step-num {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}
.creator__step.is-complete .creator__step-num {
  background: var(--color-gold);
  color: var(--color-text-inverse);
  border-color: var(--color-gold);
}
.creator__step-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
}
.creator__step.is-active .creator__step-label {
  color: var(--color-text);
}
.creator__step-line {
  flex: 0 0 40px;
  height: 2px;
  background: var(--color-border);
  border-radius: var(--radius-full);
}
@media (max-width: 480px) {
  .creator__step-label { display: none; }
  .creator__step-line { flex: 0 0 24px; }
}

/* ===== PANELS ===== */
.creator__panel {
  display: none;
}
.creator__panel.is-active {
  display: block;
  animation: fadeUp 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.creator__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  font-variation-settings: 'WONK' 1;
  color: var(--color-text);
  text-align: center;
  margin-bottom: var(--space-3);
}
.creator__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  text-align: center;
  max-width: 520px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
  line-height: 1.6;
}

/* ===== UPLOAD ZONE ===== */
.upload-zone {
  max-width: 480px;
  margin-inline: auto;
  padding: var(--space-12) var(--space-6);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: all 200ms ease;
  background: var(--color-surface);
}
.upload-zone:hover,
.upload-zone:focus-visible {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
}
.upload-zone.is-dragover {
  border-color: var(--color-gold);
  background: var(--color-gold-highlight);
  transform: scale(1.01);
}
.upload-zone__icon {
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
  display: flex;
  justify-content: center;
}
.upload-zone__text {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.upload-zone__cta {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.upload-zone__hint {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ===== PHOTO TIPS ===== */
.photo-tips {
  max-width: 480px;
  margin: var(--space-6) auto 0;
  padding: var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.photo-tips__title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.photo-tips__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2);
}
.photo-tips__list li {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  padding-left: var(--space-5);
  position: relative;
}
.photo-tips__list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}
.photo-tips__list li strong {
  color: var(--color-text);
}

/* ===== UPLOAD PREVIEW ===== */
.upload-preview {
  max-width: 480px;
  margin-inline: auto;
  text-align: center;
}
.upload-preview__img-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-md);
  background: var(--color-surface);
}
.upload-preview__img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px;
  object-fit: contain;
}
.upload-preview__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== STYLE FILTERS ===== */
.style-filters {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}
.style-filter {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-interactive);
}
.style-filter:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.style-filter.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
}

/* ===== STYLE GRID ===== */
.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
@media (min-width: 640px) {
  .style-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}
.style-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 200ms ease;
  background: var(--color-surface);
}
.style-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.style-card.is-selected {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px oklch(from var(--color-gold) l c h / 0.25);
}
.style-card__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.style-card__info {
  padding: var(--space-2) var(--space-3) var(--space-3);
}
.style-card__name {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}
.style-card__category {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.style-card__check {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
}
.style-card.is-selected .style-card__check {
  display: flex;
}

/* ===== STYLE ACTION BAR ===== */
.style-action {
  position: sticky;
  bottom: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: slideUp 300ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.style-action__info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.style-action__label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.style-action__name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  font-variation-settings: 'WONK' 1;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 480px) {
  .style-action {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== GENERATE LOADING ===== */
.generate-loading {
  text-align: center;
  padding: var(--space-16) 0;
}
.generate-loading__spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-gold);
  border-radius: var(--radius-full);
  margin-inline: auto;
  margin-bottom: var(--space-6);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.generate-loading__text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  font-variation-settings: 'WONK' 1;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.generate-loading__subtext {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ===== GENERATE RESULT ===== */
.generate-result__compare {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}
.generate-result__card {
  flex: 0 1 360px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}
.generate-result__card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.generate-result__card--portrait {
  border: 2px solid var(--color-gold);
}
.generate-result__label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding: var(--space-3) var(--space-4);
  text-align: center;
  background: var(--color-surface-offset);
}
.generate-result__arrow {
  color: var(--color-gold);
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .generate-result__arrow svg {
    transform: rotate(90deg);
  }
}
.generate-result__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== ERROR STATE ===== */
.generate-error {
  text-align: center;
  padding: var(--space-12) 0;
}
.generate-error p {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

/* ===== BUTTONS (supplement base) ===== */
.btn--outline {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-interactive);
}
.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn--sm {
  padding: var(--space-1) var(--space-4);
  font-size: var(--text-xs);
}
