/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   QUIZ PYTHON — Nova Identidade Visual
   Desenvolvido por Gabriel Fernandes de Lima
   Estilo: Editorial Escuro · Orgânico · Quente
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700;1,900&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&family=DM+Mono:wght@400;500&display=swap');

:root {
  /* ── paleta ── */
  --ink:         #0a0907;
  --ink1:        #111008;
  --ink2:        #19160e;
  --ink3:        #221e14;
  --ink4:        #2d2820;

  --paper:       #f5f0e8;
  --text:        #e8e0cc;
  --text2:       #9e9278;
  --text3:       #5c5444;
  --text4:       #3a3328;

  --gold:        #c9a85c;
  --gold2:       #e3c07a;
  --gold-glow:   rgba(201,168,92,.12);
  --gold-dim:    rgba(201,168,92,.06);

  --terracota:   #b5604a;
  --sage:        #6b8c6e;
  --cream:       #d4c9a8;

  --correct:     #7aaa7d;
  --correct-bg:  rgba(122,170,125,.08);
  --wrong:       #c06055;
  --wrong-bg:    rgba(192,96,85,.08);
  --warn:        #c9a85c;
  --warn-bg:     rgba(201,168,92,.08);

  /* ── tipografia ── */
  --ff-display:  'Playfair Display', Georgia, serif;
  --ff-body:     'DM Sans', sans-serif;
  --ff-mono:     'DM Mono', 'Cascadia Code', monospace;

  /* ── espaçamento ── */
  --r:    10px;
  --rl:   18px;
  --ease: cubic-bezier(.22,1,.36,1);
  --t:    .32s var(--ease);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESET
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  background: var(--ink);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: default;
}

/* grain texture */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 256px;
  opacity: .032;
  pointer-events: none;
  z-index: 9999;
}

/* ── cursor glow suave dourado ── */
#cursor-glow {
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,92,.04) 0%, transparent 65%);
  transform: translate(-50%,-50%);
  pointer-events: none;
  z-index: 1;
  transition: opacity .5s;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LAYOUT WRAP
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.wrap {
  position: relative; z-index: 2;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 28px 140px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HERO — ANIMAÇÃO DE ENTRADA
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.site-header {
  padding: 80px 0 64px;
  text-align: center;
  position: relative;
}

/* linha decorativa no topo */
.site-header::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 80px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  animation: lineDown 1s var(--ease) .1s both;
}
@keyframes lineDown {
  from { height: 0; opacity: 0; }
  to   { height: 80px; opacity: 1; }
}

.hdr-eyebrow {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 44px;
  animation: fadeUp .8s var(--ease) .6s both;
}

/* ── QUIZ (letras grandes, serif itálico) ── */
.hdr-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 1;
  user-select: none;
}

.title-quiz {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(80px, 16vw, 148px);
  color: var(--text);
  letter-spacing: -.02em;
  display: block;
  animation: quizReveal 1.1s var(--ease) .2s both;
  position: relative;
}

.title-quiz::after {
  content: '';
  position: absolute;
  bottom: 6px; left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--gold);
  animation: lineExpand 1s var(--ease) 1.1s both;
}
@keyframes lineExpand {
  from { width: 0; }
  to   { width: 70%; }
}

@keyframes quizReveal {
  0%   { opacity: 0; transform: translateY(40px) skewY(2deg); filter: blur(6px); }
  60%  { filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) skewY(0); }
}

.title-py-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  animation: pythonReveal 1s var(--ease) .55s both;
}

@keyframes pythonReveal {
  0%   { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

.title-python {
  font-family: var(--ff-display);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(28px, 5vw, 46px);
  color: var(--gold);
  letter-spacing: .22em;
  text-transform: uppercase;
}

.title-py-svg {
  width: 30px; height: 30px;
  opacity: .9;
  animation: svgSpin 1.2s var(--ease) 1s both;
  transform-origin: center;
}
@keyframes svgSpin {
  from { opacity: 0; transform: rotate(-90deg) scale(.5); }
  to   { opacity: .9; transform: rotate(0deg) scale(1); }
}

.hdr-sub {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  margin-top: 36px;
  animation: fadeUp .7s var(--ease) 1.2s both;
}
.hdr-meta-item {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.7;
  text-align: center;
}
.hdr-meta-item strong {
  color: var(--text2);
  font-weight: 500;
  display: block;
}

.hdr-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  padding: 5px 16px;
  border: 1px solid rgba(201,168,92,.25);
  border-radius: 999px;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  animation: fadeUp .6s var(--ease) 1.4s both;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SCREENS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.screen { display: none; }
.screen.active { display: block; animation: fadeUp .5s var(--ease) both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CARDS — BASE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card {
  background: var(--ink1);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--rl);
  padding: 28px 32px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(201,168,92,.03) 0%, transparent 50%);
  pointer-events: none;
}
.card:hover {
  border-color: rgba(201,168,92,.18);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(201,168,92,.08);
}

/* ── nota do prof ── */
.prof-note {
  position: relative;
}
.note-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  opacity: .8;
}
.prof-note p {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.85;
  margin-bottom: 16px;
}
.prof-note p:last-child { margin-bottom: 0; }
.prof-note strong { color: var(--text); font-weight: 500; }

