/* ===== Lustybooks Quiz — style.css ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --green: #22C55E;
  --green-dark: #16A34A;
  --pink-border: #FBCFE8;
  --pink-hover: #F472B6;
  --ink: #1F2937;
  --muted: #6B7280;
}
html, body { height: 100%; }
body {
  background: #F3F4F6;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; }

/* ---- topbar: logo + progresso + voltar ---- */
#topbar {
  position: sticky; top: 0; z-index: 50;
}
#brandbar {
  display: flex; align-items: center; justify-content: center;
  background: #1C1C1C;
  padding: 9px 16px 8px;
  padding-top: calc(9px + env(safe-area-inset-top));
}
#brandbar img {
  display: block; height: 30px; width: auto;
  border-radius: 6px;
}
#progress-wrap {
  height: 8px; background: #3A3A3C; overflow: hidden;
}
#back-row {
  background: #F3F4F6;
  padding: 7px 12px 6px;
}
#back-row[hidden] { display: none; }
#back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px 7px 11px;
  border-radius: 99px;
  border: 1.5px solid #E5E7EB;
  background: #ffffff; color: #374151;
  font-family: inherit; font-size: .85rem; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  transition: border-color .15s, transform .12s;
}
#back-btn:hover { border-color: #D1D5DB; transform: translateX(-1px); }
#back-btn:active { transform: scale(.96); }
#back-btn svg { width: 15px; height: 15px; }
#back-btn[hidden] { display: none; }
#progress-bar {
  height: 100%; width: 0;
  background: var(--green);
  border-radius: 0 8px 8px 0;
  transition: width .45s cubic-bezier(.4,0,.2,1);
}

