:root{
  --bg:#0d0507; --bg2:#190a0d; --card:#200d11; --line:#3a3a41;
  --text:#f5f2f3; --muted:#a79ea2; --primary:#f0202c; --primary2:#8f1016;
  --radius:14px; --safe-b:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:'Cairo',system-ui,sans-serif;background:var(--bg);color:var(--text);
  -webkit-tap-highlight-color:transparent;
}
button{font-family:inherit;cursor:pointer;border:0;background:none;color:inherit}
.hidden{display:none!important}
.hint{color:var(--muted);font-size:.8rem;line-height:1.6}

/* الشريط العلوي */
#topbar{
  position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:.6rem;
  padding:.55rem .9rem;background:rgba(14,14,18,.92);backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.brand{font-size:1.05rem;font-weight:400;white-space:nowrap;flex:none}.brand b{font-weight:800;color:var(--primary2)}
@media (max-width:560px){
  #topbar{padding:.45rem .5rem;gap:.4rem}
  .brand{font-size:.82rem}
  .top-actions{gap:.25rem}
  .icon-btn{width:32px;height:32px;border-radius:8px}
  #btn-theme{min-width:0;padding:0 .55rem;font-size:.78rem}
}
@media (max-width:420px){
  #topbar{padding:.4rem .35rem;gap:.3rem}
  .brand{font-size:.75rem}
  .top-actions{gap:.2rem}
  .icon-btn{width:30px;height:30px}
  #btn-theme{padding:0 .4rem;font-size:.74rem}
  #topbar .btn{padding:.45rem .6rem;font-size:.82rem;border-radius:10px}
}
.top-actions{margin-inline-start:auto;display:flex;gap:.4rem;align-items:center}
.icon-btn{
  width:38px;height:38px;border-radius:10px;background:var(--card);border:1px solid var(--line);
  font-size:1.05rem;display:grid;place-items:center;
}
.icon-btn:disabled{opacity:.35;pointer-events:none}

