/* Jejum das Coreanas — estilos do quiz */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --theme: #7c3aed;
  --content: #71717a;
  --title: #030712;
  --bg: #ffffff;
  --radius: 1rem;
  --el-size: 56px;
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--content);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ---------- topo ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding: 12px 16px 0;
  text-align: center;
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}
.topbar .logo { height: 34px; max-width: 200px; object-fit: contain; }
.topbar .brand {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--title);
}
.progress {
  height: 4px;
  background: #e4e4e7;
  border-radius: 2px;
  margin: 10px auto 0;
  max-width: 28rem;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--theme);
  border-radius: 2px;
  transition: width .4s ease;
}

/* ---------- passo ---------- */
.step {
  max-width: 28rem;
  margin: 0 auto;
  padding: 20px 16px 48px;
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- texto (html do editor) ---------- */
.l-text { color: var(--content); word-break: break-word; }
.l-text h1 { font-size: 1.55rem; line-height: 1.25; color: var(--title); margin: .4em 0; }
.l-text h2 { font-size: 1.35rem; line-height: 1.3; color: var(--title); margin: .4em 0; }
.l-text h3 { font-size: 1.1rem; line-height: 1.35; margin: .4em 0; }
.l-text p { margin: .3em 0; min-height: .5em; }
.ql-align-center { text-align: center; }
.ql-align-right { text-align: right; }
.ql-align-justify { text-align: justify; }

/* ---------- imagem ---------- */
.l-image { text-align: center; }
.l-image img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* ---------- botão ---------- */
.btn {
  display: block;
  width: 100%;
  min-height: var(--el-size);
  border: 0;
  border-radius: var(--radius);
  background: var(--theme);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  padding: 14px 18px;
  text-align: center;
  text-decoration: none;
  transition: transform .15s ease, filter .15s ease;
  margin: 8px 0;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.98); }
.btn.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(124,58,237,.45); }
  70% { box-shadow: 0 0 0 14px rgba(124,58,237,0); }
  100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
}

/* ---------- opções ---------- */
.l-options .intro { margin-bottom: 14px; }
.opts { display: grid; grid-template-columns: 1fr; gap: 10px; }
.opts.cols-2 { grid-template-columns: 1fr 1fr; }
.opts.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: var(--el-size);
  padding: 12px 44px 12px 14px;
  border: 2px solid #e4e4e7;
  border-radius: var(--radius);
  background: #fafafa;
  font-family: inherit;
  font-size: 1rem;
  color: var(--title);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}
.opt:hover { border-color: var(--theme); }
.opt:active { transform: scale(.985); }
.opt.active { border-color: var(--theme); background: rgba(124,58,237,.08); }

