/* Fondo y layout general */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  background: linear-gradient(135deg, #6a0dad, #9b4dca);
  min-height: 100vh;
  overflow-y: auto;
  padding: 2em 0;
  display: flex;
  justify-content: center;
}

/* Contenedor principal */
.container {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  padding: 2em;
  width: 100%;
  max-width: 400px;
  animation: fadeIn 0.5s ease-in-out;
}

h1 {
  text-align: center;
  margin-bottom: 1em;
  color: #333;
}

h2 {
  margin-top: 1.5em;
  color: #6a0dad;
}

/* Inputs */
input {
  width: 100%;
  padding: 0.75em;
  margin: 0.5em 0;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
  transition: border-color 0.3s;
}

input:focus {
  border-color: #6a0dad;
  outline: none;
}

/* Botones */
button {
  width: 100%;
  padding: 0.75em;
  background: #6a0dad;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #4b0082;
}

/* Tabla */
table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 1em;
}

th, td {
  border: 1px solid #ccc;
  padding: 0.5em;
  text-align: left;
}

/* Overlay */
#overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  color: white;
}

.progress-container {
  width: 80%;
  background: #444;
  border-radius: 5px;
  overflow: hidden;
}

#progress-bar {
  height: 20px;
  width: 0%;
  background: lime;
}

#progress-text {
  margin-top: 10px;
}

/* Animación */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

#panel {
  display: none;
}

#cambio-clave {
  display: none;
}

/* Fondo semitransparente */
.modal {
  display: none; /* Oculto por defecto */
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}

/* Contenido del modal */
.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease;
}

/* Título púrpura */
.modal-content h2 {
  margin-top: 0;
  color: #6a0dad;
}

/* Botón de cierre */
.modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-close:hover {
  color: #000;
}

/* Animación */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}


.paginacion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.paginacion button {
  background-color: #6a1b9a;
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
}

.paginacion button:disabled {
  background-color: #ccc;
  cursor: default;
}

/* Generador de token responsivo */
.generador {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1em;
  align-items: center;
}

.generador input {
  flex: 1 1 200px;
  min-width: 150px;
  padding: 0.75em;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.generador button {
  flex: 0 0 auto;
  padding: 0.75em 1em;
  font-size: 1em;
  background: #6a0dad;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.generador button:hover {
  background: #4b0082;
}

@media (max-width: 500px) {
  .generador {
    flex-direction: column;
    align-items: stretch;
  }

  .generador input,
  .generador button {
    width: 100%;
  }
}