/* ---- pages ---- */
#pages { position: relative; }
.page {
  display: none;
  background: #ffffff;
  min-height: calc(100dvh - 104px);
  padding: 24px;
  animation: pageIn .38s ease;
}
.page.active { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.boot { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 120px 0; color: var(--muted); }

/* ---- text ---- */
.c-text h1 { font-size: 1.55rem; font-weight: 800; line-height: 1.28; margin: .45em 0; }
.c-text h2 { font-size: 1.32rem; font-weight: 800; line-height: 1.32; margin: .45em 0; }
.c-text h3 { font-size: 1.16rem; font-weight: 700; line-height: 1.38; margin: .5em 0; }
.c-text p  { font-size: 1rem; line-height: 1.6; margin: .55em 0; color: #374151; }
.c-text mark { padding: 0 4px; border-radius: 4px; }
.c-text strong { font-weight: 700; }

/* ---- image ---- */
.c-image img {
  display: block; margin: 12px auto;
  width: 100%; border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

/* side-by-side row (text 60% + image 40%) */
.c-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.c-row .c-text p { font-size: .95rem; line-height: 1.5; }
.c-row .c-image img { margin: 0 auto; box-shadow: none; }

/* ---- button ---- */
.c-button {
  display: block; width: 100%;
  padding: 16px 20px; margin: 18px 0 6px;
  border: none; border-radius: 14px;
  background: var(--green); color: #fff;
  font-family: inherit; font-size: 1.05rem; font-weight: 800;
  cursor: pointer; letter-spacing: .2px;
  transition: transform .15s, filter .15s, opacity .2s;
}
.c-button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.c-button:active { transform: scale(.98); }
.elev { box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.c-button.is-disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---- choices ---- */
.opts { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.opts.grid-2 { display: grid; grid-template-columns: 1fr 1fr; }
.opt {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 15px 16px;
  border: 2px solid var(--pink-border);
  border-radius: 14px;
  background: #FFF1F2;
  font-family: inherit; font-weight: 600; font-size: .98rem; color: var(--ink);
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .12s, opacity .2s;
}
.opt:hover { border-color: var(--pink-hover); transform: translateY(-1px); }
.opt.selected { border-color: var(--green); background: #F0FDF4; }
.opt.locked { opacity: .5; cursor: not-allowed; }
.opt.locked:hover { transform: none; border-color: var(--pink-border); }
.opt .tick {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #F9A8D4; flex: none;
  display: grid; place-items: center;
  color: transparent; font-size: 12px; font-weight: 900;
  transition: background .15s, border-color .15s, color .15s;
}
.opt.selected .tick { background: var(--green); border-color: var(--green); color: #fff; }
.shake { animation: shake .4s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* choice cards (image options) */
.card-opt {
  border: none; padding: 0; overflow: hidden;
  border-radius: 16px; background: #fff;
  cursor: pointer; position: relative;
  box-shadow: 0 5px 16px rgba(0,0,0,.14);
  transition: transform .15s, box-shadow .15s;
  font-family: inherit;
}
.card-opt:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.2); }
.card-opt img {
  width: 100%; height: auto;
  aspect-ratio: 768 / 1408;   /* proporção real das capas (768x1408) */
  object-fit: contain;        /* capa inteira, sem corte */
  background: #0F172A;        /* faixa lateral, se a capa tiver outra proporção */
  display: block;
}
.card-opt .card-label {
  display: block; padding: 12px;
  background: var(--green); color: #fff;
  font-weight: 800; font-size: .95rem; text-align: center;
}

/* ---- loading ---- */
.c-loading {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 22px; padding: 110px 0 90px;
}
.spinner {
  width: 54px; height: 54px; border-radius: 50%;
  border: 5px solid #D1FAE5; border-top-color: #10B981;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.c-loading .msg { font-size: 1.05rem; font-weight: 600; color: #374151; }
.c-loading .msg::after {
  content: ''; animation: dots 1.4s steps(4, end) infinite;
}
@keyframes dots {
  0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; }
}
.c-loading .loadbar { width: 180px; height: 6px; border-radius: 99px; background: #D1FAE5; overflow: hidden; }
.c-loading .loadbar i { display: block; height: 100%; width: 40%; border-radius: 99px; background: #10B981; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

/* ---- video ---- */
.c-video { margin: 14px 0; }
.c-video .vwrap { width: 100%; max-width: 400px; margin: 0 auto; }

/* ---- carousel (padrão mobile: slide central + vizinhos espiando) ---- */
.carousel { position: relative; margin: 16px 0; --car-w: min(62vw, 250px); }
.car-track {
  display: flex; overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 10px;
  padding: 4px calc(50% - var(--car-w) / 2);   /* permite a 1ª/última capa centralizar */
  border-radius: 16px;
  scrollbar-width: none;
}
.car-track::-webkit-scrollbar { display: none; }
.car-slide {
  flex: 0 0 var(--car-w);
  scroll-snap-align: center;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,.16);
  opacity: .5; transition: opacity .35s;
}
.car-slide.is-active { opacity: 1; }
.car-slide img { width: 100%; display: block; height: auto; }  /* imagem inteira, sem corte */
.car-dots { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.car-dot { width: 8px; height: 8px; border-radius: 99px; background: #D1D5DB; transition: all .25s; }
.car-dot.on { background: var(--green); width: 22px; }
.car-nav {
  position: absolute; top: 42%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.92);
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  z-index: 2;
  cursor: pointer; display: grid; place-items: center;
  color: #374151; font-size: 16px; font-weight: 900;
}
.car-nav.prev { left: 8px; }
.car-nav.next { right: 8px; }

/* ---- testimonials ---- */
.testi {
  background: #fff;
  border: 1px solid #F3F4F6;
  border-radius: 16px;
  padding: 16px 18px;
  margin: 10px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.testi .stars { color: #F59E0B; letter-spacing: 3px; font-size: .95rem; }
.testi .t-text { font-size: .95rem; line-height: 1.55; color: #374151; margin: 8px 0 12px; }
.testi .t-row { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-weight: 800; color: #fff; font-size: .95rem;
  background: linear-gradient(135deg, #EC4899, #8B5CF6);
}
.testi .t-name { font-weight: 700; font-size: .92rem; }

/* ---- arguments ---- */
.args { display: flex; flex-direction: column; margin: 12px 0; }
.arg { display: flex; gap: 12px; align-items: center; padding: 9px 0; }
.arg .ic {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: #DCFCE7; color: #16A34A;
  display: grid; place-items: center;
}
.arg .ic svg { width: 14px; height: 14px; }
.arg .a-text { font-size: .96rem; font-weight: 600; color: #1F2937; line-height: 1.4; }

/* ---- timer ---- */
.timer-bar {
  background: #EF4444; color: #fff;
  padding: 13px 16px; border-radius: 12px;
  text-align: center; margin: 14px 0;
  font-weight: 800; font-size: 1.02rem;
  letter-spacing: .3px;
}
.timer-bar .t { font-variant-numeric: tabular-nums; font-weight: 900; }

/* ---- price ---- */
.price-box { text-align: center; margin: 20px 0 14px; }
.price-badge {
  display: inline-block;
  background: linear-gradient(90deg, #8B5CF6, #EC4899);
  color: #fff; font-weight: 800; font-size: .82rem;
  padding: 6px 16px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: .8px;
  margin-bottom: 12px;
}
.price-old { color: #9CA3AF; text-decoration: line-through; font-size: 1.12rem; font-weight: 600; }
.price-inst { font-size: 2.05rem; font-weight: 900; color: #111827; line-height: 1.15; margin-top: 2px; }
.price-inst .x { font-size: 1.15rem; font-weight: 700; color: #374151; }
.price-cash { color: var(--green-dark); font-weight: 700; font-size: 1.02rem; margin-top: 6px; }

/* ---- checkout button ---- */
.checkout-btn {
  display: block; width: 100%;
  background: linear-gradient(90deg, var(--green), var(--green-dark));
  color: #fff; text-align: center;
  font-family: inherit; font-weight: 900; font-size: 1.04rem;
  padding: 18px 16px; border-radius: 14px;
  text-decoration: none; letter-spacing: .2px;
  box-shadow: 0 8px 22px rgba(34,197,94,.38);
  animation: pulse 1.7s ease-in-out infinite;
  margin: 18px 0;
  line-height: 1.4;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 22px rgba(34,197,94,.38); }
  50% { transform: scale(1.022); box-shadow: 0 12px 28px rgba(34,197,94,.5); }
}

/* ---- faq ---- */
.faq { margin: 16px 0; }
.faq-item { border-bottom: 1px solid #E5E7EB; }
.faq-q {
  width: 100%; background: none; border: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 15px 0; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: .97rem; color: var(--ink);
  text-align: left; line-height: 1.4;
}
.faq-q .chev { flex: none; transition: transform .25s; color: #9CA3AF; }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  color: #4B5563; font-size: .93rem; line-height: 1.6;
}
.faq-item.open .faq-a { max-height: 420px; padding-bottom: 16px; }

/* ---- misc ---- */
img { max-width: 100%; }
@media (min-width: 560px) {
  #app { box-shadow: 0 0 60px rgba(0,0,0,.08); }
}
