/* ============================================================
   CyberQuest — 90s Pixel / NES Style CSS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Share+Tech+Mono&family=Rajdhani:wght@400;600;700&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg-deep:      #0a0a1a;
  --bg-panel:     #111130;
  --bg-panel2:    #0d0d26;
  --border-main:  #4444cc;
  --border-glow:  #6666ff;
  --accent-green: #00ff88;
  --accent-cyan:  #00ccff;
  --accent-yellow:#ffdd00;
  --accent-red:   #ff4444;
  --accent-pink:  #ff44bb;
  --text-main:    #ffffff;
  --text-dim:     #9999bb;
  --text-hint:    #7788aa;
  --coin-gold:    #ffdd00;
  --pixel-size:   4px;
  --radius:       0px;
  --font-title:   'Orbitron', sans-serif;
  --font-body:    'Share Tech Mono', monospace;
  --font-ui:      'Rajdhani', sans-serif;
  --font-pixel:   'Orbitron', sans-serif; /* fallback alias */
  --transition:   0.15s ease;
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 18px; /* mobile-first base — Share Tech Mono lê bem em 18px+ */
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%; /* evita iOS aumentar fonte em landscape */
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  min-height: -webkit-fill-available; /* iOS Safari 100vh fix */
  overflow-x: hidden;
  line-height: 1.7;
  position: relative;
  cursor: default;
  -webkit-tap-highlight-color: transparent; /* remove flash azul no tap (iOS/Android) */
  touch-action: pan-y;
}

/* ─── Starfield Background ───────────────────────────────────── */
#stars-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  background: #fff;
  border-radius: 0;
  animation: star-twinkle infinite ease-in-out;
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.5); }
}

/* ─── CRT Overlay ────────────────────────────────────────────── */
.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
}

/* ─── Game Container ────────────────────────────────────────── */
#game-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Screens ─────────────────────────────────────────────────── */
.screen {
  display: none;
  min-height: 100vh;
  animation: screen-in 0.15s steps(3) forwards;
}

.screen.active { display: block; }

@keyframes screen-in {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── Pixel Panel ─────────────────────────────────────────────── */
.pixel-panel {
  background: var(--bg-panel);
  border: 4px solid var(--border-main);
  box-shadow:
    0 0 0 2px var(--bg-deep),
    0 0 0 6px var(--border-glow),
    0 0 20px rgba(100,100,255,0.15),
    inset 0 0 0 2px rgba(100,100,255,0.05);
  padding: 1.5rem;
  image-rendering: pixelated;
}

.pixel-panel:hover {
  box-shadow:
    0 0 0 2px var(--bg-deep),
    0 0 0 6px var(--border-glow),
    0 0 30px rgba(100,100,255,0.25),
    inset 0 0 0 2px rgba(100,100,255,0.1);
}

/* ─── Pixel Buttons ──────────────────────────────────────────── */
.btn-pixel {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.8rem 1.6rem;
  border: 3px solid;
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: var(--transition);
  position: relative;
  outline: none;
  display: inline-block;
  line-height: 1.3;
  min-height: 44px; /* Apple/Google minimum touch target */
  touch-action: manipulation; /* remove 300ms tap delay no mobile */
  -webkit-appearance: none;
}

.btn-pixel:active {
  transform: translateY(2px);
}

.btn-start {
  color: var(--bg-deep);
  background: var(--accent-green);
  border-color: var(--accent-green);
  box-shadow: 4px 4px 0 #007744, 0 0 20px rgba(0,255,136,0.3);
  font-size: 1.1rem;
  padding: 1rem 2.4rem;
}

.btn-start:hover {
  background: #44ffaa;
  box-shadow: 6px 6px 0 #007744, 0 0 30px rgba(0,255,136,0.5);
  transform: translate(-2px,-2px);
}

.btn-secondary {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 4px 4px 0 #004466;
}

.btn-secondary:hover {
  background: rgba(0,204,255,0.1);
  box-shadow: 6px 6px 0 #004466;
  transform: translate(-2px,-2px);
}

/* ─── BLINK ───────────────────────────────────────────────────── */
.blink-text {
  animation: blink 1s steps(1) infinite;
  color: var(--accent-yellow);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ───────────────────────────────────────────────────────────────
   INTRO SCREEN
   ─────────────────────────────────────────────────────────────── */
.intro-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

/* Title */
.pixel-title-block {
  text-align: center;
  padding: 1rem 0;
}

.title-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.35em;
  margin-bottom: 0.8rem;
  animation: blink 1.5s steps(1) infinite;
}

.game-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  color: var(--text-main);
  text-shadow:
    3px 3px 0 var(--border-main),
    0 0 40px rgba(100,100,255,0.4),
    0 0 80px rgba(100,100,255,0.15);
  letter-spacing: 0.08em;
  line-height: 1.15;
}

