/* ===== Estilos generales ===== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #f4f6f9; /* Fondo gris claro */
  color: #333;
}

/* ===== Controles superiores ===== */
#controls {
  text-align: center;
  padding: 15px;
  background-color: #1e3a8a; /* Azul oscuro en lugar de verde */
  color: white;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

#controls h1 {
  margin: 0;
  flex: 1 1 100%;
  text-align: center;
  font-size: 1.5rem;
  color: #ffffff;
}

#controls input,
#controls button,
#controls select {
  margin: 5px;
  padding: 10px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background-color: #edf2f7;
  color: #2d3748;
  flex: 1 1 auto;
  transition: background-color 0.3s ease;
}

#controls button:hover,
#controls select:hover {
  background-color: #cbd5e0;
}

#pageIndicator {
  font-size: 18px;
  margin-left: 10px;
  flex: 1 1 auto;
}

label.inline {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: #fff;
}

/* ===== Barra de progreso ===== */
#progressContainer {
  position: relative;
  width: 80%;
  height: 30px;
  background: #e0e0e0;
  border-radius: 10px;
  margin: 10px auto;
  overflow: hidden;
}

#progressBar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00c6ff, #0072ff);
  border-radius: 10px;
  transition: width 0.3s ease;
}

#progressText {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-weight: bold;
  font-size: 150%;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* ===== Contenedor PDF ===== */
#pdfContainer {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 20px auto;
  border: 1px solid #cbd5e0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

#pdfCanvas {
  width: 100%;
  display: block;
}

#highlightOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ===== Resaltado de texto ===== */
.highlight {
  background-color: rgba(255, 255, 0, 0.5);
  position: absolute;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ===== Resaltado especial para SFX ===== */
.sfx-tag {
  position: absolute;
  background-color: rgba(255, 0, 0, 0.15);
  border: 1px dashed rgba(255, 0, 0, 0.5);
  border-radius: 3px;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  #controls {
    flex-direction: column;
    gap: 10px;
  }

  #controls input,
  #controls button,
  #controls select {
    width: 100%;
    margin: 5px 0;
  }

  #pdfContainer {
    max-width: 100%;
  }
}