/* botões de download */
.dl-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 8px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .06em;
  cursor: pointer;
  border: 1px solid;
  transition: all var(--t);
  font-weight: 500;
}
.dl-btn.py {
  background: rgba(201,168,92,.08);
  border-color: rgba(201,168,92,.25);
  color: var(--gold);
}
.dl-btn.txt {
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.1);
  color: var(--text2);
}
.dl-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTION LABEL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sec-label {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sec-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.05);
}
.mt36 { margin-top: 36px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HOW IT WORKS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.how-it-works {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 0;
}
@media (max-width: 560px) { .how-it-works { grid-template-columns: 1fr; } }

.how-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--ink2);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--r);
  transition: border-color var(--t), background var(--t), transform var(--t);
}
.how-item:hover {
  border-color: rgba(201,168,92,.2);
  background: var(--ink3);
  transform: translateY(-2px);
}
.how-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(201,168,92,.08);
  border: 1px solid rgba(201,168,92,.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
}
.how-text {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
}
.how-text strong {
  display: block;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 2px;
  font-size: 13px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FORM — IDENTIFICAÇÃO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.form-card { margin-top: 0; }

.field-lbl {
  display: block;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
}

.field-input {
  width: 100%;
  background: var(--ink3);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r);
  padding: 13px 18px;
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 15px;
  outline: none;
  margin-bottom: 24px;
  transition: border-color var(--t), box-shadow var(--t);
}
.field-input:focus {
  border-color: rgba(201,168,92,.45);
  box-shadow: 0 0 0 3px rgba(201,168,92,.08);
}
.field-input::placeholder { color: var(--text4); }

.pronome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 28px;
}
@media (max-width: 480px) { .pronome-grid { grid-template-columns: 1fr; } }

.pronome-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--ink3);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r);
  color: var(--text2);
  font-family: var(--ff-body);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--t);
  text-align: left;
}
.pronome-btn:hover {
  border-color: rgba(201,168,92,.25);
  background: var(--ink4);
  color: var(--text);
}
.pronome-btn.selected {
  border-color: var(--gold);
  background: rgba(201,168,92,.08);
  color: var(--gold2);
  box-shadow: 0 0 0 1px rgba(201,168,92,.15) inset;
}
.pk {
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--gold);
  background: rgba(201,168,92,.1);
  border-radius: 4px;
  padding: 2px 6px;
  letter-spacing: .05em;
}

/* ── BTN INICIAR ── */
.btn-start {
  width: 100%;
  padding: 16px;
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: var(--r);
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--t);
  position: relative;
  overflow: hidden;
}
.btn-start::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
}
.btn-start:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,168,92,.35);
  background: var(--gold2);
}
.btn-start:disabled {
  opacity: .28;
  cursor: not-allowed;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOPBAR PROGRESSO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.q-topbar {
  position: sticky;
  top: 0; z-index: 100;
  background: rgba(10,9,7,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.05);
  padding: 14px 0;
  margin: 0 -28px 24px;
  padding-left: 28px; padding-right: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.prog-wrap { flex: 1; }
.prog-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--text3);
  letter-spacing: .06em;
  margin-bottom: 7px;
}
.prog-track {
  height: 3px;
  background: rgba(255,255,255,.06);
  border-radius: 99px;
  overflow: hidden;
}
.prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  border-radius: 99px;
  transition: width .5s var(--ease);
  box-shadow: 0 0 8px rgba(201,168,92,.5);
}

