/* ====================================================================
   IG Prompt Command Center — DNA
   Void ground, pumpkin brand (#ff5b1f), dodger accent (#1e90ff)
   Banned: decorative glassmorphism, gradient text, hero-metric template
   ==================================================================== */

:root {
  --cc-ground:        #08060f;
  --cc-surface:       #151022;
  --cc-inset:         #1a0b2e;
  --cc-brand:         #ff5b1f;
  --cc-brand-pale:    #ff7a47;
  --cc-brand-strong:  #cc4818;
  --cc-accent:        #1e90ff;
  --cc-ink:           #f3eeff;
  --cc-ink-body:      #e6e3f5;
  --cc-muted:         #8b84a8;
  --cc-faint:         #6a648a;
  --cc-hairline:      rgba(243, 238, 255, 0.10);
  --cc-hairline-soft: rgba(243, 238, 255, 0.06);
  --cc-nav-bg:        #0d0816;
  --cc-state-online:  var(--cc-accent);
  --cc-state-idle:    var(--cc-faint);
  --cc-state-error:   var(--cc-brand);
  --cc-state-working: #f5a623;
  --cc-radius:        4px;
  --cc-radius-lg:     6px;
  --cc-nav-h:         52px;
  --cc-status-h:      32px;
  --cc-gap:           1px;
  --cc-ease:          cubic-bezier(0.16, 1, 0.3, 1);
  --cc-vh:            100dvh;
  --cc-vh-fb:         100vh;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--cc-ground);
  color: var(--cc-ink-body);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: var(--cc-vh);
  height: var(--cc-vh-fb);
}
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
code, pre { font-family: "JetBrains Mono", ui-monospace, monospace; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--cc-hairline); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cc-muted); }

/* ===================================================================
   NAV
   =================================================================== */
.ds-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--cc-nav-h);
  background: var(--cc-nav-bg);
  border-bottom: 1px solid var(--cc-hairline);
  z-index: 10;
}
.nav-inner {
  height: 100%;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cc-brand);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
}
.nav-logo-mark { color: var(--cc-brand); flex-shrink: 0; }
.nav-center { text-align: center; }
.nav-breadcrumb {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--cc-muted);
}
.nav-actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; }
.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--cc-muted);
}

/* Live dot */
.ds-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cc-state-idle);
  flex-shrink: 0;
}
.ds-live-dot[data-state="online"] { background: var(--cc-state-online); }
.ds-live-dot[data-state="working"] { background: var(--cc-state-working); animation: pulse 1.5s ease-in-out infinite; }
.ds-live-dot[data-state="error"] { background: var(--cc-state-error); }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===================================================================
   BUTTONS
   =================================================================== */
.ds-btn {
  border: none;
  border-radius: var(--cc-radius);
  padding: 8px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  transition: background 0.15s var(--cc-ease), color 0.15s var(--cc-ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ds-btn--primary {
  background: var(--cc-brand);
  color: #fff;
}
.ds-btn--primary:hover { background: var(--cc-brand-pale); }
.ds-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }
.ds-btn--ghost {
  background: transparent;
  border: 1px solid var(--cc-hairline);
  color: var(--cc-ink-body);
}
.ds-btn--ghost:hover { border-color: var(--cc-muted); }
.ds-btn--large {
  width: 100%;
  padding: 14px 24px;
  font-size: 0.85rem;
}

/* ===================================================================
   LAYOUT
   =================================================================== */
.cc-main {
  position: fixed;
  top: var(--cc-nav-h);
  left: 0; right: 0; bottom: var(--cc-status-h);
  display: grid;
  grid-template-columns: 320px 1fr 1fr;
  gap: var(--cc-gap);
}
.cc-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cc-pane--left { background: var(--cc-surface); border-right: 1px solid var(--cc-hairline); }
.cc-pane--center { background: var(--cc-inset); border-right: 1px solid var(--cc-hairline); }
.cc-pane--right { background: var(--cc-surface); }
.cc-pane-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--cc-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.cc-pane-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--cc-ink);
}
.cc-pane-meta {
  font-size: 0.7rem;
  color: var(--cc-muted);
  letter-spacing: 0.05em;
}
.cc-pane-body { flex: 1; overflow-y: auto; padding: 20px; }

/* ===================================================================
   SECTIONS
   =================================================================== */
.cc-section { margin-bottom: 24px; }
.cc-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cc-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--cc-muted);
  text-transform: uppercase;
}
.cc-section-body { display: flex; flex-direction: column; gap: 10px; }

/* ===================================================================
   FORM ELEMENTS
   =================================================================== */
