/* ==========================================================================
   رحلة داخل المعدة – The Stomach Adventure
   التنسيقات الأساسية والتصميم العام (Main Stylesheet)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Tajawal:wght@400;500;700;800;900&display=swap');

:root {
  /* ألوان واجهة مختبر العلوم للأطفال */
  --bg-dark: #0a1128;
  --bg-card: rgba(18, 28, 62, 0.85);
  --bg-card-hover: rgba(28, 43, 90, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.16);

  --primary: #00d2d3;
  --primary-glow: rgba(0, 210, 211, 0.4);
  --secondary: #ff6b6b;
  --secondary-glow: rgba(255, 107, 107, 0.4);
  --accent-yellow: #feca57;
  --accent-green: #1dd1a1;
  --accent-purple: #5f27cd;
  --accent-blue: #54a0ff;

  --text-main: #ffffff;
  --text-muted: #c8d6e5;
  --text-dark: #222f3e;

  --stomach-color: #ff7675;
  --esophagus-color: #fab1a0;
  --intestine-color: #fdcb6e;
  --liver-color: #d63031;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--primary-glow);

  --font-main: 'Tajawal', 'Cairo', sans-serif;
  --font-heading: 'Cairo', 'Tajawal', sans-serif;

  --font-size-base: 16px;
  --header-height: 70px;
  --nav-height: 80px;
}

/* تكبير وتصغير الخط حسب إعدادات الوصول */
body.font-large { --font-size-base: 18px; }
body.font-small { --font-size-base: 14px; }

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

html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  overflow: hidden;
  direction: rtl;
  text-align: right;
  font-family: var(--font-main);
  font-size: var(--font-size-base);
  background-color: var(--bg-dark);
  color: var(--text-main);
}

/* خلفية تدرجية فضائية ومختبرية */
body {
  background: radial-gradient(circle at 50% 30%, #152347 0%, #0a1128 75%, #050814 100%);
  position: relative;
}

/* حاوية مشهد 3D WebGL */
#webgl-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

/* ==========================================================================
   طبقة واجهة المستخدم العلوية (HUD Top Bar)
   ========================================================================== */
.top-bar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: var(--header-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  background: linear-gradient(180deg, rgba(10, 17, 40, 0.85) 0%, rgba(10, 17, 40, 0) 100%);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.brand-icon {
  font-size: 32px;
  filter: drop-shadow(0 0 10px rgba(254, 202, 87, 0.7));
  animation: floatSlow 3s ease-in-out infinite;
}

.brand-titles h1 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0, 210, 211, 0.4);
  white-space: nowrap;
}

.brand-short {
  display: none;
}

.brand-full {
  display: inline;
}

.brand-titles p {
  font-size: 0.85rem;
  color: var(--accent-yellow);
  font-weight: 600;
}

/* عداد النقاط وأزرار الأدوات العلوية */
.top-controls,
.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   مبدل اللهجة (الفصحى / بالمصري) Dialect Switcher
   ========================================================================== */
.dialect-switch-pill {
  display: flex;
  align-items: center;
  background: rgba(13, 23, 56, 0.9);
  border: 2px solid var(--primary);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 4px;
  box-shadow: 0 0 15px var(--primary-glow);
}

.dialect-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dialect-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.dialect-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, #0abde3 100%);
  color: var(--text-dark);
  box-shadow: 0 2px 10px var(--primary-glow);
  transform: scale(1.04);
}

.dialect-switch-mini {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-glass);
}

.dialect-switch-mini .dialect-btn {
  padding: 3px 8px;
  font-size: 0.75rem;
}

.score-badge {
  background: linear-gradient(135deg, rgba(254, 202, 87, 0.25), rgba(255, 107, 107, 0.25));
  border: 2px solid var(--accent-yellow);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  box-shadow: 0 0 18px rgba(254, 202, 87, 0.3);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.score-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(254, 202, 87, 0.6);
}

.score-icon {
  font-size: 1.3rem;
  animation: starPulse 2s infinite;
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
  background: var(--primary);
  color: var(--text-dark);
  transform: translateY(-2px) scale(1.06);
  box-shadow: var(--shadow-glow);
}

