/* Teste 360° Visionários - CSS replicando visual original (Tailwind/Manus) */

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

:root {
  --gold: #C9A84C;
  --gold-light: #E8D5A0;
  --gold-mid: #B8A070;
  --gold-dark: #A88B3D;
  --bg-dark: #0F1B2D;
  --bg-mid: #1A2A42;
  --bg-card: #1A2A42cc;
  --border-dark: #2A3A52;
  --c-acao: #D97706;
  --c-comunicacao: #CA8A04;
  --c-conexao: #059669;
  --c-analise: #2563EB;
  --c-emocional: #DC2626;
  --c-execucao: #D97706;
  --c-aprendizagem: #2563EB;
  --c-direcionamento: #7C3AED;
}

html, body {
  height: 100%;
  font-family: 'Source Sans 3', system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--gold);
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, #0F1B2D 0%, #1A2A42 50%, #0F1B2D 100%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Playfair Display', Georgia, serif;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

img { max-width: 100%; display: block; }
input { font: inherit; }

/* Layout principal */
.app-bg {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.wrap {
  width: 100%;
  max-width: 32rem;
  text-align: center;
}

.wrap-quiz { max-width: 32rem; width: 100%; margin: 0 auto; }

/* Animações */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
.fade-up { animation: fadeUp 0.6s ease both; }
.slide-in { animation: slideInRight 0.25s ease both; }

/* Tela de boas-vindas */
.welcome-title {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 0.25rem;
  letter-spacing: 0.02em;
}
.welcome-sub {
  font-size: 1.25rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}
.welcome-helper {
  font-size: 0.875rem;
  color: var(--gold-mid);
  margin-bottom: 1.5rem;
}

/* Grid de testes (welcome) */
.test-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.test-card {
  background: rgba(26,42,66,0.8);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(4px);
}
.test-card:hover {
  transform: scale(1.03);
  border-color: var(--gold);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.test-card:active { transform: scale(0.97); }
.test-card .emoji { font-size: 1.5rem; margin-bottom: 0.25rem; }
.test-card .name { font-size: 0.875rem; font-weight: 700; color: var(--gold); }
.test-card .desc { font-size: 0.75rem; color: var(--gold-mid); }

.footer-mini {
  font-size: 0.75rem;
  color: rgba(184, 160, 112, 0.6);
  margin-top: 1.5rem;
}

/* Idade (cards horizontais) */
.age-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.age-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  padding: 0.75rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.age-card:hover {
  border-color: var(--gold);
  transform: scale(1.02);
}
.age-card:active { transform: scale(0.98); }
.age-card .img-wrap {
  width: 3.5rem; height: 3.5rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(201,168,76,0.1);
  border-radius: 0.5rem;
  flex-shrink: 0;
  font-size: 1.8rem;
}
.age-card .img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.age-card .info { flex: 1; text-align: left; }
.age-card .label { font-weight: 700; font-size: 1rem; color: var(--gold); }
.age-card .sub { font-size: 0.875rem; color: var(--gold-mid); }
.age-card .chev { color: var(--gold-mid); }

/* Nome */
.name-icon { color: var(--gold); margin: 0 auto 1rem; }
.name-title { font-size: 1.5rem; font-weight: 800; color: var(--gold); margin-bottom: 0.5rem; }
.name-helper { font-size: 0.875rem; color: var(--gold-mid); margin-bottom: 1.5rem; }
.name-input {
  width: 100%;
  max-width: 24rem;
  margin: 0 auto 1.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  border: 2px solid var(--border-dark);
  background: #fff;
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 600;
  display: block;
  outline: none;
  transition: border-color 0.2s;
}
.name-input:focus { border-color: var(--gold); }

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, opacity 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.btn-gold {
  background: var(--gold);
  color: #fff;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(201,168,76,0.4);
}
.btn-gold:hover { background: var(--gold-dark); }
.btn-gold:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-wa {
  background: #25D366;
  color: #fff;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(37,211,102,0.3);
}
.btn-wa:hover { background: #1DA851; }
.btn-outline {
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.6rem 1.5rem;
  background: transparent;
}
.btn-outline:hover { background: rgba(201,168,76,0.1); }
.btn-block { width: 100%; max-width: 18rem; }

/* Quiz */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}
.layer-badge {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  color: #fff;
  text-transform: uppercase;
}
.layer-talento       { background: #C9A84C; }
.layer-emocional     { background: #DC2626; }
.layer-execucao      { background: #D97706; }
.layer-aprendizagem  { background: #2563EB; }
.layer-direcionamento{ background: #7C3AED; }

.counter { font-size: 0.75rem; font-weight: 600; color: var(--gold-mid); }

.progress {
  height: 0.5rem;
  background: var(--border-dark);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.progress-bar {
  height: 100%;
  background: var(--gold);
  transition: width 0.3s ease;
}

.question-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.option-card {
  background: #fff;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  padding: 0.75rem;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.1s, border-color 0.2s, box-shadow 0.2s;
}
.option-card:hover { border-color: var(--border-dark); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.option-card:active { transform: scale(0.98); }
.option-card.selected {
  border-color: var(--gold);
  background: rgba(201,168,76,0.1);
}
.option-card p { font-size: 0.875rem; color: var(--gold); line-height: 1.55; }

/* Result */
.result-header { text-align: center; margin-bottom: 1.5rem; }
.result-header .small { font-size: 0.875rem; color: var(--gold-mid); font-weight: 600; margin-bottom: 0.25rem; }
.result-header h2 { font-size: 1.875rem; font-weight: 800; color: var(--gold); margin-bottom: 0.25rem; }
.force-badge {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 1rem;
  overflow: hidden;
  color: #4A4A3A;
}
.card-dark {
  background: var(--bg-dark);
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.card-dark p { color: var(--gold-light); }
.card-gold {
  background: var(--gold);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
  box-shadow: 0 6px 20px rgba(201,168,76,0.35);
}
.card-gold p { color: #fff; font-size: 0.875rem; font-style: italic; line-height: 1.6; }

.card-body { padding: 1rem; }

.radar-title { text-align: center; font-weight: 700; color: var(--gold); margin-bottom: 0.5rem; font-size: 0.875rem; }
.radar-container { width: 100%; height: 240px; position: relative; }
.radar-legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.25rem; margin-top: 0.5rem; }
.radar-legend > div { display: flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; }
.radar-legend span.dot { width: 0.625rem; height: 0.625rem; border-radius: 50%; display: inline-block; }
.radar-legend span.lbl { font-weight: 600; }

.essence-card { border-left: 4px solid var(--gold); }
.essence-card .essencia { font-size: 0.875rem; color: var(--gold); line-height: 1.6; margin-bottom: 0.75rem; }
.essence-card .super { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.essence-card .pill {
  font-size: 0.75rem; background: rgba(201,168,76,0.1); color: var(--gold);
  padding: 0.25rem 0.5rem; border-radius: 9999px; font-weight: 600;
}

.sub-profile p:first-child { font-size: 0.75rem; color: var(--gold-mid); font-weight: 600; }
.sub-profile p + p { font-size: 0.75rem; color: var(--gold-light); margin-top: 0.25rem; }

/* Sections collapsibles */
.section {
  background: #fff;
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  overflow: hidden;
}
.section-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.875rem;
  font-family: 'Playfair Display', serif;
}
.section-body {
  padding: 0 1rem 1rem;
  font-size: 0.875rem;
  color: #4A4A3A;
  line-height: 1.6;
  display: none;
}
.section.open .section-body { display: block; }
.section .chev { transition: transform 0.2s; }
.section.open .chev { transform: rotate(180deg); }

.section-body ul { list-style: none; padding-left: 0; }
.section-body ul li { margin-bottom: 0.25rem; }
.section-body ol { list-style: none; padding-left: 0; }
.section-body ol li { margin-bottom: 0.5rem; }
.section-body p + p { margin-top: 0.5rem; }

/* Barras horizontais (perfil emocional/execução) */
.bar-row { margin-bottom: 0.5rem; }
.bar-row .meta { display: flex; justify-content: space-between; font-size: 0.75rem; margin-bottom: 0.25rem; }
.bar-row .meta .lbl { font-weight: 600; }
.bar-track { height: 0.5rem; background: #e5e7eb; border-radius: 9999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 9999px; transition: width 0.4s ease; }
.bar-red { background: #f87171; }
.bar-amber { background: #fbbf24; }

/* Scores gerais */
.score-row { margin-bottom: 0.75rem; }
.score-row .meta { display: flex; justify-content: space-between; font-size: 0.75rem; margin-bottom: 0.25rem; }
.score-row .meta .lbl { font-weight: 600; color: #333; }
.score-row .meta .val { font-weight: 700; }
.score-track { height: 0.75rem; background: #e5e7eb; border-radius: 9999px; overflow: hidden; }
.score-fill { height: 100%; border-radius: 9999px; transition: width 0.5s ease; }

/* Botões finais */
.actions-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

/* Loading do PDF */
.spinner {
  display: inline-block;
  width: 1rem; height: 1rem;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Ícones inline (svg lucide-like via stroke) */
.icon { width: 1rem; height: 1rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 1.25rem; height: 1.25rem; }
.icon-xl { width: 3rem; height: 3rem; }

@media (min-width: 640px) {
  .welcome-title { font-size: 2.5rem; }
}
