/* ==========================================================================
   🌸 FLORAL PRINCESS THEME - منصة الوردة المتألقة ملك للاجتماعيات 🌸
   ========================================================================== */

:root {
  --primary-pink: #be123c;
  --primary-rose: #f43f5e;
  --primary-gradient: linear-gradient(135deg, #ff758c 0%, #f43f5e 100%);
  --accent-purple: #8e24aa;
  --accent-magenta: #d81b60;
  --accent-gold: #f59e0b;
  --bg-creamy: #fff5f8;
  --bg-card: #ffffff;
  --border-pink: #fda4af;
  --border-light: #fecdd3;
  --border-subtle: #ffe4e6;
  --text-dark: #1e293b;
  --text-rose: #be123c;
  --text-muted: #64748b;
  --shadow-card: 0 10px 25px rgba(244, 63, 94, 0.08);
  --shadow-hover: 0 16px 32px rgba(244, 63, 94, 0.18);
  --radius-card: 22px;
  --radius-btn: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Tajawal', 'Changa', sans-serif;
  background-color: var(--bg-creamy);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(254, 205, 211, 0.35) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 228, 230, 0.45) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(255, 240, 245, 0.25) 0%, transparent 60%);
  color: var(--text-dark);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  direction: rtl;
}

/* ========================================================
   🌸 BACKGROUND FLOATING WATERMARKS & PETALS 🌸
   ======================================================== */
.bg-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floral-watermark {
  position: absolute;
  color: #fbcfe8;
  opacity: 0.25;
  font-size: 140px;
  user-select: none;
  filter: blur(1px);
}

.wm-1 {
  top: 40px;
  left: -20px;
  transform: rotate(-15deg);
}

.wm-2 {
  bottom: 60px;
  right: -30px;
  transform: rotate(20deg);
  font-size: 170px;
}

.wm-3 {
  top: 55%;
  left: -40px;
  transform: rotate(10deg);
  font-size: 110px;
}

.floating-petal {
  position: absolute;
  font-size: 26px;
  opacity: 0.45;
  animation: floatPetal 8s infinite ease-in-out alternate;
}

.p-1 { top: 12%; right: 10%; animation-delay: 0s; }
.p-2 { top: 25%; left: 8%; animation-delay: 1.5s; font-size: 22px; }
.p-3 { top: 75%; left: 15%; animation-delay: 3s; }
.p-4 { top: 80%; right: 18%; animation-delay: 4.5s; }
.p-5 { top: 45%; right: 4%; animation-delay: 2s; font-size: 20px; }

@keyframes floatPetal {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(15deg); }
  100% { transform: translateY(-8px) rotate(-10deg); }
}

/* ========================================================
   🌸 MAIN APP CONTAINER 🌸
   ======================================================== */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1150px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}

/* ========================================================
   🌸 COMPACT PROFESSIONAL TOP HEADER (Sleek & Space-Saving) 🌸
   ======================================================== */
.hero-header.mc-hero-header.compact-pro-header,
.hero-header.mc-hero-header {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1.5px solid var(--border-pink) !important;
  box-shadow: 0 4px 18px rgba(244, 63, 94, 0.08) !important;
  border-radius: 18px !important;
  padding: 8px 20px !important;
  color: var(--text-dark) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  position: relative !important;
  overflow: visible !important;
  margin-bottom: 1.2rem !important;
  min-height: unset !important;
}

.hero-header.mc-hero-header::after {
  display: none !important;
}

.hero-profile-compact {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Compact Avatar Frame */
.compact-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #fff0f5, #ffe4e6);
  border: 2px solid var(--border-pink);
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.2);
  border-radius: 50%;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.compact-avatar-wrap:hover {
  transform: scale(1.08);
}

.compact-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.compact-crown {
  position: absolute;
  top: -8px;
  right: -5px;
  font-size: 15px;
  filter: drop-shadow(0 1px 3px rgba(245, 158, 11, 0.5));
}

.compact-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.compact-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.compact-student-name {
  font-family: 'Changa', 'Tajawal', sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-rose);
  margin: 0;
  line-height: 1.2;
}

.compact-subject-badge {
  font-family: 'Tajawal', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #be123c;
  background: #fff1f2;
  border: 1px solid var(--border-light);
  padding: 2px 10px;
  border-radius: 12px;
  display: inline-block;
  line-height: 1.3;
}

/* Legacy Support */
.mc-edition-tag,
.mc-xp-container,
.hero-title p {
  display: none !important;
}

