/* تطبيق الخط المعتمد والانسيابية الكاملة على العناصر الأساسية والظاهرة */
.btn-title,
.card-byod .name,
.card-byod .subtitle,
.btn-murattal,
.btn-tilawa,
#surahList,
#nowPlaying {
    font-family: 'Plus Jakarta Sans', 'Amiri', serif !important;
    -webkit-font-smoothing: antialiased !important;
    text-rendering: optimizeLegibility !important;
}


.card-byod .name {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
}

.card-byod .subtitle {
    font-size: 1.15rem !important;
    font-weight: 400 !important;
}


/* 3️⃣ أسماء السور داخل القائمة (قائمة السور) */
#surahList {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    line-height: 1.6 !important;
}

/* 4️⃣ عنوان السورة الشغالة في شريط التحكم السفلي */
#nowPlaying {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
}




/* ==========================================================================
   إعدادات الخطوط والأساسيات البصرية - ضبط حجم الخط البولد ونصوص القراءة والموقع
   ========================================================================== */

/* ==========================================================================
   منع ظهور السكرول بالعرض نهائياً على الموبايل والكمبيوتر
   ========================================================================== */
html, body {
  max-width: 100% !important;
  overflow-x: hidden !important; /* السحر الذي يقص أي عنصر يخرج بالعرض ويمنع السكرول */
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: #0A0A0A !important;
  color: #FFFFFF;
  padding-bottom: 150px; /* لتفادي حجب المحتوى تحت شريط التشغيل */
  
}

/* زرار وعنوان عملاق القراء الجديد تماماً بنفس الاستايل الذهبي لزر التلاوة وعرض أكبر وكتابة شيك في المنتصف */
.title-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 50px;
}

/* ستايل عملاق القراء الأصلي الفخم: بعرض أكبر، خط شيك، وبولد متزن في المنتصف */
.btn-title {
  width: 90%;
  max-width: 600px; /* زيادة العرض ليكون متناسقاً وشيكاً */
  margin: 20px auto;
  padding: 10px 13px;
  text-align: center;
  font-family: 'Cairo', sans-serif;
  font-size: 26px; /* تكبير حجم الكتابة */
  font-weight: 500; /* تقليل البولد ليصبح ناعماً وشيكاً */
  color: #FEDB37;
  background: rgba(254, 219, 55, 0.06); /* ستايلك القديم الشفاف */
  border: 2px solid rgba(254, 219, 55, 0.3);
  border-radius: 50px;
  text-shadow: 0 2px 15px rgba(254, 219, 55, 0.4);
  box-shadow: 0 0 25px rgba(254, 219, 55, 0.2);
  transition: all 0.3s ease;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center; /* تمركز الكتابة في منتصف الباتون تماماً */
}

