/* ===== طبقة الثراء البصري v1 ===== */
/* العصري: زجاج داكن وتوهج متدرج (مرجع: لغة Linear وVercel) */
body{background:
  radial-gradient(900px 480px at 85% -8%,rgba(232,69,44,.20),transparent 60%),
  radial-gradient(700px 420px at 8% 4%,rgba(120,80,255,.14),transparent 60%),
  var(--bg);background-attachment:fixed}
#topbar{box-shadow:0 1px 0 rgba(255,255,255,.04),0 8px 30px rgba(0,0,0,.35)}
.brand{display:flex;align-items:center;gap:.5rem}
.brand::before{content:"";width:28px;height:28px;border-radius:9px;flex:none;
  background:linear-gradient(135deg,#ff6b4a,#e8452c 55%,#b8260f);
  box-shadow:0 4px 14px rgba(232,69,44,.45),inset 0 1px 0 rgba(255,255,255,.35);
  -webkit-mask:none}
.brand::after{content:none}
.btn-primary{background:linear-gradient(180deg,#ff7a5c,#e8452c);
  box-shadow:0 6px 18px rgba(232,69,44,.38),inset 0 1px 0 rgba(255,255,255,.3);
  transition:transform .15s,box-shadow .2s,filter .2s}
.btn-primary:hover{filter:brightness(1.07);box-shadow:0 10px 26px rgba(232,69,44,.5),inset 0 1px 0 rgba(255,255,255,.35)}
.btn-ghost{backdrop-filter:blur(6px);background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.12)}
.btn-ghost:hover{background:rgba(255,255,255,.08)}

/* الهيرو */
.hero{position:relative;display:grid;grid-template-columns:1.1fr .9fr;gap:2rem;align-items:center;
  padding:2.2rem 2rem;margin-bottom:1.2rem;border-radius:22px;overflow:hidden;
  background:linear-gradient(135deg,rgba(255,255,255,.06),rgba(255,255,255,.015));
  border:1px solid rgba(255,255,255,.09);box-shadow:0 30px 80px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.08)}
.hero::before{content:"";position:absolute;inset:-40% -10% auto auto;width:520px;height:520px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,107,74,.28),transparent 65%);pointer-events:none}
.hero-copy{position:relative;z-index:1}
.hero-copy .btn{display:inline-flex}
.hero h1{font-size:2.15rem;line-height:1.35;font-weight:900;letter-spacing:-.01em;
  background:linear-gradient(180deg,#fff,#c9c9d6);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero p{font-size:1rem;line-height:1.9;max-width:34rem}
.hero-badges{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:1.1rem}
.hero-badges span{display:inline-flex;align-items:center;gap:.35rem;font-size:.76rem;font-weight:700;
  padding:.3rem .7rem;border-radius:99px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);color:#dcdce6}
.hero-badges svg{width:13px;height:13px;color:#ff8a6e}
.hero-art{position:relative;z-index:1;display:flex;justify-content:center}
.hero-art svg{width:100%;max-width:330px;height:auto;filter:drop-shadow(0 24px 40px rgba(0,0,0,.5))}
@media (max-width:760px){
  .hero{grid-template-columns:1fr;padding:1.4rem 1.1rem;gap:1rem}
  .hero h1{font-size:1.5rem}
  .hero-art svg{max-width:230px}
}

/* ترويسة الأقسام */
.section-title{display:flex;align-items:center;gap:.7rem;font-size:1.2rem;font-weight:800}
.section-title::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,var(--line),transparent)}
html[dir=rtl] .section-title::after{background:linear-gradient(270deg,var(--line),transparent)}
.section-title::before{content:"";width:6px;height:22px;border-radius:4px;background:linear-gradient(180deg,var(--primary2),var(--primary));flex:none}

/* بطاقات المجالات */
.domain-card{position:relative;overflow:hidden;
  background:linear-gradient(160deg,rgba(255,255,255,.07),rgba(255,255,255,.015));
  border:1px solid rgba(255,255,255,.09);box-shadow:0 10px 30px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.06);
  transition:transform .2s,border-color .2s,box-shadow .25s}
