@font-face{font-family:Vazirmatn;src:url('/fonts/video-title/Vazirmatn.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}@font-face{font-family:Sahel;src:url('/fonts/video-title/Sahel.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}@font-face{font-family:"Noto Sans Arabic";src:url('/fonts/video-title/NotoSansArabic.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}@font-face{font-family:"Noto Naskh Arabic";src:url('/fonts/video-title/NotoNaskhArabic.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}@font-face{font-family:Tanha;src:url('/fonts/video-title/Tanha.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}@font-face{font-family:Samim;src:url('/fonts/video-title/Samim.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}@font-face{font-family:Gandom;src:url('/fonts/video-title/Gandom.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}@font-face{font-family:Shabnam;src:url('/fonts/video-title/Shabnam.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}@font-face{font-family:Lalezar;src:url('/fonts/video-title/Lalezar.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}@font-face{font-family:Nahid;src:url('/fonts/video-title/Nahid.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}body.video-studio-open{overflow:hidden}.video-studio-modal{position:fixed;inset:0;z-index:220;display:grid;place-items:center;padding:20px;font-family:Vazirmatn,sans-serif;color:#eef2f8}.video-studio-backdrop{position:absolute;inset:0;background:#03060bd9;backdrop-filter:blur(16px)}.video-studio-dialog{position:relative;width:min(1040px,100%);max-height:calc(100dvh - 40px);overflow:auto;scrollbar-width:none;border:1px solid #354257;border-radius:24px;background:#0c131d;box-shadow:0 36px 120px #000d}.video-studio-dialog>header{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;border-bottom:1px solid #ffffff16;background:#0c131df2;backdrop-filter:blur(12px)}.video-studio-dialog>header span{color:#a98af4;font-size:10px;font-weight:800}.video-studio-dialog>header h2{margin:4px 0;font-size:22px}.video-studio-dialog>header p{margin:0;color:#8794a7;font-size:10px}.video-studio-dialog>header button{display:grid;place-items:center;width:38px;height:38px;border:1px solid #354258;border-radius:12px;background:#131e2b;color:#cbd5e3;cursor:pointer}.video-studio-dialog svg{width:18px;height:18px}.video-studio-body{padding:22px}.video-studio-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(260px,.75fr);gap:18px}.video-config,.video-order{min-width:0}.video-field-head{display:flex;align-items:end;justify-content:space-between;gap:15px;margin:4px 0 10px}.video-field-head>div{display:flex;align-items:center;gap:8px}.video-field-head span{display:grid;place-items:center;width:27px;height:27px;border-radius:8px;background:#271b43;color:#b799ff;font-size:9px;font-weight:900}.video-field-head strong{font-size:12px}.video-field-head small{color:#778498;font-size:8px}.video-template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-bottom:23px}.video-template-card input,.video-ratio-grid input{position:absolute;opacity:0;pointer-events:none}.video-template-card>span{display:flex;flex-direction:column;min-height:176px;padding:14px;border:1px solid #2c394c;border-radius:16px;background:#101925;cursor:pointer;transition:.2s}.video-template-card input:checked+span{border-color:#956bf0;background:linear-gradient(145deg,#251a3c,#111d29);box-shadow:inset 0 0 0 1px #956bf04d}.video-template-card b{margin-top:13px;font-size:11px}.video-template-card small{margin-top:5px;color:#7e8b9e;font-size:8px;line-height:1.75}.video-template-card i,.video-preview-viz i,.video-rendering-art i{position:relative;display:flex;align-items:center;justify-content:center;height:64px;border-radius:11px;overflow:hidden;background:radial-gradient(circle,var(--brand-b,#22d3ee) 0,transparent 58%),#080d14}.video-art-wave b{width:4px;margin:0 2px;border-radius:8px;background:linear-gradient(#bca5ff,#32d6ee);animation:videoBars 1.1s ease-in-out infinite alternate}.video-art-wave b:nth-child(1),.video-art-wave b:nth-child(7){height:16px}.video-art-wave b:nth-child(2),.video-art-wave b:nth-child(6){height:29px;animation-delay:.2s}.video-art-wave b:nth-child(3),.video-art-wave b:nth-child(5){height:44px;animation-delay:.4s}.video-art-wave b:nth-child(4){height:56px;animation-delay:.1s}.video-art-orbit:before,.video-art-orbit:after{content:"";position:absolute;border:3px solid #a987ff;border-radius:50%}.video-art-orbit:before{width:42px;height:42px;box-shadow:0 0 22px #9a72f0}.video-art-orbit:after{width:28px;height:28px;border-style:dashed;border-color:#2fe1e8;animation:videoSpin 5s linear infinite}.video-art-orbit b{width:12px;height:12px;border-radius:50%;background:#fff}.video-art-cosmos{gap:4px}.video-art-cosmos:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 25% 25%,#fff 0 1px,transparent 2px),radial-gradient(circle at 75% 40%,#fff 0 1px,transparent 2px),radial-gradient(circle at 60% 75%,#fff 0 1px,transparent 2px)}.video-art-cosmos b{width:7px;border-radius:7px 7px 0 0;background:linear-gradient(#38dbea,#8b5cf6)}.video-art-cosmos b:nth-child(1){height:20px}.video-art-cosmos b:nth-child(2){height:39px}.video-art-cosmos b:nth-child(3){height:56px}.video-art-cosmos b:nth-child(4){height:34px}.video-art-cosmos b:nth-child(5){height:15px}.video-ratio-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.video-ratio-grid label>span{display:flex;align-items:center;gap:9px;padding:10px;border:1px solid #2c394c;border-radius:12px;background:#101925;cursor:pointer}.video-ratio-grid input:checked+span{border-color:#8660d3;background:#211932}.video-ratio-grid i{display:block;width:24px;aspect-ratio:var(--ratio);max-height:30px;border:2px solid #9b82d6;border-radius:4px}.video-ratio-grid b{font-size:9px}.video-ratio-grid small{display:block;color:#748196;font-size:7px}.video-brand-select{display:grid;gap:6px;margin-top:15px;color:#aab5c4;font-size:9px}.video-brand-select select{width:100%;height:42px;padding:0 12px;border:1px solid #303e52;border-radius:11px;background:#0c1521;color:#e2e8f0;font:inherit}.video-brand-select small{color:#748196}.video-order{position:sticky;top:112px;align-self:start;padding:15px;border:1px solid #313e52;border-radius:17px;background:#101925}.video-preview-card{display:grid;place-items:center;min-height:245px;padding:20px;border:1px solid #ffffff18;border-radius:13px;background:radial-gradient(circle at 50% 30%,color-mix(in srgb,var(--brand-b) 35%,transparent),transparent 45%),linear-gradient(145deg,#141827,#070b12);text-align:center}.video-preview-cover{display:grid;place-items:center;width:82px;height:82px;border-radius:18px;background:linear-gradient(145deg,var(--brand-a),var(--brand-b));font-size:28px}.video-preview-viz{width:90%;margin:15px 0 8px}.video-preview-viz i{height:45px;background:transparent}.video-preview-card>strong{font-size:11px}.video-preview-card>small{margin-top:4px;color:#93a0b1;font-size:8px}.video-quote{display:grid;grid-template-columns:1fr auto;gap:4px;margin-top:12px;padding:12px;border-radius:11px;background:#0a121c}.video-quote span{color:#98a5b7;font-size:8px}.video-quote strong{color:#c4a9ff;font-size:12px}.video-quote small{grid-column:1/-1;color:#69778a;font-size:7px}.video-create-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:45px;margin-top:10px;border:1px solid #9c75ed;border-radius:11px;background:linear-gradient(135deg,#8b5cf6,#6640b8);color:#fff;font:800 10px Vazirmatn;cursor:pointer}.video-create-button:disabled{cursor:not-allowed;filter:grayscale(.5);opacity:.5}.video-engine-warning,.video-form-status{margin:10px 0 0;color:#e89baa;font-size:8px;line-height:1.8}.video-job-state{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(260px,.85fr);align-items:center;gap:24px;min-height:430px}.video-job-visual{display:grid;place-items:center;min-height:390px;overflow:hidden;border:1px solid #2e3a4d;border-radius:18px;background:radial-gradient(circle at 50% 40%,#6f49aa30,transparent 48%),#09101a}.video-job-visual video{display:block;width:100%;max-height:68dvh;background:#05080d}.video-rendering-art{position:relative;width:min(390px,80%);aspect-ratio:1;display:grid;place-items:center;border-radius:50%;background:#0e1724;box-shadow:0 0 90px #7853bd38}.video-rendering-art>i{width:75%;height:46%;background:transparent}.video-rendering-art>span{position:absolute;display:grid;place-items:center;width:82px;height:82px;border:1px solid #916ce2;border-radius:50%;background:#151c2a;font-size:17px;font-weight:900}.video-job-copy>span{color:#a587ed;font-size:9px;font-weight:800}.video-job-copy h3{margin:7px 0 10px;font-size:21px;line-height:1.7}.video-job-copy p{margin:0;color:#8e9aac;font-size:10px;line-height:2}.video-progress{display:flex;align-items:center;gap:10px;margin-top:18px}.video-progress i{flex:1;height:7px;overflow:hidden;border-radius:9px;background:#202b3a}.video-progress b{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#8b5cf6,#22d3ee);transition:width .4s}.video-progress small{width:38px;color:#a9b5c5;font-size:9px}.video-job-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:22px}.video-job-actions :is(a,button){display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:9px 14px;border:1px solid #39475d;border-radius:10px;background:#121d2a;color:#dce4ef;font:700 9px Vazirmatn;text-decoration:none;cursor:pointer}.video-job-actions .primary{border-color:#8963d9;background:#7149c4;color:#fff}.video-studio-loading,.video-studio-error{display:grid;place-items:center;min-height:390px;text-align:center}.video-studio-loading i{width:34px;height:34px;border:3px solid #29364a;border-top-color:#9e78e9;border-radius:50%;animation:videoSpin .8s linear infinite}.video-studio-loading span{margin-top:10px;color:#8d99aa;font-size:9px}.video-studio-error span{display:grid;place-items:center;width:45px;height:45px;border-radius:14px;background:#52283a;color:#ffb0bd;font-size:22px}.video-studio-error h3{margin:12px 0 5px}.video-studio-error p{color:#929faf;font-size:9px}.video-studio-error button{padding:9px 14px;border:1px solid #44526a;border-radius:9px;background:#152132;color:#fff;font:inherit}@keyframes videoSpin{to{transform:rotate(360deg)}}@keyframes videoBars{to{transform:scaleY(.42)}}

/* --- CSS variables & gradient backgrounds --- */
.video-preview-card{--primary-bg:#0c1526;--secondary-bg:#111d33}
.video-preview-card[data-background]{background:var(--primary-bg,#0c1526)}
.video-preview-card[data-background=midnight]{--primary-bg:#0a1128;background:linear-gradient(135deg,#0a1128,#0d1f3c,#07142a)}
.video-preview-card[data-background=twilight]{--primary-bg:#1a0a2e;background:linear-gradient(160deg,#1a0a2e,#1e1145,#0d1538)}
.video-preview-card[data-background=ember]{--primary-bg:#1a0d08;background:linear-gradient(145deg,#1a0d08,#201209,#150a05)}
.video-preview-card[data-background=ocean-deep]{--primary-bg:#06181a;background:linear-gradient(150deg,#06181a,#0b2628,#051415)}
.video-preview-card[data-background=slate]{--primary-bg:#11151a;background:linear-gradient(135deg,#11151a,#181d24,#0e1115)}
.video-preview-card[data-background=noir]{--primary-bg:#0a0a0c;background:linear-gradient(155deg,#0a0a0c,#111013,#080809)}
.video-preview-card[data-background=aurora-grad]{--primary-bg:#061a1f;background:linear-gradient(140deg,#061a1f,#091f30,#051218)}
.video-preview-card[data-background=velvet]{--primary-bg:#1a0c14;background:linear-gradient(150deg,#1a0c14,#24121c,#130910)}
.video-preview-card[data-background=cosmos-grad]{--primary-bg:#0a0c1f;background:linear-gradient(160deg,#0a0c1f,#121644,#090a1a)}
.video-preview-card[data-background=olive]{--primary-bg:#0d1308;background:linear-gradient(145deg,#0d1308,#141c0a,#0a0f06)}

/* --- New visualizer template mini previews --- */
.video-art-bars2,.video-art-neon,.video-art-rings{position:relative;overflow:hidden;border-radius:16px}
.video-art-bars2{display:flex;flex-direction:column;justify-content:center;gap:3px;padding:0 10px;background:linear-gradient(135deg,#0d1c2c,#091421)}
.video-art-bars2 b{height:var(--h,10px);width:100%;border-radius:5px;background:linear-gradient(90deg,var(--brand-a,#8b5cf6),var(--brand-b,#22d3ee))}
.video-art-bars2 b:nth-child(2),.video-art-bars2 b:nth-child(4){--h:16px}.video-art-bars2 b:nth-child(5),.video-art-bars2 b:nth-child(7){--h:8px}
.video-art-neon{display:grid;place-items:center}.video-art-neon:before{content:"";width:55%;aspect-ratio:1;border:2px solid var(--brand-a,#8b5cf6);border-radius:50%;box-shadow:0 0 18px var(--brand-a,#8b5cf6)}.video-art-neon:after{position:absolute;content:"";width:32%;aspect-ratio:1;border:2px dashed var(--brand-b,#22d3ee);border-radius:50%;animation:videoSpin 5s linear infinite}
.video-art-rings{display:grid;place-items:center}.video-art-rings:before,.video-art-rings:after,.video-art-rings i{content:"";position:absolute;border:2px solid color-mix(in srgb,var(--brand-a) var(--op,65%),transparent);border-radius:50%;animation:videoRingPulse 2.5s ease-in-out infinite alternate}.video-art-rings:before{width:55%;height:55%;--op:75%}.video-art-rings:after{width:35%;height:35%;--op:85%;animation-delay:.4s}.video-art-rings i{width:18%;height:18%;--op:100%;border-color:var(--brand-b,#22d3ee);animation-delay:.8s}@keyframes videoRingPulse{to{transform:scale(1.18);opacity:.6}}

/* --- Editor tabs refinement --- */
.video-editor-tabs{display:flex;gap:6px;margin-bottom:18px;padding:4px;border-radius:14px;background:#0d1a28;overflow-x:auto;scrollbar-width:none}.video-editor-tabs::-webkit-scrollbar{display:none}.video-editor-tabs button{flex:1;min-width:max-content;padding:9px 14px;border:1px solid transparent;border-radius:11px;background:transparent;color:#8a9ab5;font:700 10px Vazirmatn;cursor:pointer;transition:.2s;white-space:nowrap}.video-editor-tabs button:hover{color:#cbd7e8;background:#131e2f}.video-editor-tabs button.is-active,.video-editor-tabs button[aria-selected=true]{border-color:#5b456b;background:#261b3d;color:#d4b5ff;box-shadow:0 2px 10px #392a4e55}.video-editor-panel[hidden]{display:none!important}

/* --- Collision feedback --- */
.video-preview-card[data-collision=detected] > [data-logo-size-preview]{box-shadow:0 0 12px #f87171a0,0 0 6px #ef4444}
.video-preview-card[data-collision=resolved] > [data-logo-size-preview]{transition:top .35s ease,left .35s ease}
@media(max-width:760px){.video-studio-modal{align-items:end;padding:0}.video-studio-dialog{width:100%;max-height:calc(100dvh - env(safe-area-inset-top));border-radius:22px 22px 0 0}.video-studio-dialog>header{padding:17px 16px}.video-studio-dialog>header h2{font-size:19px}.video-studio-dialog>header p{display:none}.video-studio-body{padding:16px 14px calc(24px + env(safe-area-inset-bottom))}.video-studio-grid,.video-job-state{grid-template-columns:1fr}.video-template-grid{grid-template-columns:1fr}.video-template-card>span{display:grid;grid-template-columns:105px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;min-height:92px;gap:0 12px}.video-template-card i{grid-row:1/3;height:68px}.video-template-card b{align-self:end;margin:0}.video-template-card small{align-self:start}.video-field-head small{display:none}.video-ratio-grid label>span{display:grid;justify-items:center;gap:5px;text-align:center}.video-ratio-grid label>span small{display:none}.video-order{position:static}.video-preview-card{min-height:210px}.video-job-state{min-height:0}.video-job-visual{min-height:280px}.video-rendering-art{width:min(320px,78%)}.video-job-copy h3{font-size:18px}.video-job-actions{display:grid;grid-template-columns:1fr 1fr}.video-job-actions :is(a,button){width:100%;box-sizing:border-box}}
.video-job-actions .danger{border-color:#71394a;background:#311c24;color:#ffadba}.video-job-actions .danger:hover{background:#43212d}.video-job-actions .danger:disabled{cursor:wait;opacity:.6}

/* Modern template previews v3 */
.video-template-card i,.video-preview-viz i,.video-rendering-art i{background:radial-gradient(circle at 50% 55%,color-mix(in srgb,var(--brand-a,#8b5cf6) 28%,transparent),transparent 60%),#070c15;border:1px solid #ffffff0d;box-shadow:inset 0 1px #ffffff0b}
.video-art-wave{gap:4px;padding:0 13px;border-radius:22px!important}.video-art-wave b{width:4px!important;height:var(--h,20px)!important;margin:0!important;border-radius:8px;background:linear-gradient(180deg,#bca7ff,#31d9e8)!important;box-shadow:0 0 9px #825ff699;animation:videoModernBar 1.25s ease-in-out infinite alternate!important}.video-art-wave b:nth-child(1),.video-art-wave b:nth-child(13){--h:12px}.video-art-wave b:nth-child(2),.video-art-wave b:nth-child(12){--h:20px;animation-delay:-.7s!important}.video-art-wave b:nth-child(3),.video-art-wave b:nth-child(11){--h:29px;animation-delay:-.25s!important}.video-art-wave b:nth-child(4),.video-art-wave b:nth-child(10){--h:18px;animation-delay:-.9s!important}.video-art-wave b:nth-child(5),.video-art-wave b:nth-child(9){--h:36px;animation-delay:-.45s!important}.video-art-wave b:nth-child(6),.video-art-wave b:nth-child(8){--h:25px;animation-delay:-.1s!important}.video-art-wave b:nth-child(7){--h:42px;animation-delay:-.6s!important}
.video-art-orbit:before,.video-art-orbit:after,.video-art-orbit b,.video-art-orbit em{position:absolute;border-radius:50%;box-sizing:border-box}.video-art-orbit:before{content:"";width:50px;height:50px;border:2px dashed #2ed9e8;box-shadow:0 0 16px #22d3ee55;animation:videoSpin 7s linear infinite}.video-art-orbit:after{content:"";width:39px;height:39px;border:2px solid #a78bfa;border-left-color:transparent;border-bottom-color:#7b65e8;box-shadow:0 0 20px #8b5cf688;animation:videoSpin 3.8s linear infinite reverse}.video-art-orbit b{width:26px;height:26px;border:1px solid #ffffff1c;background:radial-gradient(circle,#1d2940,#080d16 72%)}.video-art-orbit em{width:6px;height:6px;background:#fff;box-shadow:0 0 13px #22d3ee;transform:translate(21px,-12px)}
.video-art-cosmos{position:relative}.video-art-cosmos:before{opacity:.55}.video-art-cosmos em{position:absolute;left:9%;right:9%;height:24px;border-top:2px solid #22d3ee;border-radius:50%;filter:drop-shadow(0 0 5px #22d3ee);animation:videoCosmosWave 2.8s ease-in-out infinite alternate}.video-art-cosmos em:nth-child(1){top:21px}.video-art-cosmos em:nth-child(2){top:28px;border-color:#8b7cf6;animation-delay:-1s}.video-art-cosmos em:nth-child(3){top:35px;border-color:#ded5ff;opacity:.45;animation-delay:-1.8s}.video-art-cosmos b{position:absolute;bottom:10px;width:3px!important;height:var(--h,12px)!important;margin:0!important;border-radius:5px!important;background:linear-gradient(#a78bfa,#22d3ee)!important;box-shadow:0 0 7px #765bea77;animation:videoModernBar 1.5s ease-in-out infinite alternate}.video-art-cosmos b:nth-of-type(1){left:25%;--h:8px}.video-art-cosmos b:nth-of-type(2){left:31%;--h:16px}.video-art-cosmos b:nth-of-type(3){left:37%;--h:27px}.video-art-cosmos b:nth-of-type(4){left:43%;--h:18px}.video-art-cosmos b:nth-of-type(5){left:49%;--h:11px}.video-art-cosmos b:nth-of-type(6){left:55%;--h:22px}.video-art-cosmos b:nth-of-type(7){left:61%;--h:30px}.video-art-cosmos b:nth-of-type(8){left:67%;--h:15px}.video-art-cosmos b:nth-of-type(9){left:73%;--h:9px}
@keyframes videoModernBar{to{transform:scaleY(.48);opacity:.62}}@keyframes videoCosmosWave{to{transform:translateY(5px) scaleY(.7)}}
.video-subtitle-toggle{display:flex;align-items:center;gap:11px;margin-top:12px;padding:11px 13px;border:1px solid #304158;border-radius:11px;background:#0c1521;color:#dce5f2;cursor:pointer}.video-subtitle-toggle input{width:18px;height:18px;margin:0;accent-color:#8b5cf6}.video-subtitle-toggle span{display:grid;gap:3px}.video-subtitle-toggle b{font-size:9px}.video-subtitle-toggle small{color:#7f8da1;font-size:8px;line-height:1.75}
.video-studio-dialog{display:flex;flex-direction:column;overflow:hidden}.video-studio-dialog>header{flex:0 0 auto}.video-studio-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.video-studio-form{min-height:100%}
@media(min-width:761px) and (max-height:760px){.video-studio-modal{padding:10px}.video-studio-dialog{max-height:calc(100dvh - 20px);border-radius:18px}.video-studio-dialog>header{padding:11px 18px}.video-studio-dialog>header h2{margin:2px 0;font-size:18px}.video-studio-dialog>header p{font-size:8px}.video-studio-body{padding:13px 16px 18px}.video-studio-grid{gap:12px}.video-field-head{margin:2px 0 7px}.video-template-grid{gap:7px;margin-bottom:13px}.video-template-card>span{min-height:126px;padding:10px}.video-template-card i{height:48px}.video-template-card b{margin-top:8px}.video-template-card small{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.video-ratio-grid label>span{padding:7px}.video-brand-select{margin-top:10px}.video-brand-select select{height:36px}.video-subtitle-toggle{margin-top:7px;padding:7px 10px}.video-order{top:86px;padding:11px}.video-preview-card{min-height:126px;padding:10px}.video-preview-cover{width:54px;height:54px;border-radius:13px;font-size:19px}.video-preview-viz{margin:7px 0 3px}.video-preview-viz i{height:30px}.video-quote{margin-top:7px;padding:8px}.video-create-button{min-height:40px;margin-top:7px}.video-form-status{margin-top:5px}}

/* Podcast video studio v4 */
.video-studio-backdrop{background:radial-gradient(circle at 72% 18%,#6843b62e,transparent 31%),#03060be8}.video-studio-dialog{width:min(1100px,100%);border-color:#334158;background:linear-gradient(155deg,#0d151f,#091019);box-shadow:0 42px 140px #000e}.video-studio-dialog>header{padding:18px 24px;background:#0b121beF}.video-studio-body{padding:22px 24px 26px}.video-studio-grid{grid-template-columns:minmax(0,1.5fr) minmax(310px,.82fr);gap:22px}.video-config{padding:18px;border:1px solid #263448;border-radius:20px;background:#0c141f}.video-field-head{align-items:center;margin:0 0 12px}.video-field-head span{border:1px solid #7654bd55;background:#231a38}.video-template-card>span{min-height:184px;border-color:#2b394c;background:#0e1722}.video-template-card input:checked+span{border-color:#9d7af2;background:linear-gradient(150deg,#241a3b,#101b29);box-shadow:0 12px 35px #6843bd20,inset 0 0 0 1px #a98cf34a}.video-template-card i{height:76px}.video-template-card b{font-size:11.5px}.video-template-card small{font-size:8.3px}.video-ratio-grid label>span{min-height:48px;border-color:#2b394c}.video-brand-select{margin-top:18px}.video-brand-select select{height:46px;border-color:#33435a;background:#09121d}.video-subtitle-toggle{min-height:58px;margin-top:10px;border-color:#354860;background:linear-gradient(135deg,#101b29,#0b1520)}.video-subtitle-toggle b{font-size:10px}.video-order{top:96px;padding:14px;border-color:#303f54;background:#0c151f}.video-preview-label{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 2px 10px}.video-preview-label span{color:#dfe6f1;font-size:9px;font-weight:800}.video-preview-label small{color:#728095;font-size:7px}.video-preview-card{position:relative;isolation:isolate;min-height:0;aspect-ratio:1;padding:8%;overflow:hidden;border-color:#ffffff1c;border-radius:17px;background:radial-gradient(circle at 50% 28%,color-mix(in srgb,var(--brand-b) 24%,transparent),transparent 42%),linear-gradient(150deg,#151b2b,#050910);box-shadow:inset 0 1px #ffffff13,0 18px 48px #0007}.video-preview-card:before{content:"";position:absolute;z-index:-1;inset:-18%;background:radial-gradient(circle,var(--brand-a) 0,transparent 58%);filter:blur(35px);opacity:.22}.video-preview-card[data-ratio=landscape]{aspect-ratio:16/9}.video-preview-card[data-ratio=portrait]{width:min(75%,235px);margin-inline:auto;aspect-ratio:9/16}.video-preview-cover{width:31%;height:auto;aspect-ratio:1;border:1px solid #ffffff22;border-radius:17%;box-shadow:0 18px 45px #0009,0 0 0 4px #ffffff08}.video-preview-cover.has-image{overflow:hidden;background:#101725}.video-preview-cover img{display:block;width:100%;height:100%;object-fit:cover}.video-preview-viz{width:82%;margin:10% 0 5%}.video-preview-viz i{height:42px;border-color:#ffffff0b;background:transparent}.video-preview-card>strong{max-width:90%;font-size:11px;line-height:1.7}.video-preview-card>small{font-size:7.5px}.video-preview-subtitle{position:absolute;right:9%;bottom:8%;left:9%;padding:5px 8px;border-radius:7px;background:#05070dcc;color:#fff;font-style:normal;font-size:8px;font-weight:900;box-shadow:0 8px 22px #0008}.video-preview-card[data-ratio=portrait] .video-preview-cover{width:56%}.video-preview-card[data-ratio=portrait] .video-preview-viz{width:91%;margin:13% 0 7%}.video-preview-card[data-ratio=portrait]>strong{font-size:10px}.video-preview-card[data-ratio=landscape]{grid-template-columns:38% 1fr;grid-template-rows:1fr auto auto;column-gap:8%;text-align:right}.video-preview-card[data-ratio=landscape] .video-preview-cover{grid-row:1/4;width:100%}.video-preview-card[data-ratio=landscape] .video-preview-viz{align-self:end;width:100%;margin:0}.video-preview-card[data-ratio=landscape]>strong,.video-preview-card[data-ratio=landscape]>small{justify-self:stretch}.video-preview-card[data-ratio=landscape] .video-preview-subtitle{right:46%;left:7%;text-align:center}.video-quote{margin-top:13px;border:1px solid #263448;background:#09121b}.video-create-button{min-height:48px;border-radius:13px;background:linear-gradient(135deg,#9568ed,#6941bd);box-shadow:0 12px 30px #7149c43b}.video-job-visual{background:radial-gradient(circle at 50% 35%,#724bb733,transparent 45%),#07101a}
@media(max-width:760px){.video-studio-dialog{border-radius:24px 24px 0 0}.video-studio-body{padding:14px 12px calc(22px + env(safe-area-inset-bottom))}.video-config{padding:13px;border-radius:17px}.video-template-card>span{grid-template-columns:116px minmax(0,1fr);min-height:102px}.video-template-card i{height:78px}.video-order{padding:12px}.video-preview-label small{display:none}.video-preview-card{width:min(100%,360px);margin-inline:auto}.video-preview-card[data-ratio=portrait]{width:min(72%,260px)}.video-create-button{min-height:50px;font-size:11px}}
.video-theme-head{margin-top:18px}.video-theme-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.video-theme-grid input{position:absolute;opacity:0;pointer-events:none}.video-theme-grid label>span{display:grid;grid-template-columns:42px 1fr;grid-template-rows:auto auto;align-items:center;gap:2px 10px;min-height:54px;padding:8px 10px;border:1px solid #2b394c;border-radius:12px;background:#0e1722;cursor:pointer}.video-theme-grid i{grid-row:1/3;width:40px;height:40px;border:1px solid #ffffff1a;border-radius:10px;background:linear-gradient(145deg,#121b29,#030711);box-shadow:inset 0 1px #ffffff12}.video-theme-grid .light i{border-color:#cbd5e1;background:linear-gradient(145deg,#fff,#dce4ed);box-shadow:inset 0 1px #fff}.video-theme-grid b{font-size:9px}.video-theme-grid small{color:#748196;font-size:7px}.video-theme-grid input:checked+span{border-color:#8d6be0;background:#211932;box-shadow:inset 0 0 0 1px #8d6be044}.video-preview-card[data-theme=dark]{--brand-a:#8b78ee;--brand-b:#35c6d4;color:#f8fafc;background:radial-gradient(circle at 50% 28%,#35c6d426,transparent 42%),linear-gradient(150deg,#151b2b,#050910)}.video-preview-card[data-theme=light]{--brand-a:#5b4bdb;--brand-b:#087f8c;color:#172033;border-color:#cbd5e1;background:radial-gradient(circle at 50% 28%,#087f8c1c,transparent 44%),linear-gradient(150deg,#fff,#e7edf3);box-shadow:inset 0 1px #fff,0 18px 48px #0206171f}.video-preview-card[data-theme=light]:before{background:radial-gradient(circle,#5b4bdb24 0,transparent 58%);opacity:.4}.video-preview-card[data-theme=light]>small{color:#64748b}.video-preview-card[data-theme=light] .video-preview-subtitle{background:#fffffff0;color:#172033;box-shadow:0 8px 22px #64748b33}.video-preview-card[data-theme=light] .video-preview-viz i{border-color:#0f172a14}.video-preview-card>strong{font-family:Vazirmatn,"Noto Sans Arabic",sans-serif;font-weight:900;letter-spacing:-.15px}@media(max-width:760px){.video-theme-grid label>span{min-height:50px}.video-theme-head{margin-top:15px}}
.video-theme-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.video-theme-grid .dark i{background:radial-gradient(circle at 72% 25%,#28c7d955,transparent 27%),linear-gradient(145deg,#122136,#030712)}.video-theme-grid .stars i{position:relative;overflow:hidden;border-color:#7387ff66;background:radial-gradient(circle at 70% 25%,#35e7ff4a,transparent 25%),radial-gradient(circle at 20% 70%,#7387ff45,transparent 32%),linear-gradient(145deg,#071326,#020617)}.video-theme-grid .stars i:before,.video-theme-grid .stars i:after{content:"";position:absolute;inset:4px;background-image:radial-gradient(circle,#fff 0 1px,transparent 1.4px);background-size:11px 10px;opacity:.72;animation:videoStarsTwinkle 2.4s ease-in-out infinite alternate}.video-theme-grid .stars i:after{inset:0;background-size:17px 15px;opacity:.35;animation-delay:-1.1s}.video-preview-card[data-theme=dark]{--brand-a:#5e77f3;--brand-b:#28c7d9;background:radial-gradient(circle at 54% 25%,#28c7d925,transparent 42%),linear-gradient(150deg,#122136,#050a14)}.video-preview-card[data-theme=stars]{--brand-a:#7387ff;--brand-b:#35e7ff;color:#f8fbff;background-color:#020617;background-image:radial-gradient(circle at 72% 20%,#35e7ff24,transparent 26%),radial-gradient(circle at 22% 72%,#7387ff29,transparent 34%),radial-gradient(circle,#ffffffd9 0 1px,transparent 1.5px),radial-gradient(circle,#bcefff99 0 .8px,transparent 1.2px),linear-gradient(150deg,#071326,#020617);background-size:auto,auto,31px 29px,47px 43px,auto;animation:videoStarDrift 14s linear infinite}.video-preview-card[data-theme=stars]:before{background:radial-gradient(circle,#35e7ff33 0,transparent 60%);opacity:.55}.video-preview-card[data-theme=stars] .video-preview-subtitle{background:#061126e8;border:1px solid #7387ff45}.video-preview-card[data-theme=stars] .video-preview-viz{filter:drop-shadow(0 0 12px #35e7ff55)}@keyframes videoStarsTwinkle{from{opacity:.28;transform:scale(.98)}to{opacity:.9;transform:scale(1.04)}}@keyframes videoStarDrift{to{background-position:0 0,0 0,31px 29px,-47px 43px,0 0}}@media(max-width:760px){.video-theme-grid{grid-template-columns:1fr}.video-theme-grid label>span{grid-template-columns:46px 1fr;min-height:58px}.video-theme-grid i{width:44px;height:44px}}
/* Video visual system v8: clean navy and teal palette. */
.video-studio-modal{color:#eaf8fb}.video-studio-backdrop{background:rgba(2,10,20,.92);backdrop-filter:blur(18px)}.video-studio-dialog{border-color:#244052;background:linear-gradient(145deg,#091622,#07111d);box-shadow:0 30px 100px rgba(0,0,0,.58)}.video-studio-dialog>header{background:rgba(7,17,29,.96);border-color:#203648}.video-studio-dialog>header span{color:#65d8ff}.video-field-head span{background:#0e2c39;border-color:#23596a;color:#a9f0ff}.video-template-card>span,.video-ratio-grid label>span,.video-theme-grid label>span{border-color:#294154;background:#0d1d2d}.video-template-card input:checked+span,.video-ratio-grid input:checked+span,.video-theme-grid input:checked+span{border-color:#20b9b0;background:linear-gradient(145deg,#0f3039,#0d1d2d);box-shadow:inset 0 0 0 1px rgba(101,216,255,.32),0 10px 28px rgba(16,150,157,.14)}.video-template-card i,.video-preview-viz i{background:radial-gradient(circle,#65d8ff 0,transparent 58%),#07111f}.video-art-wave b{background:linear-gradient(#65d8ff,#20b9b0)}.video-art-orbit:before{border-color:#65d8ff;box-shadow:0 0 22px rgba(101,216,255,.45)}.video-art-orbit:after{border-color:#20b9b0}.video-art-cosmos b{background:linear-gradient(#a9f0ff,#20b9b0)}.video-ratio-grid i{border-color:#65d8ff}.video-brand-select select{border-color:#294154;background:#081522;color:#eaf8fb}.video-order{border-color:#294154;background:#0b1927}.video-preview-card{background:radial-gradient(circle at 50% 28%,rgba(101,216,255,.18),transparent 44%),linear-gradient(150deg,#102638,#06101a);border-color:#315466}.video-preview-card[data-theme=dark]{--brand-a:#20b9b0;--brand-b:#65d8ff;background:radial-gradient(circle at 50% 28%,rgba(101,216,255,.18),transparent 44%),linear-gradient(150deg,#102638,#06101a)}.video-preview-card[data-theme=stars]{--brand-a:#43c6d4;--brand-b:#a9f0ff;background-color:#020a14;background-image:radial-gradient(circle at 72% 20%,rgba(169,240,255,.2),transparent 26%),radial-gradient(circle,#d4f6ff 0 1px,transparent 1.5px),linear-gradient(150deg,#0d2d42,#020a14);background-size:auto,31px 29px,auto}.video-preview-card[data-theme=light]{--brand-a:#0e7490;--brand-b:#0f9f9a;background:linear-gradient(150deg,#fff,#e5eff1);color:#12212e;border-color:#a7c1c8}.video-preview-card[data-theme=pastel]{--brand-a:#f9a8d4;--brand-b:#fde68a;background:linear-gradient(150deg,#fff5f7,#fef3c7);color:#4a1d3a;border-color:#f9d5e5}.video-preview-card[data-theme=mint]{--brand-a:#34d399;--brand-b:#a7f3d0;background:linear-gradient(150deg,#f0fdf7,#d1fae5);color:#064e3b;border-color:#a7f3d0}.video-preview-card[data-theme=sunrise]{--brand-a:#fbbf24;--brand-b:#f472b6;background:linear-gradient(150deg,#fffbeb,#fce7f3);color:#422006;border-color:#fde68a}.video-preview-card[data-theme=ice]{--brand-a:#38bdf8;--brand-b:#e0f2fe;background:linear-gradient(150deg,#f0f9ff,#e0f2fe);color:#0c4a6e;border-color:#bae6fd}.video-create-button{background:linear-gradient(135deg,#20b9b0,#0e7490);box-shadow:0 12px 30px rgba(14,116,144,.28)}.video-subtitle-toggle{border-color:#294154;background:#0b1927}.video-subtitle-toggle input{accent-color:#20b9b0}.video-job-visual{background:radial-gradient(circle at 50% 35%,rgba(101,216,255,.16),transparent 45%),#07111f}
.video-art-orbit:after{border-left-color:transparent;border-bottom-color:#20b9b0;box-shadow:0 0 20px rgba(32,185,176,.45)}.video-art-cosmos em{border-color:#65d8ff!important;filter:drop-shadow(0 0 5px rgba(101,216,255,.55))}.video-art-cosmos em:nth-child(2){border-color:#20b9b0!important}.video-art-cosmos em:nth-child(3){border-color:#bdeff4!important}.video-art-cosmos b{background:linear-gradient(#a9f0ff,#20b9b0)!important;box-shadow:0 0 7px rgba(101,216,255,.42)}.video-theme-grid .dark i{background:radial-gradient(circle at 72% 25%,#65d8ff55,transparent 27%),linear-gradient(145deg,#132b40,#07111f)}.video-theme-grid .stars i{border-color:#43c6d466;background:radial-gradient(circle at 70% 25%,#a9f0ff4a,transparent 25%),linear-gradient(145deg,#0d2d42,#020a14)}.video-theme-grid .pastel i{border-color:#f9d5e5;background:linear-gradient(145deg,#fdf2f8,#fef3c7)}.video-theme-grid .mint i{border-color:#a7f3d0;background:linear-gradient(145deg,#f0fdf7,#d1fae5)}.video-theme-grid .sunrise i{border-color:#fde68a;background:linear-gradient(145deg,#fffbeb,#fce7f3)}.video-theme-grid .ice i{border-color:#bae6fd;background:linear-gradient(145deg,#f0f9ff,#e0f2fe)}
.video-font-head{margin-top:18px}.video-font-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.video-font-grid input{position:absolute;opacity:0;pointer-events:none}.video-font-grid label>span{display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:10px;min-height:58px;padding:8px 10px;border:1px solid #294154;border-radius:12px;background:#0d1d2d;cursor:pointer;transition:.18s}.video-font-grid label>span>b{display:grid;place-items:center;align-self:stretch;border:1px solid #315466;border-radius:9px;background:#071522;color:#dff9fc;font-size:16px;font-weight:800}.video-font-grid label>span>i{display:grid;gap:3px;min-width:0;font-style:normal}.video-font-grid strong{font-size:9px}.video-font-grid small{overflow:hidden;color:#748b99;font-size:7px;line-height:1.65;text-overflow:ellipsis;white-space:nowrap}.video-font-grid input:checked+span{border-color:#20b9b0;background:linear-gradient(145deg,#0f3039,#0d1d2d);box-shadow:inset 0 0 0 1px rgba(101,216,255,.3)}.video-font-grid input:focus-visible+span{outline:2px solid #65d8ff;outline-offset:2px}@media(max-width:760px){.video-font-grid{grid-template-columns:1fr}.video-font-grid label>span{min-height:54px}.video-font-head{margin-top:15px}}
@media(min-width:761px) and (max-height:760px){.video-font-head{margin-top:9px}.video-font-grid{gap:6px}.video-font-grid label>span{grid-template-columns:45px minmax(0,1fr);min-height:43px;padding:5px 7px}.video-font-grid label>span>b{font-size:12px}.video-font-grid small{font-size:6.5px}}

/* Video studio v13: free-trial notice, overflow-safe responsive layout. */
.video-free-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;padding:11px 14px;border:1px solid rgba(32,185,176,.45);border-radius:13px;background:linear-gradient(135deg,rgba(16,74,79,.72),rgba(8,31,44,.92));color:#dff9fc;direction:rtl}.video-free-banner b{color:#8ff3dd;font-size:11px}.video-free-banner span{color:#a9cbd0;font-size:8px;line-height:1.7}.video-studio-form,.video-studio-body,.video-config,.video-order,.video-preview-card{min-width:0}.video-studio-form{overflow-x:hidden}.video-preview-card>strong{overflow-wrap:anywhere;word-break:break-word}
@media(max-width:760px){.video-studio-dialog,.video-studio-body{overflow-x:hidden}.video-studio-body{width:100%;box-sizing:border-box}.video-config,.video-order{width:100%;box-sizing:border-box}.video-template-grid,.video-ratio-grid,.video-background-grid,.video-font-grid{min-width:0}.video-free-banner{align-items:flex-start;flex-direction:column;gap:3px;padding:10px 12px}.video-free-banner b{font-size:10px}.video-free-banner span{font-size:7.5px}.video-preview-card[data-ratio=landscape]{grid-template-columns:34% minmax(0,1fr);column-gap:6%}}
.video-studio-dialog{overscroll-behavior:contain}.video-preview-card[data-ratio=landscape]>strong{max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow-wrap:anywhere}.video-preview-card[data-ratio=landscape] .video-preview-viz{min-width:0}.video-template-card>small,.video-field-head small{overflow-wrap:anywhere}@media(max-width:760px){.video-studio-dialog{max-height:100dvh}.video-studio-body{max-height:calc(100dvh - 76px);overflow-y:auto}.video-studio-grid{grid-template-columns:minmax(0,1fr);gap:12px}.video-order{position:static}.video-template-grid,.video-ratio-grid{gap:7px}.video-template-card>span{min-width:0}.video-preview-card[data-ratio=landscape]{width:100%;max-width:100%}}

/* Video studio v12: deterministic dark backgrounds, editable title, subtitles disabled. */
.video-title-field{display:grid;gap:7px;margin-bottom:18px;padding:13px;border:1px solid #294154;border-radius:14px;background:#0b1927}.video-title-field>span{color:#dff9fc;font-size:10px;font-weight:900}.video-title-field input{box-sizing:border-box;width:100%;height:44px;padding:0 13px;border:1px solid #315466;border-radius:10px;outline:0;background:#06111f;color:#f6fbff;font-family:Vazirmatn,"Noto Sans Arabic",sans-serif;font-size:11px;font-weight:800;text-align:right;direction:rtl}.video-title-field input:focus{border-color:#20b9b0;box-shadow:0 0 0 3px rgba(32,185,176,.13)}.video-title-field small{color:#748b99;font-size:7.5px;line-height:1.8}
.video-background-head{margin-top:18px}.video-background-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.video-background-grid input{position:absolute;opacity:0;pointer-events:none}.video-background-grid label>span{display:grid;grid-template-columns:42px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;gap:2px 9px;min-height:56px;padding:8px 9px;border:1px solid #294154;border-radius:12px;background:#0d1d2d;cursor:pointer}.video-background-grid i{grid-row:1/3;width:38px;height:38px;border:1px solid #ffffff24;border-radius:10px;background:var(--video-bg);box-shadow:inset 0 1px #ffffff12}.video-background-grid b{font-size:9px}.video-background-grid small{overflow:hidden;color:#748b99;font-size:7px;text-overflow:ellipsis;white-space:nowrap}.video-background-grid input:checked+span{border-color:#20b9b0;background:#0f3039;box-shadow:inset 0 0 0 1px rgba(101,216,255,.3)}.video-background-grid input:focus-visible+span{outline:2px solid #65d8ff;outline-offset:2px}
.video-coming-soon{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:58px;margin-top:10px;padding:10px 13px;border:1px dashed #315466;border-radius:12px;background:#081522;color:#dceef2}.video-coming-soon span{display:grid;gap:3px}.video-coming-soon b{font-size:10px}.video-coming-soon small{color:#748b99;font-size:8px;line-height:1.75}.video-coming-soon em{flex:none;padding:5px 9px;border:1px solid #315466;border-radius:999px;background:#0d2634;color:#a9f0ff;font-size:8px;font-style:normal;font-weight:900}
.video-preview-card{--brand-a:#20b9b0;--brand-b:#65d8ff;color:#f6fbff}.video-preview-card[data-background=black]{background:#020305}.video-preview-card[data-background=navy]{background:radial-gradient(circle at 50% 28%,rgba(101,216,255,.12),transparent 43%),#06111f}.video-preview-card[data-background=charcoal]{background:radial-gradient(circle at 50% 28%,rgba(189,239,244,.08),transparent 43%),#121417}.video-preview-card:before{background:radial-gradient(circle,rgba(32,185,176,.18) 0,transparent 58%);opacity:.4}.video-preview-card>strong{direction:rtl;text-align:center}
@media(max-width:760px){.video-background-grid{grid-template-columns:1fr}.video-background-grid label>span{grid-template-columns:46px minmax(0,1fr);min-height:58px}.video-title-field{margin-bottom:15px}.video-background-head{margin-top:15px}}
@media(min-width:761px) and (max-height:760px){.video-title-field{margin-bottom:9px;padding:8px}.video-title-field input{height:36px}.video-background-head{margin-top:9px}.video-background-grid{gap:6px}.video-background-grid label>span{min-height:44px;padding:5px 7px}.video-background-grid i{width:32px;height:32px}.video-coming-soon{min-height:44px;margin-top:7px;padding:7px 10px}}

/* Video studio v14: professional themes, layout controls and live preview. */
.video-studio-dialog{width:min(1180px,100%)}
.video-studio-grid{grid-template-columns:minmax(0,1.55fr) minmax(320px,.78fr)}
.video-template-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.video-theme-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.video-theme-grid i{background:linear-gradient(135deg,var(--theme-a),var(--theme-b))!important;box-shadow:inset 0 1px #ffffff66,0 7px 18px color-mix(in srgb,var(--theme-a) 30%,transparent)}
.video-background-modes,.video-toggle-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:10px}
.video-background-modes input,.video-toggle-grid input{position:absolute;opacity:0}
.video-background-modes span,.video-toggle-grid span{display:grid;place-items:center;min-height:42px;padding:7px;border:1px solid #294154;border-radius:10px;background:#0d1d2d;color:#aac1cb;font-size:8.5px;font-weight:800;cursor:pointer;text-align:center}
.video-background-modes input:checked+span,.video-toggle-grid input:checked+span{border-color:#20b9b0;background:#0f3039;color:#e8ffff;box-shadow:inset 0 0 0 1px #65d8ff33}
.video-custom-background,.video-layout-grid,.video-color-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:9px 0 18px}.video-image-background-options{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.video-image-background-options label{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;padding:8px 10px;border:1px solid #294154;border-radius:11px;background:#091724;color:#cce3e8;font-size:8px;font-weight:800}.video-image-background-options input[type=range]{width:48%;accent-color:#9a78f0}
.video-custom-background>label,.video-layout-grid>label,.video-color-grid>label{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;padding:8px 10px;border:1px solid #294154;border-radius:11px;background:#091724;color:#cce3e8;font-size:8px;font-weight:800}
.video-solid-color-control{display:grid;gap:8px;grid-column:1/-1;padding:10px 12px;border:1px solid #294154;border-radius:11px;background:#091724;color:#cce3e8;font-size:9px;font-weight:800}
.video-solid-color-inputs{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:8px}
.video-solid-color-inputs input[type=color]{width:42px;height:34px;padding:2px;border:1px solid #426276;border-radius:8px;background:#07111d;cursor:pointer}
.video-solid-color-inputs input[type=text]{box-sizing:border-box;width:100%;height:34px;padding:0 10px;border:1px solid #426276;border-radius:8px;background:#07111d;color:#eaf8fb;font:700 10px/1 monospace;direction:ltr;text-align:left;outline:0}
.video-solid-color-inputs input[type=text]:focus{border-color:#9b76e8;box-shadow:0 0 0 3px #9b76e822}
.video-solid-color-inputs input[type=text][aria-invalid=true]{border-color:#ef7d9a;color:#ffb4c7}
.video-solid-color-inputs small{color:#748b99;font-size:8px;white-space:nowrap}
.video-layout-grid select{min-width:0;width:62%;height:34px;border:1px solid #315466;border-radius:8px;background:#06111f;color:#f4ffff;font:inherit}
.video-color-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.video-color-grid input[type=color],.video-custom-background input[type=color]{width:38px;height:30px;padding:2px;border:1px solid #426276;border-radius:8px;background:#07111d;cursor:pointer}
.video-background-upload input{position:absolute;width:1px;height:1px;opacity:0}
.video-background-upload span{overflow:hidden;max-width:58%;padding:6px 8px;border:1px solid #315466;border-radius:8px;color:#91e6ea;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
.video-preview-card{background-color:var(--preview-bg,#06111f);transition:background-color .2s,color .2s}
.video-preview-cover,.video-preview-card>strong,.video-preview-card>small{transition:opacity .2s,transform .2s,font-size .2s}
.video-preview-cover.is-hidden{display:none}
.video-preview-card[data-title-size=small]>strong{font-size:9px}.video-preview-card[data-title-size=medium]>strong{font-size:12px}.video-preview-card[data-title-size=large]>strong{font-size:15px;line-height:1.55}
.video-preview-card[data-title-position=top]>strong{position:absolute;top:7%;right:8%;left:8%}.video-preview-card[data-title-position=center]>strong{position:absolute;top:46%;right:8%;left:8%;transform:translateY(-50%)}.video-preview-card[data-title-position=bottom]>strong{position:absolute;right:8%;bottom:13%;left:8%}
.video-preview-card[data-template=minimal] .video-preview-viz{opacity:.62;transform:scale(.82)}
.video-preview-card[data-template=pulse] .video-preview-viz{filter:drop-shadow(0 0 13px var(--brand-b))}
.video-art-ribbon{position:relative;display:block;width:100%;height:76px;overflow:hidden}
.video-art-ribbon b{position:absolute;top:50%;left:5%;width:90%;height:2px;border-radius:999px;background:linear-gradient(90deg,transparent,var(--brand-a,#20b9b0),var(--brand-b,#65d8ff),transparent);box-shadow:0 0 12px var(--brand-b,#65d8ff);animation:videoRibbon 3s ease-in-out infinite}
.video-art-ribbon b:nth-child(2){transform:translateY(-11px) scaleX(.83);opacity:.48;animation-delay:-1s}.video-art-ribbon b:nth-child(3){transform:translateY(11px) scaleX(.72);opacity:.3;animation-delay:-2s}
.video-art-wave.pulse b{animation-duration:1.8s}.video-art-wave.minimal b:nth-child(2n){opacity:.35}
@keyframes videoRibbon{0%,100%{border-radius:50%;transform:translateY(-2px) scaleY(1)}50%{transform:translateY(5px) scaleY(5)}}
@media(max-width:900px){.video-template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.video-theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.video-studio-grid{grid-template-columns:1fr}.video-template-grid{grid-template-columns:1fr}.video-theme-grid{grid-template-columns:1fr}.video-background-modes,.video-toggle-grid{grid-template-columns:1fr 1fr 1fr}.video-custom-background,.video-layout-grid{grid-template-columns:1fr}.video-color-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.video-order{order:-1}.video-preview-card{max-height:390px}}

/* Studio polish: one scroll surface, a stable preview, and distinct visual families. */
.video-studio-dialog,.video-studio-body,.video-studio-form,.video-studio-grid,.video-config,.video-order{box-sizing:border-box;min-width:0}
.video-studio-form{overflow:visible}.video-studio-body{overflow-x:hidden;overflow-y:auto}.video-studio-grid{align-items:start}.video-order{position:relative;top:auto;z-index:1;max-height:calc(100dvh - 170px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:#4a6070 transparent}
.video-config{background:radial-gradient(circle at 85% 1%,#7443b31c,transparent 27%),linear-gradient(160deg,#0e1c2b,#0a1521 60%);border-color:#36475c;box-shadow:inset 0 1px #ffffff0b}
.video-studio-dialog>header{background:radial-gradient(circle at 85% -40%,#7852b532,transparent 40%),#0b1623}.video-studio-dialog>header span{color:#bea1ff}.video-studio-dialog>header h2{letter-spacing:-.02em}
.video-field-head{padding-top:8px}.video-field-head span{background:#302340;border-color:#865cc1;color:#e0c5ff}.video-theme-head span{background:#3a2635;border-color:#a96588;color:#ffc2d7}.video-background-head span{background:#173b39;border-color:#41a7a2;color:#aff2e5}.video-font-head span{background:#343650;border-color:#8085cc;color:#d6d9ff}
.video-title-field{border-color:#665383;background:linear-gradient(125deg,#2a203a,#111c2b)}.video-title-field>span{color:#e4ceff}.video-title-field input{background:#101522;border-color:#665383}
.video-template-card{min-width:0;--tile-accent:#65d8ff}.video-template-card:nth-child(2){--tile-accent:#a994ff}.video-template-card:nth-child(3){--tile-accent:#ee9cbf}.video-template-card:nth-child(4){--tile-accent:#68d7ad}.video-template-card:nth-child(5){--tile-accent:#ffbb7a}.video-template-card:nth-child(6){--tile-accent:#a9c1f5}
.video-template-card>span{min-width:0;height:100%;border-color:color-mix(in srgb,var(--tile-accent) 25%,#26384a);background:linear-gradient(155deg,color-mix(in srgb,var(--tile-accent) 9%,#122031),#0c1723 72%);box-shadow:inset 0 1px #ffffff0a}
.video-template-card i{background:radial-gradient(circle at 50% 48%,color-mix(in srgb,var(--tile-accent) 38%,transparent),transparent 60%),#0a1320;border-color:color-mix(in srgb,var(--tile-accent) 25%,transparent)}
.video-template-card input:checked+span{border-color:var(--tile-accent);background:linear-gradient(150deg,color-mix(in srgb,var(--tile-accent) 18%,#122031),#102031);box-shadow:0 12px 30px #0003,inset 0 0 0 1px color-mix(in srgb,var(--tile-accent) 28%,transparent)}
.video-template-card input:checked+span b{color:var(--tile-accent)}.video-template-card small{overflow-wrap:anywhere}
.video-ratio-grid label,.video-theme-grid label,.video-background-grid label,.video-font-grid label,.video-background-modes label,.video-toggle-grid label{min-width:0}
.video-ratio-grid label>span,.video-theme-grid label>span,.video-background-grid label>span,.video-font-grid label>span,.video-background-modes span,.video-toggle-grid span{box-sizing:border-box;min-width:0;height:100%;transition:border-color .2s,background .2s,transform .2s}
.video-ratio-grid label:hover>span,.video-theme-grid label:hover>span,.video-background-grid label:hover>span,.video-font-grid label:hover>span{transform:translateY(-2px);border-color:#6e8499}
.video-ratio-grid input:checked+span{border-color:#b18af3;background:#29213c;color:#f0e5ff}.video-ratio-grid input:checked+span i{border-color:#d2b6ff}
.video-theme-grid input:checked+span{border-color:#ed9cbd;background:#342538}.video-background-grid input:checked+span,.video-background-modes input:checked+span{border-color:#58c9ab;background:#173630}.video-toggle-grid input:checked+span{border-color:#86a9f2;background:#1d2c47}.video-font-grid input:checked+span{border-color:#a8a9ef;background:#262944}
.video-layout-grid>label,.video-color-grid>label,.video-custom-background>label{box-sizing:border-box;min-width:0;background:linear-gradient(130deg,#152537,#0b1a28);border-color:#344c61}.video-layout-grid select{max-width:65%;background:#101a2a}.video-color-grid input[type=color]{flex:none}
.video-order{background:linear-gradient(165deg,#142236,#0d1928);border-color:#476078;box-shadow:0 20px 45px #02091355}.video-preview-label span{color:#e4d5ff}.video-quote{background:#101b2b;border-color:#40536b}.video-create-button{border-color:#5dd1c5;background:linear-gradient(110deg,#219f9d,#496abb);box-shadow:0 12px 28px #176e9b3b}
.video-preview-card>[hidden],.video-preview-cover.is-hidden{display:none!important}.video-preview-card[data-ratio=landscape]:has(.video-preview-cover.is-hidden){grid-template-columns:minmax(0,1fr);text-align:center}.video-preview-card[data-ratio=landscape]:has(.video-preview-cover.is-hidden) .video-preview-viz{width:75%;justify-self:center}.video-preview-card[data-ratio=landscape]:has(.video-preview-cover.is-hidden) .video-preview-subtitle{right:9%;left:9%}.video-preview-card>strong{max-height:45%;overflow:hidden;overflow-wrap:anywhere}.video-preview-card[data-title-position=top]>strong,.video-preview-card[data-title-position=center]>strong,.video-preview-card[data-title-position=bottom]>strong{max-height:42%;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}
@media(max-width:900px){.video-studio-grid{grid-template-columns:minmax(0,1fr) minmax(265px,.72fr)}.video-template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.video-theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.video-studio-grid{grid-template-columns:minmax(0,1fr)}.video-order{position:static;order:-1;max-height:none;overflow:visible}.video-template-grid,.video-theme-grid{grid-template-columns:1fr}.video-background-modes,.video-toggle-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.video-layout-grid,.video-custom-background{grid-template-columns:1fr}.video-color-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.video-config{padding:14px}.video-preview-card{max-height:390px}}
@media(max-width:420px){.video-ratio-grid,.video-background-modes,.video-toggle-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.video-color-grid{grid-template-columns:1fr}.video-color-grid>label{min-height:42px}}
@media(prefers-reduced-motion:reduce){.video-template-card>span,.video-ratio-grid label>span,.video-theme-grid label>span,.video-background-grid label>span,.video-font-grid label>span{transition:none}}
/* The dialog and form each have a definite second grid row. Only the two
   columns scroll; changing a focused control cannot move the whole modal. */
@media(min-width:761px){
  .video-studio-modal.is-configuring .video-studio-dialog{height:min(920px,calc(100dvh - 40px));display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
  .video-studio-modal.is-configuring .video-studio-dialog>header{position:relative;top:auto;min-height:0}
  .video-studio-modal.is-configuring .video-studio-body{min-height:0;overflow:hidden}
  .video-studio-form{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
  .video-studio-grid{height:100%;min-height:0;grid-template-rows:minmax(0,1fr);align-items:stretch;overflow:hidden}
  .video-config,.video-order{min-height:0;max-height:none;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#53697f transparent}
  .video-config{scrollbar-gutter:stable}
  .video-order{position:relative;top:auto;align-self:stretch}
  .video-config{display:flex;flex-direction:column;overflow:hidden}
  .video-config>.video-editor-panel:not([hidden]){flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#53697f transparent}
  .video-config>.video-wizard-actions{flex:0 0 auto;position:sticky;bottom:0;z-index:6;margin-top:auto;background:#0b0e14}
}
/* Hidden choices must be anchored to their own card, not the modal. Otherwise
   focusing a radio near the bottom scrolls the entire dialog out of view. */
.video-studio-form :is(.video-template-grid,.video-ratio-grid,.video-theme-grid,.video-background-grid,.video-font-grid,.video-background-modes,.video-toggle-grid) label{position:relative}
.video-studio-form :is(.video-template-grid,.video-ratio-grid,.video-theme-grid,.video-background-grid,.video-font-grid,.video-background-modes,.video-toggle-grid) input:is([type=radio],[type=checkbox]){position:absolute;top:0;left:0;width:1px;height:1px;margin:0;clip-path:inset(50%);overflow:hidden;pointer-events:none}
.video-studio-form :is(.video-template-grid,.video-ratio-grid,.video-theme-grid,.video-background-grid,.video-font-grid,.video-background-modes,.video-toggle-grid) input:focus-visible+span{outline:2px solid #b8a2ff;outline-offset:2px}
.video-background-upload{position:relative}
.video-background-upload input[type=file]{top:0;left:0;clip-path:inset(50%)}
/* Match the flat rendered background. Uploaded backgrounds retain their image. */
.video-preview-card[data-background-mode]:not([data-background-mode=image]){background-image:none}
.video-preview-card:before{display:none}
.video-preview-viz i{background:transparent}
.video-preview-card[data-ratio=landscape] .video-preview-cover{grid-column:1;grid-row:1/3}
.video-preview-card[data-ratio=landscape] .video-preview-viz{grid-column:2;grid-row:2}
.video-preview-card[data-ratio=landscape]>strong{grid-column:2;grid-row:1;align-self:center;text-align:center}
.video-preview-card[data-ratio=landscape]>small{grid-column:1;grid-row:3;align-self:end;justify-self:center;text-align:center}
.video-preview-card[data-ratio=landscape]:has(.video-preview-cover.is-hidden) .video-preview-viz,.video-preview-card[data-ratio=landscape]:has(.video-preview-cover.is-hidden)>strong,.video-preview-card[data-ratio=landscape]:has(.video-preview-cover.is-hidden)>small{grid-column:1}
.video-preview-card[data-ratio=landscape]>strong{-webkit-line-clamp:5}

/* Keep the browser preview aligned with the measured server-side text layout. */
.video-preview-card>strong{
  box-sizing:border-box;
  width:100%;
  max-width:90%;
  max-height:30%;
  margin-inline:auto;
  overflow:hidden;
  line-height:1.65;
  text-align:center;
  overflow-wrap:anywhere;
  word-break:normal;
  unicode-bidi:plaintext;
}
.video-preview-card>small{
  display:grid;
  justify-items:center;
  gap:2px;
  min-width:0;
  max-width:72%;
  line-height:1.4;
  unicode-bidi:plaintext;
}
.video-preview-card>small b,
.video-preview-card>small span{
  display:block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.video-preview-card>small b{color:currentColor;font-size:1.08em}
.video-preview-card>small span{color:#93a0b1;font-size:.9em}
.video-preview-card[data-title-position=top]>strong{top:9%;right:7%;left:7%;max-width:none;max-height:22%}
.video-preview-card[data-title-position=center]>strong{top:50%;right:7%;left:7%;max-width:none;max-height:26%}
.video-preview-card[data-title-position=bottom]>strong{right:7%;bottom:18%;left:7%;max-width:none;max-height:22%}
.video-preview-card[data-ratio=portrait]>strong{max-height:24%}
.video-preview-card[data-ratio=portrait][data-title-position=top]>strong{top:8%;max-height:18%}
.video-preview-card[data-ratio=portrait][data-title-position=bottom]>strong{bottom:17%;max-height:19%}
.video-preview-card[data-ratio=landscape]>small{max-width:92%}
.video-preview-card[data-ratio=landscape][data-title-position=top]>strong,
.video-preview-card[data-ratio=landscape][data-title-position=center]>strong,
.video-preview-card[data-ratio=landscape][data-title-position=bottom]>strong{right:50%;left:4%;width:auto;max-height:48%}
.video-preview-card[data-ratio=landscape][data-title-position=top]>strong{top:10%}
.video-preview-card[data-ratio=landscape][data-title-position=center]>strong{top:50%}
.video-preview-card[data-ratio=landscape][data-title-position=bottom]>strong{bottom:9%}
.video-preview-card:not([data-ratio=landscape]):has(.video-preview-cover:not(.is-hidden))[data-title-position=center]>strong,
.video-preview-card:not([data-ratio=landscape]):has(.video-preview-cover:not(.is-hidden))[data-title-position=bottom]>strong{
  position:static;
  inset:auto;
  transform:none;
  max-height:24%;
}
.video-preview-card:not([data-ratio=landscape]):has(.video-preview-cover:not(.is-hidden))[data-title-position=top]{padding-top:23%}
.video-preview-card:not([data-ratio=landscape]):has(.video-preview-cover:not(.is-hidden))[data-title-position=top] .video-preview-cover{width:68%}
.video-preview-card[data-ratio=square]:has(.video-preview-cover:not(.is-hidden))[data-title-position=top] .video-preview-cover{width:54%}

/* Video studio v16: focused editor panels and renderer-matched responsive preview. */
.video-editor-tabs{position:sticky;top:0;z-index:4;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:-4px 0 18px;padding:6px;border:1px solid #344c61;border-radius:14px;background:#081521e8;backdrop-filter:blur(12px)}
.video-editor-tabs button{min-width:0;min-height:40px;padding:7px 8px;border:1px solid transparent;border-radius:9px;background:transparent;color:#86a0ad;font:800 9px Vazirmatn,sans-serif;cursor:pointer;transition:.18s}
.video-editor-tabs button:hover{color:#dff9fc;background:#122638}
.video-editor-tabs button.is-active{border-color:#58c9ab;background:linear-gradient(135deg,#173b39,#1b304a);color:#efffff;box-shadow:inset 0 0 0 1px #65d8ff24}
.video-editor-panel[hidden],.video-custom-background>[hidden],[data-background-panel][hidden]{display:none!important}
.video-editor-panel{animation:videoPanelIn .18s ease-out}
.video-editor-panel>.video-field-head:first-child,.video-editor-panel>.video-title-field:first-child{margin-top:0;padding-top:0}
.video-custom-background:has(>[data-background-panel="solid"]:not([hidden])),.video-custom-background:has(>[data-background-panel="image"]:not([hidden])){display:grid}
.video-layout-grid .is-disabled,.video-brand-select.is-disabled{opacity:.42;filter:saturate(.5)}
.video-toggle-grid input:disabled+span{cursor:not-allowed;opacity:.48}
@keyframes videoPanelIn{from{opacity:.55;transform:translateY(4px)}to{opacity:1;transform:none}}

.video-art-wave{width:100%;gap:clamp(1px,.55%,4px);padding-inline:7%!important}
.video-art-wave b{flex:1 1 0;min-width:2px;max-width:7px;height:var(--h,20px)!important;animation-delay:var(--d,0s)!important;transform-origin:center}
.video-preview-card>strong{line-height:1.28}
.video-preview-card[data-title-size=large]>strong{line-height:1.25}
.video-art-orbit{contain:layout paint;isolation:isolate}
.video-preview-card .video-art-orbit:before{width:min(68%,58px);height:auto;aspect-ratio:1}
.video-preview-card .video-art-orbit:after{width:min(51%,44px);height:auto;aspect-ratio:1}

.video-preview-card[data-ratio=landscape][data-show-cover=false]{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto auto;padding-inline:10%;text-align:center}
.video-preview-card[data-ratio=landscape][data-show-cover=false] .video-preview-viz{grid-column:1;grid-row:2;width:76%;margin:0 auto;justify-self:center}
.video-preview-card[data-ratio=landscape][data-show-cover=false]>strong{grid-column:1;grid-row:1;right:10%;left:10%;width:auto;max-width:none;align-self:center}
.video-preview-card[data-ratio=landscape][data-show-cover=false]>small{grid-column:1;grid-row:3;justify-self:center;max-width:80%}
.video-preview-card[data-show-title=false] .video-preview-viz{align-self:center;margin-block:auto}
.video-preview-card[data-show-title=false][data-show-cover=false] .video-preview-viz{width:82%;transform:scale(1.08)}
.video-preview-card[data-show-brand=false]{padding-bottom:8%}
.video-preview-card[data-show-brand=false] .video-preview-viz{margin-bottom:0}
.video-preview-card[data-background-mode=image]{background-color:#05080d;background-blend-mode:normal}

@media(max-width:760px){.video-editor-tabs{position:relative;top:auto;margin-bottom:13px}.video-editor-tabs button{min-height:38px;padding-inline:4px;font-size:8px}}
.video-logo-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px;padding:12px;border:1px solid #2b394c;border-radius:12px;background:#0b1520}.video-logo-controls label{display:grid;gap:7px;color:#aeb9c8;font-size:9px}.video-logo-controls output{float:left;color:#c9b5ff}.video-logo-controls input[type=range]{width:100%;accent-color:#8b5cf6}.video-logo-controls select{height:36px;padding:0 9px;border:1px solid #33435a;border-radius:9px;background:#09121d;color:#e2e8f0;font:inherit}.video-preview-logo{position:absolute;z-index:4;display:grid;place-items:center;width:clamp(18px,18%,52px);aspect-ratio:1;border:1px solid #ffffff55;border-radius:22%;background:linear-gradient(135deg,#8b5cf6,#20b9b0);color:#fff;font-size:clamp(10px,4vw,18px);font-weight:900;transform:scale(var(--logo-scale,1));transform-origin:center}.video-preview-logo[data-position="top-left"]{top:8%;left:8%}.video-preview-logo[data-position="top-right"]{top:8%;right:8%}.video-preview-logo[data-position="bottom-left"]{bottom:8%;left:8%}.video-preview-logo[data-position="bottom-right"]{right:8%;bottom:8%}.video-preview-card[data-show-brand="false"] .video-preview-logo{display:none}@media(max-width:560px){.video-logo-controls{grid-template-columns:1fr}}
.video-visualizer-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px;padding:12px;border:1px solid #2b394c;border-radius:12px;background:#0b1520}.video-visualizer-controls label{display:grid;gap:7px;color:#aeb9c8;font-size:9px}.video-visualizer-controls output{float:left;color:#73e1e4}.video-visualizer-controls input[type=range]{width:100%;accent-color:#20b9b0}.video-visualizer-controls select{height:36px;padding:0 9px;border:1px solid #33435a;border-radius:9px;background:#09121d;color:#e2e8f0;font:inherit}.video-logo-controls{grid-template-columns:repeat(3,minmax(0,1fr))}.video-preview-viz[data-position]:not([data-position=auto]){z-index:3;max-width:92%;max-height:62%;overflow:hidden;pointer-events:none}.video-preview-logo{will-change:top,right,bottom,left,transform}@media(max-width:700px){.video-visualizer-controls,.video-logo-controls{grid-template-columns:1fr 1fr}}@media(max-width:480px){.video-visualizer-controls,.video-logo-controls{grid-template-columns:1fr}}
/* Stable live-preview layers for manual logo/equalizer placement */
.video-preview-card.has-layer-controls{overflow:hidden;isolation:isolate}
.video-preview-card.has-layer-controls .video-preview-viz{box-sizing:border-box;pointer-events:none}
.video-preview-card.has-layer-controls .video-preview-viz[data-position]:not([data-position=auto]){z-index:3;max-width:none;max-height:none;overflow:hidden}
.video-preview-card.has-layer-controls .video-preview-logo{will-change:top,right,bottom,left,transform;transform-origin:center;pointer-events:none}
.video-brand-position-control{margin-top:10px;padding:12px;border:1px solid #2b394c;border-radius:12px;background:#0b1520}.video-brand-position-control label{display:grid;gap:7px;color:#aeb9c8;font-size:9px}.video-brand-position-control select{height:36px;padding:0 9px;border:1px solid #33435a;border-radius:9px;background:#09121d;color:#e2e8f0;font:inherit}.video-preview-card[data-brand-position=top]>small,.video-preview-card[data-brand-position=center]>small,.video-preview-card[data-brand-position=bottom]>small{position:absolute;right:8%;left:8%;z-index:6;margin:0;text-align:center}.video-preview-card[data-brand-position=top]>small{top:8%;bottom:auto}.video-preview-card[data-brand-position=center]>small{top:50%;bottom:auto;transform:translateY(-50%)}.video-preview-card[data-brand-position=bottom]>small{top:auto;bottom:8%}
.video-cover-background-choice{position:relative}.video-cover-background-choice input:disabled+span{opacity:.45;cursor:not-allowed}.video-cover-background-choice span:after{content:'پیشنهادی';margin-right:5px;color:#bfa9f4;font-size:8px}
.video-job-state.processing .video-job-copy>span,.video-job-state.processing .video-job-copy h3,.video-job-state.processing .video-job-copy p{font-size:0}
.video-job-state.processing .video-job-copy>span:after{content:'در حال ساخت ویدیو';font-size:9px}
.video-job-state.processing .video-job-copy h3:after{content:'ویدیو در حال آماده‌سازی است';font-size:21px}
.video-job-state.processing .video-job-copy p:after{content:'لطفاً چند لحظه صبر کنید.';font-size:10px}
.video-editor-tabs{display:none!important}
.video-wizard-actions{direction:ltr;align-items:center;min-height:56px;margin-top:22px;padding:12px 0 0;border-top:1px solid #242a35}
.video-wizard-actions button{order:3;min-width:118px}
.video-wizard-actions button[data-wizard-next]{order:1}
.video-wizard-actions small{order:2;color:#7f8b9c;font-size:9px;direction:rtl}
.video-preview-card[data-ratio=landscape]>strong{position:absolute!important;z-index:6;right:47%!important;left:4%!important;width:49%!important;max-width:none!important;max-height:34%!important;margin:0!important;display:block!important;text-align:center!important;overflow:hidden!important}
.video-preview-card[data-ratio=landscape][data-title-position=top]>strong{top:10%!important;bottom:auto!important}
.video-preview-card[data-ratio=landscape][data-title-position=center]>strong{top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}
.video-preview-card[data-ratio=landscape][data-title-position=bottom]>strong{top:auto!important;bottom:10%!important}
.video-preview-card[data-ratio=landscape] .video-preview-cover.has-image img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.video-template-card{cursor:pointer}
.video-background-modes{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:760px){.video-background-modes{grid-template-columns:repeat(2,minmax(0,1fr))}}
.video-preview-card.has-layer-controls .video-preview-logo[hidden]{display:none!important}
.video-preview-card.has-layer-controls .video-preview-viz[data-position]:not([data-position=auto]){position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;transform:none;z-index:3;pointer-events:none}
.video-preview-viz>svg,.video-template-card svg,.video-rendering-art svg{display:block;width:100%;height:100%;overflow:visible}
.video-template-card>span>svg{height:76px;flex:none;border-radius:11px}

/* Render-progress artwork mirrors the selected job instead of showing a
   generic waveform. Keep the cover/title overlays inside the same canvas. */
.video-rendering-art{position:relative;overflow:hidden;background:var(--render-bg,#07101a)}
.video-rendering-art>svg{position:absolute;inset:0;z-index:2;width:100%;height:100%;display:block}
.video-rendering-art .video-rendering-cover{position:absolute;z-index:3;top:18%;left:5%;width:37%;height:64%;border:1px solid color-mix(in srgb,var(--brand-b,#65d8ff) 65%,#fff2);border-radius:12%;object-fit:cover;box-shadow:0 10px 30px #0008;visibility:hidden;background:#1b2433}
.video-rendering-art .video-rendering-title{position:absolute;z-index:5;right:4%;left:46%;top:10%;max-height:30%;overflow:hidden;color:var(--text-color,#f8fbff);font-size:clamp(10px,2.2vw,22px);font-weight:900;line-height:1.35;text-align:center;text-shadow:0 2px 10px #000b}
.video-rendering-art .video-rendering-brand{position:absolute;z-index:5;right:8%;bottom:5%;left:8%;display:grid;gap:2px;color:var(--text-color,#f8fbff);font-size:clamp(8px,1.2vw,14px);text-align:center}.video-rendering-art .video-rendering-brand b{font-size:1em}.video-rendering-art .video-rendering-brand span{color:#9aa7bd;font-size:.78em}
.video-rendering-art[data-ratio="portrait"]{width:min(100%,360px);margin-inline:auto}
.video-rendering-art[data-ratio="portrait"] .video-rendering-cover{top:8%;left:20%;width:60%;height:34%}
.video-rendering-art[data-ratio="portrait"] .video-rendering-title{right:8%;left:8%;top:45%;max-height:18%}
.video-rendering-art[data-ratio="square"] .video-rendering-cover{top:8%;left:23%;width:54%;height:36%}
.video-rendering-art[data-ratio="square"] .video-rendering-title{right:8%;left:8%;top:45%;max-height:18%}
.video-rendering-art>span{z-index:8}

/* Colorful equalizer style picker: each motion family has its own visual identity. */
.video-template-card{--tile-accent:#65d8ff;--tile-deep:#123b55;position:relative}
.video-template-card:nth-child(2){--tile-accent:#b49aff;--tile-deep:#30245d}
.video-template-card:nth-child(3){--tile-accent:#ff9fc4;--tile-deep:#542640}
.video-template-card:nth-child(4){--tile-accent:#62e2bd;--tile-deep:#17483e}
.video-template-card:nth-child(5){--tile-accent:#ffc477;--tile-deep:#584022}
.video-template-card:nth-child(6){--tile-accent:#a9c8ff;--tile-deep:#243b68}
.video-template-card>span{position:relative;overflow:hidden;border:1px solid var(--tile-accent);background:linear-gradient(145deg,var(--tile-deep),#0b1725 72%);box-shadow:0 8px 22px #0004,inset 0 1px #ffffff18;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
.video-template-card>span:before{content:"";position:absolute;inset:0 0 auto;height:4px;background:linear-gradient(90deg,transparent,var(--tile-accent),transparent);opacity:.9}
.video-template-card>span>svg{position:relative;z-index:1;border:1px solid color-mix(in srgb,var(--tile-accent) 55%,#ffffff22);background:radial-gradient(circle at 50% 48%,color-mix(in srgb,var(--tile-accent) 40%,transparent),transparent 68%),#07111d;box-shadow:0 8px 22px color-mix(in srgb,var(--tile-accent) 25%,transparent),inset 0 1px #ffffff18}
.video-template-card:hover>span{transform:translateY(-3px);box-shadow:0 14px 28px #0005,0 0 0 1px color-mix(in srgb,var(--tile-accent) 32%,transparent)}
.video-template-card input:checked+span{border-color:var(--tile-accent);background:linear-gradient(145deg,color-mix(in srgb,var(--tile-deep) 88%,#ffffff 12%),#101d2d);box-shadow:0 14px 32px color-mix(in srgb,var(--tile-accent) 22%,transparent),inset 0 0 0 1px color-mix(in srgb,var(--tile-accent) 48%,transparent)}
.video-template-card input:checked+span:after{content:"✓";position:absolute;top:10px;right:10px;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--tile-accent);color:#07111d;font-size:12px;font-weight:900;box-shadow:0 0 14px color-mix(in srgb,var(--tile-accent) 65%,transparent)}
.video-template-card b{position:relative;z-index:1;color:#eef5ff}.video-template-card input:checked+span b{color:var(--tile-accent)}
.video-template-card small{position:relative;z-index:1;color:#aebdce}
@media(max-width:760px){.video-template-card>span>svg{height:68px}.video-template-card input:checked+span:after{top:8px;right:8px}}

/* Keep the equalizer artwork itself colorful. Some browsers do not resolve
   paint-server gradients with repeated inline SVG ids, which made the bars
   and rings fall back to black while the card background stayed colorful. */
.video-template-card svg g[fill^="url("] rect,
.video-preview-viz svg g[fill^="url("] rect{fill:var(--tile-accent,var(--brand-a,#65d8ff))!important;filter:drop-shadow(0 0 4px color-mix(in srgb,var(--tile-accent,var(--brand-a,#65d8ff)) 78%,transparent))}
.video-template-card svg g[stroke^="url("] line,
.video-preview-viz svg g[stroke^="url("] line{stroke:var(--tile-accent,var(--brand-a,#65d8ff))!important}
.video-template-card svg path[stroke^="url("],
.video-preview-viz svg path[stroke^="url("]{stroke:var(--tile-accent,var(--brand-a,#65d8ff))!important;filter:drop-shadow(0 0 5px color-mix(in srgb,var(--tile-accent,var(--brand-a,#65d8ff)) 72%,transparent))}

/* Keep the selected-state badge and SVG glow inside the card frame. */
.video-template-card>span{isolation:isolate;overflow:hidden}
.video-template-card>span>svg{position:relative;z-index:1;overflow:hidden!important}
.video-template-card input:checked+span:after{z-index:4;top:9px;right:9px;transform:none;pointer-events:none;border:1px solid #ffffff55;color:#07111d;background:var(--tile-accent,#9b7cf2);box-shadow:0 0 12px color-mix(in srgb,var(--tile-accent,#9b7cf2) 60%,transparent)}
.video-template-card:nth-child(3) svg path{stroke:var(--tile-accent,#ff9fc4)!important;stroke-width:3!important;opacity:1!important;filter:drop-shadow(0 0 5px color-mix(in srgb,var(--tile-accent,#ff9fc4) 72%,transparent))}

/* Neon and rings use SVG circles rather than bars/paths. Give those shapes
   an explicit paint color so invalid or missing inline paint values cannot
   collapse the artwork to an almost invisible dark mark. */
.video-template-card>span>svg circle[stroke]{stroke:var(--tile-accent,#65d8ff)!important}
.video-template-card>span>svg circle[fill]:not([fill="none"]):not([fill^="url("]){fill:var(--tile-accent,#65d8ff)!important}
.video-preview-card .video-preview-viz svg circle[stroke]{stroke:var(--brand-a,#65d8ff)!important}
.video-preview-card .video-preview-viz svg circle[fill]:not([fill="none"]):not([fill^="url("]){fill:var(--brand-b,#20b9b0)!important}
.video-template-card>span>svg circle,.video-preview-card .video-preview-viz svg circle{vector-effect:non-scaling-stroke}

/* Keep the preview logo out of the cover's visual area. The renderer also
   treats the opposite top corner as the safe logo zone when a cover exists. */
.video-preview-card.has-layer-controls[data-show-cover="true"] .video-preview-logo[data-position="top-left"]{left:auto!important;right:8%!important}

/* Keep render-state artwork inside a predictable card instead of stretching the SVG into a circle. */
.video-job-visual .video-rendering-art{width:min(100%,560px);aspect-ratio:16/9;min-height:0;border-radius:18px;overflow:hidden;background:radial-gradient(circle at 50% 35%,#724bb733,transparent 52%),#07101a;box-shadow:inset 0 1px #ffffff12,0 18px 48px #0005}
.video-job-visual .video-rendering-art>svg{display:block;width:100%;height:100%;max-width:100%;max-height:100%}
.video-job-visual .video-rendering-art>span{top:10px;right:10px;left:auto;width:54px;height:54px;font-size:13px;background:#101a28e8}

/* Dark wizard treatment for the video studio. */
.video-studio-modal{background:#05070b;color:#e7eaf0}
.video-studio-dialog{border-color:#252b36;background:linear-gradient(145deg,#0b0d12,#07090d);box-shadow:0 36px 120px #000e}
.video-studio-dialog>header{background:#090b10f5;border-color:#202631}
.video-studio-dialog>header span{color:#b795ff}
.video-config,.video-order{border-color:#242a35;background:#0b0e14}
.video-editor-tabs{border-color:#252b36;background:#080a0e}
.video-editor-tabs button{color:#818a99}
.video-editor-tabs button:hover{color:#e8ebf1;background:#151922}
.video-editor-tabs button.is-active{border-color:#7655b8;background:#211a33;color:#fff;box-shadow:inset 0 0 0 1px #9b7ce633}
.video-editor-tabs button.is-complete{color:#c4aff5}
.video-template-card>span,.video-ratio-grid label>span,.video-theme-grid label>span{border-color:#292f3a;background:#10131a}
.video-template-card input:checked+span,.video-ratio-grid input:checked+span,.video-theme-grid input:checked+span{border-color:#7655b8;background:linear-gradient(145deg,#211a33,#11151d);box-shadow:inset 0 0 0 1px #9b7ce633,0 10px 28px #0005}
.video-field-head span{background:#211a33;border-color:#7655b855;color:#c7b5f4}
.video-background-modes label>span,.video-custom-background,.video-logo-controls,.video-visualizer-controls{border-color:#292f3a;background:#0e1219}
.video-logo-controls input[type=range],.video-visualizer-controls input[type=range]{accent-color:#9b76e8}
.video-logo-controls output,.video-visualizer-controls output{color:#c4aff5}
.video-create-button{background:linear-gradient(135deg,#8b5cf6,#5c3c9d);border-color:#9b76e8;box-shadow:0 12px 30px #5c3c9d44}
.video-wizard-actions{display:flex;justify-content:space-between;gap:10px;margin-top:18px;padding-top:14px;border-top:1px solid #242a35}
.video-wizard-actions button{min-width:110px;min-height:40px;padding:8px 14px;border:1px solid #353d4b;border-radius:10px;background:#121720;color:#cbd2de;font:700 9px Vazirmatn;cursor:pointer}
.video-wizard-actions button:hover{border-color:#7655b8;background:#211a33;color:#fff}
.video-wizard-actions button.primary{border-color:#8b6bd1;background:#6f4bb8;color:#fff}
.video-wizard-actions button[hidden],.video-create-button[hidden]{display:none!important}

/* Keep the project cover inside the square/portrait preview frame. */
.video-preview-card:not([data-ratio=landscape]) .video-preview-cover{position:relative;inset:auto;grid-column:auto;grid-row:auto;place-self:center;align-self:center;justify-self:center;width:54%;max-width:54%;min-width:0;height:auto;aspect-ratio:1;transform:none;margin:0;z-index:2;overflow:hidden}
.video-preview-card:not([data-ratio=landscape]) .video-preview-cover img{position:relative;inset:auto;display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:cover;object-position:center}
.video-preview-card[data-title-position=top]:not([data-ratio=landscape]) .video-preview-cover{margin-top:2%;margin-bottom:0}
/* Keep protected cover URLs from flashing a broken-image icon before the authenticated blob is ready. */
.video-preview-cover img[src^="/api/"]:not([data-cover-ready="true"]),.video-preview-cover img[src*="/api/"]:not([data-cover-ready="true"]){visibility:hidden}
.video-preview-cover img[src^="blob:"],.video-preview-cover img[src^="data:"]{visibility:visible!important}

/* Editor controls must remain readable without changing the rendered preview. */
.video-studio-dialog>header p,
.video-studio-form :is(label,small,button,select,output),
.video-field-head small,
.video-wizard-actions button{font-size:max(12px,.75rem)}
.video-studio-form :is(label,small){overflow-wrap:anywhere}
.video-font-grid small{white-space:normal;text-overflow:clip}
@media(max-width:760px){
  .video-field-head{align-items:flex-start;flex-wrap:wrap}
  .video-layout-grid>label,.video-custom-background>label{flex-wrap:wrap}
  .video-layout-grid select{max-width:100%;width:100%}
}
