/* POD Cook Me — Dark theme, single-column layout */
:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface-2: #252525;
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #6c5ce7;
  --accent-dim: #4a3db0;
  --success: #00b894;
  --error: #d63031;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); }
main { max-width: 800px; margin: 0 auto; padding: 1rem; }
header { text-align: center; padding: 2rem 0 1rem; }
h1 { font-size: 1.5rem; font-weight: 600; }
h2 { font-size: 1.1rem; font-weight: 500; margin-bottom: 0.75rem; }
.subtitle { color: var(--text-muted); font-size: 0.875rem; }
.hidden { display: none !important; }
.section { margin-bottom: 1.5rem; }

/* Upload */
.drop-zone {
  border: 2px dashed var(--surface-2);
  border-radius: var(--radius);
  padding: 3rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}
.drop-zone.dragover { border-color: var(--accent); }
.drop-zone .preview { max-width: 200px; max-height: 200px; margin-top: 1rem; border-radius: 4px; }
.form-row { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.form-row input {
  flex: 1; padding: 0.5rem 0.75rem;
  background: var(--surface); border: 1px solid var(--surface-2);
  border-radius: var(--radius); color: var(--text);
  font-size: 0.875rem;
}
.form-row input::placeholder { color: var(--text-muted); }
.link { color: var(--accent); cursor: pointer; text-decoration: underline; }

/* Ref image */
.ref-section { margin-top: 0.75rem; }
.ref-toggle {
  color: var(--accent); cursor: pointer; font-size: 0.85rem;
  padding: 0.4rem 0; user-select: none;
}
.ref-hint { color: var(--text-muted); font-size: 0.75rem; margin: 0.4rem 0; }
.ref-drop {
  width: 100%; height: 64px; background: var(--surface); border: 1.5px dashed var(--surface-2);
  border-radius: var(--radius); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; transition: border-color 0.2s; gap: 0.5rem;
}
.ref-drop:hover { border-color: var(--accent); }
.ref-drop.has-file { border-color: var(--success); border-style: solid; }
.ref-placeholder { font-size: 0.85rem; color: var(--text-muted); }
.ref-preview { height: 100%; max-width: 120px; object-fit: cover; border-radius: 4px; }
.ref-drop.has-file .ref-placeholder { display: none; }
.ref-remove {
  background: none; border: none; color: var(--error); cursor: pointer;
  font-size: 0.75rem; padding: 0.25rem 0; margin-top: 4px;
}

/* Buttons */
.btn {
  display: inline-block; padding: 0.6rem 1.5rem;
  border: none; border-radius: var(--radius);
  cursor: pointer; font-size: 0.875rem;
  text-decoration: none; text-align: center;
}
.btn.primary { background: var(--accent); color: #fff; margin-top: 0.75rem; width: 100%; }
.btn.primary:disabled { background: var(--surface-2); color: var(--text-muted); cursor: not-allowed; }
.btn.secondary { background: var(--surface-2); color: var(--text); }

/* Stepper */
.stepper { display: flex; gap: 0.25rem; margin-bottom: 1rem; }
.step-pill {
  flex: 1; padding: 0.4rem; text-align: center;
  font-size: 0.75rem; border-radius: var(--radius);
  background: var(--surface); color: var(--text-muted);
  transition: all 0.3s;
}
.step-pill.active { background: var(--accent); color: #fff; }
.step-pill.done { background: var(--success); color: #fff; }

/* Brain output */
.brain-output {
  background: var(--surface); border-radius: var(--radius);
  padding: 1rem; max-height: 300px; overflow-y: auto;
  font-size: 0.8rem; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
}

/* Tool badges */
.tool-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.tool-badge {
  padding: 0.25rem 0.75rem; border-radius: 20px;
  font-size: 0.7rem; background: var(--surface-2); color: var(--text-muted);
}
.tool-badge.running { background: var(--accent-dim); color: #fff; animation: pulse 1.5s infinite; }
.tool-badge.done { background: var(--success); color: #fff; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.gallery-slot {
  aspect-ratio: 1; background: var(--surface); border-radius: var(--radius);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.gallery-slot img { width: 100%; height: 100%; object-fit: cover; }
.gallery-slot .placeholder { color: var(--text-muted); font-size: 0.875rem; }

/* Actions */
#actions-section { display: flex; gap: 0.75rem; }
#actions-section.hidden { display: none !important; }

/* Error */
.error-banner {
  background: var(--error); color: #fff;
  padding: 0.75rem 1rem; border-radius: var(--radius);
  margin-top: 1rem; font-size: 0.875rem;
}