.title-accent {
  color: var(--accent-green);
  text-shadow:
    3px 3px 0 #004422,
    0 0 40px rgba(0,255,136,0.5),
    0 0 80px rgba(0,255,136,0.2);
}

.title-subtitle {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-top: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

/* Sprites */
.intro-sprites {
  display: flex;
  gap: 2rem;
  font-size: 2.5rem;
  align-items: center;
}

.sprite {
  display: inline-block;
  animation: sprite-float 2s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(100,100,255,0.5));
}

.sprite-shield { animation-delay: 0s; }
.sprite-sword  { animation-delay: 0.4s; font-size: 3rem; }
.sprite-mag    { animation-delay: 0.8s; }

@keyframes sprite-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* Info Panel */
.intro-info-panel { width: 100%; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.8;
}

.info-icon { font-size: 1rem; }

/* Reward Panel */
.intro-reward-panel { width: 100%; }

.reward-title {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-yellow);
  margin-bottom: 1rem;
  letter-spacing: 0.2em;
}

.reward-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.reward-list li {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.8;
}

.bullet {
  color: var(--accent-green);
  flex-shrink: 0;
  margin-top: 0.1em;
}

.intro-footer {
  margin-top: 0.5rem;
  text-align: center;
}

/* ───────────────────────────────────────────────────────────────
   HUD (top bar on question screens)
   ─────────────────────────────────────────────────────────────── */
.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  background: rgba(0,0,0,0.6);
  border-bottom: 4px solid var(--border-main);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.hud-left, .hud-right, .hud-center {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hud-phase {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.12em;
}

.hud-qnum {
  font-family: var(--font-title);
  font-size: 0.9rem;
  color: var(--accent-yellow);
  background: rgba(255,221,0,0.1);
  padding: 0.2rem 0.5rem;
  border: 2px solid var(--accent-yellow);
}

.hud-coins {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--coin-gold);
}

.hud-total {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ─── Progress Bar ───────────────────────────────────────────── */
.progress-container {
  padding: 0.5rem 1rem;
  background: rgba(0,0,0,0.4);
  border-bottom: 2px solid rgba(100,100,255,0.2);
}

.progress-bar-outer {
  width: 100%;
  height: 12px;
  background: #222240;
  border: 2px solid var(--border-main);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan));
  transition: width 0.3s steps(10);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 8px,
    rgba(255,255,255,0.15) 8px,
    rgba(255,255,255,0.15) 10px
  );
}

.progress-label {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: right;
  margin-top: 0.25rem;
}

/* ───────────────────────────────────────────────────────────────
   QUESTION SCREEN
   ─────────────────────────────────────────────────────────────── */
.question-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.question-card {
  flex: 1;
  margin: 1.5rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: card-in 0.2s steps(4) forwards;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.question-hint {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--accent-cyan);
  background: rgba(0,204,255,0.05);
  border-left: 4px solid var(--accent-cyan);
  padding: 0.7rem 1rem;
  line-height: 1.8;
}

.question-text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.9;
  text-shadow: 0 0 10px rgba(255,255,255,0.08);
}

