/* style.css - עיצוב פרימיום מרהיב, שמח ומודרני לאפליקציית צמרות ג'2 */

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

:root {
  /* פלטת צבעים ייחודית, שמחה ומזמינה */
  --bg-gradient: linear-gradient(135deg, #F0F4FF 0%, #E8F5E9 50%, #FFF3E0 100%);
  --primary: #4F46E5;
  --primary-light: #6366F1;
  --primary-dark: #3730A3;
  --accent-pink: #EC4899;
  --accent-amber: #F59E0B;
  --accent-emerald: #10B981;
  --accent-cyan: #06B6D4;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(226, 232, 240, 0.8);
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 20px 30px -10px rgba(99, 102, 241, 0.25), 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

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

body {
  font-family: 'Rubik', 'Varela Round', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  direction: rtl;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ================= כותרת ראשית ומערכת אווטאר בראש ================= */
.app-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(226, 232, 240, 0.7);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.school-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.school-logo-badge {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #4F46E5, #9333EA);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.3);
  transform: rotate(-3deg);
  transition: transform 0.3s ease;
}

.school-logo-badge:hover {
  transform: rotate(3deg) scale(1.05);
}

.brand-text h1 {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(90deg, #4F46E5, #9333EA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* סטטוס תלמיד ומטבעות */
.user-status-strip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.currency-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFF;
  border: 1.5px solid #F1F5F9;
  border-radius: 50px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.currency-pill.coins {
  color: #D97706;
  border-color: #FEF3C7;
  background: #FFFBEB;
}

.currency-pill.stars {
  color: #7C3AED;
  border-color: #EDE9FE;
  background: #F5F3FF;
}

.header-avatar-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFF;
  border: 2px solid #E0E7FF;
  border-radius: 40px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-avatar-widget:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.15);
}

.header-avatar-slot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: #EEF2FF;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-player-info {
  display: flex;
  flex-direction: column;
}

.player-name-clickable {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
}

.player-edit-hint {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 600;
}

/* ================= סרגל ניווט ראשי (Tabs) ================= */
.main-navigation-bar {
  max-width: 1200px;
  margin: 18px auto 0;
  padding: 0 20px;
}

.nav-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.nav-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.nav-tab-btn {
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid #E2E8F0;
  border-radius: 16px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tab-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: #FFF;
  transform: translateY(-2px);
}

.nav-tab-btn.active {
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  color: #FFF;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
  transform: translateY(-2px);
}

.nav-tab-btn .nav-text-mobile {
  display: none;
}

.nav-tab-btn .nav-text-full {
  display: inline;
}

.nav-tab-btn.shop-btn {
  margin-right: auto;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFF;
  border-color: transparent;
}

.nav-tab-btn.shop-btn:hover {
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}

/* ================= מתחם המשחקים המרכזי ================= */
.game-viewport {
  max-width: 1100px;
  margin: 20px auto 50px;
  padding: 0 20px;
}

.game-wrapper, .learn-hub-wrapper {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

/* כותרת משימה וסרגל עליון */
.game-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.game-top-pill {
  background: #EEF2FF;
  color: var(--primary-dark);
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.95rem;
}

.game-top-pill.score-pill {
  background: #FEF3C7;
  color: #B45309;
}

.prompt-box {
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
  border: 2px solid #DBEAFE;
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.prompt-badge {
  display: inline-block;
  background: var(--primary);
  color: #FFF;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 12px;
}

.target-word-display-box {
  margin: 6px 0 12px;
}

.target-word-en {
  font-family: 'Fredoka', 'Rubik', sans-serif;
  font-size: 2.3rem;
  font-weight: 800;
  color: #1E293B;
  background: #FFF;
  padding: 8px 28px;
  border-radius: 50px;
  border: 2.5px solid #C7D2FE;
  display: inline-block;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.12);
  letter-spacing: 0.5px;
  direction: ltr;
}

.prompt-instruction-text {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
}

.audio-control-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-audio-huge {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFF;
  border: none;
  font-family: 'Fredoka', 'Rubik', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
}

.btn-audio-huge:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 25px rgba(16, 185, 129, 0.45);
}

.btn-voice-slow {
  background: #FFF;
  border: 2px solid #E2E8F0;
  color: #475569;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-voice-slow:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  transform: translateY(-2px);
}

/* ================= 📘 שלב 0: כרטיסיות למידה ================= */
.learn-progress-container {
  margin-top: 18px;
  background: #FFF;
  border: 1px solid #E2E8F0;
  padding: 14px 20px;
  border-radius: var(--radius-md);
}

.learn-progress-info {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.progress-bar-track {
  height: 12px;
  background: #F1F5F9;
  border-radius: 50px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #06B6D4);
  border-radius: 50px;
  transition: width 0.4s ease;
}

.category-section {
  margin-top: 30px;
}

.category-badge-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: 16px;
  padding-right: 8px;
  border-right: 4px solid var(--primary);
}

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

.vocab-flashcard {
  background: #FFF;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vocab-flashcard:hover {
  transform: translateY(-6px);
  border-color: var(--primary-light);
  box-shadow: var(--card-shadow-hover);
}

.vocab-flashcard.card-learned {
  border-color: #A7F3D0;
  background: #F0FDF4;
}

.flashcard-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  background: #F1F5F9;
  color: #64748B;
  padding: 3px 8px;
  border-radius: 50px;
}

.flashcard-badge.badge-done {
  background: #DCFCE7;
  color: #15803D;
}

.flashcard-svg-box {
  width: 90px;
  height: 90px;
  margin: 8px auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vocab-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
}

.flashcard-word-en {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: #1E293B;
  direction: ltr;
}

.flashcard-word-he {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 2px;
  margin-bottom: 12px;
}

.flashcard-phonetic {
  font-size: 0.82rem;
  color: #94A3B8;
  direction: ltr;
  margin-bottom: 12px;
}

.flashcard-btns {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.btn-voice-play {
  flex: 1;
  background: #EEF2FF;
  border: 1.5px solid #C7D2FE;
  color: var(--primary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-voice-play:hover {
  background: var(--primary);
  color: #FFF;
}

.btn-voice-play:focus, .btn-voice-slow:focus {
  outline: none;
}

.learn-footer-actions {
  margin-top: 36px;
  text-align: center;
}

.btn-primary-action {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #FFF;
  border: none;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 800;
  padding: 16px 36px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.35);
  transition: all 0.25s ease;
}

.btn-primary-action:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.45);
}

.btn-secondary-action {
  background: #FFF;
  border: 2px solid #CBD5E1;
  color: #475569;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary-action:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
}

/* ================= ⭕ משחק 1: הקשב והקף (Listen & Circle) ================= */
.circle-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 22px;
  margin: 30px 0;
}

