/* ==========================================================
   منصة أنوار العقيدة والفقه المباركة - نظام التصميم الشامل
   CSS Design System: Modern Islamic Luxury Educational UI
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cairo:wght@300;400;600;700;800;900&display=swap');

:root {
  /* ألوان الهوية الإسلامية الفاخرة - نمط الأبطال الافتراضي (الزمردي والذهبي) */
  --primary-emerald: #0d5c46;
  --primary-light: #158062;
  --primary-dark: #07382a;
  --accent-gold: #d4af37;
  --accent-gold-light: #f7e7a9;
  --accent-gold-dark: #aa841e;
  
  --bg-sand: #f4f8f5;
  --bg-card: #ffffff;
  --bg-surface: #edf6f1;
  
  --text-main: #13241b;
  --text-muted: #4e6b5d;
  --text-light: #f8fafc;
  
  --border-subtle: #cde4d8;
  --border-focus: #10b981;
  
  /* ألوان التمييز والتنقيط */
  --c-blue: #0284c7;
  --c-purple: #7e22ce;
  --c-green: #16a34a;
  --c-amber: #d97706;
  --c-rose: #e11d48;
  
  /* تخصيص الهيدر وشريط الزخرفة للنمط الافتراضي */
  --header-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(236, 253, 245, 0.97) 100%);
  --header-border: #a7f3d0;
  --header-shadow: 0 4px 20px rgba(13, 92, 70, 0.08);
  --header-pattern: linear-gradient(90deg, #d4af37, #10b981, #0d5c46, #10b981, #d4af37);
  
  /* تخصيص الأولاد والبنات */
  --student-badge-color: #0d5c46;
  --student-accent: #d4af37;
  
  /* ظلال وانتقالات */
  --shadow-sm: 0 2px 8px rgba(13, 92, 70, 0.07);
  --shadow-md: 0 8px 24px rgba(13, 92, 70, 0.12);
  --shadow-lg: 0 16px 38px rgba(13, 92, 70, 0.16);
  --shadow-gold: 0 6px 20px rgba(212, 175, 55, 0.35);
  
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-full: 9999px;
  
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* نمط البطلات اللطيف والمبارك - التوتي الملكي والوردي الفاخر والذهبي */
body.theme-girls {
  --primary-emerald: #831843;
  --primary-light: #be185d;
  --primary-dark: #500724;
  --accent-gold: #f59e0b;
  --accent-gold-light: #fde68a;
  --accent-gold-dark: #b45309;

  --bg-sand: #fff5f8;
  --bg-card: #ffffff;
  --bg-surface: #fdf2f8;

  --text-main: #2b111f;
  --text-muted: #734358;
  --text-light: #fff1f2;

  --border-subtle: #fbcfe8;
  --border-focus: #f472b6;

  /* تخصيص الهيدر وشريط الزخرفة لنمط البطلات */
  --header-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(253, 242, 248, 0.97) 100%);
  --header-border: #fbcfe8;
  --header-shadow: 0 4px 20px rgba(190, 24, 93, 0.1);
  --header-pattern: linear-gradient(90deg, #f59e0b, #ec4899, #831843, #ec4899, #f59e0b);

  --student-badge-color: #be185d;
  --student-accent: #f43f5e;
  --shadow-sm: 0 2px 8px rgba(190, 24, 93, 0.08);
  --shadow-md: 0 8px 24px rgba(190, 24, 93, 0.14);
  --shadow-lg: 0 16px 38px rgba(190, 24, 93, 0.18);
  --shadow-gold: 0 6px 20px rgba(245, 158, 11, 0.35);
}

/* الأساسيات */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-sand);
  color: var(--text-main);
  direction: rtl;
  text-align: right;
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(13, 92, 70, 0.08) 0%, transparent 42%),
    radial-gradient(circle at 90% 85%, rgba(212, 175, 55, 0.09) 0%, transparent 42%),
    linear-gradient(180deg, #f4f8f5 0%, #edf6f1 100%);
  transition: background-color 0.4s ease, background-image 0.4s ease, color 0.4s ease;
}

body.theme-girls {
  background-color: #fff5f8;
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(190, 24, 93, 0.08) 0%, transparent 42%),
    radial-gradient(circle at 90% 85%, rgba(245, 158, 11, 0.08) 0%, transparent 42%),
    linear-gradient(180deg, #fff5f8 0%, #fdf2f8 100%);
}

/* زخرفة إسلامية هندسية علوية وسفلية */
.islamic-header-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--header-pattern);
  z-index: 1000;
  transition: background 0.4s ease;
}

/* الشريط العلوي المتقدم */
.top-navbar {
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--header-border);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: var(--header-shadow);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.brand-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-emerald), var(--primary-light));
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(13, 92, 70, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.35s ease;
}

body.theme-girls .brand-icon {
  background: linear-gradient(135deg, #831843, #be185d);
  border-color: #f59e0b;
  box-shadow: 0 4px 14px rgba(190, 24, 93, 0.25);
}

.brand-icon::after {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  border-radius: inherit;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--primary-emerald);
  line-height: 1.2;
  transition: color 0.35s ease;
}

.brand-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  transition: color 0.35s ease;
}

/* خيارات الطالب والتنقل السريع */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* شارة صورة البروفايل التفاعلية في الهيدر */
.user-profile-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
  background: #ffffff;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.user-profile-badge:hover {
  transform: scale(1.08);
  box-shadow: 0 5px 16px rgba(212, 175, 55, 0.45);
  border-color: #f59e0b;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.25s ease;
}

.user-profile-badge:hover .profile-avatar-img {
  transform: scale(1.05);
}

body.theme-girls .user-profile-badge {
  border-color: #f472b6;
  box-shadow: 0 3px 10px rgba(190, 24, 93, 0.18);
}

body.theme-girls .user-profile-badge:hover {
  border-color: #f59e0b;
  box-shadow: 0 5px 16px rgba(244, 114, 182, 0.45);
}

/* الأيقونة المصغرة داخل أزرار التبديل */
.role-mini-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: inline-block;
  vertical-align: middle;
}

.mode-toggle-group {
  display: flex;
  background: #edf6f1;
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1.5px solid #cde4d8;
  transition: all 0.3s ease;
}

body.theme-girls .mode-toggle-group {
  background: #fdf2f8;
  border-color: #fbcfe8;
}

