/* ============================================================
   تصميم احترافي جديد - نظام ألوان حديث وسريع
   ============================================================ */

   
html { 
    margin: 0; 
    padding: 0; 
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* تحسين الجودة والوضوح على Cloudflare */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    zoom: 1;
    font-size: 16px;
    /* Web App Optimizations */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    /* Safe Area Insets for Mobile */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body { 
    margin: 0; 
    padding: 0; 
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #050510; 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif; 
    font-size: 16px; 
    color: #ffffff; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* تحسين الجودة على Cloudflare */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-font-smoothing: subpixel-antialiased;
    /* Web App Optimizations */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overscroll-behavior: none;
    /* Safe Area Insets */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* تحسين الجودة والوضوح على Cloudflare */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* تحسين الخطوط والعناصر على Cloudflare */
h1, h2, h3, h4, h5, h6, p, span, div, button, a, input, textarea {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

#boh-ai-app { 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0;
    bottom: 0;
    width: 100%; 
    height: 100%; 
    margin: 0;
    padding: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(244, 146, 14, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 80% 50% at 50% 100%, rgba(200, 120, 20, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, #050510 0%, #0a0a15 50%, #050510 100%);
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    direction: rtl;
    position: relative;
}

#boh-ai-app::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(244, 146, 14, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(244, 146, 14, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

#boh-ai-app > * {
    position: relative;
    z-index: 1;
}

* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
    outline: none; 
    /* تحسين الأداء */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
}

/* تحسين الأداء للعناصر المتحركة */
*:hover, *:focus, *:active {
    transition: none !important;
}

/* تحسينات احترافية للموبايل - Web App Experience */
@media (max-width: 768px) {
    html, body {
        position: fixed;
        width: 100%;
        height: 100%;
        overflow: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: none;
        /* Safe Area Support */
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
    }
    
    /* تحسين تجربة اللمس */
    button, a, .btn, .nav-btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
    }
    /* استثناء أزرار الهيدر - مصغّرة لتناسب الموبايل */
    .plans-topbar .extra-btn,
    .plans-topbar .header-lang-trigger,
    .plans-topbar .header-signin-trigger,
    .chat-header .header-icon-btn,
    .chat-header .mode-display-btn,
    .chat-header .header-lang-trigger {
        min-height: unset !important;
        min-width: unset !important;
    }
    
    
    /* تحسين الخطوط على الموبايل */
    body {
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeSpeed;
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* تحسين الأداء على الموبايل */
    .modal-box, .plan-card, .lang-dropdown-container {
        /* backdrop-filter: blur(15px) saturate(150%); */ /* تم إزالة blur لتحسين الأداء */
        /* -webkit-backdrop-filter: blur(15px) saturate(150%); */ /* تم إزالة blur لتحسين الأداء */
    }
    
    /* تحسين عرض المحتوى */
    .boh-view {
        width: 100% !important;
        height: 100% !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        overflow: hidden !important;
    }
    
    /* إصلاح نافذة تسجيل الدخول على الموبايل */
    #view-auth {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        padding: 20px 10px !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }
    
    /* تحسين auth-box على الموبايل */
    #view-auth .auth-box {
        margin: 20px auto !important;
        max-height: calc(100vh - 40px) !important;
        max-height: calc(-webkit-fill-available - 40px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        position: relative !important;
        padding: 32px 24px !important;
        width: calc(100% - 20px) !important;
        max-width: 420px !important;
    }
    
    /* التأكد من أن زر الإغلاق يعمل */
    #view-auth .modal-close {
        position: fixed !important;
        top: 15px !important;
        left: 15px !important;
        z-index: 10000 !important;
        background: rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 10px !important;
        padding: 10px 14px !important;
        font-size: 0.9rem !important;
        color: #fff !important;
        cursor: pointer !important;
        min-width: 60px !important;
        min-height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* تحسين الـ sidebar على الموبايل - مخفي افتراضياً */
    .side-panel {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        z-index: 9998 !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        max-height: 100vh !important;
        max-height: -webkit-fill-available !important;
        width: 360px !important;
        min-width: 360px !important;
        max-width: 360px !important;
        display: flex !important;
        visibility: hidden !important;
        transform: translateX(105%) !important;
        transition: transform 0.3s ease !important;
    }
    
    /* Sidebar عندما يكون مفتوح */
    .side-panel.open {
        visibility: visible !important;
        transform: translateX(0) !important;
    }
    
    /* Sidebar عندما يكون مغلق */
    .side-panel:not(.open) {
        visibility: hidden !important;
        transform: translateX(105%) !important;
    }
    
    /* تحسين الـ chat layout */
    .chat-layout {
        width: 100% !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        max-height: 100vh !important;
        max-height: -webkit-fill-available !important;
        display: flex !important;
        flex-direction: row !important;
        overflow: hidden !important;
    }
    
    /* تحسين الـ chat-main */
    .chat-main {
        flex: 1 !important;
        min-width: 0 !important;
        width: auto !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }
    
    /* تحسين الـ chat-container-outer */
    .chat-container-outer {
        flex: 1 !important;
        min-height: 0 !important;
        height: 100% !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
    }
    
    /* تحسين الرسائل */
    .message {
        word-wrap: break-word;
        overflow-wrap: break-word;
        -webkit-hyphens: auto;
        hyphens: auto;
        max-width: 85% !important;
    }
    
    /* منع التكبير عند النقر المزدوج */
    * {
        touch-action: manipulation;
    }
    
    input, textarea, select {
        font-size: 16px !important; /* منع التكبير التلقائي على iOS */
        -webkit-appearance: none;
        appearance: none;
        border-radius: 0;
    }
    
    /* Ensure all interactive elements work */
    button, a, .btn, input, textarea, select {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Fix for view-chat */
    #view-chat {
        width: 100% !important;
        height: 100% !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        overflow: hidden !important;
    }
    
    /* Ensure chat-footer-wrapper is visible and works */
    .chat-footer-wrapper {
        display: flex !important;
        visibility: visible !important;
        width: 100% !important;
        flex-shrink: 0 !important;
        position: relative !important;
        z-index: 100 !important;
        background: linear-gradient(180deg, 
            rgba(35, 35, 40, 0.95) 0%, 
            rgba(40, 40, 45, 0.98) 100%
        ) !important;
        border-top: 2px solid rgba(244, 146, 14, 0.3) !important;
        padding-bottom: 16px !important;
        padding-top: 12px !important;
    }
    
    /* Ensure chat-footer is visible */
    .chat-footer {
        display: flex !important;
        visibility: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 16px 20px !important;
        flex-shrink: 0 !important;
        position: relative !important;
        z-index: 101 !important;
        background: transparent !important;
    }
    
    /* Ensure chat-input-area is visible */
    .chat-input-area {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        flex: 1 !important;
        min-width: 0 !important;
        font-size: 16px !important;
        padding: 14px 18px !important;
        min-height: 50px !important;
        max-height: 120px !important;
    }
    
    /* Ensure action buttons are visible */
    .action-btn {
        display: flex !important;
        visibility: visible !important;
        width: 50px !important;
        height: 50px !important;
        flex-shrink: 0 !important;
        min-width: 50px !important;
        min-height: 50px !important;
    }
    
    
    /* Ensure chat-body is visible */
    .chat-body {
        display: flex !important;
        visibility: visible !important;
        width: 100% !important;
        flex: 1 !important;
        min-height: 0 !important;
        padding: 0 15px 20px !important;
    }
    
    /* Ensure chat-container-outer scrolls properly */
    .chat-container-outer {
        display: flex !important;
        visibility: visible !important;
        flex: 1 !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* ============================================================
   تحسينات بصرية عامة - تأثيرات متقدمة احترافية
   ============================================================ */

/* تحسين الانتقالات والحركات - تم إلغاء الانتقالات لتحسين الأداء */
* {
    transition: none;
}

/* تحسين الأداء البصري - Hardware Acceleration */
button, a, .btn, .card, .modal-box, .plan-card, .plan-compare-card, .model-item {
    /* will-change: transform, opacity, box-shadow; */ /* تم إزالة will-change لتحسين الأداء */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* تأثيرات hover محسّنة - Professional Interactions */
button:hover, .btn:hover, a:hover:not(.side-logo-link) {
    transform: translateY(-2px) scale(1.01);
    transition: none;
}

button:active, .btn:active, a:active:not(.side-logo-link) {
    /* transform: translateY(0) scale(0.98); */ /* تم إلغاء التحويلات لتحسين الأداء */
    transition: none;
}

/* تحسين الظلال - Multi-layer Shadows */
.card, .modal-box, .plan-card, .plan-compare-card {
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: none;
}

.card:hover, .modal-box:hover, .plan-card:hover, .plan-compare-card:hover {
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.2),
        0 10px 10px -5px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(244, 146, 14, 0.4),
        0 0 30px rgba(244, 146, 14, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    /* transform: translateY(-4px); */ /* تم إلغاء التحويلات لتحسين الأداء */
}

/* تحسين التدرجات - Animated Gradients */
.gradient-text {
    background: linear-gradient(135deg, #f4920e 0%, #ffaa33 50%, #ffb14a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    /* animation: gradientShift 2s ease infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
    filter: drop-shadow(0 2px 4px rgba(244, 146, 14, 0.3));
}

/* @keyframes gradientShift - تم إزالة keyframes لتحسين الأداء */

/* تأثيرات النبض - Subtle Pulse */
/* @keyframes pulse - تم إزالة keyframes لتحسين الأداء */

.pulse {
    /* animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* تم إلغاء Shimmer Effect البطيء */

/* تحسينات Focus States - Accessibility */
button:focus-visible, 
a:focus-visible, 
input:focus-visible, 
textarea:focus-visible {
    outline: 2px solid rgba(244, 146, 14, 0.6);
    outline-offset: 2px;
    border-radius: 4px;
}

/* تحسينات Scrollbar - Modern Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(20, 20, 25, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(244, 146, 14, 0.6), rgba(244, 146, 14, 0.4));
    border-radius: 10px;
    border: 2px solid rgba(20, 20, 25, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(244, 146, 14, 0.8), rgba(244, 146, 14, 0.6));
}

/* تحسينات Selection - Text Selection */
::selection {
    background: rgba(244, 146, 14, 0.3);
    color: #fff;
}

::-moz-selection {
    background: rgba(244, 146, 14, 0.3);
    color: #fff;
}

/* تحسينات Loading States - تم إلغاء animation البطيء */
.loading {
    position: relative;
    overflow: hidden;
}

/* تم إلغاء loading::after animation البطيء */

/* تحسينات Responsive - Better Mobile Experience */
@media (max-width: 768px) {
    * {
        transition-duration: 0.15s !important;
    }
}

.boh-view { 
  width: 100%; 
  height: 100%; 
  display: none; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  opacity: 0; 
  margin: 0;
  padding: 0;
  /* will-change: opacity; */ /* تم إزالة will-change لتحسين الأداء */
  transform: translateZ(0);
  transition: none;
}
.boh-view.active { 
  opacity: 1; 
  display: flex;
}

/* Chat view - remove all spacing */
#view-chat {
  justify-content: flex-start;
  align-items: stretch;
  margin: 0 !important;
  padding: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  position: absolute !important;
  width: 100% !important;
  height: 100% !important;
}

/* Remove any black bar at the top */
#view-chat > * {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#view-chat .chat-layout {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#view-chat .chat-main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#view-chat .chat-header {
  margin-top: 0 !important;
}

/* ============================================================
   أزرار التنقل - تصميم جديد تماماً (برتقالي + رمادي)
   ============================================================ */

.top-nav-plans { 
  position: absolute; 
  top: 30px; 
  right: 30px; 
  left: auto; 
  z-index: 100; 
}

.nav-btn { 
  background: linear-gradient(145deg, 
    rgba(244, 146, 14, 0.15) 0%, 
    rgba(244, 146, 14, 0.08) 100%
  ); 
  padding: 10px 18px; 
  border-radius: 16px; 
  color: #fff; 
  text-decoration: none; 
  font-size: 1rem; 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  transition: none; 
  border: 1.5px solid rgba(244, 146, 14, 0.4); 
  cursor: pointer; 
  /* will-change: background, box-shadow, transform; */ /* تم إزالة will-change لتحسين الأداء */
  /* backdrop-filter: blur(15px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(15px); */ /* تم إزالة blur لتحسين الأداء */
  font-weight: 600;
}

.nav-btn:hover { 
  background: linear-gradient(145deg, 
    rgba(244, 146, 14, 0.25) 0%, 
    rgba(244, 146, 14, 0.15) 100%
  ); 
  border-color: rgba(244, 146, 14, 0.6);
  box-shadow: 
    0 8px 24px rgba(244, 146, 14, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* ============================================================
   صفحة الخطط - تصميم جديد تماماً (برتقالي + رمادي)
   ============================================================ */

.plans-topbar-outer {
  width: 100%;
  overflow: visible;
  flex-shrink: 0;
}
.plans-wrapper{
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: 
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(244, 146, 14, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(200, 120, 20, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #0a0a0f 0%, #0f0f15 50%, #0a0a0f 100%);
  padding: 60px 24px 90px;
  -webkit-overflow-scrolling: touch;
  position: relative;
  min-height: 100vh;
}

.plans-wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(244, 146, 14, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(200, 120, 20, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    /* animation: plansBackgroundPulse 3s ease-in-out infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes plansBackgroundPulse - تم إزالة keyframes لتحسين الأداء */

@media (max-width: 900px){
  .plans-wrapper{ 
    padding: 35px 16px 40px; 
  }
}
@media (max-width: 720px){
  .plans-wrapper {
    overflow-x: visible;
  }
}

/* Plans topbar (sticky actions) */
/* Plans topbar (sticky actions) */
.plans-topbar{
  position: relative;
  top: 0;
  left: auto;
  transform: none;
  z-index: 10;
  width: calc(100% - 20px);
  max-width: 1100px;
  padding: 16px 18px;
  margin: 0 auto 24px;
  background: linear-gradient(145deg, 
    rgba(50, 50, 55, 0.95) 0%, 
    rgba(40, 40, 45, 0.98) 100%
  );
  border: 1.5px solid rgba(244, 146, 14, 0.4);
  border-radius: 20px;
  /* backdrop-filter: blur(25px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(25px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(244, 146, 14, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.plans-topbar .extra-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin: 0;
}
/* ========== هيدر Plans على الموبايل - أزرار مصغّرة لظهور صف واحد ========== */
@media (max-width: 720px){
  .plans-topbar{
    width: 100%;
    max-width: 100%;
    padding: 6px 8px;
    border-radius: 10px;
    border-width: 1px;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
    z-index: 100;
  }
  .plans-topbar .extra-actions{
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 0;
    overflow: visible !important;
  }
  .plans-topbar .extra-btn{
    padding: 5px 6px;
    font-size: 0.62rem;
    flex: 0 0 auto;
    white-space: nowrap;
    gap: 3px;
    min-height: 24px !important;
    min-width: auto !important;
    border-radius: 6px !important;
    border-width: 1px !important;
  }
  .plans-topbar .extra-btn svg {
    width: 12px !important;
    height: 12px !important;
  }
  .plans-topbar .btn-studio { font-size: 0.62rem !important; }
  .plans-topbar .header-lang-dropdown-wrap {
    flex: 0 0 auto;
    position: relative;
    overflow: visible;
    isolation: isolate;
  }
  .plans-topbar .header-lang-trigger{
    padding: 5px 6px;
    font-size: 0.62rem;
    min-height: 24px !important;
    min-width: auto !important;
    border-radius: 6px !important;
    border-width: 1px !important;
  }
  .plans-topbar .header-lang-selected .lang-flag { font-size: 0.8rem !important; }
  .plans-topbar .header-lang-selected .lang-label { font-size: 0.6rem !important; }
  .plans-topbar .header-lang-menu {
    z-index: 9999 !important;
    min-width: 110px !important;
    max-width: 140px !important;
    max-height: 200px !important;
    padding: 4px 0 !important;
    border-radius: 8px !important;
    top: calc(100% + 4px) !important;
    position: absolute !important;
  }
  .plans-topbar .header-lang-menu .lang-item-new {
    padding: 5px 8px !important;
    font-size: 0.68rem !important;
    gap: 5px !important;
  }
  .plans-topbar .header-lang-menu .lang-item-new .lang-flag {
    font-size: 0.85rem !important;
  }
  .plans-topbar .header-lang-menu .lang-item-new .lang-label {
    font-size: 0.68rem !important;
  }
  .plans-topbar .header-lang-trigger {
    touch-action: manipulation;
  }
  .plans-topbar .header-signin-dropdown-wrap {
    flex: 0 0 auto;
    position: relative;
    overflow: visible;
    isolation: isolate;
  }
  .plans-topbar .header-signin-trigger{
    padding: 5px 6px;
    font-size: 0.62rem;
    min-height: 24px !important;
    min-width: auto !important;
    width: auto !important;
    max-width: none !important;
    gap: 3px;
    border-radius: 6px !important;
    border-width: 1px !important;
  }
  .plans-topbar .header-signin-icon svg {
    width: 12px !important;
    height: 12px !important;
  }
  .plans-topbar .header-signin-menu {
    z-index: 9999 !important;
    min-width: 90px !important;
    max-width: 120px !important;
    padding: 4px 0 !important;
    border-radius: 8px !important;
    top: calc(100% + 4px) !important;
    position: absolute !important;
  }
  .plans-topbar .header-signin-menu .signin-item {
    padding: 6px 10px !important;
    font-size: 0.68rem !important;
  }
  .plans-topbar .header-signin-trigger {
    touch-action: manipulation;
  }
}
@media (max-width: 400px){
  .plans-topbar { padding: 5px 6px !important; }
  .plans-topbar .extra-btn {
    padding: 4px 5px !important;
    min-height: 22px !important;
    font-size: 0.58rem !important;
  }
  .plans-topbar .extra-btn span { font-size: 0.58rem !important; }
  .plans-topbar .extra-btn svg { width: 10px !important; height: 10px !important; }
  .plans-topbar .header-lang-selected .lang-label { display: none !important; }
  .plans-topbar .header-lang-trigger { padding: 4px 5px !important; min-height: 22px !important; }
  .plans-topbar .header-signin-label { display: none !important; }
  .plans-topbar .header-signin-trigger { padding: 4px 5px !important; min-height: 22px !important; }
  .plans-topbar .header-signin-icon svg { width: 10px !important; height: 10px !important; }
  .plans-topbar .btn-studio { font-size: 0.58rem !important; }
}

.plans-topbar .extra-actions{
  margin: 0;
  justify-content: center;
}
.plans-topbar .extra-btn{
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 800;
  border: 1px solid #f4920e !important;
  background: transparent !important;
  color: #fff !important;
  box-shadow: none !important;
  animation: none !important;
}
.plans-topbar .extra-btn:hover{
  background: rgba(244,146,14,0.14) !important;
  color: #fff !important;
  transform: translateY(-1px);
}
@media (max-width: 900px){
  .plans-topbar{ padding: 12px 10px 6px; }
  .plans-topbar .extra-btn{ padding: 9px 14px; font-size: 0.95rem; }
}
.plans-container { 
    display: flex; 
    gap: 28px; 
    flex-wrap: wrap; 
    justify-content: center; 
    align-items: stretch; 
    width: 100%; 
    max-width: 1200px; 
    margin-bottom: 35px; 
    padding: 0 10px;
}

/* ============================================================
   كروت الخطط - تصميم جديد تماماً (برتقالي + رمادي)
   ============================================================ */

.plan-card { 
    background: linear-gradient(145deg, 
        rgba(50, 50, 55, 0.98) 0%, 
        rgba(40, 40, 45, 0.95) 50%,
        rgba(35, 35, 40, 0.98) 100%
    ); 
    border: 2px solid rgba(244, 146, 14, 0.35); 
    border-radius: 28px; 
    padding: 38px 32px; 
    width: 340px; 
    text-align: center; 
    cursor: pointer; 
    transition: none; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    position: relative; 
    min-height: 320px; 
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(244, 146, 14, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(244, 146, 14, 0.1); 
    /* will-change: transform, box-shadow, border-color; */ /* تم إزالة will-change لتحسين الأداء */
    overflow: hidden;
    /* backdrop-filter: blur(30px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
    /* -webkit-backdrop-filter: blur(30px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
}

.plan-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(244, 146, 14, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: none;
    pointer-events: none;
}

.plan-card:hover::after {
    opacity: 1;
}

.plan-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(244, 146, 14, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: none;
    pointer-events: none;
}

.plan-card:hover::after {
    opacity: 1;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(244, 146, 14, 0.7), 
        rgba(244, 146, 14, 1),
        rgba(244, 146, 14, 0.7),
        transparent
    );
    opacity: 0;
    transition: none;
    /* تم إلغاء animation البطيء */
    opacity: 0;
}

.plan-card:hover::before {
    opacity: 1;
}

.plan-card:hover { 
    /* transform: translateY(-6px) scale(1.02); */ /* تم إلغاء التحويلات لتحسين الأداء */ 
    border-color: rgba(244, 146, 14, 0.7); 
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 0 2px rgba(244, 146, 14, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(244, 146, 14, 0.15);
    background: linear-gradient(145deg, 
        rgba(55, 55, 60, 0.98) 0%, 
        rgba(45, 45, 50, 0.95) 50%,
        rgba(40, 40, 45, 0.98) 100%
    );
}

.plan-title { 
    font-size: 1.8rem; 
    font-weight: 800; 
    margin-bottom: 16px; 
    background: linear-gradient(135deg, #f4920e 0%, #ffaa33 50%, #ffb14a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    /* animation: planTitleGradient 1.5s ease infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
    letter-spacing: -0.6px;
    position: relative;
    z-index: 1;
}

/* @keyframes planTitleGradient - تم إزالة keyframes لتحسين الأداء */

.plan-desc { 
    font-size: 1.05rem; 
    color: rgba(255, 255, 255, 0.8); 
    line-height: 1.8; 
    margin-bottom: 28px; 
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.plan-btn { 
    background: linear-gradient(135deg, 
        rgba(244, 146, 14, 0.2) 0%, 
        rgba(244, 146, 14, 0.12) 100%
    ); 
    border: 2px solid rgba(244, 146, 14, 0.5); 
    color: #ffaa33; 
    padding: 16px 28px; 
    border-radius: 16px; 
    width: 100%; 
    font-weight: 700; 
    cursor: pointer; 
    transition: none; 
    margin-top: auto; 
    font-size: 1.1rem; 
    /* will-change: background, border-color, transform; */ /* تم إزالة will-change لتحسين الأداء */
    letter-spacing: 0.4px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
    /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
}

.plan-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(244, 146, 14, 0.25);
    transform: translate(-50%, -50%);
    transition: none;
}

.plan-card:hover .plan-btn::before {
    width: 250px;
    height: 250px;
}

.plan-card:hover .plan-btn { 
    background: linear-gradient(135deg, #f4920e, #ffaa33); 
    color: #fff; 
    border-color: rgba(244, 146, 14, 0.8);
    transform: translateY(-2px);
    box-shadow: 
        0 10px 30px rgba(244, 146, 14, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.plan-card.free-plan { 
    border-color: rgba(100, 100, 110, 0.4); 
    background: linear-gradient(145deg, 
        rgba(35, 35, 40, 0.95) 0%, 
        rgba(30, 30, 35, 0.98) 100%
    ); 
}

.plan-card.free-plan .plan-title { 
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-card.free-plan:hover { 
    border-color: rgba(120, 120, 130, 0.6);
    background: linear-gradient(145deg, 
        rgba(40, 40, 45, 0.95) 0%, 
        rgba(35, 35, 40, 0.98) 100%
    );
}

.plan-card.free-plan:hover .plan-btn { 
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1)); 
    color: rgba(255, 255, 255, 0.95); 
    border-color: rgba(255, 255, 255, 0.4);
}

.plan-card.business-plan { 
    border-color: rgba(244, 146, 14, 0.5); 
    background: linear-gradient(145deg, 
        rgba(244, 146, 14, 0.15) 0%, 
        rgba(244, 146, 14, 0.08) 50%,
        rgba(200, 120, 20, 0.12) 100%
    ); 
    box-shadow: 
        0 12px 40px rgba(244, 146, 14, 0.25),
        inset 0 1px 0 rgba(244, 146, 14, 0.15);
}

.plan-card.business-plan .plan-title { 
    background: linear-gradient(135deg, #f4920e 0%, #ffaa33 50%, #ffb14a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(244, 146, 14, 0.5));
}

.plan-card.business-plan:hover { 
    border-color: rgba(244, 146, 14, 0.8); 
    background: linear-gradient(145deg, 
        rgba(244, 146, 14, 0.25) 0%, 
        rgba(244, 146, 14, 0.15) 50%,
        rgba(200, 120, 20, 0.2) 100%
    ); 
    box-shadow: 
        0 20px 60px rgba(244, 146, 14, 0.4), 
        0 0 40px rgba(244, 146, 14, 0.3),
        inset 0 1px 0 rgba(244, 146, 14, 0.25); 
    transform: translateY(-6px) scale(1.02);
}

.plan-card.business-plan:hover .plan-btn { 
    background: linear-gradient(135deg, #f4920e, #ffaa33); 
    color: #fff; 
    box-shadow: 
        0 10px 30px rgba(244, 146, 14, 0.5), 
        0 0 20px rgba(244, 146, 14, 0.4); 
    font-weight: 700; 
    border-color: rgba(244, 146, 14, 0.9);
}

.plan-card.business-plan .plan-btn { 
    border-color: rgba(244, 146, 14, 0.6); 
    color: #ffaa33; 
    background: linear-gradient(135deg, 
        rgba(244, 146, 14, 0.25) 0%, 
        rgba(244, 146, 14, 0.15) 100%
    );
}

/* Boh Assistant Pro Plan Styles - تصميم جديد */
.plan-card.pro-plan { 
    border-color: rgba(244, 146, 14, 0.6); 
    background: linear-gradient(145deg, 
        rgba(244, 146, 14, 0.2) 0%, 
        rgba(244, 146, 14, 0.12) 50%,
        rgba(200, 120, 20, 0.15) 100%
    ); 
    box-shadow: 
        0 12px 40px rgba(244, 146, 14, 0.3),
        inset 0 1px 0 rgba(244, 146, 14, 0.2);
}

.plan-card.pro-plan .plan-title { 
    background: linear-gradient(135deg, #f4920e 0%, #ffaa33 50%, #ffb14a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 25px rgba(244, 146, 14, 0.6));
}

.plan-card.pro-plan:hover { 
    border-color: rgba(244, 146, 14, 0.9); 
    background: linear-gradient(145deg, 
        rgba(244, 146, 14, 0.3) 0%, 
        rgba(244, 146, 14, 0.18) 50%,
        rgba(200, 120, 20, 0.25) 100%
    ); 
    box-shadow: 
        0 20px 60px rgba(244, 146, 14, 0.45), 
        0 0 40px rgba(244, 146, 14, 0.35),
        inset 0 1px 0 rgba(244, 146, 14, 0.3); 
    /* transform: translateY(-6px) scale(1.02); */ /* تم إلغاء التحويلات لتحسين الأداء */
}

.plan-card.pro-plan:hover .plan-btn { 
    background: linear-gradient(135deg, #f4920e, #ffaa33); 
    color: #fff; 
    box-shadow: 
        0 10px 30px rgba(244, 146, 14, 0.6), 
        0 0 25px rgba(244, 146, 14, 0.5); 
    font-weight: 700; 
    border-color: rgba(244, 146, 14, 1);
}

.plan-card.pro-plan .plan-btn { 
    border-color: rgba(244, 146, 14, 0.7); 
    color: #ffaa33; 
    background: linear-gradient(135deg, 
        rgba(244, 146, 14, 0.3) 0%, 
        rgba(244, 146, 14, 0.18) 100%
    );
}

/* ============================================================
   نافذة اختيار نوع الحساب - تصميم عصري جديد (برتقالي + رمادي)
   ============================================================ */

.pro-options-box {
    max-width: 540px;
    width: 90%;
    padding: 40px 32px !important;
    position: relative;
    z-index: 100001;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#pro-options-modal {
    display: none !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: 100000;
}

#pro-options-modal[style*="flex"],
#pro-options-modal.show {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 100000 !important;
}

.pro-options-list {
    display: flex !important;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
    visibility: visible !important;
    opacity: 1 !important;
}

.pro-options-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.pro-option-btn {
    width: 100%;
    padding: 22px 24px;
    border-radius: 18px;
    border: 2px solid rgba(244, 146, 14, 0.3);
    background: linear-gradient(145deg, 
        rgba(45, 45, 50, 0.9) 0%, 
        rgba(35, 35, 40, 0.95) 50%,
        rgba(30, 30, 35, 0.9) 100%
    );
    color: #fff !important;
    text-align: right;
    cursor: pointer !important;
    transition: none;
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    /* backdrop-filter: blur(20px); */ /* تم إزالة blur لتحسين الأداء */
    /* -webkit-backdrop-filter: blur(20px); */ /* تم إزالة blur لتحسين الأداء */
    position: relative;
    overflow: hidden;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.pro-option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(244, 146, 14, 0.15), 
        transparent
    );
    transition: none;
}

.pro-option-btn:hover::before {
    left: 100%;
}

.pro-option-btn:hover {
    border-color: rgba(244, 146, 14, 0.7);
    background: linear-gradient(145deg, 
        rgba(244, 146, 14, 0.2) 0%, 
        rgba(244, 146, 14, 0.12) 50%,
        rgba(200, 120, 20, 0.15) 100%
    );
    transform: translateY(-3px);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(244, 146, 14, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pro-option-title {
    font-weight: 700;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #f4920e 0%, #ffaa33 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.pro-option-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.extra-actions { display: flex; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; justify-content: center; align-items: center; }
.extra-btn { padding: 12px 25px; border-radius: 10px; font-weight: bold; text-decoration: none; display: flex; align-items: center; gap: 10px; transition: all 0.05s ease; font-size: 1.05rem; }
.btn-buy { background: #12b886; color: #00120e !important; border: 1px solid #26d3a0; }
.btn-buy:hover { background: #19c997; }
.btn-sub { background: transparent; color: #f4920e !important; border: 2px solid rgba(244, 146, 14, 0.6); }
.btn-home { background: rgba(255,255,255,0.08); color: #fff !important; border: 1px solid rgba(255,255,255,0.2); }
.btn-home:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); }
.btn-studio { background: #12b886; color: #00120e !important; border: 1px solid #26d3a0; /* animation: studioPulse 1.2s infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */ }
/* ============================================================
   إخفاء أيقونة خدمة العملاء في الأعلى
   ============================================================ */

/* إخفاء أي أيقونة support في chat-header */
.chat-header .header-icon-btn[title*="دعم"],
.chat-header .header-icon-btn[title*="support"],
.chat-header .header-icon-btn[title*="Support"],
.chat-header .header-icon-btn[title*="الدعم"],
.chat-header a[href*="support"],
.chat-header button[onclick*="support"],
.chat-header button[onclick*="Support"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ============================================================
   إخفاء زر الدعم الفني البرتقالي تماماً
   ============================================================ */

.support-circle-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: fixed !important;
    bottom: -9999px !important;
    right: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    border-radius: 20px;
    background: linear-gradient(135deg, 
        #f4920e 0%, 
        #ffaa33 50%,
        #f4920e 100%
    );
    background-size: 200% 200%;
    /* animation: supportButtonGradient 1.5s ease infinite, supportButtonPulse 1.2s ease-in-out infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
    border: 2.5px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 
        0 12px 32px rgba(244, 146, 14, 0.5),
                0 0 0 0 rgba(244, 146, 14, 0.7),
        0 0 40px rgba(244, 146, 14, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.25),
        inset 0 -2px 0 rgba(0, 0, 0, 0.25);
    transition: all 0.06s ease-out;
    z-index: 1000;
    position: relative;
    overflow: visible;
    /* backdrop-filter: blur(25px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
    /* -webkit-backdrop-filter: blur(25px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
}

/* @keyframes supportButtonGradient - تم إزالة keyframes لتحسين الأداء */

.support-circle-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: rgba(244, 146, 14, 0.3);
    /* animation: supportPulseRing 1.2s ease-in-out infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
    pointer-events: none;
    border: 2.5px solid rgba(244, 146, 14, 0.4);
    box-shadow: 0 0 20px rgba(244, 146, 14, 0.4);
}

/* @keyframes supportButtonPulse - تم إزالة keyframes لتحسين الأداء */

/* @keyframes supportPulseRing - تم إزالة keyframes لتحسين الأداء */

.support-circle-btn:hover {
    background: linear-gradient(135deg, 
        #ffaa33 0%, 
        #ffb14a 50%,
        #ffaa33 100%
    );
    background-size: 200% 200%;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 
        0 16px 48px rgba(244, 146, 14, 0.7),
        0 0 0 6px rgba(244, 146, 14, 0.25),
        0 0 60px rgba(244, 146, 14, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.35),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    transform: scale(1.1) translateY(-4px) rotate(-2deg);
    /* animation: supportButtonGradient 1s ease infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

.support-circle-btn:active {
    transform: scale(1.02) translateY(-1px) rotate(0deg);
    transition: none;
    box-shadow: 
        0 8px 24px rgba(244, 146, 14, 0.5),
        0 0 0 2px rgba(244, 146, 14, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.support-circle-btn svg {
    position: relative;
    z-index: 2;
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
    transition: all 0.06s ease-out;
    stroke-width: 2.5;
}

.support-circle-btn:hover svg {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

@media (max-width: 900px) {
    .support-circle-btn {
        bottom: 28px;
        right: 28px;
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }
    .support-circle-btn svg {
        width: 28px;
        height: 28px;
    }
    .support-circle-pulse {
        border-radius: 18px;
    }
}

/* ============================================================
   إعلان المسابقة - يظهر مرة واحدة ولا يظهر مجدداً إلا بعد 48 ساعة
   ============================================================ */
.competition-ad-overlay {
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999 !important;
    align-items: center;
    justify-content: center;
}
.competition-ad-image-wrap {
    width: 100%;
    margin-bottom: 20px;
}
.competition-ad-box {
    max-width: 520px;
    width: 92%;
    padding: 0;
    overflow: hidden;
    border: 2px solid rgba(244, 146, 14, 0.5);
    border-radius: 16px;
    background: #1c1c1c;
}
.competition-ad-close {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.competition-ad-close:hover {
    background: rgba(255, 255, 255, 0.25);
}
[dir="rtl"] .competition-ad-close { right: auto; left: 12px; }
.competition-ad-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 24px 24px;
}
.competition-ad-image {
    width: 100%;
    max-height: 320px;
    min-height: 200px;
    object-fit: contain;
    border-radius: 10px;
    display: block;
}
.competition-ad-btn {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(145deg, #f4920e, #d97a08);
    color: #fff !important;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 12px;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.competition-ad-btn:hover {
    opacity: 0.95;
    transform: scale(1.02);
}

/* ============================================================
   نافذة الدعم الفني - تصميم جديد تماماً (برتقالي + رمادي)
   ============================================================ */

.support-modal-overlay {
    /* backdrop-filter: blur(30px) saturate(200%); */ /* تم إزالة blur لتحسين الأداء */
    /* -webkit-backdrop-filter: blur(30px) saturate(200%); */ /* تم إزالة blur لتحسين الأداء */
    background: rgba(5, 5, 15, 0.92);
    /* animation: supportOverlayFadeIn 0.1s ease-out; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ supportOverlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.support-modal-box {
    max-width: 580px;
    width: 92%;
    text-align: center;
    position: relative;
    padding: 50px 40px 44px;
    border: 2px solid rgba(244, 146, 14, 0.5);
    background: linear-gradient(145deg, 
        rgba(50, 50, 55, 0.98) 0%, 
        rgba(45, 45, 50, 0.96) 50%,
        rgba(40, 40, 45, 0.98) 100%
    );
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(244, 146, 14, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        inset 0 -2px 0 rgba(244, 146, 14, 0.15),
        0 0 60px rgba(244, 146, 14, 0.2);
    /* animation: supportModalEnter 0.12s cubic-bezier(0.34, 1.56, 0.64, 1); */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
    /* backdrop-filter: blur(40px) saturate(200%); */ /* تم إزالة blur لتحسين الأداء */
    /* -webkit-backdrop-filter: blur(40px) saturate(200%); */ /* تم إزالة blur لتحسين الأداء */
    border-radius: 28px;
    overflow: hidden;
}

.support-modal-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(244, 146, 14, 0.7), 
        rgba(244, 146, 14, 1),
        rgba(244, 146, 14, 0.7),
        transparent
    );
    border-radius: 28px 28px 0 0;
    /* تم إلغاء animation البطيء */
    opacity: 0;
}

.support-modal-box::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(244, 146, 14, 0.1) 0%, transparent 70%);
    pointer-events: none;
    /* animation: supportGlow 2s ease-in-out infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes supportGlow - تم إزالة keyframes لتحسين الأداء */

/* @keyframes supportModalEnter - تم إزالة keyframes لتحسين الأداء */

/* @keyframes supportModalExit - تم إزالة keyframes لتحسين الأداء */

.support-modal-icon-wrapper {
    margin: 0 auto 32px;
    width: 100px;
    height: 100px;
    border-radius: 24px;
    background: linear-gradient(135deg, 
        rgba(244, 146, 14, 0.25) 0%, 
        rgba(244, 146, 14, 0.18) 50%,
        rgba(200, 120, 20, 0.22) 100%
    );
    border: 2.5px solid rgba(244, 146, 14, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* animation: supportIconFloat 1.5s ease-in-out infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
    box-shadow: 
        0 12px 32px rgba(244, 146, 14, 0.4),
        0 0 30px rgba(244, 146, 14, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.15),
        inset 0 -2px 0 rgba(0, 0, 0, 0.25);
    /* backdrop-filter: blur(15px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
    /* -webkit-backdrop-filter: blur(15px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
    z-index: 1;
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ supportIconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.support-modal-icon {
    color: #ffaa33;
    filter: drop-shadow(0 4px 12px rgba(244, 146, 14, 0.6));
    /* animation: supportIconPulse 1.2s ease-in-out infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
    width: 56px;
    height: 56px;
    stroke-width: 2.5;
    z-index: 2;
    position: relative;
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ supportIconPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.9;
    }
}

.support-modal-title {
    margin: 0 0 36px 0;
    background: linear-gradient(135deg, #f4920e 0%, #ffaa33 50%, #ffb14a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    /* animation: supportTitleGradient 1.5s ease infinite, supportTitleFadeIn 0.1s ease-out 0.02s both; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ supportTitleGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ supportTitleFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.support-modal-actions {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-top: 36px;
    /* animation: supportButtonsFadeIn 0.05s ease-out 0.01s both; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
    position: relative;
    z-index: 1;
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ supportButtonsFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.support-btn {
    padding: 16px 40px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: none;
    border: none;
    min-width: 140px;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.4px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.support-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: none;
}

.support-btn:hover::before {
    width: 300px;
    height: 300px;
}

.support-btn span {
    position: relative;
    z-index: 1;
}

.support-btn-yes {
    background: linear-gradient(135deg, #f4920e, #ffaa33);
    color: #fff;
    box-shadow: 
        0 6px 20px rgba(244, 146, 14, 0.4),
        0 0 0 0 rgba(244, 146, 14, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1.5px solid rgba(244, 146, 14, 0.5);
}

.support-btn-yes:hover {
    background: linear-gradient(135deg, #ffaa33, #ffb14a);
    box-shadow: 
        0 8px 28px rgba(244, 146, 14, 0.5),
        0 0 0 4px rgba(244, 146, 14, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(244, 146, 14, 0.7);
}

.support-btn-yes:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 15px rgba(244, 146, 14, 0.4);
}

.support-btn-no {
    background: rgba(60, 60, 65, 0.6);
    color: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(100, 100, 110, 0.4);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
    /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
}

.support-btn-no:hover {
    background: rgba(70, 70, 75, 0.7);
    border-color: rgba(120, 120, 130, 0.5);
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-2px) scale(1.02);
}

.support-btn-no:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.btn-training { background: rgba(255,255,255,0.05); color: #ddd; border: 1px solid #f4920e; cursor: pointer; }
/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ studioPulse { 0% { box-shadow: 0 0 0 0 rgba(18,184,134,0.45); } 70%{ box-shadow: 0 0 0 14px rgba(18,184,134,0); } 100%{ box-shadow: 0 0 0 0 rgba(18,184,134,0); } }
.extra-btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 10px 25px rgba(0,0,0,0.6); }

.dev-credit { margin-top: auto; font-size: 0.8rem; color: #ffffff; text-decoration: none; padding-bottom: 15px; text-shadow: 0 0 6px rgba(255,255,255,0.5); }

/* Auth - Professional Design */
/* ============================================================
   نافذة تسجيل الدخول - تصميم عصري جديد (برتقالي + رمادي)
   ============================================================ */

.auth-box { 
    background: linear-gradient(145deg, 
        rgba(50, 50, 55, 0.98) 0%, 
        rgba(40, 40, 45, 0.95) 50%,
        rgba(35, 35, 40, 0.98) 100%
    ); 
    padding: 48px 40px; 
    border-radius: 28px; 
    width: 90%; 
    max-width: 460px; 
    border: 2px solid rgba(244, 146, 14, 0.4); 
    text-align: center; 
    box-shadow: 
        0 28px 70px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(244, 146, 14, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(244, 146, 14, 0.15); 
    position: relative;
    /* backdrop-filter: blur(35px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
    /* -webkit-backdrop-filter: blur(35px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
    overflow: hidden;
}

/* زر Exit في نافذة تسجيل الدخول - نقل لليسار */
#view-auth .modal-close,
#pro-options-modal .modal-close {
    left: 15px !important;
    right: auto !important;
    top: 15px !important;
}

/* زر اشترك الآن في نوافذ تسجيل الدخول */
.subscribe-btn-auth {
    display: block;
    margin-top: 16px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f4920e, #ffaa33);
    color: #fff !important;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    transition: none;
    border: none;
    cursor: pointer;
}

.subscribe-btn-auth:hover {
    background: linear-gradient(135deg, #ffaa33, #f4920e);
    transform: none;
}

.auth-box::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(244, 146, 14, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: none;
    pointer-events: none;
}

.auth-box:hover::after {
    opacity: 0.6;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(244, 146, 14, 0.7), 
        rgba(244, 146, 14, 1),
        rgba(244, 146, 14, 0.7),
        transparent
    );
    border-radius: 28px 28px 0 0;
    /* تم إلغاء animation البطيء */
    opacity: 0;
}

.auth-box::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(244, 146, 14, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: none;
    pointer-events: none;
}

.auth-box:hover::after {
    opacity: 0.6;
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ authGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.auth-box h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #f4920e 0%, #ffaa33 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.8px;
    position: relative;
    z-index: 1;
}

.auth-box #selected-plan-name {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 32px;
    letter-spacing: 0.3px;
    color: rgba(244, 146, 14, 0.9);
    text-shadow: 0 0 20px rgba(244, 146, 14, 0.3);
    position: relative;
    z-index: 1;
}

.auth-input { 
    width: 100%; 
    padding: 18px 22px; 
    margin: 12px 0; 
    background: linear-gradient(145deg, 
        rgba(40, 40, 45, 0.9) 0%, 
        rgba(35, 35, 40, 0.95) 100%
    ); 
    border: 2px solid rgba(244, 146, 14, 0.25); 
    border-radius: 16px; 
    color: #fff; 
    font-size: 1.05rem; 
    text-align: center;
    transition: none;
    /* will-change: border-color, box-shadow, transform; */ /* تم إزالة will-change لتحسين الأداء */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-weight: 500;
    /* backdrop-filter: blur(15px); */ /* تم إزالة blur لتحسين الأداء */
    /* -webkit-backdrop-filter: blur(15px); */ /* تم إزالة blur لتحسين الأداء */
    position: relative;
    z-index: 1;
}

.auth-input:focus {
    outline: none;
    border-color: rgba(244, 146, 14, 0.7);
    box-shadow: 
        0 0 0 4px rgba(244, 146, 14, 0.15),
        0 4px 16px rgba(244, 146, 14, 0.2),
        inset 0 0 20px rgba(244, 146, 14, 0.08);
    background: linear-gradient(145deg, 
        rgba(50, 50, 55, 0.95) 0%, 
        rgba(40, 40, 45, 0.98) 100%
    );
    transform: translateY(-1px);
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.enter-btn { 
    background: linear-gradient(135deg, 
        #f4920e 0%, 
        #ffaa33 50%,
        #f4920e 100%
    ); 
    background-size: 200% 200%;
    /* animation: buttonGradient 1.5s ease infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
    color: #fff; 
    border: 2px solid rgba(244, 146, 14, 0.5); 
    padding: 18px 28px; 
    border-radius: 16px; 
    width: 100%; 
    font-weight: 700; 
    font-size: 1.1rem; 
    cursor: pointer; 
    margin-top: 24px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px;
    transition: none;
    box-shadow: 
        0 8px 24px rgba(244, 146, 14, 0.4),
        0 0 0 0 rgba(244, 146, 14, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    /* will-change: transform, box-shadow; */ /* تم إزالة will-change لتحسين الأداء */
    letter-spacing: 0.4px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ buttonGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.enter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.enter-btn:hover::before {
    width: 300px;
    height: 300px;
    opacity: 1;
}

.enter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 28px rgba(244, 146, 14, 0.5),
        0 0 0 1px rgba(244, 146, 14, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.enter-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(244, 146, 14, 0.4);
    transition: none;
}

.enter-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: rgba(100, 100, 110, 0.5);
    border-color: rgba(100, 100, 110, 0.3);
}


/* Image Loader - Innovative Geometric Architectural Animation */
.image-loader-container {
    width: 280px;
    height: 280px;
    background: 
        radial-gradient(ellipse at 50% 50%, rgba(244, 146, 14, 0.1) 0%, transparent 70%),
        linear-gradient(180deg, 
            rgba(6, 6, 10, 0.98) 0%,
            rgba(9, 9, 14, 0.96) 50%,
            rgba(6, 6, 10, 0.98) 100%
        );
    border: 2px solid rgba(244, 146, 14, 0.25);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px auto;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.8),
        inset 0 0 50px rgba(244, 146, 14, 0.1),
        0 0 0 1px rgba(244, 146, 14, 0.15);
    will-change: transform;
}

/* Boh Text Loader - انيميشن كتابة كلمة Boh من اليسار */
.boh-text-loader {
    width: 200px;
    height: 200px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    will-change: transform;
}

.boh-letter {
    font-size: 70px;
    font-weight: 900;
    color: rgba(244, 146, 14, 1);
    text-shadow: 
        0 0 20px rgba(244, 146, 14, 0.9),
        0 0 40px rgba(244, 146, 14, 0.7),
        0 0 60px rgba(244, 146, 14, 0.5);
    opacity: 0;
    transform: translateX(-50px) rotateY(90deg) scale(0.4);
    animation: bohLetterAppear 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    will-change: transform, opacity;
    font-family: 'Arial', 'Helvetica', sans-serif;
    letter-spacing: 2px;
    position: relative;
}

.boh-letter.letter-h {
    animation-delay: 0s;
}

.boh-letter.letter-o {
    animation-delay: 0.3s;
}

.boh-letter.letter-b {
    animation-delay: 0.6s;
}

/* Boh Letter Animation - من اليسار */
@keyframes bohLetterAppear {
    0% {
        opacity: 0;
        transform: translateX(-50px) translateY(15px) rotateY(90deg) scale(0.4);
    }
    50% {
        opacity: 0.8;
        transform: translateX(5px) translateY(-5px) rotateY(0deg) scale(1.1);
    }
    80% {
        opacity: 0.95;
        transform: translateX(-2px) translateY(2px) rotateY(0deg) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0) rotateY(0deg) scale(1);
    }
}

/* Continuous glow animation after letters appear */
.boh-letter.letter-h {
    animation: bohLetterAppear 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
               bohLetterGlow 2s ease-in-out 0.8s infinite;
}

.boh-letter.letter-o {
    animation: bohLetterAppear 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards,
               bohLetterGlow 2s ease-in-out 1.1s infinite;
}

.boh-letter.letter-b {
    animation: bohLetterAppear 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s forwards,
               bohLetterGlow 2s ease-in-out 1.4s infinite;
}

@keyframes bohLetterGlow {
    0%, 100% {
        transform: translateX(0) translateY(0) scale(1);
        text-shadow: 
            0 0 20px rgba(244, 146, 14, 0.9),
            0 0 40px rgba(244, 146, 14, 0.7),
            0 0 60px rgba(244, 146, 14, 0.5);
    }
    50% {
        transform: translateY(-2px) scale(1.04);
        text-shadow: 
            0 0 30px rgba(244, 146, 14, 1),
            0 0 60px rgba(244, 146, 14, 0.9),
            0 0 90px rgba(244, 146, 14, 0.7);
    }
}

/* Geometric Lines - Building 3D Structure (Old - Keep for compatibility) */
.geo-line {
    position: absolute;
    background: linear-gradient(90deg,
        transparent,
        rgba(244, 146, 14, 0.5) 20%,
        rgba(244, 146, 14, 1) 50%,
        rgba(244, 146, 14, 0.5) 80%,
        transparent
    );
    box-shadow: 
        0 0 20px rgba(244, 146, 14, 0.9),
        0 0 40px rgba(244, 146, 14, 0.7),
        0 0 60px rgba(244, 146, 14, 0.5);
    opacity: 0;
    animation: geoLineDraw 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    will-change: transform, opacity;
    border-radius: 2px;
}

/* Base Square Lines */
.geo-line.line-1 {
    bottom: 60px;
    left: 60px;
    width: 0;
    height: 3px;
    animation-delay: 0s;
    transform-origin: left;
}

.geo-line.line-2 {
    bottom: 60px;
    left: 60px;
    width: 3px;
    height: 0;
    animation-delay: 0.2s;
    transform-origin: bottom;
}

.geo-line.line-3 {
    bottom: 60px;
    right: 60px;
    width: 0;
    height: 3px;
    animation-delay: 0.4s;
    transform-origin: right;
}

.geo-line.line-4 {
    top: 60px;
    left: 60px;
    width: 3px;
    height: 0;
    animation-delay: 0.6s;
    transform-origin: top;
}

/* Top Square Lines */
.geo-line.line-5 {
    top: 60px;
    left: 60px;
    width: 0;
    height: 3px;
    animation-delay: 0.8s;
    transform-origin: left;
}

.geo-line.line-6 {
    top: 60px;
    right: 60px;
    width: 0;
    height: 3px;
    animation-delay: 1s;
    transform-origin: right;
}

.geo-line.line-7 {
    top: 60px;
    right: 60px;
    width: 3px;
    height: 0;
    animation-delay: 1.2s;
    transform-origin: top;
}

/* Vertical Connecting Lines */
.geo-line.line-8 {
    bottom: 60px;
    left: 60px;
    width: 3px;
    height: 0;
    animation-delay: 1.4s;
    transform-origin: bottom;
}

.geo-line.line-9 {
    bottom: 60px;
    right: 60px;
    width: 3px;
    height: 0;
    animation-delay: 1.6s;
    transform-origin: bottom;
}

.geo-line.line-10 {
    top: 60px;
    left: 60px;
    width: 3px;
    height: 0;
    animation-delay: 1.8s;
    transform-origin: top;
}

.geo-line.line-11 {
    top: 60px;
    right: 60px;
    width: 3px;
    height: 0;
    animation-delay: 2s;
    transform-origin: top;
}

/* Diagonal Lines */
.geo-line.line-12 {
    top: 50%;
    left: 50%;
    width: 0;
    height: 3px;
    transform: translate(-50%, -50%) rotate(45deg);
    transform-origin: center;
    animation-delay: 2.2s;
}

/* Center Pulse */
.geo-center-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle,
        rgba(244, 146, 14, 1) 0%,
        rgba(244, 146, 14, 0.8) 50%,
        transparent 100%
    );
    border-radius: 50%;
    opacity: 0;
    animation: centerPulseAppear 0.6s ease-out 2.4s forwards,
               centerPulse 1.5s ease-in-out 3s infinite;
    z-index: 3;
    box-shadow: 
        0 0 30px rgba(244, 146, 14, 1),
        0 0 60px rgba(244, 146, 14, 0.8);
    will-change: transform, opacity;
}

/* Orbital Ring */
.geo-orbital-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px;
    height: 180px;
    transform: translate(-50%, -50%);
    border: 2px solid transparent;
    border-top-color: rgba(244, 146, 14, 0.6);
    border-right-color: rgba(244, 146, 14, 0.4);
    border-radius: 50%;
    opacity: 0;
    animation: orbitalRingAppear 0.8s ease-out 2.6s forwards,
               orbitalRotate 3s linear 3.4s infinite;
    z-index: 1;
    will-change: transform, opacity;
    box-shadow: 
        0 0 30px rgba(244, 146, 14, 0.5),
        inset 0 0 30px rgba(244, 146, 14, 0.2);
}

/* Geometric Architectural Animations */
@keyframes geoLineDraw {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Horizontal lines grow */
.geo-line.line-1,
.geo-line.line-3,
.geo-line.line-5,
.geo-line.line-6 {
    animation-name: geoLineDrawHorizontal;
}

@keyframes geoLineDrawHorizontal {
    0% {
        opacity: 0;
        width: 0;
    }
    100% {
        opacity: 1;
        width: 80px;
    }
}

/* Vertical lines grow */
.geo-line.line-2,
.geo-line.line-4,
.geo-line.line-7,
.geo-line.line-8,
.geo-line.line-9,
.geo-line.line-10,
.geo-line.line-11 {
    animation-name: geoLineDrawVertical;
}

@keyframes geoLineDrawVertical {
    0% {
        opacity: 0;
        height: 0;
    }
    100% {
        opacity: 1;
        height: 80px;
    }
}

/* Diagonal line */
.geo-line.line-12 {
    animation-name: geoLineDrawDiagonal;
}

@keyframes geoLineDrawDiagonal {
    0% {
        opacity: 0;
        width: 0;
    }
    100% {
        opacity: 1;
        width: 120px;
    }
}

/* Structure Rotation */
@keyframes geoRotate {
    0%, 100% {
        transform: rotateY(-20deg) rotateX(10deg);
    }
    25% {
        transform: rotateY(20deg) rotateX(10deg);
    }
    50% {
        transform: rotateY(20deg) rotateX(-10deg);
    }
    75% {
        transform: rotateY(-20deg) rotateX(-10deg);
    }
}

/* Center Pulse */
@keyframes centerPulseAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes centerPulse {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 
            0 0 30px rgba(244, 146, 14, 1),
            0 0 60px rgba(244, 146, 14, 0.8);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.3);
        box-shadow: 
            0 0 40px rgba(244, 146, 14, 1),
            0 0 80px rgba(244, 146, 14, 1),
            0 0 120px rgba(244, 146, 14, 0.6);
    }
}

/* Orbital Ring */
@keyframes orbitalRingAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

@keyframes orbitalRotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes bohGlowAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
        filter: blur(10px);
    }
    50% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.1) rotate(5deg);
        filter: blur(6px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        filter: blur(5px);
    }
}

@keyframes bohGlowPulse {
    0%, 100% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        filter: blur(5px);
    }
    25% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1.08) rotate(2deg);
        filter: blur(4px);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.15) rotate(0deg);
        filter: blur(3px);
    }
    75% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1.08) rotate(-2deg);
        filter: blur(4px);
    }
}

/* Text Gradient Animation */
@keyframes textGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 3D Building Floors */
.building-floor {
    position: absolute;
    left: 0;
    width: 120px;
    background: linear-gradient(180deg,
        rgba(244, 146, 14, 0.95) 0%,
        rgba(244, 146, 14, 0.9) 50%,
        rgba(244, 146, 14, 0.85) 100%
    );
    border: 2px solid rgba(244, 146, 14, 1);
    box-shadow: 
        0 0 25px rgba(244, 146, 14, 0.8),
        0 0 50px rgba(244, 146, 14, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform-origin: bottom;
    will-change: transform, opacity;
}

/* Foundation - Floor 0 */
.building-floor.floor-0 {
    bottom: 0;
    height: 12px;
    border-radius: 4px 4px 0 0;
    animation: floorBuild 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0s;
}

/* Floor 1 */
.building-floor.floor-1 {
    bottom: 12px;
    height: 45px;
    animation: floorBuild 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.8s;
}

/* Floor 2 */
.building-floor.floor-2 {
    bottom: 57px;
    height: 45px;
    animation: floorBuild 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 1.6s;
}

/* Floor 3 */
.building-floor.floor-3 {
    bottom: 102px;
    height: 45px;
    animation: floorBuild 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 2.4s;
}

/* Roof */
.building-roof {
    position: absolute;
    bottom: 147px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 50px solid rgba(244, 146, 14, 0.95);
    filter: drop-shadow(0 0 30px rgba(244, 146, 14, 0.8)) 
            drop-shadow(0 5px 10px rgba(0, 0, 0, 0.4));
    opacity: 0;
    animation: roofBuild3D 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 3.2s forwards;
    will-change: border-width, opacity;
}

/* Building Glow Effect */
.building-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 240px;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse,
        rgba(244, 146, 14, 0.3) 0%,
        rgba(244, 146, 14, 0.2) 30%,
        rgba(244, 146, 14, 0.1) 50%,
        transparent 75%
    );
    opacity: 0;
    animation: buildingGlow 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 4.2s forwards,
               buildingGlowPulse 2.5s ease-in-out 5.7s infinite;
    z-index: 1;
    pointer-events: none;
    will-change: transform, opacity;
    filter: blur(3px);
}

/* 3D Building Animations */
@keyframes floorBuild {
    0% {
        opacity: 0;
        transform: scaleY(0);
    }
    60% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
        transform: scaleY(1);
    }
}

@keyframes roofBuild3D {
    0% {
        opacity: 0;
        border-left-width: 0;
        border-right-width: 0;
        border-bottom-width: 0;
    }
    100% {
        opacity: 1;
        border-left-width: 60px;
        border-right-width: 60px;
        border-bottom-width: 50px;
    }
}

@keyframes building3DRotate {
    0%, 100% {
        transform: rotateY(-25deg) rotateX(5deg);
    }
    25% {
        transform: rotateY(-10deg) rotateX(5deg);
    }
    50% {
        transform: rotateY(25deg) rotateX(5deg);
    }
    75% {
        transform: rotateY(10deg) rotateX(5deg);
    }
}

@keyframes buildingGlow {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes buildingGlowPulse {
    0%, 100% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Seamless loop - reset all elements */
.arch-foundation,
.arch-wall,
.arch-roof,
.arch-window,
.arch-render-glow {
    animation-fill-mode: both;
}

/* Reset sequence for seamless loop */
@keyframes constructionReset {
    0%, 95% {
        visibility: visible;
    }
    100% {
        visibility: hidden;
    }
}

.image-loader-text {
    margin-top: 16px;
    color: rgba(244, 146, 14, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    z-index: 1;
    /* animation: imageLoaderPulse 2s ease-in-out infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ imageLoaderPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* -----------------------------
   ✅ Chat Layout + Sidebar
--------------------------------*/
/* ============================================================
   صفحة المحادثة - تصميم جديد تماماً (برتقالي + رمادي)
   ============================================================ */

.chat-layout{
  width: 100% !important;
  height: 100% !important;
  height: 100vh !important;
  height: -webkit-fill-available !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  background: 
    radial-gradient(ellipse 100% 50% at 30% 0%, rgba(244, 146, 14, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 100% 50% at 70% 100%, rgba(200, 120, 20, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a0f 0%, #0f0f15 50%, #0a0a0f 100%);
  overflow: hidden !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  top: 0 !important;
  left: 0 !important;
  overscroll-behavior: none !important;
  -webkit-overflow-scrolling: touch !important;
  box-sizing: border-box !important;
}

/* ============================================================
   القائمة الجانبية - تصميم جديد تماماً (برتقالي + رمادي)
   ============================================================ */

.side-panel{
  width: 360px;
  min-width: 360px;
  max-width: 360px;
  height: 100%;
  height: 100vh;
  height: -webkit-fill-available;
  background: linear-gradient(180deg, 
    rgba(40, 40, 45, 0.98) 0%, 
    rgba(35, 35, 40, 0.95) 50%,
    rgba(30, 30, 35, 0.98) 100%
  );
  border-left: 2px solid rgba(244, 146, 14, 0.3);
  display: flex !important;
  flex-direction: column;
  padding: 20px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative !important;
  flex-shrink: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  visibility: visible !important;
  transform: none !important;
  /* backdrop-filter: blur(30px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(30px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  box-shadow: 
    -4px 0 20px rgba(0, 0, 0, 0.4),
    inset 1px 0 0 rgba(244, 146, 14, 0.1);
  box-sizing: border-box;
}

/* Mobile behavior: Sidebar hidden by default, shows on toggle */
@media (max-width: 900px){
  .side-panel{
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    z-index: 9998 !important;
    width: 360px !important;
    max-width: 360px !important;
    min-width: 360px !important;
    height: 100% !important;
    height: 100vh !important;
    height: -webkit-fill-available !important;
    background: linear-gradient(180deg, 
      rgba(40, 40, 45, 0.98) 0%, 
      rgba(35, 35, 40, 0.95) 50%,
      rgba(30, 30, 35, 0.98) 100%
    ) !important;
    border-left: 2px solid rgba(244, 146, 14, 0.3) !important;
    box-shadow: 
      -4px 0 20px rgba(0, 0, 0, 0.4),
      inset 1px 0 0 rgba(244, 146, 14, 0.1) !important;
    transform: translateX(105%) !important;
    transition: transform 0.3s ease !important;
    visibility: hidden !important;
    display: flex !important;
    will-change: transform !important;
  }
  
  /* Sidebar when open */
  .side-panel.open {
    transform: translateX(0) !important;
    visibility: visible !important;
  }
  
  /* Sidebar when closed */
  .side-panel:not(.open) {
    transform: translateX(105%) !important;
    visibility: hidden !important;
  }
  
  /* Overlay for mobile sidebar */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997;
    pointer-events: auto;
    cursor: pointer;
    display: none;
    animation: fadeIn 0.2s ease;
  }
  
  .sidebar-overlay.show {
    display: block;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  /* Ensure chat layout works properly */
  .chat-layout {
    width: 100% !important;
    height: 100% !important;
    height: 100vh !important;
    height: -webkit-fill-available !important;
    display: flex !important;
    flex-direction: row !important;
    overflow: hidden !important;
  }
  
  /* Ensure chat-main takes remaining space */
  .chat-main {
    flex: 1 !important;
    min-width: 0 !important;
    width: auto !important;
    height: 100% !important;
    height: 100vh !important;
    height: -webkit-fill-available !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  
  /* Ensure chat-container-outer scrolls properly */
  .chat-container-outer {
    flex: 1 !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

/* Sidebar header - تصميم جديد */
.side-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid rgba(244, 146, 14, 0.2);
  margin-bottom: 4px;
}

.side-brand{
  display: flex;
  align-items: center;
  gap: 12px;
}

.side-logo-link {
  display: inline-block;
  text-decoration: none;
  transition: none;
  position: relative;
  z-index: 1;
}

.side-logo-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 146, 14, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.side-logo-link:hover::before {
  width: 80px;
  height: 80px;
  opacity: 0.8;
}

.side-logo{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(244, 146, 14, 0.15), rgba(244, 146, 14, 0.08));
  border: 1.5px solid rgba(244, 146, 14, 0.3);
  box-shadow: 
    0 4px 12px rgba(244, 146, 14, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: none;
  cursor: pointer;
  flex-shrink: 0;
}

.side-logo-link:hover .side-logo {
  border-color: rgba(244, 146, 14, 0.6);
  box-shadow: 
    0 8px 24px rgba(244, 146, 14, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px) scale(1.05);
}

.side-logo-link:active .side-logo {
  transform: translateY(0) scale(1.02);
}

.side-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  filter: drop-shadow(0 2px 6px rgba(244, 146, 14, 0.4));
  transition: none;
}

.side-logo-link:hover .side-logo-img {
  transform: scale(1.15);
  filter: drop-shadow(0 4px 12px rgba(244, 146, 14, 0.7));
}

.side-title{ 
  font-weight: 800; 
  font-size: 1.05rem; 
  color: #fff; 
  letter-spacing: -0.3px;
}

.side-sub{ 
  font-size: 0.8rem; 
  color: rgba(255, 255, 255, 0.6); 
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.side-flag-icon {
  width: 20px;
  height: 15px;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
}

.side-close-btn{
  display:none;
  width:38px;
  height:38px;
  border-radius: 12px;
  border: 1px solid rgba(244,146,14,0.35);
  background: rgba(244,146,14,0.08);
  color:#f4920e;
  cursor:pointer;
}
@media (max-width: 900px){
  .side-close-btn{ display:flex; align-items:center; justify-content:center; }
}

/* Balance card - تصميم جديد */
.side-balance-card{
  margin-top: 16px;
  padding: 16px 18px;
  background: linear-gradient(145deg, 
    rgba(244, 146, 14, 0.15) 0%, 
    rgba(244, 146, 14, 0.08) 50%,
    rgba(200, 120, 20, 0.12) 100%
  );
  border: 1.5px solid rgba(244, 146, 14, 0.3);
  border-radius: 18px;
  /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.side-balance-row{ 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  gap: 12px; 
}

.side-balance-label{ 
  color: rgba(255, 255, 255, 0.8); 
  font-size: 0.95rem; 
  font-weight: 500;
}

.side-balance-val{
  color: #ffaa33;
  font-weight: 900;
  font-size: 1.15rem;
  text-shadow: 0 0 20px rgba(244, 146, 14, 0.4);
}

.points-buy-btn{
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1.5px solid rgba(244, 146, 14, 0.4);
  background: linear-gradient(135deg, 
    rgba(244, 146, 14, 0.2) 0%, 
    rgba(244, 146, 14, 0.12) 100%
  );
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: none;
  width: 100%;
  /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
}

.points-buy-btn:hover{
  background: linear-gradient(135deg, #f4920e, #ffaa33);
  color: #fff;
  border-color: rgba(244, 146, 14, 0.7);
  box-shadow: 
    0 8px 24px rgba(244, 146, 14, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Sidebar switch (Models / Archive) - تصميم جديد */
.side-switch{
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(145deg, 
    rgba(40, 40, 45, 0.8) 0%, 
    rgba(35, 35, 40, 0.9) 100%
  );
  border: 1.5px solid rgba(244, 146, 14, 0.25);
  /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
}

/* ✅ زر التدريب في القائمة الجانبية - تصميم جديد */
.side-training-btn{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-top: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, rgba(244,146,14,0.25), rgba(244,146,14,0.15));
  color: #fff;
  font-weight: 700;
  font-size: 0.93rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(244,146,14,0.15);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-training-btn::before{
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: none;
}

.side-training-btn:hover::before{
  left: 100%;
}

.side-training-btn:hover{
  background: linear-gradient(135deg, rgba(244,146,14,0.35), rgba(244,146,14,0.22));
  box-shadow: 0 4px 12px rgba(244,146,14,0.25);
  transform: translateY(-2px);
}

.side-training-btn:active{
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(244,146,14,0.2);
}

.side-training-btn .training-icon{
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.side-training-btn span:not(.training-icon){
  position: relative;
  z-index: 1;
}
.side-switch-btn{
  flex:1;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255,255,255,0.78);
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: none;
}
.side-switch-btn:hover{
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.side-switch-btn.active{
  background: rgba(244,146,14,0.18);
  border-color: rgba(244,146,14,0.55);
  color: #fff;
  box-shadow: 0 10px 24px rgba(244,146,14,0.10);
}
#side-section-archive{ display:none; }



/* Sections */
.side-section{ margin-top: 14px; display:flex; flex-direction:column; gap:10px; }
.side-section-title{
  color:#f4920e;
  font-weight:800;
  font-size:0.95rem;
  display:flex;
  align-items:center;
  gap:8px;
}
.row-between{ justify-content:space-between; }

/* Models list */
.side-models{
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow: visible;
  padding-right: 2px;
  max-height: none;
}
.model-item{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1.5px solid rgba(244, 146, 14, 0.2);
  background: linear-gradient(145deg, 
    rgba(45, 45, 50, 0.6) 0%, 
    rgba(35, 35, 40, 0.7) 100%
  );
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: none;
  text-align: right;
  /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
}

.model-item:hover{
  border-color: rgba(244, 146, 14, 0.5);
  background: linear-gradient(145deg, 
    rgba(244, 146, 14, 0.15) 0%, 
    rgba(244, 146, 14, 0.08) 100%
  );
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.model-item.active{
  border-color: rgba(244, 146, 14, 0.7);
  background: linear-gradient(145deg, 
    rgba(244, 146, 14, 0.25) 0%, 
    rgba(244, 146, 14, 0.15) 50%,
    rgba(200, 120, 20, 0.18) 100%
  );
  box-shadow: 
    0 4px 16px rgba(244, 146, 14, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ✅ إبراز موديل البرومبت أثناء ظهور رسالة العرض المجاني */
.model-item.prompt-highlighted {
  border-color: rgba(244, 146, 14, 0.9) !important;
  border-width: 2.5px !important;
  background: linear-gradient(145deg, 
    rgba(244, 146, 14, 0.35) 0%, 
    rgba(244, 146, 14, 0.25) 50%,
    rgba(244, 146, 14, 0.2) 100%
  ) !important;
  box-shadow: 
    0 0 0 3px rgba(244, 146, 14, 0.3),
    0 6px 24px rgba(244, 146, 14, 0.5),
    0 0 40px rgba(244, 146, 14, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  transform: scale(1.02);
  animation: promptPulse 2s ease-in-out infinite;
  position: relative;
  z-index: 10;
}

.model-item.prompt-highlighted::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, 
    rgba(244, 146, 14, 0.6) 0%, 
    rgba(244, 146, 14, 0.3) 50%,
    rgba(244, 146, 14, 0.6) 100%
  );
  z-index: -1;
  animation: promptGlow 2s ease-in-out infinite;
  opacity: 0.7;
}

@keyframes promptPulse {
  0%, 100% { 
    box-shadow: 
      0 0 0 3px rgba(244, 146, 14, 0.3),
      0 6px 24px rgba(244, 146, 14, 0.5),
      0 0 40px rgba(244, 146, 14, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
  50% { 
    box-shadow: 
      0 0 0 4px rgba(244, 146, 14, 0.4),
      0 8px 32px rgba(244, 146, 14, 0.6),
      0 0 50px rgba(244, 146, 14, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

@keyframes promptGlow {
  0%, 100% { 
    opacity: 0.7;
    transform: scale(1);
  }
  50% { 
    opacity: 1;
    transform: scale(1.02);
  }
}
/* ✅ منع ظهور active على training-item - لا يظهر أي إطار حتى لو كان active */
.model-item.training-item.active {
  border-color: rgba(244,146,14,0.45) !important;
  background: rgba(244,146,14,0.12) !important;
  box-shadow: none !important;
  transform: none !important;
}
.m-ico{ font-size: 1.15rem; width:26px; display:flex; justify-content:center; }
.m-txt{ flex:1; font-weight:700; font-size:0.95rem; color:#fff; }
.m-hint{
  font-size:0.75rem;
  color:#999;
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
}
.model-item.soon{
  opacity: .75;
  cursor:not-allowed;
}
.m-badge{
  font-size:0.72rem;
  font-weight:900;
  color:#000;
  background: linear-gradient(135deg, #f4920e, #ffb14a);
  padding: 4px 8px;
  border-radius: 999px;
}

/* History area */
.side-history{
  flex: 1;
  min-height: 0;
}
.history-tabs { display: flex; width: 100%; background: #1a1a1a; border-radius: 12px; padding: 4px; border: 1px solid #333; }
.h-tab { flex: 1; text-align: center; padding: 10px; cursor: pointer; border-radius: 10px; color: #888; transition: 0.2s; font-size: 0.95rem; font-weight: bold; }
.h-tab.active { background: #f4920e; color: #fff; }
.history-counter { font-size:0.8rem; background:#222; padding:2px 10px; border-radius:10px; color:#aaa; border:1px solid rgba(255,255,255,0.08); }

.clear-gallery-btn { width: 100%; background: rgba(255,255,255,0.03); color: #ff6b6b; border: 1px dashed rgba(255,107,107,0.6); padding: 12px; cursor: pointer; border-radius: 12px; font-size: 0.95rem; }
.clear-gallery-btn:hover{ background: rgba(255,107,107,0.08); }

.history-list { flex: 1; display: flex; flex-direction: column; gap: 12px; overflow:auto; padding-right: 2px;   max-height: 56vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.history-item { position: relative; background: #1e1e1e; border-radius: 12px; overflow: hidden; border: 1px solid #333; flex-shrink: 0; }
.hist-img { width: 100%; height: 140px; object-fit: cover; cursor: pointer; display:block; }
.hist-del-btn-pro { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,77,77,0.85); color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; }

.chat-hist-item {
  background: #1e1e1e;
  border-radius: 12px;
  border: 1px solid #333;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  position: relative;
}
.chat-hist-item:hover{
  background:#252525;
  border-color:#f4920e;
  transform: translateX(-3px);
  box-shadow: 0 8px 18px rgba(244,146,14,0.08);
}
.chi-header{ display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; padding-bottom:8px; border-bottom:1px solid #333; }
.chi-header span{ color:#f4920e; font-size:0.85rem; font-weight:500; }
.chi-preview{
  color:#ccc;
  font-size:0.95rem;
  line-height:1.5;
  max-height:80px;
  overflow:hidden;
  text-overflow:ellipsis;
  display:-webkit-box;
  -webkit-line-clamp:3;
  line-clamp:3;
  -webkit-box-orient:vertical;
}

/* Pin buttons */
.hist-pin-btn,
.chat-pin-btn{
  position:absolute;
  top:8px;
  left:8px;
  width:28px;
  height:28px;
  border-radius:50%;
  background: rgba(0,0,0,0.6);
  border:1px solid rgba(244,146,14,0.6);
  color:#f4920e;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:0.9rem;
  transition: none;
  z-index:3;
}
.chat-pin-btn{ right:8px; left:auto; }
.hist-pin-btn.pinned,
.chat-pin-btn.pinned{ background: rgba(244,146,14,0.2); }
.hist-pin-btn:hover,
.chat-pin-btn:hover{ background: rgba(244,146,14,0.3); }
.history-item.pinned,
.chat-hist-item.pinned{ border-color:#f4920e; box-shadow: 0 0 10px rgba(244,146,14,0.25); }

.chat-del-btn{
  position:absolute;
  top:8px;
  left:8px;
  width:28px;
  height:28px;
  border-radius:50%;
  background: transparent;
  border: 1px solid #333;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:3;
}
.chat-del-btn svg{ width:16px; height:16px; }
.chat-del-btn:hover{ border-color:#ff4d4d; }

/* Main area */
.chat-main{
  flex: 1;
  min-width: 0;
  display:flex;
  flex-direction:column;
  height:100%;
  height: 100vh;
  height: -webkit-fill-available;
  overflow: hidden;
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  top: 0 !important;
  width: auto;
  box-sizing: border-box;
  flex-shrink: 1;
}

/* ============================================================
   رأس صفحة المحادثة - تصميم جديد تماماً (برتقالي + رمادي)
   ============================================================ */

.chat-header { 
  width: 100%; 
  margin: 0; 
  padding: 18px 24px; 
  background: linear-gradient(180deg, 
    rgba(40, 40, 45, 0.95) 0%, 
    rgba(35, 35, 40, 0.9) 100%
  ); 
  border-bottom: 2px solid rgba(244, 146, 14, 0.3); 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  flex-shrink: 0; 
  gap: 16px; 
  z-index: 50; 
  /* backdrop-filter: blur(30px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(30px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  box-sizing: border-box;
  top: 0;
  left: 0;
  right: 0;
}
.mode-display-btn { background: rgba(244, 146, 14, 0.08); border: 1px solid #f4920e; color: #f4920e; padding: 8px 20px; border-radius: 20px; font-weight: bold; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.header-icon-btn { background: rgba(255,255,255,0.05); padding: 8px; border-radius: 14px; color: #ddd; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; cursor: pointer; border: 1px solid rgba(255,255,255,0.06); }
.header-icon-btn:hover{ border-color: rgba(244,146,14,0.25); background: rgba(244,146,14,0.07); }
.mobile-only{ display:none !important; }

/* هيدر موحد: يظهر بنفس الشكل على الموبايل والديسكتوب - محتوى مصغّر ليتناسب مع العرض */
@media (max-width:900px){
  .mobile-only{ display:flex !important; }
  
  .chat-header {
    padding: 6px 10px !important;
    gap: 6px !important;
  }
  
  .chat-header .header-icon-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    padding: 4px !important;
    border-radius: 6px !important;
    border-width: 1px !important;
  }
  
  .chat-header .header-icon-btn svg {
    width: 14px !important;
    height: 14px !important;
  }
  
  .chat-header .mode-display-btn {
    padding: 4px 10px !important;
    font-size: 0.72rem !important;
    gap: 4px !important;
    border-radius: 8px !important;
    border-width: 1px !important;
  }
  
  .mode-display-btn svg {
    width: 12px !important;
    height: 12px !important;
  }
  
  .chat-header .header-lang-trigger {
    padding: 3px 6px !important;
    font-size: 0.68rem !important;
    border-radius: 6px !important;
    border-width: 1px !important;
  }
  
  .chat-header .header-lang-selected .lang-flag {
    font-size: 0.8rem !important;
  }
  
  .chat-header .header-lang-selected .lang-label {
    font-size: 0.68rem !important;
  }
  
  .chat-header .header-lang-arrow {
    font-size: 0.45rem !important;
  }
  .chat-header .header-lang-menu {
    min-width: 110px !important;
    max-width: 140px !important;
    max-height: 200px !important;
    padding: 4px 0 !important;
    border-radius: 8px !important;
    top: calc(100% + 4px) !important;
  }
  .chat-header .header-lang-menu .lang-item-new {
    padding: 5px 8px !important;
    font-size: 0.68rem !important;
    gap: 5px !important;
  }
  .chat-header .header-lang-menu .lang-item-new .lang-label {
    font-size: 0.68rem !important;
  }
  .chat-header .header-lang-menu .lang-item-new .lang-flag {
    font-size: 0.85rem !important;
  }
  
  .lang-toggle-btn {
    padding: 3px 6px !important;
    font-size: 0.75rem !important;
    border-radius: 8px !important;
    min-height: 28px !important;
  }
  
  .lang-toggle-wrap {
    gap: 3px !important;
  }
}

/* شاشات صغيرة جداً: تصغير أكثر وإخفاء نص اللغة */
@media (max-width: 380px) {
  .chat-header { padding: 5px 8px !important; gap: 4px !important; }
  .header-icon-btn {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    padding: 3px !important;
  }
  .header-icon-btn svg { width: 12px !important; height: 12px !important; }
  .mode-display-btn { padding: 3px 8px !important; font-size: 0.65rem !important; }
  .mode-display-btn svg { width: 10px !important; height: 10px !important; }
  .chat-header .header-lang-selected .lang-label { display: none !important; }
  .chat-header .header-lang-trigger { padding: 2px 5px !important; }
  .mode-display-btn span {
    max-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Chat body - Professional Design */
.chat-container-outer { 
  flex: 1; 
  width: 100%; 
  overflow-y: auto; 
  overflow-x: hidden;
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  scroll-behavior: auto; 
  background: linear-gradient(180deg, #0f0f0f 0%, #0a0a0a 50%, #0f0f0f 100%);
  position: relative;
  min-height: 0;
  box-sizing: border-box;
  padding-top: 0;
  margin-top: 0;
}

.chat-container-outer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(244, 146, 14, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0, 217, 255, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.chat-body { 
  width: 100%; 
  max-width: 900px; 
  padding: 0 20px 24px; 
  display: flex; 
  flex-direction: column; 
  gap: 20px; 
  flex: 1; 
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding-top: 0;
}

/* Messages - Professional Design */
.message { 
  max-width: 85%; 
  padding: 16px 20px; 
  border-radius: 18px; 
  line-height: 1.7; 
  font-size: 1.05rem; 
  position: relative; 
  white-space: pre-wrap; 
  word-wrap: break-word;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: all 0.15s ease;
}

.message:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.msg-user { 
  align-self: flex-start; 
  background: linear-gradient(145deg, rgba(40, 40, 40, 0.95), rgba(30, 30, 30, 0.95)); 
  border: 2px solid rgba(255, 255, 255, 0.1); 
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.msg-bot { 
  align-self: flex-end; 
  background: linear-gradient(145deg, rgba(20, 18, 9, 0.95), rgba(15, 12, 6, 0.95)); 
  border: 2px solid rgba(244, 146, 14, 0.3); 
  border-bottom-left-radius: 4px; 
  color: #eee;
  box-shadow: 0 4px 16px rgba(244, 146, 14, 0.15),
              inset 0 1px 0 rgba(244, 146, 14, 0.1);
}

.msg-actions { position: absolute; bottom: -12px; left: 0; display: flex; gap: 5px; z-index: 5; }
.msg-user .msg-actions { left: auto; right: 0; }
.action-mini-btn { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; cursor: pointer; color: #fff; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.action-mini-btn:hover { color: #f4920e; border-color: #f4920e; background: rgba(244, 146, 14, 0.1); }
.action-mini-btn svg { width: 14px; height: 14px; }

.chat-img-thumb-user { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid #555; cursor: pointer; }
.chat-img-bot { max-width: 100%; max-height: 400px; object-fit: contain; border-radius: 10px; border: 1px solid #444; margin-top: 10px; cursor: pointer; display: block; }

.bot-h1, .bot-h2, .bot-h3 { color: #f4920e; margin: 15px 0 10px; font-weight: bold; border-bottom: 1px solid rgba(244,146,14,0.3); padding-bottom: 4px; }
.table-wrapper { width: 100%; overflow-x: auto; margin: 15px 0; border-radius: 10px; border: 1px solid #444; }
.pro-table { width: 100%; border-collapse: collapse; min-width: 500px; background: #1e1e1e; font-size: 0.95rem; }
.pro-table th { background: #333; color: #f4920e; padding: 12px; border: 1px solid #555; text-align: right; }
.pro-table td { border: 1px solid #555; padding: 10px; color: #ddd; }

.bot-action-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; border-top: 0; padding-top: 6px; }
.bot-action-btn {
  background: rgba(244, 146, 14, 0.1);
  color: #fff;
  border: 1px solid #f4920e;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: none;
  width: auto;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bot-action-btn:hover {
  background: #f4920e;
  color: #000;
  box-shadow: 0 0 12px rgba(244, 146, 14, 0.35);
  transform: translateY(-2px);
}
.bot-action-btn.primary { background: #f4920e; color: #000; border-color: #f4920e; }
.bot-action-btn.primary:hover { background: #ffaa33; }

/* ============================================================
   رسالة موديل Prompt المجاني - Free Plan Notice
   ============================================================ */

.free-prompt-notice {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    z-index: 10000;
    width: 90%;
    max-width: 600px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.free-prompt-notice.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

.free-prompt-notice-content {
    background: linear-gradient(135deg, 
        rgba(244, 146, 14, 0.15) 0%, 
        rgba(244, 146, 14, 0.08) 100%
    );
    border: 2px solid rgba(244, 146, 14, 0.4);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(244, 146, 14, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
}

.free-prompt-notice-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.free-prompt-notice-text {
    flex: 1;
    min-width: 0;
}

.free-prompt-notice-title {
    color: #f4920e;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.free-prompt-notice-desc {
    color: #ddd;
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.9;
}

.free-prompt-notice-close {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 4px;
    transition: none;
    -webkit-tap-highlight-color: transparent;
}

.free-prompt-notice-close:hover {
    color: #f4920e;
    background: rgba(244, 146, 14, 0.1);
}

.free-prompt-notice-close:active {
    transform: scale(0.95);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .free-prompt-notice {
        top: 15px;
        width: 95%;
        max-width: none;
    }

    .free-prompt-notice-content {
        padding: 16px 20px;
        gap: 12px;
    }

    .free-prompt-notice-icon {
        font-size: 1.6rem;
    }

    .free-prompt-notice-title {
        font-size: 1rem;
    }

    .free-prompt-notice-desc {
        font-size: 0.9rem;
    }
}

/* Footer */
/* ============================================================
   تذييل صفحة المحادثة - تصميم جديد تماماً (برتقالي + رمادي)
   ============================================================ */

.chat-footer-wrapper { 
  width: 100%; 
  background: linear-gradient(180deg, 
    rgba(35, 35, 40, 0.95) 0%, 
    rgba(40, 40, 45, 0.98) 100%
  ); 
  border-top: 2px solid rgba(244, 146, 14, 0.3); 
  display: flex !important; 
  flex-direction: column; 
  align-items: center; 
  flex-shrink: 0; 
  padding-bottom: 16px; 
  padding-top: 12px;
  visibility: visible !important;
  position: relative;
  z-index: 100;
  /* backdrop-filter: blur(30px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(30px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  box-shadow: 
    0 -4px 20px rgba(0, 0, 0, 0.4),
    inset 0 -1px 0 rgba(244, 146, 14, 0.1);
}


/* Image action buttons (small, orange, white) */
.bot-action-btn.img-action-btn{
  background: transparent !important;
  color: #fff !important;
  border: 1px solid #f4920e !important;
  padding: 4px 10px !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  line-height: 1.1 !important;
  box-shadow: none !important;
  min-height: unset !important;
}
.bot-action-btn.img-action-btn svg{ width: 14px; height: 14px; stroke: currentColor; fill: none; }
.bot-action-btn.img-action-btn:hover{
  background: rgba(244,146,14,0.14) !important;
  color: #fff !important;
  transform: translateY(-1px);
}
.bot-action-buttons{ gap: 8px; }

/* ============================================================
   حقل الإدخال - تصميم جديد تماماً (برتقالي + رمادي)
   ============================================================ */

.chat-footer { 
  width: 100%; 
  max-width: 900px; 
  padding: 20px 24px; 
  display: flex !important; 
  gap: 14px; 
  align-items: flex-end;
  background: transparent;
  position: relative;
  bottom: auto;
  z-index: 10;
  visibility: visible !important;
}

.chat-input-area { 
  flex: 1; 
  background: linear-gradient(145deg, 
    rgba(45, 45, 50, 0.95) 0%, 
    rgba(40, 40, 45, 0.98) 100%
  ); 
  border: 2px solid rgba(244, 146, 14, 0.3); 
  color: #fff; 
  padding: 16px 20px; 
  border-radius: 20px; 
  outline: none; 
  font-size: 1.05rem; 
  min-width: 0; 
  resize: none; 
  min-height: 56px; 
  max-height: 140px; 
  overflow-y: auto; 
  font-family: inherit; 
  line-height: 1.6;
  transition: none;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  /* backdrop-filter: blur(20px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(20px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
}

.chat-input-area:focus { 
  border-color: rgba(244, 146, 14, 0.7); 
  background: linear-gradient(145deg, 
    rgba(50, 50, 55, 0.98) 0%, 
    rgba(45, 45, 50, 0.98) 100%
  );
  box-shadow: 
    0 6px 24px rgba(244, 146, 14, 0.3),
    0 0 0 4px rgba(244, 146, 14, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.action-btn { 
  width: 54px; 
  height: 54px; 
  border-radius: 16px; 
  border: none; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
  color: white; 
  background: linear-gradient(135deg, #f4920e, #ffaa33);
  box-shadow: 0 6px 20px rgba(244, 146, 14, 0.4),
              0 0 0 0 rgba(244, 146, 14, 0.5);
  transition: none;
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: none;
}

.action-btn:hover::before {
  width: 300px;
  height: 300px;
}

.action-btn:hover {
  background: linear-gradient(135deg, #ffaa33, #ffb14a);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(244, 146, 14, 0.5),
              0 0 0 4px rgba(244, 146, 14, 0.2);
}

.action-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(244, 146, 14, 0.4);
}
.action-btn:disabled { opacity: 0.5; background: #555; }
.btn-upload { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10); }
.btn-upload.has-file { background: #4dc91a; border-color: #4dc91a; }
.hidden { display: none !important; }

.preview-thumbs-container { display: flex; gap: 10px; overflow-x: auto; padding: 10px 5px 5px; }
.thumb-wrapper { position: relative; width: 60px; height: 60px; flex-shrink: 0; }
.thumb-img { width: 100%; height: 100%; border-radius: 10px; object-fit: cover; border: 1px solid #555; }
.thumb-remove { position: absolute; top: -8px; right: -8px; background: #ff0000; color: white; width: 20px; height: 20px; border-radius: 50%; font-size: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* Lightbox & modals */
.lightbox-overlay, .modal-overlay { 
  position: fixed; 
  inset: 0; 
  background: rgba(0, 0, 0, 0.92); 
  z-index: 100000; 
  display: none; 
  align-items: center; 
  justify-content: center; 
  /* backdrop-filter: blur(20px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(20px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* ✅ تحسين الأداء */
  /* will-change: opacity, display; */ /* تم إزالة will-change لتحسين الأداء */
  transform: translateZ(0);
  opacity: 0;
  transition: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.lightbox-overlay {
  cursor: zoom-out;
}

.lightbox-overlay:not(.show) {
  pointer-events: none;
}
.lightbox-overlay.show { 
  display: flex !important; 
  opacity: 1 !important;
  visibility: visible !important;
  /* animation: lightboxFadeIn 0.1s ease-out; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ lightboxFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-content { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  width: 100%; 
  height: 100%; 
  justify-content: center; 
  padding: 20px;
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.lightbox-img { 
  max-width: 85% !important; 
  max-height: 70vh !important; 
  object-fit: contain !important; 
  border-radius: 16px !important; 
  margin-bottom: 20px !important; 
  border: 2px solid rgba(244, 146, 14, 0.3) !important; 
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(244, 146, 14, 0.2) inset !important;
  background: rgba(0, 0, 0, 0.3) !important;
  cursor: zoom-out !important;
  transition: none !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 100002 !important;
  position: relative !important;
  flex-shrink: 0;
}

.lightbox-img:hover {
  transform: scale(1.02);
}

.lightbox-actions {
  display: flex !important;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0;
  margin-bottom: 20px;
  z-index: 100001;
  position: sticky;
  bottom: 20px;
  visibility: visible !important;
  opacity: 1 !important;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid rgba(244, 146, 14, 0.2);
}

.lb-action-btn { 
  background: linear-gradient(135deg, rgba(244, 146, 14, 0.2), rgba(244, 146, 14, 0.1)) !important; 
  border: 2px solid rgba(244, 146, 14, 0.5) !important; 
  color: #ffaa33 !important; 
  padding: 12px 24px !important; 
  border-radius: 12px !important; 
  cursor: pointer !important; 
  margin: 0 !important; 
  font-size: 1rem !important; 
  font-weight: 700 !important;
  transition: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 140px !important;
  justify-content: center !important;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(244, 146, 14, 0.2) inset !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: rgba(244, 146, 14, 0.3) !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 100002 !important;
  position: relative !important;
}

.lb-action-btn:hover {
  background: linear-gradient(135deg, #f4920e, #ffaa33);
  color: #fff;
  border-color: #f4920e;
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(244, 146, 14, 0.4),
    0 0 0 2px rgba(244, 146, 14, 0.3) inset;
}

.lb-action-btn:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 8px rgba(244, 146, 14, 0.3),
    0 0 0 1px rgba(244, 146, 14, 0.2) inset;
}

.lb-action-btn.btn-dl {
  background: linear-gradient(135deg, rgba(244, 146, 14, 0.25), rgba(244, 146, 14, 0.15));
  border-color: rgba(244, 146, 14, 0.6);
}

.lb-action-btn.btn-dl:hover {
  background: linear-gradient(135deg, #f4920e, #ffaa33);
}

.lb-action-btn.btn-close {
  background: linear-gradient(135deg, rgba(100, 100, 100, 0.2), rgba(80, 80, 80, 0.1));
  border-color: rgba(150, 150, 150, 0.5);
  color: #ccc;
}

.lb-action-btn.btn-close:hover {
  background: linear-gradient(135deg, rgba(150, 150, 150, 0.4), rgba(120, 120, 120, 0.3));
  border-color: rgba(180, 180, 180, 0.6);
  color: #fff;
}

/* تحسينات الموبايل للـ lightbox */
@media (max-width: 768px) {
  .lightbox-content {
    padding: 16px;
    height: 100%;
  }
  
  .lightbox-img {
    max-width: 95%;
    max-height: 70vh;
    margin-bottom: 20px;
  }
  
  .lightbox-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    padding: 0 20px;
  }
  
  .lb-action-btn {
    width: 100%;
    max-width: 280px;
    padding: 14px 20px;
    font-size: 1.05rem;
  }
}

/* ============================================================
   تصميم عصري للنوافذ الداخلية - برتقالي + رمادي
   ============================================================ */

.modal-box { 
  background: linear-gradient(145deg, rgba(40, 40, 45, 0.98), rgba(30, 30, 35, 0.95)); 
  width: 90%; 
  max-width: 420px; 
  border-radius: 24px; 
  padding: 32px 28px; 
  border: 1.5px solid rgba(244, 146, 14, 0.4); 
  text-align: center; 
  position: relative; 
  max-height: 90vh; 
  overflow-y: auto;
  /* backdrop-filter: blur(30px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(30px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(244, 146, 14, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(244, 146, 14, 0.1);
  transition: none;
}

.modal-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(244, 146, 14, 0.6), 
    rgba(244, 146, 14, 0.8),
    rgba(244, 146, 14, 0.6),
    transparent
  );
  border-radius: 24px 24px 0 0;
  /* تم إلغاء animation البطيء */
  opacity: 0;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(244, 146, 14, 0.12);
  border: 1.5px solid rgba(244, 146, 14, 0.4);
  color: rgba(244, 146, 14, 0.9);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: none;
  z-index: 100001;
  /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
}

/* رفع زر Exit إلى أعلى على الموبايل */
@media (max-width: 768px) {
  .modal-close {
    position: fixed !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 100002 !important;
    width: 40px !important;
    height: 40px !important;
    background: rgba(244, 146, 14, 0.2) !important;
    border: 2px solid rgba(244, 146, 14, 0.5) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
  }
  
  /* تصغير زر Exit في الموديلات التي لها استبيان */
  #prompt-modal .modal-close,
  #boq-modal .modal-close,
  #kitchen-modal .modal-close,
  #training-modal .modal-close,
  #render-modal .modal-close {
    width: 20px !important;
    height: 20px !important;
    font-size: 0.7rem !important;
    top: 8px !important;
    right: 8px !important;
    padding: 0 !important;
    min-width: 20px !important;
    min-height: 20px !important;
  }
}

.modal-close:hover { 
  background: rgba(244, 146, 14, 0.25);
  border-color: rgba(244, 146, 14, 0.7);
  color: #f4920e;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(244, 146, 14, 0.3);
}

/* ============================================================
   Language Selection - تصميم جديد بالكامل يعمل على جميع الأجهزة
   ============================================================ */

.lang-selection-overlay-new,
.lang-dropdown-overlay {
  /* backdrop-filter: blur(30px) saturate(200%); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(30px) saturate(200%); */ /* تم إزالة blur لتحسين الأداء */
  background: rgba(5, 5, 16, 0.95);
  display: flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;
  visibility: visible !important;
  transition: opacity 0.04s ease-out, visibility 0.04s ease-out;
  z-index: 999999;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.lang-selection-container-new,
.lang-dropdown-container {
  max-width: 500px;
  width: 90%;
  padding: 30px;
  background: linear-gradient(145deg, 
    rgba(45, 45, 50, 0.98) 0%, 
    rgba(35, 35, 40, 0.95) 50%,
    rgba(30, 30, 35, 0.98) 100%
  );
  border: 1.5px solid rgba(244, 146, 14, 0.4);
  border-radius: 24px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(244, 146, 14, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  /* backdrop-filter: blur(40px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(40px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* animation: modalAppear 0.05s ease-out; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.lang-selection-header-new,
.lang-dropdown-header {
  margin-bottom: 24px;
  text-align: center;
  flex-shrink: 0;
}

.lang-title-new,
.lang-title {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f4920e 0%, #ffaa33 50%, #ffb14a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: -0.5px;
}

/* Desktop Dropdown */
.lang-dropdown-wrapper-desktop {
  position: relative;
  width: 100%;
  z-index: 1001;
  overflow: visible;
  display: block;
}

@media (max-width: 768px) {
  .lang-dropdown-wrapper-desktop {
    display: none !important;
  }
}

.lang-dropdown-btn-desktop {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-radius: 14px;
  border: 1.5px solid rgba(244, 146, 14, 0.3);
  background: linear-gradient(145deg, 
    rgba(45, 45, 50, 0.9) 0%, 
    rgba(35, 35, 40, 0.95) 50%,
    rgba(30, 30, 35, 0.9) 100%
  );
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: none;
  /* will-change: transform, box-shadow, border-color; */ /* تم إزالة will-change لتحسين الأداء */
  /* backdrop-filter: blur(20px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(20px); */ /* تم إزالة blur لتحسين الأداء */
}

.lang-dropdown-btn-desktop:hover {
  border-color: rgba(244, 146, 14, 0.6);
  background: linear-gradient(145deg, 
    rgba(55, 55, 60, 0.95) 0%, 
    rgba(45, 45, 50, 0.98) 50%,
    rgba(40, 40, 45, 0.95) 100%
  );
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(244, 146, 14, 0.3);
  transform: translateY(-2px);
}

.lang-dropdown-btn-desktop.active {
  border-color: rgba(244, 146, 14, 0.7);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 0 2px rgba(244, 146, 14, 0.4);
}

.lang-dropdown-btn:hover {
  border-color: rgba(244, 146, 14, 0.6);
  background: linear-gradient(145deg, 
    rgba(55, 55, 60, 0.95) 0%, 
    rgba(45, 45, 50, 0.98) 50%,
    rgba(40, 40, 45, 0.95) 100%
  );
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(244, 146, 14, 0.3);
  transform: translateY(-2px);
}

.lang-dropdown-btn.active {
  border-color: rgba(244, 146, 14, 0.7);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 0 2px rgba(244, 146, 14, 0.4);
}

.lang-dropdown-selected {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  justify-content: center;
  text-align: center;
}

.lang-dropdown-arrow {
  font-size: 0.8rem;
  color: rgba(244, 146, 14, 0.8);
  transition: transform 0.05s ease-out;
}

.lang-dropdown-btn.active .lang-dropdown-arrow {
  transform: rotate(180deg);
}

.lang-dropdown-menu-desktop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: linear-gradient(145deg, 
    rgba(45, 45, 50, 0.98) 0%, 
    rgba(35, 35, 40, 0.95) 50%,
    rgba(30, 30, 35, 0.98) 100%
  );
  border: 1.5px solid rgba(244, 146, 14, 0.3);
  border-radius: 14px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(244, 146, 14, 0.2);
  /* backdrop-filter: blur(30px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(30px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
  z-index: 1002;
  max-height: 450px;
  min-height: auto;
  /* animation: dropdownSlideDown 0.05s ease-out; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
  display: none;
  visibility: hidden;
  opacity: 0;
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  /* will-change: scroll-position; */ /* تم إزالة will-change لتحسين الأداء */
}

.lang-dropdown-menu-desktop[style*="display: block"],
.lang-dropdown-menu-desktop.show {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}


/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ dropdownSlideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* عناصر اللغات - تصميم موحد */
.lang-item-new {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border: none;
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: none;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(244, 146, 14, 0.2);
  user-select: none;
}

.lang-item-new:last-child {
  border-bottom: none;
}

.lang-item-new:hover {
  background: linear-gradient(90deg, 
    rgba(244, 146, 14, 0.15) 0%, 
    rgba(244, 146, 14, 0.08) 100%
  );
  padding-right: 26px;
}

.lang-item-new:active {
  transform: scale(0.98);
  background: linear-gradient(90deg, 
    rgba(244, 146, 14, 0.25) 0%, 
    rgba(244, 146, 14, 0.15) 100%
  );
}

.lang-item-new[data-supported="false"] {
  opacity: 0.6;
  cursor: not-allowed;
}

.lang-item-new[data-supported="false"]:hover {
  background: rgba(255, 0, 0, 0.1);
}

/* Mobile List - قائمة مباشرة على الموبايل */
.lang-list-mobile {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 12px;
  margin-top: 0;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

@media (max-width: 768px) {
  .lang-list-mobile {
    display: flex !important;
  }
  
  .lang-item-new {
    padding: 18px 20px;
    min-height: 64px;
    border-radius: 14px;
    margin-bottom: 0;
    background: linear-gradient(145deg, 
      rgba(45, 45, 50, 0.95) 0%, 
      rgba(35, 35, 40, 0.98) 50%,
      rgba(30, 30, 35, 0.95) 100%
    );
    border: 1.5px solid rgba(244, 146, 14, 0.25);
    box-shadow: 
      0 4px 12px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(244, 146, 14, 0.15);
    border-bottom: 1.5px solid rgba(244, 146, 14, 0.25);
  }
  
  .lang-item-new:last-child {
    border-bottom: 1.5px solid rgba(244, 146, 14, 0.25);
  }
  
  .lang-item-new:active {
    transform: scale(0.97);
    border-color: rgba(244, 146, 14, 0.5);
    box-shadow: 
      0 2px 8px rgba(0, 0, 0, 0.5),
      0 0 0 2px rgba(244, 146, 14, 0.3);
  }
  
  .lang-flag {
    font-size: 1.8rem;
  }
  
  .lang-label {
    font-size: 1.05rem;
    font-weight: 700;
  }
  
  .lang-badge {
    font-size: 0.8rem;
    padding: 5px 12px;
  }
}

.lang-flag {
  font-size: 1.5rem;
  line-height: 1;
}

.lang-label {
  flex: 1;
  text-align: right;
}

.lang-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(244, 146, 14, 0.2);
  color: rgba(244, 146, 14, 1);
  font-weight: 700;
  border: 1px solid rgba(244, 146, 14, 0.3);
}

/* ============================================================
   تصميم احترافي للموبايل - قائمة مباشرة بسيطة وواضحة
   ============================================================ */
@media (max-width: 768px) {
  .lang-selection-overlay-new,
  .lang-dropdown-overlay {
    padding: 0 !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
  }
  
  .lang-selection-container-new,
  .lang-dropdown-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    min-height: 100vh !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: none !important;
    overflow-y: visible !important;
  }
  
  .lang-selection-header-new,
  .lang-dropdown-header {
    margin: 0 !important;
    margin-bottom: 0 !important;
    padding: 24px 20px 20px !important;
    position: sticky !important;
    top: 0 !important;
    background: linear-gradient(180deg, 
      rgba(5, 5, 16, 0.98) 0%, 
      rgba(5, 5, 16, 0.95) 80%,
      rgba(5, 5, 16, 0) 100%
    ) !important;
    z-index: 100 !important;
    /* backdrop-filter: blur(20px) saturate(180%) !important; */ /* تم إزالة blur لتحسين الأداء */
    /* -webkit-backdrop-filter: blur(20px) saturate(180%) !important; */ /* تم إزالة blur لتحسين الأداء */
    border-bottom: 1px solid rgba(244, 146, 14, 0.15) !important;
    text-align: center !important;
  }
  
  .lang-title-new,
  .lang-title {
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
    background: linear-gradient(135deg, #f4920e 0%, #ffaa33 50%, #ffb14a 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    letter-spacing: -0.5px !important;
  }
  
  /* إخفاء Desktop Dropdown */
  .lang-dropdown-wrapper-desktop {
    display: none !important;
  }
  
  /* قائمة الموبايل - تصميم احترافي */
  .lang-list-mobile {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    padding: 0 16px 30px !important;
    margin-top: 0 !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior: contain !important;
  }
  
  .lang-item-new {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 20px 18px !important;
    min-height: 72px !important;
    border-radius: 16px !important;
    margin-bottom: 12px !important;
    background: linear-gradient(145deg, 
      rgba(45, 45, 50, 0.95) 0%, 
      rgba(40, 40, 45, 0.98) 50%,
      rgba(35, 35, 40, 0.95) 100%
    ) !important;
    border: 2px solid rgba(244, 146, 14, 0.2) !important;
    box-shadow: 
      0 4px 16px rgba(0, 0, 0, 0.5),
      0 0 0 1px rgba(244, 146, 14, 0.1) inset,
      0 2px 8px rgba(244, 146, 14, 0.1) !important;
    transition: none !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(244, 146, 14, 0.3) !important;
    user-select: none !important;
    cursor: pointer !important;
    text-align: right !important;
    border-bottom: none !important;
  }
  
  .lang-item-new:last-child {
    margin-bottom: 0 !important;
  }
  
  .lang-item-new:active {
    transform: scale(0.97) !important;
    background: linear-gradient(145deg, 
      rgba(55, 55, 60, 0.98) 0%, 
      rgba(50, 50, 55, 1) 50%,
      rgba(45, 45, 50, 0.98) 100%
    ) !important;
    border-color: rgba(244, 146, 14, 0.5) !important;
    box-shadow: 
      0 2px 12px rgba(0, 0, 0, 0.6),
      0 0 0 2px rgba(244, 146, 14, 0.3) inset,
      0 4px 16px rgba(244, 146, 14, 0.2) !important;
  }
  
  .lang-item-new[data-supported="true"]:active {
    border-color: rgba(244, 146, 14, 0.6) !important;
  }
  
  .lang-item-new[data-supported="false"] {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
  }
  
  .lang-item-new[data-supported="false"]:active {
    transform: scale(0.98) !important;
    border-color: rgba(255, 0, 0, 0.3) !important;
    background: linear-gradient(145deg, 
      rgba(50, 30, 30, 0.95) 0%, 
      rgba(45, 25, 25, 0.98) 50%,
      rgba(40, 20, 20, 0.95) 100%
    ) !important;
  }
  
  .lang-flag {
    font-size: 2rem !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
  }
  
  .lang-label {
    flex: 1 !important;
    text-align: right !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    letter-spacing: -0.3px !important;
  }
  
  .lang-badge {
    font-size: 0.75rem !important;
    padding: 6px 14px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, rgba(244, 146, 14, 0.25), rgba(244, 146, 14, 0.15)) !important;
    color: #ffaa33 !important;
    font-weight: 800 !important;
    border: 1.5px solid rgba(244, 146, 14, 0.4) !important;
    flex-shrink: 0 !important;
    letter-spacing: 0.5px !important;
  }
}

@media (max-width: 480px) {
  .lang-selection-header-new,
  .lang-dropdown-header {
    padding: 20px 16px 16px !important;
  }
  
  .lang-title-new,
  .lang-title {
    font-size: 1.4rem !important;
  }
  
  .lang-list-mobile {
    padding: 0 12px 24px !important;
  }
  
  .lang-item-new {
    padding: 18px 16px !important;
    min-height: 68px !important;
    margin-bottom: 10px !important;
    border-radius: 14px !important;
  }
  
  .lang-flag {
    font-size: 1.8rem !important;
  }
  
  .lang-label {
    font-size: 1.05rem !important;
  }
  
  .lang-badge {
    font-size: 0.7rem !important;
    padding: 5px 12px !important;
  }
}

.lang-selection-overlay[style*="display: none"],
.lang-selection-overlay.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: -1 !important;
  display: none !important;
}

.cinematic-modal {
  background: linear-gradient(145deg, 
    rgba(45, 45, 50, 0.98) 0%, 
    rgba(35, 35, 40, 0.95) 50%,
    rgba(30, 30, 35, 0.98) 100%
  );
  border: 1.5px solid rgba(244, 146, 14, 0.4);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(244, 146, 14, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(244, 146, 14, 0.1);
  /* backdrop-filter: blur(40px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(40px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* animation: modalAppear 0.05s ease-out; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
  position: relative;
  overflow: hidden;
}

.cinematic-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(244, 146, 14, 0.6), 
    rgba(244, 146, 14, 0.9),
    rgba(244, 146, 14, 0.6),
    transparent
  );
  /* تم إلغاء animation البطيء */
  opacity: 0;
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ modalAppear {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lang-modal-box {
  max-width: 600px;
  width: 90%;
  padding: 40px 30px;
}

.lang-modal-header {
  margin-bottom: 30px;
  text-align: center;
}

.lang-title {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f4920e 0%, #ffaa33 50%, #ffb14a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 12px 0;
  letter-spacing: -0.8px;
  background-size: 200% 200%;
  /* animation: gradientShift 3s ease infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.lang-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  margin: 0;
  line-height: 1.6;
}

.lang-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

@media (max-width: 600px) {
  .lang-options-grid {
    grid-template-columns: 1fr;
  }
}

.cinematic-lang-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 18px 22px;
  border-radius: 14px;
  border: 1.5px solid rgba(244, 146, 14, 0.3);
  background: linear-gradient(145deg, 
    rgba(45, 45, 50, 0.9) 0%, 
    rgba(35, 35, 40, 0.95) 50%,
    rgba(30, 30, 35, 0.9) 100%
  );
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: none;
  /* will-change: transform, box-shadow, border-color; */ /* تم إزالة will-change لتحسين الأداء */
  overflow: hidden;
  /* backdrop-filter: blur(20px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(20px); */ /* تم إزالة blur لتحسين الأداء */
}

.cinematic-lang-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(244, 146, 14, 0.15), 
    transparent
  );
  transition: left 0.3s ease;
}

.cinematic-lang-btn:hover::before {
  left: 100%;
}

.cinematic-lang-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 146, 14, 0.7);
  background: linear-gradient(145deg, 
    rgba(244, 146, 14, 0.2) 0%, 
    rgba(244, 146, 14, 0.12) 50%,
    rgba(200, 120, 20, 0.15) 100%
  );
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(244, 146, 14, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cinematic-lang-btn:active {
  transform: translateY(0);
  transition: all 0.05s;
}

.cinematic-lang-btn[data-supported="true"] {
  border-color: rgba(244, 146, 14, 0.5);
}

.cinematic-lang-btn[data-supported="false"] {
  border-color: rgba(100, 100, 110, 0.3);
  opacity: 0.7;
}

.cinematic-lang-btn[data-supported="false"]:hover {
  border-color: rgba(120, 120, 130, 0.5);
  opacity: 1;
}

.lang-flag {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.cinematic-lang-btn:hover .lang-flag {
  transform: scale(1.1) rotate(5deg);
}

.lang-label {
  flex: 1;
  text-align: left;
  font-size: 1rem;
  letter-spacing: 0.3px;
}

.lang-badge {
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(244, 146, 14, 0.2);
  color: #ffaa33;
  border: 1px solid rgba(244, 146, 14, 0.4);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Restriction Modal */
.restriction-modal {
  /* backdrop-filter: blur(20px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(20px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  background: radial-gradient(ellipse at center, rgba(10, 10, 10, 0.98) 0%, rgba(0, 0, 0, 0.99) 100%);
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.restriction-modal.show {
  opacity: 1;
}

.restriction-box {
  max-width: 450px;
  width: 90%;
  padding: 40px 30px;
  text-align: center;
  /* animation: scaleInModal 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ scaleInModal {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.restriction-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  /* animation: pulseIcon 2s ease-in-out infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
  filter: drop-shadow(0 0 20px rgba(244, 146, 14, 0.5));
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ pulseIcon {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.restriction-title {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f4920e 0%, #ffaa33 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 15px 0;
}

.restriction-message {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 25px 0;
}

.restriction-close-btn {
  padding: 12px 32px;
  border-radius: 12px;
  border: 1.5px solid rgba(244, 146, 14, 0.6);
  background: linear-gradient(135deg, rgba(244, 146, 14, 0.2), rgba(244, 146, 14, 0.1));
  color: #ffaa33;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: none;
  width: auto;
  min-width: 120px;
}

.restriction-close-btn:hover {
  background: linear-gradient(135deg, #f4920e, #ffaa33);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(244, 146, 14, 0.4);
  border-color: #f4920e;
}

.restriction-close-btn:active {
  transform: translateY(0);
}

/* Language restriction toast: centered, small text, auto-hide 3s */
.lang-restriction-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2147483647;
  padding: 12px 20px;
  max-width: 90%;
  width: max-content;
  background: rgba(20, 20, 26, 0.95);
  border: 1px solid rgba(244, 146, 14, 0.35);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lang-restriction-toast.visible {
  opacity: 1;
  visibility: visible;
}

/* Header language dropdown (plans topbar + chat header) */
.header-lang-dropdown-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.header-lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(244, 146, 14, 0.35);
  background: rgba(244, 146, 14, 0.08);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: none;
}
.header-lang-trigger:hover {
  background: rgba(244, 146, 14, 0.15);
  border-color: rgba(244, 146, 14, 0.5);
}
.header-lang-trigger.active {
  border-color: rgba(244, 146, 14, 0.6);
  background: rgba(244, 146, 14, 0.18);
}
.header-lang-selected {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.header-lang-selected .lang-flag { font-size: 1.1rem; }
.header-lang-selected .lang-flag-img,
.lang-item-new .lang-flag-img {
  width: 20px;
  height: 15px;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
  vertical-align: middle;
}
.header-lang-arrow {
  font-size: 0.65rem;
  color: rgba(244, 146, 14, 0.9);
  transition: transform 0.15s ease;
}
.header-lang-trigger.active .header-lang-arrow {
  transform: rotate(180deg);
}
.header-lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  max-height: 320px;
  overflow-y: auto;
  background: linear-gradient(145deg, rgba(40, 40, 48, 0.98), rgba(30, 30, 38, 0.98));
  border: 1.5px solid rgba(244, 146, 14, 0.35);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(244, 146, 14, 0.15);
  z-index: 1100;
  padding: 6px 0;
}
.header-lang-menu .lang-item-new {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: none;
}
.header-lang-menu .lang-item-new:last-child {
  border-bottom: none;
}
.header-lang-menu .lang-item-new:hover {
  background: rgba(244, 146, 14, 0.12);
}
.header-lang-menu .lang-item-new[data-supported="false"] {
  opacity: 0.65;
  cursor: not-allowed;
}
.header-lang-menu .lang-item-new[data-supported="false"]:hover {
  background: rgba(255, 100, 100, 0.1);
}
[dir="rtl"] .header-lang-menu {
  right: auto;
  left: 0;
}
[dir="rtl"] .header-lang-menu .lang-item-new {
  text-align: right;
}

/* Chat header (after login): smaller language dropdown so it fits on screen */
.chat-header .header-lang-dropdown-wrap {
  margin-left: auto;
}
.chat-header .header-lang-trigger {
  padding: 5px 10px;
  font-size: 0.82rem;
  border-radius: 10px;
}
.chat-header .header-lang-selected .lang-flag {
  font-size: 0.95rem;
}
.chat-header .header-lang-selected .lang-flag-img {
  width: 18px;
  height: 14px;
}
.chat-header .header-lang-arrow {
  font-size: 0.55rem;
}
.chat-header .header-lang-menu {
  min-width: 160px;
  max-height: 260px;
  padding: 4px 0;
  top: calc(100% + 4px);
  right: 0;
  border-radius: 10px;
}
.chat-header .header-lang-menu .lang-item-new {
  padding: 8px 12px;
  font-size: 0.85rem;
  gap: 8px;
}
[dir="rtl"] .chat-header .header-lang-menu {
  right: auto;
  left: 0;
}

/* Sign In/Up trigger and dropdown (plans topbar - right side) */
.header-signin-dropdown-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-inline-start: auto;
}
.header-signin-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 50px;
  border: 1.5px solid rgba(244, 146, 14, 0.45);
  background: linear-gradient(135deg, rgba(244, 146, 14, 0.12), rgba(244, 146, 14, 0.06));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.header-signin-trigger:hover {
  background: linear-gradient(135deg, rgba(244, 146, 14, 0.22), rgba(244, 146, 14, 0.12));
  border-color: rgba(244, 146, 14, 0.65);
  box-shadow: 0 4px 20px rgba(244, 146, 14, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.header-signin-trigger.active {
  border-color: rgba(244, 146, 14, 0.7);
  background: linear-gradient(135deg, rgba(244, 146, 14, 0.2), rgba(244, 146, 14, 0.1));
  box-shadow: 0 0 0 3px rgba(244, 146, 14, 0.2);
}
.header-signin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(244, 146, 14, 0.25);
}
.header-signin-icon svg {
  stroke: #f4920e;
}
.header-signin-label {
  letter-spacing: 0.02em;
}
.header-signin-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: linear-gradient(145deg, rgba(42, 42, 50, 0.98), rgba(32, 32, 40, 0.98));
  border: 1.5px solid rgba(244, 146, 14, 0.4);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(244, 146, 14, 0.15);
  z-index: 1101;
  padding: 6px 0;
  overflow: hidden;
}
.header-signin-menu .signin-item {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  text-decoration: none;
  transition: background 0.15s ease;
}
.header-signin-menu .signin-item:last-child {
  border-bottom: none;
}
.header-signin-menu .signin-item:hover {
  background: rgba(244, 146, 14, 0.15);
}
.header-signin-menu .signin-item-link:hover {
  color: #fff;
}
[dir="rtl"] .header-signin-menu {
  right: auto;
  left: 0;
}
[dir="rtl"] .header-signin-menu .signin-item {
  text-align: right;
}
/* إلغاء قاعدة 720px للـ signin داخل plans-topbar - نستخدم تصميم مخصص */
.plans-topbar .header-signin-dropdown-wrap {
  width: auto !important;
  margin-inline-start: 0 !important;
}
.plans-topbar .header-signin-trigger {
  width: auto !important;
  max-width: none !important;
}

/* ========== جداول التسعير والباقات (تحت اللوجو) ========== */
.boh-pricing-tables-wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 0 16px;
  box-sizing: border-box;
  overflow: visible;
}
/* شريط 12 باقة — أبيض + لمعة + إعلان متحرك */
.boh-pricing-region-hint {
  display: block;
  margin: 0 0 12px;
  padding: 10px 14px;
  background: rgba(244, 146, 14, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(244, 146, 14, 0.2);
}
.boh-pricing-tagline-bar {
  overflow: hidden;
  white-space: nowrap;
}
.boh-pricing-tagline-marquee {
  display: inline-block;
  animation: boh-tagline-marquee 52s linear infinite;
}
.boh-pricing-tagline-marquee span {
  display: inline-block;
  padding: 0 80px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6), 0 0 24px rgba(255, 255, 255, 0.3);
}
[dir="rtl"] .boh-pricing-tagline-marquee { animation-direction: reverse; }
[dir="rtl"] .boh-pricing-region-hint,
[dir="rtl"] .boh-pricing-tagline-marquee span { font-family: 'Cairo', 'Inter', sans-serif; }
/* ماركوي مستمر: تتحرك من البداية وتعود من الأول عند الوصول للنهاية */
@keyframes boh-tagline-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.boh-pricing-main-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #f4920e;
  text-align: center;
  margin: 0 0 24px;
  line-height: 1.3;
}
.boh-pricing-system-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
  overflow: visible;
}
.boh-pricing-sys-btn {
  flex: 1 1 200px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  padding-top: 24px;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(40, 40, 48, 0.95), rgba(30, 30, 38, 0.95));
  color: #e5e7eb;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
  overflow: visible;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.boh-pricing-sys-btn:hover {
  border-color: rgba(244, 146, 14, 0.5);
  box-shadow: 0 12px 32px rgba(244, 146, 14, 0.15);
  transform: translateY(-2px);
}
/* مؤشر الاختيار - حلقة نيون متعددة الألوان */
.boh-pricing-sys-indicator {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #f4920e;
  z-index: 2;
  animation: boh-indicator-neon 1.8s ease-in-out infinite;
}
[dir="rtl"] .boh-pricing-sys-indicator { right: auto; left: 10px; }
.boh-pricing-sys-btn.active .boh-pricing-sys-indicator {
  display: block;
}
@keyframes boh-indicator-neon {
  0%, 100% { 
    border-color: #f4920e; 
    box-shadow: 0 0 8px #f4920e, 0 0 16px rgba(244,146,14,0.6), inset 0 0 6px rgba(244,146,14,0.3);
  }
  33% { 
    border-color: #00e5ff; 
    box-shadow: 0 0 10px #00e5ff, 0 0 20px rgba(0,229,255,0.6), inset 0 0 8px rgba(0,229,255,0.3);
  }
  66% { 
    border-color: #ff00d4; 
    box-shadow: 0 0 10px #ff00d4, 0 0 20px rgba(255,0,212,0.6), inset 0 0 8px rgba(255,0,212,0.3);
  }
}

/* إطار نيون متحرك بألوان متعددة - لمبة نيون */
@keyframes boh-neon-glow-pulse {
  0%, 100% { 
    box-shadow: 0 0 5px #f4920e, 0 0 15px rgba(244,146,14,0.4), 0 0 25px rgba(244,146,14,0.2),
                0 0 8px #00e5ff, 0 0 20px rgba(0,229,255,0.3);
  }
  25% { 
    box-shadow: 0 0 8px #00e5ff, 0 0 20px rgba(0,229,255,0.5), 0 0 35px rgba(0,229,255,0.3),
                0 0 8px #ff00d4, 0 0 20px rgba(255,0,212,0.3);
  }
  50% { 
    box-shadow: 0 0 8px #ff00d4, 0 0 20px rgba(255,0,212,0.5), 0 0 35px rgba(255,0,212,0.3),
                0 0 8px #f4920e, 0 0 20px rgba(244,146,14,0.3);
  }
  75% { 
    box-shadow: 0 0 8px #f4920e, 0 0 20px rgba(244,146,14,0.5), 0 0 35px rgba(244,146,14,0.3),
                0 0 8px #00e5ff, 0 0 20px rgba(0,229,255,0.3);
  }
}
.boh-pricing-sys-btn.active {
  border-color: #f4920e;
  background: linear-gradient(145deg, rgba(40,40,48,0.98), rgba(30,30,38,0.98));
  position: relative;
  animation: boh-neon-glow-pulse 2.2s ease-in-out infinite;
}

.boh-pricing-sys-text { text-align: center; line-height: 1.4; }
.boh-pricing-initial-hint {
  text-align: center;
  color: #9ca3af;
  font-size: 0.95rem;
  margin: 0 0 28px;
}
.boh-pricing-section { margin-bottom: 32px; }
.boh-pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-bottom: 20px;
  overflow: visible;
}
.boh-pricing-cards-three { grid-template-columns: repeat(3, 1fr); overflow: visible; padding-top: 4px; }
.boh-pricing-card {
  position: relative;
  overflow: visible;
  background: linear-gradient(145deg, rgba(42, 42, 50, 0.98), rgba(32, 32, 40, 0.98));
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}
.boh-pricing-card:hover {
  border-color: rgba(244, 146, 14, 0.4);
  box-shadow: 0 14px 40px rgba(244, 146, 14, 0.12);
  transform: translateY(-4px);
}
.boh-pricing-card-gold {
  border-color: rgba(244, 146, 14, 0.5);
  background: linear-gradient(180deg, rgba(244, 146, 14, 0.12) 0%, rgba(244, 146, 14, 0.04) 100%);
  box-shadow: 0 8px 28px rgba(244, 146, 14, 0.2);
}
.boh-pricing-card-gold:hover { box-shadow: 0 14px 40px rgba(244, 146, 14, 0.25); }
.boh-pricing-card-bronze { border-color: rgba(205, 127, 50, 0.4); }
.boh-pricing-card-silver { border-color: rgba(192, 192, 192, 0.35); }
.boh-pricing-card-special { border-color: rgba(244, 146, 14, 0.45); }
.boh-pricing-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.6);
  color: #d1d5db;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
[dir="rtl"] .boh-pricing-badge { left: auto; right: 20px; }
.boh-pricing-popular {
  position: absolute;
  top: -12px;
  right: 20px;
  left: auto;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  background: linear-gradient(135deg, #f4920e, #ff9800);
  color: #fff;
  box-shadow: 0 2px 10px rgba(244, 146, 14, 0.4);
  z-index: 2;
}
[dir="rtl"] .boh-pricing-popular { right: auto; left: 20px; }
.boh-pricing-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 18px 0 12px;
  line-height: 1.35;
  text-align: center;
}
.boh-pricing-card-price {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.boh-price-old {
  display: block;
  font-size: 0.85rem;
  text-decoration: line-through;
  color: #6b7280;
  margin-bottom: 4px;
}
.boh-price-new {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  display: block;
}
.boh-pricing-features {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  flex-grow: 1;
}
.boh-pricing-features li {
  position: relative;
  padding: 0 0 0 26px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: #d1d5db;
  line-height: 1.5;
}
.boh-pricing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #10b981;
  font-weight: 700;
  font-size: 0.95rem;
}
[dir="rtl"] .boh-pricing-features li { padding: 0 26px 0 0; }
[dir="rtl"] .boh-pricing-features li::before { left: auto; right: 0; }
/* عنوان المكتبات المعمارية + زر العين */
.boh-pricing-library-header {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-weight: 700 !important;
  color: #f4920e !important;
  font-size: 0.95rem !important;
  margin-top: 8px !important;
  padding-left: 26px !important;
}
.boh-pricing-library-header::before { content: "📚" !important; }
.boh-pricing-library-preview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(244, 146, 14, 0.2);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.boh-pricing-library-preview-btn:hover {
  background: rgba(244, 146, 14, 0.4);
  color: #fff;
}
[dir="rtl"] .boh-pricing-library-header { padding-left: 0; padding-right: 26px; }
/* بوكس الهدية — 1200 نقطة في جروب مشترك شهرياً */
.boh-pricing-gift-li {
  padding: 0 !important;
  list-style: none !important;
}
.boh-pricing-gift-li::before { display: none !important; }
.boh-pricing-gift-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(244, 146, 14, 0.2), rgba(244, 146, 14, 0.08));
  border: 2px solid rgba(244, 146, 14, 0.5);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(244, 146, 14, 0.15);
  margin: 4px 0;
}
.boh-pricing-gift-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.boh-pricing-gift-box span:last-child {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}
[dir="rtl"] .boh-pricing-gift-box span:last-child { font-family: 'Cairo', 'Inter', sans-serif; }
.boh-pricing-diff-box {
  background: rgba(55, 65, 81, 0.5);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.boh-pricing-diff-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.85rem;
  color: #e5e7eb;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.boh-pricing-diff-row:last-child { border-bottom: none; }
.boh-pricing-diff-row span:last-child {
  font-weight: 700;
  color: #fff;
  background: rgba(244, 146, 14, 0.15);
  padding: 4px 10px;
  border-radius: 8px;
}
.boh-pricing-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff !important;
  background: linear-gradient(135deg, #f4920e 0%, #ff9800 100%);
  border: 1px solid rgba(244, 146, 14, 0.35);
  box-shadow: 0 4px 16px rgba(244, 146, 14, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: auto;
}
.boh-pricing-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(244, 146, 14, 0.35);
}
.boh-pricing-footer-link {
  text-align: center;
  margin-top: 20px;
}
.boh-pricing-footer-link a {
  color: #f4920e;
  font-weight: 600;
  text-decoration: none;
}
.boh-pricing-footer-link a:hover { text-decoration: underline; }
.boh-pricing-scope-switch {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.boh-pricing-scope-btn {
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.boh-pricing-scope-btn:hover { background: rgba(255, 255, 255, 0.08); }
.boh-pricing-scope-btn.active {
  background: linear-gradient(135deg, #f4920e 0%, #ff9800 100%);
  border-color: rgba(244, 146, 14, 0.4);
  color: #fff;
  box-shadow: 0 4px 12px rgba(244, 146, 14, 0.3);
}
.boh-pricing-terms {
  text-align: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}
.boh-pricing-terms a { color: #9ca3af; text-decoration: none; }
.boh-pricing-terms a:hover { color: #f4920e; text-decoration: underline; }
@media (max-width: 900px) {
  .boh-pricing-cards-three { grid-template-columns: 1fr; }
  .boh-pricing-sys-btn { max-width: none; }
}
@media (max-width: 640px) {
  .boh-pricing-main-title { font-size: 1.35rem; }
  .boh-pricing-card { padding: 20px 16px; }
}

.lang-options {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.lang-btn {
  flex: 1 1 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(244, 146, 14, 0.55);
  background: rgba(244, 146, 14, 0.12);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: none;
  /* will-change: transform, background; */ /* تم إزالة will-change لتحسين الأداء */
  transform: translateZ(0);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.lang-btn:hover {
  transform: translateY(-1px);
  background: rgba(244, 146, 14, 0.18);
}

.lang-btn:active {
  transform: translateY(0);
  transition: all 0.05s;
}

/* Language button variants - removed empty rulesets */

.lang-flag {
  font-size: 1.2rem;
}
.lang-toggle-wrap{
  display:flex;
  gap:4px;
  align-items:center;
  justify-content:flex-end;
}
.lang-toggle-btn{
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.22);
  background:rgba(255,255,255,0.03);
  color:#ddd;
  padding:4px 8px;
  font-size:0.75rem;
  cursor:pointer;
}
.lang-toggle-btn.active{
  border-color:#f4920e;
  background:rgba(244,146,14,0.18);
  color:#fff;
}

/* BOQ */
#boq-modal .modal-box { max-width: 900px; text-align: right; overflow-y: auto; padding-top: 0; position: relative; }
.boq-modal-header { position: sticky; top: 0; background: #1c1c1c; z-index: 100; padding: 15px 25px; border-bottom: 1px solid #333; display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 20px; }
.boq-header-content { display: flex; align-items: center; gap: 20px; width: 100%; justify-content: flex-start; }
.boq-header-title { color: #f4920e; font-size: 1.4rem; font-weight: bold; margin: 0; flex-grow: 1; text-align: center; }
#boq-modal .modal-close { position: static; margin-left: 0; flex-shrink: 0; }
#boq-modal .modal-box > h3 { display: none; }

.boq-content-wrapper { padding: 0 25px 25px; }
.boq-section { margin-top:15px; padding:12px 10px; border-radius:12px; background:#111; border:1px solid #333; }
.boq-section-title { font-weight:bold; color:#f4920e; margin-bottom:8px; font-size:0.95rem; }
.boq-field { margin-bottom:8px; display:flex; flex-direction:column; gap:4px; }
.boq-field label { font-size:0.9rem; color:#ccc; }
.boq-field input, .boq-field select, .boq-field textarea { background:#0f0f0f; border:1px solid #444; border-radius:8px; padding:8px 10px; color:#fff; font-size:0.9rem; }
.boq-field textarea { resize:vertical; min-height:50px; }
.boq-inline { display:flex; gap:8px; } .boq-inline .boq-field { flex:1; }
.boq-room-block, .boq-item-block { margin-top:8px; padding:8px 10px; border-radius:8px; background:#151515; border:1px solid #333; font-size:0.9rem; }
.boq-room-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; color:#eee; font-weight:bold; }
.boq-master-options { margin-top:6px; display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:0.85rem; }
.boq-footer-actions { margin-top:14px; display:flex; justify-content:center; align-items:center; gap:10px; flex-wrap:wrap; }
.boq-submit-btn { background:#f4920e; color:#000; border:none; padding:10px 20px; border-radius:999px; cursor:pointer; font-weight:bold; font-size:1rem; width: auto; }
.boq-skip-btn { background:transparent; border:none; color:#aaa; cursor:pointer; font-size:0.85rem; text-decoration:underline; }

.boq-checkboxes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.boq-checkbox-label { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #222; border-radius: 6px; cursor: pointer; border: 1px solid #333; transition: 0.2s; font-size: 0.9rem; }
.boq-checkbox-label:hover { background: #333; }
.boq-checkbox-label input[type="checkbox"] { accent-color: #f4920e; width: 16px; height: 16px; flex-shrink: 0; }

/* typing */
.typing-dots { display:flex; align-items:center; justify-content:center; gap:4px; padding:8px 0; }
.typing-dots span { width:6px; height:6px; border-radius:50%; background:#f4920e; opacity:0.2; /* animation: typingBlink 1s infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */ }
.typing-dots span:nth-child(2){ animation-delay:0.2s; } .typing-dots span:nth-child(3){ animation-delay:0.4s; }
/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ typingBlink { 0%,80%,100%{ transform:translateY(0); opacity:0.2; } 40%{ transform:translateY(-3px); opacity:1; } }

/* Fly animation */
.fly-img-clone { position: fixed; z-index: 100000; border-radius: 50%; border: 2px solid #f4920e; pointer-events: none; transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1); box-shadow: 0 0 15px #f4920e; }
.badge-pop { /* animation: badgePop 0.3s ease; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */ }
/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ badgePop { 0% { transform: scale(1); } 50% { transform: scale(1.4); color: #f4920e; } 100% { transform: scale(1); } }

/* Saved msg */
#saved-msg-modal .modal-box { max-width:700px; max-height: 85vh; display: flex; flex-direction: column; overflow: hidden; padding: 25px; position: relative; }
#saved-msg-modal .modal-close { position: absolute; top: 15px; right: 15px; z-index: 10; }
#saved-msg-modal .modal-box > h3 { position: sticky; top: 0; z-index: 9; background: #1c1c1c; padding: 15px 0 10px; margin: 0 0 20px; border-bottom: 1px solid rgba(244, 146, 14, 0.3); }
#saved-msg-content { flex-grow: 1; overflow-y: auto; padding: 20px; background: rgba(30, 30, 30, 0.5); border-radius: 12px; border: 1px solid rgba(244, 146, 14, 0.1); width: 100%; }

/* Mobile tweaks - Keep same design as desktop */
@media (max-width: 480px) {
  body { font-size: 16px; }
  .chat-body { padding: 0 20px 24px !important; }
  .message { max-width: 85% !important; font-size: 1.05rem !important; padding: 16px 20px !important; }
  .plan-card { width: 100%; margin-bottom: 15px; min-height: auto; }
  .auth-box { padding: 24px 20px !important; }
  #view-auth .auth-box { 
    padding: 28px 20px !important; 
    margin: 15px auto !important;
    max-height: calc(100vh - 30px) !important;
  }
  .boq-checkboxes-grid { grid-template-columns: 1fr; }
  .boq-modal-header { padding: 12px 15px; }
  .boq-header-title { font-size: 1.2rem; }
  .boq-content-wrapper { padding: 0 15px 20px; }
  
  /* تحسين زر الإغلاق على الشاشات الصغيرة */
  #view-auth .modal-close {
    top: 10px !important;
    left: 10px !important;
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
    min-width: 50px !important;
    min-height: 36px !important;
  }
}


/* ==========================================================
   ✅ BOH PATCH (UI polish + Plans tables + Mobile sidebar scroll)
   (Added without removing any existing styles)
========================================================== */

/* ---- Plans: Features tables (toggle button + hidden by default) ---- */
.boh-features-toggle-row {
  width: 100%;
  max-width: 1200px;
  margin: -8px auto 24px;
  display: flex;
  justify-content: center;
}
.boh-features-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  color: #f4920e;
  background: linear-gradient(145deg, rgba(244, 146, 14, 0.15), rgba(244, 146, 14, 0.06));
  border: 2px solid rgba(244, 146, 14, 0.4);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.boh-features-toggle-btn:hover {
  background: linear-gradient(145deg, rgba(244, 146, 14, 0.25), rgba(244, 146, 14, 0.12));
  border-color: rgba(244, 146, 14, 0.6);
  transform: translateY(-1px);
}
.boh-features-toggle-icon {
  font-size: 0.75em;
  transition: transform 0.25s ease;
}
.boh-features-toggle-btn[aria-expanded="true"] .boh-features-toggle-icon { transform: rotate(0deg); }
.boh-features-toggle-btn[aria-expanded="false"] .boh-features-toggle-icon { transform: rotate(-90deg); }

.boh-features-wrap.boh-features-wrap-hidden {
  display: none !important;
}

.boh-features-wrap{
  width: 100%;
  max-width: 1200px;
  margin: 30px auto 40px;
  padding: 32px 28px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(20, 20, 20, 0.95), rgba(15, 15, 15, 0.98));
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: visible;
  display: block;
}

.boh-features-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(244, 146, 14, 0.6), transparent);
  opacity: 0.6;
}

.boh-features-head{ 
  text-align: center; 
  margin-bottom: 40px;
  padding: 30px 20px;
  background: linear-gradient(145deg, 
    rgba(50, 50, 55, 0.6) 0%, 
    rgba(45, 45, 50, 0.7) 100%
  );
  border-radius: 24px;
  border: 1.5px solid rgba(244, 146, 14, 0.3);
  /* backdrop-filter: blur(20px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(20px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.boh-features-head::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(244, 146, 14, 0.7), 
    rgba(244, 146, 14, 1),
    rgba(244, 146, 14, 0.7),
    transparent
  );
  /* تم إلغاء animation البطيء */
  opacity: 0;
}

.boh-features-title{
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f4920e 0%, #ffaa33 50%, #ffb14a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  /* animation: featuresTitleGradient 3s ease infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
  margin-bottom: 16px;
  letter-spacing: -0.6px;
  position: relative;
  z-index: 1;
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ featuresTitleGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.boh-features-sub{
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
  position: relative;
  z-index: 1;
  margin-top: 0;
  font-weight: 400;
}
.boh-features-table-wrapper{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin-top: 12px;
}
.boh-features-table,
.boh-features-detail{
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(20,20,20,0.7);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
}
.boh-features-table thead th,
.boh-features-detail thead th{
  background: rgba(244,146,14,0.12);
  color: #fff;
  font-weight: 900;
  font-size: 0.92rem;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: right;
}
.boh-features-table td,
.boh-features-detail td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
  vertical-align: top;
}
.boh-features-table tbody tr:hover td,
.boh-features-detail tbody tr:hover td{
  background: rgba(255,255,255,0.03);
}
.boh-features-table .feat-col{ width: 44%; }
.boh-features-table .plan-col{ width: 18.666%; text-align:center; }
.boh-features-table td.ok{ text-align:center; font-weight: 900; color: #e9ffe2; }
.boh-features-table td.lock{ text-align:center; font-weight: 900; color: rgba(255,255,255,0.65); }
.boh-features-detail .sec-title{
  font-weight: 900;
  color: #f4920e;
  width: 30%;
  white-space: nowrap;
}
.boh-features-detail ul{
  margin: 0;
  padding: 0 18px 0 0;
  line-height: 1.9;
}
.boh-features-detail li{ margin: 2px 0; }
.boh-features-note{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(244,146,14,0.18);
  color: rgba(255,255,255,0.82);
  font-size: 0.9rem;
}
.boh-features-note span{ color:#f4920e; font-weight: 900; }


/* ---- Plans: BOH feature cards (6 cards grid) ---- */
.boh-cards-grid{
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}
@media (max-width: 980px){
  .boh-cards-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px){
  .boh-cards-grid{ grid-template-columns: 1fr; }
}
.boh-feature-card{
  border-radius: 16px;
  padding: 14px 14px 12px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(244,146,14,0.22);
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.boh-feature-card:hover{
  transform: translateY(-2px);
  border-color: rgba(244,146,14,0.45);
  background: rgba(244,146,14,0.06);
}
.boh-card-title{
  display:flex;
  align-items:center;
  gap: 8px;
  font-weight: 900;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 10px;
}
.boh-card-emoji{
  font-size: 1.15rem;
  line-height: 1;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.35));
}
.boh-card-list{
  margin: 0;
  padding: 0 18px 0 0;
  line-height: 1.9;
  color: rgba(255,255,255,0.82);
  font-size: 0.95rem;
}
.boh-card-list li{ margin: 2px 0; }

/* ---- Premium model switching (fast + professional) ---- */
#boh-model-switch-fx{
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px) scale(0.985);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 160ms ease, transform 220ms cubic-bezier(.2,.9,.2,1);
}
#boh-model-switch-fx.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.boh-ms-card{
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(244,146,14,0.35);
  background: rgba(15,15,15,0.78);
  box-shadow: 0 14px 38px rgba(0,0,0,0.55);
  /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
}
.boh-ms-ico{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: radial-gradient(circle at 30% 30%, rgba(244,146,14,0.28), rgba(244,146,14,0.10));
  border: 1px solid rgba(244,146,14,0.22);
}
.boh-ms-kicker{
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  margin-bottom: 2px;
}
.boh-ms-name{
  font-weight: 900;
  letter-spacing: 0.2px;
  color: #fff;
  font-size: 14px;
}

@media (max-width: 900px){
  #boh-model-switch-fx{ top: 12px; }
  .boh-ms-card{ border-radius: 14px; padding: 9px 12px; }
  .boh-ms-ico{ width: 36px; height: 36px; border-radius: 11px; }
  .boh-ms-name{ font-size: 13px; }
}
/* ---- Message bubbles: tighter frames + animation ---- */
/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ bohMsgIn{
  from{ opacity: 0; transform: translateY(10px) scale(0.985); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}
.message{
  width: fit-content;
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 14px;
  /* animation: bohMsgIn .1s ease-out; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}
@media (max-width: 900px){
  .message{ max-width: 85% !important; padding: 16px 20px !important; }
}

/* ---- Image Frame Wrapper (Super Boh & Nano Banana) ---- */
/* Image frame removed - no black frame around images */

/* ---- Image replies: smaller + premium frame, tap to zoom stays ---- */
.chat-img-bot{
  width: min(520px, 100%);
  max-width: 520px;
  max-height: 420px;
  border: none;
  border-radius: 14px;
  display: block;
  cursor: pointer !important;
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.08s ease;
  object-fit: contain;
  /* animation: imageSlideIn 0.15s ease-out; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
  pointer-events: auto !important;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ imageSlideIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.chat-img-bot:hover{
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(244,146,14,0.15);
}

@media (max-width: 900px){
  .chat-img-bot{ 
    width: min(340px, 100%); 
    max-width: 340px; 
  }
  .image-frame{
    padding: 6px;
  }
}

/* ---- Bot action buttons under images: smaller + more consistent ---- */
.bot-action-btn{
  padding: 6px 12px;
  font-size: 0.88rem;
  gap: 6px;
}
.bot-action-btn svg{ width: 14px; height: 14px; }

/* ---- Mobile: make the whole sidebar scrollable (archive swipe up/down) ---- */
@media (max-width: 900px){
  .side-panel{
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .history-list{
    overflow: visible;
  }
}


/* =========================================================
   2025-12 UI Refresh (Plans + Animations + Unified Errors)
========================================================= */

/* Smooth view transitions */
#boh-ai-app .boh-view{
  opacity:0;
  transform: translateY(8px) scale(0.995);
  /* ✅ تحسين الأداء */
  /* will-change: opacity, transform; */ /* تم إزالة will-change لتحسين الأداء */
  transition: none;
}
#boh-ai-app .boh-view.active{
  opacity:1;
  transform: translateY(0) scale(1);
}

/* Subtle message reveal */
.message{
  /* animation: msgIn 40ms ease both; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}
/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ msgIn{
  from{ opacity:0; transform: translateY(4px); }
  to{ opacity:1; transform: translateY(0); }
}

/* Mode label micro-animation */
.mode-flash{
  /* animation: modeFlash 100ms ease; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}
/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ modeFlash{
  0%{ transform: translateY(0); filter: brightness(1); }
  35%{ transform: translateY(-1px); filter: brightness(1.08); }
  100%{ transform: translateY(0); filter: brightness(1); }
}

/* Unified error blocks */
.uerr{
  border: 1px solid rgba(244,146,14,0.35);
  background: rgba(16,16,16,0.85);
  border-radius: 16px;
  padding: 14px 14px;
  line-height: 1.7;
}
.uerr__title{
  font-weight: 800;
  margin-bottom: 6px;
  color: #f4920e;
}
.uerr__text{
  color: rgba(255,255,255,0.86);
  font-size: 0.95rem;
}
.uerr--nopoints{
  border-color: rgba(244,146,14,0.55);
}
.uerr--system{
  border-color: rgba(244,146,14,0.35);
}

/* Buy points button (modern) */
.points-buy-btn{
  margin-top: 10px;
  border: 1px solid #f4920e;
  background: rgba(244,146,14,0.12);
  color: #f4920e;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: none;
}
.points-buy-btn:hover{
  transform: translateY(-1px);
  background: rgba(244,146,14,0.18);
}
.points-buy-btn:active{ transform: translateY(0); opacity: 0.92; }

/* Image action buttons (modern, compact) */
.bot-action-row{
  display:flex;
  gap:10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.bot-action-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.bot-action-btn svg{ opacity: 0.95; }
.bot-action-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.18);
}
.bot-action-btn.primary{
  background: rgba(244,146,14,0.16);
  border-color: rgba(244,146,14,0.55);
  color: #ffd7a6;
}
.bot-action-btn.primary:hover{
  background: rgba(244,146,14,0.22);
  border-color: rgba(244,146,14,0.70);
}

/* -------------------------
   Plans Screen (new layout)
------------------------- */
.plans-shell{
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 22px 12px 30px;
  display:flex;
  flex-direction: column;
  gap: 18px;
}
.plans-hero{
  padding: 18px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.10);
  background: radial-gradient(900px 300px at 10% 0%, rgba(244,146,14,0.14), rgba(0,0,0,0) 60%),
              radial-gradient(900px 400px at 100% 0%, rgba(255,255,255,0.05), rgba(0,0,0,0) 55%),
              rgba(18,18,18,0.55);
}
.hero-kicker{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244,146,14,0.40);
  background: rgba(244,146,14,0.10);
  color: #f4920e;
  font-weight: 900;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.hero-title{
  margin: 0 0 8px 0;
  font-size: 1.6rem;
  letter-spacing: 0.2px;
}
.hero-sub{
  margin: 0;
  color: rgba(255,255,255,0.78);
  line-height: 1.8;
}
.hero-badges{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.hero-badge{
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.90);
  font-weight: 800;
  font-size: 0.82rem;
}

.plan-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.plan-card2{
  border-radius: 20px;
  padding: 16px 16px 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(20,20,20,0.65);
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.plan-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.plan-name{
  font-weight: 950;
  letter-spacing: 0.2px;
  font-size: 1.15rem;
}
.plan-tag{
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.86);
  font-weight: 900;
  white-space: nowrap;
}
.plan-tag.hot{
  border-color: rgba(244,146,14,0.55);
  background: rgba(244,146,14,0.13);
  color: #ffd7a6;
}
.plan-tag.outline{
  border-style: dashed;
  border-color: rgba(244,146,14,0.45);
  background: rgba(244,146,14,0.06);
  color: rgba(255,255,255,0.88);
}
.plan-points{
  color: rgba(255,255,255,0.78);
  font-weight: 800;
  font-size: 0.92rem;
}
.plan-feats{
  margin: 0;
  padding: 0 18px 0 0;
  color: rgba(255,255,255,0.85);
  line-height: 1.9;
  font-size: 0.92rem;
}
.plan-feats li{ margin: 0; }
.plan-cta{
  margin-top: 4px;
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(244,146,14,0.40);
  background: rgba(244,146,14,0.10);
  color: #f4920e;
  font-weight: 950;
  padding: 11px 12px;
  cursor:pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.plan-cta:hover{
  transform: translateY(-1px);
  background: rgba(244,146,14,0.16);
  border-color: rgba(244,146,14,0.60);
}
.plan-cta.primary{
  background: rgba(244,146,14,0.18);
  border-color: rgba(244,146,14,0.72);
  color: #ffd7a6;
}

.section-title{
  font-weight: 950;
  font-size: 1.08rem;
  margin-top: 4px;
}
.section-sub{
  margin-top: 6px;
  color: rgba(255,255,255,0.72);
  font-size: 0.92rem;
}

.compare-table-wrap{
  margin-top: 10px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
}
.compare-table{
  width: 100%;
  border-collapse: collapse;
  background: rgba(18,18,18,0.55);
}
.compare-table th,
.compare-table td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}
.compare-table th:first-child,
.compare-table td:first-child{
  text-align: right;
}
.compare-table thead th{
  color: rgba(255,255,255,0.92);
  font-weight: 950;
  background: rgba(255,255,255,0.04);
}
.compare-table .ok{ color: #9be26f; font-weight: 950; }
.compare-table .lock{ color: rgba(255,255,255,0.55); }

.value-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 12px;
}
.value-card{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(20,20,20,0.55);
  border-radius: 18px;
  padding: 14px 14px;
}
.value-ico{
  font-size: 1.3rem;
  margin-bottom: 6px;
}
.value-title{
  font-weight: 950;
  margin-bottom: 6px;
}
.value-card ul{
  margin: 0;
  padding: 0 18px 0 0;
  color: rgba(255,255,255,0.82);
  line-height: 1.9;
}

.plans-foot{
  margin-top: 4px;
  color: rgba(255,255,255,0.78);
  font-size: 0.92rem;
}
.plans-foot .muted{ color: rgba(255,255,255,0.55); }

/* Responsive */
@media (max-width: 950px){
  .plan-grid{ grid-template-columns: 1fr; }
  .value-grid{ grid-template-columns: 1fr; }
}


/* Premium loader (replaces cube) */
.boh-view--loading{
  background: radial-gradient(circle at 50% 20%, rgba(244,146,14,0.12), transparent 45%),
              radial-gradient(circle at 20% 80%, rgba(255,255,255,0.05), transparent 55%),
              linear-gradient(180deg, #000 0%, #070707 100%);
}
.boh-loader-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 14px;
}
.boh-loader{
  width: 92px;
  height: 92px;
  display:grid;
  place-items:center;
  position: relative;
}
.boh-loader-ring{
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.10);
  border-top-color: rgba(244,146,14,0.95);
  /* animation: bohSpin 200ms linear infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
  box-shadow: 0 18px 40px rgba(0,0,0,0.65);
}
/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ bohSpin{ to{ transform: rotate(360deg); } }

.boh-loader-line{
  position:absolute;
  bottom: -8px;
  width: 120px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow:hidden;
  border: 1px solid rgba(244,146,14,0.15);
}
.boh-loader-line span{
  display:block;
  height:100%;
  width: 42%;
  border-radius: 999px;
  background: rgba(244,146,14,0.9);
  /* animation: bohLine 300ms ease-in-out infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}
/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ bohLine{
  0%{ transform: translateX(-115%); opacity: .35; }
  35%{ opacity: 1; }
  100%{ transform: translateX(250%); opacity: .55; }
}

.boh-loader-title{
  margin: 0;
  color:#f4920e;
  font-size: 1.25rem;
  letter-spacing: .3px;
}
.boh-loader-sub{
  color: rgba(255,255,255,0.70);
  font-size: 0.95rem;
}


.plans-topbar .extra-btn:hover{ background: rgba(244,146,14,0.14); transform: translateY(-1px); }
.plans-topbar .extra-btn svg{ stroke: currentColor; fill: none; }
.plans-topbar .extra-btn svg path{ fill: currentColor; }


/* ==========================================================
   ✅ Comparison Table (Professional Grid)
========================================================== */
.boh-features-table-wrapper{ width:100%; overflow:auto; }
.boh-compare-table{
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  table-layout: fixed;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(244,146,14,0.35);
  border-radius: 14px;
  overflow: hidden;
}
.boh-compare-table thead th{
  background: rgba(244,146,14,0.10);
  color: #fff;
  font-weight: 900;
  padding: 12px 12px;
  border: 1px solid rgba(244,146,14,0.35);
}
.boh-compare-table td{
  padding: 10px 12px;
  border: 1px solid rgba(244,146,14,0.25);
  vertical-align: middle;
}
.boh-compare-table .col-feature{ text-align: right; font-weight: 800; color:#fff; }
.boh-compare-table .col-plan{ text-align: center; width: 140px; }
.boh-compare-table .cell-ok{ text-align:center; font-weight: 900; color: #e9ffe2; }
.boh-compare-table .cell-lock{ text-align:center; font-weight: 900; color: rgba(255,255,255,0.65); }
.boh-compare-table tbody tr:nth-child(even){ background: rgba(255,255,255,0.03); }
.boh-compare-table .row-sep td{ border-top: 2px solid rgba(244,146,14,0.35); }

/* Mobile: keep readable */
@media (max-width: 768px){
  .boh-compare-table{ min-width: 560px; }
}

/* ==========================================================
   ✅ Unified Action Buttons (Images + BOQ)
========================================================== */
.boh-action-buttons{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
  justify-content: flex-start;
}

/* Image Actions Container (for Super Boh & Nano Banana) */
.image-actions-container{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 4px;
  /* animation: buttonsFadeIn 0.5s ease-out 0.2s both; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ buttonsFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.boh-action-btn{
  display: inline-flex;
  flex-direction: row-reverse; /* text aligned right in RTL */
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 14px;
  border: 1.5px solid rgba(244,146,14,0.5);
  background: linear-gradient(145deg, rgba(244,146,14,0.15), rgba(244,146,14,0.08));
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  text-shadow: 0 0 10px rgba(255,255,255,0.25);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  width: auto;
  min-width: fit-content;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2),
              0 0 0 0 rgba(244,146,14,0.3);
  transition: none;
  position: relative;
  overflow: hidden;
}

.boh-action-btn:visited{
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}

.boh-action-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transform: translate(-50%, -50%);
  transition: none;
}

.boh-action-btn:hover::before {
  width: 300px;
  height: 300px;
}

.boh-action-btn:hover{ 
  background: linear-gradient(145deg, rgba(244,146,14,0.25), rgba(244,146,14,0.15));
  border-color: rgba(244,146,14,0.75);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(244,146,14,0.3),
              0 0 0 4px rgba(244,146,14,0.1);
}

.boh-action-btn:active{ 
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(244,146,14,0.2);
}

.boh-action-btn:focus{ 
  outline: none; 
  box-shadow: 0 0 0 3px rgba(244,146,14,0.25);
}

.boh-action-btn.primary{
  background: linear-gradient(145deg, rgba(244,146,14,0.25), rgba(244,146,14,0.15));
  border-color: rgba(244,146,14,0.8);
  color: rgba(255,255,255,0.9);
  font-weight: 900;
  box-shadow: 0 4px 16px rgba(244,146,14,0.25),
              0 0 0 0 rgba(244,146,14,0.4);
  /* animation: primaryPulse 2s ease-in-out infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ primaryPulse {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(244,146,14,0.25),
                0 0 0 0 rgba(244,146,14,0.4);
  }
  50% {
    box-shadow: 0 4px 16px rgba(244,146,14,0.35),
                0 0 0 4px rgba(244,146,14,0.2);
  }
}

.boh-action-btn.primary:hover{
  background: linear-gradient(145deg, rgba(244,146,14,0.35), rgba(244,146,14,0.25));
  border-color: rgba(244,146,14,0.95);
  color: #fff;
  animation: none;
  box-shadow: 0 6px 24px rgba(244,146,14,0.4),
              0 0 0 4px rgba(244,146,14,0.15);
}

.boh-action-btn svg{
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.boh-action-btn:hover svg {
  transform: scale(1.1);
}

@media (max-width: 900px){
  .image-actions-container{
    gap: 8px;
    margin-top: 10px;
  }
  .boh-action-btn{
    padding: 7px 12px;
    font-size: 0.82rem;
  }
  .boh-action-btn svg{
    width: 14px;
    height: 14px;
  }
}




/* ✅ Comparison Cards - Premium Professional Design */
/* ============================================================
   لوجو Boh - تصميم عصري
   ============================================================ */

/* ============================================================
   لوجو Boh - تصميم عصري محسّن مع تأثيرات بصرية متقدمة
   ============================================================ */

.boh-logo-section {
  text-align: center;
  margin-bottom: 40px;
}
.boh-rotating-tagline {
  min-height: 52px;
  margin-top: 20px;
  font-size: 1.05rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.boh-rotating-tagline.tagline-enter {
  animation: boh-tagline-enter 0.7s ease-out forwards;
}
.boh-rotating-tagline.tagline-exit {
  animation: boh-tagline-exit 0.6s ease-in forwards;
}
@keyframes boh-tagline-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes boh-tagline-exit {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* لوجو Boh - الشكل الأصلي */
.boh-logo-link {
  display: inline-block;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.boh-logo-link:hover {
  opacity: 0.9;
}

.boh-logo-header,
.boh-logo-plans {
  max-width: 180px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.boh-compare-cards{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin: 30px 0 40px;
  max-width: 1200px;
  width: 100%;
}

/* ============================================================
   كروت المقارنة - تصميم جديد تماماً (برتقالي + رمادي)
   ============================================================ */

.plan-compare-card{
  background: linear-gradient(145deg, 
    rgba(50, 50, 55, 0.98) 0%, 
    rgba(45, 45, 50, 0.96) 50%,
    rgba(40, 40, 45, 0.98) 100%
  );
  border: 2px solid rgba(244, 146, 14, 0.35);
  border-radius: 28px;
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(244, 146, 14, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.08),
    inset 0 -2px 0 rgba(244, 146, 14, 0.1);
  transition: none;
  /* backdrop-filter: blur(30px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(30px) saturate(180%); */ /* تم إزالة blur لتحسين الأداء */
}

.plan-compare-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(244, 146, 14, 0.12) 0%, transparent 70%);
    opacity: 0;
    transition: none;
    pointer-events: none;
}

.plan-compare-card:hover::after {
    opacity: 1;
}

.plan-compare-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(244, 146, 14, 0.7), 
    rgba(244, 146, 14, 1),
    rgba(244, 146, 14, 0.7),
    transparent
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  /* تم إلغاء animation البطيء */
  opacity: 0;
}

.plan-compare-card:hover {
  transform: translateY(-6px);
  border-color: rgba(244, 146, 14, 0.6);
  box-shadow: 
    0 24px 64px rgba(0, 0, 0, 0.7),
    0 0 0 2px rgba(244, 146, 14, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 0 rgba(244, 146, 14, 0.15);
  background: linear-gradient(145deg, 
    rgba(55, 55, 60, 0.98) 0%, 
    rgba(50, 50, 55, 0.96) 50%,
    rgba(45, 45, 50, 0.98) 100%
  );
}

.plan-compare-card:hover::before {
  opacity: 1;
}

.plan-compare-card.plan-pro {
  border-color: rgba(244, 146, 14, 0.5);
  background: linear-gradient(145deg, 
    rgba(244, 146, 14, 0.18) 0%, 
    rgba(244, 146, 14, 0.12) 50%,
    rgba(200, 120, 20, 0.15) 100%
  );
}

.plan-compare-card.plan-pro::before {
  background: linear-gradient(90deg, 
    transparent, 
    rgba(244, 146, 14, 0.8), 
    rgba(244, 146, 14, 1),
    rgba(244, 146, 14, 0.8),
    transparent
  );
}

.plan-compare-card.plan-pro:hover {
  border-color: rgba(244, 146, 14, 0.8);
  box-shadow: 
    0 24px 64px rgba(244, 146, 14, 0.4),
    0 0 0 2px rgba(244, 146, 14, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.15),
    inset 0 -2px 0 rgba(244, 146, 14, 0.2);
  background: linear-gradient(145deg, 
    rgba(244, 146, 14, 0.25) 0%, 
    rgba(244, 146, 14, 0.18) 50%,
    rgba(200, 120, 20, 0.22) 100%
  );
}

.plan-compare-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(244, 146, 14, 0.2);
}

.plan-compare-title{
  font-weight: 800;
  background: linear-gradient(135deg, #f4920e 0%, #ffaa33 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.6rem;
  letter-spacing: -0.6px;
  position: relative;
}

.plan-compare-card.plan-pro .plan-compare-title {
  background: linear-gradient(135deg, #f4920e 0%, #ffaa33 50%, #ffb14a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(244, 146, 14, 0.5));
}

.plan-compare-badge{
  border: 2px solid rgba(244, 146, 14, 0.5);
  color: #ffaa33;
  background: linear-gradient(135deg, 
    rgba(244, 146, 14, 0.2) 0%, 
    rgba(244, 146, 14, 0.12) 100%
  );
  border-radius: 14px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 
    0 4px 16px rgba(244, 146, 14, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
}

.plan-compare-badge.pro{
  background: linear-gradient(135deg, 
    rgba(244, 146, 14, 0.3) 0%, 
    rgba(244, 146, 14, 0.18) 100%
  );
  border-color: rgba(244, 146, 14, 0.7);
  color: #fff;
  box-shadow: 
    0 6px 20px rgba(244, 146, 14, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.plan-compare-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.plan-compare-item{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  line-height: 1.6;
  padding: 10px 0;
  transition: all 0.15s ease;
}

.plan-compare-item:hover {
  transform: translateX(-4px);
}

.plan-compare-icon{
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.plan-compare-item:not(.locked) .plan-compare-icon {
  color: #22c55e;
  background: linear-gradient(135deg, 
    rgba(34, 197, 94, 0.2) 0%, 
    rgba(34, 197, 94, 0.15) 100%
  );
  text-shadow: 
    0 0 12px rgba(34, 197, 94, 0.6),
    0 0 20px rgba(34, 197, 94, 0.3);
  border: 1.5px solid rgba(34, 197, 94, 0.3);
  box-shadow: 
    0 0 8px rgba(34, 197, 94, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.plan-compare-item.locked .plan-compare-icon,
.plan-compare-item.locked .locked-icon {
  color: #ff3333;
  background: linear-gradient(135deg, 
    rgba(255, 51, 51, 0.2) 0%, 
    rgba(255, 68, 68, 0.15) 100%
  );
  font-size: 1.4rem;
  font-weight: 900;
  text-shadow: 
    0 0 15px rgba(255, 51, 51, 0.7),
    0 0 25px rgba(255, 51, 51, 0.4);
  position: relative;
  border: 1.5px solid rgba(255, 51, 51, 0.4);
  box-shadow: 
    0 0 10px rgba(255, 51, 51, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.plan-compare-item.locked .plan-compare-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 2px;
  height: 18px;
  background: #ff4444;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.6);
}

.plan-compare-item.locked .plan-compare-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  width: 2px;
  height: 18px;
  background: #ff4444;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.6);
}

.plan-compare-text{
  flex: 1;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.8;
  transition: none;
  text-align: right;
  padding-right: 4px;
}

.plan-compare-item.locked .plan-compare-text{
  color: rgba(255, 255, 255, 0.5);
  opacity: 0.7;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 51, 51, 0.5);
  text-decoration-thickness: 2px;
}

@media (max-width: 820px){
  .boh-compare-cards{
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .plan-compare-card {
    padding: 24px 20px;
  }
  
  .plan-compare-title {
    font-size: 1.25rem;
  }
}



/* ==========================================================
   ✅ Super Boh + BOQ PDF (Added)
   (Super Boh button uses normal styling — no fixed highlight)
========================================================== */
/* ============================================================
   عناصر النوافذ العامة - تصميم عصري جديد (برتقالي + رمادي)
   ============================================================ */

.modal-note{
  background: linear-gradient(145deg, 
    rgba(244, 146, 14, 0.15) 0%, 
    rgba(244, 146, 14, 0.08) 100%
  );
  border: 1.5px solid rgba(244, 146, 14, 0.35);
  padding: 14px 16px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  margin: 16px 0;
  /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.modal-bullets{
  margin: 16px 0;
  padding: 0 24px 0 0;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.85);
  list-style-type: disc;
}

.modal-bullets li{ 
  margin: 10px 0;
  color: rgba(255, 255, 255, 0.8);
}

.modal-bullets .modal-strong{
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(145deg, 
    rgba(244, 146, 14, 0.15) 0%, 
    rgba(244, 146, 14, 0.08) 100%
  );
  border: 1.5px solid rgba(244, 146, 14, 0.3);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

.modal-actions.row{
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions.row .enter-btn{ 
  flex: 1; 
}

.boq-pdf-box{ max-width: 860px; width: 95%; }
.pdf-form-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.pdf-field.full{ grid-column: 1 / -1; }
.pdf-field label{
  display:block;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.85);
  font-weight: 700;
}
.pdf-logo-preview{
  margin-top: 8px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(244,146,14,0.25);
  background: rgba(0,0,0,0.25);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.pdf-logo-preview img{ height: 44px; max-width: 100%; object-fit: contain; }

.pdf-templates{ margin-top: 14px; }
.pdf-templates-title{
  color:#f4920e;
  font-weight: 900;
  margin: 8px 0 10px;
}
.pdf-template-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px){
  .pdf-form-grid{ grid-template-columns: 1fr; }
  .pdf-template-grid{ grid-template-columns: 1fr; }
}
.pdf-template-card{
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  padding: 12px 12px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  color: #fff;
}
.pdf-template-card:hover{
  transform: translateY(-2px);
  border-color: rgba(244,146,14,0.45);
}
.pdf-template-card.active{
  border-color: rgba(244,146,14,0.65);
  background: rgba(244,146,14,0.08);
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
}
.pt-title{ font-weight: 900; }
.pt-sub{ color: rgba(255,255,255,0.70); margin-top: 2px; font-size: 0.9rem; }

/* PDF render sheet (captured by html2canvas) */
.pdf-sheet{
  width: 794px; /* A4 @ 96dpi approx */
  min-height: 1123px;
  background: #ffffff;
  color: #111;
  box-sizing: border-box;
  padding: 46px 46px 54px;
  font-family: Cairo, "Segoe UI", Tahoma, Arial, sans-serif;
}
.pdf-sheet *{ box-sizing: border-box; }
.pdf-header{
  display:flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.pdf-logo-box{
  width: 140px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}
.pdf-logo-box img{ max-width: 100%; max-height: 100%; object-fit: contain; }
.pdf-meta{
  text-align: right;
  flex: 1;
}
.pdf-meta .pdf-company{ font-weight: 900; font-size: 18px; }
.pdf-meta .pdf-client{ margin-top: 4px; font-size: 14px; color:#333; }
.pdf-meta .pdf-date{ margin-top: 2px; font-size: 13px; color:#444; }
.pdf-title{
  margin: 10px 0 12px;
  font-weight: 900;
  font-size: 18px;
}
.pdf-text{
  font-size: 13px;
  line-height: 1.7;
  color: #222;
  margin: 0 0 12px;
  white-space: pre-wrap;
}
.pdf-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.pdf-table th, .pdf-table td{
  border: 1px solid rgba(0,0,0,0.12);
  padding: 8px 8px;
  vertical-align: top;
}
.pdf-table th{
  font-weight: 900;
}
.pdf-footer-note{
  margin-top: 14px;
  font-size: 12px;
  color: #222;
  white-space: pre-wrap;
}

/* Themes */
.pdf-theme-t1 .pdf-bar{ height: 10px; border-radius: 999px; background: #f4920e; margin-bottom: 14px; }
.pdf-theme-t1 .pdf-table th{ background: rgba(244,146,14,0.10); }

.pdf-theme-t2{
  background: #0b0f18;
  color: #fff;
}
.pdf-theme-t2 .pdf-text, .pdf-theme-t2 .pdf-footer-note{ color: rgba(255,255,255,0.88); }
.pdf-theme-t2 .pdf-meta .pdf-client, .pdf-theme-t2 .pdf-meta .pdf-date{ color: rgba(255,255,255,0.78); }
.pdf-theme-t2 .pdf-bar{ height: 12px; border-radius: 12px; background: linear-gradient(135deg, #f4920e, #ffb14a); margin-bottom: 14px; }
.pdf-theme-t2 .pdf-table th, .pdf-theme-t2 .pdf-table td{ border-color: rgba(255,255,255,0.14); }
.pdf-theme-t2 .pdf-table th{ background: rgba(244,146,14,0.12); }
.pdf-theme-t2 .pdf-table td{ color: rgba(255,255,255,0.92); }

.pdf-theme-t3 .pdf-bar{ height: 12px; border-radius: 12px; background: #091a4a; margin-bottom: 14px; }
.pdf-theme-t3 .pdf-table th{ background: rgba(9,26,74,0.08); }


/* ==========================================================
   ✅ PDF Enhancements (Header/Footer separators + Pro look)
========================================================== */

.pdf-sheet{
  display:flex;
  flex-direction:column;
}
.pdf-sep{
  height: 1px;
  width: 100%;
  background: rgba(0,0,0,0.10);
  margin: 14px 0;
}
.pdf-sep-header{ margin-top: 10px; margin-bottom: 18px; }
.pdf-sep-footer{ margin-top: 18px; margin-bottom: 12px; }

.pdf-title{
  letter-spacing: 0.5px;
}
.pdf-table{
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
}
.pdf-table tbody tr:nth-child(even){
  background: rgba(0,0,0,0.02);
}
.pdf-theme-t2 .pdf-sep{ background: rgba(255,255,255,0.18); }
.pdf-theme-t3 .pdf-sep{ background: rgba(9,26,74,0.18); }
.pdf-theme-t2 .pdf-table tbody tr:nth-child(even){
  background: rgba(255,255,255,0.04);
}
.pdf-theme-t3 .pdf-table tbody tr:nth-child(even){
  background: rgba(9,26,74,0.03);
}


/* ==========================================================
   ✅ Graduation Project Modal (Banner)
========================================================== */

.modal-wide{
  width: min(1120px, 98vw);
}
.grad-form{ margin-top: 10px; }
.grad-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grad-span2{ grid-column: span 2; }
.grad-field{
  display:flex;
  flex-direction:column;
  gap: 6px;
}
.grad-field > span{
  font-weight: 700;
  color: rgba(255,255,255,0.88);
}
.grad-field input, .grad-field textarea, .grad-count{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  outline: none;
}
.grad-field textarea{ resize: vertical; min-height: 90px; }
.grad-notes{ margin-top: 14px; }

#grad-notes{
  width: 100%;
  min-height: 180px;
  resize: vertical;
}

.grad-sections{ margin-top: 14px; display:flex; flex-direction:column; gap: 12px; }
.grad-section{
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
}
.grad-sec-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.grad-sec-title{
  font-weight: 800;
  color: rgba(255,255,255,0.92);
}
.grad-count{ max-width: 140px; }
.grad-count-small{ max-width: 120px; }
.grad-list{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.grad-item{
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.16);
  padding: 10px;
  background: rgba(0,0,0,0.14);
}
.grad-item-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.grad-item-title{
  font-weight: 800;
  color: #fff;
}
.grad-item-sub{
  font-size: 12px;
  color: rgba(255,255,255,0.68);
}
.grad-item-body{display:grid;grid-template-columns:260px 1fr 280px;gap:10px;align-items:start}
@media (max-width: 820px){.grad-item-body{grid-template-columns:1fr}}
.grad-file{
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
}
.grad-note{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color:#fff;
}
.modal-note.small{
  font-size: 0.9rem;
  padding: 10px 12px;
  margin-top: 10px;
  background: linear-gradient(145deg, 
    rgba(244, 146, 14, 0.12) 0%, 
    rgba(244, 146, 14, 0.06) 100%
  );
  border: 1px solid rgba(244, 146, 14, 0.3);
  opacity: 0.9;
}
@media (max-width: 720px){
  .grad-grid{ grid-template-columns: 1fr; }
  .grad-span2{ grid-column: span 1; }
  .grad-item-body{ grid-template-columns: 1fr; }
  .grad-count{ max-width: 120px; }
}


/* ==========================================================
   ✅ Graduation Project Modal (Wider + Better UX)
========================================================== */
/* ============================================================
   نافذة مشروع التخرج - تصميم عصري جديد (برتقالي + رمادي)
   ============================================================ */

.grad-box{
  max-width: 1200px !important;
  width: min(1200px, 96vw) !important;
  padding: 40px 36px !important;
}

.grad-headline {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(244, 146, 14, 0.2);
}

.grad-h-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #f4920e 0%, #ffaa33 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.grad-h-sub {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  line-height: 1.8;
}

.grad-head h2{
  margin: 0 0 10px 0;
  background: linear-gradient(135deg, #f4920e 0%, #ffaa33 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.5rem;
  font-weight: 800;
}

.grad-head p{
  margin: 0 0 16px 0;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.85;
  font-size: 1.05rem;
}

.grad-form label{
  display:block;
  color:#cfcfcf;
  margin-bottom:6px;
  font-size:0.92rem;
}
.grad-form input,
.grad-form textarea,
.grad-form select{
  width: 100%;
  background: linear-gradient(145deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(255, 255, 255, 0.98) 100%
  ) !important;
  color: #000 !important;
  border: 1.5px solid rgba(244, 146, 14, 0.25);
  border-radius: 14px;
  padding: 12px 16px;
  outline: none;
  transition: none;
  /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
  font-weight: 500;
}

.grad-form input:focus,
.grad-form textarea:focus {
  border-color: rgba(244, 146, 14, 0.6);
  box-shadow: 
    0 0 0 3px rgba(244, 146, 14, 0.15),
    0 4px 12px rgba(244, 146, 14, 0.2);
  background: linear-gradient(145deg, 
    rgba(50, 50, 55, 0.95) 0%, 
    rgba(40, 40, 45, 0.98) 100%
  );
}
.grad-form select:focus {
  border-color: rgba(244, 146, 14, 0.6);
  box-shadow: 
    0 0 0 3px rgba(244, 146, 14, 0.15),
    0 4px 12px rgba(244, 146, 14, 0.2);
  background: linear-gradient(145deg, 
    rgba(255, 255, 255, 0.98) 0%, 
    rgba(255, 255, 255, 1) 100%
  ) !important;
  color: #000 !important;
}
.grad-form textarea{
  min-height: 110px;
  resize: vertical;
}
.grad-form select{
  appearance:auto;
  background: rgba(255,255,255,0.95) !important;
  color: #000 !important;
}
.grad-form select option{
  color:#000 !important;          /* ✅ solves white dropdown issue */
  background:#fff !important;     /* ✅ ensures numbers visible immediately */
}

.grad-row3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 820px){
  .grad-row3{ grid-template-columns: 1fr; }
}

.grad-sections{
  margin-top: 12px;
  display:flex;
  flex-direction: column;
  gap: 12px;
}
.grad-sec{
  background: linear-gradient(145deg, 
    rgba(45, 45, 50, 0.8) 0%, 
    rgba(35, 35, 40, 0.9) 100%
  );
  border: 1.5px solid rgba(244, 146, 14, 0.3);
  border-radius: 16px;
  padding: 16px 18px;
  /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
  transition: none;
}

.grad-sec:hover {
  border-color: rgba(244, 146, 14, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.grad-sec-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.grad-sec-head h3{
  margin: 0;
  background: linear-gradient(135deg, #f4920e 0%, #ffaa33 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.1rem;
  font-weight: 700;
}
.grad-count{
  width: 120px !important;
  min-width: 120px;
}

.grad-list{
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.grad-item{
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, 
    rgba(40, 40, 45, 0.7) 0%, 
    rgba(30, 30, 35, 0.8) 100%
  );
  border: 1.5px solid rgba(244, 146, 14, 0.2);
  /* backdrop-filter: blur(8px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(8px); */ /* تم إزالة blur لتحسين الأداء */
  transition: none;
}

.grad-item:hover {
  border-color: rgba(244, 146, 14, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
@media (max-width: 820px){.grad-item{padding:10px}}
.grad-item .grad-file{
  width:100%;
}
.grad-item .grad-note{
  min-height: 90px;
}

.grad-actions{
  display:flex;
  gap: 10px;
  justify-content: flex-start;
  margin-top: 14px;
}
.btn-primary{
  background: linear-gradient(135deg, #f4920e, #ffaa33);
  color: #fff;
  border: 1.5px solid rgba(244, 146, 14, 0.5);
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: none;
  box-shadow: 
    0 6px 20px rgba(244, 146, 14, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ffaa33, #ffb14a);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px rgba(244, 146, 14, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-secondary{
  background: linear-gradient(145deg, 
    rgba(45, 45, 50, 0.8) 0%, 
    rgba(35, 35, 40, 0.9) 100%
  );
  color: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(100, 100, 110, 0.4);
  border-radius: 14px;
  padding: 12px 20px;
  cursor: pointer;
  transition: none;
  /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
}

.btn-secondary:hover {
  background: linear-gradient(145deg, 
    rgba(55, 55, 60, 0.9) 0%, 
    rgba(45, 45, 50, 0.95) 100%
  );
  border-color: rgba(120, 120, 130, 0.6);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.grad-foot{
  margin-top: 10px;
  color:#ddd;
}
.grad-small{
  font-size: 0.85rem;
  color:#bdbdbd;
  margin-top: 6px;
}



/* ============================================================
   نافذة التدريب - تصميم عصري جديد (برتقالي + رمادي)
   ============================================================ */

.training-title{
    margin: 0 0 14px 0;
    background: linear-gradient(135deg, #f4920e 0%, #ffaa33 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: 800;
    border-bottom: 2px solid rgba(244, 146, 14, 0.3);
    padding-bottom: 12px;
    letter-spacing: -0.5px;
}

.training-lead{
    margin: 0 0 20px 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.7;
}

.training-note{
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    background: rgba(244, 146, 14, 0.1);
    border: 1px solid rgba(244, 146, 14, 0.25);
    border-radius: 12px;
    padding: 10px 14px;
    margin: 12px 0;
}

.training-card{
    background: linear-gradient(145deg, 
        rgba(45, 45, 50, 0.8) 0%, 
        rgba(35, 35, 40, 0.9) 100%
    );
    border: 1.5px solid rgba(244, 146, 14, 0.3);
    border-radius: 18px;
    padding: 18px 20px;
    margin: 14px 0;
    /* backdrop-filter: blur(15px); */ /* تم إزالة blur لتحسين الأداء */
    /* -webkit-backdrop-filter: blur(15px); */ /* تم إزالة blur لتحسين الأداء */
    transition: none;
}

.training-card:hover {
    border-color: rgba(244, 146, 14, 0.5);
    background: linear-gradient(145deg, 
        rgba(244, 146, 14, 0.15) 0%, 
        rgba(244, 146, 14, 0.08) 100%
    );
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.training-card h3{
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #f4920e 0%, #ffaa33 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.15rem;
    font-weight: 700;
}

.training-card p{
    margin: 0 0 10px 0;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.training-card ul{
    margin: 0 0 10px 0;
    padding-right: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.training-price{
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 600;
}

.training-price b{
    color: #ffaa33;
    font-weight: 700;
}

.mono{
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background: rgba(244, 146, 14, 0.15);
    border: 1px solid rgba(244, 146, 14, 0.3);
    padding: 3px 8px;
    border-radius: 8px;
    color: #ffaa33;
    font-weight: 600;
}

/* Training Instructions Box - تصميم جديد */
.training-instructions-box{
  background: linear-gradient(145deg, 
    rgba(45, 45, 50, 0.9) 0%, 
    rgba(35, 35, 40, 0.95) 100%
  );
  border: 1.5px solid rgba(244, 146, 14, 0.4);
  border-radius: 18px;
  padding: 20px;
  margin: 20px 0;
  /* animation: instructionsFadeIn 0.3s ease-out; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
  /* backdrop-filter: blur(15px); */ /* تم إزالة blur لتحسين الأداء */
  /* -webkit-backdrop-filter: blur(15px); */ /* تم إزالة blur لتحسين الأداء */
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ instructionsFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.training-instructions-box h4{
  margin: 0 0 14px 0;
  background: linear-gradient(135deg, #f4920e 0%, #ffaa33 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.training-instructions-content{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.training-instructions-ar,
.training-instructions-en{
  color: #ddd;
  font-size: 0.9rem;
  line-height: 1.7;
}

.training-instructions-ar strong,
.training-instructions-en strong{
  color: #f4920e;
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.training-instructions-ar ul,
.training-instructions-en ul{
  margin: 8px 0 0 0;
  padding-right: 20px;
  list-style-type: disc;
}

.training-instructions-ar li,
.training-instructions-en li{
  margin: 6px 0;
  color: #ccc;
}

/* Training Note Box (for Final Output explanation) */
.training-note-box{
  background: rgba(244,146,14,0.08);
  border: 1px solid rgba(244,146,14,0.25);
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
  color: #ddd;
  font-size: 0.9rem;
  line-height: 1.7;
  /* animation: noteBoxFadeIn 0.4s ease-out; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ noteBoxFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.training-note-box strong{
  color: #ffd7a6;
}

/* ============================================================
   نافذة Super Boh - تصميم عصري جديد (برتقالي + رمادي)
   ============================================================ */

.super-boh-box{
    max-width: 860px !important;
    width: min(860px, 96vw) !important;
    padding: 42px 36px !important;
}

.super-boh-box .modal-title{
    margin-top: 0;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #f4920e 0%, #ffaa33 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.super-boh-box .modal-lead{
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.super-boh-box .modal-bullets{
    margin: 16px 0 20px 0;
    padding-right: 22px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.9;
    font-size: 1rem;
}

.super-boh-box .modal-bullets li {
    margin: 10px 0;
}

.super-boh-box .modal-bullets b {
    color: #ffaa33;
    font-weight: 700;
}

.super-boh-box .modal-note{
    background: linear-gradient(145deg, 
        rgba(244, 146, 14, 0.15) 0%, 
        rgba(244, 146, 14, 0.08) 100%
    );
    border: 1.5px solid rgba(244, 146, 14, 0.35);
    padding: 14px 16px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 16px 0;
    /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
    /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
}

.super-boh-box .modal-note span{
    color: #ffaa33;
    font-weight: 700;
}

.grad-box{
    max-width: 1320px !important;
    width: min(1320px, 96vw) !important;
    padding: 42px 36px !important;
}

/* Grad Headline Styles */
.grad-headline {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(244, 146, 14, 0.2);
}

.grad-h-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #f4920e 0%, #ffaa33 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.grad-h-sub {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-top: 8px;
}

.grad-form input,
.grad-form textarea {
    width: 100%;
    background: linear-gradient(145deg, 
        rgba(40, 40, 45, 0.9) 0%, 
        rgba(35, 35, 40, 0.95) 100%
    );
    color: #fff;
    border: 1.5px solid rgba(244, 146, 14, 0.25);
    border-radius: 14px;
    padding: 12px 16px;
    outline: none;
    transition: none;
    /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
    /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
}

.grad-form select {
    width: 100%;
    background: rgba(255,255,255,0.95) !important;
    color: #000 !important;
    border: 1.5px solid rgba(244, 146, 14, 0.25);
    border-radius: 14px;
    padding: 12px 16px;
    outline: none;
    transition: none;
    /* backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
    /* -webkit-backdrop-filter: blur(10px); */ /* تم إزالة blur لتحسين الأداء */
    font-weight: 500;
}

.grad-form input:focus,
.grad-form textarea:focus {
    border-color: rgba(244, 146, 14, 0.6);
    box-shadow: 
        0 0 0 3px rgba(244, 146, 14, 0.15),
        0 4px 12px rgba(244, 146, 14, 0.2);
}

.grad-form select:focus {
    border-color: rgba(244, 146, 14, 0.6);
    box-shadow: 
        0 0 0 3px rgba(244, 146, 14, 0.15),
        0 4px 12px rgba(244, 146, 14, 0.2);
    background: rgba(255,255,255,1) !important;
    color: #000 !important;
}

.grad-form textarea{
    min-height: 110px;
    resize: vertical;
}

.grad-form select{
    appearance: auto;
}

.grad-form select option{
    color: #000 !important;
    background: #fff !important;
}

.grad-row3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
@media (max-width:820px){.grad-row3{grid-template-columns:1fr}}
.grad-sec{background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:10px}
.grad-sec-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.grad-count{width:120px!important;min-width:120px}
.grad-item{display:grid;grid-template-columns:220px 1fr;gap:10px;align-items:start;padding:10px;border-radius:14px;background:rgba(0,0,0,.35);border:1px solid rgba(255,255,255,.08)}
@media (max-width:820px){.grad-item{grid-template-columns:1fr}}
.grad-item .grad-note{min-height:90px}


/* ===== Graduation Banner: per-image size controls ===== */
.grad-size{
  width:100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.grad-size-title{
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  font-weight: 700;
}
.grad-size-row{
  display:flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.grad-size-mode{
  flex: 1 1 150px;
  min-width: 150px;
}
.grad-size-custom{
  display:none;
  gap: 8px;
  align-items: center;
}
.grad-item.is-custom .grad-size-custom{ display:flex; }
.grad-size-custom input{
  width: 96px;
  text-align: center;
}
.grad-size-hint{
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  line-height: 1.3;
}

/* Sidebar training item - ✅ إزالة الإطار الدائم */
.training-item{
  border: 1px solid rgba(244,146,14,0.45) !important;
  background: rgba(244,146,14,0.12) !important;
  position: relative;
}
.training-item:hover{
  background: rgba(244,146,14,0.18) !important;
}
/* ✅ منع ظهور الإطار (active state) على training-item تماماً - إزالة جميع التأثيرات */
.training-item.active,
.training-item.active:hover,
.model-item.training-item.active {
  border: 1px solid rgba(244,146,14,0.45) !important;
  background: rgba(244,146,14,0.12) !important;
  box-shadow: none !important;
  transform: none !important;
  border-color: rgba(244,146,14,0.45) !important;
}
/* ✅ إزالة أي تأثيرات active من training-item بشكل قاطع - لا يظهر أي إطار حتى لو كان active */
.training-item.active::before,
.training-item.active::after {
  display: none !important;
}

/* Training modal close button */
/* ============================================================
   نافذة التدريب - تحسينات إضافية
   ============================================================ */

#training-modal .modal-close{
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 1rem;
  border-radius: 10px;
  top: 18px;
  right: 18px;
  background: rgba(244, 146, 14, 0.12);
  border: 1.5px solid rgba(244, 146, 14, 0.4);
  color: rgba(244, 146, 14, 0.9);
}

#training-modal .modal-box{ 
  position: relative;
  max-width: 900px !important;
  padding: 42px 36px !important;
}

/* Grad form readability */
.grad-form select{background:rgba(255,255,255,0.95) !important;color:#000 !important;border:1px solid rgba(244,146,14,0.25);}
.grad-form input,.grad-form textarea{background:rgba(15,22,34,0.65);color:#fff;}
.grad-form select option{color:#000 !important;background:#fff !important;}

/* Camera Change Modal Styles */
.camera-type-btn{
  padding:20px;
  border-radius:14px;
  border:2px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.04);
  color:#fff;
  cursor:pointer;
  transition:all 0.3s ease;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  text-align:center;
}
.camera-type-btn:hover{
  border-color:rgba(244,146,14,0.5);
  background:rgba(244,146,14,0.08);
  transform:translateY(-2px);
}
.camera-type-btn.active{
  border-color:#f4920e;
  background:rgba(244,146,14,0.15);
  box-shadow:0 8px 24px rgba(244,146,14,0.2);
}
.camera-type-name{
  font-weight:700;
  font-size:0.95rem;
  margin-bottom:5px;
}
.camera-3d{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  perspective:140px;
}
.camera-3d .cube{
  width:26px;
  height:26px;
  position:relative;
  transform-style:preserve-3d;
  background:linear-gradient(135deg, rgba(244,146,14,0.35), rgba(244,146,14,0.15));
  border:1px solid rgba(244,146,14,0.7);
  box-shadow:0 6px 18px rgba(244,146,14,0.2);
}
.camera-3d .cube::before,
.camera-3d .cube::after{
  content:'';
  position:absolute;
  width:26px;
  height:26px;
  border:1px solid rgba(244,146,14,0.5);
  background:linear-gradient(135deg, rgba(244,146,14,0.28), rgba(244,146,14,0.12));
}
.camera-3d .cube::before{
  transform:rotateY(90deg) translateZ(13px);
  transform-origin:left;
}
.camera-3d .cube::after{
  transform:rotateX(90deg) translateZ(13px);
  transform-origin:bottom;
}
.camera-3d-front .cube{ transform:rotateY(0deg) rotateX(0deg); }
.camera-3d-right .cube{ transform:rotateY(-35deg) rotateX(10deg); }
.camera-3d-left .cube{ transform:rotateY(35deg) rotateX(10deg); }
.camera-3d-bird .cube{ transform:rotateX(60deg) rotateZ(10deg); }
.camera-3d-ant .cube{ transform:rotateX(-50deg) rotateZ(-10deg); }
.camera-3d-other .cube{ transform:rotateY(25deg) rotateX(25deg); }
.camera-quality-btn{
  flex:1;
  padding:12px 20px;
  border-radius:12px;
  border:2px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.04);
  color:#fff;
  cursor:pointer;
  transition:all 0.3s ease;
  font-weight:700;
}
.camera-quality-btn:hover{
  border-color:rgba(244,146,14,0.5);
  background:rgba(244,146,14,0.08);
}
.camera-quality-btn.active{
  border-color:#f4920e;
  background:rgba(244,146,14,0.15);
  color:#ffd7a6;
}
@media (max-width:720px){
  #camera-type-grid{grid-template-columns:1fr!important;}
}

/* Sketch to 2D Modal */
.sketch-2d-box{
  max-width:1100px;
  width: min(1100px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(145deg, rgba(18,18,18,0.98), rgba(12,12,12,0.98));
}
.sketch-toolbar{
  display:grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  margin: 16px 0 12px;
}
.sketch-tools-title,
.sketch-control-label,
.sketch-templates-title{
  font-weight: 800;
  color:#f4920e;
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.sketch-tools-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
}
.sketch-tool-btn{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color:#fff;
  cursor:pointer;
  font-weight: 700;
  transition: 0.2s;
}
.sketch-tool-btn.active,
.sketch-tool-btn:hover{
  border-color: rgba(244,146,14,0.6);
  background: rgba(244,146,14,0.12);
}
.sketch-controls{
  display:flex;
  flex-direction: column;
  gap: 12px;
}
.sketch-toggle-row{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}
.sketch-option-row{
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 10px 0 4px;
}
.sketch-toggle{
  display:flex;
  align-items:center;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
}
.sketch-toggle input{
  accent-color: #f4920e;
}
.sketch-controls input[type="number"]{
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color:#fff;
}

/* إصلاح select في نموذج الاسكتش - خلفية بيضاء ونص أسود */
#sketch-modal select,
#sketch-2d-modal select,
.auth-input[type="select"],
select.auth-input,
#sketch-style,
#sketch-detail,
#sketch-bg-style {
  background: rgba(255,255,255,0.95) !important;
  color: #000 !important;
  font-weight: 500;
  border: 1px solid rgba(244, 146, 14, 0.25) !important;
}

#sketch-modal select option,
#sketch-2d-modal select option,
select.auth-input option,
#sketch-style option,
#sketch-detail option,
#sketch-bg-style option {
  color: #000 !important;
  background: #fff !important;
}
.sketch-color-row{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
}
.sketch-color-btn{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  background: #111;
  cursor:pointer;
  transition: 0.2s;
}
.sketch-color-btn[data-color="#444444"]{ background:#444; }
.sketch-color-btn[data-color="#f4920e"]{ background:#f4920e; }
.sketch-color-btn[data-color="#2ecc71"]{ background:#2ecc71; }
.sketch-color-btn[data-color="#3498db"]{ background:#3498db; }
.sketch-color-btn[data-color="#e74c3c"]{ background:#e74c3c; }
.sketch-color-btn.active{
  border-color:#fff;
  box-shadow:0 0 0 3px rgba(244,146,14,0.25);
}
.sketch-color-picker{
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor:pointer;
}
.sketch-actions-row{
  display:flex;
  gap: 8px;
}
.sketch-action-btn{
  flex:1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color:#fff;
  cursor:pointer;
  font-weight: 700;
}
.sketch-action-btn:hover{
  border-color: rgba(244,146,14,0.5);
  background: rgba(244,146,14,0.12);
}
.sketch-templates{
  margin-bottom: 12px;
}
.sketch-templates-grid{
  display:grid;
  grid-template-columns: repeat(8, minmax(0,1fr));
  gap: 8px;
  max-height: 160px;
  overflow-y: auto;
  padding-right: 4px;
}
.sketch-template-btn{
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color:#fff;
  cursor:pointer;
  font-weight: 700;
  font-size: 0.85rem;
  transition: 0.2s;
  display:flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.sketch-template-icon{
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #0f0f0f;
  position: relative;
  display:block;
}
.sketch-template-text{
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
}
.sketch-template-icon::before,
.sketch-template-icon::after{
  content:'';
  position:absolute;
  background: #f2f2f2;
}
.icon-wall::before{ left:6px; right:6px; top:50%; height:2px; transform: translateY(-50%); }
.icon-door::before{ left:6px; right:6px; top:55%; height:2px; }
.icon-door::after{ left:6px; top:12px; width:18px; height:18px; border:2px solid #f2f2f2; border-right:none; border-bottom:none; background: transparent; }
.icon-double-door::before{ left:6px; right:6px; top:55%; height:2px; }
.icon-double-door::after{ left:6px; top:12px; width:26px; height:18px; border:2px solid #f2f2f2; border-bottom:none; background: transparent; }
.icon-sliding-door::before{ left:6px; right:6px; top:55%; height:2px; }
.icon-sliding-door::after{ left:10px; top:8px; width:18px; height:4px; background:#f2f2f2; }
.icon-window::before{ left:6px; right:6px; top:50%; height:2px; }
.icon-window::after{ left:6px; right:6px; top:14px; height:2px; }
.icon-double-window::before{ left:6px; right:6px; top:50%; height:2px; }
.icon-double-window::after{ left:6px; right:6px; top:14px; height:2px; box-shadow: 0 18px 0 #f2f2f2; }
.icon-curtain-wall::before{ left:6px; right:6px; top:50%; height:2px; }
.icon-curtain-wall::after{ left:9px; top:10px; width:2px; height:18px; box-shadow: 6px 0 0 #f2f2f2, 12px 0 0 #f2f2f2, 18px 0 0 #f2f2f2; }
.icon-bed::before{ left:8px; top:14px; width:22px; height:12px; background: transparent; border:2px solid #f2f2f2; }
.icon-bed::after{ left:8px; top:8px; width:8px; height:6px; border:2px solid #f2f2f2; background: transparent; }
.icon-wardrobe::before{ left:10px; top:8px; width:18px; height:22px; border:2px solid #f2f2f2; background: transparent; }
.icon-sofa::before{ left:8px; top:16px; width:22px; height:10px; border:2px solid #f2f2f2; background: transparent; }
.icon-sofa-l::before{ left:8px; top:10px; width:16px; height:18px; border:2px solid #f2f2f2; background: transparent; }
.icon-armchair::before{ left:10px; top:12px; width:18px; height:14px; border:2px solid #f2f2f2; background: transparent; }
.icon-table::before{ left:10px; top:10px; width:18px; height:18px; border:2px solid #f2f2f2; background: transparent; }
.icon-round-table::before{ left:10px; top:10px; width:18px; height:18px; border:2px solid #f2f2f2; border-radius:50%; background: transparent; }
.icon-chair::before{ left:12px; top:12px; width:14px; height:14px; border:2px solid #f2f2f2; background: transparent; }
.icon-desk::before{ left:8px; top:12px; width:22px; height:14px; border:2px solid #f2f2f2; background: transparent; }
.icon-tv::before{ left:8px; top:10px; width:22px; height:14px; border:2px solid #f2f2f2; background: transparent; }
.icon-bookshelf::before{ left:10px; top:8px; width:18px; height:22px; border:2px solid #f2f2f2; background: transparent; }
.icon-island::before{ left:8px; top:12px; width:22px; height:14px; border:2px solid #f2f2f2; background: transparent; }
.icon-counter::before{ left:6px; top:18px; width:26px; height:6px; background: #f2f2f2; }
.icon-toilet::before{ left:10px; top:10px; width:18px; height:18px; border:2px solid #f2f2f2; border-radius: 6px; background: transparent; }
.icon-sink::before{ left:10px; top:10px; width:18px; height:18px; border:2px solid #f2f2f2; border-radius: 50%; background: transparent; }
.icon-shower::before{ left:8px; top:8px; width:22px; height:22px; border:2px solid #f2f2f2; background: transparent; }
.icon-bathtub::before{ left:8px; top:14px; width:22px; height:12px; border:2px solid #f2f2f2; border-radius: 8px; background: transparent; }
.icon-stove::before{ left:8px; top:10px; width:22px; height:18px; border:2px solid #f2f2f2; background: transparent; }
.icon-fridge::before{ left:10px; top:8px; width:18px; height:22px; border:2px solid #f2f2f2; background: transparent; }
.icon-stairs::before{ left:10px; top:10px; width:18px; height:18px; border:2px solid #f2f2f2; background: transparent; }
.icon-elevator::before{ left:12px; top:8px; width:14px; height:22px; border:2px solid #f2f2f2; background: transparent; }
.icon-balcony::before{ left:8px; top:18px; width:22px; height:8px; border:2px solid #f2f2f2; background: transparent; }
.icon-column::before{ left:14px; top:8px; width:10px; height:22px; border:2px solid #f2f2f2; border-radius: 8px; background: transparent; }
.icon-tree::before{ left:10px; top:8px; width:18px; height:18px; border:2px solid #f2f2f2; border-radius:50%; background: transparent; }
.sketch-template-btn.active,
.sketch-template-btn:hover{
  border-color: rgba(244,146,14,0.6);
  background: rgba(244,146,14,0.12);
}
.sketch-canvas-wrap{
  background:#fff;
  border-radius: 16px;
  border: 2px solid rgba(244,146,14,0.35);
  padding: 8px;
  min-height: 360px;
}
#sketch-2d-canvas{
  width:100%;
  height:auto;
  display:block;
  background:#fff;
  border-radius: 12px;
  cursor: crosshair;
}
.sketch-object-panel{
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(244,146,14,0.35);
  background: rgba(0,0,0,0.25);
}
.sketch-object-title{
  font-weight: 800;
  color:#f4920e;
  margin-bottom: 8px;
}
.sketch-object-row{
  display:grid;
  grid-template-columns: 140px 1fr 80px;
  gap: 10px;
  align-items:center;
}
.sketch-object-row input{
  width:100%;
}
.sketch-object-actions{
  margin-top: 10px;
  display:flex;
  gap: 10px;
}
.sketch-action-btn.danger{
  border-color: rgba(255,99,99,0.6);
  color:#ff9f9f;
}
.sketch-action-btn.danger:hover{
  background: rgba(255,99,99,0.15);
  border-color: rgba(255,99,99,0.85);
}
.sketch-colorize-active{
  border-color: rgba(52,152,219,0.75) !important;
  background: rgba(52,152,219,0.15) !important;
  color: #cfe7ff !important;
}
.sketch-dim-box{
  max-width: 520px;
  width: min(520px, 92vw);
}
.sketch-dim-fields{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-top: 14px;
}
.sketch-dim-field label{
  display:block;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.85);
  font-weight: 700;
}
.sketch-dim-field input{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color:#fff;
}
@media (max-width: 900px){
  .sketch-toolbar{ grid-template-columns: 1fr; }
  .sketch-tools-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sketch-templates-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
  .sketch-object-row{ grid-template-columns: 1fr; }
  .sketch-dim-fields{ grid-template-columns: 1fr; }
}

/* ============================================================
   تحسينات احترافية - أنيميشن سريعة ونظام ألوان جديد
   ============================================================ */

/* Enhanced Button Animations - سريعة وسلسة */
.boh-action-btn, .action-btn, button:not(.lang-btn):not(.cinematic-lang-btn) {
  position: relative;
  overflow: hidden;
  transition: none;
  /* will-change: transform, box-shadow; */ /* تم إزالة will-change لتحسين الأداء */
}

.boh-action-btn::after, .action-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(244, 146, 14, 0.15);
  transform: translate(-50%, -50%);
  transition: none;
  pointer-events: none;
}

.boh-action-btn:hover::after, .action-btn:hover::after {
  width: 200px;
  height: 200px;
}

.boh-action-btn:hover, .action-btn:hover {
  /* transform: translateY(-1px); */ /* تم إلغاء التحويلات لتحسين الأداء */
  box-shadow: 0 6px 20px rgba(244, 146, 14, 0.3);
}

.boh-action-btn:active, .action-btn:active {
  /* transform: translateY(0); */ /* تم إلغاء التحويلات لتحسين الأداء */
  transition: none;
}

/* Glassmorphism Effects for Cards - تم تقليل التأثيرات لتحسين الأداء */
.model-item, .plan-card, .modal-box {
  /* /* backdrop-filter: blur(25px) saturate(200%); */ /* تم إزالة blur لتحسين الأداء */
  /* /* -webkit-backdrop-filter: blur(25px) saturate(200%); */ /* تم إزالة blur لتحسين الأداء */
  transition: none;
}

.model-item:hover {
  /* transform: translateY(-2px) scale(1.01); */ /* تم إلغاء التحويلات لتحسين الأداء */
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(244, 146, 14, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Smooth Page Transitions - سريعة */
.boh-view {
  /* animation: fadeInView 0.04s ease-out; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ fadeInView {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced Input Fields - سريعة */
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  transition: none;
  /* /* backdrop-filter: blur(15px); */ /* تم إزالة blur لتحسين الأداء */
  /* /* -webkit-backdrop-filter: blur(15px); */ /* تم إزالة blur لتحسين الأداء */
  border-color: rgba(244, 146, 14, 0.2);
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
  border-color: rgba(244, 146, 14, 0.6);
  box-shadow: 
    0 0 0 3px rgba(244, 146, 14, 0.1),
    0 4px 12px rgba(244, 146, 14, 0.2);
  /* transform: translateY(-1px); */ /* تم إلغاء التحويلات لتحسين الأداء */
}

/* Smooth Scroll - تم إلغاء smooth scroll لتحسين الأداء */
* {
  scroll-behavior: auto;
}

/* Enhanced Modal Animations - سريعة */
.modal-overlay:not(.lang-selection-overlay):not(.restriction-modal) {
  /* animation: fadeInOverlay 0.03s ease-out; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

.modal-box:not(.cinematic-modal) {
  /* animation: slideUpModal 0.04s ease-out; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ slideUpModal {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Micro-interactions for Images - سريعة */
img, .msg-image {
  transition: none;
  /* will-change: transform; */ /* تم إزالة will-change لتحسين الأداء */
}

img:hover, .msg-image:hover {
  transform: scale(1.01);
  filter: brightness(1.03);
}

/* Enhanced Sidebar Animations - سريعة */
#side-section-models, #side-section-archive {
  /* animation: slideInFromSide 0.08s ease-out; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ slideInFromSide {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Loading States with Cinematic Feel */
.boh-loader, .typing-dots {
  /* animation: pulseGlow 2s ease-in-out infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ pulseGlow {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(244, 146, 14, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(244, 146, 14, 0.6));
  }
}

/* Enhanced Chat Messages - سريعة */
.msg-bot, .msg-user {
  /* animation: messageSlideIn 0.06s ease-out; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Gradient Text Effects - ألوان جديدة */
.gradient-text {
  background: linear-gradient(135deg, #f4920e 0%, #888888 50%, #f4920e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  /* animation: gradientShift 4s ease infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Enhanced Focus States - ألوان جديدة */
*:focus-visible {
  outline: 2px solid rgba(244, 146, 14, 0.6);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Smooth Hover Transitions - سريعة */
a, button, .clickable {
  transition: none;
}

/* Enhanced Background Gradients - ألوان جديدة */
body, #boh-ai-app {
  background: 
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(244, 146, 14, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(136, 136, 136, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #050510 0%, #0a0a15 50%, #050510 100%);
  background-attachment: fixed;
}

/* Particle-like Background Effect - ألوان جديدة */
#boh-ai-app::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(244, 146, 14, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(136, 136, 136, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  /* animation: backgroundPulse 6s ease-in-out infinite; */ /* تم إلغاء الرسوم المتحركة لتحسين الأداء */
}

/* @keyframes - تم إزالة جميع keyframes لتحسين الأداء */ backgroundPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Enhanced Scrollbar - ألوان جديدة */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(5, 5, 16, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(244, 146, 14, 0.7), rgba(136, 136, 136, 0.5));
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  transition: none;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(244, 146, 14, 0.9), rgba(136, 136, 136, 0.7));
}

  background: linear-gradient(180deg, rgba(244, 146, 14, 0.9), rgba(136, 136, 136, 0.7));
}

  background: linear-gradient(180deg, rgba(244, 146, 14, 0.9), rgba(136, 136, 136, 0.7));
}

}

/* ============================================================
   Prompt Modal - Mobile Responsive & Dropdown Styles
   ============================================================ */

/* Mobile Responsive for Prompt Modal */
@media (max-width: 768px) {
  #prompt-modal .modal-box {
    width: 95% !important;
    max-width: 95% !important;
    max-height: 95vh !important;
    padding: 20px 16px !important;
    margin: 10px auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    position: relative !important;
    z-index: 100001 !important;
  }
  
  #prompt-modal .modal-overlay {
    z-index: 100000 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  #prompt-modal .grad-field {
    padding: 15px 12px !important;
    margin-bottom: 20px !important;
  }
  
  #prompt-modal .grad-headline {
    margin-bottom: 20px !important;
  }
  
  #prompt-modal .grad-h-title {
    font-size: 1.3rem !important;
  }
  
  #prompt-modal .grad-h-sub {
    font-size: 0.9rem !important;
  }
  
  /* Fix type selection buttons on mobile */
  #prompt-modal .grad-field > div[style*="display:flex"] {
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  #prompt-modal label[style*="flex:1"] {
    width: 100% !important;
    padding: 12px !important;
  }
}

/* Dropdown Component Styles */
.prompt-dropdown {
  position: relative;
  width: 100%;
  margin-top: 8px;
}

.prompt-dropdown-btn {
  width: 100%;
  padding: 12px 15px;
  background: #222;
  border: 1px solid #444;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  transition: all 0.2s;
  text-align: right;
}

.prompt-dropdown-btn:hover {
  background: #2a2a2a;
  border-color: #f4920e;
}

.prompt-dropdown-btn.active {
  background: #2a1f0e;
  border-color: #f4920e;
}

.prompt-dropdown-btn::after {
  content: '▼';
  font-size: 0.7rem;
  color: #f4920e;
  transition: transform 0.2s;
  margin-right: 8px;
}

.prompt-dropdown-btn.active::after {
  transform: rotate(180deg);
}

.prompt-dropdown-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid #444;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.prompt-dropdown-options.show {
  display: block;
}

.prompt-dropdown-option {
  padding: 12px 15px;
  color: #fff;
  cursor: pointer;
  border-bottom: 1px solid #2a2a2a;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  min-height: 48px;
  -webkit-tap-highlight-color: rgba(244, 146, 14, 0.2);
}

.prompt-dropdown-option:last-child {
  border-bottom: none;
}

.prompt-dropdown-option:hover {
  background: #2a2a2a;
}

.prompt-dropdown-option input[type="checkbox"],
.prompt-dropdown-option input[type="radio"] {
  display: none !important;
}

.prompt-dropdown-option {
  position: relative;
}

.prompt-dropdown-option.selected {
  background: rgba(244, 146, 14, 0.2) !important;
  border-left: 3px solid #f4920e;
}

.prompt-dropdown-option.selected::before {
  content: '✓';
  position: absolute;
  left: 12px;
  color: #f4920e;
  font-weight: bold;
  font-size: 16px;
}

.prompt-dropdown-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.prompt-dropdown-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(244, 146, 14, 0.2);
  border: 1px solid rgba(244, 146, 14, 0.4);
  border-radius: 6px;
  color: #f4920e;
  font-size: 0.85rem;
}

.prompt-dropdown-tag-remove {
  cursor: pointer;
  color: #f4920e;
  font-weight: bold;
  font-size: 1rem;
  line-height: 1;
}

.prompt-dropdown-tag-remove:hover {
  color: #ff6b00;
}

/* Scene Type Selection */
.prompt-scene-type-selection {
  margin-bottom: 25px;
  padding: 20px;
  background: #1a1a1a;
  border-radius: 8px;
  border: 1px solid #444;
}

.prompt-scene-type-selection h3 {
  color: #f4920e;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.prompt-scene-type-buttons {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.prompt-scene-type-btn {
  flex: 1;
  padding: 15px;
  background: #222;
  border: 2px solid #444;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s;
  color: #fff;
  font-size: 1rem;
}

.prompt-scene-type-btn:hover {
  background: #2a2a2a;
  border-color: #666;
}

.prompt-scene-type-btn.active {
  background: #2a1f0e;
  border-color: #f4920e;
  color: #f4920e;
}

@media (max-width: 768px) {
  .prompt-scene-type-buttons {
    flex-direction: column;
  }
  
  .prompt-dropdown-options {
    max-height: 200px;
  }
  
  .prompt-dropdown-option {
    padding: 15px 12px;
    min-height: 52px;
  }
  
  .prompt-dropdown-option input[type="checkbox"],
  .prompt-dropdown-option input[type="radio"] {
    width: 24px;
    height: 24px;
    margin-left: 12px;
  }
}

/* Mobile Responsive for Image Enhance Modal */
@media (max-width: 768px) {
  #image-enhance-modal .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100vh !important;
    padding: 15px 12px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  #image-enhance-modal .modal-overlay {
    z-index: 100000 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  #enhance-preview-container {
    position: sticky !important;
    top: 10px !important;
    z-index: 100 !important;
    background: rgba(26,26,26,0.98) !important;
    padding: 12px !important;
    margin-bottom: 15px !important;
    border-radius: 12px !important;
  }
  
  #enhance-preview-canvas {
    max-width: 100% !important;
    max-height: 50vh !important;
    width: 100% !important;
    height: auto !important;
  }
  
  #image-enhance-modal .grad-field {
    padding: 12px 10px !important;
    margin-bottom: 15px !important;
  }
  
  #image-enhance-modal .grad-headline {
    margin-bottom: 15px !important;
  }
  
  #image-enhance-modal .grad-h-title {
    font-size: 1.2rem !important;
  }
  
  #image-enhance-modal .grad-h-sub {
    font-size: 0.85rem !important;
  }
  
  #enhance-presets-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
    gap: 8px !important;
  }
  
  .preset-btn {
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
  }
}

/* Edit Modals - Fix positioning and sizing */