.chips { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.chip {
  padding: 5px 12px;
  background: var(--ink2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--text2);
  letter-spacing: .04em;
  white-space: nowrap;
}
.timer-chip {
  color: var(--gold);
  border-color: rgba(201,168,92,.2);
  background: rgba(201,168,92,.05);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CARD DA QUESTÃO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.q-card {
  border-color: rgba(201,168,92,.12);
  padding: 28px 30px;
  margin-bottom: 14px;
}
.q-card:hover { transform: none; } /* sem hover lift no card da questão */

.q-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.q-num-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 54px;
  border: 1px solid rgba(201,168,92,.25);
  border-radius: 10px;
  background: rgba(201,168,92,.06);
  flex-shrink: 0;
}
.q-num-n {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: 20px;
  color: var(--gold);
  line-height: 1;
}
.q-num-label {
  font-family: var(--ff-mono);
  font-size: 7px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text3);
}

.q-header-info { flex: 1; }
.q-label {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .7;
  margin-bottom: 8px;
}
.q-text {
  font-size: 16px;
  color: var(--text);
  line-height: 1.65;
  font-weight: 400;
}

.q-code {
  font-family: var(--ff-mono);
  font-size: 12.5px;
  background: var(--ink3);
  border: 1px solid rgba(255,255,255,.06);
  border-left: 3px solid var(--gold);
  border-radius: var(--r);
  padding: 16px 20px;
  margin-top: 20px;
  line-height: 1.8;
  color: var(--cream);
  white-space: pre;
  overflow-x: auto;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ALTERNATIVAS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.alts {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 16px;
}

.alt-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  background: var(--ink1);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r);
  color: var(--text2);
  font-family: var(--ff-body);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  line-height: 1.55;
  transition: all var(--t);
  position: relative;
  overflow: hidden;
}
.alt-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(201,168,92,.07), transparent 65%);
  opacity: 0;
  transition: opacity .3s;
}
.alt-btn:hover::before { opacity: 1; }
.alt-btn:hover:not(:disabled) {
  border-color: rgba(201,168,92,.28);
  background: var(--ink2);
  color: var(--text);
  transform: translateX(4px);
}
.alt-btn:disabled { cursor: default; }

.alt-letter {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--gold);
  min-width: 20px;
  flex-shrink: 0;
  line-height: 1.3;
}

.alt-btn.correct {
  border-color: var(--correct) !important;
  background: var(--correct-bg) !important;
  color: var(--correct) !important;
}
.alt-btn.correct .alt-letter { color: var(--correct); }

.alt-btn.wrong {
  border-color: var(--wrong) !important;
  background: var(--wrong-bg) !important;
  color: var(--wrong) !important;
}
.alt-btn.wrong .alt-letter { color: var(--wrong); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FEEDBACK BOX
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.feedback-box {
  display: none;
  padding: 22px 26px;
  border-radius: var(--r);
  border: 1px solid;
  margin-bottom: 16px;
  animation: feedbackIn .4s var(--ease) both;
}
@keyframes feedbackIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.feedback-box.show { display: block; }
.feedback-box.acertou {
  background: var(--correct-bg);
  border-color: rgba(122,170,125,.3);
}
.feedback-box.errou {
  background: var(--wrong-bg);
  border-color: rgba(192,96,85,.3);
}

.fb-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
  font-family: var(--ff-display);
  font-style: italic;
}
.feedback-box.acertou .fb-title { color: var(--correct); }
.feedback-box.errou .fb-title   { color: var(--wrong); }

.fb-text {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.75;
}
.fb-dica {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text3);
  margin-top: 10px;
  line-height: 1.5;
}

/* ── btn próxima ── */
.btn-next {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px;
  background: transparent;
  border: 1px solid rgba(201,168,92,.3);
  border-radius: var(--r);
  color: var(--gold);
  font-family: var(--ff-display);
  font-weight: 700;
  font-style: italic;
  font-size: 15px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: all var(--t);
}
.btn-next:hover {
  background: rgba(201,168,92,.08);
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(201,168,92,.18);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESULTADO — HERO CARD
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.result-hero {
  text-align: center;
  padding: 48px 32px;
  background: var(--ink1);
  border: 1px solid rgba(201,168,92,.12);
  position: relative;
  overflow: hidden;
  border-radius: var(--rl);
  margin-bottom: 16px;
}
.result-hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.score-ring-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 24px;
}
.score-ring-wrap::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ring-glow, rgba(201,168,92,.06)), transparent 70%);
}

.score-ring { width: 160px; height: 160px; transform: rotate(-90deg); }
.ring-track {
  fill: none;
  stroke: rgba(255,255,255,.05);
  stroke-width: 6;
}
.ring-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s var(--ease);
}
.score-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-num {
  font-family: var(--ff-display);
  font-size: 52px;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}