.icon-btn.active {
  background: var(--accent-green);
  color: var(--text-dark);
  border-color: #fff;
}

/* ==========================================================================
   شريط القائمة السفلية (Bottom Navigation Bar)
   ========================================================================== */
.bottom-nav {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  max-width: calc(100% - 24px);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(13, 23, 56, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 210, 211, 0.2);
  backdrop-filter: blur(16px);
  z-index: 10;
  max-width: 95vw;
  overflow-x: auto;
  scrollbar-width: none;
}

.bottom-nav::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.nav-tab .tab-icon {
  font-size: 1.2rem;
  transition: transform 0.2s;
}

.nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.nav-tab:hover .tab-icon {
  transform: scale(1.2);
}

.nav-tab.active {
  background: linear-gradient(135deg, var(--primary) 0%, #0abde3 100%);
  color: var(--text-dark);
  box-shadow: 0 4px 15px var(--primary-glow);
}

.nav-tab.active .tab-icon {
  transform: scale(1.15);
}

/* ==========================================================================
   المساعد التعليمي "دكتور بطن" (Doctor Batn Mascot)
   ========================================================================== */
.mascot-container {
  position: absolute;
  bottom: 105px;
  left: 24px;
  z-index: 15;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  pointer-events: none;
}

.mascot-dialog {
  background: rgba(18, 28, 62, 0.94);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  border-bottom-left-radius: 4px;
  padding: 14px 18px;
  max-width: 320px;
  box-shadow: var(--shadow-md), 0 0 20px var(--primary-glow);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  position: relative;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mascot-dialog::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 24px;
  border-width: 10px 10px 0;
  border-style: solid;
  border-color: var(--primary) transparent transparent;
  display: block;
  width: 0;
}

.mascot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.mascot-title {
  color: var(--accent-yellow);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mascot-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  line-height: 1;
}

.mascot-close-btn:hover {
  background: rgba(255, 107, 107, 0.85);
  transform: scale(1.15);
}

.mascot-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 8px;
}

.mascot-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.speak-btn {
  background: linear-gradient(135deg, var(--accent-purple), #341f97);
  border: none;
  color: #fff;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-family: var(--font-main);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.speak-btn:hover {
  background: var(--primary);
  color: var(--text-dark);
  transform: scale(1.05);
}

.mascot-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9ff3, #feca57);
  border: 3px solid #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 15px rgba(254, 202, 87, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  pointer-events: auto;
  cursor: pointer;
  animation: mascotBob 3.5s ease-in-out infinite;
  transition: transform 0.3s;
}

.mascot-avatar:hover {
  transform: scale(1.15) rotate(-5deg);
}

/* ==========================================================================
   لوحة التحكم بالطبقات والأشعة (Floating View Controls)
   ========================================================================== */
.scene-tools {
  position: absolute;
  top: 85px;
  left: 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-tools-fab {
  display: none;
  background: linear-gradient(135deg, rgba(13, 23, 56, 0.95), rgba(26, 38, 77, 0.95));
  border: 1.5px solid var(--primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35), 0 0 12px var(--primary-glow);
  backdrop-filter: blur(10px);
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  user-select: none;
}

.mobile-tools-fab:active,
.mobile-tools-fab.active {
  background: var(--primary);
  color: var(--text-dark);
  box-shadow: 0 6px 20px rgba(0, 210, 211, 0.5);
  transform: scale(0.97);
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  min-width: 170px;
}

.tool-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tool-card-header h4 {
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 0;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-card-close {
  display: none;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  line-height: 1;
}

.tool-card-close:hover {
  background: rgba(255, 107, 107, 0.85);
  transform: scale(1.1);
}

.tool-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.btn-toggle.active {
  background: linear-gradient(90deg, rgba(0, 210, 211, 0.3), rgba(0, 210, 211, 0.1));
  border-color: var(--primary);
  color: #fff;
}

.btn-toggle.active .indicator {
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.2s;
}

/* ==========================================================================
   أزرار إجراءات المعدة الخاصة (Stomach Mode Controls)
   ========================================================================== */
.stomach-action-bar {
  position: absolute;
  top: 85px;
  right: 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-pill-btn {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.9), rgba(238, 82, 83, 0.9));
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md), 0 0 20px rgba(255, 107, 107, 0.4);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-label-short {
  display: none;
}

.btn-label-full {
  display: inline;
}

.action-pill-btn:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.7);
}

