body::before {
  content: '';
  position: fixed;
  top: -40%; left: -20%;
  width: 80vw; height: 80vw;
  background: radial-gradient(circle, rgba(108,99,255,0.06) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -30%; right: -20%;
  width: 70vw; height: 70vw;
  background: radial-gradient(circle, rgba(45,212,191,0.04) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

.app { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; padding: 40px 20px 80px; }

.header { text-align: center; margin-bottom: 48px; animation: fadeUp 0.8s ease both; }
.badge {
  display: inline-block; padding: 6px 16px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 100px; font-size: 12px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
}
.header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(28px, 5vw, 42px); font-weight: 400; line-height: 1.2; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.header p { color: var(--text-muted); font-size: 15px; max-width: 560px; margin: 0 auto; line-height: 1.6; }

/* CANDIDATE INFO BAR */
.candidate-info {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 32px; margin-bottom: 36px;
  animation: fadeUp 0.8s ease 0.1s both;
  display: flex; gap: 32px; align-items: center; flex-wrap: wrap;
}
.candidate-info .info-item label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted);
}
.candidate-info .info-item p {
  font-size: 14px; font-weight: 500; margin-top: 2px;
}
.candidate-info .start-section { margin-left: auto; }

/* PROGRESS */
.progress-container {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 32px; margin-bottom: 36px;
  animation: fadeUp 0.8s ease 0.15s both;
}
.progress-container.hidden { display: none; }
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.progress-header span { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.progress-header strong { font-size: 13px; color: var(--accent); }
.progress-bar { height: 6px; background: var(--surface2); border-radius: 100px; overflow: hidden; }
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--teal));
  border-radius: 100px; transition: width 0.5s cubic-bezier(0.4,0,0.2,1); width: 0%;
}