.role-btn {
  border: 1.5px solid transparent;
  background: transparent;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-btn.active {
  background: #fff;
  color: var(--primary-emerald);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body:not(.theme-girls) #roleBoysBtn.active {
  background: #ffffff;
  color: #065f46;
  border-color: #a7f3d0;
  box-shadow: 0 3px 10px rgba(6, 95, 70, 0.18);
}

body.theme-girls #roleGirlsBtn.active {
  background: #ffffff;
  color: #be185d;
  border-color: #f472b6;
  box-shadow: 0 3px 10px rgba(190, 24, 93, 0.22);
}

.action-btn-circle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 1rem;
}

.action-btn-circle:hover {
  background: #f0fdf4;
  color: #065f46;
  transform: translateY(-2px);
  border-color: #10b981;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.18);
}

body.theme-girls .action-btn-circle {
  border-color: #fbcfe8;
  color: #831843;
}

body.theme-girls .action-btn-circle:hover {
  background: #fdf2f8;
  color: #be185d;
  border-color: #f472b6;
  box-shadow: 0 3px 10px rgba(190, 24, 93, 0.2);
}

/* شريط الأزرار التنافسية والتقييمية أسفل الهيدر (ميدان الألعاب والاختبار الشامل) */
.sub-header-strip {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 253, 244, 0.96) 100%);
  border-bottom: 1.5px solid #cde4d8;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  position: relative;
  z-index: 950;
  transition: all 0.35s ease;
}

body.theme-girls .sub-header-strip {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(253, 242, 248, 0.96) 100%);
  border-bottom: 1.5px solid #fbcfe8;
}

body.theme-girls .sub-header-lead {
  color: #9d174d;
}

.sub-header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.sub-header-lead {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
}

.sub-header-lead i {
  color: var(--accent-gold);
  font-size: 1rem;
}

.sub-header-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* الأزرار المدمجة المخصصة أسفل الهيدر */
.sub-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.sub-header-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.08);
}

.sub-header-btn:active {
  transform: translateY(0);
}

/* زر ميدان الألعاب */
/* زر ميدان المسابقات والأنشطة الصفية البارز */
.btn-games-featured {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #fef3c7 100%);
  border-color: #a7f3d0;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.12);
  padding: 0.6rem 1.4rem;
}

.btn-games-featured:hover {
  border-color: #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #fde68a 100%);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.22);
  transform: translateY(-2px);
}

.btn-games-featured.active {
  border-color: #059669;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.28);
}

.games-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 3px 8px rgba(217, 119, 6, 0.35);
  flex-shrink: 0;
}

.games-text-group {
  text-align: right;
}

.games-text-group .btn-main-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 900;
  color: #064e3b;
  line-height: 1.25;
  white-space: nowrap;
}

.games-text-group .btn-sub-tag {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: #047857;
  opacity: 0.95;
  white-space: nowrap;
}

.btn-chip-games {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

@media (max-width: 600px) {
  .sub-header-container {
    justify-content: center;
    gap: 0.5rem;
  }
  .sub-header-lead {
    display: none;
  }
  .sub-header-buttons {
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
  }
  .sub-header-btn {
    padding: 0.4rem 0.75rem;
    gap: 0.45rem;
  }
  .games-text-group .btn-main-title,
  .quiz-text-group .btn-main-title {
    font-size: 0.8rem;
  }
  .btn-chip-games, .btn-chip-quiz {
    display: none;
  }
}

/* البطل الترحيبي (Hero Section) */
.hero-banner {
  max-width: 1300px;
  margin: 1.5rem auto 2.5rem;
  padding: 0 1.5rem;
}

.hero-card {
  background: linear-gradient(135deg, var(--primary-emerald) 0%, var(--primary-light) 65%, #084837 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 2rem;
  border: 2px solid rgba(212, 175, 55, 0.4);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold-light);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.hero-title span {
  color: var(--accent-gold);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  margin-bottom: 1.8rem;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #b8860b 100%);
  color: #1e1b18;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-gold);
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
  filter: brightness(1.05);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  backdrop-filter: blur(8px);
  transition: var(--transition);
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-art-box {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  backdrop-filter: blur(6px);
}

.art-symbol {
  font-size: 4.5rem;
  color: var(--accent-gold);
  filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.5));
  margin-bottom: 0.8rem;
  animation: floatAnim 4s ease-in-out infinite;
}

@keyframes floatAnim {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-art-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.3rem;
}

.hero-art-desc {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
}

/* بطاقة الطالب المخصص (بطل أو بطلة) */
.student-greeting-bar {
  max-width: 1300px;
  margin: -1rem auto 2rem;
  padding: 0 1.5rem;
}

.greeting-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-right: 5px solid var(--primary-emerald);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 1rem;
}

.greeting-avatar-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.greeting-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.greeting-info h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-emerald);
}

.greeting-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.level-progress-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 260px;
}

.progress-track {
  flex: 1;
  height: 10px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--primary-light));
  border-radius: var(--radius-full);
  width: 25%;
  transition: width 0.6s ease;
}

/* تنسيق الحاويات والأقسام */
.main-wrapper {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2.2rem 1.5rem 4rem;
}

.section-block {
  margin-bottom: 3.5rem;
  scroll-margin-top: 130px;
}

.section-header {
  margin-bottom: 1.8rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 0.8rem;
  position: relative;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 90px;
  height: 3px;
  background: var(--accent-gold);
  border-radius: 2px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.section-icon-badge {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--primary-emerald);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-sm);
}

.section-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary-emerald);
  line-height: 1.2;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.read-listen-btn {
  background: #fff;
  border: 1px solid var(--border-subtle);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary-emerald);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.read-listen-btn:hover {
  background: var(--primary-emerald);
  color: #fff;
}

/* ==========================================================
   قسم أصول الدين المبارك
   ========================================================== */
.roots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.root-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.root-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-gold);
}

.root-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.root-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
}

.root-index-badge {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-muted);
}

.root-card-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-emerald);
  margin-bottom: 0.6rem;
}

.root-definition {
  font-size: 0.96rem;
  line-height: 1.8;
  color: var(--text-main);
  background: var(--bg-surface);
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  border-right: 3px solid var(--accent-gold);
  margin-bottom: 1rem;
}

