/* الأنماط المُحسّنة للصفحة الرئيسية بخصائص الذكاء الاصطناعي */

:root {
  --ai-primary: #7c4dff;
  --ai-secondary: #3d5afe;
  --ai-accent: #00b8d4;
  --ai-pulse-color: rgba(124, 77, 255, 0.5);
}

/* تأثيرات خلفية الذكاء الاصطناعي */
.ai-pattern-bg {
  background-image: 
    radial-gradient(var(--ai-pulse-color) 2px, transparent 2px),
    radial-gradient(var(--ai-pulse-color) 2px, transparent 2px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
  0% {
    background-position: 0 0, 20px 20px;
  }
  100% {
    background-position: 40px 40px, 60px 60px;
  }
}

/* شريط التقدم المتحرك للذكاء الاصطناعي */
.ai-progress-bar {
  overflow: hidden;
  height: 8px;
  background: rgba(124, 77, 255, 0.2);
  border-radius: 4px;
  position: relative;
}

.ai-progress-bar::before {
  content: '';
  position: absolute;
  left: -20%;
  width: 20%;
  height: 100%;
  background: linear-gradient(to right, 
    rgba(124, 77, 255, 0.1), 
    rgba(124, 77, 255, 0.6), 
    rgba(124, 77, 255, 0.1));
  animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
  0% { left: -20%; }
  100% { left: 120%; }
}

.ai-compatibility-bar {
  height: 8px;
  width: 0;
  background: linear-gradient(to right, #7c4dff, #3d5afe);
  border-radius: 4px;
  transition: width 1s ease-out;
}

/* تأثيرات النبض للذكاء الاصطناعي */
.ai-pulse {
  position: relative;
}

.ai-pulse::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(124, 77, 255, 0.7);
  animation: aiPulse 2s infinite;
}

@keyframes aiPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(124, 77, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(124, 77, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(124, 77, 255, 0);
  }
}

/* فقاعات الذكاء الاصطناعي */
.ai-bubble {
  position: relative;
  background-color: rgba(124, 77, 255, 0.1);
  border: 1px solid rgba(124, 77, 255, 0.3);
  border-radius: 16px;
  padding: 1rem;
  margin: 1rem 0;
  transition: all 0.3s ease;
}

.ai-bubble::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  left: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  background-color: rgba(124, 77, 255, 0.1);
  border-left: 1px solid rgba(124, 77, 255, 0.3);
  border-bottom: 1px solid rgba(124, 77, 255, 0.3);
}

.ai-bubble:hover {
  background-color: rgba(124, 77, 255, 0.15);
  box-shadow: 0 5px 15px rgba(124, 77, 255, 0.2);
}

/* النص المكتوب تدريجياً */
.ai-typing {
  border-right: 3px solid var(--ai-primary);
  animation: typing 1s steps(30, end), blink-caret .5s step-end infinite alternate;
  white-space: nowrap;
  overflow: hidden;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--ai-primary) }
}

/* تأثير ظهور عناصر التوافق */
.compatibility-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

.compatibility-item:nth-child(1) { animation-delay: 0.1s; }
.compatibility-item:nth-child(2) { animation-delay: 0.2s; }
.compatibility-item:nth-child(3) { animation-delay: 0.3s; }
.compatibility-item:nth-child(4) { animation-delay: 0.4s; }
.compatibility-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* رسوم متحركة للعناصر الزخرفية */
.ai-decorative-element {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--ai-primary), var(--ai-secondary));
  position: absolute;
  opacity: 0.3;
  filter: blur(15px);
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0) translateX(0);
  }
  33% {
    transform: translateY(-10px) translateX(10px);
  }
  66% {
    transform: translateY(10px) translateX(-10px);
  }
  100% {
    transform: translateY(0) translateX(0);
  }
}

/* زخارف مدار الذكاء الاصطناعي */
.ai-orbit {
  position: relative;
}

.ai-orbit::before, .ai-orbit::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
  pointer-events: none;
}

.ai-orbit::before {
  width: 300px;
  height: 300px;
  border: 1px dashed var(--ai-primary);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: spin 30s linear infinite;
}

.ai-orbit::after {
  width: 200px;
  height: 200px;
  border: 1px dashed var(--ai-secondary);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: spin 20s linear infinite reverse;
}

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

/* رسوم متحركة للتأثيرات العامة */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }

.animate-fade-in { animation: fadeIn 0.8s ease forwards; }
.animate-fade-in-up { animation: fadeInUp 0.8s ease forwards; }
.animate-zoom-in { animation: zoomIn 0.8s ease forwards; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* بطاقات الميزات الذكية */
.feature-card {
  transition: all 0.3s ease;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-card .icon-container {
  transition: transform 0.3s ease;
}

.ai-gradient-border {
  position: relative;
  border-radius: 8px;
  padding: 3px;
  background: linear-gradient(45deg, var(--ai-primary), var(--ai-secondary), var(--ai-accent));
  background-size: 200% 200%;
  animation: gradientBorder 3s ease infinite;
}

.ai-gradient-border-content {
  background: white;
  border-radius: 6px;
  height: 100%;
  width: 100%;
}

@keyframes gradientBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ضبط الاستجابة للشاشات الصغيرة */
@media (max-width: 768px) {
  .ai-orbit::before {
    width: 150px;
    height: 150px;
  }
  
  .ai-orbit::after {
    width: 100px;
    height: 100px;
  }
  
  .ai-decorative-element {
    width: 30px;
    height: 30px;
  }
}