.action-pill-btn.secondary {
  background: linear-gradient(135deg, rgba(0, 210, 211, 0.9), rgba(10, 189, 227, 0.9));
  box-shadow: var(--shadow-md), 0 0 20px rgba(0, 210, 211, 0.4);
}

.action-pill-btn.secondary:hover {
  box-shadow: 0 8px 25px rgba(0, 210, 211, 0.7);
}

.action-pill-btn.active {
  background: linear-gradient(135deg, var(--accent-yellow), #ff9f43);
  color: var(--text-dark);
  border-color: #fff;
}

/* ==========================================================================
   النقاط التفاعلية ثلاثية الأبعاد (3D Hotspot Overlays)
   ========================================================================== */
.hotspot-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-yellow), #ff9f43);
  border: 3px solid #ffffff;
  color: #222f3e;
  font-weight: 900;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 0 15px rgba(254, 202, 87, 0.8);
  transition: transform 0.2s;
  pointer-events: auto;
  animation: pulseHotspot 2s infinite;
}

.hotspot-marker:hover {
  transform: translate(-50%, -50%) scale(1.25);
}

.hotspot-tooltip {
  position: absolute;
  bottom: 45px;
  right: 50%;
  transform: translateX(50%);
  background: rgba(18, 28, 62, 0.95);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--primary);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.hotspot-marker:hover .hotspot-tooltip {
  opacity: 1;
  transform: translateX(50%) translateY(-5px);
}

/* كرت تفاصيل النقطة المحددة */
.hotspot-detail-modal {
  position: absolute;
  top: 90px;
  right: 24px;
  width: 320px;
  background: rgba(15, 24, 53, 0.95);
  border: 2px solid var(--accent-yellow);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(254, 202, 87, 0.3);
  backdrop-filter: blur(16px);
  z-index: 20;
  animation: slideInRight 0.35s ease;
  display: none;
}

.hotspot-detail-modal.active {
  display: block;
}

.hotspot-badge {
  background: var(--accent-yellow);
  color: var(--text-dark);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-block;
  margin-bottom: 8px;
}

.hotspot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.hotspot-header h3 {
  font-size: 1.25rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s;
}

.close-btn:hover {
  background: var(--secondary);
}

.hotspot-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 14px;
}

/* ==========================================================================
   النوافذ المنبثقة والشاشات الرئيسية (Modals & Hero Screen)
   ========================================================================== */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 14, 34, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: linear-gradient(145deg, #15244f, #0d1736);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 600px;
  width: 90%;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 210, 211, 0.2);
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

/* الشاشة الرئيسية الترحيبية */
.hero-content {
  text-align: center;
  padding: 10px 0;
}

.hero-mascot-circle {
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, #feca57 0%, #ff6b6b 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  margin: 0 auto 18px;
  border: 4px solid #ffffff;
  box-shadow: 0 0 30px rgba(254, 202, 87, 0.6);
  animation: floatSlow 3s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 40%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--accent-yellow);
  font-weight: 700;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  margin: 0 auto;
}

