:root {
  --bg: #fafbfc;
  --bg-card: #ffffff;
  --bg-soft: #f3f4f6;
  --border: #e2e6eb;
  --border-focus: #2563eb;
  --text: #111827;
  --text-muted: #6b7280;
  --btn-bg: #111827;
  --btn-hover: #1f2937;
  --accent: #2563eb;
  --success: #059669;
  --error: #dc2626;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Modo escuro — página de criação */
[data-theme="dark"] {
  --bg: #0f0f12;
  --bg-card: #16161a;
  --bg-soft: #1e1e22;
  --border: #2a2a30;
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --btn-bg: #27272a;
  --btn-hover: #3f3f46;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
}

[data-theme="dark"] .prompt-create-card,
[data-theme="dark"] .prompt-field-wrap,
[data-theme="dark"] .prompt-intro-box {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .config-card-value { color: #93c5fd; }

[data-theme="dark"] .prompt-field-wrap { background: var(--bg-soft); border-color: var(--border); }
[data-theme="dark"] .prompt-hero textarea { background: transparent; color: var(--text); }
[data-theme="dark"] .prompt-actions-inside { border-top-color: var(--border); }
[data-theme="dark"] .config-section-content,
[data-theme="dark"] .config-main-options,
[data-theme="dark"] .config-card { background: var(--bg-card); border-color: var(--border); }
[data-theme="dark"] .config-card-select,
[data-theme="dark"] select { background: var(--bg-soft); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .user-menu-dropdown { background: var(--bg-card); border-color: var(--border); }
[data-theme="dark"] .output-result-card { background: var(--bg-card); border-color: var(--border); }
[data-theme="dark"] .file-upload-area { background: var(--bg-soft); border-color: var(--border); }
[data-theme="dark"] .file-upload-text { color: var(--text); }
[data-theme="dark"] .file-upload-hint,
[data-theme="dark"] .file-upload-icon { color: var(--text-muted); opacity: 0.9; }
[data-theme="dark"] .prompt-intro-text,
[data-theme="dark"] .config-card-label { color: var(--text); }

/* Cartão "Pronto em ~30 a 60 segundos" */
[data-theme="dark"] .model-processing-time {
  background: var(--bg-soft);
  border-color: var(--border);
  box-shadow: none;
}
[data-theme="dark"] .model-processing-time .model-processing-icon { color: #60a5fa; opacity: 1; }
[data-theme="dark"] .model-processing-time .model-processing-text { color: var(--text); }
[data-theme="dark"] .model-processing-time .model-processing-time-value { color: #93c5fd; }
[data-theme="dark"] .model-processing-time .model-processing-desc { color: var(--text-muted); }

/* Ícones e chevrons nos config cards */
[data-theme="dark"] .config-card-icon { color: var(--text); opacity: 1; }
[data-theme="dark"] .config-card-chevron { color: var(--text-muted); }
[data-theme="dark"] .config-card:hover { border-color: rgba(255,255,255,0.15); }

/* CTA Copiar Movimento */
[data-theme="dark"] .copiar-danca-cta {
  background: var(--bg-card);
  border-color: var(--border);
}
[data-theme="dark"] .copiar-danca-cta-label { color: var(--text); }
[data-theme="dark"] .copiar-danca-cta-btn {
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] .copiar-danca-cta-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text);
  border-color: var(--border);
}

/* Botão câmera (imagem de referência) */
[data-theme="dark"] .btn-add-ref {
  background: var(--bg-soft);
  color: var(--text-muted);
  border-color: var(--border);
}
[data-theme="dark"] .btn-add-ref:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

/* Botão GERAR VÍDEO — destaque em modo escuro */
[data-theme="dark"] .btn-generate,
[data-theme="dark"] .btn-generate-inline {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(37,99,235,0.4);
}
[data-theme="dark"] .btn-generate:hover:not(:disabled),
[data-theme="dark"] .btn-generate-inline:hover:not(:disabled) {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}
[data-theme="dark"] .prompt-actions-inside:not(.has-prompt) .btn-generate-inline {
  background: rgba(37,99,235,0.35);
  color: rgba(255,255,255,0.9);
}
[data-theme="dark"] .prompt-actions-inside:not(.has-prompt) .btn-generate-inline:hover {
  background: rgba(37,99,235,0.5);
}

/* Como funciona */
[data-theme="dark"] .mode-howto-compact,
[data-theme="dark"] .mode-howto-standalone { border-color: var(--border); }
[data-theme="dark"] .mode-howto-compact .mode-howto-list { border-top-color: var(--border); color: var(--text-muted); }
[data-theme="dark"] details.mode-howto-standalone { background: var(--bg-card); border-color: var(--border); }
[data-theme="dark"] .mode-howto-standalone summary { color: var(--text); }
[data-theme="dark"] .motion-como-fazer-try { border-color: var(--border); background: var(--bg-card); }
[data-theme="dark"] .motion-como-fazer-try-text strong { color: var(--text); }

/* Placeholder e texto animado do textarea — alta legibilidade */
[data-theme="dark"] .prompt-hero textarea::placeholder { color: var(--text-muted); opacity: 0.9; }
[data-theme="dark"] .prompt-placeholder-animated { color: rgba(255,255,255,0.5); }

/* Ícones dados e microfone — mais visíveis no escuro */
[data-theme="dark"] .prompt-dice-btn,
[data-theme="dark"] .prompt-erase-btn {
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
}
[data-theme="dark"] .prompt-dice-btn:hover,
[data-theme="dark"] .prompt-erase-btn:hover {
  background: rgba(255,255,255,0.14);
  color: var(--text);
}
[data-theme="dark"] .prompt-mic-btn {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--text-muted);
}
[data-theme="dark"] .prompt-mic-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text);
  border-color: rgba(255,255,255,0.15);
}

/* Bordas mais suaves no card principal */
[data-theme="dark"] .prompt-create-card {
  border: 1px solid rgba(255,255,255,0.06);
}
[data-theme="dark"] .prompt-intro-box {
  border-bottom-color: rgba(255,255,255,0.06);
}

/* Section config expandida */
[data-theme="dark"] .config-section-content { background: var(--bg-card); }
[data-theme="dark"] .config-section-header { color: var(--text); }
[data-theme="dark"] .config-section-icon,
[data-theme="dark"] .config-section-chevron { color: var(--text-muted); }

/* Botão + (add ref compacto) */
[data-theme="dark"] .btn-attach-plus {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--text-muted);
}
[data-theme="dark"] .btn-attach-plus:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text);
}

/* Toggle tema — ícone mais visível no escuro */
[data-theme="dark"] .btn-theme-toggle {
  color: var(--text-muted);
}
[data-theme="dark"] .btn-theme-toggle:hover {
  color: var(--text);
  background: rgba(255,255,255,0.1);
}

/* History / Seus vídeos */
[data-theme="dark"] .history-download-hint,
[data-theme="dark"] .history-browser-hint,
[data-theme="dark"] .history-hint { color: var(--text-muted); }
[data-theme="dark"] .history-filter-input { background: var(--bg-soft); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .history-date-filter { background: var(--bg-soft); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .creation-item { background: var(--bg-card); }
[data-theme="dark"] .creation-actions-row .btn-copy-link { background: #2563eb; color: white; border: none; }
[data-theme="dark"] .creation-actions-row .btn-copy-link:hover { background: #1d4ed8; color: white; }
[data-theme="dark"] .creations-empty p,
[data-theme="dark"] .creations-empty .history-hint { color: var(--text-muted); }

* { box-sizing: border-box; }

/* Banner persistente: vídeo em geração — avisa até concluir ou cancelar (z-index < modais 2000) */
.generating-banner {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.generating-banner.hidden { display: none !important; }
.generating-banner-icon { font-size: 1.2rem; }
.generating-banner-text { flex: 1; text-align: center; max-width: 560px; }

/* Banner: vídeo em criação — aviso quando deslogado (sobrevive a limpar cache) */
.pending-task-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  margin: 0 -24px 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: 10px;
  color: #92400e;
}
.pending-task-banner.hidden { display: none !important; }
.pending-task-banner-icon { font-size: 1.5rem; flex-shrink: 0; }
.pending-task-banner-text { flex: 1; margin: 0; font-size: 0.95rem; line-height: 1.4; }
.pending-task-banner-btn {
  flex-shrink: 0;
  padding: 10px 18px;
  background: #f59e0b;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}
.pending-task-banner-btn:hover { background: #d97706; color: white; }

/* Banner: plano cancelado — aviso até data de encerramento */
.plan-cancelled-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #f87171;
  border-radius: 10px;
  color: #991b1b;
}
.plan-cancelled-banner.hidden { display: none !important; }
.plan-cancelled-icon { font-size: 1.3rem; flex-shrink: 0; }
.plan-cancelled-text { flex: 1; margin: 0; font-size: 0.95rem; line-height: 1.4; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-top: 64px;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
body.has-generating-banner { padding-top: 108px; }

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header — clean, minimal, alinhado ao conteúdo, nunca corta em nenhum aparelho */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 28px;
  padding: max(16px, env(safe-area-inset-top)) 0 16px;
  padding-left: max(28px, calc((100vw - 720px) / 2 + 28px), env(safe-area-inset-left));
  padding-right: max(28px, calc((100vw - 720px) / 2 + 28px), env(safe-area-inset-right));
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: visible;
  box-sizing: border-box;
}
@media (max-width: 560px) {
  .header {
    gap: 12px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .header-right { gap: 10px; }
  .header-credits-wrap { padding: 0 6px 0 8px; }
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo:hover { color: var(--text); }

.logo-icon { color: var(--text); }

.logo-text { font-weight: 600; }

/* Header right: theme + credits + user */
.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.btn-theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.btn-theme-toggle:hover {
  color: var(--text);
  background: var(--bg-soft);
}
.btn-theme-toggle .theme-icon { display: flex; align-items: center; justify-content: center; }
.btn-theme-toggle .theme-icon.hidden { display: none !important; }

/* Notificações in-app (sininho) — estilo SaaS */
.header-notify-wrap {
  position: relative;
  flex-shrink: 0;
}
.header-notify-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.header-notify-btn:hover {
  color: var(--text);
  background: var(--bg-card);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}
.header-notify-icon { display: block; }
.header-notify-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.45);
}
/* Sininho estilo “tem novidade” — ponto vermelho (admin + dicas inteligentes) */
.header-notify-badge.header-notify-badge--dot {
  min-width: 0;
  width: 9px;
  height: 9px;
  padding: 0;
  font-size: 0;
  line-height: 0;
  color: transparent;
  overflow: hidden;
  background: #ef4444;
  box-shadow: 0 0 0 2px var(--bg-card, #fff);
  border: none;
}
.header-notify-badge.hidden { display: none !important; }
.header-notify-panel {
  /* Posição e largura definidas em JS (fixed + alinhado ao sininho) — evita painel “largo demais” e cortado à esquerda */
  position: fixed;
  width: min(300px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  max-height: min(380px, calc(100vh - 80px));
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.06),
    0 20px 40px -12px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(99, 102, 241, 0.06);
  z-index: 1001;
  overflow: hidden;
  animation: headerNotifyPanelIn 0.22s ease-out;
}
@keyframes headerNotifyPanelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.header-notify-panel.hidden { display: none !important; }
.header-notify-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-card) 100%);
}
.header-notify-panel-title {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-notify-markall {
  flex-shrink: 0;
  border: none;
  background: none;
  padding: 4px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent, #6366f1);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
  white-space: nowrap;
}
.header-notify-markall:hover {
  background: rgba(99, 102, 241, 0.1);
}
.header-notify-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.header-notify-empty {
  padding: 20px 14px;
  text-align: center;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-muted);
  word-break: break-word;
  hyphens: auto;
}
.header-notify-empty.hidden { display: none !important; }
.header-notify-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.header-notify-item:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.header-notify-item-unread {
  border-left: 3px solid #6366f1;
  padding-left: 11px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.06) 0%, var(--bg-card) 48%);
}
.header-notify-item-smart.header-notify-item-unread {
  border-left-color: #f59e0b;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.08) 0%, var(--bg-card) 50%);
}
.header-notify-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.header-notify-item-body {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}
.header-notify-item-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.85;
  margin-top: 2px;
}

