/** @format */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

thead {
  z-index: 1;
  position: relative;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 880px;
  margin: 0 auto;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  margin-bottom: 30px;
}

h1 {
  color: #e94560;
  margin-bottom: 30px;
  text-align: center;
  font-size: 2em;
}

.form-group {
  margin-bottom: 16px;
}

.form-row {
  margin-bottom: 20px;
}

a {
  color: #3fbaf6;
}

@media (min-width: 768px) {
  .form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    align-items: end;
  }

  body {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .form-row .form-group {
    margin-bottom: 0;
  }

  .card {
    padding: 16px 32px;
  }
}

label {
  display: block;
  margin-bottom: 8px;
  color: #e94560;
  font-weight: 600;
}

input[type="text"],
select {
  width: 100%;
  padding: 12px;
  border: 2px solid #533483;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
  background: #16213e;
  color: #e0e0e0;
}

input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: #e94560;
}

h2 {
  color: wheat;
}

button {
  background: linear-gradient(135deg, #e94560 0%, #533483 100%);
  color: white;
  padding: 14px 30px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: transform 0.2s;
}

button:hover {
  transform: translateY(-2px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading {
  display: none;
  text-align: center;
  padding-bottom: 0;
  padding-top: 20px;
  color: #e94560;
}

.loading.active {
  display: block;
}

.spinner {
  border: 4px solid #533483;
  border-top: 4px solid #e94560;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.results {
  display: none;
}

.results.active {
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #533483;
  color: #e0e0e0;
}

th {
  background: #16213e;
  font-weight: 600;
  color: #e94560;
  position: sticky;
  top: 0;
}

tr:hover {
  background: #16213e;
}

.error {
  background: #5c0e10;
  color: #ff6b6b;
  padding: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  border-radius: 8px;
  margin-top: 20px;
  display: none;
  border: 1px solid #e94560;
}

.error.active {
  display: block;
}

.table-container {
  max-height: 552px;
  overflow-y: auto;
  overflow-x: auto;
  margin-top: 20px;
  border-radius: 8px;
}

.table-container::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.table-container::-webkit-scrollbar-track {
  background: #16213e;
  border-radius: 8px;
}

.table-container::-webkit-scrollbar-thumb {
  background: #533483;
  border-radius: 8px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #e94560;
}

img.thumbnail {
  max-width: 100px;
  height: auto;
  border-radius: 4px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #e94560;
  font-weight: 600;
}

.input-wrapper {
  position: relative;
}

input[type="text"],
select {
  width: 100%;
  padding: 12px;
  border: 2px solid #533483;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
  background: #16213e;
  color: #e0e0e0;
}

input[type="text"] {
  padding-right: 40px;
}

input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: #e94560;
}

.clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #e94560;
  cursor: pointer;
  font-size: 20px;
  padding: 5px;
  display: none;
  width: auto;
  transition: color 0.2s;
}

.clear-btn:hover {
  color: #ff6b6b;
  transform: translateY(-50%) scale(1.1);
}

.clear-btn.show {
  display: block;
}

/* ========== FOOTER ========== */
.marcas1 {
  opacity: 0.8;
  margin-top: 16px;
  color: #ccc;
  bottom: 0vh;
  display: block;
  display: flex;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
}

#© {
  text-align: center;
}

/* Switch Container */
#x2 {
  display: flex;
  align-items: center;
  justify-content: center;
}

hr {
  width: 100%;
  margin-top: 1%;
}

.conteiners {
  /* margin-bottom: 4px; */
  width: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.control-panel {
  color: white;
  border: 1px solid #ccc;
  padding: 20px;
  display: flex;
  margin: 20px auto;
  /* max-width: 500px; */
  border-radius: 8px;
  font-family: sans-serif;
  flex-direction: column;
  align-items: center;
}

.btn {
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  color: white;
  font-weight: bold;
}

.btn-upload {
  background-color: #28a745;
}

.btn-restart {
  background-color: #dc3545;
}

.status {
  margin-bottom: 10px;
  font-size: 0.9em;
}

/* Estilo para el "botón" de seleccionar archivo */
.btn-custom {
  display: block;
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  background: #2a2a3d;
  /* Fondo oscuro para diferenciarlo del botón de acción */
  border: 2px dashed #ff4b91;
  /* Borde discontinuo para indicar "subida" */
  color: #fff;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-custom:hover {
  background: #35354e;
  border-color: #ff75c3;
}

/* El botón de ejecución con tu gradiente actual */
.btn-execute {
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
}

.btn-execute:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}