:root{--bg:#0b0f14;--fg:#e6edf3;--muted:#9da7b1;--card:#0b1220;--border:#1e293b;--accent:#1f6feb;--secondary:#30363d;--danger:#f43f5e;--success:#22c55e}
*{box-sizing:border-box}
body{font-family:system-ui,Segoe UI,Inter,Arial;margin:0;padding:24px;background:var(--bg);color:var(--fg)}
/* Mídia fluida */
img, video{max-width:100%;height:auto}
h1{font-size:20px;margin:0 0 12px}
.header{margin-bottom:12px}
.bar{display:flex;gap:8px;flex-wrap:wrap}
button, .btn{background:var(--accent);border:none;color:#fff;padding:10px 14px;border-radius:8px;cursor:pointer;transition:background-color .18s ease, transform .18s ease, color .18s ease}
/* Imagens dentro de botões: animação sutil ao hover */
.btn img{transition:transform .18s ease, opacity .18s ease, filter .18s ease}
.btn:hover img{transform:scale(1.06)}
button.secondary, .btn.secondary, .btn-secondary{background:var(--secondary);color:#fff}
button.btn-outline, .btn.btn-outline{background:transparent;border:1px solid var(--border);color:var(--fg)}
button.btn-primary, .btn.btn-primary{background:var(--accent);color:#fff}
/* Hover simples e direto, sem glow */
button:hover, .btn:hover{filter:brightness(1.04);transform:translateY(-1px)}
button.secondary:hover, .btn.secondary:hover, .btn-secondary:hover{filter:brightness(1.04)}
button.btn-outline:hover, .btn.btn-outline:hover{background:#0f172a}
button:active, .btn:active{transform:translateY(0)}
button:disabled, .btn:disabled{opacity:.6;cursor:not-allowed;filter:none;box-shadow:none;pointer-events:none}
/* Variações desativadas mais perceptíveis */
.btn-secondary:disabled{background:#1a202e;color:#8b92a1}
.btn-outline:disabled{border-color:#2a3447;color:#8b92a1}
.grid{display:grid;grid-template-columns:1fr;gap:12px}
.card{border:1px solid var(--border);border-radius:12px;padding:12px;background:var(--card)}
.card-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.badge{display:inline-block;border:1px solid var(--border);border-radius:999px;padding:4px 10px;color:var(--muted)}
.cols{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.line{display:flex;align-items:center;justify-content:space-between;border-bottom:1px dashed var(--border);padding:6px 0}
.label{color:var(--muted)}
.actions{margin-top:10px;display:flex;gap:8px}
/* Evitar quebra de layout em telas pequenas */
.actions{flex-wrap:wrap}
pre{background:#0f172a;border:1px solid var(--border);padding:12px;border-radius:8px;overflow:auto;max-height:50vh}
/* Área de saída de roteiro sem overflow horizontal */
.script-output{white-space:pre-wrap;word-break:break-word}
.ok{color:var(--success)}
.error{color:var(--danger)}
.msg{margin-bottom:8px;padding:8px 12px;border:1px solid var(--border);border-radius:8px;color:var(--muted);background:#0f172a}
.text-muted{color:var(--muted)}
.tabs .btn{min-width:100px}
.mt-3{margin-top:12px}
/* Login inicial centralizado */
.login-card{max-width:520px;margin:24px auto}
/* Utilitário para esconder elementos (equivalente ao Tailwind .hidden) */
/* Forçar ocultação – especificidade máxima */
.hidden,
.hidden.hidden,
#email-step.hidden,
#otp-step.hidden{display:none !important}

/* Lista de vídeos */
.video-list{display:grid;grid-template-columns:1fr;gap:10px}
.video-item{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--border);border-radius:10px;padding:8px;background:#0f172a}
.video-item img{width:160px;height:auto;border-radius:8px}
.video-item .meta{display:flex;flex-direction:column;gap:4px}
.video-item .title{color:var(--fg);font-weight:600}
.video-item .channel{color:var(--muted);font-size:.9em}
.video-item .actions{margin-top:6px}
.video-item .actions a{color:#7aa2ff;text-decoration:none}
.video-item .actions a:hover{text-decoration:underline}
/* Responsividade para lista de vídeos */
@media (max-width:640px){
  .video-item{flex-direction:column}
  .video-item img{width:100%}
  .tabs .btn{min-width:unset}
}
/* Botões mais compactos em telas pequenas */
@media (max-width:480px){
  button, .btn{padding:8px 10px}
}
/* ===== Responsividade adicional ===== */
@media (max-width:640px){
  .card{ padding:10px }
}

@media (max-width:768px){
  h1{font-size:clamp(22px,4.5vw,28px)}
  h2{font-size:clamp(18px,3.8vw,22px)}
  h3{font-size:clamp(16px,3vw,20px)}
}
/* ===== Uniformização de controles de formulário com tema escuro ===== */
:root{ color-scheme: dark }
select,
input[type="text"], input[type="search"], input[type="email"], input[type="number"],
textarea{
  background: var(--surface, #0f172a);
  color: var(--fg, #e5e7eb);
  border: 1px solid var(--border, #1f2a44);
  border-radius: 8px;
}

select{
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23a3aed0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 28px;
}

select:hover{ border-color: var(--border-strong, #2a3b6b); }
select:focus{ outline: 0; box-shadow: none; border-color: var(--border, #1f2a44); }
/* Remover destaque de foco especificamente no seletor de duração */
#roteiro-duration:focus, #roteiro-duration:focus-visible{
  outline: none;
  box-shadow: none;
  border-color: var(--border, #1f2a44);
}
option{ background-color: var(--surface, #0f172a); color: var(--fg, #e5e7eb); }
/* Barra de progresso */
.progress{width:100%;height:10px;background:rgba(255,255,255,0.1);border-radius:6px;overflow:hidden}
.progress-bar{height:100%;background:linear-gradient(90deg,#7aa2ff,#a78bfa);transition:width .3s ease}
.progress.indeterminate .progress-bar{position:relative;width:30%;animation:progress-slide 1.2s infinite}
@keyframes progress-slide{0%{margin-left:-30%}50%{margin-left:50%}100%{margin-left:100%}}
.progress-items{display:flex;flex-direction:column;gap:6px}
.progress-item{display:flex;flex-direction:column;gap:4px}
.progress-item .label{font-size:.9em;color:var(--muted)}
.loading{animation:pulse 1s infinite alternate}
@keyframes pulse{from{opacity:.6}to{opacity:1}}