.cc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cc-field-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--cc-muted);
  text-transform: uppercase;
}
.cc-input, .cc-select, .cc-textarea {
  background: var(--cc-ground);
  border: 1px solid var(--cc-hairline);
  border-radius: var(--cc-radius);
  padding: 10px 12px;
  color: var(--cc-ink-body);
  font-size: 0.85rem;
  font-family: inherit;
  width: 100%;
  transition: border-color 0.15s var(--cc-ease);
}
.cc-input:focus, .cc-select:focus, .cc-textarea:focus {
  outline: none;
  border-color: var(--cc-accent);
}
.cc-textarea { resize: vertical; min-height: 60px; }
.cc-range {
  width: 100%;
  accent-color: var(--cc-brand);
}

.cc-radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cc-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--cc-hairline);
  border-radius: var(--cc-radius);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s var(--cc-ease);
}
.cc-radio:hover { border-color: var(--cc-muted); }
.cc-radio input { accent-color: var(--cc-brand); }
.cc-radio input:checked + span { color: var(--cc-brand); }

/* ===================================================================
   UPLOAD ZONE
   =================================================================== */
.cc-upload {
  border: 1px dashed var(--cc-hairline);
  border-radius: var(--cc-radius-lg);
  padding: 24px 16px;
  text-align: center;
  transition: border-color 0.15s var(--cc-ease);
  cursor: pointer;
}
.cc-upload:hover, .cc-upload.drag-over {
  border-color: var(--cc-brand);
  background: rgba(255, 91, 31, 0.03);
}
.cc-upload-icon { color: var(--cc-muted); margin-bottom: 8px; }
.cc-upload-text { font-size: 0.85rem; color: var(--cc-ink-body); }
.cc-upload-link {
  background: none;
  border: none;
  color: var(--cc-brand);
  font-weight: 600;
  text-decoration: underline;
  font-size: inherit;
}
.cc-upload-hint { font-size: 0.7rem; color: var(--cc-faint); margin-top: 4px; }

.cc-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.cc-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--cc-radius);
  overflow: hidden;
  border: 1px solid var(--cc-hairline);
}
.cc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cc-thumb-remove {
  position: absolute;
  top: 2px; right: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: none;
  color: #fff;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc-generate-wrap { padding-top: 8px; }

/* ===================================================================
   OUTPUT
   =================================================================== */
.cc-output { display: flex; flex-direction: column; gap: 16px; }
.cc-empty {
  text-align: center;
  padding: 48px 24px;
}
.cc-empty-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--cc-faint);
  margin-bottom: 8px;
}
.cc-empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--cc-ink);
  margin-bottom: 6px;
}
.cc-empty-hint {
  font-size: 0.8rem;
  color: var(--cc-muted);
  line-height: 1.5;
}
.cc-empty code {
  background: var(--cc-inset);
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 0.75rem;
}

/* Prompt cards */
.cc-prompt-card {
  background: var(--cc-inset);
  border: 1px solid var(--cc-hairline);
  border-radius: var(--cc-radius-lg);
  overflow: hidden;
}
.cc-prompt-card-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--cc-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cc-prompt-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cc-ink);
}
.cc-prompt-card-body {
  padding: 16px;
  position: relative;
}
.cc-prompt-card-body pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--cc-ink-body);
  margin: 0;
}
.cc-copy-btn {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--cc-surface);
  border: 1px solid var(--cc-hairline);
  color: var(--cc-muted);
  padding: 4px 10px;
  border-radius: var(--cc-radius);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  transition: color 0.15s var(--cc-ease), border-color 0.15s var(--cc-ease);
}
.cc-copy-btn:hover { color: var(--cc-accent); border-color: var(--cc-accent); }
.cc-copy-btn.copied { color: #4ade80; border-color: #4ade80; }

/* ===================================================================
   STATUS BAR
   =================================================================== */
.cc-status {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--cc-status-h);
  background: var(--cc-nav-bg);
  border-top: 1px solid var(--cc-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 0.7rem;
  color: var(--cc-muted);
  letter-spacing: 0.05em;
}
.cc-status-right { display: flex; align-items: center; gap: 12px; }

/* ===================================================================
   TOAST
   =================================================================== */
.cc-toast {
  position: fixed;
  bottom: calc(var(--cc-status-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--cc-surface);
  border: 1px solid var(--cc-hairline);
  border-radius: var(--cc-radius);
  padding: 10px 20px;
  font-size: 0.8rem;
  color: var(--cc-ink-body);
  z-index: 20;
  animation: toast-in 0.2s var(--cc-ease);
}
.cc.toast.hidden { display: none; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