.domain-card::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .25s;
  background:radial-gradient(220px 120px at 50% 0%,rgba(255,107,74,.28),transparent 70%)}
.domain-card:not(.soon):hover{transform:translateY(-4px);border-color:rgba(255,107,74,.55);box-shadow:0 18px 40px rgba(232,69,44,.22),inset 0 1px 0 rgba(255,255,255,.1)}
.domain-card:not(.soon):hover::before{opacity:1}
.domain-card .ico{width:52px;height:52px;margin-inline:auto;border-radius:16px;display:grid;place-items:center;
  background:linear-gradient(145deg,rgba(255,107,74,.28),rgba(232,69,44,.08));border:1px solid rgba(255,107,74,.35);
  box-shadow:0 8px 20px rgba(232,69,44,.18),inset 0 1px 0 rgba(255,255,255,.18)}
.domain-card .ico svg{width:26px;height:26px;filter:drop-shadow(0 2px 6px rgba(232,69,44,.5))}
.domain-card .cnt{display:inline-block;padding:.12rem .55rem;border-radius:99px;background:rgba(255,255,255,.06)}

/* لافتة الموسم */
.season-banner{position:relative;overflow:hidden;border:1px solid rgba(255,107,74,.35);
  background:linear-gradient(120deg,rgba(232,69,44,.18),rgba(255,255,255,.03));box-shadow:0 12px 30px rgba(232,69,44,.12)}
.season-banner::before{content:"☪";position:absolute;inset-inline-end:-.4rem;top:-1.2rem;font-size:5.2rem;opacity:.07;pointer-events:none}

/* قوالب */
.tpl-card{border:1px solid rgba(255,255,255,.09);background:linear-gradient(170deg,rgba(255,255,255,.06),rgba(255,255,255,.015));
  box-shadow:0 10px 26px rgba(0,0,0,.3);transition:transform .2s,box-shadow .25s,border-color .2s;overflow:hidden}
.tpl-card:not(.soon):hover{transform:translateY(-4px);border-color:rgba(255,107,74,.5);box-shadow:0 18px 40px rgba(0,0,0,.45)}
.tpl-apply{background:linear-gradient(180deg,#ff7a5c,#e8452c);box-shadow:0 4px 12px rgba(232,69,44,.35)}
.chip{transition:all .15s}
.chip.active{box-shadow:0 4px 14px rgba(232,69,44,.35)}

/* المحرر */
#preview-wrap{box-shadow:0 30px 70px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.09),0 0 80px rgba(232,69,44,.12);border-radius:18px}
.play-btn{backdrop-filter:blur(8px);box-shadow:0 8px 24px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.3)}
#timeline{background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.01));border:1px solid rgba(255,255,255,.07);border-radius:14px}
.tl-clip{box-shadow:0 4px 12px rgba(0,0,0,.35)}
.tl-clip.active{box-shadow:0 0 0 2px var(--primary2),0 8px 22px rgba(232,69,44,.35)}
.panel-col{background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.01));border:1px solid rgba(255,255,255,.07);border-radius:18px;box-shadow:0 20px 50px rgba(0,0,0,.3)}
#tools-tabs .tab{transition:all .15s;border-radius:10px}
#tools-tabs .tab.active{background:linear-gradient(180deg,rgba(255,107,74,.25),rgba(232,69,44,.1));box-shadow:inset 0 -2px 0 var(--primary2),0 4px 14px rgba(232,69,44,.18)}
.opt-card,.sticker-btn,.preset-chip,.layer-item,.text-item,.ratio-btn{transition:transform .15s,border-color .2s,box-shadow .2s}
.opt-card:hover,.sticker-btn:hover,.ratio-btn:hover{transform:translateY(-2px)}
.opt-card.active,.ratio-btn.active{box-shadow:0 0 0 2px var(--primary2),0 8px 22px rgba(232,69,44,.28)}
.panel h3{display:flex;align-items:center;gap:.5rem}
.panel h3::before{content:"";width:4px;height:16px;border-radius:3px;background:var(--primary2)}
.panel input[type=range]{accent-color:var(--primary2)}
.modal-card{box-shadow:0 40px 100px rgba(0,0,0,.6),inset 0 1px 0 rgba(255,255,255,.08)}

