/* ══════════════════════════════════════════
   UNIVERSE — Artistic Identity Builder
   Design: White + Purple→Pink gradient
══════════════════════════════════════════ */

:root {
  --grad: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
  --grad-soft: linear-gradient(135deg, #f3e8ff 0%, #fce7f3 100%);
  --violet: #8B5CF6;
  --pink: #EC4899;
  --violet-deep: #6D28D9;
  --violet-light: #EDE9FE;
  --text: #111827;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --bg: #ffffff;
  --card-bg: #ffffff;
  --card-border: rgba(139, 92, 246, 0.12);
  --card-shadow: 0 4px 24px rgba(139, 92, 246, 0.08), 0 1px 4px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 8px 40px rgba(139, 92, 246, 0.16), 0 2px 8px rgba(0,0,0,0.06);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 100px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

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

/* ══ TOP PROGRESS ══ */
.top-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(139, 92, 246, 0.1);
  z-index: 9999;
  display: none;
}
.top-progress-fill {
  height: 100%;
  background: var(--grad);
  width: 0%;
  transition: width 0.5s ease;
  border-radius: 3px;
}

/* ══ SCREENS ══ */
.screen {
  display: none;
  min-height: 100vh;
  position: relative;
}
.screen.active { display: flex; flex-direction: column; }

/* ══ GRADIENT TEXT ══ */
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══ BUTTONS ══ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--grad);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35);
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.45);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.btn-lg {
  padding: 18px 40px;
  font-size: 17px;
  border-radius: var(--radius-pill);
}
.btn-primary.btn-generate {
  width: 100%;
  justify-content: center;
  padding: 18px;
  font-size: 16px;
  margin-top: 32px;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid #E5E7EB;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn-ghost:hover { border-color: var(--violet); color: var(--violet); background: var(--violet-light); }
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  padding: 6px 8px;
  border-radius: 8px;
}
.btn-back:hover { color: var(--violet); background: var(--violet-light); }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--violet-light);
  color: var(--violet);
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: var(--transition);
}
.copy-btn:hover { background: var(--violet); color: #fff; }
.copy-btn.copied { background: #D1FAE5; color: #065F46; }

/* ══════════════════════════════════════════
   SCREEN 1 — WELCOME
══════════════════════════════════════════ */
#screenWelcome {
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 60px 24px;
  background: #fff;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%);
  top: -100px; right: -100px;
  animation-delay: 0s;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(236,72,153,0.1) 0%, transparent 70%);
  bottom: -80px; left: -80px;
  animation-delay: 3s;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(139,92,246,0.08) 0%, transparent 70%);
  top: 50%; left: 30%;
  animation-delay: 6s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -20px) scale(1.05); }
  66% { transform: translate(-10px, 10px) scale(0.95); }
}
.welcome-content {
  text-align: center;
  max-width: 620px;
  position: relative;
  z-index: 1;
}
.app-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 18px;
  font-weight: 700;
  color: var(--violet);
}
.welcome-badge {
  display: inline-block;
  background: var(--grad-soft);
  color: var(--violet);
  padding: 6px 20px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.welcome-title {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 20px;
  color: var(--text);
}
.welcome-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.welcome-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}
.feature-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.welcome-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-light);
}
.btn-test {
  display: inline-block;
  margin-top: 10px;
  padding: 7px 18px;
  background: none;
  border: 1.5px dashed #D1D5DB;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #9CA3AF;
  cursor: pointer;
  transition: var(--transition);
}
.btn-test:hover {
  border-color: var(--violet);
  color: var(--violet);
  background: var(--violet-light);
}