.btn-hero {
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-hero.primary {
  background: linear-gradient(135deg, var(--primary) 0%, #0abde3 100%);
  color: var(--text-dark);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-hero.secondary {
  background: linear-gradient(135deg, var(--secondary) 0%, #ee5253 100%);
  color: #fff;
  box-shadow: 0 6px 20px var(--secondary-glow);
}

.btn-hero.tertiary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-hero:hover {
  transform: scale(1.04) translateY(-2px);
}

/* ==========================================================================
   وضع رحلة الطعام (Food Journey Drawer & Steps)
   ========================================================================== */
.food-journey-panel {
  position: absolute;
  bottom: 95px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 25, 55, 0.94);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  box-shadow: var(--shadow-lg), 0 0 30px var(--primary-glow);
  backdrop-filter: blur(14px);
  z-index: 12;
  display: none;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
  width: 90%;
  animation: slideUp 0.3s ease;
}

.food-journey-panel.active {
  display: flex;
}

.food-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.food-selector-header h3 {
  font-size: 1.1rem;
  color: var(--accent-yellow);
  display: flex;
  align-items: center;
  gap: 8px;
}

.food-options {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.food-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  color: #fff;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

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

.food-btn.selected {
  background: linear-gradient(135deg, rgba(0, 210, 211, 0.3), rgba(0, 210, 211, 0.1));
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.food-timeline-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
}

.step-node {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}

.step-node.active {
  color: var(--accent-yellow);
}

.journey-control-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ==========================================================================
   شبكة كروت وظائف المعدة وحقائق هل تعلم
   ========================================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.info-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}

.info-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-md);
}

.info-card-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.info-card h4 {
  font-size: 1.1rem;
  color: var(--accent-yellow);
  margin-bottom: 6px;
}

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

/* ==========================================================================
   الاختبارات التفاعلية وألعاب التعلم (Quiz & Games)
   ========================================================================== */
.quiz-question-box {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 18px;
  border-right: 4px solid var(--accent-yellow);
}

.quiz-question-box h3 {
  font-size: 1.25rem;
  line-height: 1.5;
  color: #fff;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  text-align: right;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-option-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--primary);
  transform: translateX(-4px);
}

.quiz-option-btn.correct {
  background: rgba(29, 209, 161, 0.3);
  border-color: var(--accent-green);
  color: #fff;
}

.quiz-option-btn.wrong {
  background: rgba(255, 107, 107, 0.3);
  border-color: var(--secondary);
  color: #fff;
}

.quiz-feedback-box {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  display: none;
}

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

.quiz-feedback-box.success {
  background: rgba(29, 209, 161, 0.2);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
}

.quiz-feedback-box.retry {
  background: rgba(254, 202, 87, 0.2);
  border: 1px solid var(--accent-yellow);
  color: var(--accent-yellow);
}

/* لعبة السحب والإفلات لترتيب رحلة الطعام */
.drag-slots-container {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 20px 0;
  flex-wrap: wrap;
}

.drop-slot {
  flex: 1;
  min-width: 100px;
  height: 110px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: all 0.2s;
  position: relative;
}

.drop-slot.drag-over {
  background: rgba(0, 210, 211, 0.2);
  border-color: var(--primary);
}

.drop-slot-num {
  font-size: 0.8rem;
  color: var(--accent-yellow);
  margin-bottom: 4px;
  font-weight: 800;
}

.draggable-item {
  background: linear-gradient(135deg, rgba(84, 160, 255, 0.2), rgba(95, 39, 205, 0.2));
  border: 2px solid var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: grab;
  transition: transform 0.2s;
}

.draggable-item:active {
  cursor: grabbing;
  transform: scale(0.95);
}

.draggable-bank {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
}

/* ==========================================================================
   وضع المعلم للشاشات الذكية (Teacher Mode Toolbar)
   ========================================================================== */
.teacher-toolbar {
  position: absolute;
  top: var(--header-height);
  right: 0;
  left: 0;
  background: linear-gradient(90deg, #10ac84, #1dd1a1);
  color: var(--text-dark);
  padding: 8px 24px;
  display: none;
  align-items: center;
  justify-content: space-between;
  z-index: 25;
  box-shadow: 0 4px 20px rgba(16, 172, 132, 0.4);
  font-weight: 800;
}

.teacher-toolbar.active {
  display: flex;
}

.teacher-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}

.t-btn {
  background: rgba(255, 255, 255, 0.85);
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-dark);
}

.t-btn:hover {
  background: #fff;
  transform: scale(1.05);
}

/* ==========================================================================
   شاشة التحميل (Loading Screen)
   ========================================================================== */