/* SECTION CARDS */
.section-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; margin-bottom: 24px;
  animation: fadeUp 0.6s ease both; transition: opacity 0.4s, transform 0.4s;
}
.section-card.hidden { display: none; }
.section-card .section-header { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.section-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.section-card h3 { font-family: 'DM Serif Display', serif; font-size: 20px; font-weight: 400; }
.section-desc {
  color: var(--text-muted); font-size: 13px; line-height: 1.5;
  margin-bottom: 28px; padding-left: 56px;
}

/* QUESTIONS */
.question { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.question:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.question-text { font-size: 14.5px; font-weight: 500; line-height: 1.5; margin-bottom: 16px; color: var(--text); }
.question-number {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--accent);
  background: var(--accent-glow); padding: 2px 8px; border-radius: 6px; margin-right: 8px;
}

/* LIKERT */
.likert { display: flex; gap: 8px; flex-wrap: wrap; }
.likert label {
  flex: 1; min-width: 80px; text-align: center; padding: 10px 6px;
  background: var(--surface2); border: 2px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: all 0.2s; font-size: 12px; font-weight: 500;
  color: var(--text-muted); user-select: none;
}
.likert label:hover { border-color: var(--accent); color: var(--text); }
.likert input { display: none; }
.likert label.selected { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* CHOICES */
.choices { display: flex; flex-direction: column; gap: 8px; }
.choices label {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--surface2); border: 2px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: all 0.2s;
  font-size: 13.5px; color: var(--text-muted);
}
.choices label:hover { border-color: var(--accent); color: var(--text); }
.choices label.selected { background: var(--accent-glow); border-color: var(--accent); color: var(--text); }
.choices input { display: none; }
.choice-marker {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 11px; font-weight: 700; transition: all 0.2s;
}
.choices label.selected .choice-marker { background: var(--accent); border-color: var(--accent); color: #fff; }

/* VISUAL CHOICES */
.visual-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}
.visual-choices label {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px; background: var(--surface2); border: 2px solid var(--border);
  border-radius: 12px; cursor: pointer; transition: all 0.25s;
  font-size: 12px; font-weight: 600; color: var(--text-muted); user-select: none;
  min-height: 100px; text-align: center; position: relative;
}
.visual-choices label:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.visual-choices label.selected {
  background: var(--accent-glow); border-color: var(--accent); color: var(--accent);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.visual-choices input { display: none; }
.visual-choices svg { margin-bottom: 6px; }
.option-letter {
  position: absolute; top: 6px; left: 8px;
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  background: var(--bg); padding: 1px 6px; border-radius: 4px;
}
.visual-choices label.selected .option-letter { background: var(--accent); color: #fff; }

/* MATRIX & SCENARIO DISPLAY */
.matrix-display { display: flex; justify-content: center; margin-bottom: 20px; }
.matrix-display svg {
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface2);
}
.scenario-display { display: flex; justify-content: center; margin-bottom: 20px; }
.scenario-display svg {
  border-radius: 12px; border: 1px solid var(--border);
  background: linear-gradient(180deg, #1a2a4a 0%, #1F2330 100%);
}

/* BUTTONS */
.nav-buttons { display: flex; justify-content: space-between; margin-top: 32px; gap: 12px; }
.btn-start { width: 100%; padding: 16px; font-size: 16px; justify-content: center; margin-top: 24px; }

/* RESULTS */
#results.hidden { display: none; }
.results-header { text-align: center; margin-bottom: 40px; animation: fadeUp 0.8s ease both; }
.results-header h2 { font-family: 'DM Serif Display', serif; font-size: clamp(24px, 4vw, 34px); margin-bottom: 8px; }
.score-overview {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px; margin-bottom: 36px; animation: fadeUp 0.8s ease 0.1s both;
}
.score-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 16px; text-align: center; transition: transform 0.3s;
}
.score-card:hover { transform: translateY(-4px); }
.score-card .score-value { font-family: 'DM Serif Display', serif; font-size: 32px; line-height: 1; margin-bottom: 4px; }
.score-card .score-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }

.chart-container {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; margin-bottom: 24px; animation: fadeUp 0.8s ease 0.2s both;
}
.chart-container h3 { font-family: 'DM Serif Display', serif; font-size: 20px; margin-bottom: 20px; text-align: center; }
canvas { width: 100% !important; max-height: 380px; }

.result-bar-group { margin-bottom: 20px; }
.result-bar-label { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; font-weight: 500; }
.result-bar-label .val { color: var(--accent); font-weight: 700; }
.result-bar { height: 10px; background: var(--surface2); border-radius: 100px; overflow: hidden; }
.result-bar-fill { height: 100%; border-radius: 100px; transition: width 1.2s cubic-bezier(0.4,0,0.2,1); width: 0%; }

.result-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 32px; margin-bottom: 20px; animation: fadeUp 0.6s ease both;
}
.result-section h4 { font-size: 16px; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.result-section .interpretation {
  font-size: 13.5px; color: var(--text-muted); line-height: 1.6;
  margin-top: 16px; padding: 16px; background: var(--surface2); border-radius: 10px;
}
.level-badge { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.level-alto { background: rgba(52,211,153,0.15); color: var(--green); }
.level-medio { background: rgba(251,191,36,0.15); color: var(--amber); }
.level-bajo { background: rgba(248,113,113,0.15); color: var(--red); }

.btn-print { background: var(--green); color: var(--bg); }
.btn-print:hover { opacity: 0.9; }
.action-bar { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }

.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--red); color: #fff; padding: 12px 24px;
  border-radius: 10px; font-size: 13px; font-weight: 600; z-index: 999;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1); pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

@media (max-width:600px) {
  .likert { gap: 6px; }
  .likert label { min-width: 55px; padding: 8px 4px; font-size: 11px; }
  .section-desc { padding-left: 0; }
  .score-overview { grid-template-columns: repeat(2, 1fr); }
  .visual-choices { grid-template-columns: repeat(2, 1fr); }
  .candidate-info { flex-direction: column; gap: 12px; }
}

@media print {
  body { background: #fff !important; color: #000 !important; }
  .nav-buttons, .action-bar, .btn, .candidate-info .start-section { display: none !important; }
  .section-card, .candidate-info, .progress-container, .result-section, .chart-container, .score-card {
    background: #fff !important; border-color: #ddd !important; color: #000 !important; break-inside: avoid;
  }
  * { color: #000 !important; }
}