/* أزرار */
.btn{
  padding:.6rem 1.1rem;border-radius:12px;background:var(--card);border:1px solid var(--line);
  font-size:.95rem;font-weight:700;transition:transform .05s;
}
.btn:active{transform:scale(.97)}
.btn-primary{background:linear-gradient(135deg,var(--primary),var(--primary2));border:0;color:#fff}
.btn-danger{color:#ff7060;border-color:#5a2a26}
.btn-ghost{background:transparent}
.btn.block{display:block;width:100%}

/* الشاشات */
.screen{max-width:1060px;margin:0 auto;padding:1rem 1rem calc(2rem + var(--safe-b))}
.hero{padding:1.4rem .4rem .8rem}
.hero h1{font-size:1.55rem;font-weight:900;line-height:1.5}
.hero p{color:var(--muted);margin-top:.4rem;line-height:1.8;font-size:.95rem}
.section-title{font-size:1.1rem;font-weight:800;margin:1rem 0 .8rem}
.fine-print{text-align:center;color:var(--muted);font-size:.8rem;margin-top:1.6rem;line-height:1.8}

/* شبكة المجالات */
.domains-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.7rem}
.domain-card{
  background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  padding:1rem .8rem;text-align:center;transition:border-color .15s,transform .05s;
}
.domain-card:active{transform:scale(.97)}
.domain-card:not(.soon):hover{border-color:var(--primary)}
.domain-card .ico{display:block;margin-bottom:.45rem;color:var(--primary2)}
.domain-card .ico svg{width:1.9rem;height:1.9rem}
/* التصنيفات الرئيسية: شارة أيقونة نارية (برتقالي إلى أحمر ناري) */
.cat-card .ico{width:3.1rem;height:3.1rem;display:grid;place-items:center;margin:0 auto .55rem;border-radius:16px;background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff;box-shadow:0 8px 20px rgba(241,39,17,.35)}
.cat-card .ico svg{width:1.7rem;height:1.7rem}
.domain-card .nm{font-weight:700;font-size:.95rem}
.domain-card .cnt{color:var(--muted);font-size:.75rem;margin-top:.25rem}
.domain-card.soon{opacity:.45}
.domain-card.soon .cnt{color:var(--primary2)}

/* القوالب */
.filter-row{display:flex;gap:.5rem;margin-bottom:.9rem}
.chip{
  padding:.4rem 1rem;border-radius:999px;background:var(--card);border:1px solid var(--line);font-weight:700;font-size:.85rem;
}
.chip.active{background:var(--primary);border-color:var(--primary);color:#fff}
.templates-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:.7rem}
.tpl-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;text-align:right}
.tpl-card:not(.soon):hover{border-color:var(--primary)}
.tpl-card canvas{display:block;width:100%;aspect-ratio:9/14;background:#000}
.tpl-card .meta{padding:.55rem .65rem}
.tpl-card .nm{font-weight:700;font-size:.88rem}
.tpl-card .sub{color:var(--muted);font-size:.72rem;margin-top:.15rem;display:flex;gap:.4rem}
.tpl-card.soon{opacity:.5;display:grid;place-items:center;min-height:120px;color:var(--muted)}
.blank-start{text-align:center;margin-top:1.2rem}

/* المحرر */
#screen-editor{max-width:1200px}
.editor-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:1rem;align-items:start}
.preview-col{min-width:0}
#preview-wrap{
  position:relative;margin:0 auto;background:#000;border-radius:var(--radius);overflow:hidden;
  max-height:62vh;display:flex;justify-content:center;border:1px solid var(--line);
}
#preview{max-width:100%;max-height:62vh;width:auto;height:auto;display:block;touch-action:none}
.play-btn{
  position:absolute;inset:0;margin:auto;width:64px;height:64px;border-radius:50%;
  background:rgba(0,0,0,.55);color:#fff;font-size:1.4rem;display:grid;place-items:center;
  border:1px solid rgba(255,255,255,.25);
}
.time-row{display:flex;align-items:center;gap:.6rem;margin-top:.6rem;font-size:.8rem;color:var(--muted);font-variant-numeric:tabular-nums}
.time-row input{flex:1;accent-color:var(--primary)}
#timeline{
  display:flex;gap:6px;overflow-x:auto;padding:.6rem .2rem;margin-top:.3rem;
  background:var(--bg2);border-radius:var(--radius);border:1px solid var(--line);min-height:84px;
}
.tl-clip{touch-action:none;user-select:none;
  position:relative;flex:0 0 auto;width:76px;height:64px;border-radius:9px;overflow:hidden;
  border:2px solid transparent;background:#262630;
}
.tl-clip.active{border-color:var(--primary)}
.tl-clip canvas,.tl-clip img{width:100%;height:100%;object-fit:cover;display:block}
.tl-clip .dur{position:absolute;bottom:2px;inset-inline-start:4px;font-size:.62rem;background:rgba(0,0,0,.6);padding:0 4px;border-radius:5px;color:#fff}
.tl-clip .ph{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:.62rem;color:#fff;background:linear-gradient(160deg,#3a3a48,#23232e);text-align:center;padding:4px 4px 15px;line-height:1.35;gap:1px}
.tl-add{
  flex:0 0 auto;width:56px;height:64px;border-radius:9px;border:2px dashed var(--line);
  color:var(--muted);font-size:1.3rem;display:grid;place-items:center;
}

/* لوحة الأدوات */
.panel-col{background:var(--bg2);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
#tools-tabs{display:flex;overflow-x:auto;border-bottom:1px solid var(--line)}
#tools-tabs .tab{
  flex:1;padding:.7rem .5rem;font-size:.85rem;font-weight:700;color:var(--muted);white-space:nowrap;
  border-bottom:2px solid transparent;
}
#tools-tabs .tab.active{color:var(--text);border-bottom-color:var(--primary)}
.panel{padding:.9rem}
.panel h3{font-size:.92rem;font-weight:800;margin:.4rem 0 .6rem}
.panel .row{margin-bottom:.75rem}
.panel label{display:block;font-size:.82rem;color:var(--muted);margin-bottom:.25rem}
.panel output{color:var(--text);font-variant-numeric:tabular-nums}
.panel input[type=range]{width:100%;accent-color:var(--primary)}
.panel select,.panel textarea{
  width:100%;background:var(--card);border:1px solid var(--line);border-radius:10px;color:var(--text);
  padding:.5rem .6rem;font-family:inherit;font-size:.9rem;
}
.panel input[type=color]{width:56px;height:36px;border:1px solid var(--line);border-radius:8px;background:none;padding:2px}
.check-row label{display:flex;align-items:center;gap:.5rem;color:var(--text);font-size:.88rem}
.check-row input{accent-color:var(--primary);width:18px;height:18px}
.btn-row{display:flex;gap:.45rem;flex-wrap:wrap}
.seg{display:flex;flex-wrap:wrap;gap:.35rem}
.seg button{padding:.4rem .7rem;border-radius:9px;background:var(--card);border:1px solid var(--line);font-size:.82rem;font-weight:700}
.seg button.active{background:var(--primary);border-color:var(--primary);color:#fff}
.hint-box{
  margin-top:.8rem;padding:.8rem;border:1px dashed var(--primary);border-radius:12px;
  color:var(--text);font-size:.85rem;line-height:1.7;background:rgba(232,69,44,.08);
}

/* قوائم النصوص والفلاتر والانتقالات والموسيقى */
#text-list{display:flex;flex-direction:column;gap:.4rem;margin:.7rem 0}
.text-item{
  display:flex;align-items:center;gap:.5rem;padding:.55rem .7rem;background:var(--card);
  border:1px solid var(--line);border-radius:10px;font-size:.88rem;text-align:right;width:100%;
}
.text-item.active{border-color:var(--primary)}
.text-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#filter-grid,#effect-grid,#transition-grid,#music-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:.5rem;margin-bottom:.9rem}
.opt-card{
  padding:.6rem .4rem;border-radius:10px;background:var(--card);border:1px solid var(--line);
  font-size:.8rem;font-weight:700;text-align:center;
}
.opt-card.active{border-color:var(--primary);background:rgba(232,69,44,.12)}
.ratio-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.6rem}
.ratio-btn{padding:.9rem .5rem;border-radius:12px;background:var(--card);border:1px solid var(--line);text-align:center}
.ratio-btn b{display:block;font-size:1.05rem}
.ratio-btn span{font-size:.72rem;color:var(--muted)}
.ratio-btn.active{border-color:var(--primary);background:rgba(232,69,44,.12)}

/* نافذة التصدير */
.modal{position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.65);display:grid;place-items:center;padding:1rem}
.modal-card{
  width:100%;max-width:420px;background:var(--bg2);border:1px solid var(--line);
  border-radius:18px;padding:1.3rem;
}
.modal-card h3{font-size:1.1rem;font-weight:800;margin-bottom:.9rem}
.progress{height:10px;background:var(--card);border-radius:99px;overflow:hidden;margin:.8rem 0 .5rem}
#export-bar{height:100%;width:0;background:linear-gradient(90deg,var(--primary),var(--primary2));transition:width .2s}
#export-status{text-align:center;color:var(--muted);font-size:.88rem;margin-bottom:.6rem}
#export-done-msg{line-height:1.9;margin-bottom:.9rem}

/* استئناف مشروع */
.resume-banner{
  display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;
  background:var(--card);border:1px solid var(--primary);border-radius:var(--radius);
  padding:.7rem .9rem;margin-bottom:1rem;font-size:.88rem;
}
.num-inputs{display:flex;align-items:center;gap:.5rem}
.num-inputs input{
  width:80px;background:var(--card);border:1px solid var(--line);border-radius:9px;
  color:var(--text);padding:.4rem .5rem;font-family:inherit;font-size:.9rem;text-align:center;
}
.num-inputs span{color:var(--muted);font-size:.82rem}
.tl-clip.dragging{opacity:.4;border-color:var(--primary2)}

/* تنبيه */
.toast{
  position:fixed;bottom:calc(1rem + var(--safe-b));inset-inline:1rem;z-index:200;
  background:#262630;border:1px solid var(--line);border-radius:12px;padding:.8rem 1rem;
  font-size:.88rem;text-align:center;box-shadow:0 8px 30px rgba(0,0,0,.4);
}

/* الجوال */
@media (max-width:900px){
  .editor-layout{grid-template-columns:1fr}
  #preview-wrap{max-height:46vh}
  #preview{max-height:46vh}
  .panel-col{border-radius:var(--radius) var(--radius) 0 0}
  .hero h1{font-size:1.3rem}
}

/* المرحلة الثانية */
#tools-tabs{display:flex;overflow-x:auto;scrollbar-width:none}
#tools-tabs .tab{white-space:nowrap;flex:0 0 auto}
#sticker-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:.45rem;margin:.4rem 0 .8rem}
.sticker-btn{display:flex;flex-direction:column;align-items:center;gap:.2rem;padding:.5rem .2rem;background:#1c0a0d;border:1px solid #3a3a41;border-radius:10px;color:#f0202c;cursor:pointer}
.sticker-btn svg{width:1.5rem;height:1.5rem}
.sticker-btn span{font-size:.68rem;color:#c9c9d4}
.sticker-btn:active{transform:scale(.96)}
#text-presets{display:flex;flex-wrap:wrap;gap:.4rem;margin:.3rem 0 .2rem}
.preset-chip{padding:.45rem .8rem;background:#1c1c24;border:1px solid #2c2c38;border-radius:999px;font-weight:800;font-size:.85rem;cursor:pointer}
.preset-chip:active{transform:scale(.96)}
.layer-item{display:block;width:100%;text-align:right;padding:.5rem .7rem;margin:.25rem 0;background:#1c1c24;border:1px solid #2c2c38;border-radius:10px;color:#e8e8ef;font-size:.85rem;cursor:pointer}
.layer-item.active{border-color:#f0202c;background:#2a1013}

.trim-h{position:absolute;top:0;bottom:0;width:10px;z-index:3;cursor:ew-resize;touch-action:none;
  background:rgba(14,165,233,.55);opacity:.75}
.trim-h:hover{opacity:1;background:rgba(14,165,233,.9)}
.trim-h-in{inset-inline-start:0;border-inline-end:2px solid #fff}
.trim-h-out{inset-inline-end:0;border-inline-start:2px solid #fff}

/* زر تطبيق القالب */
.tpl-apply{display:block;margin:0 .65rem .6rem;background:var(--primary);color:#fff;text-align:center;border-radius:8px;padding:.4rem .6rem;font-size:.8rem;font-weight:700}
.tpl-card:hover .tpl-apply{background:var(--primary2)}

/* ===== النمط الكلاسيكي (أبيض رسمي) ===== */
body[data-theme="classic"]{
  --bg:#f7f5f0; --bg2:#ffffff; --card:#ffffff; --line:#e3ddd0;
  --text:#24221c; --muted:#7a7263; --primary:#1e5e4a; --primary2:#2a7a60;
  --radius:8px;
  font-family:'Tajawal','Cairo',system-ui,sans-serif;
}
body[data-theme="classic"] #topbar{background:rgba(247,245,240,.94)}
body[data-theme="classic"] .hero h1,
body[data-theme="classic"] .section-title,
body[data-theme="classic"] .brand{font-family:'Amiri','Cairo',serif}
body[data-theme="classic"] .btn-primary{box-shadow:0 1px 0 rgba(30,94,74,.25)}
body[data-theme="classic"] .modal-card{border:1px solid var(--line)}
body[data-theme="classic"] .tl-clip{background:#efeadf}
body[data-theme="classic"] .tl-clip .ph{background:linear-gradient(160deg,#efe9db,#e2dccb);color:#6b6353}
body[data-theme="classic"] .chip{border:1px solid var(--line);background:#fff;color:var(--text)}
body[data-theme="classic"] .chip.active{background:var(--primary);color:#fff;border-color:var(--primary)}

/* ===== النمط الناعم (فاتح دافئ، زوايا كبيرة) ===== */
body[data-theme="soft"]{
  --bg:#fdf7f2; --bg2:#ffffff; --card:#fff6f0; --line:#f2e2d8;
  --text:#3b2f2a; --muted:#9b8579; --primary:#e0785f; --primary2:#c8102e;
  --radius:20px;
  font-family:'Tajawal','Cairo',system-ui,sans-serif;
}
body[data-theme="soft"] #topbar{background:rgba(253,247,242,.94);border-bottom-color:#f2e2d8}
body[data-theme="soft"] .hero h1,body[data-theme="soft"] .section-title,body[data-theme="soft"] .brand{font-family:'Tajawal','Cairo',sans-serif;font-weight:800}
body[data-theme="soft"] .domain-card,body[data-theme="soft"] .tpl-card{box-shadow:0 6px 18px rgba(224,120,95,.10)}
body[data-theme="soft"] .chip{background:#fff;border:1px solid var(--line);color:var(--text)}
body[data-theme="soft"] .chip.active{background:var(--primary);border-color:var(--primary);color:#fff}
body[data-theme="soft"] .tl-clip{background:#fdeee7}
body[data-theme="soft"] .tl-clip .ph{background:linear-gradient(160deg,#fdeee7,#f7ded2);color:#a3786a}
body[data-theme="soft"] .btn-primary{color:#fff;box-shadow:0 8px 20px rgba(224,120,95,.28)}

/* ===== النمط الراقي (أسود عميق وذهبي) ===== */
body[data-theme="luxe"]{
  --bg:#0a0a0c; --bg2:#121216; --card:#17171c; --line:#2b2b34;
  --text:#f3f0e6; --muted:#9a9384; --primary:#c9a227; --primary2:#e2bf4c;
  --radius:5px;
}
body[data-theme="luxe"] #topbar{background:rgba(10,10,12,.95);border-bottom:1px solid #26262e}
body[data-theme="luxe"] .hero h1,body[data-theme="luxe"] .section-title,body[data-theme="luxe"] .brand{font-family:'Amiri','Cairo',serif;letter-spacing:.2px}
body[data-theme="luxe"] .domain-card,body[data-theme="luxe"] .tpl-card{border:1px solid rgba(201,162,39,.24)}
body[data-theme="luxe"] .domain-card:not(.soon):hover,body[data-theme="luxe"] .tpl-card:not(.soon):hover{border-color:var(--primary2)}
body[data-theme="luxe"] .domain-card .ico{color:var(--primary)}
body[data-theme="luxe"] .btn-primary,body[data-theme="luxe"] .tpl-apply,body[data-theme="luxe"] .chip.active{color:#14110a;font-weight:800}
body[data-theme="luxe"] .chip{border:1px solid var(--line);background:#121216}
body[data-theme="luxe"] .chip.active{background:transparent;border-color:var(--primary);color:var(--primary2)}
body[data-theme="luxe"] .tl-clip{background:#1b1b21}

/* مفتاح النمط */
#theme-menu{position:absolute;top:calc(100% + 8px);left:.9rem;background:var(--bg2);border:1px solid var(--line);border-radius:12px;padding:.35rem;min-width:178px;box-shadow:0 16px 40px rgba(0,0,0,.4);z-index:80}
.theme-opt{display:flex;align-items:center;gap:.55rem;width:100%;padding:.5rem .6rem;border-radius:9px;font-size:.86rem;font-weight:700;color:var(--text);text-align:right}
.theme-opt:hover{background:var(--card)}
.theme-opt.active{background:var(--card);box-shadow:inset 0 0 0 1px var(--primary)}
.theme-opt .sw{width:18px;height:18px;border-radius:50%;flex:none;box-shadow:inset 0 0 0 1px rgba(0,0,0,.18)}
.sw-modern{background:linear-gradient(135deg,#e8452c 50%,#1e1e26 50%)}
.sw-classic{background:linear-gradient(135deg,#1e5e4a 50%,#f7f5f0 50%)}
.sw-soft{background:linear-gradient(135deg,#c8102e 50%,#fdf7f2 50%)}
.sw-luxe{background:linear-gradient(135deg,#e2bf4c 50%,#0a0a0c 50%)}

#btn-theme{width:auto;min-width:78px;padding:0 1rem;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;font-size:.88rem;font-weight:700;font-family:inherit;cursor:pointer;color:var(--text)}
.top-actions{gap:.6rem}

/* أيقونات التبويبات */
.tab{display:flex;align-items:center;gap:.35rem}
.tab svg{width:15px;height:15px;flex:none}

/* الميزات المقفولة */
.locked-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:.7rem;margin-top:.6rem}
.locked-card{
  position:relative;background:var(--card);border:1px dashed var(--line);border-radius:var(--radius);
  padding:1rem .55rem;text-align:center;overflow:hidden;
}
.locked-card .lk-title{font-weight:700;font-size:.88rem;line-height:1.6;padding:0 .35rem;padding-inline-start:2.1rem;filter:blur(1.3px);opacity:.75;pointer-events:none}
.locked-card .lk-sub{color:var(--muted);font-size:.72rem;line-height:1.7;margin-top:.3rem;padding:0 .35rem;padding-inline-start:2.1rem;filter:blur(1.3px);opacity:.6;pointer-events:none}
.locked-card .lk-badge{
  position:absolute;inset-inline-start:.5rem;top:.5rem;width:26px;height:26px;border-radius:8px;
  background:var(--bg2);border:1px solid var(--line);display:grid;place-items:center;
}
.locked-card .lk-badge svg{width:14px;height:14px;color:var(--muted)}

/* لافتة الموسم الهجري */
.season-banner{
  display:flex;align-items:center;gap:.8rem;margin:0 0 1rem;
  background:linear-gradient(135deg,var(--card),var(--bg2));border:1px solid var(--line);
  border-radius:var(--radius);padding:.7rem 1rem;
}
.season-banner .sb-text{flex:1;display:flex;flex-direction:column;gap:.15rem}
.season-banner .sb-text b{font-size:.95rem}
.season-banner .sb-text span{color:var(--muted);font-size:.78rem}
.season-banner .btn{flex:none}

/* نافذة قوالب الموسم */
.season-tpl-list{display:flex;flex-direction:column;gap:.5rem;margin-top:.6rem}
.season-tpl{display:flex;align-items:center;gap:.7rem;background:var(--bg2);border:1px solid var(--line);border-radius:var(--radius);padding:.6rem .8rem}
.season-tpl .st-info{flex:1}
.season-tpl .st-info b{display:block;font-size:.9rem}
.season-tpl .st-info span{color:var(--muted);font-size:.75rem}

/* حقول النوافذ تتبع الثيم */
.modal-card textarea, .modal-card input[type="text"]{
  width:100%;background:var(--bg2);color:var(--text);border:1px solid var(--line);
  border-radius:var(--radius);padding:.6rem .8rem;font-family:inherit;font-size:.95rem;line-height:1.7;
}
.modal-card textarea:focus, .modal-card input[type="text"]:focus{outline:none;border-color:var(--primary)}
.modal-card textarea::placeholder, .modal-card input[type="text"]::placeholder{color:var(--muted)}

.pro-lock{position:relative;overflow:hidden;border-radius:12px;border:1px dashed var(--line,#444);padding:.6rem;margin:.4rem 0;user-select:none}
.pro-lock .pl-body{filter:blur(3.5px);opacity:.6;pointer-events:none}
.pro-lock .pl-btn{border:1px solid var(--line,#444);border-radius:10px;padding:.7rem;text-align:center;font-weight:700;margin-top:.4rem}
.pro-lock .pl-wave{width:100%;height:60px;margin-top:.4rem;background:#0b0b0e;border-radius:8px}
.pro-lock .pl-badge{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:.4rem;font-weight:700;font-size:.85rem;pointer-events:none}
.pro-lock .pl-badge svg{width:16px;height:16px}

/* تكملة النمط الناعم: الهيرو والبطاقات */
body[data-theme="soft"] .hero{background:linear-gradient(135deg,rgba(255,255,255,.94),rgba(255,243,236,.92));border:1px solid #f3e3d9;box-shadow:0 20px 50px rgba(224,120,95,.12),inset 0 1px 0 #fff}
body[data-theme="soft"] .hero::before{background:radial-gradient(circle,rgba(240,160,139,.32),transparent 65%)}
body[data-theme="soft"] .hero h1{background:linear-gradient(180deg,#3b2f2a,#7b5f52);-webkit-background-clip:text;background-clip:text;color:transparent}
body[data-theme="soft"] .hero p{color:#7b6559}
body[data-theme="soft"] .hero-badges span{background:#fff;border:1px solid #f3ded2;color:#7b5f52}
body[data-theme="soft"] .hero-badges svg{color:var(--primary)}
body[data-theme="soft"] .hero-art svg{filter:drop-shadow(0 18px 30px rgba(224,120,95,.26))}
body[data-theme="soft"] .section-title{color:#3b2f2a}
body[data-theme="soft"] .domain-card{background:var(--card);border:1px solid var(--line)}
body[data-theme="soft"] .domain-card .ico{background:linear-gradient(145deg,#fff,#fdeee7);border:1px solid #f3ded2;border-radius:50%}
body[data-theme="soft"] .btn-ghost{background:#fff;border:1px solid var(--line);color:var(--text)}
body[data-theme="luxe"] .btn-ghost{background:#121216;border:1px solid var(--line);color:var(--text)}
body[data-theme="luxe"] .hero{background:linear-gradient(135deg,rgba(201,162,39,.08),rgba(255,255,255,.02));border:1px solid rgba(201,162,39,.28)}
body[data-theme="luxe"] .hero-badges span{background:rgba(201,162,39,.08);border:1px solid rgba(201,162,39,.28);color:#e8dfc8}
body[data-theme="luxe"] .hero-badges svg{color:var(--primary2)}
body[data-theme="luxe"] .btn-primary{background:linear-gradient(180deg,#e2bf4c,#b8912a);border:1px solid #8f6f1e;color:#14110a}
body[data-theme="luxe"] .btn-primary:hover{box-shadow:0 8px 22px rgba(201,162,39,.35)}
body[data-theme="soft"] .btn-primary{background:linear-gradient(180deg,#c8102e,#e0785f);border:1px solid #d76b52}

/* السلوغن */
.slogan{margin-top:.45rem;font-family:'Cairo',system-ui,sans-serif;font-weight:700;font-size:.95rem;letter-spacing:.02em;color:var(--primary2)}
body[data-theme="classic"] .slogan,body[data-theme="soft"] .slogan{color:var(--primary)}

/* مدخل صنّاع المحتوى */
.creator-entry{margin:1.1rem 0 .4rem;padding:1.1rem 1.2rem;border-radius:18px;border:1px solid var(--line);
  background:linear-gradient(135deg,rgba(232,69,44,.12),rgba(255,255,255,.02))}
.ce-head h2{font-size:1.15rem;font-weight:800}
.ce-head p{color:var(--muted);font-size:.86rem;margin-top:.3rem;line-height:1.7}
.ce-actions{display:flex;flex-wrap:wrap;gap:.55rem;margin-top:.85rem}
body[data-theme="classic"] .creator-entry,body[data-theme="soft"] .creator-entry{background:linear-gradient(135deg,rgba(224,120,95,.10),rgba(255,255,255,.6))}

/* لماذا جفلو؟ */
.why{margin:1.6rem 0 2rem}
.why-list{list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:.5rem .9rem;margin-top:.8rem}
.why-list li{position:relative;padding-inline-start:1.4rem;font-size:.88rem;line-height:1.8;color:var(--text)}
.why-list li::before{content:"";position:absolute;inset-inline-start:0;top:.62em;width:9px;height:9px;border-radius:50%;background:var(--primary)}
body[data-theme="classic"] .why-list li{color:#2a2418}

/* الترندات */
.trends-entry{margin:.2rem 0 .9rem}
.trends-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:.6rem;padding:1rem;border-radius:var(--radius);background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff;box-shadow:0 10px 26px rgba(241,39,17,.32)}
.trends-btn svg{width:1.5rem;height:1.5rem;flex:none}
.trends-btn .tb-main{font-size:1.15rem;font-weight:800}
.trends-btn .tb-sub{font-size:.82rem;opacity:.92}
.trends-btn:active{transform:scale(.985)}

/* الهوك */
.hook-entry{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;margin:.4rem 0 .8rem}
.hook-card{max-width:560px;width:100%;min-width:0}
.hook-card .filter-row{flex-wrap:wrap}
.hook-list{max-height:46vh;overflow:auto;margin:.6rem 0;display:flex;flex-direction:column;gap:.45rem}
.hook-row{display:flex;align-items:center;gap:.6rem;justify-content:space-between;background:var(--card);border:1px solid var(--line);border-radius:10px;padding:.55rem .7rem}
.hook-row p{font-size:.9rem;line-height:1.6;margin:0;min-width:0;flex:1}
.hook-use{flex:none;padding:.4rem .8rem;font-size:.8rem}
.hook-free{display:flex;flex-direction:column;gap:.45rem;margin-top:.5rem}
.hook-free label{font-size:.85rem;font-weight:700}
.hook-free textarea{width:100%;background:var(--bg2);border:1px solid var(--line);border-radius:10px;color:var(--text);padding:.6rem .7rem;font-family:inherit;font-size:.9rem;resize:vertical}
.hook-free .btn{align-self:flex-start}
body[data-theme="classic"] .hook-row,body[data-theme="soft"] .hook-row{background:#fff}

/* مبدل اللغة */
.lang-switch{display:flex;gap:.25rem;background:var(--card);border:1px solid var(--line);border-radius:999px;padding:.2rem;position:relative}
.lang-opt{padding:.3rem .7rem;border-radius:999px;font-size:.8rem;font-weight:700;color:var(--muted)}
.lang-opt.active{background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff}
.lang-switch.pulse{animation:langPulse 1.6s ease-in-out infinite}
.lang-switch.pulse::after{content:'';position:absolute;inset:-6px;border-radius:999px;border:2px solid var(--primary2);opacity:.7;animation:langGlow 1.6s ease-in-out infinite;pointer-events:none}
@keyframes langPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.07)}}
@keyframes langGlow{0%,100%{opacity:.75;transform:scale(1)}50%{opacity:.15;transform:scale(1.12)}}

/* دوائر الألوان */
.color-dots{display:flex;gap:.35rem;align-items:center}
.color-dot{width:22px;height:22px;border-radius:50%;border:2px solid transparent;padding:0;transition:transform .15s,border-color .15s}
.color-dot:hover{transform:scale(1.15)}
.color-dot.active{border-color:#fff;box-shadow:0 0 0 2px var(--primary2)}
.color-dot[data-color="fire"]{background:linear-gradient(135deg,#a8121f,#f12711)}
.color-dot[data-color="ocean"]{background:linear-gradient(135deg,#38bdf8,#1d4ed8)}
.color-dot[data-color="rose"]{background:linear-gradient(135deg,#fda4af,#e11d48)}
.color-dot[data-color="emerald"]{background:linear-gradient(135deg,#34d399,#047857)}
.color-dot[data-color="royal"]{background:linear-gradient(135deg,#e2bf4c,#8a6a10)}
.color-dot[data-color="violet"]{background:linear-gradient(135deg,#c084fc,#6d28d9)}

/* طبقة الزخرفة الخلفية لكل لون */
.color-bg{position:fixed;inset:0;z-index:0;pointer-events:none;opacity:.5}
#topbar,main.screen{position:relative;z-index:1}

body[data-color="ocean"]{--primary:#38bdf8;--primary2:#1d4ed8}
body[data-color="ocean"] .color-bg{background:
  linear-gradient(135deg,transparent 44%,rgba(125,211,252,.14) 45%,rgba(125,211,252,.14) 55%,transparent 56%) 8% 12%/180px 180px no-repeat,
  linear-gradient(45deg,transparent 44%,rgba(147,197,253,.12) 45%,rgba(147,197,253,.12) 55%,transparent 56%) 82% 22%/150px 150px no-repeat,
  linear-gradient(135deg,transparent 42%,rgba(96,165,250,.10) 43%,rgba(96,165,250,.10) 57%,transparent 58%) 70% 78%/220px 220px no-repeat,
  linear-gradient(45deg,transparent 42%,rgba(191,219,254,.09) 43%,rgba(191,219,254,.09) 57%,transparent 58%) 22% 82%/170px 170px no-repeat,
  radial-gradient(circle at 50% 0%,rgba(29,78,216,.16),transparent 60%)}

body[data-color="rose"]{--primary:#fda4af;--primary2:#e11d48}
body[data-color="rose"] .color-bg{background:
  radial-gradient(closest-side,rgba(251,113,133,.18),transparent 72%) 12% 18%/220px 220px no-repeat,
  radial-gradient(closest-side,rgba(244,114,182,.14),transparent 70%) 78% 12%/180px 180px no-repeat,
  radial-gradient(closest-side,rgba(251,146,60,.10),transparent 70%) 85% 75%/240px 240px no-repeat,
  radial-gradient(closest-side,rgba(251,113,133,.13),transparent 72%) 18% 80%/200px 200px no-repeat,
  radial-gradient(closest-side,rgba(244,114,182,.10),transparent 70%) 50% 50%/260px 260px no-repeat}

body[data-color="emerald"]{--primary:#34d399;--primary2:#047857}
body[data-color="emerald"] .color-bg{background:
  radial-gradient(ellipse 60% 40% at 20% 15%,rgba(52,211,153,.14),transparent 70%),
  radial-gradient(ellipse 50% 35% at 80% 25%,rgba(16,185,129,.11),transparent 70%),
  radial-gradient(ellipse 55% 40% at 75% 85%,rgba(5,150,105,.13),transparent 70%),
  radial-gradient(ellipse 45% 35% at 15% 80%,rgba(110,231,183,.09),transparent 70%)}

body[data-color="royal"]{--primary:#e2bf4c;--primary2:#8a6a10}
body[data-color="royal"] .color-bg{background:
  repeating-linear-gradient(90deg,transparent 0 118px,rgba(226,191,76,.07) 118px 119px),
  repeating-linear-gradient(0deg,transparent 0 158px,rgba(226,191,76,.05) 158px 159px),
  radial-gradient(circle at 85% 10%,rgba(226,191,76,.13),transparent 55%),
  radial-gradient(circle at 10% 90%,rgba(138,106,16,.15),transparent 55%)}

body[data-color="violet"]{--primary:#c084fc;--primary2:#6d28d9}
body[data-color="violet"] .color-bg{background:
  radial-gradient(circle 8px at 18% 22%,rgba(192,132,252,.35),transparent 60%),
  radial-gradient(circle 12px at 78% 15%,rgba(167,139,250,.28),transparent 60%),
  radial-gradient(circle 6px at 62% 68%,rgba(192,132,252,.30),transparent 60%),
  radial-gradient(circle 10px at 30% 78%,rgba(139,92,246,.26),transparent 60%),
  radial-gradient(circle 14px at 88% 82%,rgba(192,132,252,.20),transparent 60%),
  radial-gradient(circle at 50% 40%,rgba(109,40,217,.14),transparent 65%)}

body[data-color="fire"] .color-bg{background:
  radial-gradient(closest-side,rgba(255,122,0,.13),transparent 70%) 15% 85%/240px 240px no-repeat,
  radial-gradient(closest-side,rgba(241,39,17,.12),transparent 70%) 85% 15%/220px 220px no-repeat,
  radial-gradient(closest-side,rgba(255,160,60,.08),transparent 70%) 60% 60%/300px 300px no-repeat}

/* زر تغيير الواجهة البارز */
.theme-btn{background:var(--card);border:1px solid var(--line);border-radius:999px;padding:.4rem .8rem;font-size:.82rem;font-weight:700;color:var(--text);position:relative}
.theme-btn:hover{border-color:var(--primary)}
.theme-btn.pulse{animation:langPulse 1.6s ease-in-out infinite}
.theme-btn.pulse::after{content:'';position:absolute;inset:-6px;border-radius:999px;border:2px solid var(--primary2);opacity:.7;animation:langGlow 1.6s ease-in-out infinite;pointer-events:none}
.color-dots.pulse .color-dot{animation:langPulse 1.6s ease-in-out infinite}
.color-dots.pulse .color-dot:nth-child(2){animation-delay:.1s}
.color-dots.pulse .color-dot:nth-child(3){animation-delay:.2s}
.color-dots.pulse .color-dot:nth-child(4){animation-delay:.3s}
.color-dots.pulse .color-dot:nth-child(5){animation-delay:.4s}
.color-dots.pulse .color-dot:nth-child(6){animation-delay:.5s}
.color-dots.pulse{position:relative}
.color-dots.pulse::after{content:'';position:absolute;inset:-7px;border-radius:999px;border:2px solid var(--primary2);opacity:.7;animation:langGlow 1.6s ease-in-out infinite;pointer-events:none}

.emoji-row{display:flex;flex-wrap:wrap;gap:4px;max-height:104px;overflow-y:auto;padding:2px}
.emoji-chip{background:var(--card);border:1px solid var(--line);border-radius:8px;font-size:17px;padding:3px 5px;cursor:pointer;line-height:1.1;transition:transform .12s}
.emoji-chip:hover{transform:scale(1.18);border-color:var(--primary)}

/* ===== الواجهة الغامرة: ستايل جيمنج أحمر غامق وخطوط رمادية ===== */
#bg-pulses{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden}
#bg-pulses .grid{position:absolute;inset:0;background:
  repeating-linear-gradient(0deg,transparent 0 63px,rgba(126,126,138,.05) 63px 64px),
  repeating-linear-gradient(90deg,transparent 0 63px,rgba(126,126,138,.05) 63px 64px)}
#bg-pulses .pulse{position:absolute;border-radius:50%;filter:blur(70px);opacity:.2;animation:bp 9s ease-in-out infinite}
#bg-pulses .p1{width:420px;height:420px;background:#f0202c;top:-120px;right:-100px}
#bg-pulses .p2{width:360px;height:360px;background:#6e0f1c;bottom:4%;left:-120px;animation-delay:-3s}
#bg-pulses .p3{width:280px;height:280px;background:#f0202c;top:44%;right:16%;animation-delay:-5s;opacity:.12}
#bg-pulses .p4{width:230px;height:230px;background:#48090f;bottom:28%;right:58%;animation-delay:-7s}
@keyframes bp{0%,100%{transform:scale(1);opacity:.13}50%{transform:scale(1.4);opacity:.3}}
.screen{position:relative;z-index:1}

.hero-art{position:relative;display:flex;justify-content:center;padding:.4rem 0 1rem;min-height:390px}
.phone{width:178px;height:356px;border-radius:30px;background:#170709;border:2px solid #4a4a52;position:relative;
  animation:phonePulse 4.2s ease-in-out infinite;
  box-shadow:0 0 0 1px rgba(255,255,255,.05),0 18px 44px rgba(0,0,0,.62),0 0 36px rgba(240,32,44,.22)}
@keyframes phonePulse{0%,100%{transform:scale(1) translateY(0)}50%{transform:scale(1.03) translateY(-6px)}}
.phone-notch{position:absolute;top:8px;left:50%;transform:translateX(-50%);width:56px;height:9px;border-radius:5px;background:#000;z-index:3}
.phone-screen{position:absolute;inset:8px;border-radius:23px;overflow:hidden;background:#000}
.show-vid{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transform:scale(1.14);filter:blur(2px) saturate(1.15);transition:opacity 1.15s ease,transform 1.5s ease}
.show-vid.on{opacity:1;transform:scale(1)}
.show-shade{position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,rgba(13,5,7,.35),transparent 30%,transparent 60%,rgba(13,5,7,.74))}
.show-phrase{position:absolute;left:0;right:0;bottom:14px;z-index:2;text-align:center;font-weight:900;font-size:.8rem;letter-spacing:.07em;color:#fff;text-shadow:0 2px 12px rgba(0,0,0,.85);direction:ltr;transition:opacity .5s,transform .5s}
.show-phrase.swap{opacity:0;transform:translateY(9px)}

.float-ic{position:absolute;width:44px;height:44px;border-radius:14px;display:flex;align-items:center;justify-content:center;
  background:rgba(32,13,17,.86);border:1px solid #4a4a52;color:#ff2e3e;backdrop-filter:blur(4px);
  box-shadow:0 8px 22px rgba(0,0,0,.5),0 0 18px rgba(240,32,44,.18);animation:floaty 6s ease-in-out infinite}
.float-ic svg{width:22px;height:22px}
.fi-a{top:4%;right:6%;animation-delay:-1s}
.fi-b{top:28%;left:2%;animation-delay:-2.4s;color:#d4af37}
.fi-c{bottom:24%;right:1%;color:#8f7bff;animation-delay:-3.6s}
.fi-d{bottom:4%;left:9%;color:#2fd08c;animation-delay:-4.8s}
.fi-e{top:56%;right:10%;width:38px;height:38px;color:#ff5e6a;animation-delay:-.6s}
@keyframes floaty{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-12px) rotate(4deg)}}

.hero-copy>*{opacity:0;animation:heroIn .8s cubic-bezier(.2,.7,.2,1) forwards}
.hero-copy>*:nth-child(1){animation-delay:.06s}.hero-copy>*:nth-child(2){animation-delay:.18s}
.hero-copy>*:nth-child(3){animation-delay:.3s}.hero-copy>*:nth-child(4){animation-delay:.42s}
.hero-copy>*:nth-child(5){animation-delay:.54s}.hero-copy>*:nth-child(6){animation-delay:.66s}
@keyframes heroIn{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
.reveal{opacity:0;transform:translateY(26px);transition:opacity .7s ease,transform .7s cubic-bezier(.2,.7,.2,1)}
.reveal.in{opacity:1;transform:none}
.scroll-hint{display:flex;justify-content:center;margin:-.3rem 0 .5rem;position:relative;z-index:1}
.scroll-hint svg{width:26px;height:26px;color:#ff2e3e;animation:hintBob 1.8s ease-in-out infinite}
@keyframes hintBob{0%,100%{transform:translateY(0);opacity:.5}50%{transform:translateY(7px);opacity:1}}
@media (prefers-reduced-motion:reduce){
  .phone,.float-ic,#bg-pulses .pulse,.hero-copy>*,.scroll-hint svg{animation:none!important}
  .reveal{opacity:1;transform:none;transition:none}
}

/* مكتبة الموسيقى المرخصة */
.muslib-row{display:flex;align-items:center;gap:.5rem;padding:.45rem .5rem;border:1px solid rgba(255,255,255,.12);border-radius:.7rem;margin-bottom:.4rem;background:rgba(255,255,255,.03)}
.muslib-row.active{border-color:var(--accent,#f0202c);background:rgba(240,32,44,.08)}
.muslib-play{flex:0 0 auto;width:2rem;height:2rem;border-radius:50%;border:1px solid rgba(255,255,255,.25);background:transparent;color:inherit;cursor:pointer;font-size:.8rem}
.muslib-info{flex:1;min-width:0}
.muslib-info .nm{font-weight:700;font-size:.85rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.muslib-info .sub{font-size:.72rem;opacity:.65}
.muslib-add{flex:0 0 auto;padding:.3rem .8rem;border-radius:.6rem;border:none;background:var(--accent,#f0202c);color:#fff;cursor:pointer;font-size:.8rem}
.muslib-add:disabled{opacity:.5;cursor:default}

/* البحث الصوتي والنصي */
.search-row{display:flex;gap:.4rem;align-items:center;margin:.5rem 0}
.search-row input{flex:1;padding:.5rem .8rem;border-radius:.7rem;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.05);color:inherit;font-size:.9rem}
.search-row input:focus{outline:none;border-color:var(--accent,#f0202c)}
.mic-btn{flex:0 0 auto;width:2.4rem;height:2.4rem;border-radius:50%;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.06);color:inherit;cursor:pointer;font-size:1rem;padding:0;display:grid;place-items:center;overflow:hidden;white-space:nowrap;line-height:1}
.mic-btn.rec{background:var(--accent,#f0202c);border-color:var(--accent,#f0202c);animation:micpulse 1s infinite}
@keyframes micpulse{50%{box-shadow:0 0 0 6px rgba(240,32,44,.25)}}

#ramp-seg{flex-wrap:wrap;max-width:100%}
#ramp-seg button{flex:0 0 auto}

#kf-box .kf-grid{display:grid;grid-template-columns:1fr;gap:.25rem}
#kf-box .kf-grid label{font-size:.8rem;opacity:.85}
#kf-list{display:flex;flex-wrap:wrap;gap:.3rem;margin-top:.4rem}
#kf-list .kf-chip{display:inline-flex;align-items:center;gap:.25rem;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.15);border-radius:999px;padding:.15rem .5rem;font-size:.75rem;cursor:pointer}
#kf-list .kf-chip .x{opacity:.7;font-weight:700}
/* شبكة صور العناصر الجاهزة */
.el-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.4rem;margin-top:.4rem}
.el-thumb{padding:0;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--card);aspect-ratio:1;cursor:pointer}
.el-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.el-thumb:hover{border-color:var(--primary)}
/* أقسام القوالب */
.tplsec-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.45rem;margin-bottom:.8rem}
.tplsec-card{display:flex;flex-direction:column;gap:.2rem;text-align:start;padding:.55rem .6rem;border-radius:12px;border:1px solid var(--line);background:var(--card);cursor:pointer}
.tplsec-card b{font-size:.86rem;color:var(--text)}
.tplsec-card span{font-size:.72rem;color:var(--muted);line-height:1.35}
.tplsec-card:hover{border-color:var(--primary)}
