/* Visual inspirado no YouTube Create: escuro, previa grande, linha do tempo com agulha fixa no meio e ferramentas embaixo */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root { --fundo: #0f0f12; --painel: #1b1b21; --linha: #2a2a33; --texto: #f1f1f4; --suave: #9b9bab; --acento: #ff4e45; --roxo: #a58bff; --laranja: #ff8a5c; }
html, body { margin: 0; height: 100%; background: var(--fundo); color: var(--texto); font: 15px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overscroll-behavior: none; }
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); user-select: none; -webkit-user-select: none; }
button { background: var(--painel); color: var(--texto); border: none; border-radius: 12px; padding: 10px 14px; font: inherit; touch-action: manipulation; }
button:active { filter: brightness(1.3); }
button:disabled { opacity: .35; }
button.primario { background: var(--texto); color: #111; font-weight: 600; }
svg { width: 24px; height: 24px; fill: currentColor; display: block; }
input[type=text], input[type=password], input[type=number], select {
  width: 100%; padding: 14px; background: var(--painel); color: var(--texto); border: 1px solid var(--linha); border-radius: 12px; font: inherit;
}
input[type=range] { width: 100%; accent-color: var(--texto); }
.escondido { display: none !important; }
.tela { height: 100%; display: flex; flex-direction: column; }
.centro { margin: auto; width: min(360px, 88vw); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.logo { width: 92px; height: 92px; margin: 0 auto; border-radius: 22px; }
h1 { margin: 0; font-weight: 500; } h1 b { color: var(--roxo); }
.sub { margin: -6px 0 10px; color: var(--suave); }
.grande { font-size: 17px; padding: 15px; border-radius: 24px; }
.erro { color: #ff8a80; min-height: 1em; margin: 0; }
.detalhe { color: var(--suave); font-size: 13px; margin: 0; }

.topo { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.topo.transparente { position: absolute; top: env(safe-area-inset-top); left: 0; right: 0; z-index: 3; background: linear-gradient(#000a, #0000); }
.marca { flex: 1; font-size: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marca b { color: var(--roxo); }
.marca.pequeno { font-size: 15px; text-align: center; }
.icone { width: 42px; height: 42px; padding: 0; display: flex; align-items: center; justify-content: center; background: transparent; border-radius: 50%; }
.pilula { background: var(--texto); color: #111; font-weight: 700; border-radius: 20px; padding: 8px 18px; }
.ola { padding: 0 16px; color: var(--suave); margin: 4px 0; }
.titulo-secao { font-size: 17px; margin: 14px 16px 10px; }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding: 0 14px 24px; overflow-y: auto; }
.cartao { background: var(--painel); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; text-align: left; padding: 0; }
.cartao .capa { aspect-ratio: 16/10; background: linear-gradient(135deg, #3b2a8a, #6d4aff 60%, #ff8a5c); display: flex; align-items: flex-end; padding: 8px; font-size: 12px; font-weight: 600; }
.cartao .info { padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.cartao b { font-size: 15px; }
.cartao span { font-size: 12px; color: var(--suave); }

/* editor */
.editor { position: relative; }
.previa { position: relative; background: #000; height: 42vh; min-height: 200px; display: flex; justify-content: center; }
.previa video { height: 100%; max-width: 100%; }
.conta { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 20vh; font-weight: 800; color: #fff; text-shadow: 0 4px 24px #000; pointer-events: none; }
.conta:empty { display: none; }
.rec { position: absolute; bottom: 10px; left: 12px; background: var(--acento); color: #fff; font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 12px; animation: pisca 1s infinite; }
@keyframes pisca { 50% { opacity: .5; } }
.barra-play { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 6px 12px; }
.tempo { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--suave); }
.play { width: 48px; height: 48px; border-radius: 50%; padding: 0; display: flex; align-items: center; justify-content: center; background: transparent; }
.play svg { width: 34px; height: 34px; }
.desfazer { display: flex; justify-content: flex-end; }
.linha-tempo { position: relative; flex: 1; min-height: 150px; }
#linhaTempo { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.cabeca { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px #000; pointer-events: none; }
.cabeca::before { content: ""; position: absolute; top: -2px; left: -5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.dica-tempo { position: absolute; top: 4px; right: 10px; font-size: 11px; color: #ffd35c; pointer-events: none; }
.ferramentas { display: flex; gap: 2px; overflow-x: auto; padding: 6px 8px 4px; border-top: 1px solid var(--linha); background: var(--fundo); scrollbar-width: none; }
.ferramentas::-webkit-scrollbar { display: none; }
.ferr { flex: 1 0 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: transparent; font-size: 11px; color: var(--texto); padding: 6px 4px; border-radius: 10px; }
.ferr.ativo { color: #ffd35c; }
.ferr .bolinha { width: 44px; height: 44px; border-radius: 50%; background: var(--acento); display: flex; align-items: center; justify-content: center; margin-top: -8px; box-shadow: 0 2px 10px #ff4e4566; }
.ferr .bolinha.parar { background: var(--acento); animation: pisca 1s infinite; }
.ferr.contando .bolinha { background: #d4a017; }
.status { padding: 0 14px 8px; margin: 0; color: var(--suave); font-size: 12px; min-height: 1.3em; }

/* folha de baixo */
.folha-fundo { position: fixed; inset: 0; background: #0008; z-index: 20; display: flex; align-items: flex-end; }
.folha { width: 100%; background: #1d1d24; border-radius: 18px 18px 0 0; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); max-height: 80vh; overflow-y: auto; animation: sobe .18s ease-out; }
@keyframes sobe { from { transform: translateY(40%); opacity: .4; } }
.puxador { width: 40px; height: 4px; border-radius: 2px; background: #555; margin: 4px auto 12px; }
.folha h3 { margin: 0 0 14px; font-size: 17px; }
.folha label { display: block; margin-bottom: 14px; color: #ddd; }
.folha label > select, .folha label > input[type=number] { margin-top: 6px; }
.folha label.opcao { display: flex; align-items: center; gap: 10px; }
.largo { width: 100%; margin-top: 8px; padding: 14px; border-radius: 24px; }
.lista-opcoes { display: flex; flex-direction: column; gap: 8px; }
.lista-opcoes button { text-align: left; display: flex; align-items: center; gap: 10px; padding: 14px; }
.lista-opcoes button.ativo { outline: 2px solid var(--texto); }
.lista-opcoes .ponto { width: 12px; height: 12px; border-radius: 50%; }
.medidor { height: 10px; background: #2a2a35; border-radius: 5px; overflow: hidden; margin-top: 8px; }
.medidor div { height: 100%; width: 0; background: linear-gradient(90deg, #3ec9a7 60%, #f1c40f 85%, #e74c3c); }

.modal { position: fixed; inset: 0; background: #000b; display: flex; align-items: center; justify-content: center; z-index: 30; }
.caixa { background: #1d1d24; border-radius: 16px; padding: 22px 26px; text-align: center; min-width: 220px; }
.girando { width: 34px; height: 34px; margin: 0 auto 12px; border: 3px solid #444; border-top-color: #fff; border-radius: 50%; animation: gira 0.8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
