/* Gradient Generator specific styles */
.gradient-types {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.type-btn {
  padding: 10px 20px;
  border: 2px solid #e1e8ed;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.type-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: transparent;
}

.type-btn:hover:not(.active) {
  border-color: #667eea;
  background: #f8f9fa;
}

.color-stops {
  margin-bottom: 16px;
}

.color-stop {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px solid #e1e8ed;
}

.color-stop .color-input {
  width: 60px;
  height: 40px;
  border: 2px solid #e1e8ed;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.color-stop .color-input:hover {
  border-color: #667eea;
  transform: scale(1.05);
}

.position-input {
  width: 80px;
  padding: 8px;
  border: 2px solid #e1e8ed;
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
}

.position-input:focus {
  outline: none;
  border-color: #667eea;
}

.position-unit {
  font-size: 13px;
  color: #6c757d;
  font-weight: 600;
}

.remove-stop {
  width: 32px;
  height: 32px;
  border: none;
  background: #dc3545;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.remove-stop:hover:not(:disabled) {
  background: #c82333;
  transform: scale(1.1);
}

.remove-stop:disabled {
  background: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}

.direction-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
}

.direction-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  width: 120px;
}

.preset-btn {
  width: 36px;
  height: 36px;
  border: 2px solid #e1e8ed;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preset-btn:hover {
  border-color: #667eea;
  background: #f8f9fa;
}

.preset-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: transparent;
}

.radial-controls,
.conic-controls {
  display: grid;
  gap: 16px;
}

.position-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.range-input {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e1e8ed;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.gradient-preview {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  border: 2px solid #e1e8ed;
  background: linear-gradient(45deg, #667eea, #764ba2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.gradient-preview::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><rect width="10" height="10" fill="%23f8f9fa"/><rect x="10" y="10" width="10" height="10" fill="%23f8f9fa"/></svg>');
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.gradient-preview:hover::after {
  opacity: 0.1;
}

.code-section {
  position: relative;
}

.code-output {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
  background: #f8f9fa;
  color: #2c3e50;
  resize: vertical;
  margin-bottom: 12px;
}

.code-output:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.preset-gradients {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.preset-item {
  height: 80px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid #e1e8ed;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.preset-item:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.preset-item::after {
  content: attr(data-name);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.2s ease;
}

.preset-item:hover::after {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .direction-controls {
    grid-template-columns: 1fr;
  }
  
  .position-controls {
    grid-template-columns: 1fr;
  }
  
  .gradient-types {
    flex-direction: column;
  }
  
  .preset-gradients {
    grid-template-columns: repeat(2, 1fr);
  }
}