/* ─── Options ─────────────────────────────────────────────────── */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.option-btn {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  text-align: left;
  padding: 0.9rem 1.1rem;
  background: var(--bg-panel2);
  border: 2px solid rgba(100,100,255,0.3);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  transition: var(--transition);
  width: 100%;
  outline: none;
  min-height: 52px; /* touch target generoso para dedos */
  touch-action: manipulation;
  -webkit-appearance: none;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--accent-cyan);
  color: var(--text-main);
  background: rgba(0,204,255,0.06);
  transform: translateX(4px);
  box-shadow: -4px 0 0 var(--accent-cyan);
}

.option-btn.selected {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(0,255,136,0.08);
  box-shadow: -4px 0 0 var(--accent-green), 0 0 15px rgba(0,255,136,0.15);
}

.option-btn.dimmed {
  opacity: 0.35;
}

.option-btn:disabled {
  cursor: default;
}

.option-letter {
  flex-shrink: 0;
  width: 1.8em;
  height: 1.8em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid currentColor;
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: var(--accent-yellow);
  background: rgba(255,221,0,0.05);
  margin-top: 0.1em;
}

.option-text {
  flex: 1;
}

/* ─── Type Tags ───────────────────────────────────────────────── */
.question-footer {
  padding: 0.5rem 1.5rem 1rem;
  display: flex;
  justify-content: flex-end;
}

.type-tag {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border: 2px solid;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tag-scenario   { color: #ff8800; border-color: #ff8800; background: rgba(255,136,0,0.08); }
.tag-knowledge  { color: var(--accent-cyan); border-color: var(--accent-cyan); background: rgba(0,204,255,0.08); }
.tag-preference { color: var(--accent-pink); border-color: var(--accent-pink); background: rgba(255,68,187,0.08); }
.tag-behavioral { color: var(--accent-yellow); border-color: var(--accent-yellow); background: rgba(255,221,0,0.08); }
.tag-selfassess { color: var(--accent-green); border-color: var(--accent-green); background: rgba(0,255,136,0.08); }

/* ───────────────────────────────────────────────────────────────
   PROCESSING SCREEN
   ─────────────────────────────────────────────────────────────── */
#screen-processing {
  display: flex;
  align-items: center;
  justify-content: center;
}

.processing-wrap {
  text-align: center;
  padding: 2rem;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.processing-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--accent-yellow);
  letter-spacing: 0.2em;
  text-shadow: 0 0 20px rgba(255,221,0,0.5);
}

.processing-sprite {
  font-size: 4rem;
  animation: proc-spin 0.5s steps(4) infinite;
}

@keyframes proc-spin {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(90deg); }
  50%  { transform: rotate(180deg); }
  75%  { transform: rotate(270deg); }
  100% { transform: rotate(360deg); }
}

.processing-bar-outer {
  width: 300px;
  max-width: 90vw;
  height: 20px;
  background: #222240;
  border: 4px solid var(--border-main);
  overflow: hidden;
}

.processing-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan), var(--accent-pink));
  width: 0%;
  transition: width 0.4s steps(8);
}

.processing-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.proc-step {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dim);
  text-align: left;
  transition: opacity 0.2s;
}

/* ───────────────────────────────────────────────────────────────
   RESULTS SCREEN
   ─────────────────────────────────────────────────────────────── */
.results-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header */
.results-header {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}

.results-crown {
  font-size: 3rem;
  animation: sprite-float 1.5s ease-in-out infinite;
  display: block;
  margin-bottom: 0.5rem;
}

.results-title {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--accent-yellow);
  text-shadow: 3px 3px 0 #664400, 0 0 30px rgba(255,221,0,0.4);
  letter-spacing: 0.1em;
}

.results-subtitle {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  letter-spacing: 0.25em;
}

/* Result Cards */
.result-card {
  position: relative;
}

.card-label {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0,204,255,0.2);
  text-transform: uppercase;
}

/* Level Card */
.level-card {
  text-align: center;
}

.level-stars {
  font-family: var(--font-title);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--accent-yellow);
  text-shadow: 0 0 20px rgba(255,221,0,0.5);
  margin: 0.5rem 0;
  letter-spacing: 0.3em;
}

