/* ===== الأساسيات ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: #0077ff;
}

::selection {
  background: transparent;
  color: #0077ff;
}

::-moz-selection {
  background: transparent;
  color: #0077ff;
}

body {
  color: white;
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== خلفية الفيديو ===== */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

.video-background video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  filter: brightness(0.5);
}



/* ===== الهيدر ===== */
header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  position: fixed;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, rgba(13, 17, 38, 0.95) 0%, rgba(25, 29, 50, 0.95) 100%);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(0, 119, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
  background: rgba(13, 17, 38, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.logo-container {
  display: flex;
  align-items: baseline;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: #0077ff;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 119, 255, 0.3);
  animation: scale-in 1.2s ease-out;
}

.logo-sub {
  font-size: 14px;
  margin-left: 5px;
  color: #ffffff;
  font-weight: 400;
}

header nav ul {
  display: flex;
  list-style: none;
  gap: 15px;
}

header nav ul li a {
  color: white;
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 30px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

header nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #0077ff;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

header nav ul li a:hover::after {
  transform: translateX(0);
}

header nav ul li a:hover,
header nav ul li a.active {
  background: linear-gradient(135deg, rgba(0, 119, 255, 0.2) 0%, rgba(0, 82, 204, 0.2) 100%);
  color: #0077ff;
  box-shadow: 0 4px 15px rgba(0, 119, 255, 0.3);
}

header nav ul li a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #0077ff;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

header nav ul li a:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

/* تأثيرات للموسيقى */
#music-control {
  position: relative;
  --music-color: #0077ff;
  transition: all 0.3s ease;
  padding-right: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#music-control::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--music-color);
  border-radius: 50%;
  animation: pulse 2s infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
  order: 2;
}

#music-control .text {
  order: 1;
}

#music-control.playing::after {
  opacity: 1;
  --music-color: #00ff88;
}

#music-control.paused::after {
  opacity: 1;
  --music-color: #ff4444;
}

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

/* ===== القسم الترحيبي ===== */
.welcome-section {
  padding: 120px 20px;
  margin-bottom: 50px;
  animation: fadeIn 1s ease-out;
}

.welcome-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
}

.welcome-left {
  flex: 1;
  text-align: left;
  margin-left: -40px;
  margin-top: 80px;
}

.welcome-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-top: 180px;
}

