/* ==========================================================
   TikTakly — الهوية الفخمة لكل صفحات الموقع (نفس المحرر)
   أسود عميق + ورق الذهب، عناوين بخط الرقعة.
   تُحقن تلقائياً من app.py (inject_lux_site) ومحصورة في html.lux-site،
   فإيقافها = LUX_SITE_THEME = False في app.py.
   ========================================================== */
html.lux-site{
  --lux-lacquer:#05070c;
  --lux-ebony:#0c1018;
  --lux-ebony-2:#141a26;
  --lux-gold:#cfa54a;
  --lux-gold-hi:#f7e4a6;
  --lux-ivory:#f3ead6;
  --lux-ash:#8f94a3;
  --lux-line:rgba(207,165,74,.28);
  --lux-foil:linear-gradient(115deg,#7a5a1e 0%,#e9cf86 22%,#fff3c4 34%,#c99b3f 50%,#f3dc96 66%,#8c6826 100%);
  --lux-display:"Aref Ruqaa","Amiri",serif;
  --lux-body:"IBM Plex Sans Arabic","Segoe UI",Tahoma,sans-serif;
  background:var(--lux-lacquer) !important;
}

/* ---------- الأرضية ---------- */
html.lux-site body{
  background:
    radial-gradient(900px 500px at 85% -10%,rgba(207,165,74,.10),transparent 60%),
    radial-gradient(700px 420px at 0% 110%,rgba(207,165,74,.07),transparent 60%),
    var(--lux-lacquer) !important;
  background-attachment:fixed !important;
  color:var(--lux-ivory) !important;
  font-family:var(--lux-body) !important;
}
html.lux-site body :is(p,li,label,span,small,td,th,input,select,textarea,button,a):not(.fa):not(.fas):not(.far):not(.fab){font-family:var(--lux-body)}

/* ---------- العناوين ---------- */
html.lux-site body :is(h1,h2,.hero h1,.section-title,.page-title){
  font-family:var(--lux-display) !important;
  font-weight:700 !important;
  background:var(--lux-foil) !important;
  -webkit-background-clip:text !important;background-clip:text !important;
  -webkit-text-fill-color:transparent !important;color:transparent !important;
  text-shadow:none !important;
}
html.lux-site body :is(h3,h4){font-family:var(--lux-display) !important;color:var(--lux-gold-hi) !important;-webkit-text-fill-color:var(--lux-gold-hi) !important;text-shadow:none !important}
html.lux-site body :is(p,li,label,td,th,.desc,.description){color:var(--lux-ivory)}
html.lux-site body a{color:var(--lux-gold-hi)}
html.lux-site body a:hover{color:#fff3c4}
/* نصوص مضيئة بالسماوي في الصفحات القديمة → عاجي هادئ */
html.lux-site body [style*="#00ffff"],html.lux-site body [style*="#4ecdc4"],
html.lux-site .about-text,html.lux-site .intro-text{color:var(--lux-ivory) !important;text-shadow:none !important}
html.lux-site .neon-text{color:var(--lux-gold-hi) !important;text-shadow:0 0 18px rgba(207,165,74,.25) !important}
html.lux-site [style*="color: #4ecdc4"],html.lux-site [style*="color:#4ecdc4"],html.lux-site [style*="color:var(--teal)"]{color:var(--lux-gold-hi) !important}
html.lux-site [style*="background:#4ecdc4"]{background:var(--lux-foil) !important;color:#1a1206 !important}
/* ألوان الصفحات القديمة (سماوي/بنفسجي) تتحول إلى ذهبي */
html.lux-site body{--teal:#cfa54a;--primary:#cfa54a;--accent:#f7e4a6}
html.lux-site :is(.content h2,.content .section-header,.title-bar){border-color:var(--lux-line) !important}
html.lux-site .video-placeholder i,html.lux-site .panel h3,html.lux-site .share-title,html.lux-site .title{color:var(--lux-gold-hi) !important}
html.lux-site .logo{background:transparent !important;box-shadow:none !important}

/* ---------- الشريط العلوي ---------- */
html.lux-site :is(.tiktakly-navbar,.header,header,.lux-topbar):not(.lux-crown){
  background:rgba(5,7,12,.92) !important;
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--lux-line) !important;
  box-shadow:0 6px 24px rgba(0,0,0,.45) !important;
}
html.lux-site .tiktakly-navbar .nav-links a,html.lux-site .header a,html.lux-site header a{color:var(--lux-ivory) !important}
html.lux-site .tiktakly-navbar .nav-links a:hover,html.lux-site header a:hover{color:var(--lux-gold-hi) !important;background:rgba(207,165,74,.10) !important}
html.lux-site :is(.nb-user-box,.user-box,.lang-dropdown){background:rgba(207,165,74,.08) !important;border:1px solid var(--lux-line) !important;color:var(--lux-ivory) !important}
html.lux-site :is(.nb-dropdown,.user-dropdown,.lang-options){background:var(--lux-ebony) !important;border:1px solid var(--lux-line) !important;box-shadow:0 12px 30px rgba(0,0,0,.6) !important}
html.lux-site :is(.nb-dropdown,.user-dropdown,.lang-options) a{background:transparent !important;color:var(--lux-ivory) !important}
html.lux-site :is(.nb-dropdown,.user-dropdown,.lang-options) a:hover{background:rgba(207,165,74,.12) !important;color:var(--lux-gold-hi) !important}
html.lux-site .tiktakly-navbar .hamburger span{background:var(--lux-gold) !important}
@media (max-width:820px){html.lux-site .tiktakly-navbar .nav-links{background:rgba(5,7,12,.97) !important;border-bottom:1px solid var(--lux-line)}}

/* ---------- الصور الرمزية والشعار ---------- */
html.lux-site :is(.nb-avatar,.user-avatar,.user-avatar-big,.icon){
  background:var(--lux-foil) !important;color:#1a1206 !important;-webkit-text-fill-color:#1a1206 !important;
  border:1px solid rgba(255,243,196,.5) !important;
}

/* ---------- البطاقات والأقسام ---------- */
html.lux-site :is(.card,.feature-card,.type-card,.section,.panel,.video-card,.stat-card,.content,
  .login-container,.register-container,.empty,.no-videos,.empty-state,.share-panel,.user-header,
  .sq-pcard,.sq-qbox,.sq-fbox,.features,.demo-verse,.modal-inner,.vision-box,.mission-box,.last-updated,
  .highlight,.cta-section,.no-videos-tiktok,.video-placeholder,.video-thumbnail,.alert-success,.notice){
  background:linear-gradient(180deg,rgba(20,26,38,.92),rgba(12,16,24,.92)) !important;
  border:1px solid var(--lux-line) !important;
  border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,243,196,.05) !important;
  color:var(--lux-ivory) !important;
}
html.lux-site :is(.card,.feature-card,.type-card,.video-card,.stat-card):hover{border-color:rgba(207,165,74,.55) !important}
/* الأقسام البيضاء سابقاً: نصوصها الداكنة تصير عاجية */
html.lux-site :is(.content,.login-container,.register-container,.stat-card,.video-card,.card,.section,.panel,.user-header,.header)
  :is(p,span,div,small,label,strong,b,td,li):not(.fa):not(.fas):not(.far):not(.fab):not([class*="btn"]):not(.nb-avatar):not(.user-avatar){
  color:inherit;
}
html.lux-site :is(.content,.login-container,.register-container,.header) :is(p,span,small,label,div){color:var(--lux-ivory)}
html.lux-site :is(.stat-card) :is(h1,h2,h3,.stat-number,.number,strong){
  background:var(--lux-foil) !important;-webkit-background-clip:text !important;background-clip:text !important;-webkit-text-fill-color:transparent !important;
}
html.lux-site :is(.chip,.sq-iban-badge){background:rgba(207,165,74,.12) !important;border:1px solid var(--lux-line) !important;color:var(--lux-gold-hi) !important}
html.lux-site :is(.register-header){background:transparent !important;border-bottom:1px solid var(--lux-line) !important}
html.lux-site :is(.video-wrap,.video-container,video){background:#000 !important}
html.lux-site .video-actions{background:rgba(5,7,12,.6) !important;border-top:1px solid var(--lux-line)}
html.lux-site :is(.footer,footer):not(.lux-credit){background:rgba(5,7,12,.85) !important;border-top:1px solid var(--lux-line) !important;color:var(--lux-ash) !important}

/* ---------- الأزرار ---------- */
html.lux-site :is(.btn-primary,.btn-register,.btn-free-trial,.btn-register-nav,.nb-btn-register,.btn,.btn-login:not(.nav),
  .back-button,.record-btn,.download-btn,.cta-button,.btn-small,.rq-btn-play,button[type="submit"],input[type="submit"]):not(.btn-google):not(.btn-facebook):not(.close):not(.hq-btn){
  background:var(--lux-foil) !important;background-size:200% 100% !important;
  color:#1a1206 !important;-webkit-text-fill-color:#1a1206 !important;
  border:1px solid rgba(255,243,196,.55) !important;
  font-weight:700 !important;text-shadow:none !important;
  box-shadow:0 6px 18px rgba(207,165,74,.18),inset 0 1px 0 rgba(255,255,255,.35) !important;
  transition:background-position .5s ease,transform .15s ease,box-shadow .2s ease;
}
html.lux-site :is(.btn-primary,.btn-register,.btn-free-trial,.btn-register-nav,.nb-btn-register,.btn,.back-button,.record-btn,.download-btn,.cta-button,.btn-small,button[type="submit"]):hover{
  background-position:100% 0 !important;transform:translateY(-1px);box-shadow:0 10px 24px rgba(207,165,74,.28) !important;
}
html.lux-site :is(.btn-outline,.btn-login-nav,.nb-btn-login,.btn-secondary,.action-btn,.rq-btn-close,.btn-login.nav){
  background:transparent !important;color:var(--lux-gold-hi) !important;-webkit-text-fill-color:var(--lux-gold-hi) !important;
  border:1px solid var(--lux-line) !important;
}
html.lux-site :is(.btn-outline,.btn-login-nav,.nb-btn-login,.btn-secondary,.action-btn):hover{background:rgba(207,165,74,.12) !important;border-color:var(--lux-gold) !important}
html.lux-site :is(.btn-download){background:rgba(207,165,74,.14) !important;color:var(--lux-gold-hi) !important;border:1px solid var(--lux-line) !important}
html.lux-site :is(.btn-share){background:rgba(243,234,214,.08) !important;color:var(--lux-ivory) !important;border:1px solid var(--lux-line) !important}
html.lux-site .btn-google{background:#fff !important;color:#1f1f1f !important;-webkit-text-fill-color:#1f1f1f !important;border:1px solid var(--lux-gold) !important}

/* ---------- الحقول ---------- */
html.lux-site :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="range"]),select,textarea,.select){
  background:rgba(5,7,12,.75) !important;color:var(--lux-ivory) !important;-webkit-text-fill-color:var(--lux-ivory) !important;
  border:1px solid var(--lux-line) !important;border-radius:10px;
}
html.lux-site :is(input,select,textarea):focus{outline:none !important;border-color:var(--lux-gold) !important;box-shadow:0 0 0 3px rgba(207,165,74,.18) !important}
html.lux-site ::placeholder{color:var(--lux-ash) !important;-webkit-text-fill-color:var(--lux-ash) !important}
html.lux-site :is(input[type="checkbox"],input[type="radio"],input[type="range"]){accent-color:var(--lux-gold)}
html.lux-site :is(.divider::before,.divider::after){background:var(--lux-line) !important}
html.lux-site .alert-error{background:rgba(220,38,38,.12) !important;border:1px solid rgba(220,38,38,.45) !important;color:#fecaca !important}

/* ---------- النوافذ المنبثقة ---------- */
html.lux-site :is(.modal,.ruqyah-overlay){background:rgba(0,0,0,.75) !important}
html.lux-site .ruqyah-popup{background:linear-gradient(180deg,#141a26,#0c1018) !important;border:1px solid var(--lux-gold) !important}

/* ---------- التوقيع ---------- */
html.lux-site body{flex-wrap:wrap}
html.lux-site body > .lux-credit{flex:0 0 100%;width:100%}
html.lux-site .lux-credit{position:relative;z-index:1;text-align:center;font-size:12px;color:var(--lux-ash) !important;padding:26px 0 30px;background:transparent !important;border:0 !important}
html.lux-site .lux-credit b{font-family:var(--lux-display) !important;font-weight:400;font-size:16px;color:var(--lux-gold-hi) !important}

/* شريط تمرير ذهبي */
html.lux-site{scrollbar-color:#5a4520 #05070c}
html.lux-site ::selection{background:rgba(207,165,74,.35);color:#fff}

/* عناصر بأنماط مكتوبة داخل الصفحات (بنفسجي/أخضر) */
html.lux-site [style*="#667eea"]:not(img){background:var(--lux-foil) !important;color:#1a1206 !important;-webkit-text-fill-color:#1a1206 !important;border-color:rgba(255,243,196,.5) !important}
html.lux-site [style*="rgba(0,200,100"]{background:linear-gradient(180deg,rgba(20,26,38,.92),rgba(12,16,24,.92)) !important;border:1px solid var(--lux-line) !important}

/* أزرار لصفحات لم تُبنَ بعد في لوحات التحكم */
html.lux-site [data-soon]{opacity:.55;pointer-events:none;cursor:default}
html.lux-site [data-soon]::after{content:" · قريباً"}
html.lux-site :is(.welcome-card,.action-card){background:linear-gradient(180deg,rgba(20,26,38,.92),rgba(12,16,24,.92)) !important;border:1px solid var(--lux-line) !important;border-radius:16px;color:var(--lux-ivory) !important;box-shadow:0 10px 30px rgba(0,0,0,.45) !important}
html.lux-site .action-card:hover{border-color:rgba(207,165,74,.55) !important}
html.lux-site .action-card p{color:var(--lux-ash) !important}
html.lux-site :is(.action-btn,.logout-btn){background:var(--lux-foil) !important;color:#1a1206 !important;-webkit-text-fill-color:#1a1206 !important;border:1px solid rgba(255,243,196,.55) !important}
html.lux-site .user-info .role{background:rgba(207,165,74,.12) !important;color:var(--lux-gold-hi) !important;border:1px solid var(--lux-line)}
html.lux-site .stat-card .number{background:var(--lux-foil);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
html.lux-site .lux-quick{margin-bottom:18px}

/* ===================== نسخة الجوال لكل صفحات الموقع (≤680px) =====================
   الصفحات القديمة فيها عروض ثابتة (min-width وminmax(300px)) وعناوين ضخمة تجعل الصفحة أعرض من الشاشة. */
@media (max-width:680px){
  html.lux-site,html.lux-site body{max-width:100%;overflow-x:hidden}
  html.lux-site body *:not(svg):not(svg *):not(video):not(canvas){min-width:0 !important;max-width:100%}
  html.lux-site body *{overflow-wrap:anywhere}

  /* الشبكات: عمود واحد بدل أعمدة لا تقل عن 280-300px */
  html.lux-site body :is([class*="grid"],[class*="-types"],[class*="cards"],.features):not(.lux-quick){grid-template-columns:minmax(0,1fr) !important}
  html.lux-site body [style*="minmax"]{grid-template-columns:minmax(0,1fr) !important}
  html.lux-site body [style*="flex-wrap"] > *{flex:1 1 100% !important}

  /* الأحجام: عناوين ونصوص مناسبة للجوال */
  html.lux-site body h1{font-size:clamp(24px,7.2vw,32px) !important;line-height:1.35 !important}
  html.lux-site body h2{font-size:clamp(21px,6vw,27px) !important;line-height:1.4 !important;margin-bottom:12px !important}
  html.lux-site body h3{font-size:clamp(17px,5vw,21px) !important;line-height:1.45 !important}
  html.lux-site body :is(p,li,label,td,.desc,.description){font-size:15px !important;line-height:1.75 !important}
  html.lux-site body :is(.neon-text,.hero p){font-size:16px !important}
  html.lux-site body :is(.type-icon,.feature-icon,[class*="icon"]:not(i)){font-size:30px !important;margin-bottom:8px !important}
  html.lux-site body [style*="font-size: 2.5em"],html.lux-site body [style*="font-size: 3em"]{font-size:30px !important}

  /* المسافات: أقل حشو للأقسام والبطاقات */
  html.lux-site body :is(section,.section,.hero,.features,.user-types,.footer,footer){padding-left:14px !important;padding-right:14px !important}
  html.lux-site body :is(.hero,.features,.user-types){padding-top:36px !important;padding-bottom:36px !important}
  html.lux-site body :is(.card,.feature-card,.type-card,.panel,.stat-card,.video-card,.content,.action-card,.welcome-card,[style*="padding: 25px 30px"],[style*="padding: 40px"]){padding:18px 16px !important;margin-left:0 !important;margin-right:0 !important}
  html.lux-site body .type-card:hover{transform:none}

  /* الأزرار: بعرض الشاشة بدل عرض ثابت */
  html.lux-site body :is(.action-btn,.btn-primary,.btn-free-trial,.btn-register,.btn-outline,.cta-button,.btn){min-width:0 !important;max-width:100% !important;padding:12px 18px !important;font-size:16px !important}
  html.lux-site body :is(.action-btn,.btn-free-trial,.cta-button){width:100% !important;display:block !important;text-align:center}
  html.lux-site body .nav-buttons{flex-direction:column;align-items:stretch}

  html.lux-site .lux-credit{padding:18px 12px 22px}
}