/* Actions & Buttons */
.stats-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.mc-btn-home {
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4e6 100%) !important;
  color: var(--text-rose) !important;
  border: 1.5px solid var(--border-pink) !important;
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.08) !important;
  border-radius: 14px !important;
  padding: 6px 14px !important;
  font-family: 'Tajawal', 'Changa', sans-serif !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.mc-btn-home:hover {
  background: linear-gradient(135deg, #ff758c 0%, #f43f5e 100%) !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 8px 22px rgba(244, 63, 94, 0.35) !important;
}

.mc-btn-home:hover * {
  color: #ffffff !important;
}

/* Purple/Magenta Games Oasis Header Button (واحة الألعاب) */
.mc-btn-play-steve {
  background: linear-gradient(135deg, #d81b60 0%, #8e24aa 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 2px 10px rgba(216, 27, 96, 0.25) !important;
  border-radius: 14px !important;
  padding: 6px 14px !important;
  font-family: 'Tajawal', 'Changa', sans-serif !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.mc-btn-play-steve:hover {
  background: linear-gradient(135deg, #ad1457 0%, #7b1fa2 100%) !important;
  color: #ffffff !important;
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 8px 25px rgba(216, 27, 96, 0.45) !important;
}

.sound-toggle-btn.mc-btn-sound {
  background: #ffffff !important;
  border: 1.5px solid var(--border-light) !important;
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.06) !important;
  color: #0284c7 !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 14px !important;
  transition: all 0.2s ease !important;
}

.sound-toggle-btn.mc-btn-sound:hover {
  background: #fff1f2 !important;
  border-color: var(--primary-rose) !important;
  transform: translateY(-2px) !important;
}

/* ========================================================
   🌸 VIEW SWITCHING & DISPLAY CONTROL 🌸
   ======================================================== */
.view {
  display: none !important;
  width: 100%;
}

.view.active {
  display: block !important;
  animation: fadeInView 0.25s ease;
}

.view.hidden,
.hidden {
  display: none !important;
}

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

/* ========================================================
   🌸 SECTION HEADER (عوالم فصول الاجتماعيات) 🌸
   ======================================================== */
.portal-section-header {
  text-align: center;
  margin: 30px 0 25px;
}

.portal-title-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.portal-flower-icon {
  font-size: 28px;
  animation: pulseFlower 3s infinite ease-in-out alternate;
}

.portal-badge-icon {
  font-size: 26px;
}

.portal-main-title {
  font-family: 'Changa', 'Tajawal', sans-serif;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 900;
  color: var(--text-rose);
  margin: 0;
  letter-spacing: -0.5px;
}

.portal-title-underline {
  height: 5px;
  width: 220px;
  background: linear-gradient(90deg, transparent, #ff758c, #f43f5e, #ff758c, transparent);
  margin: 10px auto 0;
  border-radius: 6px;
}

@keyframes pulseFlower {
  0% { transform: scale(1); }
  100% { transform: scale(1.15) rotate(8deg); }
}

/* ========================================================
   🌸 CHAPTER NAVIGATION BUTTONS (أزرار الفصول) 🌸
   ======================================================== */
.chapters-nav-tabs-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px auto 28px;
  max-width: 1080px;
  padding: 0 10px;
}

.chapter-nav-btn {
  background: #ffffff;
  border: 1.5px solid var(--border-pink);
  color: var(--text-rose);
  border-radius: 16px;
  padding: 10px 20px;
  font-family: 'Changa', 'Tajawal', sans-serif;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(244, 63, 94, 0.06);
}

.chapter-nav-btn:hover {
  background: #fff1f2;
  border-color: var(--primary-rose);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(244, 63, 94, 0.15);
}

.chapter-nav-btn.active {
  background: linear-gradient(135deg, #ff758c 0%, #f43f5e 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.35);
  transform: translateY(-2px) scale(1.03);
}

.chapter-nav-btn-badge {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 0.8rem;
}

.chapter-nav-btn:not(.active) .chapter-nav-btn-badge {
  background: #fff1f2;
  color: var(--text-rose);
}

/* Mini lessons inside cards */
.card-lessons-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  border-top: 1px dashed var(--border-light);
  padding-top: 10px;
}

.card-lesson-pill-btn {
  background: #fff8fa;
  border: 1px solid var(--border-pink);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 0.86rem;
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  color: #334155;
  text-align: right;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.card-lesson-pill-btn:hover {
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4e6 100%);
  color: var(--text-rose);
  border-color: var(--primary-rose);
  transform: translateX(-3px);
}

/* ========================================================
   🌸 CHAPTER & LESSON PORTAL CARDS GRID (math-portal-card) 🌸
   ======================================================== */
.treasure-map-view {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 25px;
  padding: 15px 0 35px;
}

.math-portal-card {
  background: #ffffff;
  border: 1.5px solid var(--border-pink);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.math-portal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff758c, #f43f5e, #ff7eb3);
  opacity: 0.9;
}

.math-portal-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--primary-rose);
  box-shadow: var(--shadow-hover);
}

.math-portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.math-portal-tag {
  background: #fff1f2;
  color: var(--text-rose);
  font-family: 'Marhey', 'Tajawal', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.math-portal-badge {
  background: #fdf2f8;
  color: #9d174d;
  font-family: 'Tajawal', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #fbcfe8;
}

.math-portal-thumb-wrap {
  width: 100%;
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff5f7;
  border: 1.5px solid var(--border-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03), 0 3px 10px rgba(244, 63, 94, 0.08);
  position: relative;
}

.math-portal-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

.math-portal-card:hover .math-portal-thumb-img {
  transform: scale(1.08);
}

.math-portal-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  flex-grow: 1;
}

.math-portal-title {
  font-family: 'Changa', 'Tajawal', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.math-portal-card:hover .math-portal-title {
  color: var(--text-rose);
}

.math-portal-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
  font-family: 'Tajawal', sans-serif;
  font-weight: 500;
}

.math-portal-footer {
  margin-top: auto;
  width: 100%;
  padding-top: 4px;
}

.math-portal-action-cta {
  width: 100%;
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4e6 100%);
  border: 1px solid var(--border-pink);
  color: var(--text-rose);
  border-radius: 12px;
  padding: 8px 12px;
  font-family: 'Changa', 'Tajawal', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  transition: all 0.25s ease;
}

