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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: white;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  padding: 40px;
}

h1 {
  font-size: 28px;
  margin-bottom: 8px;
  text-align: center;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
}

.upload-area {
  border: 2px dashed #ccc;
  border-radius: 12px;
  padding: 60px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #fafafa;
}

.upload-area:hover {
  border-color: #000;
  background: #f5f5f5;
}

.upload-area.drag-over {
  border-color: #000;
  background: #eee;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.upload-text {
  color: #666;
  margin-bottom: 8px;
}

.upload-hint {
  font-size: 12px;
  color: #999;
}

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

.editor {
  display: none;
}

.canvas-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 30px;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  cursor: move;
}

.controls {
  margin-bottom: 30px;
}

.control-group {
  margin-bottom: 20px;
}

.control-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.slider-row {
  display: flex;
  gap: 20px;
  align-items: center;
}

input[type="range"] {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #e0e0e0;
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #000;
  border-radius: 50%;
  cursor: pointer;
}

.value {
  font-family: 'SF Mono', Monaco, monospace;
  background: #f0f0f0;
  padding: 4px 12px;
  border-radius: 4px;
  min-width: 60px;
  text-align: center;
}

.presets {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.preset-btn {
  background: white;
  border: 1px solid #ddd;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.preset-btn:hover {
  background: #f8f8f8;
  border-color: #bbb;
}

.preset-btn.active {
  background: #000;
  color: white;
  border-color: #000;
}

.actions {
  display: flex;
  gap: 12px;
}

.btn {
  flex: 1;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: #000;
  color: white;
}

.btn-primary:hover {
  background: #333;
}

.btn-secondary {
  background: white;
  color: #000;
  border: 1px solid #ddd;
}

.btn-secondary:hover {
  background: #f8f8f8;
}

.size-options {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.size-btn {
  background: white;
  border: 1px solid #ddd;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.size-btn:hover {
  background: #f8f8f8;
}

.size-btn.active {
  background: #000;
  color: white;
  border-color: #000;
}

.attribution {
  position: fixed;
  bottom: 20px;
  left: 20px;
  font-size: 12px;
}

.attribution a {
  color: #666;
  text-decoration: none;
}

.attribution a:hover {
  color: #000;
}