.quran-quote-box {
  font-family: 'Amiri', serif;
  font-size: 1.15rem;
  line-height: 2;
  color: var(--primary-dark);
  background: #fbf8f0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
  margin-top: auto;
  border: 1px dashed rgba(212, 175, 55, 0.4);
}

/* قسم الأئمة الاثني عشر التفاعلي المبارك */
.imams-showcase-box {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-top: 1.5rem;
}

.imams-intro-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.imams-intro-title h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.imams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.imam-mini-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  text-align: center;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
}

.imam-mini-card:hover {
  background: #fff;
  transform: translateY(-3px);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-sm);
}

.imam-number {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-emerald);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.imam-icon-circle {
  width: 50px;
  height: 50px;
  margin: 0.5rem auto 0.8rem;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-emerald);
  font-size: 1.25rem;
}

.imam-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-emerald);
  margin-bottom: 0.3rem;
}

.imam-title {
  font-size: 0.8rem;
  color: var(--accent-gold-dark);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.imam-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================
   قسم فروع الدين المبارك
   ========================================================== */
.branches-tree-container {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-sm);
}

.tree-header-badge {
  text-align: center;
  margin-bottom: 2rem;
}

.tree-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-emerald);
  color: var(--accent-gold-light);
  font-size: 1.15rem;
  font-weight: 900;
  padding: 0.6rem 2rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--accent-gold);
}

.branches-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  position: relative;
}

@media (max-width: 768px) {
  .branches-two-columns {
    grid-template-columns: 1fr;
  }
}

.branch-col-header {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-emerald);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px dashed var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.branch-item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
  cursor: pointer;
}

.branch-item-card:hover {
  background: #fff;
  border-color: var(--primary-light);
  transform: translateX(-5px);
  box-shadow: var(--shadow-sm);
}

.branch-item-card.highlight {
  background: #f0fdf4;
  border: 1px solid #86efac;
}

.branch-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border-subtle);
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.branch-item-card:hover .branch-icon-box {
  background: var(--primary-emerald);
  color: #fff;
}

.branch-text-info h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.branch-text-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================
   قسم الصلاة المبارك (صفحات 11 و 12 و 13 و 14)
   ========================================================== */
.prayer-master-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* آيات الصلاة والحديث النبوي الشريف */
.prayer-intro-box {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-sm);
}

.hadith-featured-card {
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.hadith-speaker {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary-emerald);
  margin-bottom: 0.5rem;
}

.hadith-text {
  font-family: 'Amiri', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #92400e;
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.hadith-footer-note {
  font-size: 0.85rem;
  color: #b45309;
}

.definitions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .definitions-row {
    grid-template-columns: 1fr;
  }
}

.definition-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  border-right: 4px solid var(--primary-emerald);
}

.definition-box h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-emerald);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.definition-box p {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.7;
}

/* أقسام الصلاة الأربعة (ص 13) */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.cat-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.cat-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.cat-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.cat-example {
  font-size: 0.9rem;
  color: var(--text-main);
  background: var(--bg-surface);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
}

.cat-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* الصلوات الواجبة الست في زماننا (ص 13) */
.obligatory-box {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.six-prayers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.six-prayer-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.six-num-badge {
  width: 36px;
  height: 36px;
  background: var(--accent-gold);
  color: #1e1b18;
  font-weight: 900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.six-info h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-emerald);
  margin-bottom: 0.2rem;
}

.six-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* الصلوات اليومية الخمس والـ 17 ركعة (ص 14) */
.daily-prayers-section {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-sm);
}

.daily-header-summary {
  background: linear-gradient(135deg, var(--primary-emerald), var(--primary-light));
  color: #fff;
  border-radius: var(--radius-md);
  padding: 1.4rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
  border: 2px solid var(--accent-gold);
}

.daily-header-summary h3 {
  font-size: 1.35rem;
  font-weight: 800;
}

.rakats-total-pill {
  background: var(--accent-gold);
  color: #1e1b18;
  font-size: 1.1rem;
  font-weight: 900;
  padding: 0.5rem 1.4rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.daily-prayers-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}

.prayer-time-card {
  border-radius: var(--radius-md);
  padding: 1.5rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  min-height: 220px;
}

.prayer-time-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.prayer-time-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.pt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  margin-bottom: 0.8rem;
}

.pt-name {
  font-size: 1.25rem;
  font-weight: 800;
}

.pt-rakats {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
}

.pt-time {
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
  margin-bottom: 0.8rem;
  line-height: 1.5;
  opacity: 0.95;
}

.pt-sky-state {
  margin-top: auto;
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================
   قسم شروط الصلاة المبارك
   ========================================================== */
.conditions-container {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.condition-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.condition-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.cond-num-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.cond-title-wrap h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-emerald);
}

.cond-summary-text {
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

/* تفصيل الطهارة والحدث الأصغر والأكبر */
.taharah-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .taharah-subgrid {
    grid-template-columns: 1fr;
  }
}

.hadath-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.3rem;
}

.hadath-box h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hadath-box.asghar h4 {
  color: var(--c-blue);
}

.hadath-box.akbar h4 {
  color: var(--c-purple);
}

.hadath-ruling {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  background: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.hadath-causes-list {
  list-style: none;
}

.hadath-causes-list li {
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hadath-causes-list li i {
  font-size: 0.75rem;
  color: var(--accent-gold);
}

.water-note-alert {
  background: #fffbeb;
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #92400e;
  font-size: 1rem;
  font-weight: 800;
}

.water-note-alert i {
  font-size: 1.4rem;
  color: var(--c-blue);
}

/* ==========================================================
   قسم الألعاب التفاعلية والتحديات
   ========================================================== */
.games-hub-wrapper {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-sm);
}

.games-nav-tabs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 0.8rem;
  overflow-x: auto;
}

.game-tab-btn {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  white-space: nowrap;
}

.game-tab-btn.active, .game-tab-btn:hover {
  background: var(--primary-emerald);
  color: #fff;
  border-color: var(--primary-emerald);
}

.game-active-area {
  min-height: 380px;
}