/* التذييل */
.fine-print{margin-top:2rem;padding:1.1rem;text-align:center;border-top:1px solid var(--line);color:var(--muted)}
.site-foot{display:flex;flex-wrap:wrap;justify-content:center;gap:1.4rem;margin:1.6rem 0 .4rem}
.site-foot div{display:flex;align-items:center;gap:.5rem;font-size:.82rem;color:var(--muted)}
.site-foot svg{width:18px;height:18px;color:var(--primary2)}

/* قفل الميزات الاحترافية: لمعان ذهبي */
.pro-lock{position:relative}
.pro-lock::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:linear-gradient(115deg,transparent 35%,rgba(255,215,140,.10) 50%,transparent 65%);background-size:250% 100%;animation:proshine 5s linear infinite}
@keyframes proshine{from{background-position:150% 0}to{background-position:-100% 0}}

/* ===== الكلاسيكي: مخطوطة وزخرفة هندسية (مرجع: المصاحف المذهّبة وزخارف الأندلس) ===== */
body[data-theme="classic"]{
  --gold:#b08a3e;--gold2:#d9b865;--primary:#1b5a47;--primary2:#2b7d62;
  background:
   url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23b08a3e' stroke-opacity='.16' stroke-width='1'%3E%3Cpath d='M40 4l9 22 22-9-9 22 22 9-22 9 9 22-22-9-9 22-9-22-22 9 9-22-22-9 22-9-9-22 22 9z'/%3E%3Ccircle cx='40' cy='40' r='7'/%3E%3C/g%3E%3C/svg%3E"),
   radial-gradient(900px 500px at 80% -10%,rgba(176,138,62,.16),transparent 60%),
   radial-gradient(700px 400px at 10% 0%,rgba(27,90,71,.10),transparent 60%),
   #f6f2e9;background-attachment:fixed}
body[data-theme="classic"] #topbar{background:rgba(250,246,236,.95);border-bottom:1px solid #d9c9a0;
  box-shadow:0 1px 0 #fff inset,0 6px 20px rgba(120,95,40,.10)}
body[data-theme="classic"] #topbar::after{content:"";position:absolute;left:0;right:0;bottom:-4px;height:3px;
  background:repeating-linear-gradient(90deg,var(--gold) 0 10px,transparent 10px 14px);opacity:.5}