.score-den {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--text3);
  margin-top: 2px;
}
.res-reaction {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
}
.res-pct {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text3);
  letter-spacing: .1em;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HISTÓRICO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hist-card {
  padding: 0;
  overflow: hidden;
}
.hist-hdr {
  display: grid;
  grid-template-columns: 44px 1fr 70px 70px 52px;
  gap: 0;
  padding: 12px 20px;
  background: var(--ink3);
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text3);
}
.hist-row {
  display: grid;
  grid-template-columns: 44px 1fr 70px 70px 52px;
  gap: 0;
  padding: 13px 20px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 12.5px;
  color: var(--text2);
  align-items: center;
  animation: fadeUp .4s var(--ease) both;
  transition: background var(--t);
}
.hist-row:hover { background: rgba(255,255,255,.02); }
.hist-row:last-child { border-bottom: none; }
.hist-q {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--gold);
  opacity: .7;
}
.hist-status { font-size: 11px; }
.hist-row.certo .hist-status { color: var(--correct); }
.hist-row.errou .hist-status { color: var(--wrong); }
.hist-detail { font-family: var(--ff-mono); font-size: 11px; }
.hist-time {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text3);
  text-align: right;
}

/* ── tips / dicas ── */
.tips-card {
  background: var(--ink1);
  border: 1px solid rgba(181,96,74,.22);
  border-radius: var(--rl);
  padding: 20px 26px;
  margin-bottom: 16px;
}
.tips-label {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--terracota);
  margin-bottom: 14px;
}
.dica-item {
  display: flex;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text2);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  line-height: 1.5;
}
.dica-item:last-child { border-bottom: none; }
.dica-q {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--terracota);
  flex-shrink: 0;
  padding-top: 1px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AÇÕES PÓS-RESULTADO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.actions-card {
  text-align: center;
  padding: 40px 32px;
}
.py-icon {
  margin: 0 auto 20px;
  display: block;
  opacity: .8;
}
.act-title {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: .04em;
  color: var(--text);
  margin-bottom: 8px;
}
.act-sub {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 6px;
}
.blink-hint {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--text3);
  animation: pulse 2s ease-in-out infinite;
  margin-bottom: 24px;
}
@keyframes pulse {
  0%, 100% { opacity: .4; }
  50%       { opacity: 1; }
}

.act-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.btn-act {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--r);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .1em;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid;
  transition: all var(--t);
}
.btn-act:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.btn-act.view  { background: rgba(201,168,92,.08); border-color: rgba(201,168,92,.3);  color: var(--gold); }
.btn-act.term  { background: rgba(107,140,110,.08); border-color: rgba(107,140,110,.3); color: var(--sage); }
.btn-act.dpy   { background: rgba(181,96,74,.08);  border-color: rgba(181,96,74,.3);   color: var(--terracota); }
.btn-act.dtxt  { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.12); color: var(--text2); }
.btn-act.retry { background: rgba(201,168,92,.1); border-color: var(--gold); color: var(--gold2); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GABARITO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.gab-section {
  background: var(--ink1);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--rl);
  overflow: hidden;
  margin-bottom: 16px;
  display: none;
}
.gab-section.visible { display: block; }

.gab-header {
  padding: 16px 24px;
  background: var(--ink2);
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 10px;
}

.gab-item { border-bottom: 1px solid rgba(255,255,255,.04); }
.gab-item:last-child { border-bottom: none; }

.gab-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  cursor: pointer;
  transition: background var(--t);
}
.gab-trigger:hover { background: rgba(255,255,255,.02); }
.gab-qn { font-family: var(--ff-mono); font-size: 10px; color: var(--gold); opacity:.7; min-width: 32px; }
.gab-q  { flex: 1; font-size: 12.5px; color: var(--text2); }
.gab-ans {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--gold);
  width: 22px; text-align: center;
}
.gab-arrow { color: var(--text3); font-size: 11px; transition: transform var(--t); }
.gab-item.open .gab-arrow { transform: rotate(180deg); }