/* لعبة تصنيف أصول الدين وفروع الدين */
.classify-game-board {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.classify-deck-zone {
  background: var(--bg-surface);
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  min-height: 90px;
  align-items: center;
  justify-content: center;
}

.game-card-chip {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.6rem 1.4rem;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
  cursor: grab;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  user-select: none;
}

.game-card-chip:hover {
  transform: scale(1.05);
  border-color: var(--accent-gold);
}

.game-card-chip.dragging {
  opacity: 0.5;
}

.classify-drop-zones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .classify-drop-zones {
    grid-template-columns: 1fr;
  }
}

.drop-basket {
  background: #fff;
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.drop-basket.drag-over {
  border-color: var(--accent-gold);
  background: #fffbeb;
}

.drop-basket-header {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-emerald);
  margin-bottom: 1rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.drop-basket-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  flex: 1;
  align-content: flex-start;
}

/* لعبة ترتيب الأئمة */
.sorting-imams-game {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sorting-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 1.2rem;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  justify-content: center;
}

.sorting-target-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.sorting-slot {
  background: #fff;
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition);
}

.slot-order-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================
   قسم الاختبار التفاعلي والشهادة الشرفية (Quiz & Certificate)
   ========================================================== */
.quiz-wrapper {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-sm);
}

.quiz-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.question-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  margin-bottom: 1.8rem;
}

.question-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-emerald);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.option-btn {
  background: #fff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.4rem;
  text-align: right;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.option-btn:hover {
  border-color: var(--accent-gold);
  background: #fffdf5;
  transform: translateX(-4px);
}

.option-btn.correct {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.option-btn.incorrect {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.quiz-feedback-box {
  margin-top: 1.2rem;
  padding: 1rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  display: none;
}

.quiz-feedback-box.show {
  display: block;
}

.quiz-feedback-box.correct {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.quiz-feedback-box.incorrect {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* شهادة التفوق الشرفية */
.certificate-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.certificate-modal-overlay.active {
  display: flex;
}

.certificate-paper {
  background: #fffefb;
  border: 12px double var(--accent-gold);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  max-width: 780px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  background-image: radial-gradient(circle at center, rgba(212, 175, 55, 0.04) 0%, transparent 70%);
}

.certificate-header h2 {
  font-family: 'Amiri', serif;
  font-size: 2.3rem;
  color: var(--primary-emerald);
  margin-bottom: 0.3rem;
}

.certificate-subtitle {
  font-size: 1.05rem;
  color: var(--accent-gold-dark);
  font-weight: 800;
  margin-bottom: 2rem;
}

.student-name-cert {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary-dark);
  text-decoration: underline;
  text-decoration-color: var(--accent-gold);
  text-underline-offset: 8px;
  margin: 1rem 0;
}

.certificate-seal {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), #b8860b);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto;
  box-shadow: var(--shadow-gold);
  border: 3px solid #fff;
}

.certificate-seal i {
  font-size: 1.8rem;
}

.certificate-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* الفوتر الإسلامي الأنيق */
.islamic-footer {
  background: var(--primary-dark);
  color: #fff;
  padding: 3rem 1.5rem 2rem;
  border-top: 4px solid var(--accent-gold);
  text-align: center;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
}

.footer-dua {
  font-family: 'Amiri', serif;
  font-size: 1.35rem;
  color: var(--accent-gold-light);
  margin-bottom: 1rem;
}

.footer-rights {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0.8rem;
}

.footer-butterfly-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent-gold-light);
  text-decoration: none;
  font-weight: 800;
  padding: 0.45rem 1.2rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.35);
  transition: all 0.25s ease;
}

.footer-butterfly-link:hover {
  background: rgba(212, 175, 55, 0.2);
  color: #fff;
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
}

/* طباعة الشهادة */
@media print {
  body * {
    visibility: hidden;
  }
  .certificate-paper, .certificate-paper * {
    visibility: visible;
  }
  .certificate-paper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: 8px double #d4af37;
  }
  .certificate-actions, .close-cert-btn {
    display: none !important;
  }
}

/* ==========================================================
   إضافات دروس الوضوء، التيمم، الغسل، ولباس المصلي (ص 16 - 33)
   ========================================================== */

/* خطوات الوضوء خطوة بخطوة */
.wudhu-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.wudhu-step-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.wudhu-step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-blue);
}

.step-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.step-badge-num {
  background: linear-gradient(135deg, var(--c-blue), #0369a1);
  color: #fff;
  font-weight: 800;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}

.step-dua-box {
  background: #f0fdf4;
  border: 1px dashed #16a34a;
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  margin-top: auto;
  position: relative;
}

.step-dua-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #15803d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.step-dua-text {
  font-family: 'Amiri', serif;
  font-size: 1.15rem;
  color: #14532d;
  line-height: 1.8;
}

/* شروط الوضوء الـ 13 */
.wudhu-conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
  margin-top: 1.2rem;
}

.wudhu-cond-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.92rem;
  line-height: 1.6;
}

.wudhu-cond-num {
  background: var(--primary-emerald);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* قسم التيمم والغسل */
.tayammum-steps-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.tayammum-step-box {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.tayammum-step-box:hover {
  transform: translateY(-3px);
  border-top-color: var(--primary-emerald);
  box-shadow: var(--shadow-md);
}

.tayammum-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fffbeb;
  border: 2px solid var(--accent-gold);
  color: #b45309;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.8rem;
}

/* بطاقة مقارنة لباس المصلي للأولاد والبنات */
.dress-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .dress-comparison-grid {
    grid-template-columns: 1fr;
  }
}

.dress-card {
  background: #fff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
}

.dress-card.boys {
  border-top: 6px solid #0284c7;
}

.dress-card.girls {
  border-top: 6px solid #e11d48;
}

.dress-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.dress-avatar-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
}

.dress-details-text {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.dress-warning-box {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: auto;
}

/* ==========================================================
   بوابة الدروس التفاعلية (واجهة المنصة الرئيسية والتحويل للدرس)
   Lessons Portal Hub & Active Lesson Navigation
   ========================================================== */

.lessons-portal-section {
  margin-bottom: 3rem;
  animation: fadeInPage 0.35s ease;
}

.portal-header-bar {
  text-align: center;
  margin-bottom: 2.2rem;
}

.portal-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid var(--accent-gold);
  color: #854d0e;
  padding: 0.55rem 1.5rem;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.portal-header-pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transition: 0.5s;
}

.portal-header-pill:hover::before {
  left: 100%;
}

.portal-header-pill:hover {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #d97706;
  color: #713f12;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35);
}

