* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f6f7f9;
  color: #1a1a1a;
}
.topbar {
  padding: 20px 24px;
  background: #101828;
  color: #fff;
}
.logo { font-size: 22px; font-weight: 700; }
.logo span { color: #6fd3a7; }
.subtitulo { font-size: 14px; color: #cbd5e1; margin-top: 4px; }

.pasos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}
@media (max-width: 1100px) {
  .pasos { grid-template-columns: 1fr; }
}

.paso {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  transition: opacity 0.2s;
}
.paso.deshabilitado { opacity: 0.45; pointer-events: none; }
.paso h2 { margin: 0 0 12px; font-size: 16px; }

.cuadro-grande {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #eef0f3;
  border: 2px dashed #d0d5dd;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
}
.cuadro-grande .placeholder { text-align: center; color: #667085; font-size: 14px; }
.resultado { width: 100%; height: 100%; object-fit: contain; }
.cargando {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.85);
  font-size: 14px; color: #101828;
}

.overlay-arrastrable {
  position: absolute;
  cursor: move;
  max-width: 60%;
  max-height: 60%;
  border: 1px dashed #6fd3a7;
}

.opciones { display: flex; flex-direction: column; gap: 8px; }
.opciones select, .opciones button, .boton-archivo {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d0d5dd;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}
.opciones button {
  background: #101828;
  color: #fff;
  border: none;
  font-weight: 600;
}
.opciones button:disabled { background: #98a2b3; cursor: not-allowed; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid #d0d5dd;
  padding: 0;
  cursor: pointer;
}
.swatch.activo { border-color: #101828; box-shadow: 0 0 0 2px #6fd3a7; }
.plantillas { display: flex; gap: 8px; flex-wrap: wrap; }
.aviso-plantillas { font-size: 12px; color: #98a2b3; margin: 4px 0; }
.plantilla-thumb { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; cursor: pointer; border: 2px solid transparent; }
.plantilla-thumb.activo { border-color: #6fd3a7; }

#input-archivo { margin-top: 8px; }

/* animaciones del paso 4 */
.img-anim-giro-izquierda { animation: giroIzq 2s ease-in-out infinite; }
.img-anim-giro-derecha { animation: giroDer 2s ease-in-out infinite; }
.img-anim-caida { animation: caida 1.4s ease-out infinite; }
.img-anim-desplazamiento { animation: desplazamiento 2s ease-in-out infinite; }
.img-anim-zoom { animation: zoomIn 2s ease-in-out infinite; }

@keyframes giroIzq { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(-12deg); } }
@keyframes giroDer { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(12deg); } }
@keyframes caida { 0% { transform: translateY(-120%); opacity: 0; } 60% { opacity: 1; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes desplazamiento { 0%,100% { transform: translateX(-8%); } 50% { transform: translateX(8%); } }
@keyframes zoomIn { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
