/* ============================================================
   NoSeuTempo — Plataforma / Dashboard (platform.css)
   Reaproveita os tokens de styles.css.
   ============================================================ */

/* ---------- Barra de progresso superior (Âncora de Memória) ----------
   Decisão de UX: é a PRIMEIRA coisa que o aluno vê ao entrar.
   Funciona como "memória externa" — ele não precisa lembrar de onde
   parou. Fica fixa no topo (sticky) para reduzir esforço mental. */
.progress-anchor {
  position: sticky; top: 72px; z-index: 30;
  background: var(--bg-card); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.progress-anchor .inner { display: flex; align-items: center; gap: 18px; padding: 16px 0; }
.progress-anchor .label { font-weight: 700; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.progress-track { flex: 1; height: 16px; background: var(--blush-soft); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--navy), var(--navy-soft));
  border-radius: 999px; transition: width 1.2s cubic-bezier(.2,.7,.3,1); }
.progress-pct { font-weight: 800; color: var(--navy); min-width: 56px; text-align: right; }

/* ---------- Cabeçalho de boas-vindas ---------- */
.welcome { padding: 40px 0 8px; }
.welcome h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.welcome p { color: var(--navy-muted); }

/* ---------- "O que vamos aprender hoje?" ---------- */
.today-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.today-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 12px;
  transition: transform .15s ease, box-shadow .2s ease; }
.today-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.today-card .ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.7rem; }
.today-card h3 { font-size: 1.2rem; }
.today-card .meta { display: flex; align-items: center; gap: 8px; color: var(--navy-muted); font-size: .92rem; font-weight: 600; }
.today-card .btn { margin-top: auto; }
.today-card.done { opacity: .85; }
.today-card .status { font-size: .85rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; align-self: flex-start; }
.status--done { background: var(--success-soft); color: var(--success); }
.status--now  { background: var(--blush-soft); color: var(--blush-strong); }
@media (max-width: 880px) { .today-cards { grid-template-columns: 1fr; } }

/* ============================================================
   PLAYER DE VÍDEO (o "player" herdado, refeito em vanilla JS)
   Decisão de UX: legenda LIGADA por padrão (apoio à leitura/áudio),
   botões grandes, velocidade ajustável (0.75x ajuda quem precisa
   de mais tempo de processamento).
   ============================================================ */
.lesson-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 980px) { .lesson-layout { grid-template-columns: 1fr; } }