.portal-header-pill:active {
  transform: translateY(-1px) scale(0.99);
}

.portal-header-pill i {
  color: #b45309;
  font-size: 1.05rem;
  transition: transform 0.2s;
}

.portal-header-pill:hover i {
  transform: scale(1.15) rotate(-5deg);
  color: #92400e;
}

body.theme-girls .portal-header-pill {
  background: linear-gradient(135deg, #fff1f2 0%, #fce7f3 100%);
  border-color: #f472b6;
  color: #9d174d;
  box-shadow: 0 2px 8px rgba(219, 39, 119, 0.18);
}

body.theme-girls .portal-header-pill:hover {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
  border-color: #db2777;
  color: #831843;
  box-shadow: 0 6px 18px rgba(219, 39, 119, 0.28);
}

body.theme-girls .portal-header-pill i {
  color: #db2777;
}

body.theme-girls .portal-header-pill:hover i {
  color: #be185d;
}

.portal-main-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary-emerald);
  margin-bottom: 0.4rem;
  transition: color 0.35s ease;
}

.portal-main-desc {
  font-size: 1rem;
  color: var(--text-muted);
}

.lessons-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

.lesson-portal-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.lesson-portal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--border-subtle);
  transition: var(--transition);
}

.lesson-portal-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-gold);
}

.lesson-portal-card:hover::before {
  background: linear-gradient(90deg, var(--accent-gold), var(--primary-light));
}

.portal-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.portal-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.lesson-portal-card:hover .portal-card-icon {
  transform: scale(1.08) rotate(3deg);
}

.portal-card-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-muted);
}

.portal-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  line-height: 1.35;
  transition: var(--transition);
}

.lesson-portal-card:hover .portal-card-title {
  color: var(--primary-emerald);
}

.portal-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.4rem;
  flex: 1;
}

.portal-card-action-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.2rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
  cursor: pointer;
}

.lesson-portal-card:hover .portal-card-action-btn {
  background: var(--primary-emerald);
  color: #fff;
  border-color: var(--primary-emerald);
}

/* شريط الترويسة داخل الدرس النشط */
.active-lesson-wrapper {
  animation: fadeInPage 0.4s ease;
}

.active-lesson-top-bar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 75px;
  z-index: 950;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-back-hub {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.55rem 1.4rem;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary-emerald);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition);
}

.btn-back-hub:hover {
  background: var(--primary-emerald);
  color: #fff;
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.active-lesson-title-box {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.active-lesson-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--primary-emerald);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.active-lesson-title-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-emerald);
}

.lesson-step-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-step-nav {
  background: #fff;
  border: 1px solid var(--border-subtle);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.btn-step-nav:hover {
  background: var(--bg-surface);
  color: var(--primary-emerald);
  border-color: var(--accent-gold);
}

@keyframes fadeInPage {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* تحسينات بطاقات الأذان والإقامة وأفعال وكيفية الصلاة */
.action-btn-circle:hover {
  background: var(--accent-gold);
  color: #1e1b18;
  transform: scale(1.08);
}

/* تحسينات بطاقات المنافيات والشكوك وصلاة الآيات والمستحبات وفروع الدين */
#invalidatorsContainer > div > div:hover,
#doubtsAndSujudContainer .hadith-featured-card:hover,
#mustahabbPrayersContainer > div:hover,
#ayatPrayerContainer > div:hover,
#congregationContainer > div:hover,
#fastingContainer > div:hover,
#zakatContainer > div:hover,
#khumsContainer > div:hover,
#hajjContainer > div:hover,
#jihadContainer > div:hover,
#amrBilMaroofContainer > div:hover,
#muharramatContainer > div:hover {
  transform: translateY(-3px);
  transition: var(--transition);
}

@media (max-width: 768px) {
  .responsive-two-cols {
    grid-template-columns: 1fr !important;
  }
}

/* زر التلاوة القرآنية العطرة بصوت القارئ مشاري راشد العفاسي */
.quran-listen-btn {
  background: linear-gradient(135deg, #0d5c46 0%, #15803d 100%);
  color: #fff !important;
  border: 1px solid rgba(217, 119, 6, 0.4);
  box-shadow: 0 2px 8px rgba(13, 92, 70, 0.25);
  margin-top: 0.75rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.quran-listen-btn:hover {
  background: linear-gradient(135deg, #094434 0%, #166534 100%);
  color: #fef08a !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(13, 92, 70, 0.38);
  border-color: var(--accent-gold);
}

.quran-listen-btn:active {
  transform: translateY(0);
}

.quran-listen-btn i {
  color: #fde047;
  font-size: 0.95rem;
}

.quran-quote-box.has-audio {
  position: relative;
  transition: all 0.25s ease;
}

.quran-quote-box.has-audio:hover {
  border-color: rgba(217, 119, 6, 0.8);
  background: #fbf5e6;
}

/* زر الفهرس السريع في شريط الدرس النشط */
.btn-open-index {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
  color: #854d0e !important;
  border: 1.5px solid var(--accent-gold) !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.18);
  transition: all 0.22s ease !important;
}

.btn-open-index:hover {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
  border-color: #d97706 !important;
  color: #713f12 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-open-index i {
  color: #b45309;
}

/* ==========================================================
   النوافذ المنبثقة المشتركة وفهرس الدروس (Modals & Overlays)
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-overlay.active {
  display: flex;
}

.lessons-index-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: indexOverlayFadeIn 0.25s ease-out;
}

.lessons-index-overlay.active {
  display: flex;
}

@keyframes indexOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lessons-index-card {
  background: #ffffff;
  width: 100%;
  max-width: 950px;
  max-height: 88vh;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(212, 175, 55, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid rgba(212, 175, 55, 0.6);
  position: relative;
  animation: indexCardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes indexCardPop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.lessons-index-header {
  background: linear-gradient(135deg, #0d5c46 0%, #15803d 60%, #064e3b 100%);
  color: #ffffff;
  padding: 1.1rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--accent-gold);
}

.lessons-index-header-lead {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.lessons-index-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fde047;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.lessons-index-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
}

.lessons-index-subtitle {
  font-size: 0.82rem;
  color: #dcfce7;
  margin: 0.15rem 0 0 0;
  font-weight: 600;
}

.lessons-index-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.1rem;
}

.lessons-index-close-btn:hover {
  background: #ef4444;
  border-color: #dc2626;
  color: #fff;
  transform: scale(1.08) rotate(90deg);
}

/* شريط البحث التفاعلي في الفهرس */
.lessons-index-search-wrap {
  position: relative;
  padding: 0.85rem 1.6rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.lessons-index-search-wrap .search-icon {
  position: absolute;
  right: 2.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1rem;
  pointer-events: none;
}

.lessons-index-search-input {
  width: 100%;
  padding: 0.7rem 2.8rem 0.7rem 1.1rem;
  border-radius: 9999px;
  border: 1.5px solid #cbd5e1;
  font-family: inherit;
  font-size: 0.92rem;
  background: #ffffff;
  color: #1e293b;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.lessons-index-search-input:focus {
  border-color: #0d5c46;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(13, 92, 70, 0.15);
}

/* المحتوى القابل للتمرير داخل الفهرس */
.lessons-index-content {
  padding: 1.4rem 1.6rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  background: #fafaf9;
}

.index-group-card {
  background: #ffffff;
  border: 1px solid #e7e5e4;
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.index-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1.5px dashed #e2e8f0;
}

.index-group-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #064e3b;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
}

.index-group-title i {
  color: var(--accent-gold);
}

.index-group-count {
  font-size: 0.75rem;
  font-weight: 700;
  background: #ecfdf5;
  color: #047857;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid #a7f3d0;
}

.index-lessons-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.index-lesson-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.index-lesson-item:hover {
  background: #ecfdf5;
  border-color: #6ee7b7;
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(13, 92, 70, 0.12);
}

.index-lesson-item:active {
  transform: translateX(-1px);
}

.index-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s;
}

.index-lesson-item:hover .index-item-icon {
  transform: scale(1.08) rotate(4deg);
}

.index-item-body {
  flex: 1;
  min-width: 0;
}

.index-item-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  transition: color 0.2s;
}

.index-lesson-item:hover .index-item-title {
  color: #065f46;
}

.index-item-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0d5c46;
  background: rgba(13, 92, 70, 0.08);
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  margin-top: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.index-item-arrow {
  color: #cbd5e1;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.index-lesson-item:hover .index-item-arrow {
  color: #059669;
  transform: translateX(-4px);
}

/* حالة عدم العثور على نتائج بحث */
.index-empty-search {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #64748b;
}

.index-empty-search i {
  font-size: 2.5rem;
  color: #cbd5e1;
  margin-bottom: 0.85rem;
}

.index-empty-search h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: 0.35rem;
}