/* ══════════════════════════════════════════
   SCREEN 2 — QUESTIONNAIRE
══════════════════════════════════════════ */
#screenQuestionnaire {
  background: #FAFAFA;
  padding-top: 8px;
}
.questionnaire-wrapper {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 24px 120px;
  width: 100%;
}
.q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  position: sticky;
  top: 0;
  background: rgba(250,250,250,0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
  padding: 12px 0;
}
.q-step-dots {
  display: flex;
  gap: 6px;
}
.q-step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #E5E7EB;
  transition: var(--transition);
}
.q-step-dot.active { background: var(--grad); background: var(--violet); width: 24px; border-radius: 4px; }
.q-step-dot.done { background: var(--pink); opacity: 0.5; }
.q-step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.step-panel {
  animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.step-intro {
  margin-bottom: 32px;
}
.step-number {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.step-intro h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.step-intro p { color: var(--text-muted); font-size: 15px; }

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group.half { grid-column: span 1; }
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.req { color: var(--pink); font-weight: 600; }
.opt {
  background: #F3F4F6;
  color: var(--text-light);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group small {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.4;
}
.field-hint { font-size: 12px; color: var(--text-light); margin-top: -2px; }

/* Inputs */
input[type="text"],
input[type="email"],
select,
textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  border: 1.5px solid #E5E7EB;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: var(--transition);
  outline: none;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
input::placeholder, textarea::placeholder { color: #D1D5DB; }
select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
textarea { resize: vertical; min-height: 80px; line-height: 1.6; }

/* Triple Input */
.triple-input {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

/* Chips */
.chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: flex;
  align-items: center;
  padding: 7px 14px;
  border: 1.5px solid #E5E7EB;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  user-select: none;
  white-space: nowrap;
}
.chip:hover { border-color: var(--violet); color: var(--violet); background: var(--violet-light); }
.chip.selected {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
}
.chip input { display: none; }

/* Color Palette Grid */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.palette-card {
  cursor: pointer;
  text-align: center;
  border: 2px solid #E5E7EB;
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
  user-select: none;
}
.palette-card:hover { border-color: var(--violet); transform: translateY(-2px); box-shadow: var(--card-shadow); }
.palette-card.selected { border-color: var(--violet); box-shadow: 0 0 0 2px var(--violet); }
.palette-swatch { width: 100%; height: 64px; }
.palette-card span {
  display: block;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: #fff;
}
.palette-card.selected span { color: var(--violet); }

/* Toggle Group */
.toggle-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.toggle-opt {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 2px solid #E5E7EB;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  text-align: center;
  user-select: none;
}
.toggle-opt:hover { border-color: var(--violet); color: var(--violet); background: var(--violet-light); }
.toggle-opt.selected { border-color: var(--violet); background: var(--violet-light); color: var(--violet-deep); font-weight: 600; }
.toggle-opt input { display: none; }

/* Step Navigation */
.step-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 20px 24px;
  background: rgba(250,250,250,0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid #F0F0F0;
  display: flex;
  justify-content: center;
  z-index: 100;
}
.step-nav .btn-primary {
  min-width: 200px;
  justify-content: center;
}

/* ══════════════════════════════════════════
   SCREENS 3 & 5 — LOADING
══════════════════════════════════════════ */
#screenLoading, #screenGenerating {
  align-items: center;
  justify-content: center;
  background: #fff;
}
.loading-wrap {
  text-align: center;
  padding: 40px 24px;
}
.loading-universe {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 32px;
}
.lu-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.lu-ring-1 {
  width: 120px; height: 120px;
  border-top-color: var(--violet);
  border-right-color: rgba(139,92,246,0.3);
  animation: spin 2s linear infinite;
}
.lu-ring-2 {
  width: 88px; height: 88px;
  border-top-color: var(--pink);
  border-left-color: rgba(236,72,153,0.3);
  animation: spin 1.5s linear infinite reverse;
}
.lu-ring-3 {
  width: 56px; height: 56px;
  border-top-color: rgba(139,92,246,0.5);
  animation: spin 3s linear infinite;
}
.lu-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.loading-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.loading-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.loading-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.loading-dots span {
  width: 8px; height: 8px;
  background: var(--violet);
  border-radius: 50%;
  animation: dotBounce 1.4s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; background: var(--pink); }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Gen Steps */
.gen-steps { margin-top: 32px; text-align: left; max-width: 380px; margin-left: auto; margin-right: auto; }
.gen-step {
  padding: 10px 16px;
  font-size: 14px;
  color: #D1D5DB;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: var(--transition);
}
.gen-step.active { color: var(--violet); background: var(--violet-light); font-weight: 600; }
.gen-step.done { color: #10B981; }
.gen-step.done::before { content: '✓'; font-weight: 700; }
.gen-step.active::before { content: '◉'; animation: pulse 1s infinite; }
.gen-step.pending::before { content: '○'; }

/* ══════════════════════════════════════════
   SCREEN 4 — FOLLOW-UP
══════════════════════════════════════════ */
#screenFollowup {
  background: #FAFAFA;
  padding: 40px 24px;
}
.followup-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 60px;
}
.followup-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.ai-avatar {
  width: 48px; height: 48px;
  background: var(--grad);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  flex-shrink: 0;
}
.followup-head h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.followup-head p { font-size: 14px; color: var(--text-muted); }

.followup-question {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 24px;
  margin-bottom: 16px;
  animation: slideIn 0.3s ease;
}
.followup-question label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.5;
}
.followup-question textarea {
  font-size: 14px;
  border: 1.5px solid #E5E7EB;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  width: 100%;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.followup-question textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}

/* ══════════════════════════════════════════
   SCREEN 6 — RESULTS
══════════════════════════════════════════ */
#screenResults {
  background: #F8F7FF;
  padding-bottom: 100px;
}

/* Results Header */
.results-header {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rh-bg {
  position: absolute;
  inset: 0;
  background: var(--grad);
}
.rh-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.rh-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 24px 40px;
  max-width: 780px;
}
.rh-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  color: rgba(255,255,255,0.9);
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.rh-title {
  color: #fff;
  font-size: clamp(26px, 5vw, 44px);
  font-weight: 700;
  font-style: italic;
  margin-bottom: 10px;
  line-height: 1.2;
}
.rh-tagline {
  color: rgba(255,255,255,0.85);
  font-size: 16px;
  font-style: italic;
  margin-bottom: 12px;
}
.rh-artist {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Results Body */
.results-body {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* Section */
.rs { margin-bottom: 32px; }
.rs-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rs-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 12px;
}

/* Result Card */
.result-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 28px;
  border: 1px solid var(--card-border);
  animation: cardIn 0.5s ease both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.result-card.prose p {
  font-size: 15px;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 16px;
}
.result-card.prose p:last-child { margin-bottom: 0; }
.rc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rc-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  margin-top: 8px;
}
.rc-intro { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.bio-tag {
  background: #F3F4F6;
  color: var(--text-light);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
}
.bio-text { font-size: 14px; line-height: 1.8; color: #374151; }

/* Color Palette */
.color-palette-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.color-swatch-item {
  text-align: center;
}
.color-swatch-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: 0 3px 12px rgba(0,0,0,0.15);
  margin: 0 auto 6px;
  border: 3px solid #fff;
  outline: 2px solid rgba(0,0,0,0.08);
}
.color-swatch-name { font-size: 10px; font-weight: 600; color: var(--text-muted); }
.palette-meaning {
  margin-top: 12px;
}
.palette-meaning-item {
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 0;
  border-bottom: 1px solid #F3F4F6;
  display: flex;
  align-items: center;
  gap: 8px;
}
.palette-meaning-item:last-child { border: none; }
.palette-meaning-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Keywords Cloud */
.kw-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.kw-tag {
  padding: 5px 14px;
  background: var(--grad-soft);
  color: var(--violet-deep);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}
.tags-line { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-sm {
  padding: 3px 10px;
  background: #F3F4F6;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
}

/* Moodboard */
.moodboard-card, .logo-card {
  text-align: center;
  padding: 20px;
}
.mb-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}
.mb-spinner {
  width: 40px; height: 40px;
  border: 3px solid #E5E7EB;
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
#rMoodboard {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-sm);
  box-shadow: var(--card-shadow);
}
#rLogo {
  max-width: 300px;
  max-height: 300px;
  border-radius: var(--radius-sm);
  box-shadow: var(--card-shadow);
  background: #F9FAFB;
  padding: 20px;
}
.img-caption {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-light);
  font-style: italic;
}
.img-download-btn {
  display: inline-block;
  margin: 12px auto 0;
  padding: 8px 20px;
  background: var(--grad-soft);
  color: var(--violet);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.img-download-btn:hover { background: var(--grad); color: #fff; }

/* Pitch */
.pitch-card { background: var(--grad-soft); border: none; }
.pitch-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 12px;
}
.pitch-text {
  font-size: 18px;
  font-style: italic;
  font-weight: 500;
  color: var(--text);
  line-height: 1.6;
  border-left: 3px solid var(--violet);
  padding-left: 16px;
  margin: 0;
}

/* Key Phrases */
.key-phrase-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #F3F4F6;
  font-size: 14px;
  color: #374151;
  font-style: italic;
  line-height: 1.6;
}
.key-phrase-item:last-child { border: none; }
.key-phrase-item::before { content: '"'; color: var(--violet); font-size: 24px; line-height: 1; flex-shrink: 0; }

