/* ========================================
   IslamiCalc - style.css
   الملف الرئيسي للتصميم الكامل
   ======================================== */

/* === 1. المتغيرات الرئيسية === */
:root {
  /* الألوان الرئيسية */
  --primary: #1a56db;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --gold: #f59e0b;
  --gold-dark: #d97706;
  --gold-light: #fcd34d;

  /* ألوان الخلفية - الوضع الداكن (الافتراضي) */
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #263548;
  --bg-nav: #0f172a;
  --border: #334155;

  /* ألوان النصوص */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* ألوان الحالات */
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  /* الخطوط */
  --font-arabic: "Cairo", sans-serif;
  --font-english: "Poppins", sans-serif;

  /* المسافات */
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);

  /* الانتقالات */
  --transition: all 0.3s ease;
}

/* === الوضع الفاتح === */
[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-nav: #ffffff;
  --border: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* === 2. الإعدادات الأساسية === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html[lang="ar"] {
  direction: rtl;
  font-family: var(--font-arabic);
}

html[lang="en"] {
  direction: ltr;
  font-family: var(--font-english);
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: clamp(14px, 2.5vw, 16px);
  line-height: 1.8;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* === 3. الخطوط === */
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800&display=swap");

/* === 4. شريط التنقل === */
.navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  box-shadow: var(--shadow);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  font-weight: 900;
}

.navbar-title {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0 auto;
}

.navbar-menu a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--primary-light);
  background: rgba(59, 130, 246, 0.1);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* زر تبديل اللغة */
.lang-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-arabic);
}

.lang-btn:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}

/* زر الوضع الداكن/الفاتح */
.theme-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 18px;
}

.theme-btn:hover {
  border-color: var(--gold);
}

/* زر تسجيل الدخول */
.login-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-arabic);
  white-space: nowrap;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(26, 86, 219, 0.4);
}

/* زر القائمة للجوال */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

/* === 5. المحتوى الرئيسي === */
main {
  margin-top: 64px;
  min-height: calc(100vh - 64px);
}

/* === 6. قسم الـ Hero === */
.hero {
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26, 86, 219, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--gold);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(15px, 2.5vw, 18px);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

/* === 7. آية اليوم === */
.verse-banner {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(26, 86, 219, 0.1) 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  max-width: 800px;
  margin: 0 auto 48px;
  text-align: center;
  position: relative;
}

.verse-text {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700;
  color: var(--gold);
  line-height: 2;
  margin-bottom: 8px;
}

.verse-source {
  font-size: 13px;
  color: var(--text-muted);
}

.verse-fade {
  animation: verseFade 1s ease;
}

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

/* === 8. بطاقات الأدوات === */
.section {
  padding: 48px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  opacity: 0;
  transition: var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  font-size: 36px;
  line-height: 1;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.card-arrow {
  margin-top: auto;
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* === 9. أوقات الصلاة في الرئيسية === */
.prayer-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.prayer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 80px;
}

.prayer-name {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.prayer-time {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-english);
}

.prayer-item.active .prayer-name {
  color: var(--gold);
}

.prayer-item.active .prayer-time {
  color: var(--gold);
}

.next-prayer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(26,86,219,0.15), rgba(245,158,11,0.15));
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius);
  padding: 12px 20px;
}

.next-label {
  font-size: 12px;
  color: var(--text-muted);
}

.next-countdown {
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
  font-family: var(--font-english);
}

/* === 10. زر الحاسبة === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font-arabic);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(26, 86, 219, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 86, 219, 0.4);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 17px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* === 11. الحاسبات === */
.calculator-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 24px;
}

.calc-header {
  text-align: center;
  margin-bottom: 40px;
}

.calc-icon {
  font-size: 56px;
  margin-bottom: 16px;
  display: block;
}

.calc-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  margin-bottom: 8px;
}

.calc-desc {
  color: var(--text-secondary);
  font-size: 15px;
}