.math-portal-card:hover .math-portal-action-cta {
  background: linear-gradient(135deg, #ff758c 0%, #f43f5e 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
  transform: translateY(-1px);
}

/* Card Completed Status */
.math-portal-card.chapter-done,
.math-portal-card.lesson-done {
  border-color: #f472b6;
  background: linear-gradient(180deg, #ffffff 0%, #fff7fb 100%);
}

.math-portal-card.chapter-done .math-portal-badge,
.math-portal-card.lesson-done .math-portal-badge {
  background: #fdf2f8;
  color: #db2777;
  border-color: #f472b6;
}

/* ========================================================
   🌸 CHAPTER DETAIL BANNER & FLORAL BACK BUTTON 🌸
   ======================================================== */
.floral-chapter-banner {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid var(--border-light);
  border-radius: 24px;
  padding: 22px 28px;
  box-shadow: var(--shadow-card);
  margin-bottom: 25px;
  position: relative;
  overflow: hidden;
}

.chapter-hero-floral-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.chapter-hero-floral-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.chapter-hero-title-box h3 {
  font-family: 'Changa', 'Tajawal', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-rose);
  margin: 4px 0 0;
}

.chapter-floral-badge {
  background: #fff1f2;
  border: 1px solid var(--border-light);
  color: var(--text-rose);
  font-size: 13px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 14px;
  display: inline-block;
}

.floral-back-btn {
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4e6 100%);
  border: 1.5px solid var(--border-pink);
  color: var(--text-rose);
  border-radius: 14px;
  padding: 8px 18px;
  font-family: 'Tajawal', 'Changa', sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.22s ease;
}

.floral-back-btn:hover {
  background: linear-gradient(135deg, #ff758c 0%, #f43f5e 100%);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
}

/* ========================================================
   🌸 LESSON VIEW & TABS 🌸
   ======================================================== */
.lesson-top-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.lesson-chapter-badge {
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4e6 100%);
  border: 1.5px solid var(--border-pink);
  color: var(--text-rose);
  font-family: 'Changa', 'Tajawal', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 8px 20px;
  border-radius: 16px;
  box-shadow: 0 3px 10px rgba(244, 63, 94, 0.08);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Sub-tabs for lessons navigation */
.chapter-lessons-subtabs-wrap {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-pink) transparent;
}

.chapter-lessons-subtabs-wrap::-webkit-scrollbar {
  height: 6px;
}

.chapter-lessons-subtabs-wrap::-webkit-scrollbar-thumb {
  background: var(--border-pink);
  border-radius: 4px;
}

.lesson-subtab-pill {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  color: var(--text-dark);
  border-radius: 14px;
  padding: 8px 18px;
  font-family: 'Changa', 'Tajawal', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.lesson-subtab-pill:hover {
  background: #fff1f2;
  color: var(--text-rose);
  border-color: var(--border-pink);
  transform: translateY(-2px);
}

.lesson-subtab-pill.active {
  background: linear-gradient(135deg, #ff758c 0%, #f43f5e 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
  transform: translateY(-2px) scale(1.02);
}

.lesson-status-badge {
  background: #fdf2f8;
  border: 1px solid #fbcfe8;
  color: #db2777;
  font-size: 13px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 14px;
  font-family: 'Tajawal', sans-serif;
}

.lesson-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px dashed var(--border-light);
  flex-wrap: wrap;
}

.floral-nav-btn {
  background: #ffffff;
  border: 1.5px solid var(--border-pink);
  color: var(--text-rose);
  border-radius: 14px;
  padding: 10px 22px;
  font-family: 'Changa', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.22s ease;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.06);
}