.header-credits-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 6px 10px;
}

.header-credits {
  display: flex;
  align-items: center;
  gap: 6px;
}

.credits-icon {
  flex-shrink: 0;
  font-size: 1em;
  line-height: 1;
}
.credits-icon-coin {
  display: inline-flex;
  align-items: center;
}
.credits-icon-coin svg {
  width: 18px;
  height: 18px;
  display: block;
  opacity: 0.9;
}

.credits-count {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  transition: transform 0.2s ease, color 0.2s ease;
}

.header-credits-wrap.credits-just-decreased .credits-count {
  animation: creditsDeductPulse 0.7s ease-out;
}

@keyframes creditsDeductPulse {
  0% { transform: scale(1); color: var(--text); }
  30% { transform: scale(1.35); color: var(--accent, #ff6b4a); }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); color: var(--text); }
}

.credits-deduct-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent, #ff6b4a);
  background: rgba(255, 107, 74, 0.15);
  padding: 2px 6px;
  border-radius: 6px;
  animation: creditsDeductBadge 1.2s ease-out forwards;
  pointer-events: none;
}

@keyframes creditsDeductBadge {
  0% { opacity: 0; transform: translateY(4px) scale(0.8); }
  20% { opacity: 1; transform: translateY(0) scale(1.1); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-6px) scale(0.9); }
}

.credits-label {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
}

.btn-add-credits {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.btn-add-credits:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* User avatar + dropdown menu */
.user-menu-wrap {
  position: relative;
}

.user-avatar-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border: 2px solid var(--border);
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.user-menu-wrap.has-avatar .user-avatar-img {
  display: block;
}

.user-avatar-initial {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.user-menu-wrap.has-initial .user-avatar-initial {
  display: flex;
}

.user-avatar-fallback {
  color: var(--text-muted);
  opacity: 0.8;
}

.user-menu-wrap.has-avatar .user-avatar-fallback,
.user-menu-wrap.has-initial .user-avatar-fallback {
  display: none;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 12px 0;
  z-index: 1600;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.user-menu-dropdown.hidden {
  display: none !important;
}

.user-menu-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.user-menu-user.hidden {
  display: none !important;
}

.user-menu-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--btn-bg);
}

.user-menu-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.user-menu-user.has-img .user-menu-avatar {
  display: block;
}

.user-menu-initial {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
}

.user-menu-user.has-img .user-menu-initial {
  display: none;
}

.user-menu-user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-menu-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-email {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s;
}

.user-menu-item:hover {
  background: var(--bg-soft);
}

.user-menu-theme-toggle .theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-menu-theme-toggle .theme-icon.hidden {
  display: none !important;
}

.user-menu-plan-row {
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(34, 197, 94, 0.08);
  margin: 4px 12px;
  border-radius: 8px;
}

.user-menu-plan-row.hidden {
  display: none !important;
}

.user-menu-credits-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.user-menu-credits-row .credits-icon-coin {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}
.user-menu-credits-row .credits-icon-coin svg {
  display: block;
}
.user-menu-credits-row #userMenuCredits {
  font-weight: 600;
  color: var(--text);
}

.user-menu-logout.hidden,
.user-menu-login.hidden {
  display: none !important;
}

.hamburger-btn {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: 0.2s ease;
}

.hamburger-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }

.hamburger-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hamburger menu overlay */
.hamburger-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.hamburger-overlay.open {
  opacity: 1;
  visibility: visible;
}

.hamburger-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 85vw);
  background: var(--bg-card);
  box-shadow: -4px 0 24px rgba(0,0,0,0.08);
  z-index: 1501;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  padding: 80px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hamburger-overlay.open .hamburger-panel {
  transform: translateX(0);
}

.hamburger-panel a,
.hamburger-panel button.hamburger-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background 0.2s;
}

.hamburger-panel a:hover,
.hamburger-panel button.hamburger-item:hover {
  background: var(--bg-soft);
}

.hamburger-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: -8px -8px 8px -8px;
  border-radius: 8px;
  background: var(--bg-soft);
}

.hamburger-user.hidden {
  display: none !important;
}

.hamburger-user-avatar-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--btn-bg);
}

.hamburger-user-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hamburger-user-avatar-wrap .hamburger-user-avatar {
  display: none;
}

.hamburger-user-avatar-wrap.has-img .hamburger-user-avatar {
  display: block;
}

.hamburger-user-avatar-wrap.has-img .hamburger-user-initial {
  display: none;
}

.hamburger-user-initial {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

.hamburger-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hamburger-user-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hamburger-user-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.9;
}

.hamburger-logout {
  margin-left: auto;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.hamburger-logout:hover {
  color: var(--text);
  border-color: var(--text-muted);
  background: var(--bg-soft);
}

.hamburger-plan-row {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
}
.hamburger-plan-row.hidden { display: none; }

.hamburger-panel .credits-row {
  margin-top: auto;
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hamburger-panel .powered {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
}

/* Título e modos — minimalista, sem caixa */
.create-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.create-header-modes {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.create-header-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
}
.copiar-danca-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  margin-top: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.copiar-danca-cta-label {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.4;
  flex: 1;
}
.copiar-danca-cta-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.copiar-danca-cta-btn:hover {
  background: #cbd5e1;
  color: #475569;
  border-color: rgba(0,0,0,0.3);
}
.create-header-below-results {
  margin-top: 32px;
  margin-bottom: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border, #e2e8f0);
}
.create-header-imitar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}
.create-header-imitar-text {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text, #111827);
  line-height: 1.5;
}
.create-header-imitar-text strong {
  font-weight: 700;
  color: #047857;
}
.btn-imitar-movimento {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: #000;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  transition: background 0.2s, transform 0.15s;
  align-self: flex-start;
}
.btn-imitar-movimento:hover {
  background: #1a1a1a;
  color: #fff;
  transform: translateY(-1px);
}
.btn-imitar-icon {
  font-size: 1.2em;
}
.create-header-imitar .btn-imitar-movimento {
  background: #000;
  color: #fff;
}
.create-header-imitar .btn-imitar-movimento:hover {
  background: #1a1a1a;
  color: #fff;
}

.create-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.mode-segmented {
  display: flex;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.mode-seg-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s ease;
  min-height: 44px;
}

.mode-seg-item:hover {
  color: var(--text);
}

.mode-seg-item.active {
  background: var(--btn-bg);
  border: 1px solid var(--btn-bg);
  color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.mode-seg-item.active:hover {
  background: var(--btn-hover);
  border-color: var(--btn-hover);
  color: white;
}

.mode-seg-icon {
  font-size: 1.1rem;
  opacity: 0.95;
}

.mode-seg-text {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .mode-seg-text { font-size: 0.85rem; }
  .mode-seg-item { padding: 10px 12px; gap: 6px; }
}

.mode-switcher {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
}

.mode-switcher-inline {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.create-tab-box .mode-switcher-inline .mode-btn {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 500;
}

.mode-switcher .mode-btn,
.mode-switcher-inline .mode-btn {
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mode-btn-icon {
  font-size: 1rem;
  opacity: 0.9;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 36px;
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
}

/* Divisões entre seções */
.section-result,
.section-como-fazer,
.section-creations,
.section-samples {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.section-create { scroll-margin-top: 80px; }

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: #4b5563;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s, color 0.2s, background 0.2s;
  box-shadow: var(--shadow-sm);
  border-radius: 10px;
}

.mode-btn:hover {
  color: var(--text);
  border-color: #c4cad4;
  background: var(--bg-card);
}

.mode-btn:active {
  transform: scale(0.98);
}

.mode-btn.active {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: white;
  box-shadow: 0 2px 6px rgba(17,24,39,0.2);
}

.mode-btn.active:hover {
  color: white;
  border-color: var(--btn-bg);
  background: var(--btn-hover);
}

/* Create form */
.section-create {
  padding: 0;
}

.create-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Fluxo: Prompt protagonista → Sugestões → Opções → Botão */
.create-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.prompt-hero {
  margin-bottom: 0;
}
.prompt-create-card .prompt-hero {
  margin-bottom: 0;
}

.prompt-field-wrap {
  position: relative;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.02);
  transition: box-shadow 0.25s ease, border-color 0.2s ease;
  overflow: hidden;
}

.prompt-field-wrap:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.03);
}

.prompt-field-wrap:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 8px 28px rgba(37,99,235,0.12), 0 0 0 2px rgba(37,99,235,0.15);
}

.prompt-powered {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.8;
  letter-spacing: 0.03em;
  pointer-events: none;
}

