/* Contenedor principal */
#tv-contenedor {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: "Barlow", Arial, sans-serif;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Secciones del test */
.tv-section { display: none; }
.tv-section.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

/* Animación suave al cambiar de sección */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Título de sección */
.tv-section-title {
  background: #4CAF50;
  color: #fff;
  padding: 12px;
  font-size: 18px;
  font-weight: bold;
  margin: 20px 0;
  border-radius: 8px;
  text-align: center;
}

/* Preguntas */
.tv-pregunta {
  margin: 12px 0;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  transition: background 0.3s;
}
.tv-pregunta:hover { background: #f1f1f1; }
.tv-pregunta label { margin-right: 15px; cursor: pointer; }

/* Botones */
#tv-prev, #tv-next, #tv-submit {
  background: #4CAF50;
  border: none;
  color: #fff;
  padding: 12px 24px;
  margin: 15px 8px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}
#tv-prev:hover, #tv-next:hover, #tv-submit:hover {
  background: #43a047;
  transform: scale(1.05);
}
#tv-prev:disabled, #tv-next:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}
.tv-navegacion { text-align: center; margin-top: 20px; }

/* Resultados */
#tv-resultado {
  margin-top: 30px;
  padding: 20px;
  border-radius: 10px;
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  display: none;
  animation: fadeIn 0.7s ease-in-out;
}
#tv-resultado h2 { color: #2e7d32; margin-bottom: 15px; }
#tv-resultado p { font-size: 16px; margin: 8px 0; }
#tv-resultado ul {
  list-style: disc inside;
  margin: 10px 0 0 15px;
  padding: 0;
}

.tv-historial {
  margin: 20px 0;
}

.tv-historial table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.tv-historial th,
.tv-historial td {
  border: 1px solid #ddd;
  padding: 8px;
}

.tv-historial th {
  background: #f4f4f4;
  text-align: left;
}

.tv-historial .button {
  background: #28a745;
  border: none;
  color: #fff;
  padding: 5px 10px;
  text-decoration: none;
  border-radius: 4px;
}

.tv-historial .button:hover {
  background: #218838;
}