.floral-nav-btn:hover:not([disabled]) {
  background: linear-gradient(135deg, #ff758c 0%, #f43f5e 100%);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
}

.floral-nav-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
}

.floral-back-btn-bottom {
  font-size: 1rem;
  padding: 10px 24px;
}

.lesson-header-floral {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: 20px;
  padding: 16px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  flex-wrap: wrap;
  gap: 15px;
}

.lesson-title-floral-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lesson-title-floral-wrap h2 {
  font-family: 'Changa', 'Tajawal', sans-serif;
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text-rose);
  margin: 0;
}

.lesson-icon-floral {
  font-size: 26px;
}

/* Floral Tabs */
.floral-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.floral-tabs .tab-btn {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  box-shadow: 0 3px 10px rgba(244, 63, 94, 0.05);
  color: #475569;
  border-radius: 14px;
  padding: 8px 18px;
  font-family: 'Changa', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.22s ease;
}

.floral-tabs .tab-btn:hover {
  background: #fff1f2;
  color: var(--text-rose);
  border-color: var(--border-pink);
  transform: translateY(-2px);
}

.floral-tabs .tab-btn.active {
  background: linear-gradient(135deg, #ff758c 0%, #f43f5e 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(244, 63, 94, 0.3);
  transform: translateY(-2px) scale(1.02);
}

.floral-tabs .tab-btn.tab-btn-games.active {
  background: linear-gradient(135deg, #d81b60 0%, #8e24aa 100%);
  box-shadow: 0 6px 16px rgba(142, 36, 170, 0.35);
}

/* Pane Card */
.floral-pane-card {
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-card);
  min-height: 400px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

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

/* ========================================================
   🌸 EXPLANATION PANE STYLING 🌸
   ======================================================== */
.explanation-card {
  background: #fffafc;
  border: 1.5px solid var(--border-light);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.04);
}

.explanation-card h4 {
  font-family: 'Changa', sans-serif;
  font-size: 1.25rem;
  color: var(--text-rose);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.explanation-card p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #334155;
}

.concept-definition {
  background: #fff1f2;
  border-right: 5px solid var(--primary-rose);
  padding: 14px 18px;
  border-radius: 0 14px 14px 0;
  margin: 14px 0;
}

.concept-definition strong {
  color: var(--text-rose);
  font-size: 1.15rem;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 15px;
}

.comparison-col {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.04);
}