.prompt-hero textarea {
  width: 100%;
  padding: 20px 24px 12px;
  background: transparent;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  box-sizing: border-box;
}
@media (min-width: 480px) {
  .prompt-hero textarea { font-size: 0.9rem; }
}
.prompt-field-wrap:has(.prompt-dice-btn) textarea,
.prompt-create-card .prompt-hero textarea {
  padding-right: 48px;
}
.prompt-field-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prompt-erase-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(17,24,39,0.06);
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.prompt-erase-btn:hover {
  background: rgba(17,24,39,0.12);
  color: var(--text, #111827);
}
.prompt-erase-btn.empty {
  opacity: 0;
  pointer-events: none;
}
.prompt-mic-wrap {
  position: relative;
  flex-shrink: 0;
}
.prompt-mic-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.prompt-mic-btn:hover {
  background: rgba(17,24,39,0.08);
  color: var(--text, #111827);
  border-color: rgba(0,0,0,0.15);
}
.prompt-mic-btn.recording {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
  border-color: rgba(239,68,68,0.3);
  animation: mic-pulse 1s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
.mic-listening-label {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(239,68,68,0.92);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
  animation: mic-label-fade-in 0.2s ease;
}
.mic-listening-label.hidden { display: none; }
@keyframes mic-label-fade-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.prompt-hero textarea::placeholder {
  color: transparent;
}


.prompt-placeholder-animated {
  position: absolute;
  top: 20px;
  left: 24px;
  right: 24px;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(107, 114, 128, 0.45);
  pointer-events: none;
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-field-wrap:focus-within .prompt-placeholder-animated,
.prompt-field-wrap.has-value .prompt-placeholder-animated {
  display: none !important;
}

.prompt-hero textarea:focus {
  outline: none;
}

.prompt-field-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.prompt-suggestions-inline {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 2px;
  order: -1;
}
/* Prompts prontos — 4 chips preenchem o espaço sem sobrar */
.prompt-field-bar .prompt-suggestions-inline {
  width: 100%;
  flex: 1 1 100%;
  overflow: visible;
}
.prompt-field-bar .prompt-suggestions-inline .chip-inline {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}
.chip-inline {
  flex-shrink: 0;
  padding: 4px 8px;
  font-size: 0.72rem;
  white-space: nowrap;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.chip-inline:hover {
  background: rgba(0,0,0,0.07);
  color: var(--text);
  border-color: rgba(0,0,0,0.1);
}

.prompt-field-bar .btn-clear-prompt {
  order: 1;
  background: none;
  border: none;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 4px;
  opacity: 0.8;
  transition: opacity 0.2s, color 0.2s;
}

.prompt-field-bar .btn-clear-prompt:hover {
  opacity: 1;
  color: var(--text);
}

.btn-clear-prompt {
  opacity: 1;
  transition: opacity 0.25s ease, color 0.2s;
}
.btn-clear-prompt.empty {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.prompt-suggestions {
  margin-bottom: 12px;
  transition: opacity 0.2s ease;
}
.prompt-suggestions-above {
  margin-bottom: 10px;
  margin-top: 0;
}
.prompt-suggestions .suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.prompt-suggestions-above .suggestion-chips {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.prompt-suggestions-above .suggestion-chips-inline {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px;
}

.suggestion-theme {
  margin-bottom: 14px;
}

.suggestion-theme:last-child {
  margin-bottom: 0;
}

.suggestion-theme-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.suggestion-chips-2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

/* 4 caixinhas de tema — estilo Sugestões Rápidas */
.prompt-suggestions-themes .suggestions-label {
  margin-bottom: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.suggestion-theme-boxes {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.suggestion-theme-box {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.suggestion-theme-box:hover {
  background: #f1f5f9;
  border-color: #374151;
  color: #111827;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

@media (max-width: 520px) {
  .suggestion-theme-boxes {
    flex-wrap: wrap;
  }
  .suggestion-theme-box {
    flex: 1 1 calc(50% - 5px);
    min-width: 100px;
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  border: 0 !important;
}

.prompt-suggestions .suggestions-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.02em;
}

.create-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 10%, var(--border) 90%, transparent);
  margin: 0 0 12px;
  opacity: 0.7;
}

/* Config cards — 2 por linha, estilo print (ícone, label, valor, chevron) */
.config-main-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.config-main-options .mode-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.config-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 12px;
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: visible;
  touch-action: manipulation;
}

.config-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.config-card:hover {
  border-color: #374151;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.config-card-icon {
  flex-shrink: 0;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}
.config-card-icon svg {
  width: 18px;
  height: 18px;
}

.config-card-content {
  flex: 1;
  min-width: 0;
}

.config-card-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1px;
}

.config-card-value {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #111827;
}

.config-card-chevron {
  flex-shrink: 0;
  font-size: 1.2rem;
  font-weight: 300;
  color: #9ca3af;
}

.config-card-select {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  font-size: 16px;
  touch-action: manipulation;
}

.config-card-model {
  padding: 6px 12px 8px;
}
.config-card-model .config-card-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.config-card-model .model-notice-veo-wrap,
.config-card-model .model-notice-sora {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  width: 100%;
}

.config-card .model-notice {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.video-maintenance-notice {
  margin: 6px 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.08);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.4;
}

/* Descrição do modelo: linha abaixo do nome, dentro do card (caixa mais fina) */
.model-desc-row {
  margin-top: 3px;
  margin-bottom: 0;
}
.model-desc-row .model-desc-text {
  display: block;
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-muted, #6b7280);
  font-weight: 400;
}
.model-desc-row .model-desc-text:empty { display: none; }

/* Descrição do modelo: abaixo dos quadrados de configuração */
.model-desc-below {
  margin-top: 10px;
  margin-bottom: 0;
  padding: 0;
}
.model-desc-below .model-desc-text {
  display: block;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted, #6b7280);
  font-weight: 400;
}
.model-desc-below .model-desc-text:empty { display: none; }

/* Tempo de processamento e descrição: "Seu vídeo ficará pronto em..." abaixo dos quadrados */
.model-processing-time {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.model-processing-time .model-processing-icon {
  flex-shrink: 0;
  color: #3b82f6;
  opacity: 0.85;
  margin-top: 1px;
}
.model-processing-time .model-processing-icon svg {
  display: block;
}
.model-processing-time .model-processing-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.model-processing-time .model-processing-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text, #374151);
  font-weight: 400;
}
.model-processing-time .model-processing-time-value {
  color: #1d4ed8;
  font-weight: 600;
}
.model-processing-time .model-processing-desc {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted, #6b7280);
  font-weight: 400;
}
.model-processing-time .model-processing-desc:empty { display: none; }
/* Fora do bloco unificado de geração (`.prompt-unified-block`) — caixa própria com respiro */
.model-processing-time--outside-generation {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box;
}
[data-theme="dark"] .model-processing-time--outside-generation {
  background: var(--bg-soft);
  border-color: var(--border);
  box-shadow: none;
}
/* Página /imitar-movimento/ — faixa de tempo entre configs e uploads */
.motion-page-estimated-time {
  margin-bottom: 16px;
}

.model-description-wrap {
  margin-top: 8px;
  margin-bottom: 2px;
  padding: 10px 12px;
  background: var(--bg-soft, #f8fafc);
  border-radius: 8px;
  border-left: 3px solid var(--border, #e2e8f0);
}
.model-desc-title {
  margin: 0 0 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  line-height: 1.3;
}
.model-description-wrap .model-desc-text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted, #6b7280);
  font-weight: 400;
}
.model-description-wrap .model-desc-title:empty,
.model-description-wrap .model-desc-text:empty { display: none; }

.motion-orientation-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: -4px 0 12px;
  line-height: 1.4;
}

/* Upload ref minimalista (estilo ChatGPT): preview pequeno + botão + ao lado de Gerar */
.ref-inline-minimal .config-ref-wrap-legacy {
  display: none !important;
}
.ref-inline-minimal .prompt-actions-inside {
  flex-direction: column;
  align-items: stretch;
}
.ref-mini-row {
  width: 100%;
  margin-bottom: 10px;
}
.ref-mini-row.hidden { display: none !important; }
.ref-preview-mini {
  position: relative;
  display: inline-block;
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--bg-soft, #f1f5f9);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.ref-preview-mini.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.75);
  border-radius: 12px;
  z-index: 1;
}
.ref-preview-mini.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 3px solid #e5e7eb;
  border-top-color: #059669;
  border-radius: 50%;
  animation: ref-mini-spin 0.7s linear infinite;
  z-index: 2;
}
@keyframes ref-mini-spin {
  to { transform: rotate(360deg); }
  overflow: hidden;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--bg-soft, #f1f5f9);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.ref-mini-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ref-mini-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.ref-mini-remove:hover { background: rgba(0,0,0,0.85); }
.prompt-actions-buttons {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.ref-inline-minimal .prompt-actions-buttons {
  align-items: center;
  flex-wrap: nowrap;
}
.ref-inline-minimal .btn-add-ref-wrap,
.ref-inline-minimal .prompt-mic-wrap {
  display: inline-flex;
  align-items: center;
  align-self: center;
}
.ref-inline-minimal .btn-generate-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}
.prompt-actions-buttons .btn-generate-inline {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: 100%;
  flex-wrap: nowrap;
  gap: 8px;
}
.prompt-actions-buttons .btn-generate-inline #btnGenerateText {
  white-space: nowrap;
}
.prompt-actions-buttons .btn-generate-inline .btn-generate-credits {
  flex-shrink: 0;
  white-space: nowrap;
}
.btn-add-ref-wrap {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ref-upload-hint-ring {
  position: absolute;
  inset: -8px;
  border-radius: 14px;
  border: 2px solid rgba(37, 99, 235, 0.6);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
}
.btn-add-ref-wrap.ref-required-highlight .ref-upload-hint-ring {
  opacity: 1;
  animation: ref-upload-ring-pulse 2s ease-in-out infinite;
}
@keyframes ref-upload-ring-pulse {
  0%, 100% { transform: scale(1); border-color: rgba(37, 99, 235, 0.7); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.3); }
  50% { transform: scale(1.03); border-color: rgba(37, 99, 235, 0.9); box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.15); }
}
.prompt-actions-ref-hint {
  width: 100%;
  margin: 6px 0 0;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text-muted, #6b7280);
  background: rgba(37, 99, 235, 0.06);
  border-radius: 8px;
  border-left: 3px solid rgba(37, 99, 235, 0.5);
}
.prompt-actions-ref-hint:not(.hidden) {
  order: 10;
}
.btn-add-ref {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  color: var(--text-muted, #6b7280);
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-add-ref:hover {
  background: var(--bg-soft, #f5f5f5);
  color: var(--text, #1a1a1a);
  border-color: var(--text-muted, #9ca3af);
}
.btn-add-ref.ref-required-ring {
  position: relative;
  animation: ref-required-pulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.5);
}
.btn-add-ref.ref-required-ring::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 12px;
  border: 2px solid rgba(37, 99, 235, 0.8);
  pointer-events: none;
  animation: ref-required-ring 1.2s ease-in-out infinite;
}
@keyframes ref-required-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.25); }
}
@keyframes ref-required-ring {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

/* Imagem de Referência — label como no print */
.config-ref-wrap {
  margin-top: 8px;
  margin-bottom: 6px;
}

.config-ref-slots {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}
.config-ref-slots .file-upload {
  flex: 1 1 0;
  min-width: 0;
}
@media (max-width: 520px) {
  .config-ref-slots { gap: 6px; }
  .config-ref-slots .file-upload { flex: 1 1 0; min-width: 0; }
  .config-ref-wrap .file-upload-area { padding: 10px 6px; min-height: 64px; }
  .config-ref-wrap .file-upload-icon svg { width: 18px; height: 18px; }
  .config-ref-wrap .file-upload-text { font-size: 0.75rem; }
  .config-ref-wrap .file-upload-hint { font-size: 0.65rem; }
  .config-ref-wrap .file-preview-motion .motion-preview-wrap { min-width: 0; max-width: 100%; }
}

.config-ref-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text, #111827);
  margin-bottom: 8px;
}

.config-ref-optional {
  font-weight: 400;
  color: var(--text-muted);
}

.config-ref-wrap .file-upload-area {
  min-height: 80px;
  width: 100%;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px 16px;
  display: flex;
}

.config-ref-wrap .file-upload-icon {
  margin: 0 0 6px;
  display: block;
}

.config-ref-wrap .file-upload-icon svg {
  display: block;
  margin: 0 auto;
  width: 24px;
  height: 24px;
}

.config-ref-wrap .file-upload-text {
  display: block !important;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  width: 100%;
}

.config-ref-wrap .file-upload-hint {
  display: block !important;
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 100%;
  line-height: 1.2;
}

/* Preview das fotos: centralizado; 9:16 retrato, 16:9 paisagem */
.config-ref-wrap .file-preview-motion {
  padding: 0;
  margin-top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.config-ref-wrap .file-preview-motion .motion-preview-wrap {
  position: relative;
  display: block;
  width: 100%;
  min-width: 160px;
  max-width: 220px;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-muted, #f3f4f6);
  min-height: 0;
}
.config-ref-wrap .file-preview-motion .motion-preview-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
.config-ref-wrap .file-preview-motion .file-remove.file-remove-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  border: none;
  border-radius: 0 0 8px 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.config-ref-wrap .file-preview-motion .file-remove.file-remove-overlay:hover {
  background: rgba(180, 40, 40, 0.9);
  color: #fff;
}
.config-ref-wrap .file-preview-motion .upload-overlay {
  border-radius: 8px;
}

.file-upload-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.config-advanced-mini summary {
  font-size: 0.8rem;
  padding: 6px 0;
}

.config-advanced-mini .config-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding-top: 8px;
}

/* Configurações do vídeo — título colapsável */
.config-section {
  margin-top: 16px;
  margin-bottom: 8px;
  touch-action: manipulation;
}
.config-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 0;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: color 0.2s;
}
.config-section-header:hover {
  color: var(--text);
  opacity: 0.9;
}
.config-section-icon {
  display: flex;
  color: var(--text-muted);
}
.config-section-header:hover .config-section-icon {
  color: var(--text);
}
.config-section-title {
  flex: 1;
}
.config-section-chevron {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}
.config-section.collapsed .config-section-chevron {
  transform: rotate(-90deg);
}
.config-section-content {
  padding-top: 4px;
}
.config-section.collapsed .config-section-content {
  display: none;
}

/* Opções colapsáveis — acima do botão Criar */
.config-above-btn {
  margin-top: 20px;
  margin-bottom: 12px;
}
.config-advanced {
  margin-bottom: 12px;
}

.config-advanced summary {
  font-size: 0.85rem;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  padding: 8px 0;
  list-style: none;
  transition: color 0.2s;
}

.config-advanced summary::-webkit-details-marker { display: none; }

.config-advanced summary::before {
  content: '▶';
  display: inline-block;
  margin-right: 8px;
  font-size: 0.65rem;
  transition: transform 0.25s ease;
}

.config-advanced[open] summary::before {
  transform: rotate(90deg);
}

.config-advanced summary:hover {
  color: var(--text);
}

.config-inner {
  padding-top: 4px;
  animation: configSlide 0.35s ease;
}

@keyframes configSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.prompt-actions {
  margin-top: 28px;
}
/* Caixa de criação: prompt + botão integrados */
/* Cabeçalho acima da caixa de criar vídeo */
.create-prompt-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.create-prompt-header-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #111827 0%, #374151 100%);
  color: #fff;
  border-radius: 10px;
}
.create-prompt-header-icon svg {
  width: 22px;
  height: 22px;
}
.create-prompt-header-text {
  font-family: 'Outfit', -apple-system, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text, #111827);
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.create-prompt-dica {
  margin: 0 0 12px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #047857;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  line-height: 1.4;
}
.config-dica-modelos {
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 0.85rem;
}
.config-dica-modelos strong {
  font-weight: 600;
  color: #047857;
}

.prompt-unified-block {
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.prompt-unified-block:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}
.prompt-unified-block:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 8px 28px rgba(37,99,235,0.12);
}
.prompt-create-card {
  background: #fff;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  transition: none;
}
.prompt-intro-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  margin: 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
}
.prompt-intro-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15,23,42,0.2);
}
.prompt-intro-icon svg {
  width: 28px;
  height: 28px;
}
.prompt-intro-text-wrap {
  flex: 1;
  min-width: 0;
}
.prompt-intro-text {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  letter-spacing: 0.01em;
}
.prompt-intro-hint {
  margin: 2px 0 0;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted, #6b7280);
  line-height: 1.35;
}
.prompt-intro-point {
  display: inline-block;
  margin-left: 2px;
  font-size: 1.05em;
  vertical-align: middle;
  line-height: 1;
}
.prompt-dice-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(17,24,39,0.06);
  color: var(--text-muted, #6b7280);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.prompt-dice-btn:hover {
  background: rgba(17,24,39,0.12);
  color: var(--text, #111827);
}
.prompt-create-card .prompt-field-wrap {
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.prompt-create-card .prompt-field-wrap:hover,
.prompt-create-card .prompt-field-wrap:focus-within {
  box-shadow: none;
}

/* Modelo / Formato / Duração no card do prompt (mesmo padrão dos config-card) */
.prompt-inline-video-config {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 12px 6px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: #fafbfc;
}
.prompt-inline-video-config .config-card {
  min-width: 0;
  padding: 8px 10px;
}
.prompt-inline-video-config .config-card-model {
  padding: 8px 10px;
}
.prompt-inline-video-config .config-card-icon svg {
  width: 16px;
  height: 16px;
}
.prompt-inline-video-config .config-card-label {
  font-size: 0.68rem;
}
.prompt-inline-video-config .config-card-value {
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Sempre 3 colunas na mesma linha — compactar no telefone em vez de empilhar */
.prompt-inline-video-config .config-card-row {
  gap: 6px;
}
@media (max-width: 520px) {
  .prompt-inline-video-config {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 8px 6px 6px;
  }
  .prompt-inline-video-config .config-card,
  .prompt-inline-video-config .config-card-model {
    padding: 6px 4px;
  }
  .prompt-inline-video-config .config-card-row {
    gap: 4px;
  }
  .prompt-inline-video-config .config-card-icon svg {
    width: 14px;
    height: 14px;
  }
  .prompt-inline-video-config .config-card-label {
    font-size: 0.58rem;
    letter-spacing: -0.02em;
  }
  .prompt-inline-video-config .config-card-value {
    font-size: 0.65rem;
  }
  .prompt-inline-video-config .config-card-chevron {
    font-size: 0.85rem;
    line-height: 1;
  }
}
@media (max-width: 360px) {
  .prompt-inline-video-config {
    gap: 3px;
    padding: 8px 4px 6px;
  }
  .prompt-inline-video-config .config-card,
  .prompt-inline-video-config .config-card-model {
    padding: 5px 2px;
  }
  .prompt-inline-video-config .config-card-label {
    font-size: 0.52rem;
  }
  .prompt-inline-video-config .config-card-value {
    font-size: 0.6rem;
  }
  .prompt-inline-video-config .config-card-icon svg {
    width: 12px;
    height: 12px;
  }
}
[data-theme="dark"] .prompt-inline-video-config {
  background: var(--bg-soft);
  border-top-color: var(--border);
}

/* Experimente com sua foto (chips): botões que preenchem o textarea */
.prompt-preset-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px 12px 6px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: #fafbfc;
}
.prompt-preset-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #6b7280);
  line-height: 1.2;
}
.prompt-preset-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
}
button.prompt-preset-chip {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 10px;
  font-family: var(--font, inherit);
  font-size: 0.7rem;
  font-weight: 600;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  line-height: 1.25;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
}
.prompt-preset-chip:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}
.prompt-preset-chip:focus-visible {
  outline: 2px solid var(--border-focus, #2563eb);
  outline-offset: 2px;
}
.prompt-preset-chip.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}
.prompt-preset-text {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
  hyphens: auto;
}
[data-theme="dark"] .prompt-preset-row {
  background: var(--bg-soft);
  border-top-color: var(--border);
}
[data-theme="dark"] button.prompt-preset-chip {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-muted);
  box-shadow: none;
}
[data-theme="dark"] .prompt-preset-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .prompt-preset-chip.is-selected {
  border-color: #3b82f6;
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}

