/* ========================================================
   نور الإيمان - التربية الإسلامية
   NOOR AL-IMAN: Islamic Education Game
   ======================================================== */

:root {
  --primary: #1b5e20;
  --primary-d: #0d3813;
  --gold: #fbc02d;
  --amber: #f57f17;
  --teal: #00796b;
  --dark: #1b262c;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dark);
  background-color: #1b5e20;
  background-image: url('assets/bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

#app {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ==================== الشاشات ==================== */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: 16px 24px;
  overflow-y: auto;
  overflow-x: hidden;
}
.screen.active {
  display: flex;
}

/* ==================== أزرار وعناصر عامة ==================== */
.btn {
  font-family: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  border: none;
  border-radius: 18px;
  padding: 12px 24px;
  cursor: pointer;
  background: linear-gradient(180deg, #2e7d32, #1b5e20);
  box-shadow: 0 5px 0 #0f3b14, 0 8px 18px rgba(0,0,0,0.25);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #0f3b14; }

.btn-primary {
  background: linear-gradient(180deg, #fbc02d, #f57f17);
  box-shadow: 0 5px 0 #bc5c00, 0 8px 18px rgba(245, 127, 23, 0.3);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.btn-primary:active { box-shadow: 0 2px 0 #bc5c00; }

.btn-secondary {
  background: linear-gradient(180deg, #00897b, #004d40);
  box-shadow: 0 5px 0 #00332c, 0 8px 18px rgba(0,0,0,0.2);
}
.btn-secondary:active { box-shadow: 0 2px 0 #00332c; }

.btn-ghost {
  background: #ffffff;
  color: #1b5e20;
  box-shadow: 0 4px 0 #cfd8dc, 0 8px 18px rgba(0,0,0,0.12);
  border: 2px solid #c8e6c9;
}
.btn-ghost:active { box-shadow: 0 1px 0 #cfd8dc; }

.icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 2px solid #a5d6a7;
  background: #ffffff;
  cursor: pointer;
  font-size: 1.3rem;
  font-family: inherit;
  font-weight: 900;
  color: var(--dark);
  box-shadow: 0 4px 0 #81c784;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s;
  flex-shrink: 0;
}
.icon-btn:hover { filter: brightness(1.04); }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #81c784; }
.icon-btn.off { opacity: 0.55; }

.speaker-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #ffffff;
  border: 2px solid #fbc02d;
  color: #f57f17;
  font-size: 1.3rem;
  box-shadow: 0 3px 0 #f57f17;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s;
  flex-shrink: 0;
}
.speaker-btn:active { transform: translateY(2px); }

.stars-pill {
  background: linear-gradient(180deg, #fffde7, #fff59d);
  color: #e65100;
  font-weight: 900;
  border: 2px solid #fbc02d;
  border-radius: 999px;
  padding: 6px 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  white-space: nowrap;
}

/* ==================== حاوية الزجاج الشفاف (Glassmorphism) ==================== */
.glass {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 28px;
  border: 3.5px solid #fbc02d;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25), inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}

/* ==================== القائمة الرئيسية (Menu) بدون سكرول ==================== */
#scr-menu {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  overflow: hidden;
}
#scr-menu.active {
  display: flex;
}

.top-controls {
  position: fixed;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 1000;
}

.menu-card {
  width: 100%;
  max-width: 960px;
  max-height: 96vh;
  margin: auto;
  padding: 14px 28px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.mascot-badge {
  position: relative;
  margin-top: -6px;
  margin-bottom: 2px;
}
.mascot-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  object-fit: cover;
  background: #fff;
  animation: floatMascot 3s ease-in-out infinite;
}
@keyframes floatMascot {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.crest-sparkle {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 1.4rem;
}

.menu-card .stars-pill {
  position: absolute;
  top: 14px;
  left: 18px;
}

.logo {
  font-size: 2.1rem;
  font-weight: 900;
  color: #0f3b14;
  text-shadow: 0 2px 4px rgba(255,255,255,0.7);
  letter-spacing: -0.5px;
  margin: 2px 0 2px;
}
.logo span {
  color: #e65100;
  position: relative;
}

.tagline {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1b262c;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 16px;
  border-radius: 999px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modes-selection {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
  margin-bottom: 12px;
}

.mode-card {
  background: #ffffff;
  border-radius: 20px;
  border: 3.5px solid var(--mc, #2e7d32);
  padding: 14px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  box-shadow: 0 8px 0 rgba(0,0,0,0.12), 0 12px 24px rgba(0,0,0,0.15);
  transition: transform 0.12s, box-shadow 0.12s;
  font-family: inherit;
  position: relative;
}
.mode-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 0 rgba(0,0,0,0.14), 0 18px 30px rgba(0,0,0,0.2);
}
.mode-card:active {
  transform: translateY(2px);
}
.mode-quran { --mc: #2e7d32; }
.mode-worship { --mc: #0288d1; }
.mode-manners { --mc: #f57f17; }

.mode-icon {
  font-size: 2.8rem;
  line-height: 1;
}
.mode-info h3 {
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f3b14;
  margin-bottom: 2px;
}
.mode-info p {
  font-size: 0.85rem;
  font-weight: 600;
  color: #455a64;
  line-height: 1.25;
}
.arrow-badge {
  display: inline-block;
  background: #f1f8e9;
  color: #2e7d32;
  font-weight: 900;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  line-height: 28px;
  font-size: 1rem;
}

.menu-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==================== الشريط العلوي HUD ==================== */
.hud, .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2.5px solid rgba(251, 192, 45, 0.6);
  border-radius: 20px;
  padding: 10px 18px;
  margin-bottom: 14px;
}
.hud-title, .topbar h2 {
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f3b14;
}

.dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dots .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid #b0bec5;
  transition: all 0.2s;
}
.dots .dot.current {
  width: 18px;
  height: 18px;
  background: #ffffff;
  border: 4px solid #f57f17;
  transform: scale(1.15);
}
.dots .dot.perfect { background: #2ecc71; border-color: #27ae60; }

/* ==================== قائمة المستويات ==================== */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 10px;
}
.level-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 20px;
  border: 3.5px solid var(--c, #2e7d32);
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(0,0,0,0.12), 0 12px 24px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  text-align: right;
  transition: transform 0.12s;
}
.level-card:hover { transform: translateY(-4px); }
.level-card.locked { filter: grayscale(1); opacity: 0.6; cursor: not-allowed; }
.lc-icon { font-size: 3rem; }
.lc-title { font-size: 1.3rem; font-weight: 900; color: #0f3b14; }
.lc-desc { font-size: 0.95rem; font-weight: 600; color: #546e7a; }
.lc-stars { font-size: 1.3rem; letter-spacing: 4px; color: #fbc02d; }
.lc-stars .off { color: #cfd8dc; }

/* ==================== النمط 1: محراب القرآن الكريم (بالعرض دون سكرول) ==================== */
#scr-quran {
  overflow-y: hidden;
}
.quran-stage {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 3.5px solid #fbc02d;
  border-radius: 28px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.25), inset 0 0 0 2px rgba(255, 255, 255, 0.6);
  padding: 14px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quran-banner {
  background: rgba(255, 255, 255, 0.92);
  border: 2.5px solid #fbc02d;
  border-radius: 18px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.surah-badge {
  background: #2e7d32;
  color: #fff;
  font-weight: 900;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.95rem;
}
.quran-banner h3 {
  flex: 1;
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f3b14;
}

/* شبكة أفقية تقسم الشاشة إلى عمودين متجاورين */
.quran-horizontal-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
  align-items: start;
}

.quran-louh-board {
  background: linear-gradient(180deg, #fffbf0, #fff7e6);
  border: 3.5px solid #b37418;
  border-radius: 22px;
  padding: 12px 14px;
  box-shadow: 0 8px 20px rgba(179, 116, 24, 0.18), inset 0 0 0 2px #ffe082;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bismillah-header {
  font-family: 'Amiri', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1b5e20;
  text-align: center;
  padding-bottom: 4px;
  border-bottom: 1.5px dashed #d7ccc8;
}

.louh-slots-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.louh-slot {
  background: #ffffff;
  border: 2px dashed #a1887f;
  border-radius: 14px;
  padding: 6px 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.15s;
}
.louh-slot.filled {
  background: #f1f8e9;
  border: 2px solid #2e7d32;
  box-shadow: 0 3px 8px rgba(46, 125, 50, 0.15);
  cursor: pointer;
}
.slot-num-badge {
  background: #e8f5e9;
  color: #2e7d32;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid #c8e6c9;
  flex-shrink: 0;
}
.slot-ayah-text {
  font-family: 'Amiri', serif;
  font-size: 1.18rem;
  font-weight: 700;
  color: #0f3b14;
  flex: 1;
  text-align: right;
  line-height: 1.35;
}
.slot-empty-hint {
  color: #8d6e63;
  font-weight: 700;
  font-size: 0.85rem;
  flex: 1;
  text-align: center;
}

.quran-pool-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pool-header-box {
  display: flex;
  align-items: center;
}
.pool-hint {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1b5e20;
  background: rgba(255, 255, 255, 0.95);
  padding: 4px 14px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  border: 1.5px solid #a5d6a7;
}

.ayahs-cards-pool {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ayah-card {
  background: #ffffff;
  border: 2px solid #cfd8dc;
  border-radius: 14px;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 0 3px 0 #b0bec5, 0 4px 10px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: transform 0.1s, border-color 0.1s;
}
.ayah-card:hover {
  transform: translateY(-2px);
  border-color: #2e7d32;
  box-shadow: 0 5px 0 #81c784;
}
.ayah-card.used {
  opacity: 0.35;
  pointer-events: none;
  background: #f5f5f5;
  border-color: #e0e0e0;
  box-shadow: none;
}
.ayah-text {
  font-family: 'Amiri', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f3b14;
  line-height: 1.35;
  flex: 1;
}

.quran-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding-top: 10px;
  border-top: 1.5px solid rgba(255, 255, 255, 0.4);
}

/* ==================== النمط 2: شجرة العبادات ==================== */
.worship-stage {
  max-width: 980px;
  width: 100%;
  margin: 0 auto 24px auto;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 3.5px solid #fbc02d;
  border-radius: 30px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.25), inset 0 0 0 2px rgba(255, 255, 255, 0.6);
  padding: 16px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.worship-track {
  background: linear-gradient(135deg, rgba(225, 245, 254, 0.95), rgba(179, 229, 252, 0.95));
  border: 3px solid #0288d1;
  border-radius: 28px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  box-shadow: 0 10px 24px rgba(2, 136, 209, 0.18), inset 0 2px 4px rgba(255,255,255,0.8);
  overflow-x: auto;
}

.worship-slot {
  flex: 1;
  max-width: 250px;
  min-width: 180px;
  height: 115px;
  background: #ffffff;
  border: 3px solid #81d4fa;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  text-align: center;
  position: relative;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  transition: transform 0.15s, border-color 0.15s;
}
.worship-slot:hover {
  transform: translateY(-2px);
  border-color: #0288d1;
}
.worship-slot.filled {
  background: linear-gradient(180deg, #ffffff, #e1f5fe);
  border: 3px solid #0288d1;
  box-shadow: 0 8px 18px rgba(2, 136, 209, 0.22);
  cursor: pointer;
}
.worship-slot .slot-title {
  position: absolute;
  top: 6px;
  font-size: 0.8rem;
  font-weight: 900;
  color: #01579b;
  background: #e1f5fe;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid #b3e5fc;
  white-space: nowrap;
}
.worship-slot .slot-content {
  font-size: 0.88rem;
  font-weight: 800;
  color: #78909c;
  margin-top: 20px;
}
.worship-arrow {
  font-size: 2rem;
  color: #0288d1;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0,0,0,0.12);
  user-select: none;
}

.worship-pool-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.worship-cards-pool {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.worship-card {
  background: #ffffff;
  border: 3px solid #81d4fa;
  border-radius: 18px;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 0 5px 0 #0288d1, 0 8px 16px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
  transition: transform 0.12s, box-shadow 0.12s;
}
.worship-card:hover {
  transform: translateY(-3px);
  border-color: #01579b;
  box-shadow: 0 8px 0 #01579b;
}
.worship-card.used {
  opacity: 0.4;
  pointer-events: none;
  border-color: #cfd8dc;
  box-shadow: none;
  background: #f5f5f5;
}
.worship-icon {
  font-size: 2.5rem;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: #e1f5fe;
  border-radius: 14px;
  border: 2px solid #b3e5fc;
  flex-shrink: 0;
}
.worship-card-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: #01579b;
}
.worship-card-sub {
  font-size: 0.82rem;
  font-weight: 700;
  color: #546e7a;
}

.worship-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding-top: 10px;
  border-top: 1.5px solid rgba(255, 255, 255, 0.4);
}

/* ==================== النمط 3: بستان الأخلاق ==================== */
.manners-stage {
  max-width: 820px;
  margin: 0 auto;
}

.manners-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.manners-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.manners-category {
  background: #ffffff;
  border: 2px solid #fbc02d;
  color: #0f3b14;
  font-weight: 900;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 1rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.manners-character-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 2.5px solid #2e7d32;
  border-radius: 24px;
  padding: 16px 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}
.manners-mascot-pic img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #fbc02d;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.manners-mascot-speech {
  flex: 1;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f3b14;
  line-height: 1.4;
}

.manners-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.manners-opt-btn {
  background: #ffffff;
  border: 3px solid #cfd8dc;
  border-radius: 18px;
  padding: 16px 20px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #102027;
  cursor: pointer;
  box-shadow: 0 5px 0 #b0bec5, 0 8px 16px rgba(0,0,0,0.06);
  transition: transform 0.1s, border-color 0.1s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
}
.manners-opt-btn:hover {
  transform: translateY(-2px);
  border-color: #2e7d32;
  box-shadow: 0 7px 0 #81c784;
}
.manners-opt-btn.correct {
  background: #e8f5e9 !important;
  border-color: #2e7d32 !important;
  color: #1b5e20 !important;
  box-shadow: 0 5px 0 #1b5e20 !important;
}
.manners-opt-btn.wrong {
  background: #ffebee !important;
  border-color: #c62828 !important;
  color: #b71c1c !important;
  box-shadow: 0 5px 0 #b71c1c !important;
}

.manners-feedback-box {
  background: #e8f5e9;
  border: 2px solid #2e7d32;
  border-radius: 16px;
  padding: 14px 20px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1b5e20;
  line-height: 1.5;
}
.manners-feedback-box.hidden { display: none; }

/* ==================== منارة الأوسمة ==================== */
.trophies-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}
.trophies-desc {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f3b14;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 20px;
  display: inline-block;
}
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.badge-card {
  background: #ffffff;
  border-radius: 20px;
  border: 3px solid #fbc02d;
  padding: 16px;
  text-align: center;
  box-shadow: 0 6px 14px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.badge-card.locked {
  filter: grayscale(1);
  opacity: 0.5;
}
.badge-icon { font-size: 3rem; }
.badge-title { font-size: 1.1rem; font-weight: 900; color: #0f3b14; }
.badge-desc { font-size: 0.85rem; color: #546e7a; font-weight: 600; }

/* ==================== النوافذ المنبثقة ==================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal.hidden { display: none; }

.modal-box {
  width: 100%;
  max-width: 620px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.95);
  border: 3.5px solid #fbc02d;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-header h3 {
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f3b14;
}
.modal-close {
  background: #f5f5f5;
  border: none;
  font-size: 1.3rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 900;
}
.curriculum-list {
  list-style: none;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 1rem;
  line-height: 1.5;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.win-card {
  max-width: 520px;
  width: 100%;
  text-align: center;
  padding: 32px 24px;
  background: rgba(255, 255, 255, 0.95);
  border: 4px solid #fbc02d;
  border-radius: 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popIn {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.win-stars { font-size: 3.5rem; letter-spacing: 6px; }
.win-card h2 { font-size: 1.8rem; font-weight: 900; color: #0f3b14; }
.win-card p { font-size: 1.1rem; font-weight: 700; color: #455a64; }
.win-btns { display: flex; gap: 12px; margin-top: 10px; }

/* التجاوب مع الشاشات */
@media (max-width: 768px) {
  .modes-selection { grid-template-columns: 1fr; }
  .manners-options-grid { grid-template-columns: 1fr; }
  .menu-card { max-height: 98vh; padding: 12px 16px; }
}

/* زر العودة لأكاديمية النابغة الصغير (مدمج في الركن الأيمن والبطاقة) */
.btn-academy-hub {
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  color: #ffffff !important;
  border: 2px solid #ffca28;
  border-radius: 999px;
  padding: 8px 16px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn-academy-hub:hover, .btn-academy-hub:active {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  background: linear-gradient(135deg, #2d6a4f, #1b4332);
}
.btn-academy-hub .hub-arrow {
  font-size: 1.1rem;
  color: #ffca28;
}

.btn-home-hub {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
  color: #fff !important;
  border: 2px solid #ffca28;
  border-radius: 18px;
  padding: 12px 24px;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(27, 67, 50, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.btn-home-hub:hover, .btn-home-hub:active {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(27, 67, 50, 0.55);
}

@media (max-width: 640px) {
  .top-controls {
    top: 10px;
    right: 10px;
    gap: 6px;
  }
  .btn-academy-hub {
    padding: 6px 12px;
    font-size: 0.82rem;
    gap: 4px;
  }
}