.opt .opt-emoji { font-size: 1.6rem; flex-shrink: 0; }
.opt .opt-label { flex: 1; }
.opt .opt-label p { margin: 0; }
.opt .opt-check {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  border: 2px solid #d4d4d8;
  border-radius: 50%;
  transition: all .15s;
}
.opt.active .opt-check {
  border-color: var(--theme);
  background: var(--theme) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* opções com imagem em CARD (imagem no topo, texto embaixo) — ex.: gênero */
.opts.with-img .opt {
  flex-direction: column;
  padding: 0 0 12px;
  overflow: hidden;
  text-align: center;
}
.opts.with-img .opt .opt-img { width: 100%; }
.opts.with-img .opt .opt-img img { width: 100%; height: auto; display: block; }
.opts.with-img .opt .opt-label { padding: 0 34px 0 12px; font-weight: 600; }
.opts.with-img .opt .opt-check { top: auto; bottom: 12px; }

/* opções com imagem HORIZONTAL (texto à esquerda, miniatura à direita) —
   ex.: idade, físico, áreas do corpo. Mantém a imagem pequena e nítida. */
.opts.himg { grid-template-columns: 1fr; }
.opt-himg {
  align-items: stretch;
  padding: 0 0 0 16px;
  min-height: 84px;
  overflow: hidden;
}
.opt-himg .opt-label {
  align-self: center;
  padding: 12px 0;
  font-weight: 600;
  font-size: 1.05rem;
}
.opt-himg .opt-img {
  flex: 0 0 34%;
  max-width: 130px;
  margin-left: auto;
  align-self: stretch;
}
.opt-himg .opt-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- inputs ---------- */
.l-input { margin: 10px 0; }
.l-input label { display: block; font-weight: 600; color: var(--title); margin-bottom: 6px; }
.input-wrap { position: relative; }
.l-input input {
  width: 100%;
  min-height: var(--el-size);
  padding: 14px 60px 14px 16px;
  font-size: 1.3rem;
  font-family: inherit;
  border: 2px solid #e4e4e7;
  border-radius: var(--radius);
  outline: none;
  color: var(--title);
  text-align: center;
}
.l-input input:focus { border-color: var(--theme); }
.l-input input.invalid { border-color: #dc2626; }
.input-wrap .unit {
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--content);
}

/* ---------- alerta ---------- */
.l-alert {
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 10px 0;
  font-size: .95rem;
}
.l-alert p { margin: .2em 0; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fefce8; color: #854d0e; border: 1px solid #fde68a; }
.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ---------- métrica / barra ---------- */
.l-metric { margin: 14px 0; }
.metric-head { display: flex; justify-content: space-between; font-weight: 600; color: var(--title); margin-bottom: 6px; }
.metric-bar { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #dc2626, #fbbf24, #22c55e); position: relative; }
.metric-fill { position: relative; height: 100%; }
.metric-dot {
  position: absolute;
  right: -8px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  background: #fff;
  border: 3px solid var(--title);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.metric-legends { display: flex; justify-content: space-between; font-size: .78rem; margin-top: 6px; }
.metric-sub { font-size: .85rem; margin-top: 4px; color: var(--content); }

/* ---------- loading ---------- */
.l-loading { text-align: center; margin: 24px 0; }
.load-pct { font-size: 2rem; font-weight: 800; color: var(--title); margin-bottom: 10px; }
.load-bar { height: 10px; background: #e4e4e7; border-radius: 5px; overflow: hidden; margin-bottom: 16px; }
.load-fill { height: 100%; width: 0; background: var(--theme); border-radius: 5px; transition: width .1s linear; }

/* ---------- carrossel ---------- */
.l-carousel { margin: 12px 0; }
.car-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 12px;
  scrollbar-width: none;
}
.car-track::-webkit-scrollbar { display: none; }
.car-item { flex: 0 0 100%; scroll-snap-align: center; text-align: center; }
.car-item img { max-width: 100%; height: auto; border-radius: var(--radius); }
.car-dots { text-align: center; margin-top: 10px; }
.car-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #d4d4d8;
  margin: 0 4px;
  transition: background .2s;
}
.car-dot.active { background: var(--theme); }

/* ---------- argumentos ---------- */
.l-args { display: grid; gap: 14px; margin: 12px 0; }
.arg { display: flex; gap: 12px; align-items: flex-start; }
.arg-emoji { font-size: 1.8rem; flex-shrink: 0; }
.arg-img img { width: 44px; height: 44px; object-fit: contain; }
.arg-text h2 { font-size: 1.05rem; color: var(--title); margin-bottom: 2px; }
.arg-text p { font-size: .92rem; }

/* ---------- preço ---------- */
.l-price { display: block; text-decoration: none; margin: 14px 0; }
.price-featured {
  text-align: center;
  font-weight: 700;
  color: var(--title);
  margin-bottom: 8px;
}
.price-card {
  border: 2px solid var(--theme);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  background: rgba(124,58,237,.05);
}
.price-title { color: var(--title); font-size: 1.05rem; margin-bottom: 6px; }
.price-title p { margin: 0; }
.price-main { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.price-before { color: var(--content); font-size: .95rem; }
.price-value { font-size: 2.2rem; font-weight: 800; color: var(--theme); }
.price-after { color: var(--content); font-size: .9rem; margin-top: 4px; }

/* ---------- timer ---------- */
.l-timer {
  border-radius: var(--radius);
  padding: 12px 16px;
  text-align: center;
  font-size: .95rem;
  margin: 10px 0;
}
.l-timer p { margin: 0; }
.timer-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.timer-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ---------- gráfico ---------- */
.l-chart { margin: 12px 0; }
.chart-svg { width: 100%; height: auto; }
.chart-tip { font-size: 11px; font-weight: 700; fill: #111; }
.chart-axis { font-size: 10px; fill: #a1a1aa; }

/* ---------- shake (validação) ---------- */
.shake { animation: shake .4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@media (max-width: 380px) {
  .l-text h1 { font-size: 1.35rem; }
  .l-text h2 { font-size: 1.2rem; }
}