@media (max-width: 380px) {
  button.prompt-preset-chip {
    padding: 7px 8px;
    font-size: 0.65rem;
  }
}

/* Cabeçalho dentro do card principal (texto + ícone no topo branco) */
.prompt-create-card > .prompt-intro-box {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
}
.prompt-create-card > .prompt-intro-text {
  font-size: 1.05rem;
}
.prompt-create-card > .prompt-intro-box .prompt-intro-hint {
  font-size: 0.88rem;
  margin-top: 4px;
}
[data-theme="dark"] .prompt-create-card > .prompt-intro-box {
  background: var(--bg-card, #1a1a1a);
  border-bottom-color: var(--border, rgba(255, 255, 255, 0.08));
}

/* Painel "Ajuste seu vídeo" abaixo do card */
.video-adjust-panel {
  margin-top: 14px;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fafbfc;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}
.video-adjust-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
}
.video-adjust-toggle:hover {
  background: rgba(0, 0, 0, 0.03);
}
.video-adjust-toggle-title {
  flex: 1;
}
.video-adjust-toggle-chevron {
  font-size: 0.7rem;
  opacity: 0.55;
  transition: transform 0.2s ease;
}
.video-adjust-panel--collapsed .video-adjust-toggle-chevron {
  transform: rotate(-90deg);
}
.video-adjust-panel--collapsed .video-adjust-body {
  display: none;
}
.video-adjust-body {
  padding: 0 12px 12px;
}
.video-adjust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: none;
  margin: 0;
  width: 100%;
}
.video-adjust-grid .config-card {
  min-width: 0;
}
.video-adjust-resolution-slot {
  min-height: 0;
}
.video-adjust-resolution-slot .config-card.hidden {
  display: none !important;
}
[data-theme="dark"] .video-adjust-panel {
  background: var(--bg-soft);
  border-color: var(--border);
  box-shadow: none;
}
[data-theme="dark"] .video-adjust-toggle {
  color: var(--text);
}
[data-theme="dark"] .video-adjust-toggle:hover {
  background: rgba(255, 255, 255, 0.04);
}