.level-name {
  font-family: var(--font-title);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--text-main);
  margin: 0.5rem 0;
}

.stage-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-pink);
  border: 2px solid var(--accent-pink);
  padding: 0.3rem 1rem;
  margin: 0.5rem 0;
  background: rgba(255,68,187,0.08);
  letter-spacing: 0.1em;
}

.stage-desc {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  line-height: 1.8;
}

/* Explanation */
.explanation-text {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.9;
}

.explanation-text strong {
  color: var(--accent-green);
}

/* Area Bars */
.area-bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 44px;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.6rem;
}

.area-bar-row.area-top .area-name-sm {
  color: var(--accent-yellow);
}

.area-bar-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow: hidden;
}

.area-icon-sm { font-size: 1.1rem; flex-shrink: 0; }

.area-name-sm {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.area-bar-outer {
  height: 10px;
  background: #1a1a3a;
  border: 2px solid rgba(100,100,255,0.2);
  overflow: hidden;
}

.area-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 0.8s steps(20);
}

.area-bar-pct {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: right;
}

/* Top Areas */
.top-areas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.top-area-badge {
  border: 3px solid;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 120px;
  text-align: center;
  background: rgba(0,0,0,0.3);
}

.area-icon { font-size: 2rem; }

.area-badge-rank {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
}

.area-badge-name {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.6;
}

/* Jobs */
.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.job-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-main);
  padding: 0.6rem 0.9rem;
  border-left: 3px solid var(--accent-green);
  background: rgba(0,255,136,0.04);
  line-height: 1.7;
}

.job-bullet { color: var(--accent-green); flex-shrink: 0; }

/* Gaps */
.gaps-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gap-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dim);
  padding: 0.5rem 0.9rem;
  border-left: 3px solid var(--accent-yellow);
  line-height: 1.7;
}

.gap-bullet { color: var(--accent-yellow); flex-shrink: 0; }

/* Certs */
.certs-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cert-item {
  padding: 1rem;
  background: rgba(0,0,0,0.3);
  border-left: 4px solid var(--accent-yellow);
}

.cert-name {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-yellow);
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

.cert-why {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.8;
}

/* Roadmap */
.roadmap-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.roadmap-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.8rem 0.5rem;
  border-bottom: 1px solid rgba(100,100,255,0.1);
}

.roadmap-step:last-child { border-bottom: none; }

.roadmap-num {
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: var(--border-glow);
  flex-shrink: 0;
  width: 2em;
  text-align: center;
  padding-top: 0.1em;
}

.roadmap-text {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.8;
  flex: 1;
}

/* Next Step */
.nextstep-card {
  border-color: var(--accent-green);
  box-shadow:
    0 0 0 2px var(--bg-deep),
    0 0 0 6px var(--accent-green),
    0 0 30px rgba(0,255,136,0.2);
}

.nextstep-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.nextstep-icon { font-size: 2rem; flex-shrink: 0; }

.nextstep-text {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.9;
}

.nextstep-text strong { color: var(--accent-green); }

/* Actions */
.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 1rem 0;
}

.btn-logic {
  color: var(--accent-pink);
  border-color: var(--accent-pink);
  box-shadow: 4px 4px 0 #550033;
}
.btn-logic:hover {
  background: rgba(255,68,187,0.1);
  box-shadow: 6px 6px 0 #550033;
  transform: translate(-2px,-2px);
}

/* LinkedIn */
.linkedin-section {
  border: 3px solid #0a66c2;
  background: rgba(10,102,194,0.07);
  box-shadow: 0 0 20px rgba(10,102,194,0.2), 4px 4px 0 #003366;
  padding: 1.5rem;
}

.linkedin-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.linkedin-avatar {
  font-size: 3rem;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(10,102,194,0.6));
}

