/* تخصيص أنماط CSS لإصدار الويب */

/* إعدادات أساسية للصفحة */
html, body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #ffffff;
}

/* تعديلات القابلية للقراءة للنسخة العربية */
body {
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* تجربة مستخدم أفضل على الويب */
#flutter_target {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* تحسين تجربة الروابط */
a {
  color: #4A78DD;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* تخصيص نمط التمرير عند الحاجة */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #4A78DD;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3A67CC;
}

/* تحسينات لأجهزة الجوال */
@media only screen and (max-width: 600px) {
  html, body {
    font-size: 14px;
  }
  
  /* ضبط الحجم لشاشات الهواتف الذكية */
  flt-glass-pane {
    transform: scale(0.95) !important;
    transform-origin: center top;
  }
}

/* تحسينات للأجهزة اللوحية */
@media only screen and (min-width: 601px) and (max-width: 960px) {
  /* ضبط الحجم لشاشات الأجهزة اللوحية */
  flt-glass-pane {
    transform: scale(0.85) !important;
    transform-origin: center top;
  }
}

/* تحسينات للحواسيب المكتبية */
@media only screen and (min-width: 961px) {
  /* ضبط الحجم لشاشات الحواسيب */
  flt-glass-pane {
    transform: scale(0.75) !important;
    transform-origin: center center;
  }
}

/* دعم مختلف اتجاهات الشاشة */
@media (orientation: portrait) {
  flt-glass-pane {
    transform-origin: center top !important;
  }
}

@media (orientation: landscape) {
  flt-glass-pane {
    transform-origin: center center !important;
  }
}

/* تعديلات تجربة المستخدم للنص */
flt-paragraph, flt-span {
  font-smoothing: antialiased !important;
  -webkit-font-smoothing: antialiased !important;
}

/* تحسين النص في تطبيق Flutter */
flt-scene-host {
  overflow: hidden !important;
  width: 100% !important;
  height: 100% !important;
}

/* تحسين تجربة التطبيق على شاشات ريتينا */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  flt-glass-pane * {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* التعامل مع حالات التحميل */
.flutter-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: white;
  z-index: 999;
}

/* تحسين لمسات التطبيق على الويب */
::selection {
  background-color: rgba(74, 120, 221, 0.2);
  color: #333;
}

/* إعدادات عامة لمحتوى Flutter */
flt-glass-pane {
  transform: scale(0.4) !important;
  transform-origin: center top;
}

/* منع تجاوز المحتوى */
flt-scene {
  max-width: 100vw !important;
  overflow: hidden !important;
}

/* تنظيم عرض الصفحة الرئيسية */
.flt-scene-item div[dir="rtl"] {
  max-width: 80vw !important;
  max-height: 80vh !important;
}

/* ضبط حجم وتنسيق البطاقات */
.flt-scene-item div[style*="height: 569px"], 
.flt-scene-item div[style*="height:569px"],
.flt-scene-item div[style*="width: 330px"],
.flt-scene-item div[style*="width:330px"] {
  transform: scale(0.3) !important;
  margin: -60px !important;
}

/* التعامل مع البطاقات كعناصر مستقلة */
.flt-scene-item {
  display: inline-block !important;
  margin: -50px !important;
}

/* ضبط حجم الأزرار */
.flt-scene-item div[role="button"] {
  transform: scale(0.5) !important;
}

/* تحسين عرض الشبكة */
.flt-scene-item div[role="grid"] {
  transform: scale(0.5) !important;
  max-width: 70vw !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
}

/* ضبط حجم صفوف وخلايا الشبكة */
.flt-scene-item div[role="gridcell"],
.flt-scene-item div[role="row"] {
  transform: scale(0.6) !important;
  margin: -35px !important;
}

/* تحسين ظهور الأيقونات */
.flt-scene-item canvas {
  transform: scale(0.5) !important;
}

/* العناصر المرئية */
flt-semantics-placeholder {
  transform: scale(0.4) !important;
}

/* للشاشات الكبيرة جدًا */
@media (min-width: 1600px) {
  flt-glass-pane {
    transform: scale(0.35) !important;
  }
  
  .flt-scene-item div[style*="height: 569px"], 
  .flt-scene-item div[style*="height:569px"],
  .flt-scene-item div[style*="width: 330px"],
  .flt-scene-item div[style*="width:330px"] {
    transform: scale(0.25) !important;
    margin: -70px !important;
  }
}

/* للشاشات الكبيرة (سطح المكتب) */
@media (min-width: 1024px) and (max-width: 1599px) {
  flt-glass-pane {
    transform: scale(0.4) !important;
  }
  
  .flt-scene-item div[style*="height: 569px"], 
  .flt-scene-item div[style*="height:569px"],
  .flt-scene-item div[style*="width: 330px"],
  .flt-scene-item div[style*="width:330px"] {
    transform: scale(0.3) !important;
    margin: -65px !important;
  }
}

/* للأجهزة اللوحية */
@media (min-width: 768px) and (max-width: 1023px) {
  flt-glass-pane {
    transform: scale(0.6) !important;
  }
  
  .flt-scene-item div[style*="height: 569px"], 
  .flt-scene-item div[style*="height:569px"],
  .flt-scene-item div[style*="width: 330px"],
  .flt-scene-item div[style*="width:330px"] {
    transform: scale(0.4) !important;
    margin: -50px !important;
  }
}

/* للهواتف الكبيرة */
@media (min-width: 481px) and (max-width: 767px) {
  flt-glass-pane {
    transform: scale(0.75) !important;
  }
  
  .flt-scene-item div[style*="height: 569px"], 
  .flt-scene-item div[style*="height:569px"],
  .flt-scene-item div[style*="width: 330px"],
  .flt-scene-item div[style*="width:330px"] {
    transform: scale(0.5) !important;
    margin: -40px !important;
  }
}

/* للهواتف الصغيرة */
@media (max-width: 480px) {
  flt-glass-pane {
    transform: scale(0.9) !important;
  }
  
  .flt-scene-item div[style*="height: 569px"], 
  .flt-scene-item div[style*="height:569px"],
  .flt-scene-item div[style*="width: 330px"],
  .flt-scene-item div[style*="width:330px"] {
    transform: scale(0.6) !important;
    margin: -30px !important;
  }
}

/* قواعد إضافية للتجاوب مع الشاشات الكبيرة */
@media (min-width: 1024px) {
  /* إصلاحات للعناصر التي قد تتجاوز حدود العرض */
  .flt-scene-item > div {
    max-width: 100vw !important;
    overflow: visible !important;
  }
  
  /* تحسين موضع البطاقات */
  .flt-scene-item div[role="grid"] > div {
    display: inline-block !important;
    max-width: 200px !important;
    margin: 10px !important;
  }
}

/* تضمين عمودي للشاشات الطولية */
@media (orientation: portrait) {
  flt-glass-pane {
    transform-origin: center top !important;
  }
}

/* تضمين أفقي للشاشات العرضية */
@media (orientation: landscape) {
  flt-glass-pane {
    transform-origin: center center !important;
  }
} 