.prompt-create-card .prompt-field-bar {
  border-top: none;
  padding: 4px 16px 10px;
  justify-content: flex-end;
}
.prompt-hint-row {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  border-top: 1px solid rgba(0,0,0,0.05);
  background: transparent;
}
.prompt-hint-text {
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.4;
}
.prompt-hint-example {
  color: #9ca3af;
  font-style: italic;
}
[data-theme="dark"] .prompt-hint-row { border-top-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .prompt-hint-text { color: #9ca3af; }
[data-theme="dark"] .prompt-hint-example { color: #6b7280; }
.prompt-actions-inside {
  margin: 0;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.prompt-actions-inside .btn-generate-inline {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 10px;
  transition: opacity 0.25s, background 0.25s;
}
@media (max-width: 440px) {
  .prompt-actions-inside .prompt-actions-buttons .btn-generate-inline {
    padding: 8px 10px;
    font-size: 0.78rem;
    gap: 6px;
  }
}
@media (max-width: 360px) {
  .prompt-actions-inside .prompt-actions-buttons .btn-generate-inline {
    padding: 8px 6px;
    font-size: 0.7rem;
    letter-spacing: -0.02em;
    gap: 4px;
  }
  .prompt-actions-inside .prompt-actions-buttons .btn-generate-inline .btn-generate-credits {
    padding: 2px 6px;
    margin-left: 4px;
    font-size: 0.85em;
  }
}
.btn-attach-image {
  flex-shrink: 0;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  background: rgba(17,24,39,0.08);
  border: 1px solid rgba(0,0,0,0.1);
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-attach-image:hover {
  background: rgba(17,24,39,0.12);
  color: var(--text, #111827);
  border-color: rgba(0,0,0,0.15);
}
.btn-attach-image.attach-required-hint {
  position: relative;
}
.btn-attach-image.attach-required-hint::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px dashed rgba(37, 99, 235, 0.7);
  animation: attach-hint-circle 2.5s linear infinite;
  pointer-events: none;
}
@keyframes attach-hint-circle {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.btn-attach-plus {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  color: var(--text-muted, #6b7280);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.btn-attach-plus:hover {
  background: #f9fafb;
  border-color: rgba(0,0,0,0.18);
  color: var(--text, #111827);
}
.config-ref-wrap-compact .config-ref-label,
.config-ref-wrap-compact .file-upload-area {
  display: none !important;
}
.config-ref-wrap-compact .file-upload {
  border: none !important;
  background: transparent !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
.config-ref-wrap-compact .config-ref-slots {
  margin: 0;
  min-height: 0;
}
.config-ref-wrap-compact .file-preview:not(.hidden) {
  margin-top: 8px;
}
.prompt-actions-inside:not(.has-prompt) .btn-generate-inline {
  opacity: 0.5;
  background: rgba(17,24,39,0.4);
}
.prompt-actions-inside:not(.has-prompt) .btn-generate-inline:hover {
  opacity: 0.7;
  background: rgba(17,24,39,0.5);
}
/* Modo Imitar Movimento: card com só o botão aparece após os campos */
.prompt-create-card-motion {
  order: 10;
  border: none;
  box-shadow: none;
  background: transparent;
}
.prompt-create-card-motion .prompt-actions-inside {
  border-top: none;
  padding: 0 0 8px;
}
.motion-fields { order: 5; }

/* Config Formato, Origem, Resolução — mesma linha acima do passo 1 */
.motion-config-inline {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.motion-config-inline .config-card {
  flex: 1;
  min-width: 120px;
}

/* Passo 1 e 2 um abaixo do outro */
.motion-uploads-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.motion-upload-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.motion-upload-card label,
.motion-upload-card .field-hint,
.motion-upload-card .motion-field-duration {
  flex-shrink: 0;
}
.motion-field-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
@media (min-width: 768px) {
  .motion-field-title {
    font-size: 1.25rem;
  }
}
.motion-field-duration {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.35;
}
.motion-upload-card + .motion-upload-card .motion-field-title {
  margin-bottom: 12px;
}
.motion-upload-card .field-hint {
  min-height: 2.4em; /* outras páginas / hints longos */
}
.motion-upload-card .file-upload {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.motion-upload-card .file-upload-area {
  width: 100%;
  min-height: 220px;
  height: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 10px;
  padding-bottom: 10px;
  box-sizing: border-box;
}
.motion-ref-inline-preview {
  margin-top: 8px;
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  line-height: 0;
  flex-shrink: 0;
}
/* Vídeo de exemplo: preenche a caixa (sem barras laterais do contain) */
.motion-ref-inline-preview--video {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-height: min(200px, 28vw);
  background: var(--bg-soft, #1a1a1a);
  overflow: visible;
  cursor: default;
}
.motion-ref-inline-preview--video .motion-ref-inline-preview-media {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Foto: área estável, imagem centralizada (horizontal ou vertical) */
.motion-ref-inline-preview--photo {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  max-height: min(200px, 30vw);
  background: var(--bg-soft, #f3f4f6);
}
.motion-ref-inline-preview--photo .motion-ref-inline-preview-media {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.motion-ref-inline-preview-caption {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}
.output-placeholder-demo-wrap {
  width: 100%;
  max-width: min(520px, 100%);
  margin-bottom: 12px;
  text-align: center;
}
.output-placeholder-demo-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(240px, 42vw);
  border-radius: 12px;
  display: block;
  object-fit: contain;
  border: 1px solid var(--border);
  background: #0c0c0c;
}
.output-placeholder-demo-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.motion-upload-card .file-preview {
  width: 100%;
  min-height: 100px;
  flex-shrink: 0;
}
.motion-upload-card .file-preview-motion video.motion-preview-media {
  min-height: 100px;
}
@media (max-width: 600px) {
  .motion-uploads-grid {
    gap: 12px;
  }
  .motion-upload-card {
    min-width: 0;
  }
  .motion-upload-card .field-hint {
    font-size: 0.75rem;
    margin-top: 2px;
  }
  .motion-upload-card label {
    font-size: 0.9rem;
  }
  .motion-upload-card .file-upload-area {
    min-height: 200px;
    height: auto;
    padding: 8px 8px 10px;
  }
  .motion-ref-inline-preview--video,
  .motion-ref-inline-preview--photo {
    max-height: 160px;
  }
  .motion-upload-card .file-preview {
    min-height: 70px;
  }
  .motion-upload-card video.motion-preview-media {
    min-height: 70px;
  }
  .motion-config-inline {
    gap: 8px;
    margin-bottom: 12px;
  }
  .motion-config-inline .config-card {
    min-width: 90px;
  }
  .motion-upload-card .file-upload-icon svg {
    width: 20px;
    height: 20px;
  }
  .motion-upload-card .file-upload-text {
    font-size: 0.8rem;
  }
  .motion-upload-card .file-preview-motion {
    padding: 10px;
  }
  .motion-upload-card .file-remove {
    font-size: 0.8rem;
    padding: 4px 8px;
  }
}

.prompt-actions-close {
  margin-top: 12px;
}
.motion-fields .prompt-actions-close,
.create-flow + .prompt-actions-close {
  margin-top: 20px;
  margin-bottom: 8px;
}
.motion-fields .prompt-actions-close .motion-ready-state,
.prompt-actions-close .motion-ready-state {
  margin: 0 0 16px;
}
.prompt-actions-close .motion-ready-state:empty {
  margin: 0;
  min-height: 0;
}

.motion-cost-note {
  margin: 16px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
  text-align: center;
}

.motion-demo-result-wrap {
  margin: 20px 0 24px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.motion-demo-result-label {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}
.motion-demo-result-video {
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 16;
  max-width: 280px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .motion-demo-result-video { max-width: 220px; }
}
.motion-demo-result-video video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.btn-generate-inline {
  width: 100%;
}

.btn-generate-credits {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  margin-left: 6px;
  font-size: 0.9em;
}
.btn-generate-credits.hidden {
  display: none;
}
.btn-generate-coin {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.btn-generate-coin svg {
  display: block;
  width: 14px;
  height: 14px;
  filter: drop-shadow(0 0.5px 1px rgba(0, 0, 0, 0.35));
}

/* Com prompt digitado: botão preto — pílula clara para contraste */
.prompt-actions-inside.has-prompt .btn-generate-credits {
  background: rgba(255, 255, 255, 0.2);
}
.prompt-actions-inside.has-prompt .btn-generate-coin svg {
  filter: drop-shadow(0 0.5px 1px rgba(0, 0, 0, 0.25));
}

/* Créditos mais legíveis no botão em modo escuro */
[data-theme="dark"] .btn-generate-credits {
  background: rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .prompt-actions-inside.has-prompt .btn-generate-credits {
  background: rgba(255, 255, 255, 0.22);
}

.suggestions-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 5px 12px;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  font-family: inherit;
  font-size: 0.78rem;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
}
.prompt-suggestions-above .chip {
  padding: 4px 8px;
  font-size: 0.72rem;
  color: #6b7280;
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.05);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.chip:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text);
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transform: translateY(-1px);
}
.prompt-suggestions-above .chip:hover {
  transform: none;
  box-shadow: none;
  background: rgba(0,0,0,0.04);
  color: #4b5563;
}

/* Form options — discretas, tipografia menor */
.form-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.form-options-compact {
  padding: 0;
  gap: 12px;
}

.form-options-compact .config-row {
  gap: 12px 20px;
}

.field-model .model-notice {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 6px 0 0;
  line-height: 1.35;
}

.model-notice-veo-wrap {
  margin-top: 6px;
}

.field-model .model-notice-veo-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 8px;
  line-height: 1.35;
}

.field-model .model-notice-veo-tip {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.duration-fixed.hidden { display: none !important; }

.model-notice.hidden { display: none !important; }

.form-options-compact .field-compact label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.form-options-compact .field-compact select,
.form-options-compact .duration-fixed {
  padding: 6px 10px;
  font-size: 0.82rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  min-width: 70px;
}
.form-options-compact .field-compact select {
  background: var(--bg-card);
}
.form-options-compact .duration-fixed {
  background: var(--bg-soft);
  color: var(--text-muted);
  cursor: not-allowed;
}

.form-options-compact .checkbox-compact {
  font-size: 0.78rem !important;
  color: var(--text-muted);
}

.config-inner .file-upload {
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.mode-howto-compact {
  padding: 12px 16px;
  margin-bottom: 12px;
}

.config-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}

.field-compact {
  min-width: 0;
}

.field-compact label {
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.field-compact select {
  padding: 8px 12px;
  font-size: 0.85rem;
  min-width: 80px;
}

.field-ref {
  flex: 1;
  min-width: 100px;
  max-width: 140px;
}

.file-upload-compact .file-upload-area {
  padding: 10px 12px;
}

.file-upload-compact .file-upload-icon {
  display: inline-block;
  margin: 0 6px 0 0;
  vertical-align: middle;
}

.file-upload-compact .file-upload-text {
  display: inline;
  font-size: 0.82rem;
}

.file-upload-compact .file-upload-hint {
  display: none;
}

.checkbox-compact {
  font-size: 0.82rem !important;
  white-space: nowrap;
}

.hidden { display: none !important; }
.mode-fields.hidden { display: none !important; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 540px) {
  .field-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.18s;
}

select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.model-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

.model-btn {
  padding: 10px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.18s;
}

.model-btn:hover {
  color: var(--text);
  border-color: #c4cad4;
}

.model-btn.active {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: white;
}

/* File upload */
.file-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: all 0.18s;
}

.file-upload.dragover {
  border-color: var(--accent);
  background: rgba(37,99,235,0.04);
}

.file-upload-area {
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
}

.file-upload-icon { display: block; margin-bottom: 10px; opacity: 0.45; color: var(--text-muted); }
.file-upload-icon svg { display: block; margin: 0 auto; }
.file-upload-text { display: block; font-size: 0.9rem; color: var(--text); font-weight: 500; }
.file-upload-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; }

/* Como fazer / mode howto */
.mode-howto,
.motion-howto {
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 22px;
}
.mode-howto summary,
.motion-howto summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-weight: 500;
}
.mode-howto summary::-webkit-details-marker,
.motion-howto summary::-webkit-details-marker { display: none; }
.mode-howto summary::before,
.motion-howto summary::before {
  content: '›';
  margin-right: 8px;
  font-size: 0.9rem;
  opacity: 0.6;
  transition: transform 0.2s;
}
.mode-howto[open] summary::before,
.motion-howto[open] summary::before {
  content: '›';
  transform: rotate(90deg);
}
.mode-howto-content {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  line-height: 1.65;
}
.mode-howto-content p { margin: 0 0 10px; }
.mode-howto-content p:last-child { margin-bottom: 0; }

/* Como funciona — versão compacta */
.mode-howto-compact {
  padding: 12px 16px;
}
.mode-howto-compact .mode-howto-list {
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.mode-howto-compact .mode-howto-list li {
  margin-bottom: 4px;
}
.mode-howto-compact .mode-howto-list li:last-child {
  margin-bottom: 0;
}
.howto-optional {
  font-size: 0.78rem;
  color: var(--text-muted, #9ca3af);
  font-style: italic;
  margin-left: 2px;
}

/* Como fazer? — seção abaixo do Resultado */
.section-como-fazer {
  margin-top: 20px;
  padding-top: 20px;
  padding-bottom: 4px;
}

.mode-howto-standalone {
  margin-bottom: 12px;
}

/* Copiar movimento — CTA abaixo de "Como funciona" (página /video/) */
.motion-como-fazer-try {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 12px;
  padding: 12px 14px;
}
.motion-como-fazer-try-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.motion-como-fazer-try-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.motion-como-fazer-try-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.motion-como-fazer-try-text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary, #111827);
}
.motion-como-fazer-try-desc {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.motion-como-fazer-try-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff !important;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  border: 0;
  transition: filter 0.15s ease;
}
.motion-como-fazer-try-cta:hover {
  filter: brightness(0.98);
}
.motion-como-fazer-try-cta--dark {
  background: #111 !important;
  color: #fff !important;
}
.motion-como-fazer-try-cta--dark:hover {
  background: #222 !important;
  filter: none;
}

.mini-curso-main-offer {
  margin-top: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 12px;
  padding: 14px;
}
.mini-curso-main-offer-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #9a3412;
  background: #ffedd5;
  border: 1px solid #fdba74;
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 8px;
}
.mini-curso-main-offer h4 {
  margin: 0 0 6px;
  font-size: 1rem;
}
.mini-curso-main-offer p {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.mini-curso-main-offer-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 10px;
}
.mini-curso-main-offer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  border: 0;
  cursor: pointer;
}
.mini-curso-main-offer-cta:hover {
  filter: brightness(0.98);
}
.mini-curso-main-offer-cta-soft {
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
}
.mini-curso-info-modal-card {
  max-width: 460px;
  text-align: center;
}
.mini-curso-info-list {
  margin: 14px 0 10px;
  padding: 0;
  list-style: none;
  text-align: left;
}
.mini-curso-info-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  line-height: 1.35;
}
.mini-curso-info-list li:last-child {
  margin-bottom: 0;
}

.mode-howto-standalone.hidden {
  display: none !important;
}

.motion-fields .field + .field { margin-top: 16px; }
.motion-fields .field-row { margin-top: 16px; }
.motion-fields .field-hint-small { margin-top: 6px; display: block; }
.field-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 8px;
  line-height: 1.4;
}

.field-hint-small {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.required { color: var(--error); }

.motion-ready-state {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 12px 0 0;
  min-height: 1.2em;
}
.motion-ready-state.ready {
  color: var(--success);
  font-weight: 500;
}
.motion-ready-state.uploading {
  color: var(--accent);
  font-weight: 500;
}
.motion-ready-state.error {
  color: var(--error);
  font-weight: 500;
}

.motion-prompts {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.file-preview { padding: 12px; }
.file-preview img { max-width: 100%; max-height: 100px; border-radius: 8px; display: block; margin: 0 auto; }
.file-preview-motion { padding: 16px; }
.file-preview-motion .motion-preview-wrap { position: relative; display: inline-block; width: 100%; }
.file-preview-motion .motion-preview-media {
  max-width: 100%; max-height: 280px; width: auto; height: auto;
  border-radius: 10px; display: block; margin: 0 auto; object-fit: contain;
  transition: filter 0.3s ease;
}
.file-preview-motion .motion-preview-media.loading { filter: blur(10px); }
.file-preview-motion video.motion-preview-media { min-height: 160px; }

/* Overlay "Carregando vídeo..." ao selecionar vídeo exemplo (URL) */
/* Tempo do vídeo de referência (movimento a imitar) */
.motion-video-time {
  position: absolute;
  bottom: 36px;
  left: 8px;
  padding: 4px 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
}

.motion-ref-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,245,245,0.9);
  border-radius: 10px;
}
.motion-ref-loading-overlay.hidden { display: none !important; }
.motion-ref-loading-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #6b7280;
}

/* Overlay com barra de progresso 0–100% em cima do vídeo/imagem */
.upload-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(2px);
  border-radius: 10px;
  padding: 16px;
}
.upload-overlay.hidden { display: none !important; }
.upload-progress-bar-wrap {
  width: 100%;
  max-width: 200px;
  height: 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}
.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  border-radius: 4px;
  transition: width 0.25s ease-out;
}
.upload-progress-pct {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.file-remove {
  display: block;
  margin-top: 10px;
  padding: 8px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
}

.file-remove:hover { color: var(--error); border-color: var(--error); }
.file-preview.hidden, .file-upload-area.hidden { display: none !important; }

/* Contorno na área de upload quando falta imagem de referência */
.highlight-upload.file-upload-area,
.file-upload.highlight-upload .file-upload-area {
  border: 2px solid var(--btn-bg, #2d2d2d) !important;
  box-shadow: 0 0 0 2px rgba(45, 45, 45, 0.15);
}

/* Aviso próximo da caixa de upload (top/left definidos via JS) */
.centered-image-warning {
  position: fixed;
  z-index: 1998;
  padding: 0;
  pointer-events: none;
}
.centered-image-warning.hidden {
  display: none !important;
}
.centered-image-warning-card {
  position: relative;
  max-width: 220px;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  animation: centeredWarningIn 0.2s ease;
}
@keyframes centeredWarningIn {
  from { opacity: 0; transform: translateX(6px); }
  to { opacity: 1; transform: translateX(0); }
}
.centered-image-warning-text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text-muted, #6b7280);
}

/* Generate button */
.btn-generate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  background: linear-gradient(180deg, #111 0%, #0B0F14 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
}

.btn-generate:hover:not(:disabled) {
  background: linear-gradient(180deg, #18181b 0%, #0f1319 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
}

.btn-generate:focus-visible {
  outline: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2), 0 0 0 2px rgba(17,24,39,0.4);
}

.btn-generate:active:not(:disabled) {
  transform: translateY(0);
  transition-duration: 0.08s;
}

.btn-generate:disabled { opacity: 0.55; cursor: not-allowed; }

/* Sections */
.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* Result */
.section-result {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 88px;
}
/* Ancoragem ao rolar até “Resultado” (scrollIntoView no título, não só na section) */
.section-result > .section-title {
  scroll-margin-top: 88px;
}
.section-result--motion-inline {
  margin-top: 20px;
  width: 100%;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .section-result { padding: 20px; }
}

.output-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-muted);
  scroll-margin-top: 80px;
}
.output-placeholder--motion-empty {
  min-height: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  display: block;
}
/* Preview de exemplo na página Imitar movimento — vídeo visível, sem barras laterais */
.output-placeholder--motion-demo {
  min-height: 140px;
  padding: 4px 0 0;
}
.output-placeholder--motion-demo .output-placeholder-demo-wrap--motion {
  margin-bottom: 0;
  width: 100%;
  max-width: min(520px, 100%);
}
.output-placeholder-demo-video--motion {
  object-fit: cover;
  background: var(--bg-soft, #1a1a1a);
  border: 1px solid var(--border);
}
.section-title--motion-result {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 12px;
}
@media (min-width: 768px) {
  .section-title--motion-result {
    font-size: 1.2rem;
  }
}

.placeholder-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.5; }
.output-placeholder p { margin: 0; font-size: 0.9rem; }

.output-results-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-margin-top: 80px;
}
@media (min-width: 768px) {
  .output-results-list { gap: 16px; }
}
.output-results-list.hidden { display: none !important; }

.output-result-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card, #fff);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
@media (min-width: 768px) {
  .output-result-card { padding: 14px; gap: 10px; }
}
.output-result-card.hidden { display: none !important; }
.output-placeholder.hidden { display: none !important; }

/* Oculta barra de status durante loading (redundante com progresso no overlay) */
.output-result-card:has(.media-container.is-loading) .task-status-bar {
  display: none !important;
}
.task-status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-badge.finished { background: rgba(22, 163, 74, 0.15); color: var(--success); }
.status-badge.running, .status-badge.not_started { background: rgba(234, 179, 8, 0.15); color: #ca8a04; }
.status-badge.failed { background: rgba(220, 38, 38, 0.15); color: var(--error); }

.task-progress { font-size: 0.9rem; color: var(--text-muted); }
.progress-bar { flex: 1; height: 6px; background: var(--bg-soft); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #3b82f6); border-radius: 4px; width: 0%; transition: width 0.35s ease; }

.btn-verify {
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  width: fit-content;
}

.btn-verify:hover:not(:disabled) { color: var(--btn-bg); border-color: var(--btn-bg); }
.btn-verify.hidden { display: none !important; }

.media-container {
  background: #0f172a;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 180px;
  position: relative;
}
/* Durante o loading: mantém formato retangular (9:16) como celular */
.media-container.is-loading .loading-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.media-container.is-loading .loading-placeholder-bg {
  display: block;
}
.media-container.is-loading .loading-placeholder-overlay {
  flex: 1;
  padding: 24px 20px;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0.85) 100%);
  margin: 0;
  border-radius: 0;
  justify-content: center;
  gap: 16px;
}
.loading-placeholder-progress {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 220px;
}
.loading-progress-pct {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  text-align: center;
}
.loading-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  overflow: hidden;
}
.loading-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Spinner girando — indica que ainda está processando (ex: 95%) */
.loading-placeholder-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: rgba(255,255,255,0.9);
  border-radius: 50%;
  animation: loading-spinner 0.8s linear infinite;
}
@keyframes loading-spinner {
  to { transform: rotate(360deg); }
}

/* Erro: manter layout compacto (não voltar ao retângulo grande) */
.media-container.keep-compact {
  aspect-ratio: auto !important;
  min-height: auto !important;
}

.loading-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: rgba(11,15,20,0.97);
  border-radius: var(--radius);
  animation: loadFadeIn 0.35s ease;
  cursor: default;
}
.loading-placeholder.hidden { display: none !important; }

@keyframes loadFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.loading-placeholder-text {
  margin: 0;
  color: rgba(255,255,255,0.95);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  padding: 0 16px;
  line-height: 1.5;
}

.loading-placeholder-time {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin: 14px 0 0;
  padding: 9px 12px;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  color: rgba(255,255,255,0.88);
  font-size: 0.8rem;
  font-weight: 400;
  text-align: left;
  line-height: 1.5;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
.loading-tip-kicker {
  align-self: flex-start;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  line-height: 1.2;
}
.loading-tip-body {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
}
.loading-placeholder-time::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  margin-left: -6px;
  width: 12px;
  height: 12px;
  background: rgba(255,255,255,0.09);
  border-top: 1px solid rgba(255,255,255,0.18);
  border-left: 1px solid rgba(255,255,255,0.18);
  transform: rotate(45deg);
  border-radius: 2px;
}
.balloon-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
  line-height: 1.6;
}
.balloon-body {
  flex: 1;
  min-width: 0;
}
.balloon-text {
  display: block;
  font-size: 0.75rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
  word-break: break-word;
}
.balloon-dots {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  margin-left: 4px;
  vertical-align: middle;
}
.balloon-dots span {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  animation: balloonDot 1.4s ease-in-out infinite;
  opacity: 0;
}
.balloon-dots span:nth-child(1) { animation-delay: 0s; }
.balloon-dots span:nth-child(2) { animation-delay: 0.22s; }
.balloon-dots span:nth-child(3) { animation-delay: 0.44s; }