.comparison-col h5 {
  font-family: 'Changa', sans-serif;
  color: var(--text-rose);
  font-size: 1.1rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.examples-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.example-tag {
  background: #fff0f5;
  border: 1px solid var(--border-pink);
  color: var(--text-rose);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ========================================================
   🌸 TRAINING / QUIZ PANE STYLING 🌸
   ======================================================== */
.quiz-box {
  background: #fffafc;
  border: 2px solid var(--border-light);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 25px;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
}

.quiz-badge {
  background: #fff1f2;
  color: var(--text-rose);
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.9rem;
}

.quiz-question {
  font-family: 'Changa', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 20px;
  line-height: 1.45;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.quiz-option-btn {
  background: #ffffff;
  border: 1.5px solid var(--border-pink);
  border-radius: 14px;
  padding: 12px 18px;
  font-family: 'Tajawal', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  text-align: right;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-option-btn:hover {
  background: #fff1f2;
  border-color: var(--primary-rose);
  transform: translateX(-4px);
}

.quiz-option-btn.correct {
  background: #dcfce7 !important;
  border-color: #22c55e !important;
  color: #15803d !important;
}

.quiz-option-btn.wrong {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
}

.quiz-feedback {
  margin-top: 15px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 800;
  text-align: center;
  font-size: 1.1rem;
}

.quiz-celebration {
  text-align: center;
  padding: 30px 20px;
}

.quiz-celebration-trophy {
  font-size: 50px;
  margin-bottom: 12px;
}

.quiz-celebration h3 {
  font-family: 'Changa', sans-serif;
  font-size: 1.8rem;
  color: var(--text-rose);
  margin-bottom: 10px;
}

/* ========================================================
   🌸 ACHIEVEMENTS VIEW 🌸
   ======================================================== */
.floral-achieve-card {
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: 24px;
  padding: 30px;
  box-shadow: var(--shadow-card);
}

.achieve-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.achieve-title-wrap h2 {
  font-family: 'Changa', sans-serif;
  font-size: 1.8rem;
  color: var(--text-rose);
  margin: 0;
}

.floral-stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.floral-stat {
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4e6 100%);
  border: 1.5px solid var(--border-pink);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.floral-stat .stat-icon {
  font-size: 36px;
}

.floral-stat h4 {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.floral-stat p {
  font-family: 'Changa', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-rose);
  margin: 0;
}

.floral-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.floral-badge-item {
  background: #fffafc;
  border: 1.5px solid var(--border-light);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.floral-badge-item.unlocked {
  border-color: var(--border-pink);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.08);
}

.floral-badge-item.locked {
  opacity: 0.55;
  filter: grayscale(0.8);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-header.mc-hero-header.compact-pro-header,
  .hero-header.mc-hero-header {
    padding: 8px 14px !important;
    gap: 8px !important;
  }
  
  .hero-profile-compact {
    gap: 8px !important;
  }

  .compact-avatar-wrap {
    width: 38px !important;
    height: 38px !important;
  }

  .compact-student-name {
    font-size: 1.15rem !important;
  }

  .compact-subject-badge {
    font-size: 0.76rem !important;
    padding: 2px 8px !important;
  }
  
  .stats-badges {
    gap: 6px !important;
  }

  .mc-btn-home,
  .mc-btn-play-steve {
    padding: 5px 10px !important;
    font-size: 12px !important;
    border-radius: 12px !important;
  }

  .sound-toggle-btn.mc-btn-sound {
    width: 34px !important;
    height: 34px !important;
    font-size: 13px !important;
  }
  
  .treasure-map-view {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero-header.mc-hero-header.compact-pro-header,
  .hero-header.mc-hero-header {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 8px 10px !important;
    width: calc(100% - 16px) !important;
    margin: 6px auto 0.8rem auto !important;
  }
  .hero-profile-compact {
    width: 100% !important;
    justify-content: center !important;
    gap: 8px !important;
  }
  .stats-badges {
    width: 100% !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
}


/* ========================================================
   🌸 FLORAL ROYAL GAMES WRAPPER & ARENA FOR PRINCESS MALAK 🌸
   ======================================================== */
.games-hub-wrapper {
  max-width: 960px;
  margin: 0 auto 30px auto;
}

.games-hub-hero {
  background: linear-gradient(135deg, #ffffff 0%, #fff0f5 50%, #ffe4e6 100%);
  border: 2px solid var(--border-pink);
  border-radius: 28px;
  padding: 26px 28px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(244, 63, 94, 0.12);
  margin-bottom: 25px;
  position: relative;
  overflow: hidden;
}

.hub-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-gradient);
  color: #ffffff;
  padding: 6px 18px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.25);
}

.hub-badge-icon {
  font-size: 1.15rem;
}

.hub-hero-title {
  color: var(--primary-pink);
  font-family: 'Changa', 'Tajawal', sans-serif;
  font-size: 1.85rem;
  font-weight: 900;
  margin: 6px 0 8px 0;
}

.hub-hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 600;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Games Cards Grid */
.games-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.game-hub-card {
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.game-hub-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 36px rgba(244, 63, 94, 0.2);
  border-color: var(--primary-rose);
}

.game-card-shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.6) 50%, transparent 60%);
  transform: rotate(35deg);
  pointer-events: none;
  transition: all 0.6s ease;
  opacity: 0;
}

.game-hub-card:hover .game-card-shine {
  opacity: 1;
  transform: rotate(35deg) translateY(100%);
}

.game-card-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.game-card-emoji {
  font-size: 2.8rem;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.12));
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-hub-card:hover .game-card-emoji {
  transform: scale(1.2) rotate(6deg);
}

.game-card-chip {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  background: #fff1f2;
  color: var(--primary-rose);
  border: 1px solid var(--border-light);
}

.game-card-name {
  font-family: 'Changa', 'Tajawal', sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--primary-pink);
  margin-bottom: 8px;
}

.game-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.game-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4e6 100%);
  color: var(--primary-pink);
  border: 1.5px solid var(--border-pink);
  padding: 10px 16px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 0.92rem;
  transition: all 0.25s ease;
}

.game-hub-card:hover .game-card-action {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
}