.linkedin-content {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.linkedin-title {
  font-family: var(--font-title);
  font-size: 1rem;
  color: #4da6ff;
}

.linkedin-sub {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.btn-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  background: #0a66c2;
  border-color: #0a66c2;
  box-shadow: 4px 4px 0 #003366;
  font-size: 0.9rem;
  padding: 0.7rem 1.4rem;
  text-decoration: none;
  width: fit-content;
  margin-top: 0.3rem;
}
.btn-linkedin:hover {
  background: #1a76d2;
  box-shadow: 6px 6px 0 #003366;
  transform: translate(-2px,-2px);
}

.linkedin-icon {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 900;
  background: #fff;
  color: #0a66c2;
  width: 1.4em;
  height: 1.4em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}

/* Footer */
.results-footer {
  text-align: center;
  padding: 1rem 0;
}

.pixel-divider {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--border-main);
  margin-bottom: 0.8rem;
}

.footer-text {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}

.footer-sub {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-hint);
}

/* ───────────────────────────────────────────────────────────────
   LOGIC OVERLAY SCREEN
   ─────────────────────────────────────────────────────────────── */
.logic-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  z-index: 500;
  overflow-y: auto;
  animation: screen-in 0.2s ease forwards;
}

.logic-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1.2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.logic-close {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  background: transparent;
  border: 2px solid rgba(100,100,255,0.3);
  padding: 0.5rem 1rem;
  cursor: pointer;
  align-self: flex-end;
  transition: var(--transition);
}
.logic-close:hover {
  color: var(--accent-red);
  border-color: var(--accent-red);
}

.logic-header {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.logic-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.6rem;
}

.logic-title {
  font-family: var(--font-title);
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  color: var(--accent-yellow);
  text-shadow: 0 0 20px rgba(255,221,0,0.3);
  line-height: 1.3;
}

.logic-subtitle {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

.logic-section {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.logic-section-title {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.1em;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0,204,255,0.2);
}

.logic-section p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.85;
}

.logic-section strong {
  color: var(--accent-green);
}

.logic-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-left: 0.5rem;
}

.logic-list li {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.85;
  padding-left: 1rem;
  border-left: 3px solid var(--border-main);
}

.logic-list li strong {
  color: var(--accent-yellow);
}

.logic-footer {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
}

/* ───────────────────────────────────────────────────────────────
   SCROLLBAR
   ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: var(--border-main);
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover { background: var(--border-glow); }

/* ───────────────────────────────────────────────────────────────
   PRINT STYLES
   ─────────────────────────────────────────────────────────────── */
