/* NoorQuran video generator. Uses the shared design tokens. */
body{min-height:100vh;background:var(--bg);color:var(--text)}
.video-header{position:sticky;top:0;z-index:20}
.video-header .pill{display:inline-flex;align-items:center;gap:8px;text-decoration:none;min-height:44px;padding:0 16px}
.wrap{width:min(1440px,100%);margin:0 auto;padding:24px var(--space-page) 40px;display:grid;grid-template-columns:minmax(320px,430px) minmax(0,1fr);gap:24px;align-items:stretch}
.left,.right{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-soft);min-width:0}
.left{display:flex;flex-direction:column;max-height:calc(100vh - 128px);overflow:hidden}
.tabs{display:flex;gap:8px;padding:12px;border-bottom:1px solid var(--border);background:var(--surface-soft);border-radius:var(--radius-lg) var(--radius-lg) 0 0}
.tab{flex:1;border:1px solid transparent;background:transparent;color:var(--text-muted);border-radius:var(--radius-md);min-height:44px;padding:0 12px;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;font-weight:700;font-size:.92rem}
.tab:hover{background:var(--surface);color:var(--text);border-color:var(--border)}
.tab.on{background:color-mix(in srgb,var(--accent) 14%,var(--surface));border-color:var(--accent);color:var(--accent)}
.body{flex:1;overflow:auto;padding:18px}
.body::-webkit-scrollbar,.vlist::-webkit-scrollbar{width:8px}
.body::-webkit-scrollbar-thumb,.vlist::-webkit-scrollbar-thumb{background:var(--border);border-radius:999px}
.s{margin-bottom:18px}
.slbl{font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--text-soft);margin-bottom:10px}
.ssel,.ri{width:100%}
.ssel{background:var(--surface-soft);border:1px solid var(--border);color:var(--text);border-radius:var(--radius-md);min-height:46px;padding:0 14px;outline:none}
.ssel:focus{border-color:var(--accent)}
.sttxt{display:flex;align-items:center;gap:10px;color:var(--text-muted);font-size:.92rem;padding:12px 0}
.spin{width:18px;height:18px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:sp .7s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
.selrow{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
.sbtn,.o,.prevbtn,.genbtn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--border);background:var(--surface-soft);color:var(--text);border-radius:var(--radius-md);min-height:42px;padding:0 14px;cursor:pointer;font-weight:700}
.sbtn:hover,.o:hover,.prevbtn:hover,.genbtn:hover{border-color:var(--accent);color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,var(--surface))}
.sbtn{flex:1;font-size:.88rem}
.ogrp{display:flex;gap:10px;flex-wrap:wrap}
.o{font-size:.88rem}
.o.on{border-color:var(--accent);color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,var(--surface))}
.rrow{display:flex;align-items:center;gap:12px}
.ri{accent-color:var(--accent)}
.rv{min-width:42px;text-align:right;color:var(--accent);font-weight:800}
.vlist{border:1px solid var(--border);border-radius:var(--radius-md);overflow:auto;max-height:330px;margin-top:12px;background:var(--bg-soft)}
.vli{display:grid;grid-template-columns:34px minmax(0,1fr) 24px;gap:10px;align-items:start;padding:12px 14px;border-bottom:1px solid var(--border);cursor:pointer;transition:background .18s,border-color .18s}
.vli:last-child{border-bottom:0}
.vli:hover{background:var(--surface)}
.vli.on{background:color-mix(in srgb,var(--accent) 12%,var(--surface));box-shadow:inset 3px 0 0 var(--accent)}
.vli-n{color:var(--accent);font-weight:800}
.vli-ar{font-family:var(--font-arabic);direction:rtl;text-align:right;line-height:1.65;font-size:1.12rem;color:var(--text)}
.vck{width:22px;height:22px;border:1px solid var(--border);border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--accent);font-size:.75rem}
.video-help-note,.video-muted-note,.video-export-note,.pmeta,.qempty,.qtot,.plbl,.pphase{color:var(--text-muted);line-height:1.6}
.video-help-note{padding:14px 16px;background:var(--surface-soft);border:1px solid var(--border);border-radius:var(--radius-md)}
.qempty{text-align:center;padding:24px;background:var(--surface-soft);border:1px dashed var(--border);border-radius:var(--radius-md)}
.qi,.tli{display:flex;align-items:center;gap:10px;background:var(--surface-soft);border:1px solid var(--border);border-radius:var(--radius-md);padding:10px 12px;margin-bottom:8px}
.qi{cursor:grab}
.qi:active{cursor:grabbing}
.qi-i,.qi-ref,.tlref,.tldur{color:var(--text-muted);font-size:.84rem;white-space:nowrap}
.qi-ar{font-family:var(--font-arabic);direction:rtl;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qi-rm{border:0;background:transparent;color:var(--text-muted);cursor:pointer;font-size:1rem}
.qi-rm:hover{color:var(--accent)}
.genbtn{width:100%;min-height:50px;background:var(--accent);border-color:var(--accent);color:#061113;font-size:.95rem}
.genbtn:hover{background:var(--accent-hover);border-color:var(--accent-hover);color:#061113}
.genbtn:disabled{opacity:.5;cursor:not-allowed}
.prevbtn{width:100%}
.prog{display:none;margin-top:16px;background:var(--surface-soft);border:1px solid var(--border);border-radius:var(--radius-md);padding:14px}
.prog.on{display:block}
.pbar,.vpbar,.tlbar{background:var(--bg-soft);border-radius:999px;overflow:hidden}
.pbar{height:9px;margin-bottom:10px}
.pfill,.vpfill,.tlfill{height:100%;background:linear-gradient(90deg,var(--accent),var(--accent-hover));border-radius:999px;width:0%;transition:width .18s}
.vprogs{display:flex;flex-direction:column;gap:6px;margin-top:12px}
.vpi{display:grid;grid-template-columns:64px minmax(0,1fr) 54px;gap:8px;align-items:center}
.vpbar{height:6px}
.vpst,.vpref{color:var(--text-muted);font-size:.78rem}
.vpst{text-align:right}
.right{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;gap:16px;min-height:560px}
.cvframe{background:#000;border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-soft)}
#pcv{display:block;max-width:min(390px,86vw);max-height:58vh}
.tl{width:100%;max-width:520px}
.tltitle{font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--text-soft);margin-bottom:10px}
.tli.cur{border-color:var(--accent)}
.tli.done{border-color:var(--accent-hover)}
.tldot{width:8px;height:8px;border-radius:50%;background:var(--border)}
.tli.cur .tldot{background:var(--accent)}
.tli.done .tldot{background:var(--accent-hover)}
.tlbar{height:5px;flex:1}
.is-hidden{display:none}
.qbadge{color:var(--accent)}
.error-text{color:#e46969}
@media(max-width:960px){
  .wrap{grid-template-columns:1fr}
  .left{max-height:none}
  .right{min-height:auto}
}
@media(max-width:640px){
  .wrap{padding:16px;gap:16px}
  .tabs{flex-direction:column}
  .tab{justify-content:flex-start}
  .vli{grid-template-columns:28px minmax(0,1fr)}
  .vck{grid-column:1 / -1}
  .ogrp,.selrow{flex-direction:column}
  .o,.sbtn{width:100%;justify-content:flex-start}
}