.main-title {
  font-size: 8rem;
  font-weight: 700;
  margin-bottom: 5px;
  background: linear-gradient(90deg, #0077ff, #0052cc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 10px rgba(0, 119, 255, 0.3);
  line-height: 1;
  white-space: nowrap;
  animation: fade-scale 1s ease-out;
}

.subtitle {
  font-size: 1.4rem;
  color: #ffffff;
  opacity: 0.9;
  margin-left: 5px;
  animation: fade-scale 1s ease-out;
}

.features {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-end;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(13, 17, 38, 0.95);
  padding: 10px 20px;
  border-radius: 12px;
  border: 2px solid rgba(0, 119, 255, 0.3);
  backdrop-filter: blur(5px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item:hover {
  transform: translateX(-5px) scale(1.02);
  border-color: #0077ff;
  box-shadow: 0 8px 25px rgba(0, 119, 255, 0.2);
}

.feature-icon {
  font-size: 1.2rem;
}

.feature-text {
  font-size: 1rem;
  color: white;
}

/* المحتوى الرئيسي */
.main-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 800px;
  margin: 120px auto 50px;
  padding: 0 20px;
}

.title {
  font-size: 2.5rem;
  margin-bottom: 30px;
  text-align: center;
  background: linear-gradient(90deg, #0077ff, #0052cc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 10px rgba(0, 119, 255, 0.3);
}

/* ===== قسم توليد الصور ===== */
.prompt {
  position: relative;
  z-index: 1;
  width: 900px;
  height: 400px;
  border: 3px solid #0077ff;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  margin-bottom: 30px;
  background-color: rgba(13, 17, 38, 0.95);
  backdrop-filter: blur(5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.prompt textarea {
  width: 100%;
  height: 85%;
  resize: none;
  border: none;
  outline: none;
  background-color: transparent;
  color: white;
  font-size: 20px;
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  overflow-y: auto;
  transition: all 0.3s ease;
}

.prompt textarea::placeholder {
  color: #AAAAAA;
  opacity: 0.7;
}

.prompt textarea:focus {
  outline: none;
  box-shadow: none;
}

.generate {
  display: flex;
  justify-content: center;
}

/* منطقة عرض الصورة */
.image-display {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 400px;
  border: 3px dashed #0077ff;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  background-color: rgba(13, 17, 38, 0.95);
  backdrop-filter: blur(5px);
  overflow: hidden;
}

.image-display img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 15px;
}

.image-placeholder {
  color: #AAAAAA;
  font-size: 18px;
  text-align: center;
  padding: 20px;
}

/* ===== قسم About ===== */
.about-section {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
  padding: 80px 20px;
  margin: 50px auto;
  border-top: 2px solid #0077ff;
}

.about-title {
  font-size: 2.2rem;
  margin-bottom: 40px;
  color: #0077ff;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 119, 255, 0.3);
}

.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px;
} 


.about-item {
  background: rgba(13, 17, 38, 0.95);
  border: 2px solid #0077ff;
  border-radius: 15px;
  padding: 20px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.about-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 119, 255, 0.2);
}

.about-item h3 {
  color: #0077ff;
  margin-bottom: 15px;
  font-size: 1.2rem;
  text-shadow: 0 2px 5px rgba(0, 119, 255, 0.2);
}

.about-item textarea {
  width: 100%;
  height: 100px;
  background: transparent;
  border: none;
  color: white;
  font-size: 1rem;
  line-height: 1.6;
  resize: none;
  outline: none !important;
  -webkit-outline: none !important;
  -moz-outline: none !important;
  -ms-outline: none !important;
  font-family: 'Poppins', sans-serif;
}

.about-item textarea:focus {
  outline: none !important;
  -webkit-outline: none !important;
  -moz-outline: none !important;
  -ms-outline: none !important;
  box-shadow: none !important;
}

/* زر التوليد */
.btn {
  position: relative;
  padding: 15px 40px;
  background: linear-gradient(135deg, #0077ff, #0052cc);
  border: none;
  border-radius: 30px;
  color: white;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 119, 255, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 119, 255, 0.4);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.text {
  position: relative;
  z-index: 1;
}

.sparkle {
  width: 20px;
  height: 20px;
  fill: white;
  transition: all 0.3s ease;
}

.btn:hover .sparkle {
  animation: sparkle-rotate 1s linear infinite;
}

@keyframes sparkle-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* الإشعارات */
.notification-center {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification {
  background: rgba(13, 17, 38, 0.95);
  border-left: 4px solid #0077ff;
  color: white;
  padding: 15px 20px;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  backdrop-filter: blur(5px);
  animation: slide-in 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  border-left-color: #00ff88;
}

.notification.error {
  border-left-color: #ff4444;
}

.notification.warning {
  border-left-color: #ffbb33;
}

/* ===== التأثيرات الحركية ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.main-content, .about-section {
  animation: fadeIn 0.8s ease-out forwards;
}

/* تأثيرات للعناصر عند التمرير */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* تأثير للزر عند الضغط */
.btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.welcome-message {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(13, 17, 38, 0.95);
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #0077ff;
  max-width: 300px;
  z-index: 1000;
  animation: slideIn 0.5s ease-out;
  backdrop-filter: blur(5px);
  box-shadow: 0 5px 15px rgba(0, 119, 255, 0.2);
  color: white;
}

@keyframes slideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* تأثير اهتزاز عند الخطأ */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* تأثير تعويم للعناصر */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.floating {
  animation: float 3s ease-in-out infinite;
}

/* تأثير إضاءة للعناصر المهمة */
@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(0, 119, 255, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(0, 119, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 119, 255, 0); }
}

.pulse {
  animation: pulse-glow 2s infinite;
}

/* ===== التجاوب مع الشاشات الصغيرة ===== */
@media (max-width: 768px) {
  header {
    padding: 10px 20px;
  }
  
  .logo {
    font-size: 24px;
  }
  
  .logo-sub {
    font-size: 12px;
  }
  
  header nav ul li a {
    padding: 6px 15px;
    font-size: 14px;
  }
  
  .welcome-content {
    flex-direction: column;
    text-align: center;
  }

  .welcome-left {
    text-align: center;
    margin-left: 0;
    margin-top: 40px;
  }

  .welcome-right {
    align-items: center;
    margin-top: 100px;
  }

  .features {
    align-items: center;
  }

  .main-title {
    font-size: 5rem;
  }

  .subtitle {
    font-size: 1.2rem;
    margin-left: 0;
  }
  
  .main-content {
    margin-top: 100px;
    padding: 0 15px;
  }
  
  .title {
    font-size: 2rem;
  }
  
  .prompt {
    width: 100%;
    height: 350px;
    padding: 20px;
  }
  
  .prompt textarea {
    font-size: 18px;
  }
  
  .image-display {
    height: 300px;
  }
  
  .btn {
    padding: 12px 30px;
    font-size: 16px;
  }
}

/* تأثيرات حركية جديدة */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes fade-scale {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* تأثير تحميل للصور */
.image-display.loading {
  position: relative;
  overflow: hidden;
}

.image-display.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    rgba(13, 17, 38, 0) 0%,
    rgba(0, 119, 255, 0.1) 50%,
    rgba(13, 17, 38, 0) 100%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

/* تحسين تأثيرات الأزرار */
.btn {
  position: relative;
  overflow: hidden;
}

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

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

/* تحسين تأثيرات العناصر عند التمرير */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* تحسين تأثيرات النصوص */
.main-title, .subtitle {
  animation: fade-scale 1s ease-out;
}

.feature-item {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item:hover {
  transform: translateX(-5px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 119, 255, 0.2);
}

/* تحسين تأثيرات الإدخال */
.prompt textarea {
  transition: all 0.3s ease;
}

.prompt textarea:focus {
  outline: none;
  box-shadow: none;
}

/* تحسين تأثيرات الإشعارات */
.notification {
  animation: slide-in 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* تحسين تأثيرات الهيدر عند التمرير */
header {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
  background: rgba(13, 17, 38, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* تحسين تأثيرات الروابط */
header nav ul li a {
  position: relative;
  transition: all 0.3s ease;
}

header nav ul li a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #0077ff;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

header nav ul li a:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

