/* Custom styles beyond Tailwind */
.drag-area {
  border: 2px dashed #6c5ce7;
  background-color: rgba(108, 92, 231, 0.05);
  transition: all 0.3s ease;
}

.drag-area.active {
  border-color: #00cec9;
  background-color: rgba(0, 206, 201, 0.05);
}

.image-editor {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  background-image: linear-gradient(45deg, #f6f6f6 25%, transparent 25%), 
                    linear-gradient(-45deg, #f6f6f6 25%, transparent 25%), 
                    linear-gradient(45deg, transparent 75%, #f6f6f6 75%), 
                    linear-gradient(-45deg, transparent 75%, #f6f6f6 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.tampon-img {
  position: absolute;
  cursor: grab;
  transform-origin: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  user-select: none;
  touch-action: none; /* Important pour interact.js */
  border: 2px dashed rgba(108, 92, 231, 0.3);
  border-radius: 4px;
  padding: 4px;
  box-sizing: content-box;
}

.tampon-img:hover {
  border-color: rgba(108, 92, 231, 0.6);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}

.tampon-img.dragging {
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
  cursor: grabbing;
  z-index: 100;
  border-color: rgba(108, 92, 231, 0.8);
  background-color: rgba(108, 92, 231, 0.05);
}

.slider-container {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: #d3d3d3;
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #6c5ce7;
  cursor: pointer;
  transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
  background: #5a4ecc;
  transform: scale(1.1);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #6c5ce7;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.slider::-moz-range-thumb:hover {
  background: #5a4ecc;
  transform: scale(1.1);
}

.step-container {
  transition: all 0.3s ease;
}

.btn {
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.control-panel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid white;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}