:root {
  --primary-color: #007bff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  background: #f5f5f5;
  height: 100lvh;
  display: flex;
  flex-direction: column;
}

hr {
  margin: 0;
  border: 0;
  border-bottom: 1px solid #ddd;
}

.container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.image-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #e0e0e0;
  position: relative;
  overflow: auto;
}

.placeholder {
  text-align: center;
  color: #888;
}

.placeholder h2 {
  margin-bottom: 20px;
  font-size: 24px;
}

.file-input-label {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary-color);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.file-input-label:hover {
  background: #0056b3;
}

input[type="file"] {
  display: none;
}

#canvas {
  max-width: 100%;
  max-height: 100%;
  display: none;
}

canvas {
  image-rendering: crisp-edges;
}

.control-panel {
  display: flex;
  flex-direction: column;
  row-gap: 1.5rem;
  width: 320px;
  background: white;
  padding: 24px;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.control-panel h2 {
  margin-bottom: 24px;
  font-size: 20px;
  color: #333;
}

.control-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
  font-size: 14px;
}

input[type="color"] {
  width: 100%;
  height: 48px;
  border: 2px solid #ddd;
  border-radius: 6px;
  cursor: pointer;

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  outline: none;
  cursor: pointer;

  &::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
  }

  &::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;

    &::-webkit-slider-thumb,
    &::-moz-range-thumb {
      cursor: not-allowed;
    }
  }
}

.slider-value {
  display: inline-block;
  margin-left: 8px;
  font-weight: 600;
  color: var(--primary-color);
}

select {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  background: white;
}

.download-btn {
  width: 100%;
  padding: 14px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.download-btn:hover {
  background: #218838;
}

.download-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.value-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-row label {
  margin-bottom: 0;
  cursor: pointer;
}

.blur-slider-group {
  margin-top: 12px;
  transition: opacity 0.2s;
}

.blur-slider-group.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.overlay-controls-group {
  margin-top: 12px;
  transition: opacity 0.2s;
}

.overlay-controls-group.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.control-group input[type="color"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