/* UVP */
.uvp-card { background: var(--grad); border: none; }
.uvp-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin-bottom: 10px;
}
.uvp-text {
  font-size: 16px;
  color: #fff;
  line-height: 1.7;
  font-weight: 500;
}

/* Platforms */
.platform-item {
  padding: 14px;
  background: #F9FAFB;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  border-left: 3px solid var(--violet);
}
.platform-item-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--violet);
  margin-bottom: 4px;
}
.platform-item-why { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.platform-item-strat { font-size: 12px; color: #6B7280; font-style: italic; }
.platform-priority {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  float: right;
}
.priority-haute { background: #FEE2E2; color: #991B1B; }
.priority-moyenne { background: #FEF3C7; color: #92400E; }
.priority-basse { background: #D1FAE5; color: #065F46; }

/* Hashtags */
.hashtags-text {
  font-family: monospace;
  font-size: 13px;
  color: var(--violet);
  line-height: 2;
  word-break: break-all;
}

/* Content Ideas */
.content-idea-item {
  padding: 12px;
  background: #F9FAFB;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.content-idea-type { font-size: 11px; font-weight: 700; color: var(--pink); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.content-idea-desc { font-size: 13px; color: var(--text-muted); }
.content-idea-freq { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* Tactic List */
.tactic-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tactic-list li {
  padding: 10px 12px;
  background: #F9FAFB;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}
.dos-list li { background: #ECFDF5; }
.dos-list li::before { content: '✓'; color: #10B981; font-weight: 700; flex-shrink: 0; }
.donts-list li { background: #FFF5F5; }
.donts-list li::before { content: '✗'; color: #EF4444; font-weight: 700; flex-shrink: 0; }

/* Results Bottom Bar */
.results-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 16px 24px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 200;
}

/* ══ MODAL ══ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px;
  max-width: 440px;
  width: 100%;
  position: relative;
  animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: #F3F4F6;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--text-muted);
}
.modal-close:hover { background: #E5E7EB; color: var(--text); }
.modal-icon { font-size: 36px; margin-bottom: 12px; }
.modal h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.modal p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ══ TOAST ══ */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a1a;
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-group.half { grid-column: 1 / -1; }
  .rs-split { grid-template-columns: 1fr; }
  .palette-grid { grid-template-columns: repeat(3, 1fr); }
  .triple-input { grid-template-columns: 1fr; }
  .welcome-title { font-size: 36px; }
  .results-body { padding: 24px 16px; }
  .result-card { padding: 20px; }
  .questionnaire-wrapper { padding: 16px 16px 120px; }
}

/* ══ PARTNER FOOTER ══ */
.partner-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid #F3F4F6;
}
.partner-footer--results {
  margin-top: 8px;
  padding: 28px 0 12px;
}
.partner-label {
  font-size: 11px;
  font-weight: 500;
  color: #D1D5DB;
  white-space: nowrap;
  flex-shrink: 0;
}
.partner-logo {
  max-height: 52px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  opacity: 0.88;
  transition: opacity 0.3s ease;
}
.partner-logo:hover { opacity: 1; }

/* ── iOS safe area padding ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .results-bar { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .step-nav    { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* ══════════════════════════════════════════
   PRINT STYLES
══════════════════════════════════════════ */
@media print {
  .top-progress, .results-bar, .modal-backdrop, .toast,
  .copy-btn, .img-download-btn, .btn-ghost, .btn-primary { display: none !important; }
  .screen { display: block !important; min-height: unset; }
  #screenWelcome, #screenQuestionnaire, #screenLoading,
  #screenFollowup, #screenGenerating { display: none !important; }
  #screenResults { display: block !important; background: #fff; padding-bottom: 0; }
  .results-header { min-height: 200px; }
  .rh-bg { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .result-card { box-shadow: none; border: 1px solid #E5E7EB; break-inside: avoid; }
  .rs { break-inside: avoid; }
  .results-body { padding: 24px; }
  body { font-size: 12px; }
}