/* هوفر النيون الذهبي الأصلي الخاص بك */
.btn-title:hover {
  background: rgba(254, 219, 55, 0.12);
  border-color: rgba(254, 219, 55, 0.6);
  box-shadow: 
    0 0 35px rgba(254, 219, 55, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(1.02);
  text-shadow: 0 2px 20px rgba(254, 219, 55, 0.6);
}

/* ==========================================================================
   حل مشكلة البرواز على التلفون نهائياً بضبط محاور الدوران والأبعاد المرنة
   ========================================================================== */
.btn-gold-frame {
  position: relative !important;
  display: block !important;
  width: fit-content !important;
  max-width: 248px !important; /* مساحة الصورة (240) + البادينج (4 من كل اتجاه) */
  padding: 4px !important;
  margin: 40px auto !important;
  background: linear-gradient(135deg, #ac863baf 0%, #ac863baf 50%, #ac863baf 100%) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(253, 185, 49, 0.3) !important;
  z-index: 10 !important;
  box-sizing: border-box !important;
}

.btn-gold-frame img {
  display: block !important;
  width: 100% !important;
  max-width: 240px !important;
  height: auto !important;
  border-radius: 8px !important;
  position: relative !important;
  z-index: 5 !important;
}

/* المربع الذهبي الأول: ضبط السنتر وإجبار الالتفاف حول الصورة على الموبايل */
.btn-gold-frame .rotating-square-1 {
  position: absolute !important;
  width: calc(100% + 16px) !important;
  height: calc(100% + 16px) !important;
  top: -8px !important;
  left: -8px !important;
  border: 1.5px solid #FEDB37 !important;
  border-radius: 14px !important;
  pointer-events: none !important;
  transform-origin: center center !important; /* إجبار الدوران من المنتصف تماماً على التلفون */
  animation: rotateRight 14s linear infinite !important;
  box-shadow: 0 0 15px rgba(254, 219, 55, 0.4) !important;
  box-sizing: border-box !important;
}

/* المربع المنقط الثاني: ضبط السنتر وإجبار الالتفاف حول الصورة على الموبايل */
.btn-gold-frame .rotating-square-2 {
  position: absolute !important;
  width: calc(100% + 28px) !important;
  height: calc(100% + 28px) !important;
  top: -14px !important;
  left: -14px !important;
  border: 1.5px dashed rgba(254, 219, 55, 0.4) !important;
  border-radius: 18px !important;
  pointer-events: none !important;
  transform-origin: center center !important; /* إجبار الدوران من المنتصف تماماً على التلفون */
  animation: rotateLeft 20s linear infinite !important;
  box-sizing: border-box !important;
}

@keyframes rotateRight { 
  0% { transform: rotate(0deg); } 
  100% { transform: rotate(360deg); } 
}

@keyframes rotateLeft { 
  0% { transform: rotate(45deg); } 
  100% { transform: rotate(-315deg); } 
}

/* تلميح الضغط والاستماع الفخم المنزلق العائم */
.click-hint {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #FDB931, #FEDB37);
  color: #0A0A0A;
  padding: 6px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(254, 219, 55, 0.4);
  animation: float 2.5s ease-in-out infinite;
  white-space: nowrap;
  z-index: 12;
  width: 200px;
  text-align: center;
}

@keyframes float { 0%, 100% { bottom: -15px; } 50% { bottom: -7px; } }

/* ==========================================================================
   تطبيق التوحيد اللوني الشامل بناءً على زرار "حمل التلاوة كاملة الآن" الفاخر
   ========================================================================== */
.card-byod {
  width: 100%;
  max-width: 550px;
  margin: 0 auto;
  background: linear-gradient(135deg, #161616 0%, #1F1F1F 100%);
  border-radius: 16px;
  padding: 30px 20px;
  border: 1px solid rgba(254, 219, 55, 0.15);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.05);
}

.card-byod p#wisdom {
  font-size: 24px !important; /* تكبير نصوص القراءة التفاعلية لتصبح واضحة شيك */
  color: #E0E0E0;
  line-height: 1.6;
  font-weight: 600;
}

.name {
  color: #FEDB37;
  font-size: 26px;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(254, 219, 55, 0.2);
}

.subtitle {
  color: #A0A0A0;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 1px;
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 25px;
}

.stat-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(254, 219, 55, 0.1);
  border-radius: 10px;
  padding: 14px 10px;
}

.stat-num {
  display: block;
  color: #FEDB37;
  font-size: 22px;
  font-weight: 700;
}

.stat-text {
  display: block;
  color: #888888;
  font-size: 14px;
}

.btn-tilawa {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  padding: 14px;
  background: linear-gradient(135deg, #FDB931, #FEDB37);
  color: #0A0A0A !important;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 4px 20px rgba(254, 219, 55, 0.25);
  transition: all 0.25s ease;
}

.btn-tilawa:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(254, 219, 55, 0.45);
}

.btn-murattal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 550px;
  margin: 0 auto 15px;
  padding: 14px;
  background: #1A1A1A;
  color: #FEDB37 !important;
  border: 1px solid rgba(254, 219, 55, 0.3);
  border-radius: 12px;
  font-size:25px;
  text-decoration: none !important;
  transition: all 0.25s ease;
}

.btn-murattal:hover {
  background: rgba(254, 219, 55, 0.05);
  border-color: #FEDB37;
  transform: translateY(-2px);
}

.min {
  color: #888;
  font-size: 18px;
  margin-top: 30px;
  font-weight: 600;
}
/* ==========================================================================
   قائمة السور المصممة بنسق زر التلاوة المحسن وإعادة زر التحميل الفخم بجانبها
   ========================================================================== */
.surah-page {
  width: 100%;
  max-width: 600px;
  margin: 20px auto 0;
  padding: 10px;
}

.surah-item {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #141414 0%, #1A1A1A 100%);
  border: 1px solid rgba(254, 219, 55, 0.08);
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 12px;
  transition: all 0.25s ease;
}