.circle-card-item {
  background: #FFF;
  border: 3px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  min-height: 210px;
}

.circle-card-item:hover {
  border-color: var(--primary-light);
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.circle-card-svg-wrap {
  width: 110px;
  height: 110px;
}

.circle-card-label-he {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1E293B;
  margin-top: 10px;
}

.number-card-label-he {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1E293B;
  margin: 4px 0 2px;
}

/* אפקט עיפרון מקיף במבחן */
.pencil-circle-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border-radius: 50% 45% 55% 48% / 48% 52% 48% 52%;
  border: 5px dashed transparent;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.circle-card-item.circled-active .pencil-circle-overlay {
  border-color: #E11D48;
  box-shadow: 0 0 0 6px rgba(225, 29, 72, 0.15);
  animation: drawCircleAnim 0.5s ease-out forwards;
}

.circle-card-item.is-correct-pick {
  border-color: #10B981 !important;
  background: #F0FDF4;
}

.circle-card-item.is-wrong-pick {
  border-color: #EF4444 !important;
  background: #FEF2F2;
}

@keyframes drawCircleAnim {
  0% { transform: scale(0.8) rotate(-10deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ================= 🔢 משחק 2: למספר תמונות לפי סדר (Listen & Number) ================= */
.sequence-listeners-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.btn-seq-listen {
  background: #FFF;
  border: 2px solid #C7D2FE;
  color: var(--primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.btn-seq-listen:hover {
  background: #EEF2FF;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.number-selector-bar {
  background: #F8FAFC;
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.number-selector-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: #334155;
}

.numbers-buttons-row {
  display: flex;
  gap: 12px;
}

.btn-digit-tag {
  min-width: 60px;
  height: 54px;
  border-radius: 16px;
  border: 2.5px solid #CBD5E1;
  background: #FFF;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.digit-num-txt {
  font-size: 1.35rem;
  font-family: 'Fredoka', sans-serif;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1;
}

.digit-word-sub {
  font-size: 0.72rem;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  color: #64748B;
  direction: ltr;
}

.btn-digit-tag:hover {
  transform: scale(1.05);
  border-color: var(--primary-light);
}

.btn-digit-tag.selected-digit {
  background: var(--primary);
  border-color: var(--primary-dark);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
  transform: scale(1.08);
}

.btn-digit-tag.selected-digit .digit-num-txt,
.btn-digit-tag.selected-digit .digit-word-sub {
  color: #FFF;
}

.number-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.number-target-card {
  background: #FFF;
  border: 3px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.25s ease;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.number-target-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.assigned-number-stamp {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #F1F5F9;
  color: #94A3B8;
  font-size: 1.35rem;
  font-family: 'Fredoka', sans-serif;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #E2E8F0;
}

.assigned-number-stamp.visible {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFF;
  border-color: #B45309;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  transform: scale(1.1);
}

.number-card-svg-wrap {
  width: 100px;
  height: 100px;
  margin: 14px auto 10px;
}

.number-card-footer-tap {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748B;
  margin-top: auto;
}

.number-target-card.correct-numbered {
  border-color: #10B981 !important;
  background: #F0FDF4;
}

.number-target-card.wrong-numbered {
  border-color: #EF4444 !important;
  background: #FEF2F2;
}

.number-game-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ================= 🎨 משחק 3: לצבוע לפי הצבע המתאים (Listen & Color) ================= */
.coloring-arena-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  margin-bottom: 30px;
  align-items: center;
}

@media (max-width: 850px) {
  .coloring-arena-layout {
    grid-template-columns: 1fr;
  }
}

.coloring-canvas-box {
  background: #FFF;
  border: 3px dashed #CBD5E1;
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.coloring-canvas-box:hover {
  border-color: var(--accent-pink);
  background: #FDF2F8;
}

.canvas-item-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: 12px;
}

.colorable-canvas-svg {
  width: 180px;
  height: 180px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.canvas-hint-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #94A3B8;
  margin-top: 14px;
}

.paint-splash-anim .colorable-canvas-svg {
  transform: scale(1.15) rotate(3deg);
}

.color-palette-sidebar {
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 24px;
}

.palette-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1E293B;
  margin-bottom: 18px;
  text-align: center;
}

.palette-swatches-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.palette-color-btn {
  background: #FFF;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.palette-color-btn:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: var(--swatch-color);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.palette-color-btn.active-selected-color {
  border-color: var(--swatch-color);
  border-width: 3px;
  background: #FFF;
  transform: scale(1.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.swatch-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.swatch-name-en {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1E293B;
  direction: ltr;
}

.swatch-name-he {
  font-size: 0.82rem;
  color: #64748B;
  font-weight: 600;
}

.color-actions-row {
  text-align: center;
  margin-top: 10px;
}

/* ================= 🔤 משחק 4: תרגום ואיות (Translation & Spelling) ================= */
.spelling-visual-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.spelling-svg-frame {
  width: 90px;
  height: 90px;
}

.spelling-meaning-text {
  font-size: 1.35rem;
  color: #334155;
}

.assembled-slots-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 80px;
  background: #FFF;
  border: 3px dashed #CBD5E1;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  padding: 12px;
}

.slots-placeholder {
  color: #94A3B8;
  font-weight: 700;
  font-size: 1.05rem;
}

.letter-slot-box {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  color: #FFF;
  font-family: 'Fredoka', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.magnetic-letters-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.magnetic-letter-btn {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: #FFF;
  border: 3px solid #C7D2FE;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary-dark);
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.magnetic-letter-btn:hover {
  transform: translateY(-5px) scale(1.1);
  border-color: var(--primary);
  background: #EEF2FF;
}

.magnetic-letter-btn.letter-used {
  opacity: 0.3;
  pointer-events: none;
  transform: scale(0.9);
}

/* כפתורי בחירת תרגום עברי */
.translation-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 30px 0;
}

.translation-option-btn {
  background: #FFF;
  border: 3px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.25s ease;
}

.translation-option-btn:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.trans-hebrew-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #1E293B;
}

.trans-english-hint {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.95rem;
  color: #94A3B8;
  direction: ltr;
}

/* ================= משובים והודעות ================= */
.feedback-box-area {
  margin-top: 24px;
}

.feedback-msg-success {
  background: #ECFDF5;
  border: 2px solid #A7F3D0;
  color: #065F46;
  border-radius: var(--radius-md);
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.15rem;
  font-weight: 800;
}

.feedback-msg-retry {
  background: #FEF2F2;
  border: 2px solid #FECACA;
  color: #991B1B;
  border-radius: var(--radius-md);
  padding: 16px 22px;
  font-size: 1.1rem;
  font-weight: 800;
  text-align: center;
}

/* ================= מודאלים: חנות אווטאר ותעודה ================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.3s ease-out;
}

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

.modal-container {
  background: #FFF;
  border-radius: var(--radius-lg);
  max-width: 750px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  padding: 30px;
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  background: #F1F5F9;
  border: none;
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #E2E8F0;
  color: #1E293B;
}

.modal-title-row {
  text-align: center;
  margin-bottom: 24px;
}

.modal-title-row h2 {
  font-size: 1.7rem;
  font-weight: 800;
  color: #1E293B;
}

.shop-main-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 650px) {
  .shop-main-layout {
    grid-template-columns: 1fr;
  }
}

.shop-avatar-showcase {
  background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  border: 2px solid #C7D2FE;
}

.shop-avatar-frame {
  width: 160px;
  height: 160px;
  margin: 0 auto 12px;
}

.shop-tabs-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.shop-tab-btn {
  background: #F1F5F9;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 50px;
  cursor: pointer;
  color: #475569;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.shop-tab-btn.active {
  background: var(--primary);
  color: #FFF;
}

.shop-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.shop-card {
  background: #FFF;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.shop-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.shop-card.active-equipped {
  border-color: #10B981;
  background: #F0FDF4;
}

.shop-card-icon {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.shop-card-name {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.shop-card-cost {
  font-size: 0.8rem;
  font-weight: 800;
  color: #D97706;
  margin-bottom: 10px;
}

.shop-item-btn {
  width: 100%;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  margin-top: auto;
}

.shop-item-btn.buy {
  background: #F59E0B;
  color: #FFF;
}

.shop-item-btn.buy.locked {
  background: #E2E8F0;
  color: #94A3B8;
  cursor: not-allowed;
}

.shop-item-btn.equip {
  background: var(--primary);
  color: #FFF;
}

.shop-item-btn.equipped {
  background: #10B981;
  color: #FFF;
  cursor: default;
}

/* ================= תעודת הצטיינות צמרות ג'2 ================= */
.cert-card {
  border: 8px double #F59E0B;
  border-radius: var(--radius-md);
  padding: 36px 24px;
  text-align: center;
  background: radial-gradient(circle at center, #FFFDF0 0%, #FFFFFF 100%);
}

.cert-emblem {
  font-size: 3.5rem;
  margin-bottom: 8px;
}

.cert-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: #B45309;
}

.cert-sub {
  font-size: 1.1rem;
  color: #78350F;
  margin-bottom: 20px;
}

.cert-avatar-frame {
  width: 130px;
  height: 130px;
  margin: 0 auto 16px;
}

.cert-name {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 6px;
  margin-bottom: 14px;
}

.cert-text {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #334155;
  margin-bottom: 24px;
}

.cert-stats-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #475569;
}

/* ================= כפתור השתקת סאונד עליון ================= */
.mute-control-btn {
  background: #FFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 50px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mute-control-btn:hover {
  background: #F8FAFC;
}

.mute-control-btn.btn-muted {
  background: #FEE2E2;
  border-color: #FCA5A5;
  color: #B91C1C;
}

/* ================= אנימציות וקונפטי ================= */
.animate-fade-in {
  animation: fadeIn 0.4s ease-out;
}

.animate-pop {
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pulse-bounce {
  animation: pulseBounce 0.5s ease-in-out;
}

.pulse-glow {
  animation: pulseGlow 2.5s infinite;
}

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

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

@keyframes pulseBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35); }
  50% { box-shadow: 0 12px 28px rgba(16, 185, 129, 0.65); }
}

/* קונפטי */
#confettiContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  opacity: 0.9;
  animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* ================= התאמה מלאה ומדויקת למובייל (Mobile Responsive) ================= */
@media (max-width: 768px) {
  /* כותרת עליונה קומפקטית - שורה בודדת */
  .header-inner {
    padding: 6px 10px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .school-brand {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .school-logo-badge {
    width: 32px;
    height: 32px;
    font-size: 18px;
    border-radius: 10px;
  }

  .brand-text h1 {
    font-size: 0.95rem;
  }

  .brand-subtitle {
    display: none;
  }

  .user-status-strip {
    justify-content: flex-end;
    gap: 6px;
    width: auto;
  }

  .mute-control-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
  }

  .currency-pill {
    padding: 4px 10px;
    font-size: 0.82rem;
    gap: 4px;
  }

  .header-avatar-widget {
    padding: 2px 8px 2px 2px;
    gap: 6px;
  }

  .header-avatar-slot {
    width: 32px;
    height: 32px;
  }

  .player-name-clickable {
    font-size: 0.78rem;
  }

  .player-edit-hint {
    font-size: 0.65rem;
  }

  /* סרגל ניווט טאבים - גריד 3 עמודות נקי ומותאם למסך מגע */
  .main-navigation-bar {
    margin: 8px auto 0;
    padding: 0 10px;
  }

  .nav-tabs-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    overflow: visible;
    width: 100%;
    padding-bottom: 0;
  }

  .nav-tab-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 9px 4px;
    font-size: 0.82rem;
    font-weight: 800;
    border-radius: 12px;
    gap: 4px;
    width: 100%;
    white-space: nowrap;
    text-align: center;
  }

  .nav-tab-btn .nav-text-full {
    display: none;
  }

  .nav-tab-btn .nav-text-mobile {
    display: inline;
  }

  .nav-tab-btn.shop-btn {
    margin-right: 0;
  }

  /* מתחם המשחק המרכזי */
  .game-viewport {
    margin: 10px auto 25px;
    padding: 0 10px;
  }

  .game-wrapper, .learn-hub-wrapper {
    padding: 14px 12px;
    border-radius: 18px;
  }

  .game-top-bar {
    margin-bottom: 12px;
    gap: 6px;
  }

  .game-top-pill {
    font-size: 0.8rem;
    padding: 5px 12px;
  }

  .prompt-box {
    padding: 14px 10px;
    margin-bottom: 14px;
    border-radius: 14px;
  }

  .prompt-badge {
    font-size: 0.75rem;
    padding: 3px 10px;
    margin-bottom: 6px;
  }

  .target-word-display-box {
    margin: 4px 0 8px;
  }

  .target-word-en {
    font-size: 1.65rem;
    padding: 5px 20px;
    border-radius: 40px;
  }

  .prompt-instruction-text {
    font-size: 1.05rem;
    margin-bottom: 8px;
    line-height: 1.35;
  }

  .audio-control-buttons {
    gap: 8px;
  }

  .btn-audio-huge {
    font-size: 0.95rem;
    padding: 10px 18px;
    border-radius: 40px;
    gap: 6px;
  }

  .btn-voice-slow {
    font-size: 0.85rem;
    padding: 8px 14px;
  }

  /* משחק 1: הקשב והקף - גריד 2x2 למובייל */
  .circle-cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px 0;
  }

  .circle-card-item {
    padding: 12px 8px;
    min-height: 130px;
    border-radius: 16px;
  }

  .circle-card-svg-wrap {
    width: 70px;
    height: 70px;
  }

  .circle-card-label-he {
    font-size: 0.95rem;
    margin-top: 4px;
  }

  /* משחק 2: למספר לפי סדר */
  .sequence-listeners-row {
    gap: 6px;
    margin-bottom: 12px;
  }

  .btn-seq-listen {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .number-selector-bar {
    padding: 8px 12px;
    gap: 10px;
    margin-bottom: 14px;
  }

  .number-selector-title {
    font-size: 0.9rem;
  }

  .btn-digit-tag {
    min-width: 48px;
    height: 46px;
    border-radius: 12px;
    padding: 2px 4px;
  }

  .digit-num-txt {
    font-size: 1.15rem;
  }

  .digit-word-sub {
    font-size: 0.65rem;
  }

  .number-cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
  }

  .number-target-card {
    padding: 10px 6px;
    min-height: 140px;
    border-radius: 16px;
  }

  .number-card-svg-wrap {
    width: 65px;
    height: 65px;
    margin: 6px auto 4px;
  }

  .assigned-number-stamp {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    top: 6px;
    right: 6px;
  }

  .number-card-footer-tap {
    font-size: 0.72rem;
  }

  .btn-primary-action {
    font-size: 1rem;
    padding: 12px 24px;
  }

  .btn-secondary-action {
    font-size: 0.95rem;
    padding: 10px 18px;
  }

  /* משחק 3: צביעה */
  .coloring-arena-layout {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
  }

  .coloring-canvas-box {
    padding: 12px;
    min-height: 160px;
    border-radius: 16px;
  }

  .canvas-item-title {
    font-size: 1rem;
    margin-bottom: 6px;
  }

  .colorable-canvas-svg {
    width: 110px;
    height: 110px;
  }

  .canvas-hint-text {
    font-size: 0.78rem;
    margin-top: 6px;
  }

  .color-palette-sidebar {
    padding: 12px;
    border-radius: 16px;
  }

  .palette-title {
    font-size: 0.9rem;
    margin-bottom: 10px;
  }

  .palette-swatches-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .palette-color-btn {
    padding: 6px 4px;
    gap: 2px;
  }

  .swatch-circle {
    width: 26px;
    height: 26px;
  }

  .swatch-name-en {
    font-size: 0.85rem;
  }

  .swatch-name-he {
    font-size: 0.7rem;
  }

  /* משחק 4: תרגום מילים - גריד 2x2 נוח */
  .translation-options-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px 0;
  }

  .translation-option-btn {
    padding: 16px 8px;
    border-radius: 14px;
  }

  .trans-hebrew-title {
    font-size: 1.25rem;
  }

  /* כרטיסיות למידה (Hub) */
  .vocab-cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .vocab-flashcard {
    padding: 10px 8px;
    border-radius: 14px;
  }

  .flashcard-svg-box {
    width: 60px;
    height: 60px;
    margin: 4px auto 6px;
  }

  .flashcard-word-en {
    font-size: 1.2rem;
  }

  .flashcard-word-he {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .btn-voice-play, .btn-voice-slow {
    padding: 6px 4px;
    font-size: 0.75rem;
  }

  .category-badge-title {
    font-size: 1.05rem;
    margin-bottom: 10px;
  }
}

