/* Generator UI — extends theme.css */

.gen-body { background: var(--bg); }

.gen-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12,13,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
}

.gen-nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.gen-logo {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--fg);
  text-decoration: none;
}

.gen-nav-tag {
  font-size: 12px;
  color: var(--fg-3);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
}

.generator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 64px);
  gap: 0;
}

.gen-panel {
  padding: 60px 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.gen-panel--input {
  border-right: 1px solid var(--border);
  background: var(--bg);
}

.gen-panel--preview {
  background: var(--bg-2);
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.gen-panel-header { padding-top: 12px; }

.gen-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 10px;
  line-height: 1.2;
}

.gen-subtitle {
  font-size: 15px;
  color: var(--fg-2);
  line-height: 1.6;
}

.gen-form { display: flex; flex-direction: column; gap: 24px; }

.gen-field { display: flex; flex-direction: column; gap: 8px; }

.gen-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.02em;
}

.gen-textarea {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--fg);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  padding: 14px 16px;
  resize: vertical;
  transition: border-color 0.2s;
  line-height: 1.55;
}

.gen-textarea:focus {
  outline: none;
  border-color: var(--accent-border);
}

.gen-textarea::placeholder { color: var(--fg-3); }

.gen-hint { font-size: 12px; color: var(--fg-3); line-height: 1.5; }

/* Voice buttons */
.gen-voice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.gen-voice-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
  color: var(--fg-2);
}

.gen-voice-btn:hover { border-color: var(--accent-border); }
.gen-voice-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--fg);
}

.gen-voice-name { display: block; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.gen-voice-desc { display: block; font-size: 12px; color: var(--fg-3); }
.gen-voice-btn.active .gen-voice-desc { color: var(--accent); }

/* Primary button */
.gen-btn-primary {
  background: var(--accent);
  color: #0c0d0f;
  border: none;
  border-radius: var(--radius);
  padding: 16px 24px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
}

.gen-btn-primary:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.gen-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.gen-btn-spinner { font-size: 14px; }

/* Steps */
.gen-steps { display: flex; flex-direction: column; gap: 2px; }

.gen-step {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.gen-step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.gen-step-icon--pending { background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--fg-3); }
.gen-step-icon--active { background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent); }
.gen-step-icon--done { background: var(--accent); color: #0c0d0f; }

.gen-step-name { font-size: 14px; font-weight: 600; color: var(--fg); }
.gen-step-desc { font-size: 12px; color: var(--fg-3); }

/* Script preview */
.gen-script-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.gen-script-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.gen-script-text {
  font-size: 15px;
  color: var(--fg-2);
  line-height: 1.65;
}

/* Preview panel */
.gen-preview-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--fg-3);
  font-size: 15px;
  min-height: 300px;
}

.gen-preview-empty svg { opacity: 0.3; }

.gen-video {
  width: 100%;
  border-radius: var(--radius);
  background: #000;
  max-height: 340px;
  object-fit: contain;
}

.gen-audio { width: 100%; margin-top: 12px; }

.gen-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.gen-gallery-item { display: flex; flex-direction: column; gap: 6px; }

.gen-gallery-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.gen-gallery-placeholder {
  aspect-ratio: 16/9;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--fg-3);
}

.gen-gallery-caption {
  font-size: 11px;
  color: var(--fg-3);
  line-height: 1.4;
}

/* Download section */
.gen-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  margin-top: 8px;
}

.gen-download-format { font-size: 13px; font-weight: 600; color: var(--fg); }
.gen-download-size { font-size: 12px; color: var(--fg-3); margin-top: 3px; }

.gen-btn-download {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0c0d0f;
  border: none;
  border-radius: var(--radius);
  padding: 12px 20px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.gen-btn-download:hover { opacity: 0.85; }

@media (max-width: 900px) {
  .generator-layout { grid-template-columns: 1fr; }
  .gen-panel--input { border-right: none; border-bottom: 1px solid var(--border); }
  .gen-panel--preview { position: static; height: auto; }
  .gen-nav { padding: 0 24px; }
  .gen-panel { padding: 40px 24px; }
}