.surah-item:hover {
  border-color: rgba(254, 219, 55, 0.3);
  background: linear-gradient(135deg, #1A1A1A 0%, #222222 100%);
  transform: translateX(-3px);
}

.surah-item.active-item {
  border-color: #FEDB37;
  background: rgba(254, 219, 55, 0.03);
  box-shadow: 0 0 15px rgba(254, 219, 55, 0.08);
}

.surah-num {
  width: 34px;
  height: 34px;
  background: rgba(254, 219, 55, 0.08);
  color: #FEDB37;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

.surah-name {
  flex: 1;
  color: #FFFFFF;
  font-size: 20px; /* تكبير خط أسماء السور */
  font-weight: 600;
  text-align: right;
  margin-right: 15px;
}

.surah-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-play-card {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #FEDB37;
  color: #0A0A0A;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-play-card:hover {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(254, 219, 55, 0.4);
}

/* زر تحميل السورة المباشر الحقيقي والمعاد ستايله بالكامل */
.btn-download {
  height: 38px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(254, 219, 55, 0.25);
  color: #FEDB37 !important;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.25s ease;
}

.btn-download:hover {
  background: linear-gradient(135deg, #FDB931, #FEDB37);
  color: #0A0A0A !important;
  border-color: #FEDB37;
  transform: translateY(-1px);
}

/* ==========================================
   تصميم مشغل الصوت العائم المودرن (عرض عريض وفخم مع توسيع مساحة الاسم)
   ========================================== */
.modern-player-card {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(150px) scale(0.9);
    width: 650px;
    max-width: 95%;
    padding: 15px 25px;
    gap: 20px;
    background: rgba(25, 25, 30, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    display: flex;
    align-items: center;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.15);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 9999;
    direction: rtl;
}

.modern-player-card.active {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
}

.modern-avatar-wrapper {
    position: relative;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #fede37, #f5a623);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 18px rgba(254, 219, 55, 0.35);
    flex-shrink: 0;
}

.modern-avatar-wrapper::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px dashed rgba(254, 219, 55, 0.4);
    animation: rotateDisc 12s linear infinite;
}

.modern-player-card.playing .modern-avatar-wrapper::after {
    border-color: #fede37;
    animation: rotateDisc 4s linear infinite, pulseRing 1.6s ease-in-out infinite;
}

.modern-player-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-grow: 1;
    overflow: hidden; 
}

.modern-player-title {
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.modern-player-time {
    color: rgba(254, 219, 55, 0.95);
    font-size: 13px;
    font-weight: 600;
    font-family: monospace;
    letter-spacing: 0.5px;
}

.modern-player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    padding-right: 15px;
    flex-shrink: 0;
}

.modern-ctrl-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modern-ctrl-btn:hover {
    background: #ffffff;
    color: #19191e;
    transform: scale(1.05);
}

.modern-ctrl-btn.main-play {
    background: #ffffff;
    color: #19191e;
    width: 44px;
    height: 44px;
}

.modern-ctrl-btn.main-play:hover {
    background: #fede37;
    transform: scale(1.1);
}

@keyframes rotateDisc {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(254, 219, 55, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(254, 219, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(254, 219, 55, 0); }
}
.img-fluid{
  width: 1000px;
  height: 550px;

}

/* ستايل خانة البحث */
.search-container {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  padding: 0 10px;
}

.search-box-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box-wrapper input {
  width: 100%;
  padding: 14px 45px 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(254, 219, 55, 0.25);
  border-radius: 50px;
  color: #FFFFFF;
  font-size: 16px;
  font-family: 'Cairo', sans-serif;
  outline: none;
  transition: all 0.3s ease;
  text-align: right;
  box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.5);
}

.search-box-wrapper input:focus {
  border-color: #FEDB37;
  box-shadow: 0 0 15px rgba(254, 219, 55, 0.2), inset 0 1px 10px rgba(0, 0, 0, 0.5);
  background: rgba(254, 219, 55, 0.02);
}

.search-icon {
  position: absolute;
  right: 18px;
  display: flex;
  align-items: center;
  pointer-events: none;
}

/* ==========================================================================
   أكواد التجاوب مع الشاشات (Responsive Media Queries) ليكون متناسقاً على الكل
   ========================================================================== */
@media (max-width: 768px) {
  img {
    max-width: 90% !important;
    height: auto !important;
  }
  .btn-title {
    font-size: 26px;
    padding: 8px 12px;
  }
  .card-byod {
    max-width: 90%;
    padding: 20px 15px;
  }
  .card-byod p#wisdom {
    font-size: 18px !important;
  }
  .surah-name {
    font-size: 16px;
  }
  /* تحسينات ذكية لتناسق المشغل العائم على الموبايل الشاشات الصغيرة */
  .modern-player-card {
    padding: 10px 15px;
    bottom: 15px;
    gap: 12px;
  }
  .modern-avatar-wrapper {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .modern-player-title {
    font-size: 14px;
  }
  .modern-player-time {
    font-size: 11px;
  }
  .modern-player-controls {
    padding-right: 10px;
    gap: 6px;
  }
  .modern-ctrl-btn {
    width: 32px;
    height: 32px;
  }
  .modern-ctrl-btn.main-play {
    width: 36px;
    height: 36px;
  }
  .btn-download {
    padding: 0 8px;
    font-size: 12px;
    height: 34px;
  }
  .btn-play-card {
    width: 34px;
    height: 34px;
  }
 
  
}
/* الحاوية الأب: جعلناها مرنة بنسبة مئوية مع حد أقصى لحمايتها على اللاب توب */
.surah-page {
  width: 100%;          /* تأخذ عرض الشاشة بالكامل على الموبايل */
  max-width: 650px;     /* العرض الفخم الذي تريده على اللاب توب والكمبيوتر */
  margin: 20px auto 0;  /* التوسيط في منتصف الصفحة تماماً */
  padding: 10px;        /* مسافة أمان داخلية حتى لا يلتصق الكرت بحواف الموبايل */
  box-sizing: border-box; /* لضمان حساب البادينج من ضمن العرض الكلي */
}

/* كرت السورة: ضبط العرض ليكون تلقائياً ومنسجماً مع الأب */
.surah-item {
  width: 100%;          /* الكرت يملأ الحاوية الأب تماماً ويتلائم مع حجمها */
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #141414 0%, #1A1A1A 100%);
  border: 1px solid rgba(254, 219, 55, 0.08);
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 12px;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

/* ==========================================================================
   التحكم الذكي في عروض العناصر داخل الـ JS (شاشات الموبايل الصغيرة)
   ========================================================================== */
@media (max-width: 680px) {
  .surah-item {
    padding: 12px 10px !important; /* تقليل المسافات الداخلية على الموبايل */
  }
  
  /* اللعب على عروض ويدز عناصر الجافا سكريبت الداخلية عند صغر الشاشة لكي لا تتداخل */
  .surah-item div[style*="flex-grow: 1"] {
    gap: 5px !important;
  }
  
  #surah-name {
    width: 35% !important; /* إعطاء مساحة مريحة لاسم السورة على الموبايل */
  }
  
  #surah-name span {
    font-size: 16px !important; /* تصغير الخط قليلاً ليناسب شاشة الهاتف */
  }
  
  /* تقليص وعرض الأزرار لكي تنضبط في سطر واحد بدون أي خروج */
  .surah-item div[style*="width: 140px"], 
  .surah-item div[style*="width: 25%"] {
    width: auto !important;
    min-width: auto !important;
  }
  
  .surah-item span style, 
  .surah-type-btn {
    font-size: 11px !important;
    padding: 3px 6px !important;
  }
}

@media (max-width: 520px) {
  /* تصغير نصوص السورة بشكل متناسق ليناسب الهواتف الصغيرة */
  #surah-name span {
    font-size: 16px !important;
  }
  
  .surah-item {
    padding: 10px 12px !important;
  }
  
  /* إخفاء نص كلمة "مكية" أو "مدنية" على الشاشات الصغيرة جداً والابقاء على الكعبة أو المسجد كرمز مريح يوفر مساحة */
  .type-text-desktop {
    display: none !important;
  }
  
  .surah-type-btn {
    padding: 5px 8px !important;
  }
}
@media (max-width: 520px) {
  /* جعل حجم خط اسم السورة مناسباً تماماً لعرض الموبايل ليظهر كاملاً */
  #surah-name span {
    font-size: 15px !important;
  }
  
  .surah-item {
    padding: 10px 8px !important;
  }

  /* توفير مساحة إضافية لاسم السورة عبر إخفاء الكلمة النصية والإبقاء على الأيقونة الفخمة */
  .type-text-desktop {
    display: none !important;
  }
}

