body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  color: white;
  background-color: black;
  overflow-x: hidden;
}

.menu-pagos {
  position: relative;
}

.menu-pagos .submenu {
  display: none;
  position: absolute;
  top: 150%;
  left: 0;
  min-width: 200px;
  background-color: #002244;
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: 6px;
  z-index: 3000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transform: translateX(-60%); /* alineado al borde del botón */
}

.menu-pagos .submenu li a {
  display: block;
  padding: 0.75rem 1rem;
  color: white;
  text-decoration: none;
  white-space: nowrap;
}

.menu-pagos .submenu li a:hover {
  background-color: #004466;
}

.menu-pagos.open .submenu {
  display: block;
}

.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.video-background video {
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
}

header {
  background: rgba(0, 34, 68, 0.8);
  color: white;
  display: flex;
  justify-content: space-between;
  padding: 1rem 2rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.logo img {
  height: 40px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
}

nav a {
  color: white;
  text-decoration: none;
}

.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 5%;
}

.hero-content {
  max-width: 500px;
  background-color: rgba(0, 34, 68, 0.7);
  padding: 2rem;
  border-radius: 10px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.btn {
  background: #00aaff;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 5px;
}

.btn.cerrar {
  margin-top: 2rem;
  background-color: #aa0000;
}

.registro-biometrico {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  max-width: 1000px;
  max-height: 90vh;
  background-color: rgba(0, 0, 0, 0.98);
  border-radius: 12px;
  z-index: 1000;
  padding: 2rem;
  box-sizing: border-box;
  color: white;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

#instruccion {
  font-size: 1.3rem;
  line-height: 1.6;
  margin: 1.5rem 0 0.5rem;
  text-align: center;
  white-space: pre-line;
  max-width: 90%;
}

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 1.5rem auto;
}

video#video {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

canvas#overlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}


footer {
  background: #111;
  text-align: center;
  padding: 1rem;
  font-size: 0.875rem;
  position: relative;
  z-index: 2;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.hidden {
  opacity: 0 !important;
  transition: opacity 0.5s ease;
}

video#video {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
}

#instruccion {
  margin-top: 1rem;
  font-size: 1.2rem;
  line-height: 1.6;
  white-space: pre-line;
}

.popup-codigo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.popup-content {
  background: #001f3f;
  color: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  width: 90%;
  max-width: 400px;
}

.popup-content input {
  padding: 0.5rem;
  font-size: 1rem;
  width: 100%;
  margin-top: 1rem;
  border: none;
  border-radius: 5px;
}

.popup-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.popup-buttons button {
  padding: 0.5rem 1rem;
  background: #00aaff;
  border: none;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.error-mensaje {
  color: #ff6b6b;
  margin-top: 1rem;
}

#resultados {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
  max-width: 100%;
  overflow-y: auto;
  border-top: 1px solid #333;
}

#resultados img {
  width: 180px;
  height: auto;
  border: 2px solid white;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

#biometrico {
  max-height: 90vh;
  overflow-y: auto;
}

.mensaje-exito {
  color: #00ff99;
  font-size: 1.1rem;
  margin-top: 1rem;
  text-align: center;
  background-color: #003322;
  padding: 1rem;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
}

.logos-metodos {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.logos-metodos img {
  max-height: 60px;
  max-width: 120px;
  object-fit: contain;
  filter: brightness(1.1);
  transition: transform 0.3s ease;
}

.logos-metodos img:hover {
  transform: scale(1.1);
}

.mensaje-agente {
  background-color: #003355;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 8px;
  color: #ffffff;
  text-align: center;
  font-size: 1rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.qr-pago {
  background-color: #003355;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 8px;
  color: #ffffff;
  text-align: center;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.qr-pago img {
  margin-top: 1rem;
  width: 200px;
  height: 200px;
  object-fit: contain;
  border: 2px solid white;
  border-radius: 8px;
}

#popup-registrar form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#popup-registrar input[type="file"],
#popup-registrar button {
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 1rem;
}

.mensaje-subida {
  color: #00ff99;
  font-weight: bold;
  margin-top: 1rem;
  text-align: center;
}

@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    display: none;
    background-color: #002244;
    width: 100%;
    padding: 1rem 0;
  }

  nav ul.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .menu-pagos {
  width: 100%;
  }

  .menu-pagos .submenu {
    position: static;
    transform: none;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
  }

  .menu-pagos .submenu li a {
    padding: 1rem;
    border-top: 1px solid #003355;
  }

    .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-content {
    padding: 1.5rem;
  }

  .registro-biometrico {
    padding: 1rem;
  }

  #instruccion {
    font-size: 1rem;
  }

  #resultados img {
    width: 120px;
  }

  nav ul {
    flex-direction: column;
    display: none;
    background-color: #002244;
    width: 100%;
    padding: 1rem 0;
  }

  nav ul.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

@media (max-width: 480px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo img {
    height: 32px;
    margin-bottom: 0.5rem;
  }

  .menu-toggle {
    align-self: flex-end;
  }

  .popup-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .popup-content {
    padding: 1.5rem;
  }

  .popup-content input {
    font-size: 0.9rem;
  }
}

@media (max-height: 420px) {
  .registro-biometrico {
    height: 100vh;
    max-height: 100vh;
  }

  video#video {
    max-height: 50vh;
  }

}