.index-empty-search p {
  font-size: 0.85rem;
  color: #94a3b8;
}

/* شريط الإجراءات السفلي للفهرس */
.lessons-index-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 0.85rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-scroll-hub {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 0.5rem 1.2rem;
  border-radius: 9999px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-scroll-hub:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #064e3b;
  transform: translateY(-2px);
}

.btn-close-modal {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s;
}

.btn-close-modal:hover {
  background: #e2e8f0;
  color: #1e293b;
  border-color: #94a3b8;
}

@media (max-width: 650px) {
  .lessons-index-card {
    max-height: 94vh;
    border-radius: 16px;
  }
  .lessons-index-header {
    padding: 0.9rem 1.1rem;
  }
  .lessons-index-search-wrap {
    padding: 0.75rem 1.1rem;
  }
  .lessons-index-content {
    padding: 1rem 1.1rem;
    gap: 1rem;
  }
  .index-lessons-list {
    grid-template-columns: 1fr;
  }
  .lessons-index-footer {
    padding: 0.75rem 1.1rem;
    flex-direction: column;
    align-items: stretch;
  }
  .btn-scroll-hub, .btn-close-modal {
    justify-content: center;
  }
}

/* ==========================================================
   تخصيصات نمط البطلات (Girls Theme Platform Overrides)
   ========================================================== */

/* شريط التحكم والترويسة داخل الدرس */
body.theme-girls .active-lesson-top-bar {
  border-color: #fbcfe8;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(190, 24, 93, 0.08);
}