.gab-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s var(--ease);
}
.gab-item.open .gab-body { max-height: 400px; }
.gab-inner {
  padding: 16px 22px 20px;
  background: var(--ink2);
  border-top: 1px solid rgba(255,255,255,.04);
}
.gab-correta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.gab-correta-lbl {
  font-family: var(--ff-mono);
  font-size: 8px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text3);
}
.gab-correta-letra {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: rgba(122,170,125,.15);
  border: 1px solid var(--correct);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--correct);
}
.gab-correta-txt { font-size: 13px; color: var(--text); }
.gab-src { font-family: var(--ff-mono); font-size: 10px; color: var(--text3); margin-bottom: 10px; }
.gab-exp { font-size: 13px; color: var(--text2); line-height: 1.7; }
.gab-exp code {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  background: rgba(255,255,255,.06);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--cream);
}
.gab-exp strong { color: var(--text); font-weight: 600; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CÓDIGO PYTHON
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.code-section {
  background: var(--ink);
  border: 1px solid rgba(201,168,92,.1);
  border-radius: var(--rl);
  overflow: hidden;
  margin-bottom: 16px;
  display: none;
}
.code-section.visible { display: block; }

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: var(--ink2);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.code-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text3);
}
.code-dots {
  display: flex;
  gap: 6px;
}
.code-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.code-dot-r { background: #c06055; }
.code-dot-y { background: #c9a85c; }
.code-dot-g { background: #7aaa7d; }

.code-scroll {
  padding: 24px 26px;
  overflow-x: auto;
  max-height: 520px;
  overflow-y: auto;
}
#code-block {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--cream);
  line-height: 1.9;
  white-space: pre;
  counter-reset: linenum;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TERMINAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.section-terminal {
  background: #060504;
  border: 1px solid rgba(107,140,110,.2);
  border-radius: var(--rl);
  overflow: hidden;
  margin-bottom: 16px;
  display: none;
}
.section-terminal.visible { display: block; }

.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: #0e0c0a;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.term-bar span {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sage);
  opacity: .7;
}
#term-output {
  font-family: var(--ff-mono);
  font-size: 12.5px;
  line-height: 1.75;
  padding: 20px 22px;
  min-height: 220px;
  max-height: 400px;
  overflow-y: auto;
  color: #d4c9a8;
}
.term-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-top: 1px solid rgba(255,255,255,.05);
  background: #060504;
}
#term-prompt { color: var(--sage); font-family: var(--ff-mono); font-size: 13px; }
#term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--cream);
  font-family: var(--ff-mono);
  font-size: 13px;
  caret-color: var(--gold);
}
.tw-cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--gold);
  vertical-align: text-bottom;
  animation: blink .7s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ANSI colors */
.ac-reset  { color: #d4c9a8; }
.ac-bold   { font-weight: 700; }
.ac-red    { color: #c06055; }
.ac-green  { color: #7aaa7d; }
.ac-yellow { color: #c9a85c; }
.ac-blue   { color: #7aa2c4; }
.ac-magenta{ color: #b07ab5; }
.ac-cyan   { color: #6b8c8c; }
.ac-white  { color: #e8e0cc; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FOOTER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  background: rgba(10,9,7,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,.05);
}
.footer-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 28px;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.footer-py { flex-shrink: 0; opacity: .7; display: flex; align-items: center; }
.footer-divider {
  width: 1px; height: 20px;
  background: rgba(255,255,255,.08);
}
.footer-info { flex: 1; min-width: 0; }
.footer-name {
  display: block;
  font-size: 12px;
  color: var(--text2);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.footer-meta {
  display: block;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--text3);
  white-space: nowrap;
}
.footer-year {
  font-family: var(--ff-display);
  font-weight: 700;
  font-style: italic;
  font-size: 13px;
  color: var(--text4);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TRANSPARÊNCIA IA
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ia-section {
  margin-top: 28px;
  background: var(--ink1);
  border: 1px solid rgba(181,96,74,.2);
  border-radius: var(--rl);
  overflow: hidden;
}
.ia-header {
  padding: 14px 26px;
  background: var(--ink2);
  border-bottom: 1px solid rgba(181,96,74,.1);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--terracota);
}
.ia-body { padding: 26px 30px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 620px) {
  .hist-hdr, .hist-row {
    grid-template-columns: 36px 1fr 60px 44px;
  }
  .hist-time { display: none; }
  .q-topbar { flex-direction: column; gap: 8px; }
  .chips { width: 100%; justify-content: flex-end; }
  .act-btns { flex-direction: column; }
  .btn-act { justify-content: center; }
}
@media (max-width: 480px) {
  .hdr-sub { flex-direction: column; gap: 12px; align-items: center; }
  .hist-hdr, .hist-row { grid-template-columns: 34px 1fr 56px; }
  .hist-status { display: none; }
}