/* Estilos generales */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* h1 {
  color: #2563eb;
  text-align: center;
  font-size: 2.25rem;
  margin-bottom: 2rem;
}

h2 {
  color: #2563eb;
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

h3 {
  color: #2563eb;
  text-align: center;
  font-size: 1.25rem;
  margin: 2rem 0 1rem 0;
} */

/* h4 {
  text-align: center;
  color: #4b5563;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
} */

/* Selector de sección */
.section-selector {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.section-selector select {
  width: 250px;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: white;
  font-size: 1rem;
  cursor: pointer;
}

/* Instrucciones */
.instructions {
  text-align: center;
  margin-bottom: 1.5rem;
}

.instructions p:first-child {
  color: #4b5563;
  margin-bottom: 0.5rem;
}

.instructions p:last-child {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Secciones */
.section {
  display: none;
  margin-bottom: 2rem;
}

.section.active {
  display: block;
}

/* Contenedores de imágenes */
.image-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.face-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.body-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.image-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Contenedor de imagen con puntos */
.image-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
  cursor: crosshair;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Puntos */
.point {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #ef4444;
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.point:hover {
  background-color: #dc2626;
  transform: scale(1.2);
}

/* Botones */
.button-group {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  /*   padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border: none;
  text-decoration: none; */
}

.btn-outline {
  background-color: transparent;
  border: 1px solid #d1d5db;
  color: #4b5563;
}

.btn-outline:hover {
  background-color: #f3f4f6;
}

.btn-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #2563eb;
  color: white;
  padding: 0.625rem 1.25rem;
  font-size: 1rem;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-server {
  background-color: #059669;
  color: white;
}

.btn-server:hover {
  background-color: #047857;
  color: white;
}

.btn-server:disabled {
  background-color: transparent;
  border: 1px solid #d1d5db;
  opacity: 0.5;
  cursor: not-allowed;
  color: rgba(0, 0, 0, 0.493);
}

.btn-danger {
  background-color: #dc2626;
  color: white;
}

.btn-danger:hover {
  background-color: #b91c1c;
}

/* Iconos */
.icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

/* Estadísticas */
.stats {
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: 2rem;
}

/* Botón de guardar todo */
.save-all {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* Notificaciones */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem;
  border-radius: 0.5rem;
  color: white;
  font-weight: 500;
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 300px;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  background-color: #059669;
}

.notification.error {
  background-color: #dc2626;
}

/* Sección de imágenes guardadas */
.saved-images-section {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e5e7eb;
}

.saved-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.saved-image-item {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

.saved-image-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.saved-image-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.saved-image-info {
  padding: 0.75rem;
}

.saved-image-info h5 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.25rem;
}

.saved-image-info p {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.saved-image-actions {
  display: flex;
  gap: 0.25rem;
}

.saved-image-actions .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  position: relative;
  margin: 5% auto;
  padding: 20px;
  width: 90%;
  max-width: 800px;
  background-color: white;
  border-radius: 0.5rem;
  text-align: center;
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
}

.close:hover {
  color: #000;
}

#modal-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.modal-info {
  margin-top: 1rem;
}

.modal-info h4 {
  color: #2563eb;
  margin-bottom: 0.5rem;
}

.modal-info p {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Loading spinner */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .image-grid {
    grid-template-columns: 1fr;
  }

  .save-all {
    flex-direction: column;
    align-items: center;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .saved-images-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
}

@media (max-width: 480px) {
  body {
    padding: 1rem 0.5rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .section-selector select {
    width: 200px;
  }

  .saved-images-grid {
    grid-template-columns: 1fr 1fr;
  }
}