body.theme-girls .active-lesson-icon {
  background: linear-gradient(135deg, #831843, #be185d);
  color: #fde047;
}

body.theme-girls .active-lesson-title-text {
  color: #831843;
}

body.theme-girls .btn-back-hub {
  background: #fdf2f8;
  color: #831843;
  border-color: #fbcfe8;
}

body.theme-girls .btn-back-hub:hover {
  background: #831843;
  color: #ffffff;
  border-color: #831843;
}

body.theme-girls .btn-step-nav {
  color: #734358;
  border-color: #fbcfe8;
}

body.theme-girls .btn-step-nav:hover {
  background: #fdf2f8;
  color: #831843;
  border-color: #f472b6;
}

body.theme-girls .btn-open-index {
  background: linear-gradient(135deg, #fff1f2 0%, #fce7f3 100%) !important;
  color: #9d174d !important;
  border-color: #f472b6 !important;
  box-shadow: 0 2px 6px rgba(219, 39, 119, 0.18) !important;
}

body.theme-girls .btn-open-index:hover {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%) !important;
  color: #831843 !important;
  border-color: #db2777 !important;
  box-shadow: 0 4px 12px rgba(219, 39, 119, 0.3) !important;
}

body.theme-girls .btn-open-index i {
  color: #db2777;
}

/* بطاقات بوابة الدروس */
body.theme-girls .lesson-portal-card:hover {
  border-color: #f472b6;
  box-shadow: 0 10px 25px rgba(190, 24, 93, 0.14);
}

body.theme-girls .lesson-portal-card:hover .portal-card-title {
  color: #831843;
}

body.theme-girls .lesson-portal-card:hover .portal-card-action-btn {
  background: #831843;
  color: #ffffff;
  border-color: #831843;
}

/* الفوتر الإسلامي لنمط البطلات */
body.theme-girls .islamic-footer {
  background: linear-gradient(135deg, #4c0519 0%, #70092c 55%, #831843 100%);
  border-top: 4px solid #f59e0b;
}

body.theme-girls .footer-dua {
  color: #fde68a;
}

body.theme-girls .footer-butterfly-link {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fef08a;
}

/* نافذة الفهرس التفاعلي لنمط البطلات */
body.theme-girls .lessons-index-header {
  background: linear-gradient(135deg, #831843 0%, #be185d 60%, #500724 100%);
  border-bottom: 2px solid #f59e0b;
}

body.theme-girls .lessons-index-card {
  border-color: rgba(244, 114, 182, 0.65);
  box-shadow: 0 25px 50px -12px rgba(131, 24, 67, 0.35), 0 0 0 1px rgba(244, 114, 182, 0.4);
}

body.theme-girls .lessons-index-search-input:focus {
  border-color: #831843;
  box-shadow: 0 0 0 3px rgba(131, 24, 67, 0.16);
}

body.theme-girls .index-group-title {
  color: #831843;
}

body.theme-girls .index-group-title i {
  color: #f59e0b;
}

body.theme-girls .index-group-count {
  background: #fdf2f8;
  color: #be185d;
  border-color: #fbcfe8;
}

body.theme-girls .index-lesson-item:hover {
  background: #fdf2f8;
  border-color: #f472b6;
  box-shadow: 0 4px 12px rgba(190, 24, 93, 0.12);
}

body.theme-girls .index-lesson-item:hover .index-item-title {
  color: #831843;
}

body.theme-girls .index-lesson-item:hover .index-item-arrow {
  color: #be185d;
}

body.theme-girls .index-item-badge {
  color: #9d174d;
  background: rgba(190, 24, 93, 0.08);
}

body.theme-girls .btn-scroll-hub {
  background: #fdf2f8;
  color: #be185d;
  border-color: #fbcfe8;
}

body.theme-girls .btn-scroll-hub:hover {
  background: #fce7f3;
  color: #831843;
  border-color: #f472b6;
}

/* ==========================================================
   ميدان المسابقات والأنشطة الصفية (Classroom Arena & Teams)
   ========================================================== */
.classroom-top-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-podium-trigger {
  background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
  color: #92400e !important;
  border-color: #f59e0b !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25) !important;
}

.btn-podium-trigger:hover {
  background: linear-gradient(135deg, #fde68a, #fcd34d) !important;
  transform: translateY(-2px);
}

/* لوحة تحكم الفرق الصفية */
.classroom-control-panel {
  background: #ffffff;
  border: 2px solid rgba(27, 138, 107, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 24px rgba(13, 92, 70, 0.08);
  position: relative;
  overflow: hidden;
}

.classroom-control-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1b8a6b, #d4af37, #0284c7);
}

.classroom-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.3rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px dashed var(--border-subtle);
}

.classroom-teams-count-selector {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.selector-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.selector-label i {
  color: var(--primary-emerald);
}

.teams-num-buttons {
  display: flex;
  gap: 0.4rem;
}

.team-count-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.team-count-btn:hover {
  border-color: var(--primary-emerald);
  color: var(--primary-emerald);
}

.team-count-btn.active {
  background: linear-gradient(135deg, var(--primary-emerald), var(--primary-dark));
  color: #ffffff;
  border-color: var(--primary-dark);
  box-shadow: 0 4px 10px rgba(27, 138, 107, 0.28);
}

/* منبه ومؤشر الدور النشط */
.active-turn-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1.5px solid #10b981;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  color: #065f46;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.active-turn-indicator i.fa-shake {
  color: #f59e0b;
  font-size: 1.1rem;
}

.active-turn-indicator strong {
  color: #047857;
  font-size: 1.05rem;
  font-weight: 900;
}

.btn-switch-turn {
  background: #047857;
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.btn-switch-turn:hover {
  background: #064e3b;
  transform: scale(1.04);
}

/* شبكة بطاقات الفرق الصفية */
.classroom-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.team-score-card {
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.team-score-card:hover {
  border-color: var(--team-color, #1b8a6b);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.team-score-card.is-active-turn {
  border-color: var(--team-color, #1b8a6b);
  background: linear-gradient(180deg, #ffffff 0%, rgba(27, 138, 107, 0.04) 100%);
  box-shadow: 0 0 0 4px rgba(27, 138, 107, 0.18), 0 10px 25px rgba(27, 138, 107, 0.12);
  transform: scale(1.02);
}

.team-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.team-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.team-info {
  flex-grow: 1;
}

.team-title {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.team-turn-chip {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
}

.team-score-card.is-active-turn .team-turn-chip {
  color: var(--primary-emerald);
  font-weight: 900;
}

.team-score-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.team-score-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--team-color, #1b8a6b);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1;
}

.team-score-unit {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
}

.team-card-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
}

.btn-micro-score {
  border: none;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-micro-score.plus {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.btn-micro-score.plus:hover {
  background: #10b981;
  color: #ffffff;
}

.btn-micro-score.minus {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.btn-micro-score.minus:hover {
  background: #ef4444;
  color: #ffffff;
}

/* تبويبات النمط الصفي */
.classroom-modes-tabs {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.classroom-mode-btn {
  flex: 1;
  min-width: 260px;
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.4rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.classroom-mode-btn i {
  font-size: 1.25rem;
}

.classroom-mode-btn:hover {
  border-color: var(--primary-emerald);
  color: var(--primary-emerald);
  transform: translateY(-2px);
}

.classroom-mode-btn.active {
  background: linear-gradient(135deg, var(--primary-emerald), var(--primary-dark));
  color: #ffffff;
  border-color: var(--primary-dark);
  box-shadow: 0 6px 18px rgba(27, 138, 107, 0.25);
}

/* شريط تصنيفات بنك الأسئلة */
.contests-categories-strip {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.contest-cat-btn {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: var(--transition);
}

.contest-cat-btn:hover {
  border-color: var(--accent-gold);
  color: var(--text-main);
}

.contest-cat-btn.active {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
  font-weight: 900;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.2);
}

/* مسرح السؤال والتحدي الصفي */
.classroom-question-stage {
  background: #ffffff;
  border: 2px solid rgba(27, 138, 107, 0.2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.classroom-stage-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stage-info-pill {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.cat-pill-badge {
  background: #ecfdf5;
  color: #065f46;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid #a7f3d0;
}

.num-pill-badge {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
}

.stage-team-turn {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.stage-team-turn strong {
  color: #b45309;
}

/* ويدجت المؤقت التفاعلي */
.classroom-timer-widget {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}

.classroom-timer-widget i {
  color: #f59e0b;
}

.timer-digits {
  font-size: 1.25rem;
  font-weight: 900;
  font-family: 'Inter', system-ui, sans-serif;
  color: #dc2626;
  min-width: 24px;
  text-align: center;
}

.timer-toggle-btn {
  background: #e2e8f0;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #475569;
  transition: var(--transition);
}

.timer-toggle-btn:hover {
  background: #cbd5e1;
  color: #1e293b;
}

.classroom-timer-track {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.classroom-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width 0.3s ease, background 0.3s ease;
}

/* محتوى السؤال الصفي */
.classroom-question-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.classroom-question-text {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.5;
  flex-grow: 1;
}

.question-tts-btn {
  flex-shrink: 0;
  margin-top: 0.2rem;
}

/* شبكة خيارات الإجابة الصفية الكبيرة */
.classroom-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.classroom-option-btn {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-align: right;
  transition: all 0.2s ease;
  position: relative;
}

.classroom-option-btn:hover:not(:disabled) {
  border-color: var(--primary-emerald);
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.opt-letter-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  flex-shrink: 0;
  transition: var(--transition);
}

.classroom-option-btn:hover:not(:disabled) .opt-letter-badge {
  background: var(--primary-emerald);
  color: #ffffff;
}

.opt-text {
  flex-grow: 1;
  line-height: 1.4;
}

.opt-status-icon {
  font-size: 1.25rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* حالات الإجابة الصحيحة والخاطئة */
.classroom-option-btn.correct {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}

.classroom-option-btn.correct .opt-letter-badge {
  background: #10b981 !important;
  color: #ffffff !important;
}

.classroom-option-btn.correct .opt-status-icon {
  color: #10b981 !important;
}

.classroom-option-btn.incorrect {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #991b1b !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.classroom-option-btn.incorrect .opt-letter-badge {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.classroom-option-btn.incorrect .opt-status-icon {
  color: #ef4444 !important;
}

/* بطاقة التعزيز والشرح الصفي */
.classroom-feedback-card {
  border-radius: var(--radius-md);
  padding: 1.4rem;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.classroom-feedback-card.success-feedback {
  background: #ecfdf5;
  border: 2px solid #10b981;
}

.classroom-feedback-card.error-feedback {
  background: #fef2f2;
  border: 2px solid #ef4444;
}

.classroom-feedback-card.timeout-feedback {
  background: #fffbeb;
  border: 2px solid #f59e0b;
}

.feedback-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 900;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.6rem;
}

.feedback-badge.success {
  background: #10b981;
  color: #ffffff;
}

.feedback-badge.error {
  background: #ef4444;
  color: #ffffff;
}

.feedback-badge.warning {
  background: #f59e0b;
  color: #ffffff;
}

.feedback-team-lead {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.feedback-correct-answer {
  font-size: 1rem;
  font-weight: 800;
  color: #b91c1c;
  margin-bottom: 0.4rem;
}

.feedback-explanation {
  font-size: 0.98rem;
  color: var(--text-main);
  line-height: 1.5;
}

.feedback-rebound-prompt {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(239, 68, 68, 0.3);
  font-size: 0.95rem;
  font-weight: 800;
  color: #b91c1c;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* شريط التحكم السفلي في المسرح */
.classroom-stage-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-subtle);
}

.quick-score-assist {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-muted);
}

.btn-score-chip {
  border: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-score-chip.plus {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.btn-score-chip.plus:hover {
  background: #10b981;
  color: #ffffff;
}

.btn-score-chip.minus {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.btn-score-chip.minus:hover {
  background: #ef4444;
  color: #ffffff;
}

.stage-footer-nav {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

/* نافذة منصة التتويج الصفي */
.team-podium-overlay {
  z-index: 10000;
}

.team-podium-card {
  max-width: 680px;
  width: 95%;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  border: 3px solid #f59e0b;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.podium-header {
  margin-bottom: 1.8rem;
}

.podium-trophy-icon {
  font-size: 3.5rem;
  color: #f59e0b;
  margin-bottom: 0.6rem;
  filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.4));
  animation: bounce 2s infinite;
}

.podium-header h2 {
  font-size: 1.7rem;
  font-weight: 900;
  color: #78350f;
  margin-bottom: 0.3rem;
}

.podium-header p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.podium-rankings {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.8rem;
}

.podium-team-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.podium-team-card.rank-1 {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: #f59e0b;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
  transform: scale(1.02);
}

.podium-rank-ribbon {
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.podium-team-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.podium-team-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-main);
  text-align: right;
  flex-grow: 1;
}

.podium-badge-tag {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
}

.podium-score-pill {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  color: var(--text-main);
  flex-shrink: 0;
}

.podium-score-pill strong {
  font-size: 1.25rem;
  font-weight: 900;
  color: #d97706;
  font-family: 'Inter', system-ui, sans-serif;
}

.podium-cheer-message {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-dark);
  background: #ecfdf5;
  border: 1px dashed #10b981;
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.6rem;
  line-height: 1.5;
}

.podium-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* تخصيص نمط البطلات لميدان المسابقات والفرق */
body.theme-girls .classroom-control-panel {
  border-color: rgba(244, 114, 182, 0.4);
}

body.theme-girls .classroom-control-panel::before {
  background: linear-gradient(90deg, #be185d, #f59e0b, #db2777);
}

body.theme-girls .classroom-mode-btn.active {
  background: linear-gradient(135deg, #be185d, #831843);
  border-color: #831843;
}

body.theme-girls .team-score-card.is-active-turn {
  background: linear-gradient(180deg, #ffffff 0%, rgba(190, 24, 93, 0.04) 100%);
  box-shadow: 0 0 0 4px rgba(190, 24, 93, 0.18), 0 10px 25px rgba(190, 24, 93, 0.12);
}

body.theme-girls .active-turn-indicator {
  background: linear-gradient(135deg, #fdf2f8, #fce7f3);
  border-color: #f472b6;
  color: #9d174d;
}

body.theme-girls .active-turn-indicator strong {
  color: #831843;
}

body.theme-girls .btn-switch-turn {
  background: #be185d;
}

body.theme-girls .btn-switch-turn:hover {
  background: #9d174d;
}

body.theme-girls .classroom-question-stage {
  border-color: rgba(244, 114, 182, 0.35);
}

body.theme-girls .podium-cheer-message {
  background: #fdf2f8;
  border-color: #f472b6;
  color: #831843;
}

