:root {
  --primary: #8b3a19; /* crimson-spice */
  --bg: #f5f5f5;
  --card-bg: #ffffff;
  --text: #333333;
  --border: #e0e0e0;
}

body {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

#app {
  width: 100%;
  max-width: 600px;
  padding: 2rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  margin: 0 0 0.5rem 0;
  color: var(--primary);
}

header p {
  margin: 0;
  color: #666;
}

.card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.input-group {
  margin-bottom: 1rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.input-group input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}

.input-group small {
  display: block;
  margin-top: 0.25rem;
  color: #666;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 3rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fafafa;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: #fdf5f2;
}

.drop-zone p {
  margin: 0;
  color: #555;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

#processing-state {
  text-align: center;
  padding: 2rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 1rem;
}

#progress-fill {
  width: 50%; /* Fake progress for visual */
  height: 100%;
  background: var(--primary);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: translateX(-100%);
    width: 50%;
  }
  100% {
    transform: translateX(200%);
    width: 50%;
  }
}

/* Results */
.result-box {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}
.result-box input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f5f5f5;
}
#preview-img {
  max-width: 100%;
  border-radius: 4px;
  margin-top: 1rem;
  border: 1px solid var(--border);
}
.hidden {
  display: none !important;
}
.mt-4 {
  margin-top: 1rem;
}
.flex {
  display: flex;
}
.justify-between {
  justify-content: space-between;
}
.items-center {
  align-items: center;
}
.text-sm {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 1rem;
}
.secondary-btn {
  background: #f1f5f9;
  color: #0f172a;
}
.secondary-btn:hover {
  background: #e2e8f0;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.gallery-item {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
}
.gallery-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.gallery-item button {
  padding: 0.25rem;
  font-size: 0.75rem;
  border-radius: 0;
}

button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

button:hover {
  opacity: 0.9;
}

#preview-img {
  max-width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border);
}
