{ box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: #eef2f7;
  color: #333;
}

/* ===== Sistema de pantallas ===== */
.screen { display: none; }
.screen.active { display: block; }

/* ===== LOGO ===== */
.logo-container {
  background: white;
  padding: 15px 20px;
  text-align: center;
  border-bottom: 3px solid #1e3c72;
}
.logo-container-pdf {
  background: white;
  padding: 10px 20px;
  text-align: center;
  border-bottom: 2px solid #1e3c72;
  margin-bottom: 15px;
}
.logo {
  max-width: 100%;
  max-height: 70px;
  object-fit: contain;
}

/* ===== PANTALLA 1: DATOS ===== */
#screen-datos {
  min-height: 100vh;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
}
#screen-datos.active { display: flex; }
#screen-datos .container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-width: 700px;
  width: 100%;
  overflow: hidden;
}
#screen-datos .header {
  background: #1e3c72;
  color: white;
  padding: 25px;
  text-align: center;
}
#screen-datos .header h1 { font-size: 1.4em; margin-bottom: 8px; }
#screen-datos .header p { font-size: 0.95em; opacity: 0.9; }
#screen-datos .content { padding: 30px; }

.info-box {
  background: #f0f4f8;
  border-left: 4px solid #2a5298;
  padding: 15px;
  margin-bottom: 25px;
  border-radius: 6px;
  font-size: 0.9em;
  line-height: 1.6;
}
.info-box strong { color: #1e3c72; }

.form-group { margin-bottom: 18px; }
label {
  display: block;
  font-weight: 600;
  color: #1e3c72;
  margin-bottom: 6px;
  font-size: 0.95em;
}
input[type="text"], input[type="date"] {
  width: 100%;
  padding: 12px;
  border: 2px solid #d1d9e6;
  border-radius: 6px;
  font-size: 1em;
  transition: border 0.3s;
}
input:focus {
  outline: none;
  border-color: #2a5298;
}
.row { display: flex; gap: 15px; }
.row .form-group { flex: 1; }

.instructions {
  background: #fff8e1;
  border-left: 4px solid #f9a825;
  padding: 15px;
  margin: 20px 0;
  border-radius: 6px;
  font-size: 0.88em;
  line-height: 1.7;
}
.instructions h3 { color: #f57f17; margin-bottom: 8px; font-size: 1em; }
.instructions ul { margin-left: 20px; }

.footer {
  background: #f0f4f8;
  padding: 15px;
  text-align: center;
  font-size: 0.85em;
  color: #555;
}

/* ===== PANTALLA 2: PRUEBA ===== */
#screen-prueba { padding: 20px; }
.topbar {
  background: #1e3c72;
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.topbar .info { font-size: 0.9em; }

.timer {
  background: #f9a825;
  color: #1e3c72;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1.1em;
}
.timer.warning { background: #e53935; color: white; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.7; } }

.container-prueba { max-width: 900px; margin: 0 auto; }
.container {
  background: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.cabecera-pdf {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  text-align: center;
}
.cabecera-pdf h1 {
  font-size: 1.3em;
  margin-bottom: 6px;
  border: none;
  color: white;
  padding: 0;
}
.cabecera-pdf p {
  font-size: 0.95em;
  opacity: 0.95;
  margin-bottom: 12px;
}
.datos-cabecera {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
  font-size: 0.9em;
  background: rgba(255,255,255,0.15);
  padding: 10px;
  border-radius: 6px;
  margin-top: 10px;
}
.datos-cabecera strong { color: #ffd54f; }

h2 {
  color: #1e3c72;
  border-bottom: 3px solid #2a5298;
  padding-bottom: 10px;
  margin: 25px 0 18px;
  font-size: 1.2em;
}
h2:first-of-type { margin-top: 0; }

.question {
  background: #f8fafc;
  border-left: 4px solid #2a5298;
  padding: 15px 18px;
  margin-bottom: 15px;
  border-radius: 6px;
}
.question p { font-weight: 600; margin-bottom: 10px; line-height: 1.5; }

.options label {
  display: block;
  padding: 8px 12px;
  margin: 5px 0;
  background: white;
  border: 2px solid #d1d9e6;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}
.options label:hover { border-color: #2a5298; background: #e8f0fb; }
.options input[type="radio"] { margin-right: 8px; }
.options input[type="radio"]:checked + span { font-weight: 600; color: #1e3c72; }
.options label:has(input:checked) {
  background: #e3f2fd;
  border-color: #2a5298;
}

.match-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.match-table th, .match-table td {
  border: 1px solid #d1d9e6;
  padding: 10px;
  text-align: left;
  font-size: 0.92em;
}
.match-table th { background: #1e3c72; color: white; }
.match-table select {
  width: 100%;
  padding: 6px;
  border: 1px solid #d1d9e6;
  border-radius: 4px;
}

.word-bank {
  background: #fff8e1;
  border: 2px dashed #f9a825;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 0.9em;
}
.word-bank strong { color: #f57f17; }

.fill-input {
  width: 100%;
  padding: 10px;
  border: 2px solid #d1d9e6;
  border-radius: 5px;
  font-size: 1em;
  margin-top: 8px;
}

/* ===== PANTALLA 3: RESULTADOS ===== */
#screen-resultados { padding: 20px; }
.container-resultados {
  max-width: 1000px;
  margin: 0 auto;
  background: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}
#screen-resultados .header {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: white;
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 25px;
  text-align: center;
}
#screen-resultados .header h1 { font-size: 1.5em; margin-bottom: 10px; }

.datos-alumno {
  background: #f0f4f8;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.datos-alumno div { font-size: 0.95em; }
.datos-alumno strong { color: #1e3c72; }

.score-card {
  background: linear-gradient(135deg, #43a047, #66bb6a);
  color: white;
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 25px;
}
.score-card.fail { background: linear-gradient(135deg, #e53935, #ef5350); }
.score-card.ok { background: linear-gradient(135deg, #fb8c00, #ffa726); }
.score-card .big { font-size: 3em; font-weight: 700; }
.score-card .label { font-size: 1.1em; opacity: 0.95; }

/* ===== RESUMEN VISUAL ===== */
.resumen-visual {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}
.bloque-card {
  background: white;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
  border-top: 5px solid #2a5298;
  transition: transform 0.2s;
}
.bloque-card:hover { transform: translateY(-3px); }
.bloque-card .bloque-nombre {
  font-size: 0.85em;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.bloque-card .bloque-puntuacion {
  font-size: 1.8em;
  font-weight: 700;
  color: #1e3c72;
  margin-bottom: 10px;
}
.bloque-card .bloque-detalle {
  font-size: 0.85em;
  color: #555;
  margin-bottom: 12px;
}

.barra-fondo {
  background: #e0e0e0;
  border-radius: 10px;
  height: 14px;
  overflow: hidden;
  position: relative;
}
.barra-progreso {
  height: 100%;
  border-radius: 10px;
  transition: width 1s ease-out;
  background: linear-gradient(90deg, #43a047, #66bb6a);
}
.barra-progreso.media { background: linear-gradient(90deg, #fb8c00, #ffa726); }
.barra-progreso.baja { background: linear-gradient(90deg, #e53935, #ef5350); }

.porcentaje {
  text-align: right;
  font-size: 0.85em;
  font-weight: 700;
  color: #1e3c72;
  margin-top: 6px;
}

/* Tabla detalle */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.92em;
}
th, td {
  border: 1px solid #d1d9e6;
  padding: 10px;
  text-align: left;
}
th { background: #1e3c72; color: white; }
tr:nth-child(even) { background: #f8fafc; }

.ok { color: #2e7d32; font-weight: 700; }
.ko { color: #c62828; font-weight: 700; }
.neutral { color: #757575; font-style: italic; }

/* ===== Botones comunes ===== */
.actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 180px;
}
.btn-final {
  background: linear-gradient(135deg, #2a5298, #1e3c72);
  color: white;
  font-size: 1.1em;
  padding: 16px;
  box-shadow: 0 4px 15px rgba(42, 82, 152, 0.3);
}
.btn-final:hover {
  background: linear-gradient(135deg, #1e3c72, #0d2347);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(42, 82, 152, 0.4);
}
.btn-pdf1 { background: #1e3c72; color: white; }
.btn-pdf1:hover { background: #0d2347; }
.btn-pdf2 { background: #2e7d32; color: white; }
.btn-pdf2:hover { background: #1b5e20; }