@keyframes balloonDot {
  0%, 60%, 100% { opacity: 0; transform: scale(0.7); }
  30% { opacity: 1; transform: scale(1); }
}

.balloon-fade-in {
  animation: balloonFadeIn 0.5s ease forwards;
}
@keyframes balloonFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.loading-placeholder-time.hidden { display: none !important; }

/* Preview da imagem embaçada + overlay com textos */
.loading-placeholder {
  position: relative;
  background: rgba(11,15,20,0.97);
}
.loading-placeholder-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(4px);
  opacity: 0.85;
}
.loading-placeholder-bg.has-image {
  opacity: 0.9;
}
/* Fundo embaçado com identidade Varvos quando não há imagem de referência */
.loading-placeholder-bg:not(.has-image) {
  display: block;
  background-image: url('/varvos-bg.svg');
  background-size: cover;
  background-position: center;
}
.loading-placeholder-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 24px 20px;
  background: linear-gradient(to bottom, transparent 0%, rgba(11,15,20,0.7) 30%, rgba(11,15,20,0.9) 100%);
}
.loading-placeholder-prompt {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 12px 16px;
  background: rgba(0,0,0,0.4);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.loading-placeholder-prompt.hidden { display: none !important; }

.loading-prompt-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s;
}
.loading-prompt-toggle:hover { color: white; }
.loading-prompt-chevron {
  font-size: 0.7rem;
  transition: transform 0.2s;
}
.loading-placeholder-prompt:has(.loading-prompt-content.collapsed) .loading-prompt-chevron { transform: rotate(-90deg); }
.loading-prompt-content {
  max-height: 80px;
  overflow-y: scroll;
  overflow-x: hidden;
  transition: max-height 0.25s ease;
  overscroll-behavior: contain;
}
.loading-prompt-content.collapsed {
  max-height: 0;
  overflow: hidden;
}
.loading-prompt-text {
  margin: 0;
  padding: 8px 0 0;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.loading-message {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.loading-message:empty { display: none; }

.result-prompt-wrap {
  margin: 12px 0 0;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  overflow: hidden;
}
.result-prompt-wrap.hidden { display: none !important; }
.result-prompt-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted, #666);
  background: rgba(0,0,0,0.02);
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.result-prompt-toggle:hover {
  background: rgba(0,0,0,0.04);
  color: var(--text, #1a1a1a);
}
.result-prompt-icon { font-size: 1rem; }
.result-prompt-label { flex: 1; }
.result-prompt-chevron {
  font-size: 0.7rem;
  opacity: 0.6;
  transition: transform 0.2s ease;
}
.result-prompt-toggle[aria-expanded="true"] .result-prompt-chevron {
  transform: rotate(180deg);
}
.result-prompt-content {
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.result-prompt-content.collapsed {
  max-height: 0;
}
.result-prompt-content:not(.collapsed) {
  max-height: 2000px;
}
.result-prompt-text {
  margin: 0;
  padding: 12px 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted, #666);
  word-wrap: break-word;
  white-space: pre-wrap;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.creation-disclaimer {
  display: none !important; /* Mensagem removida */
}
.creation-disclaimer a {
  color: var(--btn-bg, #2d2d2d);
  font-weight: 600;
  text-decoration: none;
}
.creation-disclaimer a:hover {
  text-decoration: underline;
}

.media-container {
  position: relative;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  min-height: 180px;
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
  cursor: pointer;
}
@media (min-width: 768px) {
  .media-container { max-width: 260px; }
  /* Durante loading no desktop: remove aspect-ratio fixo e usa min-height para o conteúdo caber */
  .media-container.is-loading {
    aspect-ratio: unset !important;
    min-height: 460px;
    overflow: visible;
  }
}
/* Formato conforme o vídeo gerado: reels 9:16, youtube 16:9, quadrado 1:1 */
.output-result-card[data-aspect-ratio="9:16"] .media-container { aspect-ratio: 9/16; }
.output-result-card[data-aspect-ratio="16:9"] .media-container { aspect-ratio: 16/9; }
.output-result-card[data-aspect-ratio="1:1"] .media-container { aspect-ratio: 1/1; }
.output-result-card:not([data-aspect-ratio]) .media-container { aspect-ratio: 9/16; }
.media-container video.media-output,
.media-container .media-output {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.media-output[src=""] { display: none !important; }

/* Fallback quando o vídeo falha ao carregar (CORS, URL expirada, etc.) */
.video-load-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  background: #0f172a;
  color: var(--text-muted);
}
.video-load-fallback-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.8; }
.video-load-fallback p { margin: 0; font-size: 0.9rem; line-height: 1.4; }

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 16px;
}

.image-gallery.hidden { display: none !important; }
.image-gallery .gallery-item { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 1; }
.image-gallery .gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.image-gallery .gallery-item a {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 8px; background: rgba(0,0,0,0.75); color: white;
  font-size: 0.8rem; text-align: center; text-decoration: none;
}
.image-gallery .gallery-item a:hover { background: var(--btn-bg); }

.status-message { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.status-message.success { color: var(--success); }
.status-message.error { color: var(--error); }
.status-message.demand-hint { color: var(--text-muted); border-left: 3px solid var(--accent, #6366f1); padding-left: 0.65rem; }

.status-retry-wrap {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.output-result-card .btn-result-retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: #111;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.output-result-card .btn-result-retry:hover {
  background: #000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.output-result-card .btn-result-retry:active {
  transform: scale(0.98);
}

/* Legado: outros usos de .generation-parallel-hint (se houver) */
.generation-parallel-hint {
  margin: 0;
  padding: 12px 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
  background: var(--bg-soft, #f4f4f5);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.generation-parallel-hint.hidden {
  display: none !important;
}
.generation-parallel-hint-list {
  margin: 0;
  padding-left: 1.35em;
  list-style-type: disc;
}
.generation-parallel-hint-list li {
  margin-bottom: 0.45em;
  padding-left: 0.15em;
}
.generation-parallel-hint-list li:last-child {
  margin-bottom: 0;
}
.generation-parallel-hint strong {
  color: var(--text);
  font-weight: 600;
}
.generation-parallel-hint-link {
  color: var(--accent, #2563eb);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.generation-parallel-hint-link:hover {
  text-decoration-thickness: 2px;
}

.no-credits-cta-wrap { margin-top: 12px; }

/* Banner de monetização (etapas 2 e 3) — entre "Pronto em" e "Resultado" */
.monetization-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 44px 20px 24px;
  margin: 20px 0 24px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(34, 197, 94, 0.06));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
}
.monetization-banner.hidden { display: none !important; }
.monetization-banner-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.monetization-banner-close:hover {
  color: var(--text);
  background: rgba(0,0,0,0.06);
}
.monetization-banner-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 480px;
  width: 100%;
}
.monetization-banner-msg {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  line-height: 1.5;
  padding: 0 8px;
}
.monetization-banner-cta {
  padding: 10px 24px;
  background: var(--btn-bg);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}
.monetization-banner-cta:hover { background: var(--btn-hover); }
.monetization-banner-step3 {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.12), rgba(234, 88, 12, 0.06));
  border-color: rgba(234, 179, 8, 0.3);
}
@media (max-width: 480px) {
  .monetization-banner {
    padding: 18px 44px 18px 20px;
    margin: 16px 0 20px;
  }
  .monetization-banner-close {
    top: 10px;
    right: 10px;
  }
  .monetization-banner-msg {
    font-size: 0.9rem;
    padding: 0;
  }
}

/* Popup grande: vídeo quase pronto, precisa de créditos */
.no-credits-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  overflow-x: hidden;
}
.no-credits-popup-backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 0;
}
.no-credits-popup-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 28px 24px 32px;
  background: var(--bg-card, #fff);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 1px solid var(--border, #e5e5e5);
}
[data-theme="dark"] .no-credits-popup-card { background: var(--bg-card); }
.no-credits-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.no-credits-popup-close:hover { background: var(--bg-soft); color: var(--text); }
.no-credits-popup-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  line-height: 1;
}
.no-credits-popup-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
}
.no-credits-popup-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 24px;
}
.no-credits-popup-warning {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 16px;
}
.no-credits-popup-highlight {
  font-size: 1rem;
  font-weight: 600;
  color: var(--error, #dc2626);
  margin: 0 0 24px;
}
.no-credits-comparison {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 20px;
  text-align: left;
}
.no-credits-comp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
}
.no-credits-comp-avulso {
  background: var(--bg-soft, #f5f5f5);
  color: var(--text-muted);
}
.no-credits-comp-destaque {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: var(--text);
  font-weight: 600;
}
.no-credits-comp-val {
  font-weight: 600;
  white-space: nowrap;
}
.no-credits-popup-benefit {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 24px;
  letter-spacing: 0.02em;
}
.no-credits-cupom-wrap {
  margin-top: 24px;
  padding: 20px 16px;
  background: rgba(34, 197, 94, 0.06);
  border-radius: 12px;
  border: 1px dashed rgba(34, 197, 94, 0.4);
}
.no-credits-cupom-wrap.hidden { display: none; }
.no-credits-cupom-msg {
  font-size: 0.95rem;
  color: #15803d;
  margin: 0 0 16px;
  font-weight: 500;
}
.no-credits-cupom-headline {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.no-credits-cupom-code {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 16px;
}
.no-credits-cupom-code strong { color: #15803d; }
.no-credits-popup-cta-cupom {
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
  color: #fff !important;
}
.no-credits-popup-cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  margin-top: 8px;
}
.no-credits-popup-cta:first-of-type { margin-top: 0; }
.no-credits-popup-cta.hidden { display: none !important; }
.btn-retry-generation {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--btn-bg);
  border: none;
  border-radius: 10px;
  color: white;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-retry-generation:hover { background: var(--btn-hover); }

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  min-height: 44px;
  background: var(--btn-bg);
  border: none;
  border-radius: 10px;
  color: white;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.btn-download:hover { background: var(--btn-hover); color: white; }
.btn-download.hidden { display: none !important; }

.share-video-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
}
.share-video-buttons.hidden { display: none !important; }
.share-video-buttons .btn-download { flex: 1 1 100%; min-width: 0; }
.share-video-buttons .btn-share-whatsapp,
.share-video-buttons .btn-copy-link,
.share-video-buttons .btn-redo-video,
.share-video-buttons .btn-close-result { flex: 1 1 auto; min-width: 120px; min-height: 44px; }
.share-video-buttons .btn-redo-video {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 18px;
}
.share-video-buttons .btn-redo-video:hover { background: #e2e8f0; color: #1e293b; }
[data-theme="dark"] .share-video-buttons .btn-redo-video { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.12); }
[data-theme="dark"] .share-video-buttons .btn-redo-video:hover { background: rgba(255,255,255,0.14); color: #fff; }
.share-video-buttons .btn-copy-link {
  background: #3b82f6;
  color: white;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.share-video-buttons .btn-copy-link:hover { background: #2563eb; color: white; }

.btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  min-height: 44px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.05s;
}
.btn-share:hover { opacity: 0.9; }
.btn-share.hidden { display: none !important; }

.btn-share-whatsapp {
  background: #25d366;
  color: white;
}
.btn-share-whatsapp:hover { color: white; }
.btn-whatsapp-pending {
  opacity: 0.85;
  cursor: wait;
  pointer-events: none;
}

.btn-close-result {
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted, #6b7280);
  background: transparent;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-close-result:hover {
  background: #f3f4f6;
  color: var(--text, #111827);
}

.btn-share-facebook {
  background: #1877f2;
  color: white;
}
.btn-share-facebook:hover { color: white; }

.creation-download-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.download-warning {
  margin: 0;
  font-size: 0.85rem;
  color: #b45309;
  background: rgba(234, 179, 8, 0.12);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(234, 179, 8, 0.3);
  text-align: center;
}
.download-warning.hidden { display: none !important; }

.refund-notice {
  margin: 0 0 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  opacity: 0.9;
}
.refund-notice.hidden { display: none !important; }

.history-download-hint {
  margin: 8px 0 16px;
  font-size: 0.84rem;
  color: var(--text-muted);
  padding: 8px 12px;
  background: rgba(234, 179, 8, 0.08);
  border-radius: 8px;
  border-left: 3px solid #ca8a04;
}
.history-browser-hint {
  margin: 20px 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
  padding: 10px 12px;
  background: var(--bg-soft, rgba(0, 0, 0, 0.04));
  border-radius: 8px;
  border: 1px solid var(--border);
}
/* Creations - Seus vídeos */
.section-creations { padding: 0; margin-top: 20px; padding-top: 20px; }

.creations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.creations-grid.hidden { display: none !important; }

.history-ver-mais-wrap {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  min-height: 40px;
}
.history-ver-mais-wrap.hidden { display: none !important; }
.history-load-more-sentinel { min-height: 1px; }
.btn-ver-mais {
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.18s;
}
.btn-ver-mais:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.creation-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.18s;
  box-shadow: var(--shadow-sm);
}

.creation-item:hover {
  border-color: #c4cad4;
  box-shadow: var(--shadow-md);
}

.creation-thumb {
  aspect-ratio: 1/1;
  background: #111;
  overflow: hidden;
  cursor: pointer;
}

/* Card "em criação" na seção Seus vídeos */
.creation-item-loading .creation-thumb { cursor: default; }
.creation-thumb-loading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
.creation-loading-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: creation-shimmer 1.8s ease-in-out infinite;
}
.creation-loading-icon {
  position: relative;
  z-index: 1;
  font-size: 2rem;
  opacity: 0.7;
  animation: creation-pulse 1.2s ease-in-out infinite;
}
@keyframes creation-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes creation-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.05); }
}

