/* ============================================================
   O Desafio dos Segredos — estilos do quiz
   Reaproveita as variáveis e fontes de styles.css (mesma identidade).
   ============================================================ */

.q-main { min-height: 100vh; display: flex; flex-direction: column; }

/* ---- Cabeçalho enxuto ---- */
.q-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .8rem clamp(16px, 4vw, 32px);
  background: rgba(10, 20, 22, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.q-brand { display: flex; align-items: center; gap: .6rem; color: var(--cream); }
.q-brand .mark { color: var(--gold); font-size: 1.2rem; }
.q-brand strong { font-family: var(--font-display); font-weight: 600; font-size: .82rem; letter-spacing: .04em; line-height: 1.1; }
.q-nav__home { font-family: var(--font-sans); font-size: .82rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .45em 1em; transition: color .2s, border-color .2s; }
.q-nav__home:hover { color: var(--gold); border-color: var(--gold-deep); }

.q-wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding: clamp(20px, 4vw, 40px); flex: 1; }
.q-screen[hidden] { display: none; }

/* ---- Tela de abertura ---- */
.q-intro { max-width: 680px; margin: clamp(10px, 4vw, 40px) auto 0; text-align: center; }
.q-eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: .74rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold);
  border: 1px solid var(--gold-deep); border-radius: 999px; padding: .5em 1.2em; margin-bottom: 1.4rem;
}
.q-title {
  font-family: var(--font-display); font-weight: 700; color: var(--ink);
  font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.05; letter-spacing: .01em; margin-bottom: 1rem;
}
.q-title .grad { background: linear-gradient(120deg, var(--gold-bright), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.q-lead { color: var(--text); font-size: 1.08rem; line-height: 1.6; margin-bottom: 1.8rem; }
.q-lead em { color: var(--gold-bright); }

.q-rules { display: grid; gap: .8rem; text-align: left; margin: 0 auto 2rem; max-width: 560px; }
.q-rule { display: flex; gap: .9rem; align-items: flex-start; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 1rem 1.1rem; }
.q-rule__ic { font-size: 1.3rem; line-height: 1.2; flex-shrink: 0; }
.q-rule__tx { font-size: .95rem; color: var(--text); line-height: 1.5; }
.q-rule__tx strong { color: var(--ink); }

.q-legal { font-size: .8rem; color: var(--muted-2); margin-top: 1.4rem; line-height: 1.5; }

/* ---- Botões (herda .btn de styles.css) ---- */
.q-btn { font-family: var(--font-sans); font-weight: 600; cursor: pointer; border: none; }

/* ---- Layout do jogo ---- */
.q-game { display: grid; grid-template-columns: 1fr; gap: clamp(18px, 3vw, 28px); }
@media (min-width: 860px) { .q-game { grid-template-columns: 1fr 232px; align-items: start; } }

.q-play { min-width: 0; }

/* Barra de progresso + timer */
.q-topbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.q-step { font-family: var(--font-display); font-weight: 600; color: var(--gold); font-size: .95rem; letter-spacing: .03em; }
.q-guaranteed { margin-left: auto; font-size: .82rem; color: var(--muted); }
.q-guaranteed b { color: var(--aqua); font-family: var(--font-serif); font-size: 1rem; }

.q-timer { height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin-bottom: 1.4rem; }
.q-timer__bar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--aqua), var(--gold)); transform-origin: left; transition: transform 1s linear, background .3s; }
.q-timer__bar.is-low { background: #e6704f; }

/* Cartão da pergunta */
.q-card { background: linear-gradient(180deg, var(--panel), var(--bg-3)); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.3rem, 4vw, 2rem); box-shadow: var(--shadow); }
.q-tag { display: inline-block; font-family: var(--font-sans); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--aqua-soft); border: 1px solid var(--line); border-radius: 999px; padding: .35em .9em; margin-bottom: 1rem; }
.q-question { font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.2rem, 3.4vw, 1.55rem); color: var(--ink); line-height: 1.3; margin-bottom: 1.5rem; }