.calc-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-input {
  background: var(--bg-main);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: var(--font-arabic);
  font-size: 16px;
  color: var(--text-primary);
  transition: var(--transition);
  width: 100%;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select {
  background: var(--bg-main);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: var(--font-arabic);
  font-size: 16px;
  color: var(--text-primary);
  cursor: pointer;
  width: 100%;
  outline: none;
  transition: var(--transition);
}

.form-select:focus {
  border-color: var(--primary);
}

/* نتيجة الحاسبة */
.calc-result {
  background: linear-gradient(135deg, rgba(26,86,219,0.1), rgba(245,158,11,0.1));
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  display: none;
  animation: resultAppear 0.4s ease;
}

.calc-result.show {
  display: block;
}

@keyframes resultAppear {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.result-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.result-value {
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 900;
  color: var(--gold);
  font-family: var(--font-english);
}

.result-unit {
  font-size: 18px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.result-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* === 12. Arena - ساحة التحدي === */
.arena-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  padding: 60px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.arena-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  color: white;
  margin-bottom: 8px;
}

.arena-title span {
  background: linear-gradient(135deg, var(--gold), #ff6b35);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* بطاقة السؤال */
.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 680px;
  margin: 0 auto;
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.quiz-lives {
  display: flex;
  gap: 6px;
  font-size: 22px;
}

.quiz-level {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-main);
  padding: 6px 14px;
  border-radius: 20px;
}

.quiz-xp {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
}

/* شريط التقدم */
.quiz-progress {
  width: 100%;
  height: 8px;
  background: var(--bg-main);
  border-radius: 10px;
  margin-bottom: 24px;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 10px;
  transition: width 0.5s ease;
}

/* عداد الوقت */
.quiz-timer {
  width: 100%;
  height: 6px;
  background: var(--bg-main);
  border-radius: 10px;
  margin-bottom: 28px;
  overflow: hidden;
}

.quiz-timer-bar {
  height: 100%;
  border-radius: 10px;
  transition: width 1s linear, background-color 0.5s ease;
}

.timer-green { background: var(--success); }
.timer-yellow { background: var(--warning); }
.timer-red { background: var(--error); }

/* السؤال */
.quiz-question {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.7;
  color: var(--text-primary);
}

/* خيارات الإجابة */
.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quiz-option {
  background: var(--bg-main);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: var(--font-arabic);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-option:hover {
  border-color: var(--primary);
  background: rgba(26, 86, 219, 0.08);
  transform: translateY(-2px);
}

.quiz-option.correct {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  animation: correctPulse 0.4s ease;
}

.quiz-option.wrong {
  border-color: var(--error);
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  animation: wrongShake 0.4s ease;
}

/* تأثيرات الإجابة */
@keyframes correctPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* XP يطير */
.xp-float {
  position: fixed;
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
  pointer-events: none;
  animation: xpFloat 1.2s ease forwards;
  z-index: 9999;
}

@keyframes xpFloat {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-80px) scale(1.3); }
}

/* === 13. الـ Leaderboard === */
.leaderboard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.leaderboard-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.leaderboard-tab {
  flex: 1;
  padding: 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
  font-family: var(--font-arabic);
}

.leaderboard-tab.active {
  color: var(--primary-light);
  border-bottom: 3px solid var(--primary);
  background: rgba(26, 86, 219, 0.05);
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.leaderboard-item:hover {
  background: var(--bg-card-hover);
}

.lb-rank {
  font-size: 18px;
  font-weight: 900;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.lb-rank-1 { color: var(--gold); }
.lb-rank-2 { color: #94a3b8; }
.lb-rank-3 { color: #cd7c2f; }

.lb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.lb-info {
  flex: 1;
}

.lb-name {
  font-size: 15px;
  font-weight: 700;
}

.lb-title {
  font-size: 12px;
  color: var(--text-muted);
}

.lb-xp {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold);
  font-family: var(--font-english);
}

/* الإطار الذهبي لأول 3 */
.lb-gold-frame .lb-avatar {
  border: 3px solid var(--gold);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

/* === 14. الشارات === */
.badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  min-width: 80px;
}

.badge:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.badge-icon {
  font-size: 28px;
}

.badge-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
}

.badge-bronze { border-color: #cd7c2f; }
.badge-silver { border-color: #94a3b8; }
.badge-gold {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.08);
}

.badge-locked {
  opacity: 0.4;
  filter: grayscale(1);
}

/* === 15. ملف المستخدم === */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  color: white;
}

.profile-name {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.profile-title {
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 16px;
}

.profile-level {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.level-bar {
  width: 100%;
  height: 10px;
  background: var(--bg-main);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
}

.level-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 10px;
  transition: width 1s ease;
}

.level-xp {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.stat-value {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-primary);
  font-family: var(--font-english);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* === 16. شريط Streak === */
.streak-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
}

.streak-fire {
  font-size: 24px;
  animation: fireFlicker 1.5s ease infinite alternate;
}

@keyframes fireFlicker {
  from { transform: scale(1) rotate(-3deg); }
  to { transform: scale(1.1) rotate(3deg); }
}

.streak-number {
  font-size: 24px;
  font-weight: 900;
  color: var(--gold);
  font-family: var(--font-english);
}

.streak-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* === 17. الفوتر === */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 24px 24px;
  margin-top: 80px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .navbar-title {
  font-size: 24px;
  display: block;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-col ul a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* === 18. شريط الكوكيز === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 9999;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

.cookie-text {
  font-size: 14px;
  color: var(--text-secondary);
  flex: 1;
}

.cookie-text a {
  color: var(--primary-light);
  text-decoration: none;
}

/* === 19. التنبيهات === */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  max-width: 90vw;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-success { border-color: var(--success); color: var(--success); }
.toast-error { border-color: var(--error); color: var(--error); }
.toast-gold { border-color: var(--gold); color: var(--gold); }

/* === 20. Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  transform: scale(0.9);
  transition: var(--transition);
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
  text-align: center;
}

/* === 21. Responsive - الجوال === */
@media (max-width: 768px) {
  .navbar-menu { display: none; }
  .navbar-menu.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    right: 0;
    left: 0;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
    z-index: 999;
  }
  .menu-toggle { display: flex; }

  .hero { padding: 48px 16px 40px; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .prayer-bar { gap: 8px; }
  .prayer-item { min-width: 60px; }
  .prayer-time { font-size: 14px; }

  .quiz-options { grid-template-columns: 1fr; }

  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
  }

  .section { padding: 32px 16px; }

  .calc-form { padding: 20px; }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .profile-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .leaderboard-tab {
    font-size: 12px;
    padding: 12px 6px;
  }
}

@media (max-width: 480px) {
  .navbar { padding: 0 16px; }
  .navbar-title { font-size: 17px; }
  .login-btn { display: none; }

  .cards-grid { grid-template-columns: 1fr 1fr; }

  .quiz-card { padding: 20px 16px; }

  .verse-banner { padding: 16px 20px; }
}

/* === 22. تأثيرات إضافية === */
/* تأثير Loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Scrollbar مخصص */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* تحديد النص */
::selection {
  background: rgba(26, 86, 219, 0.3);
  color: var(--text-primary);
}

/* === 23. أداء وطباعة === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .navbar, footer, .cookie-banner { display: none; }
  body { background: white; color: black; }
}