/* Quick Play Bar */
.quick-play-bar {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

.quick-play-btn {
  background: linear-gradient(135deg, #d81b60 0%, #8e24aa 100%);
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  border-radius: 25px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(216, 27, 96, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
}

.quick-play-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 28px rgba(216, 27, 96, 0.45);
}

/* ========================================================
   ACTIVE GAME ARENA (الملعب التفاعلي للجولة)
   ======================================================== */
.game-arena-wrapper {
  background: #ffffff;
  border: 2px solid var(--border-pink);
  border-radius: 26px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(244, 63, 94, 0.08);
  position: relative;
}

.game-arena-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--border-light);
}

.game-back-to-menu-btn {
  background: #fff0f5;
  border: 1.5px solid var(--border-pink);
  color: var(--primary-pink);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.game-back-to-menu-btn:hover {
  background: #ffe4e6;
  transform: scale(1.04);
}

.game-progress-capsule {
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-title-pill {
  background: var(--primary-gradient);
  color: #ffffff;
  padding: 5px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 800;
}

.game-q-counter {
  background: #fff1f2;
  border: 1px solid var(--border-light);
  color: var(--text-rose);
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 800;
}

.game-stars-chip {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  color: #b45309;
  padding: 5px 14px;
  border-radius: 16px;
  font-weight: 900;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Question Banner */
.game-question-banner {
  background: linear-gradient(135deg, #fff7f9 0%, #fff0f5 100%);
  border: 2px solid var(--border-pink);
  border-radius: 20px;
  padding: 18px 22px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.game-q-number-badge {
  background: var(--primary-pink);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 0.82rem;
  white-space: nowrap;
}

.game-q-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
  flex-grow: 1;
  margin: 0;
  line-height: 1.4;
}

.game-voice-btn {
  background: #ffffff;
  border: 1.5px solid var(--border-pink);
  color: var(--primary-rose);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.game-voice-btn:hover {
  background: #fff1f2;
  transform: scale(1.1);
}

.game-hint-text {
  font-size: 0.95rem;
  color: var(--primary-pink);
  font-weight: 800;
  margin-bottom: 14px;
}

/* ========================================================
   GAME 1: TREASURE CHESTS (صناديق المجوهرات واللآلئ)
   ======================================================== */
.treasure-chests-arena {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 15px 0 20px 0;
}

.treasure-chest-card {
  background: linear-gradient(180deg, #ffffff 0%, #fffafc 100%);
  border: 2.5px solid var(--border-pink);
  border-radius: 22px;
  padding: 18px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 18px rgba(244, 63, 94, 0.08);
  position: relative;
}

.treasure-chest-card:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: var(--primary-rose);
  box-shadow: 0 14px 28px rgba(244, 63, 94, 0.22);
}

.chest-box {
  position: relative;
  width: 100px;
  height: 75px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chest-lid {
  width: 90px;
  height: 32px;
  background: linear-gradient(180deg, #fb7185 0%, #e11d48 100%);
  border-radius: 18px 18px 6px 6px;
  border: 2px solid #be123c;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.6);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: top;
}

.chest-lock {
  position: absolute;
  top: 24px;
  font-size: 1.2rem;
  z-index: 5;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.chest-base {
  width: 96px;
  height: 42px;
  background: linear-gradient(180deg, #be123c 0%, #881337 100%);
  border-radius: 6px 6px 14px 14px;
  border: 2px solid #4c0519;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.chest-burst-sparkles {
  position: absolute;
  top: -15px;
  font-size: 1.5rem;
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
}

.treasure-chest-card.chest-open .chest-lid {
  transform: rotateX(85deg) translateY(-8px);
}

.treasure-chest-card.chest-open .chest-burst-sparkles {
  opacity: 1;
  transform: translateY(-20px) scale(1.3);
}

.treasure-chest-card.correct-chest {
  border-color: #10b981;
  background: #f0fdf4;
}

.treasure-chest-card.chest-wrong {
  border-color: #ef4444;
  opacity: 0.6;
}

.chest-option-label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.chest-letter {
  background: var(--primary-pink);
  color: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.chest-text {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
  text-align: right;
  flex-grow: 1;
}

/* ========================================================
   GAME 2: ROCKET EXPLORER (مكوك الاستكشاف نحو النجوم)
   ======================================================== */
.kinetic-rocket-arena {
  width: 100%;
  height: 180px;
  background: linear-gradient(180deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  border: 2px solid #6366f1;
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.4);
}

.kinetic-sky-stars {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #ffffff, transparent),
    radial-gradient(2px 2px at 90px 80px, #ffd700, transparent),
    radial-gradient(2px 2px at 160px 40px, #ffffff, transparent),
    radial-gradient(2px 2px at 240px 120px, #ff758c, transparent),
    radial-gradient(3px 3px at 320px 60px, #ffd700, transparent),
    radial-gradient(2px 2px at 450px 100px, #ffffff, transparent),
    radial-gradient(2px 2px at 580px 40px, #ffd700, transparent);
  opacity: 0.8;
}

.kinetic-rocket-ship {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 15%;
  font-size: 3.2rem;
  transition: bottom 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 14px rgba(251, 191, 36, 0.8));
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kinetic-rocket-flame {
  font-size: 1.2rem;
  margin-top: -8px;
  animation: flameBurn 0.25s infinite alternate;
}

@keyframes flameBurn {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.3); opacity: 1; }
}

.rocket-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 15px;
}

.rocket-option-btn {
  background: #ffffff;
  border: 2px solid var(--border-pink);
  border-radius: 18px;
  padding: 14px 18px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.22s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.rocket-option-btn:hover {
  transform: translateY(-4px);
  border-color: var(--primary-rose);
  background: #fff5f8;
}

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

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

/* ========================================================
   GAME 3: BUBBLES & BLOSSOMS (فقاعات وأزهار الاجتماعيات)
   ======================================================== */
.kinetic-bubbles-arena {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 20px 0;
}

.floating-bubble-card {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.95), rgba(254, 205, 211, 0.6) 60%, rgba(244, 63, 94, 0.4) 100%);
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 25px rgba(244, 63, 94, 0.25), inset 0 2px 10px rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: bubbleWobble 3s infinite ease-in-out alternate;
  position: relative;
}

@keyframes bubbleWobble {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
  100% { transform: translateY(4px) rotate(-2deg); }
}

.floating-bubble-card:hover {
  transform: scale(1.1) translateY(-10px);
  box-shadow: 0 16px 35px rgba(244, 63, 94, 0.4);
}

.floating-bubble-card.bubble-popped {
  transform: scale(1.4);
  opacity: 0;
  pointer-events: none;
}

.bubble-text-content {
  font-size: 0.98rem;
  font-weight: 900;
  color: var(--primary-pink);
  line-height: 1.35;
}

/* ========================================================
   GAME 4: CROWN RACE (سباق درر التفوق والتاج الملكي)
   ======================================================== */
.kinetic-knights-arena {
  margin: 15px 0 20px 0;
}

.knights-track-banner {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #fde68a;
  border-radius: 18px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.knights-streak-pill {
  font-size: 1rem;
  font-weight: 900;
  color: #b45309;
}

.knights-track-steps {
  display: flex;
  gap: 8px;
  font-size: 1.3rem;
}

/* Inline Feedback */
.game-inline-feedback {
  margin-top: 16px;
  min-height: 48px;
}

.feedback-bubble {
  border-radius: 18px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 800;
}

.feedback-bubble.success {
  background: #f0fdf4;
  border: 2px solid #86efac;
  color: #166534;
}

.feedback-bubble.error {
  background: #fef2f2;
  border: 2px solid #fca5a5;
  color: #991b1b;
}

/* ==========================================================
   🌸 INTERACTIVE SVG EDUCATIONAL LAB (مختبر الرسوم التفاعلية) 🌸
========================================================== */
.interactive-diagram-container {
  background: linear-gradient(145deg, #ffffff 0%, #fff7f9 100%);
  border: 2px solid var(--border-pink);
  border-radius: 24px;
  padding: 22px 24px;
  margin-bottom: 25px;
  box-shadow: 0 8px 30px rgba(244, 63, 94, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.diagram-interactive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 6px;
}

.diagram-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.diag-magic-spark {
  font-size: 20px;
  animation: crownBounce 2s infinite ease-in-out alternate;
}

.diagram-header-title h3 {
  font-family: 'Changa', 'Tajawal', sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-rose);
  margin: 0;
}

.diagram-counter-pill {
  background: #fff1f2;
  border: 1.5px solid var(--border-pink);
  color: var(--text-rose);
  padding: 5px 16px;
  border-radius: 20px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 800;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.diagram-counter-pill.completed {
  background: #ecfdf5 !important;
  border-color: #34d399 !important;
  color: #065f46 !important;
  box-shadow: 0 0 15px rgba(52, 211, 153, 0.3);
}

.diagram-instruction-hint {
  font-family: 'Tajawal', sans-serif;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0 0 14px 0;
  font-weight: 600;
}

.interactive-canvas-box {
  width: 100%;
  max-width: 780px;
  margin: 0 auto 16px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
  border-radius: 18px;
  background: #ffffff;
  padding: 12px;
  border: 1.5px solid rgba(254, 205, 211, 0.6);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.02);
}

.interactive-svg-canvas {
  width: 100%;
  height: auto;
  min-width: 580px;
  max-height: 330px;
  display: block;
}

/* Hotspots Hover & Active States */
.interactive-hotspot {
  cursor: pointer;
  outline: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
  transform-origin: center;
}

.interactive-hotspot:hover {
  transform: translateY(-4px) scale(1.02);
  filter: drop-shadow(0 0 12px rgba(244, 63, 94, 0.55));
}

.interactive-hotspot.active-node-hotspot {
  transform: translateY(-4px) scale(1.03);
  filter: drop-shadow(0 0 16px #f43f5e) drop-shadow(0 0 5px #ffd700) !important;
}

/* Inspector Panel */
.diagram-inspector-card {
  margin-top: 14px;
  background: #ffffff;
  border: 2px solid var(--border-pink);
  border-radius: 20px;
  padding: 18px 22px;
  box-shadow: 0 4px 18px rgba(244, 63, 94, 0.08);
  transition: all 0.3s ease;
}

.inspector-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px;
  text-align: center;
}

.inspector-pointing-icon {
  font-size: 26px;
  animation: bounceHint 1.6s infinite ease-in-out;
}

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

.inspector-content-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  animation: fadeInInspector 0.35s ease;
}

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

.inspector-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff0f5, #ffe4e6);
  border: 2px solid var(--border-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.15);
}

.inspector-body {
  flex-grow: 1;
}

.inspector-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.inspector-category-badge {
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  font-family: 'Tajawal', sans-serif;
}

.badge-natural {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-human {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.badge-pink {
  background: #fdf2f8;
  color: #be185d;
  border: 1px solid #fbcfe8;
}

.badge-gold {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fde047;
}

.inspector-status-badge {
  background: #fdf4ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
  font-family: 'Tajawal', sans-serif;
}

.inspector-title {
  font-family: 'Changa', 'Tajawal', sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-dark);
  margin: 0 0 8px 0;
}

.inspector-text {
  font-size: 0.96rem;
  color: #334155;
  line-height: 1.6;
  margin: 0 0 10px 0;
  font-family: 'Tajawal', sans-serif;
}

.inspector-example {
  background: #f8fafc;
  border-right: 4px solid var(--border-pink);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 14px;
  font-family: 'Tajawal', sans-serif;
}

.inspector-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-inspector-speak {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Tajawal', sans-serif;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-inspector-speak:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(244, 63, 94, 0.35);
}

.btn-inspector-scroll {
  background: #ffffff;
  color: var(--text-rose);
  border: 1.5px solid var(--border-pink);
  padding: 8px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Tajawal', sans-serif;
  transition: all 0.2s ease;
}

.btn-inspector-scroll:hover {
  background: #fff1f2;
  transform: translateY(-2px);
}

/* Audio Wave Visualizer Bars */
.voice-wave-bars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 14px;
  margin-right: 4px;
}

.voice-wave-bars span {
  display: inline-block;
  width: 3px;
  height: 100%;
  background: #ffffff;
  border-radius: 2px;
  animation: voiceWavePulse 0.75s infinite ease-in-out alternate;
}

.voice-wave-bars span:nth-child(2) {
  animation-delay: 0.2s;
}

.voice-wave-bars span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes voiceWavePulse {
  0% { height: 4px; }
  100% { height: 14px; }
}

/* Card Header with Audio Button */
.card-header-with-audio {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.card-header-with-audio h4 {
  margin: 0 !important;
}

.btn-card-listen {
  background: #ffffff;
  border: 1.5px solid var(--border-pink);
  color: var(--text-rose);
  padding: 5px 14px;
  border-radius: 14px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.08);
  transition: all 0.2s ease;
}

.btn-card-listen:hover {
  background: #fff1f2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.15);
}

.btn-card-listen.speaking-active,
.btn-inspector-speak.speaking-active {
  background: linear-gradient(135deg, #e11d48, #be123c) !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 15px rgba(225, 29, 72, 0.45) !important;
}

/* Card Flash Animation when linked from Diagram */
.flash-concept-card {
  animation: flashHighlight 1.6s ease-out !important;
}

@keyframes flashHighlight {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(244, 63, 94, 0); }
  35% { transform: scale(1.02); box-shadow: 0 0 30px rgba(244, 63, 94, 0.4), 0 0 15px rgba(255, 215, 0, 0.4); border-color: #f43f5e !important; }
  100% { transform: scale(1); }
}

@media (max-width: 600px) {
  .interactive-diagram-container {
    padding: 16px 14px;
  }
  .diagram-header-title h3 {
    font-size: 1.05rem;
  }
  .inspector-content-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .inspector-tags, .inspector-actions {
    justify-content: center;
  }
  .inspector-example {
    border-right: none;
    border-top: 3px solid var(--border-pink);
  }
}