#loader-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #152347, #0a1128);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.loader-spinner {
  width: 70px;
  height: 70px;
  border: 6px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 24px;
}

.loader-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.loader-bar-wrap {
  width: 280px;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.loader-progress {
  width: 15%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-green));
  transition: width 0.3s ease;
}

/* ==========================================================================
   بطاقة إعداد وإشراف المشروع (Project Credits Card)
   متموضعة في الجانب الأيمن من الشاشة فوق زر الرئيسية مباشرة
   ========================================================================== */
.project-credits-card {
  position: absolute;
  bottom: 95px;
  right: 28px;
  z-index: 15;
  background: rgba(13, 23, 56, 0.92);
  border: 1.5px solid rgba(0, 210, 211, 0.4);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  min-width: 200px;
  box-shadow: var(--shadow-md), 0 0 20px rgba(0, 210, 211, 0.18);
  backdrop-filter: blur(14px);
  user-select: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: popIn 0.5s ease-out;
  direction: rtl;
  text-align: right;
}

.project-credits-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(0, 210, 211, 0.7);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(0, 210, 211, 0.35);
}

.project-credits-card .credits-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  background: rgba(0, 210, 211, 0.12);
  border: 1px solid rgba(0, 210, 211, 0.3);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 8px;
}

.project-credits-card .credits-badge .credits-icon {
  font-size: 0.85rem;
}

.project-credits-card .credits-section {
  display: flex;
  flex-direction: column;
}

.project-credits-card .credits-label {
  font-size: 0.78rem;
  color: #a4b0be;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-credits-card .credits-label .role-icon {
  font-size: 0.95rem;
}

.role-text-short {
  display: none;
}

.role-text-full {
  display: inline;
}

.project-credits-card .credits-name {
  font-size: 1.05rem;
  font-weight: 800;
  margin-top: 2px;
  padding-right: 20px;
  letter-spacing: 0.3px;
  font-family: var(--font-heading);
}

.project-credits-card .student-name {
  color: #feca57;
  text-shadow: 0 0 10px rgba(254, 202, 87, 0.35);
}

.project-credits-card .supervisor-name {
  color: #48dbfb;
  text-shadow: 0 0 10px rgba(72, 219, 251, 0.35);
}

.project-credits-card .credits-separator {
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 210, 211, 0.35) 0%, rgba(255, 255, 255, 0.05) 100%);
  margin: 8px 0;
}

/* ==========================================================================
   وضع الرؤية الصافية الكاملة للمجسم (Zen Clear-View Mode)
   إخفاء كافة القوائم والتفاصيل للاستمتاع برؤية 3D واضحة 100% بدون أي حجب
   ========================================================================== */
.zen-indicator-pill {
  display: none;
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 23, 56, 0.94);
  border: 1.5px solid var(--accent-green);
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(12px);
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(16, 172, 132, 0.5);
  cursor: pointer;
  align-items: center;
  gap: 8px;
  animation: bounceSoft 2.5s infinite ease-in-out;
  transition: all 0.25s ease;
}

.zen-indicator-pill:hover {
  background: var(--accent-green);
  color: var(--text-dark);
  transform: translateX(-50%) scale(1.05);
}

body.zen-mode .zen-indicator-pill {
  display: inline-flex;
}

body.zen-mode .top-bar,
body.zen-mode .teacher-toolbar,
body.zen-mode .scene-tools,
body.zen-mode .stomach-action-bar,
body.zen-mode .project-credits-card,
body.zen-mode .mascot-container,
body.zen-mode .bottom-nav,
body.zen-mode .food-journey-panel,
body.zen-mode .hotspot-detail-modal {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-20px) scale(0.96) !important;
  transition: opacity 0.3s ease, transform 0.3s ease !important;
}

body.zen-mode .bottom-nav {
  transform: translateY(40px) scale(0.96) !important;
}

body.zen-mode #btn-zen-mode {
  opacity: 1 !important;
  pointer-events: auto !important;
  background: var(--accent-green) !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(29, 209, 161, 0.8) !important;
}