.q-alts { display: grid; gap: .7rem; }
.q-alt {
  display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .95rem 1.1rem; color: var(--text); font-family: var(--font-sans); font-size: 1rem; line-height: 1.4;
  cursor: pointer; transition: border-color .18s, background .18s, transform .12s, opacity .3s;
}
.q-alt:hover:not(:disabled) { border-color: var(--gold); background: var(--bg-3); transform: translateX(3px); }
.q-alt:disabled { cursor: default; }
.q-alt__key { display: grid; place-items: center; flex-shrink: 0; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid var(--gold-deep); font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--gold); }
.q-alt__tx { flex: 1; }
.q-alt.is-hidden { opacity: .28; pointer-events: none; filter: grayscale(1); }
.q-alt.is-correct { border-color: var(--aqua); background: rgba(100, 214, 196, .13); color: var(--cream); }
.q-alt.is-correct .q-alt__key { border-color: var(--aqua); color: var(--aqua); background: rgba(100, 214, 196, .12); }
.q-alt.is-wrong { border-color: #e6704f; background: rgba(230, 112, 79, .12); color: #f2c6b5; }
.q-alt.is-wrong .q-alt__key { border-color: #e6704f; color: #e6704f; }

/* Explicação + ações após responder */
.q-feedback { margin-top: 1.3rem; }
.q-verdict { font-family: var(--font-serif); font-weight: 600; font-size: 1.1rem; margin-bottom: .5rem; }
.q-verdict.ok { color: var(--aqua); }
.q-verdict.no { color: #e6704f; }
.q-exp { font-size: .95rem; color: var(--text); line-height: 1.55; background: var(--bg-2); border-left: 3px solid var(--gold-deep); border-radius: 0 8px 8px 0; padding: .85rem 1rem; }
.q-actions { display: flex; gap: .8rem; margin-top: 1.3rem; flex-wrap: wrap; }
.q-actions .btn { flex: 1; min-width: 180px; }

/* Ajudas + parar */
.q-tools { display: flex; gap: .6rem; margin-top: 1.2rem; flex-wrap: wrap; }
.q-tool {
  display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-sans); font-size: .84rem;
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: .5em 1em; color: var(--text); cursor: pointer; transition: border-color .18s, color .18s, opacity .2s;
}
.q-tool:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.q-tool:disabled { opacity: .35; cursor: default; text-decoration: line-through; }
.q-tool--stop { margin-left: auto; border-color: var(--gold-deep); color: var(--gold); }
.q-tool--stop:hover:not(:disabled) { background: rgba(217, 189, 126, .1); }

/* ---- Escada de prêmios ---- */
.q-ladder { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1rem .9rem; }
.q-ladder__h { font-family: var(--font-display); font-weight: 600; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); text-align: center; margin-bottom: .8rem; }
.q-rung { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .42rem .7rem; border-radius: 8px; font-size: .9rem; color: var(--muted); transition: background .2s, color .2s; }
.q-rung__n { font-family: var(--font-display); font-weight: 600; opacity: .7; min-width: 1.6em; }
.q-rung__d { font-family: var(--font-serif); font-weight: 600; }
.q-rung.is-checkpoint { color: var(--text); }
.q-rung.is-checkpoint .q-rung__d { color: var(--gold); }
.q-rung.is-checkpoint::after { content: "★"; color: var(--gold-deep); font-size: .7rem; }
.q-rung.is-done { color: var(--cream); }
.q-rung.is-done .q-rung__d { color: var(--aqua); }
.q-rung.is-current { background: linear-gradient(90deg, rgba(217, 189, 126, .16), transparent); color: var(--ink); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.q-rung.is-current .q-rung__d { color: var(--gold-bright); }
.q-ladder__note { font-size: .72rem; color: var(--muted-2); text-align: center; margin-top: .7rem; line-height: 1.4; }

/* Escada compacta no mobile: some e vira faixa acima do jogo */
@media (max-width: 859px) {
  .q-ladder { order: -1; }
  .q-ladder__list { display: flex; gap: .3rem; overflow-x: auto; padding-bottom: .3rem; }
  .q-rung { flex-direction: column; gap: .1rem; min-width: 48px; padding: .4rem .3rem; text-align: center; }
  .q-rung.is-checkpoint::after { display: none; }
  .q-ladder__note { display: none; }
}

/* ---- Tela de resultado ---- */
.q-result { max-width: 620px; margin: clamp(10px, 4vw, 40px) auto 0; text-align: center; }
.q-result__badge { font-size: 3rem; margin-bottom: .5rem; }
.q-result__title { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.1; margin-bottom: .6rem; }
.q-result__sub { color: var(--text); font-size: 1.05rem; line-height: 1.55; margin-bottom: 1.8rem; }

.q-coupon {
  background: linear-gradient(180deg, var(--panel), var(--bg-3)); border: 1px solid var(--gold-deep);
  border-radius: var(--radius); padding: clamp(1.4rem, 4vw, 2rem); box-shadow: var(--shadow), var(--glow-gold); margin-bottom: 1.6rem;
}
.q-coupon__label { font-family: var(--font-sans); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.q-coupon__off { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 9vw, 3.6rem); line-height: 1; color: var(--gold-bright); }
.q-coupon__price { margin: .8rem 0 1.2rem; font-size: 1.05rem; color: var(--text); }
.q-coupon__price .old { color: var(--muted); text-decoration: line-through; margin-right: .5rem; }
.q-coupon__price .new { font-family: var(--font-serif); font-weight: 600; font-size: 1.7rem; color: var(--aqua); }
.q-code {
  display: flex; align-items: center; justify-content: center; gap: .7rem;
  background: var(--bg); border: 1px dashed var(--gold-deep); border-radius: var(--radius-sm); padding: .8rem 1rem; margin-bottom: 1rem;
}
.q-code__val { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; letter-spacing: .1em; color: var(--gold-bright); }
.q-code__copy { background: transparent; border: none; cursor: pointer; color: var(--muted); font-size: 1.1rem; transition: color .2s; }
.q-code__copy:hover { color: var(--gold); }
.q-coupon__exp { font-size: .82rem; color: var(--muted-2); }

.q-result__actions { display: grid; gap: .8rem; }
.q-again { background: transparent; border: none; color: var(--muted); font-family: var(--font-sans); font-size: .9rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: .4rem; }
.q-again:hover { color: var(--gold); }

/* Estado sem desconto */
.q-noprize .q-result__badge { opacity: .6; }

.q-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: .7rem 1.3rem; font-size: .9rem; color: var(--cream); box-shadow: var(--shadow); z-index: 100; transition: opacity .3s, transform .3s; pointer-events: none; }
.q-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .q-alt, .q-timer__bar, .q-toast { transition: none; }
}
