/* ========================================
   INDUCASCOS - Estilos específicos para interfaz
   ======================================== */

/* Reset y Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #000000 0%, #b71440 100%);
  min-height: 100vh;
  padding: 20px;
}

/* Container Principal */
.container {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #000000 0%, #b71440 100%);
  color: white;
  padding: 30px;
  text-align: center;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 300;
}

.header p {
  opacity: 0.9;
  font-size: 1.1rem;
}

.content {
  padding: 40px;
}

/* Área de Upload */
.upload-area {
  border: 3px dashed #000000;
  border-radius: 15px;
  padding: 40px;
  text-align: center;
  margin-bottom: 30px;
  transition: all 0.3s ease;
  cursor: pointer;
  background: linear-gradient(45deg, #f8f9ff, #fff);
}

.upload-area:hover {
  border-color: #b71440;
  background: linear-gradient(45deg, #f0f2ff, #f8f9ff);
  transform: translateY(-2px);
}

.upload-area.dragover {
  border-color: #4caf50;
  background: linear-gradient(45deg, #f0fff0, #f8fff8);
}

.upload-icon {
  font-size: 3rem;
  color: #000000;
  margin-bottom: 15px;
}

.upload-text {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 10px;
}

.upload-hint {
  color: #888;
  font-size: 0.9rem;
}

#file {
  display: none;
}

/* Sección de Parámetros */
.params-section {
  margin-bottom: 30px;
  background: #f8f9ff;
  padding: 30px;
  border-radius: 15px;
  border-left: 4px solid #000000;
}

.params-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Selector de Ciudad */
.city-selector {
  width: 100%;
  padding: 15px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  background: white;
  cursor: pointer;
}

.city-selector:focus {
  outline: none;
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Información de Ciudad */
.city-info {
  margin-top: 15px;
  padding: 15px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 8px;
  border-left: 3px solid #000000;
  display: none;
}

.city-info.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.city-info h4 {
  color: #000000;
  margin-bottom: 8px;
  font-size: 1rem;
}

.params-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  font-size: 0.9rem;
  color: #666;
}

.param-item {
  background: white;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.param-label {
  font-weight: 600;
  color: #333;
}

.param-value {
  color: #000000;
  font-family: monospace;
}

/* Estilos para inputs editables de parámetros */
.param-item input.param-value {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: monospace;
  background: white;
  transition: all 0.3s ease;
  margin-top: 5px;
}

.param-item input.param-value:focus {
  outline: none;
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.param-item input.param-value:hover {
  border-color: #b71440;
}

/* Estilos para labels de parámetros */
.param-item label.param-label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.ai-toggle-container {
  background: #f8f9ff;
  border-radius: 15px;
  padding: 18px 28px;
  margin: 25px 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  border-left: 4px solid #b71440;
  gap: 12px;
}

.ai-toggle-label {
  font-size: 1.08rem;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.ai-toggle-label input[type='checkbox'] {
  accent-color: #b71440;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(183, 20, 64, 0.12);
  transition: accent-color 0.2s;
}

/* Selector de Formato */
.format-selector {
  margin: 20px 0;
}

.format-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 8px;
}

.format-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.format-option {
  background: white;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid #e1e5e9;
  transition: all 0.3s ease;
  cursor: pointer;
}

.format-option:hover {
  border-color: #38a169;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(56, 161, 105, 0.2);
}

.format-option.selected {
  border-color: #38a169;
  background: #f0fff4;
}

.format-name {
  font-weight: 600;
  margin-bottom: 10px;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 8px;
}

.format-specs {
  font-size: 0.9rem;
  color: #718096;
  line-height: 1.5;
}

/* Estilos para el selector de tinte */
.tint-control {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  margin: 10px 0;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

.tint-slider-container {
  position: relative;
  width: 220px;
  height: 22px;
}

.tint-slider {
  position: relative;
  width: 100%;
  height: 22px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
  border-radius: 12px;
}

/* Fondo degradado: magenta → gris neutro → verde */
.tint-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
  border-radius: 12px;
  background: linear-gradient(
    to right,
    rgb(255, 0, 255) 0%,
    /* Magenta */ rgb(128, 128, 128) 50%,
    /* Neutral */ rgb(0, 255, 0) 100% /* Verde */
  );
  z-index: 1;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.15);
}

/* Estilo del thumb (control deslizante) */
.tint-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #444;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tint-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.tint-slider::-webkit-slider-thumb:active {
  transform: scale(1.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.tint-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #444;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tint-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.tint-slider::-moz-range-thumb:active {
  transform: scale(1.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.tint-value {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 70px;
  font-size: 14px;
}

.tint-color-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #aaa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.tint-number {
  font-weight: 600;
  min-width: 45px;
  text-align: center;
  font-size: 14px;
  color: #333;
}

/* Botón de Procesamiento */
.process-btn {
  background: linear-gradient(135deg, #000000 0%, #b71440 100%);
  color: white;
  border: none;
  padding: 18px 50px;
  font-size: 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
  margin: 30px auto 0;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.process-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6);
}

.process-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.2);
}

/* Barra de Progreso */
.progress-container {
  display: none; /* Se mostrará con JavaScript */
  margin: 30px 0;
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #38a169;
}

.progress-container.show {
  display: block !important; /* Forzar visibilidad */
}

.progress-percentage {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 10px;
}

.progress-bar-container {
  background: #e9ecef;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin: 15px 0;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #000000, #b71440);
  width: 0%;
  border-radius: 6px;
  transition: width 0.3s ease;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-text {
  text-align: center;
  color: #718096;
  font-size: 1rem;
  margin-top: 10px;
}

/* Resultados y Descargas */
.result {
  display: none;
  margin: 30px 0;
}

.result.show {
  display: block !important; /* Forzar visibilidad */
}

.success {
  background: #f0fff4;
  border: 2px solid #38a169;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: #2d3748;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.error {
  background: #fed7d7;
  border: 2px solid #e53e3e;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: #2d3748;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.file-card {
  background: white;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.file-card:hover {
  border-color: #38a169;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(56, 161, 105, 0.2);
}

.file-format {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 10px;
}

.file-dimensions {
  font-size: 1rem;
  color: #718096;
  margin-bottom: 15px;
}

/* Estilo para indicar descarga automática */
.file-card .fa-download {
  color: #28a745;
  margin-right: 8px;
}

/* Estilo para información de carpetas */
.success .fa-folder {
  margin-right: 8px;
}

/* Estilos para opciones de descarga */
.download-options {
  margin-top: 15px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #007bff;
}

.download-options .btn {
  margin: 5px;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Formulario de exportación */
.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-control:hover {
  border-color: #b71440;
}

.export-params-grid label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }

  .content {
    padding: 20px;
  }

  .upload-area {
    padding: 30px 20px;
  }

  .format-options {
    grid-template-columns: 1fr;
  }

  .params-grid {
    grid-template-columns: 1fr;
  }

  .files-grid {
    grid-template-columns: 1fr;
  }
}

/* Estilos para alertas */
.alert {
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  position: relative;
  animation: slideIn 0.3s ease-out;
}

.alert-warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  color: #856404;
  border: 2px solid #ffc107;
}

.alert-info {
  background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
  color: #0c5460;
  border: 2px solid #17a2b8;
}

.alert i {
  font-size: 1.2rem;
}

.alert-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  margin-left: auto;
  transition: background-color 0.2s ease;
}

.alert-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