.player {
  background: #0E1730; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
  position: relative;
}
.player video { width: 100%; display: block; background: #0E1730; aspect-ratio: 16/9; }
.player .poster-fallback { aspect-ratio: 16/9; display: grid; place-items: center; color: #cdd6ea;
  text-align: center; padding: 24px; gap: 10px; }
.player .poster-fallback .play-big { width: 76px; height: 76px; border-radius: 50%; background: var(--blush);
  color: #fff; display: grid; place-items: center; font-size: 1.8rem; }

.player-controls { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: #0E1730; color: #fff; }
.player-controls button { background: rgba(255,255,255,.1); border: 0; color: #fff; width: 44px; height: 44px;
  border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; }
.player-controls button:hover { background: rgba(255,255,255,.2); }
.player-bar { flex: 1; height: 10px; background: rgba(255,255,255,.18); border-radius: 999px; cursor: pointer; position: relative; }
.player-bar .played { height: 100%; width: 0; background: var(--blush); border-radius: 999px; }
.player-time { font-variant-numeric: tabular-nums; font-size: .9rem; color: #cdd6ea; min-width: 96px; text-align: center; }
.player-controls .speed { width: auto; padding: 0 12px; font-weight: 700; font-size: .9rem; }
.player-controls .cc.active { background: var(--blush); }

.lesson-side { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.lesson-side h3 { margin-bottom: 6px; }
.lesson-side .vocab { display: grid; gap: 10px; margin-top: 16px; }
.vocab-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg-warm); border-radius: 14px; padding: 12px 16px; }
.vocab-row b { color: var(--navy); }
.vocab-row span { color: var(--navy-muted); }
.vocab-row button { background: var(--blush-soft); color: var(--blush-strong); border: 0; width: 40px; height: 40px;
  border-radius: 12px; font-size: 1.1rem; }
.vocab-row button:hover { background: var(--blush); color: #fff; }

/* ============================================================
   JOGOS (Gamificação sem texto)
   ============================================================ */
.game-shell { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm); }
.game-shell h3 { margin-bottom: 4px; }
.game-shell .hint { color: var(--navy-muted); margin: 0 0 20px; }

/* Drag & drop: conectar imagem (emoji) ao texto em espanhol */
.dnd { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 700px) { .dnd { grid-template-columns: 1fr; } }
.dnd-col h4 { margin: 0 0 12px; color: var(--navy-muted); font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; }
.chip { display: flex; align-items: center; gap: 12px; background: var(--bg-warm); border: 2px dashed transparent;
  border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; font-weight: 700; font-size: 1.15rem; }
.chip.draggable { cursor: grab; border-color: var(--line); background: var(--bg-card); box-shadow: var(--shadow-sm); }
.chip.draggable:active { cursor: grabbing; }
.chip .emoji { font-size: 1.8rem; }
.dropzone { min-height: 64px; border: 2px dashed var(--line); border-radius: 16px; padding: 10px;
  margin-bottom: 12px; display: flex; align-items: center; gap: 12px; transition: border-color .15s, background .15s; }
.dropzone .word { font-weight: 700; color: var(--navy); }
.dropzone.over { border-color: var(--blush); background: var(--blush-soft); }
.dropzone.correct { border-color: var(--success); background: var(--success-soft); border-style: solid; }
.dropzone .slot { flex: 1; text-align: right; color: var(--navy-muted); }

/* Estourar bolhas */
.bubbles { position: relative; height: 320px; background: linear-gradient(180deg, #EAF1FB, var(--bg-warm));
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.bubble { position: absolute; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color: #fff; cursor: pointer; box-shadow: var(--shadow-sm); user-select: none;
  background: radial-gradient(circle at 30% 30%, #7FA6E8, var(--navy-soft)); font-size: 1rem; text-align: center; }
.bubble.pop { animation: pop .25s ease forwards; }
@keyframes pop { to { transform: scale(1.6); opacity: 0; } }
.bubble-prompt { font-weight: 800; font-size: 1.2rem; margin-bottom: 14px; }
.bubble-prompt b { color: var(--blush-strong); }

.game-feedback { margin-top: 18px; padding: 14px 18px; border-radius: 14px; font-weight: 700; display: none; }
.game-feedback.show { display: block; }
.game-feedback.ok { background: var(--success-soft); color: var(--success); }
.game-feedback.try { background: var(--blush-soft); color: var(--blush-strong); }

/* ============================================================
   MOMENTO PAPO (chat de voz com IA, estilo WhatsApp)
   "Prova" -> proibido. Aqui é conversa leve e acolhedora.
   ============================================================ */
.papo { max-width: 560px; margin-inline: auto; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.papo-head { background: var(--navy); color: #fff; padding: 16px 20px; display: flex; align-items: center; gap: 12px; }
.papo-head .avatar { background: var(--blush); color: #fff; }
.papo-head .who b { display: block; }
.papo-head .who small { color: #B9C2D6; }
.papo-head .online { margin-left: auto; font-size: .85rem; color: #8FE0B6; display: flex; align-items: center; gap: 6px; }
.papo-head .online::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #8FE0B6; }

.papo-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; min-height: 320px;
  background: var(--bg-warm); }
.msg { max-width: 80%; padding: 12px 16px; border-radius: 18px; line-height: 1.5; box-shadow: var(--shadow-sm); }
.msg.ia { background: var(--bg-card); border-top-left-radius: 4px; align-self: flex-start; }
.msg.me { background: var(--navy); color: #fff; border-top-right-radius: 4px; align-self: flex-end; }
.msg .audio-line { display: flex; align-items: center; gap: 10px; }
.msg .audio-line button { background: var(--blush); color: #fff; border: 0; width: 38px; height: 38px;
  border-radius: 50%; flex: none; }
.msg.ia .wave, .msg.me .wave { display: flex; gap: 3px; align-items: center; height: 24px; }
.msg .wave i { width: 3px; background: currentColor; border-radius: 2px; opacity: .6; display: inline-block; }
.msg .dur { font-size: .8rem; opacity: .8; }

.papo-foot { padding: 16px 20px; background: var(--bg-card); border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; justify-content: center; flex-direction: column; }
.record-btn { width: 76px; height: 76px; border-radius: 50%; background: var(--blush); color: #fff; border: 0;
  display: grid; place-items: center; font-size: 1.8rem; box-shadow: var(--shadow); transition: transform .15s; }
.record-btn:hover { transform: scale(1.05); }
.record-btn.recording { background: var(--blush-strong); animation: pulse 1.1s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(223,111,102,.5); } 50% { box-shadow: 0 0 0 16px rgba(223,111,102,0); } }
.record-hint { color: var(--navy-muted); font-weight: 600; font-size: .95rem; text-align: center; }

/* Feedback acolhedor da IA */
.feedback-card { background: var(--success-soft); border: 1px solid #CDE7D8; border-radius: 16px; padding: 16px 18px;
  align-self: stretch; }
.feedback-card .stars { font-size: 1.2rem; }
.feedback-card b { color: var(--success); }
.feedback-card .tip { color: var(--navy-muted); margin-top: 6px; font-size: .95rem; }
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--navy-muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2){ animation-delay:.2s;} .typing i:nth-child(3){ animation-delay:.4s;}
@keyframes blink { 0%,80%,100%{opacity:.3;} 40%{opacity:1;} }

/* ============================================================
   GATE DE PAGAMENTO (tela bloqueada antes da compra)
   ============================================================ */
.locked-banner { background: var(--blush-soft); border: 1px solid #F3CFC9; border-radius: var(--radius);
  padding: 22px 24px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 28px; }
.locked-banner .ic { font-size: 1.8rem; }
.locked-banner p { margin: 0; flex: 1; min-width: 220px; }
.is-locked { filter: grayscale(.4) blur(1.5px); opacity: .6; pointer-events: none; user-select: none; }

/* ============================================================
   CHECKOUT (pagamento.html)
   ============================================================ */
.checkout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }
.checkout-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; box-shadow: var(--shadow-sm); }
.pay-methods { display: flex; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.pay-method { flex: 1; min-width: 120px; border: 2px solid var(--line); border-radius: 14px; padding: 16px;
  text-align: center; font-weight: 700; cursor: pointer; background: var(--bg-warm); }
.pay-method.active { border-color: var(--navy); background: var(--bg-card); }
.pay-method .ic { font-size: 1.5rem; display: block; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input { width: 100%; padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 1rem; background: var(--bg); color: var(--navy); }
.field input:focus { outline: none; border-color: var(--navy); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.summary li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary .total { font-size: 1.4rem; font-weight: 800; border: 0; padding-top: 16px; }
.pix-box { text-align: center; padding: 10px 0; }
.pix-box .qr { width: 180px; height: 180px; margin: 12px auto; border-radius: 16px; border: 1px solid var(--line);
  background:
    repeating-conic-gradient(var(--navy) 0% 25%, #fff 0% 50%) 0 0 / 22px 22px; }

.pay-processing { text-align: center; padding: 30px; }
.spinner { width: 54px; height: 54px; border: 5px solid var(--blush-soft); border-top-color: var(--blush);
  border-radius: 50%; margin: 0 auto 18px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pay-success { text-align: center; padding: 20px; }
.pay-success .check { width: 80px; height: 80px; border-radius: 50%; background: var(--success-soft); color: var(--success);
  display: grid; place-items: center; font-size: 2.4rem; margin: 0 auto 16px; }

.hidden { display: none !important; }
