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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f4ff;
  min-height: 100vh;
  color: #1a1a2e;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px 20px;
}

h1 { text-align: center; font-size: 1.8rem; margin-bottom: 4px; }
h2 { font-size: 1.2rem; margin-bottom: 16px; text-align: center; }
.subtitle { text-align: center; color: #666; margin-bottom: 30px; }

.step { display: none; }
.step.active { display: block; }

/* Upload area */
.upload-area {
  border: 3px dashed #b0c4de;
  border-radius: 16px;
  padding: 50px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}
.upload-area:hover, .upload-area.dragover {
  border-color: #6c63ff;
  background: #f5f3ff;
}
.upload-hint .icon { font-size: 3rem; display: block; margin-bottom: 12px; }
.upload-hint p { margin: 6px 0; }
.small { font-size: 0.85rem; color: #999; }

/* Preview */
.preview { text-align: center; margin-top: 16px; }
.preview img { max-width: 100%; max-height: 300px; border-radius: 12px; border: 2px solid #e0e0e0; }
.btn-link { background: none; border: none; color: #6c63ff; cursor: pointer; margin-top: 8px; font-size: 0.9rem; }
.btn-link:hover { text-decoration: underline; }

/* Motion grid */
.motion-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.motion-card {
  background: white;
  border: 3px solid #e8e8e8;
  border-radius: 12px;
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1.1rem;
}
.motion-card:hover { border-color: #6c63ff; transform: translateY(-2px); }
.motion-card.selected { border-color: #6c63ff; background: #f0eeff; }
.motion-card .emoji { font-size: 2rem; display: block; margin-bottom: 6px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 10px;
  border: 2px solid #ddd;
  background: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: #333;
}
.btn:hover { border-color: #6c63ff; }
.btn.primary {
  background: #6c63ff;
  color: white;
  border-color: #6c63ff;
}
.btn.primary:hover { background: #5a52e0; }

/* Processing */
#step-processing { text-align: center; padding-top: 60px; }
.spinner {
  width: 50px; height: 50px;
  border: 4px solid #e0e0e0;
  border-top-color: #6c63ff;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#statusText { font-size: 1.1rem; margin-bottom: 6px; }

/* Result */
#step-result { text-align: center; }
.result-container { margin: 20px auto; }
.result-container img { max-width: 100%; max-height: 400px; border-radius: 12px; border: 2px solid #e0e0e0; }
.actions { margin-top: 20px; display: flex; gap: 12px; justify-content: center; }

/* Error */
.error-box { text-align: center; padding: 40px; }
.error-box .icon { font-size: 3rem; }
.error-box p { margin: 12px 0; color: #e74c3c; }