body[data-theme="classic"] .brand::before{background:linear-gradient(135deg,#2b7d62,#1b5a47 60%,#123d30);
  box-shadow:0 0 0 2px #f6f2e9,0 0 0 3px var(--gold),0 4px 10px rgba(27,90,71,.35),inset 0 1px 0 rgba(255,255,255,.3);border-radius:50%}
body[data-theme="classic"] .btn-primary{background:linear-gradient(180deg,#2b7d62,#1b5a47);border:1px solid #14473a;
  box-shadow:0 4px 12px rgba(27,90,71,.28),inset 0 1px 0 rgba(255,255,255,.25),0 0 0 1px rgba(217,184,101,.0)}
body[data-theme="classic"] .btn-primary:hover{box-shadow:0 8px 20px rgba(27,90,71,.35),inset 0 1px 0 rgba(255,255,255,.3),0 0 0 2px rgba(217,184,101,.55)}
body[data-theme="classic"] .btn-ghost{background:#fffdf7;border:1px solid #d9c9a0;color:var(--text);backdrop-filter:none}
body[data-theme="classic"] .hero{background:
   linear-gradient(#fffdf7,#fffdf7) padding-box,
   linear-gradient(135deg,var(--gold2),var(--gold) 40%,#7d5f23) border-box;
  border:2px solid transparent;border-radius:14px;box-shadow:0 18px 40px rgba(120,95,40,.14),inset 0 0 0 6px #fffdf7,inset 0 0 0 7px rgba(176,138,62,.35)}
body[data-theme="classic"] .hero::before{background:radial-gradient(circle,rgba(176,138,62,.22),transparent 65%)}
body[data-theme="classic"] .hero h1{background:linear-gradient(180deg,#1b3b30,#1b5a47);-webkit-background-clip:text;background-clip:text;color:transparent;font-weight:700}
body[data-theme="classic"] .hero-badges span{background:#fbf6e8;border:1px solid #e0cf9f;color:#5b4a1f}
body[data-theme="classic"] .hero-badges svg{color:var(--gold)}
body[data-theme="classic"] .hero-art svg{filter:drop-shadow(0 18px 26px rgba(120,95,40,.3))}
body[data-theme="classic"] .section-title{color:#2a2418}
body[data-theme="classic"] .section-title::before{width:12px;height:12px;border-radius:2px;transform:rotate(45deg);background:var(--gold)}
body[data-theme="classic"] .section-title::after{background:linear-gradient(270deg,var(--gold),transparent);height:2px;opacity:.5}
body[data-theme="classic"] .domain-card{background:#fffdf7;border:1px solid #dccfa8;border-radius:10px;
  box-shadow:0 6px 16px rgba(120,95,40,.10),inset 0 0 0 4px #fffdf7,inset 0 0 0 5px rgba(176,138,62,.28)}
body[data-theme="classic"] .domain-card::before{background:radial-gradient(220px 120px at 50% 0%,rgba(176,138,62,.25),transparent 70%)}
body[data-theme="classic"] .domain-card:not(.soon):hover{border-color:var(--gold);box-shadow:0 14px 30px rgba(120,95,40,.22),inset 0 0 0 4px #fffdf7,inset 0 0 0 5px var(--gold)}
body[data-theme="classic"] .domain-card .ico{background:linear-gradient(145deg,#f7efd6,#efe2b8);border:1px solid var(--gold);border-radius:50%;
  box-shadow:0 4px 10px rgba(176,138,62,.3),inset 0 1px 0 #fff}
body[data-theme="classic"] .domain-card .ico svg{filter:none;color:#1b5a47}
body[data-theme="classic"] .domain-card .cnt{background:#f4ecd4;color:#7a6633}
body[data-theme="classic"] .season-banner{background:linear-gradient(120deg,#fbf3da,#fffdf7);border:1px solid var(--gold);box-shadow:0 8px 20px rgba(176,138,62,.18)}
body[data-theme="classic"] .tpl-card{background:#fffdf7;border:1px solid #dccfa8;box-shadow:0 6px 16px rgba(120,95,40,.12);border-radius:10px}
body[data-theme="classic"] .tpl-card:not(.soon):hover{border-color:var(--gold);box-shadow:0 14px 30px rgba(120,95,40,.24)}
body[data-theme="classic"] .tpl-apply{background:linear-gradient(180deg,#2b7d62,#1b5a47);box-shadow:none}
body[data-theme="classic"] .chip{background:#fffdf7;border-color:#dccfa8}
body[data-theme="classic"] .chip.active{box-shadow:0 3px 10px rgba(27,90,71,.28)}
body[data-theme="classic"] #preview-wrap{box-shadow:0 18px 40px rgba(120,95,40,.28),0 0 0 6px #fffdf7,0 0 0 7px var(--gold);border-radius:6px}
body[data-theme="classic"] #timeline{background:#fffdf7;border:1px solid #dccfa8}
body[data-theme="classic"] .panel-col{background:#fffdf7;border:1px solid #dccfa8;box-shadow:0 12px 30px rgba(120,95,40,.14)}
body[data-theme="classic"] #tools-tabs .tab.active{background:#f4ecd4;color:#1b5a47;box-shadow:inset 0 -3px 0 var(--gold)}
body[data-theme="classic"] .panel h3::before{background:var(--gold);transform:rotate(45deg);width:8px;height:8px;border-radius:1px}
body[data-theme="classic"] .opt-card.active,body[data-theme="classic"] .ratio-btn.active{box-shadow:0 0 0 2px var(--gold),0 6px 16px rgba(176,138,62,.3)}
body[data-theme="classic"] .fine-print{border-top:1px solid #dccfa8}
body[data-theme="classic"] .site-foot svg{color:var(--gold)}
body[data-theme="classic"] .pro-lock::after{background:linear-gradient(115deg,transparent 35%,rgba(176,138,62,.18) 50%,transparent 65%);background-size:250% 100%}
@media (prefers-reduced-motion:reduce){.pro-lock::after{animation:none}}
body[data-theme="classic"] .hero-art g>rect[stroke]{fill:#f7efd6;stroke:#b08a3e}
.season-banner::before{content:none}
.domain-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4rem}
.domain-card .nm{text-align:center}

/* ===== الجولة الثانية: لوحات المحرر والتصدير ===== */
/* معاينة لونية لكل فلتر */
#filter-grid .opt-card{position:relative;padding-top:2.9rem;overflow:hidden}
#filter-grid .opt-card::before{content:"";position:absolute;top:.45rem;inset-inline:.45rem;height:1.9rem;border-radius:8px;
  background:linear-gradient(120deg,#7a8a9a,#c9d2da);box-shadow:inset 0 0 0 1px rgba(255,255,255,.25),0 2px 8px rgba(0,0,0,.2)}
#filter-grid .opt-card:nth-child(2)::before{background:linear-gradient(120deg,#ff5e3a,#ffd23f 50%,#2fbf8f)}
#filter-grid .opt-card:nth-child(3)::before{background:linear-gradient(120deg,#ff9a3c,#ffcf7a)}
#filter-grid .opt-card:nth-child(4)::before{background:linear-gradient(120deg,#3a7bd5,#8fd3f4)}
#filter-grid .opt-card:nth-child(5)::before{background:linear-gradient(120deg,#111,#eee)}
#filter-grid .opt-card:nth-child(6)::before{background:linear-gradient(120deg,#0f3b4a,#d9a066)}
#filter-grid .opt-card:nth-child(7)::before{background:linear-gradient(120deg,#f7d6e0,#fdf1e7)}
#filter-grid .opt-card:nth-child(8)::before{background:linear-gradient(120deg,#1a0f2e,#c0392b)}
#filter-grid .opt-card:first-child::before{background:repeating-linear-gradient(45deg,#8a8f98 0 6px,#aab0b8 6px 12px)}
/* نافذة التصدير */
.modal-card{border-radius:20px}
.modal-card h3{display:flex;align-items:center;gap:.6rem;font-size:1.15rem;margin-bottom:.9rem;padding-bottom:.7rem;border-bottom:1px solid var(--line)}
.modal-card h3::before{content:"";width:9px;height:9px;border-radius:3px;background:var(--primary2);transform:rotate(45deg);flex:none}
.modal-card .row{display:flex;flex-direction:column;gap:.4rem;margin:.75rem 0}
.modal-card .row>label{font-size:.82rem;font-weight:700;color:var(--muted);letter-spacing:.02em}
.modal-card .seg{display:flex;flex-wrap:wrap;gap:.4rem}
.modal-card .seg button{flex:1 1 auto;min-width:4.2rem}
body[data-theme="classic"] .modal-card{background:#fffdf7;border:1px solid var(--gold);box-shadow:0 30px 70px rgba(80,60,20,.35),inset 0 0 0 5px #fffdf7,inset 0 0 0 6px rgba(176,138,62,.4)}
body[data-theme="classic"] .modal-card h3{border-bottom:2px solid rgba(176,138,62,.4);font-family:'Amiri','Cairo',serif;font-size:1.3rem}
body[data-theme="classic"] .modal-card h3::before{background:var(--gold)}
body[data-theme="classic"] .modal-card .row>label{color:#7a6633}
body[data-theme="classic"] #filter-grid .opt-card::before{box-shadow:inset 0 0 0 1px rgba(176,138,62,.5),0 2px 6px rgba(120,95,40,.2)}
/* شريط علوي أنظف على الجوال */
@media (max-width:480px){
  .brand::before{width:20px;height:20px;border-radius:7px}
  .brand{gap:.3rem;font-size:.7rem}
  .top-actions{gap:.2rem}
  #btn-theme{min-width:0;padding:0 .35rem;font-size:.7rem}
  .icon-btn{width:28px;height:28px}
  #topbar .btn{padding:.4rem .5rem;font-size:.78rem}
}