.creation-thumb img { width: 100%; height: 100%; object-fit: cover; }
.creation-thumb video { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }

.creation-info { padding: 12px; }
.creation-info .meta { font-size: 0.75rem; color: var(--text-muted); }
.creation-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.creation-actions-row .creation-action-btn {
  padding: 8px 14px;
  font-size: 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  flex: 1 1 auto;
  min-width: 0;
}
.creation-actions-row .btn-download {
  background: var(--btn-bg);
  color: white;
}
.creation-actions-row .btn-download:hover { background: var(--btn-hover); color: white; }
.creation-actions-row .btn-share-whatsapp {
  background: #25d366;
  color: white;
}
.creation-actions-row .btn-share-whatsapp:hover { background: #20bd5a; color: white; }
.creation-actions-row .btn-copy-link {
  background: #3b82f6;
  color: white;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.creation-actions-row .btn-copy-link:hover {
  background: #2563eb;
  color: white;
}
.creation-actions-row .btn-copy-link.creation-copy-full {
  flex: 1 1 100%;
  min-width: 100%;
}
.creation-info .creation-prompt {
  font-size: 0.8rem;
  color: var(--text, #374151);
  margin-top: 6px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-filter-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.history-date-filter {
  min-width: 180px;
  padding: 12px 14px;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text);
}
.history-date-filter:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.history-filter-inner {
  position: relative;
  display: inline-block;
  flex: 1;
  max-width: 340px;
  width: 100%;
}
.history-filter-input {
  width: 100%;
  padding: 12px 44px 12px 16px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.history-filter-input::placeholder { color: var(--text-muted); }
.history-filter-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.history-filter-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s;
}
.history-filter-inner:hover .history-filter-icon,
.history-filter-input:focus ~ .history-filter-icon { color: var(--primary); opacity: 0.9; }
.creation-actions {
  padding: 0 12px 12px;
  text-align: center;
}
.creation-actions a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: 8px;
  background: var(--btn-bg);
  color: white;
  text-decoration: none;
  margin: 2px 4px 2px 0;
}
.creation-actions a:hover { background: var(--btn-hover); color: white; }

.creation-actions .creation-share-whatsapp { background: #25d366; }
.creation-actions .creation-share-whatsapp:hover { background: #20bd5a; color: white; }
.creation-actions .creation-share-facebook { background: #1877f2; }
.creation-actions .creation-share-facebook:hover { background: #166fe5; color: white; }

.creations-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
}
.creations-empty p { margin: 0 0 8px; font-size: 1rem; }
.history-hint { font-size: 0.85rem; opacity: 0.9; }
.creations-empty.hidden { display: none !important; }

.btn-clear-history {
  margin-top: 16px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
}
.btn-clear-history:hover { color: var(--error); border-color: var(--error); }
.btn-clear-history.hidden { display: none !important; }

/* Inspire-se — carrossel como na landing */
.section-samples {
  padding: 0;
  overflow: hidden;
}

.section-samples .section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: -8px 0 20px;
  line-height: 1.5;
}

.samples-wrap {
  position: relative;
  margin: 0 -24px;
}

.samples-carousel {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0;
}

.samples-carousel::-webkit-scrollbar { display: none; }

.samples-track {
  display: flex;
  gap: 12px;
  padding: 0 24px;
  width: max-content;
}

.section-samples .video-card {
  flex-shrink: 0;
  width: 160px;
  aspect-ratio: 9/16;
  border-radius: 20px;
  overflow: hidden;
  background: #111;
  position: relative;
  scroll-snap-align: start;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  z-index: 2;
  transition: transform 0.18s, box-shadow 0.18s;
}

@media (min-width: 640px) {
  .section-samples .video-card {
    width: 180px;
  }
}

.section-samples .video-card:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}

.section-samples .video-card.sample-video-slot:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}

.section-samples .video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.section-samples .carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
  z-index: 2;
  transition: all 0.2s;
}

.section-samples .carousel-nav:hover {
  background: #f5f5f5;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.section-samples .carousel-nav.left { left: 12px; }
.section-samples .carousel-nav.right { right: 12px; }

@media (max-width: 768px) {
  .section-samples .carousel-nav { display: none; }
}

/* Vídeos exemplo — compacto (acima do passo 2 em Imitar Movimento) */
.samples-compact-wrap {
  margin: 16px 0 20px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.samples-compact-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 2px;
}

.samples-compact-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0 0 10px;
  opacity: 0.9;
}

.samples-wrap.samples-compact {
  margin: 0 -12px;
}

.samples-compact .samples-track {
  gap: 6px;
  padding: 0 12px;
  align-items: center;
}

.samples-compact .sample-thumb.video-card {
  position: relative;
  width: 90px;
  min-width: 90px;
  flex-shrink: 0;
  aspect-ratio: 9/16;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
  border: none;
  outline: none;
  box-shadow: none;
}
/* Vídeo horizontal na biblioteca (ex.: motionref 16:9) */
.samples-compact .sample-thumb.video-card.sample-thumb--landscape {
  width: 132px;
  min-width: 132px;
  aspect-ratio: 16 / 9;
}

.samples-compact .sample-thumb.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  border-radius: inherit;
}