@media print {
  #stars-bg, .crt-overlay, .hud, .progress-container,
  .results-actions, .btn-pixel { display: none !important; }

  body {
    background: white;
    color: black;
    font-size: 10pt;
  }

  .pixel-panel {
    border: 2px solid #333;
    box-shadow: none;
    break-inside: avoid;
  }

  .screen { display: block !important; }
  #screen-intro, #screen-interview, #screen-quiz, #screen-processing { display: none !important; }
  #screen-results { display: block !important; }

  .results-wrap {
    max-width: 100%;
    padding: 0;
  }

  .card-label, .cert-name, .level-stars { color: #222 !important; }
  .explanation-text, .roadmap-text, .job-item, .cert-why,
  .gap-item, .nextstep-text, .stage-desc { color: #333 !important; }
  .text-dim, .footer-text, .footer-sub { color: #555 !important; }
}

/* ───────────────────────────────────────────────────────────────
   RESPONSIVE — Mobile-first
   ─────────────────────────────────────────────────────────────── */

/* ── Todos os mobiles (≤767px) ───────────────────────────────── */
@media (max-width: 767px) {

  /* Intro */
  .intro-wrap        { padding: 1.5rem 1rem 2.5rem; gap: 1.2rem; }
  .game-title        { font-size: clamp(1.8rem, 10vw, 2.8rem); line-height: 1.2; }
  .title-eyebrow     { font-size: 0.75rem; letter-spacing: 0.2em; }
  .title-subtitle    { font-size: 0.8rem; letter-spacing: 0.2em; }
  .intro-sprites     { gap: 1.2rem; font-size: 2.2rem; }
  .intro-sprites .sprite-sword { font-size: 2.8rem; }
  .info-grid         { grid-template-columns: 1fr; gap: 0.7rem; }
  .info-item         { font-size: 1rem; }
  .reward-title      { font-size: 1rem; }
  .reward-list li    { font-size: 1rem; }
  .btn-start         { font-size: 1rem; padding: 1rem 2rem; width: 100%; text-align: center; }
  .blink-text        { font-size: 0.8rem; }

  /* HUD */
  .hud               { padding: 0.6rem 0.8rem; gap: 0.4rem; }
  .hud-phase         { display: none; }
  .hud-qnum          { font-size: 0.85rem; }
  .hud-coins         { font-size: 0.85rem; }
  .hud-total         { font-size: 0.8rem; }
  .progress-label    { font-size: 0.75rem; }

  /* Perguntas */
  .question-card     { margin: 0.8rem 0.6rem; padding: 1.2rem 1rem; gap: 1.2rem; }
  .question-hint     { font-size: 0.95rem; padding: 0.6rem 0.8rem; }
  .question-text     { font-size: 1.05rem; line-height: 1.85; }
  .options-list      { gap: 0.6rem; }
  .option-btn        { font-size: 1rem; padding: 0.85rem 0.9rem; gap: 0.7rem; min-height: 56px; }
  .option-letter     { font-size: 0.9rem; width: 1.6em; height: 1.6em; flex-shrink: 0; }
  .type-tag          { font-size: 0.7rem; }
  .question-footer   { padding: 0.3rem 0.8rem 0.8rem; }

  /* Processamento */
  .processing-title  { font-size: 1.1rem; }
  .proc-step         { font-size: 0.95rem; }
  .processing-bar-outer { width: 280px; }

  /* Resultados */
  .results-wrap      { padding: 1rem 0.7rem 3rem; gap: 1.2rem; }
  .results-title     { font-size: clamp(1.1rem, 6vw, 1.6rem); }
  .results-subtitle  { font-size: 0.8rem; }
  .results-crown     { font-size: 2.5rem; }
  .pixel-panel       { padding: 1.1rem; }
  .card-label        { font-size: 0.75rem; margin-bottom: 0.8rem; }
  .level-stars       { font-size: 1.4rem; letter-spacing: 0.2em; }
  .level-name        { font-size: 1rem; }
  .stage-badge       { font-size: 0.8rem; padding: 0.3rem 0.7rem; }
  .stage-desc        { font-size: 0.95rem; }
  .explanation-text  { font-size: 0.98rem; }

  /* Barras de área */
  .area-bar-row      { grid-template-columns: 130px 1fr 42px; gap: 0.5rem; margin-bottom: 0.8rem; }
  .area-icon-sm      { font-size: 1rem; }
  .area-name-sm      { font-size: 0.78rem; }
  .area-bar-pct      { font-size: 0.75rem; }
  .area-bar-outer    { height: 12px; }

  /* Top areas */
  .top-areas-grid    { gap: 0.6rem; }
  .top-area-badge    { min-width: 85px; padding: 0.7rem 0.5rem; }
  .area-icon         { font-size: 1.6rem; }
  .area-badge-rank   { font-size: 0.7rem; }
  .area-badge-name   { font-size: 0.78rem; }

  /* Jobs / gaps / certs / roadmap */
  .job-item          { font-size: 0.98rem; padding: 0.6rem 0.7rem; }
  .gap-item          { font-size: 0.92rem; padding: 0.5rem 0.7rem; }
  .cert-name         { font-size: 0.95rem; }
  .cert-why          { font-size: 0.88rem; }
  .roadmap-step      { padding: 0.7rem 0.3rem; gap: 0.7rem; }
  .roadmap-num       { font-size: 0.8rem; }
  .roadmap-text      { font-size: 0.95rem; }
  .nextstep-text     { font-size: 0.95rem; }
  .nextstep-icon     { font-size: 1.6rem; }

  /* Actions */
  .results-actions   { flex-direction: column; align-items: stretch; gap: 0.8rem; }
  .results-actions .btn-pixel { text-align: center; width: 100%; padding: 1rem; }

  /* LinkedIn */
  .linkedin-section  { padding: 1.1rem; }
  .linkedin-inner    { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .linkedin-avatar   { font-size: 2.2rem; }
  .linkedin-title    { font-size: 0.95rem; }
  .linkedin-sub      { font-size: 0.88rem; }
  .btn-linkedin      { font-size: 0.85rem; width: 100%; justify-content: center; padding: 0.8rem 1rem; }

  /* Footer */
  .pixel-divider     { font-size: 0.75rem; }
  .footer-text       { font-size: 0.78rem; }
  .footer-sub        { font-size: 0.72rem; }

  /* Logic overlay */
  .logic-wrap        { padding: 1rem 0.8rem 3rem; gap: 1.2rem; }
  .logic-title       { font-size: clamp(1rem, 5vw, 1.4rem); }
  .logic-subtitle    { font-size: 0.88rem; }
  .logic-section-title { font-size: 0.92rem; }
  .logic-section p   { font-size: 0.9rem; }
  .logic-list li     { font-size: 0.88rem; }
  .logic-close       { font-size: 0.82rem; }
}

/* ── Telas muito pequenas (≤380px — iPhone SE, Galaxy A01) ───── */
@media (max-width: 380px) {
  html               { font-size: 16px; } /* recua base para caber */
  .game-title        { font-size: 1.7rem; }
  .option-btn        { font-size: 0.95rem; }
  .question-text     { font-size: 1rem; }
  .area-bar-row      { grid-template-columns: 110px 1fr 38px; }
  .area-name-sm      { font-size: 0.72rem; }
  .top-area-badge    { min-width: 75px; }
}

/* ── Tablet (768px–1023px) ───────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
  html               { font-size: 17px; }
  .intro-wrap        { max-width: 680px; padding: 2rem 1.5rem 3rem; }
  .results-wrap      { max-width: 720px; padding: 1.5rem 1.2rem 3rem; }
  .question-card     { max-width: 680px; margin: 1.5rem auto; }
  .game-title        { font-size: clamp(2.5rem, 6vw, 3.5rem); }
  .area-bar-row      { grid-template-columns: 170px 1fr 48px; }
  .results-actions   { justify-content: center; }
}

/* ── Desktop (≥1024px) ───────────────────────────────────────── */
@media (min-width: 1024px) {
  html               { font-size: 18px; }
  .intro-wrap        { max-width: 800px; padding: 2.5rem 2rem 4rem; }
  .results-wrap      { max-width: 980px; }
  .question-card     { max-width: 820px; margin: 2rem auto; padding: 2.5rem; }
  .question-text     { font-size: 1.1rem; }
  .game-title        { font-size: clamp(3rem, 5vw, 5rem); }
  .area-bar-row      { grid-template-columns: 210px 1fr 52px; }
  .option-btn:hover:not(:disabled) { transform: translateX(4px); }
}

/* ─── Pixel decoration floats ───────────────────────────────── */
.float-decor {
  position: fixed;
  pointer-events: none;
  font-size: 1.5rem;
  opacity: 0.08;
  animation: float-around 8s ease-in-out infinite;
}

.float-decor:nth-child(1) { top: 10%; left: 5%; }
.float-decor:nth-child(2) { top: 60%; right: 3%; }
.float-decor:nth-child(3) { bottom: 20%; left: 8%; }

@keyframes float-around {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%       { transform: translateY(-20px) rotate(5deg); }
  66%       { transform: translateY(10px) rotate(-5deg); }
}

/* ─── Accessibility ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .star, .sprite, .processing-sprite, .float-decor, .results-crown {
    animation: none;
  }
  .progress-fill, .area-bar-fill {
    transition: none;
  }
}

/* ─── Focus styles ──────────────────────────────────────────── */
.option-btn:focus-visible,
.btn-pixel:focus-visible {
  outline: 3px solid var(--accent-yellow);
  outline-offset: 2px;
}
