.gradient-workspace {
  padding: 24px 0 48px;
}

.gradient-preview-area {
  margin-bottom: 24px;
}

.gradient-preview {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  border: 1px solid #e5e6eb;
  margin-bottom: 12px;
}

.gradient-bar {
  position: relative;
  height: 24px;
  border-radius: 12px;
  border: 1px solid #e5e6eb;
  cursor: pointer;
  margin: 0 8px;
}

.gradient-stop {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 32px;
  margin-left: -8px;
  cursor: grab;
  z-index: 2;
}

.gradient-stop:active { cursor: grabbing; }

.stop-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  margin-top: 4px;
}

.gradient-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 700px) {
  .gradient-controls { grid-template-columns: 1fr; }
}

.control-group {
  margin-bottom: 4px;
}

.control-group > label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #4e5969;
  margin-bottom: 8px;
}

.type-btns {
  display: flex;
  gap: 6px;
}

.type-btn {
  padding: 6px 16px;
  font-size: 13px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
  color: #4e5969;
  cursor: pointer;
  transition: all 0.2s ease;
}

.type-btn:hover { border-color: #165DFF; color: #165DFF; }
.type-btn.active { border-color: #165DFF; background: #f0f5ff; color: #165DFF; font-weight: 500; }

.angle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quality-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #e5e6eb;
  border-radius: 2px;
  outline: none;
}

.quality-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #165DFF;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.quality-value {
  font-size: 13px;
  color: #165DFF;
  font-weight: 600;
  min-width: 36px;
  text-align: right;
}

.stops-list {
  margin-bottom: 8px;
}

.stop-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 6px 8px;
  background: #f7f8fa;
  border-radius: 6px;
}

.stop-color {
  width: 32px;
  height: 32px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  background: none;
}

.stop-position {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #e5e6eb;
  border-radius: 2px;
  outline: none;
}

.stop-position::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #165DFF;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.stop-pos-val {
  font-size: 12px;
  color: #86909c;
  min-width: 32px;
  text-align: right;
}

.stop-remove {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: #c9cdd4;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.stop-remove:hover { color: #F53F3F; background: #ffe8e8; }

.preset-gradients {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-grad {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid #e5e6eb;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-grad:hover { border-color: #165DFF; transform: scale(1.1); }

.gradient-output {
  margin-top: 8px;
}

.panel-actions {
  display: flex;
  gap: 6px;
}

.btn-tiny {
  padding: 2px 10px;
  font-size: 12px;
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  background: #fff;
  color: #4e5969;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-tiny:hover { border-color: #165DFF; color: #165DFF; background: #f0f5ff; }

.css-output {
  background: #f7f8fa;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  padding: 16px;
  font-size: 13px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  color: #1d2129;
  margin: 0;
}

@media (max-width: 600px) {
  .gradient-preview { height: 140px; }
}