.sample-thumb-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,245,245,0.95);
  font-size: 0.7rem;
  font-weight: 500;
  color: #6b7280;
  pointer-events: none;
}

.sample-thumb.video-card.loaded .sample-thumb-loading {
  display: none;
}

.samples-compact .sample-thumb.video-card:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.samples-compact .carousel-nav {
  display: none;
}

/* Modal vídeo ampliado — compacto no celular */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  transition: opacity 0.2s;
  overflow: hidden;
}

.video-modal.hidden { display: none !important; }

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.video-modal-content {
  position: relative;
  background: #16161a;
  border-radius: 16px;
  max-width: min(90vw, 280px);
  max-height: 85vh;
  width: 100%;
  box-shadow: 0 16px 32px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.video-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.video-modal-close:hover {
  background: rgba(0,0,0,0.9);
}

.video-modal-player {
  position: relative;
  aspect-ratio: 9/16;
  width: 100%;
  max-height: min(45vh, 360px);
  flex-shrink: 0;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.video-modal-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: auto;
}

/* Overlay: canto inferior direito, compacto (só para erro ou mute) */
.video-modal-tap-play {
  position: absolute;
  bottom: 8px;
  right: 8px;
  left: auto;
  top: auto;
  inset: unset;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.65);
  border-radius: 20px;
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.2s;
}
.video-modal-tap-play.hidden { display: none !important; }
.video-modal-tap-play-icon {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.95);
  margin-bottom: 0;
}
.video-modal-tap-play-text {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.9);
}

/* Erro: overlay fullscreen para "Abrir em nova aba" ter área clicável */
.video-modal-tap-play.is-error {
  inset: 0;
  bottom: auto;
  right: auto;
  left: auto;
  top: auto;
  flex-direction: column;
  padding: 16px;
  background: rgba(0,0,0,0.75);
  border-radius: 0;
}
.video-modal-tap-play.is-error .video-modal-tap-play-icon { font-size: 2rem; margin-bottom: 8px; }
.video-modal-tap-play.is-error .video-modal-tap-play-text { font-size: 0.85rem; }

/* Link expirado: overlay dedicado, visual limpo */
.video-modal-expired {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(20,20,24,0.95) 0%, rgba(10,10,12,0.98) 100%);
  z-index: 3;
}
.video-modal-expired.hidden { display: none !important; }
.video-modal-expired-icon {
  font-size: 3rem;
  opacity: 0.7;
  filter: grayscale(0.3);
}
.video-modal-expired-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
}
.video-modal-expired-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  text-align: center;
}
.video-modal-expired-btn {
  margin-top: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.video-modal-expired-btn:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
.video-modal-player.has-expired video {
  opacity: 0;
  pointer-events: none;
}

.video-modal-actions {
  padding: 12px 14px;
  background: #1e1e22;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.video-modal-prompt-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.video-modal-prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.video-modal-prompt-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.video-modal-prompt-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}
.video-modal-copy-prompt,
.video-modal-redo-inline {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  padding: 2px 8px;
  cursor: pointer;
  line-height: 1.6;
  transition: background 0.15s, color 0.15s;
}
.video-modal-copy-prompt:hover { background: rgba(255,255,255,0.16); color: #fff; }
.video-modal-redo-inline {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
}
.video-modal-redo-inline:hover { background: #1d4ed8; }

.video-modal-prompt {
  margin: 0;
  padding: 8px 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.9);
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  max-height: 150px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}
.video-modal-prompt.expanded {
  max-height: 150px;
}
.video-modal-prompt.hidden { display: none !important; }
.video-modal-prompt-wrap:has(.video-modal-prompt.hidden) { display: none !important; }
.video-modal-prompt-ver-mais { display: none !important; }

.video-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.video-modal-download-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  flex-shrink: 0;
}
.video-modal-download-wrap .btn-share {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  width: 100%;
}
/* Copiar link do vídeo — oculto em toda a aplicação */
.btn-copy-link {
  display: none !important;
}
.video-modal-download-wrap .btn-copy-link {
  background: #3b82f6;
  color: white;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.video-modal-download-wrap .btn-copy-link:hover {
  background: #2563eb;
  color: white;
}

.btn-imitar-movimento {
  display: block;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: white;
  font-family: inherit;
  cursor: pointer;
  border: none;
  width: 100%;
  background: #fff;
  color: #111;
  transition: background 0.2s, color 0.2s;
}

.btn-imitar-movimento:hover {
  background: #f0f0f0;
  color: #111;
}

/* Toast de aviso — básico, cores do site (z-index acima do modal para "Link copiado" aparecer) */
.notice-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2100;
  max-width: min(400px, calc(100vw - 48px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  animation: noticeToastIn 0.25s ease;
}
.notice-toast.hidden {
  display: none !important;
}
@keyframes noticeToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.notice-toast-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  flex: 1;
  color: var(--text);
}
.notice-toast-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.notice-toast-close:hover {
  background: var(--border);
  color: var(--text);
}
.notice-toast-action {
  flex-shrink: 0;
}
.notice-toast-action.hidden { display: none !important; }
.notice-toast-btn {
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--text);
  color: var(--bg-card);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.notice-toast-btn:hover {
  opacity: 0.9;
}

/* Modal Suporte */
.support-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}
.support-modal.hidden { display: none !important; }
.support-modal-backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}
.support-modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
  padding: 28px 24px;
}
.support-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #6b6b6b;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 8px;
}
.support-modal-close:hover { background: #f3f4f6; color: #1a1a1a; }
.support-modal-title { margin: 0 0 8px; font-size: 1.25rem; font-weight: 600; color: #1a1a1a; }
.support-modal-sub { margin: 0 0 20px; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.support-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.support-form label { font-size: 0.9rem; font-weight: 500; color: var(--text); }
.support-form input,
.support-form textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg-card);
}
.support-form textarea { resize: vertical; min-height: 100px; }
.support-modal-btn {
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  background: var(--btn-bg);
  color: white;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.support-modal-btn:hover { background: var(--btn-hover); }
.support-modal-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 22px 0 14px;
}
.support-modal-cancel-label {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.support-cancel-sub-btn {
  width: 100%;
  margin-top: 0;
}

/* Toast: vídeo sendo gerado — não sair da página */
.generation-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  padding: 14px 24px;
  background: var(--text);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: generation-toast-in 0.25s ease-out;
}
@keyframes generation-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Banner discreto: X vídeos em geração + Aguarde (z-index abaixo dos modais 2000) */
.generating-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #1a202c;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: opacity 0.2s, transform 0.2s;
}
.generating-banner.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
}
.generating-banner-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  opacity: 0.9;
}
.generating-banner-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.generating-banner-btn:hover {
  background: rgba(255,255,255,0.25);
}

/* Variante inline: minimalista, abaixo de "Como funciona", alinhada à estética do site — sem sobrepor header */
.generating-banner-inline {
  position: relative !important;
  left: auto !important;
  bottom: auto !important;
  top: auto !important;
  right: auto !important;
  transform: none !important;
  z-index: auto !important;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  align-self: stretch;
  margin: 20px 0 24px;
  margin-left: 0;
  margin-right: 0;
  padding: 10px 14px !important;
  background: var(--bg-soft) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted) !important;
  font-size: 0.85rem !important;
  font-weight: 400 !important;
  box-shadow: none !important;
  align-items: flex-start !important;
}
.generating-banner-avisos-block {
  flex: 1;
  min-width: 0;
  position: relative;
  padding-right: 36px;
}
.generating-banner-avisos-block.hidden {
  display: none !important;
}
.generating-banner-dismiss {
  position: absolute;
  top: -2px;
  right: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.generating-banner-dismiss:hover {
  background: var(--border);
  color: var(--text);
}
.generating-banner-generation-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.generating-banner-generation-block--solo {
  flex: 1;
  align-items: flex-start !important;
  align-self: stretch;
  min-width: 0;
}
.generating-banner-inline .generating-banner-icon {
  width: 16px !important;
  height: 16px !important;
  color: var(--text-muted);
  opacity: 0.7;
}
.generating-banner-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  text-align: left;
  flex: 1;
  min-width: 0;
}
.generating-banner-title {
  margin: 0 0 2px;
  padding-right: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.generating-banner-inline .generating-banner-generation-block .generating-banner-text {
  color: var(--accent);
  font-weight: 500;
  padding: 4px 10px;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  text-align: left;
}
.generating-banner-inline .generating-banner-generation-block .generating-banner-text.hidden {
  display: none !important;
}
.generating-banner-inline .generating-banner-aguarde.hidden {
  display: none !important;
}
.generating-banner-pro-ultra-hint {
  font-size: 0.8rem;
  opacity: 0.9;
  color: var(--text-muted);
  text-align: left;
}
.generating-banner-pro-ultra-hint.hidden {
  display: none !important;
}
.generating-banner-hint-list {
  margin: 4px 0 0;
  padding-left: 18px;
  line-height: 1.55;
}
.generating-banner-hint-list li {
  margin-bottom: 2px;
}
.generating-banner-hint-list li:last-child {
  margin-bottom: 0;
}
.generating-banner-inline .generating-banner-btn,
.generating-banner-inline .generating-banner-aguarde {
  padding: 4px 10px !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  background: rgba(37, 99, 235, 0.08) !important;
  color: var(--accent) !important;
  border: none;
  border-radius: 6px;
}
.generating-banner-aguarde {
  flex-shrink: 0;
  display: inline-block;
}
.generating-banner-inline .generating-banner-btn:hover {
  background: rgba(37, 99, 235, 0.12) !important;
  color: var(--accent) !important;
}
.generating-banner-inline.hidden {
  transform: none !important;
}

@media (max-width: 540px) {
  .generating-banner-inline {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px !important;
  }
  .generating-banner-inline .generating-banner-icon {
    margin-top: 2px;
  }
  .generating-banner-avisos-block {
    padding-right: 0;
    flex-basis: calc(100% - 28px);
  }
  .generating-banner-generation-block {
    width: 100%;
    align-items: flex-start !important;
    padding-left: 24px;
  }
  .generating-banner-hint-list {
    padding-left: 14px;
  }
}
