/* ══════════════════════════════════════════════════════════════════
   عالم الأطفال الإسلامي - Styling
   Islamic Kids World - CSS Styles
   ════════════════════════════════════════════════════════════════ */

/* Kids Banner */
.kids-banner {
  background: linear-gradient(135deg, #ff6b9d 0%, #ffa500 50%, #4ecdc4 100%);
  padding: 30px 20px;
  text-align: center;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  animation: slideDown 0.5s ease;
}

.kids-banner-content {
  color: white;
}

.kids-page {
  position: relative;
  min-height: calc(100vh - 180px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.kids-boy-theme {
  background: linear-gradient(180deg, #8dd0ff 0%, #c8ecff 50%, #dff3ff 100%);
  padding: 18px;
}

/* ── Boy Hero Layout ──────────────────────────────── */
.kids-hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  margin-bottom: 16px;
  position: relative;
  min-height: 260px;
}

.kids-side-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 90px;
  flex-shrink: 0;
  z-index: 2;
}

.kids-char-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: 1;
  position: relative;
  gap: 4px;
}

.kids-quran-center-item {
  width: 118px;
  flex-shrink: 0;
  z-index: 3;
  margin-bottom: 2px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(219, 234, 254, 0.95));
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.18);
}

.kids-quran-center-item .kids-side-icon {
  font-size: 44px;
  margin-bottom: 6px;
}

.kids-quran-center-item .kids-side-name {
  font-size: 12px;
  line-height: 1.35;
}

.kids-girl-theme .kids-quran-center-item {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(252, 231, 243, 0.95));
  border-color: rgba(236, 72, 153, 0.35);
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.16);
}

.kids-girl-theme .kids-quran-center-item .kids-side-name {
  color: #831843;
}

.kids-char-img {
  width: 150px;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(37,99,235,0.18));
  animation: boyFloat 3s ease-in-out infinite;
}

@keyframes boyFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.kids-side-item {
  background: rgba(255,255,255,0.92);
  border: 2px solid rgba(59,130,246,0.22);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 14px rgba(37,99,235,0.10);
  user-select: none;
}

.kids-side-item:hover {
  transform: scale(1.07) translateY(-3px);
  border-color: #2563eb;
  box-shadow: 0 8px 22px rgba(37,99,235,0.18);
  background: rgba(255,255,255,1);
}

.kids-side-item:active {
  transform: scale(0.95);
}

.kids-side-icon {
  font-size: 26px;
  margin-bottom: 4px;
  display: block;
  animation: pulse 2.5s ease-in-out infinite;
}

.kids-side-name {
  font-size: 10px;
  font-weight: 700;
  color: #1e3a8a;
  line-height: 1.3;
  display: block;
}

.kids-boy-theme::before {
  content: '';
  position: absolute;
  top: -18%;
  left: -10%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.9), transparent 55%);
  filter: blur(24px);
  opacity: 0.25;
  pointer-events: none;
}

.kids-boy-theme::after {
  content: '';
  position: absolute;
  top: 8%;
  right: -12%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255,221,113,0.65), transparent 50%);
  filter: blur(18px);
  opacity: 0.25;
  pointer-events: none;
}

.kids-boy-theme .kids-banner {
  background: linear-gradient(135deg, #2563eb 0%, #60a5fa 45%, #bae6fd 100%);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.08);
}

.kids-boy-theme .kids-subtitle {
  color: rgba(248, 250, 252, 0.94);
}

.kids-boy-theme .kids-section-title {
  color: #1e3a8a !important;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.kids-boy-theme .kids-profile-card,
.kids-boy-theme .xp-progress-section,
.kids-boy-theme .kids-setup-card,
.kids-boy-theme .quiz-result-container,
.kids-boy-theme .achievements-header,
.kids-boy-theme .shop-header {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(59, 130, 246, 0.22);
}

.kids-boy-theme .kids-profile-card {
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.12);
}

.kids-boy-theme .kids-avatar {
  color: #1d4ed8;
}

.kids-boy-theme .kids-quiz-container {
  background: rgba(255,255,255,0.78);
  padding: 18px;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 45px rgba(56, 189, 248, 0.12);
}

.kids-boy-theme .quiz-question-card {
  background: rgba(255,255,255,0.98);
  color: #0f172a;
  border: 1px solid rgba(59, 130, 246, 0.22);
}

.kids-boy-theme .quiz-option {
  background: rgba(255,255,255,0.96);
  border-color: rgba(59, 130, 246, 0.22);
  color: #0f172a;
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.06);
}

.kids-boy-theme .quiz-option:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: #2563eb;
}

.kids-boy-theme .kids-btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
  color: #fff;
}

.kids-boy-theme .kids-btn-secondary {
  background: rgba(59, 130, 246, 0.14);
  color: #0f172a;
}

.kids-boy-theme .achievement-card,
.kids-boy-theme .shop-item-card {
  background: rgba(255,255,255,0.94);
  box-shadow: 0 18px 30px rgba(59, 130, 246, 0.08);
}

.kids-boy-theme .achievement-card.unlocked {
  border-color: rgba(37, 99, 235, 0.6);
}

.kids-boy-theme .shop-item-card.owned {
  border-color: rgba(37, 99, 235, 0.35);
}

.kids-page .back-btn {
  position: relative;
  z-index: 1;
}

.kids-page .kids-banner,
.kids-page .kids-profile-card,
.kids-page .xp-progress-section,
.kids-page .kids-setup-card,
.kids-page .kids-quiz-container,
.kids-page .quiz-result-container,
.kids-page .achievements-header,
.kids-page .shop-header {
  position: relative;
  z-index: 1;
}

.kids-page .quiz-options {
  position: relative;
  z-index: 1;
}

.kids-page .confetti-animation,
.kids-page .success-message,
.kids-page .error-message {
  z-index: 2;
}

.kids-subtitle {
  font-size: 14px;
  opacity: 0.95;
}

/* Profile Card */
.kids-profile-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  border: 2px solid #ffd700;
}

.profile-left {
  display: flex;
  gap: 12px;
  align-items: center;
}

.kids-avatar {
  font-size: 48px;
  animation: bounce 1s ease-in-out infinite;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.5);
  border: 3px solid #fff;
  overflow: hidden;
}
.kids-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--on-surface);
}

.profile-level {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--on-surface-variant);
  margin-top: 2px;
}

.level-icon {
  font-size: 18px;
}

.profile-right {
  text-align: center;
}

.xp-display {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  text-align: center;
}

.xp-number {
  font-size: 20px;
  font-weight: 700;
}

.xp-label {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 2px;
}

/* XP Progress */
.xp-progress-section {
  background: var(--surface);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.xp-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--on-surface-variant);
  margin-bottom: 8px;
}

.xp-next {
  font-weight: 700;
  color: var(--primary);
}

.xp-progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(0,0,0,0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.xp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.5s ease;
  border-radius: var(--radius-full);
}

/* Daily Challenges */
.daily-challenges {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.challenge-card {
  background: var(--surface);
  padding: 12px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border-left: 4px solid #ffa500;
}

.challenge-card.completed {
  opacity: 0.6;
  border-left-color: #4caf50;
  background: rgba(76, 175, 80, 0.05);
}

.challenge-icon {
  font-size: 24px;
}

.challenge-info {
  flex: 1;
}

.challenge-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--on-surface);
}

.challenge-points {
  font-size: 12px;
  color: var(--on-surface-variant);
  margin-top: 2px;
}

.challenge-check {
  font-size: 18px;
  color: #ffa500;
}

.challenge-card.completed .challenge-check {
  color: #4caf50;
}

/* Kids Menu */
.kids-section-title {
  color: var(--on-surface);
  margin: 20px 0 16px;
}

.kids-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.kids-menu-item {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid transparent;
}

.kids-menu-item:active {
  transform: scale(0.95);
}

.kids-menu-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.menu-icon {
  font-size: 32px;
  margin-bottom: 8px;
  animation: pulse 2s ease-in-out infinite;
}

.menu-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--on-surface);
  margin-bottom: 4px;
}

.menu-icon-small {
  font-size: 11px;
  color: var(--on-surface-variant);
}

/* Quiz Styling */
.quiz-header {
  margin-bottom: 16px;
}

.quiz-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0,0,0,0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 12px;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
}

.quiz-counter {
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--on-surface-variant);
}

.kids-quiz-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quiz-question-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.question-text {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-option {
  background: var(--surface);
  border: 2px solid var(--outline);
  color: var(--on-surface);
  padding: 14px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quiz-option:active {
  transform: scale(0.98);
}

.quiz-option:hover {
  border-color: var(--primary);
  background: rgba(27, 77, 62, 0.05);
}

/* Success/Error Animations */
.confetti-animation {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.confetti {
  position: absolute;
  font-size: 24px;
  animation: fall 2s ease-in forwards;
  opacity: 0;
}

@keyframes fall {
  0% {
    opacity: 1;
    transform: translateY(-100px) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(300px) rotate(360deg);
  }
}

.success-message {
  background: #4caf50;
  color: white;
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 700;
  font-size: 18px;
  animation: slideUp 0.5s ease;
}

.error-message {
  background: #ff6b6b;
  color: white;
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 700;
  font-size: 18px;
  animation: shake 0.5s ease;
}

/* Quiz Results */
.quiz-result-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
}

.result-emoji {
  font-size: 64px;
  animation: bounce 1s ease-in-out infinite;
}

.result-message {
  font-size: 20px;
  font-weight: 700;
  color: var(--on-surface);
  text-align: center;
}

.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.stat-box {
  background: var(--surface);
  padding: 16px 12px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-box.highlight {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  opacity: 0.8;
}

.result-level-up {
  background: linear-gradient(135deg, #ff6b9d 0%, #ffa500 100%);
  color: white;
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 700;
  animation: bounce 1s ease-in-out;
}

/* Achievements */
.achievements-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.achievements-header h2 {
  font-size: 20px;
  color: var(--on-surface);
}

.achievements-count {
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.achievement-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 2px solid rgba(0,0,0,0.1);
  opacity: 0.5;
  position: relative;
}

.achievement-card.unlocked {
  opacity: 1;
  border: 2px solid #ffd700;
  background: rgba(255, 215, 0, 0.05);
}

.achievement-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.achievement-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--on-surface);
  margin-bottom: 4px;
}

.achievement-desc {
  font-size: 11px;
  color: var(--on-surface-variant);
}

.achievement-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #4caf50;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

/* Shop */
.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.shop-header h2 {
  font-size: 20px;
  color: var(--on-surface);
}

.xp-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.xp-coin {
  font-size: 18px;
}

.shop-categories {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.shop-cat-btn {
  background: var(--surface);
  border: 2px solid var(--outline);
  color: var(--on-surface);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
}

.shop-cat-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.shop-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.shop-item-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 2px solid rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.shop-item-card.owned {
  opacity: 0.6;
  border: 2px dashed #4caf50;
  background: rgba(76, 175, 80, 0.05);
}

/* الألقاب المشتراة — واضحة بدون شفافية */
.shop-item-card.title-item.owned {
  opacity: 1;
}

.kids-boy-theme .shop-item-card.title-item.owned {
  border: 2px solid #1e3a8a;
  background: #eff6ff;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
}

.kids-boy-theme .shop-item-card.title-item.owned .item-title {
  color: #1e3a8a !important;
  font-weight: 800;
  background: rgba(219, 234, 254, 0.9);
  padding: 6px 10px;
  border-radius: 10px;
}

.kids-girl-theme .shop-item-card.title-item.owned {
  border: 2px solid #991b1b;
  background: #fef2f2;
  box-shadow: 0 4px 12px rgba(153, 27, 27, 0.15);
}

.kids-girl-theme .shop-item-card.title-item.owned .item-title {
  color: #991b1b !important;
  font-weight: 800;
  background: rgba(254, 226, 226, 0.95);
  padding: 6px 10px;
  border-radius: 10px;
}

.item-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.item-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--on-surface);
  margin-bottom: 8px;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 700;
  font-size: 12px;
  color: var(--on-surface-variant);
  margin-bottom: 8px;
}

.item-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.item-btn:active {
  transform: scale(0.95);
}

/* Action Buttons */
.kids-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.kids-btn {
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.kids-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.kids-btn-secondary {
  background: linear-gradient(135deg, #ff6b9d 0%, #ffa500 100%);
  color: white;
}

.kids-btn:active {
  transform: scale(0.98);
}

/* Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(2deg); }
  75% { transform: rotate(-2deg); }
}

/* Back Button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: rgba(27, 77, 62, 0.1);
}

.kids-setup-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  box-shadow: var(--shadow-md);
  margin: 16px 0 24px;
  border: 2px solid rgba(255, 215, 0, 0.35);
}

.setup-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--on-surface);
  margin-bottom: 16px;
  text-align: center;
}

.setup-gender-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 18px;
}

.gender-btn {
  flex: 1;
  padding: 14px 10px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(27, 77, 62, 0.15);
  background: var(--surface);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.gender-btn.selected {
  border-color: #ffb703;
  background: linear-gradient(135deg, #ffcb77 0%, #ffaf3d 100%);
  color: #1f2937;
}

.gender-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.08);
}

.setup-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.setup-input-group label {
  font-size: 13px;
  color: var(--on-surface-variant);
}

#kidsNameInput {
  width: 100%;
  padding: 14px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(27, 77, 62, 0.15);
  font-size: 14px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

#kidsNameInput:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

/* Responsive */
@media (max-width: 480px) {
  .kids-menu-grid {
    grid-template-columns: 1fr;
  }

  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .shop-items-grid {
    grid-template-columns: 1fr;
  }

  .kids-action-buttons {
    grid-template-columns: 1fr;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }
}

/* Dark Mode Overrides */
body.dark-mode .kids-banner {
  background: linear-gradient(135deg, #d32f2f 0%, #f57c00 50%, #00897b 100%);
}

body.dark-mode .kids-profile-card {
  background: var(--surface);
  border-color: #ff9800;
}

body.dark-mode .quiz-option {
  background: var(--surface);
  border-color: var(--outline);
}

/* ── Girl Theme Layout ──────────────────────────────── */
.kids-girl-theme {
  background: linear-gradient(180deg, #ffb6c1 0%, #ffc0cb 50%, #ffe4e1 100%);
  padding: 18px;
}

.kids-girl-theme::before {
  content: '';
  position: absolute;
  top: -18%;
  left: -10%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.9), transparent 55%);
  filter: blur(24px);
  opacity: 0.25;
  pointer-events: none;
}

.kids-girl-theme::after {
  content: '';
  position: absolute;
  top: 8%;
  right: -12%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255,182,193,0.65), transparent 50%);
  filter: blur(18px);
  opacity: 0.25;
  pointer-events: none;
}

.kids-girl-theme .kids-banner {
  background: linear-gradient(135deg, #ff69b4 0%, #ff1493 45%, #db7093 100%);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.08);
}

.kids-girl-theme .kids-subtitle {
  color: rgba(248, 250, 252, 0.94);
}

.kids-girl-theme .kids-section-title {
  color: #c71585 !important;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.kids-girl-theme .kids-profile-card,
.kids-girl-theme .xp-progress-section,
.kids-girl-theme .kids-setup-card,
.kids-girl-theme .quiz-result-container,
.kids-girl-theme .achievements-header,
.kids-girl-theme .shop-header {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 105, 180, 0.22);
}

.kids-girl-theme .kids-profile-card {
  box-shadow: 0 18px 36px rgba(255, 105, 180, 0.12);
}

.kids-girl-theme .kids-avatar {
  color: #ff1493;
}

.kids-girl-theme .kids-quiz-container {
  background: rgba(255,255,255,0.78);
  padding: 18px;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 45px rgba(255, 182, 193, 0.12);
}

.kids-girl-theme .quiz-question-card {
  background: rgba(255,255,255,0.98);
  color: #0f172a;
  border: 1px solid rgba(255, 105, 180, 0.22);
}

.kids-girl-theme .quiz-option {
  background: rgba(255,255,255,0.96);
  border-color: rgba(255, 105, 180, 0.22);
  color: #0f172a;
  box-shadow: 0 10px 20px rgba(255, 105, 180, 0.06);
}

.kids-girl-theme .quiz-option:hover {
  background: rgba(255, 105, 180, 0.12);
  border-color: #ff1493;
}

.kids-girl-theme .kids-btn-primary {
  background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
  color: #fff;
}

.kids-girl-theme .kids-btn-secondary {
  background: rgba(255, 105, 180, 0.14);
  color: #0f172a;
}

.kids-girl-theme .achievement-card,
.kids-girl-theme .shop-item-card {
  background: rgba(255,255,255,0.94);
  box-shadow: 0 18px 30px rgba(255, 105, 180, 0.08);
}

.kids-girl-theme .achievement-card.unlocked {
  border-color: rgba(255, 20, 147, 0.6);
}

.kids-girl-theme .shop-item-card.owned {
  border-color: rgba(255, 20, 147, 0.35);
}

/* Also ensure drop shadow on the girl image */
.kids-girl-theme .kids-char-img {
  filter: drop-shadow(0 8px 18px rgba(255, 105, 180, 0.25));
}
.kids-boy-theme .kids-char-img {
  filter: drop-shadow(0 8px 18px rgba(37,99,235,0.18));
}

/* -- Titles and Frames Styles -------------------------------- */
.profile-titles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
}

.title-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
  opacity: 1;
  backdrop-filter: none;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  text-shadow: none;
}

.kids-boy-theme .title-badge {
  background: #1e3a8a;
  color: #ffffff;
  border: 2px solid #1d4ed8;
}

.kids-girl-theme .title-badge {
  background: #991b1b;
  color: #ffffff;
  border: 2px solid #b91c1c;
}

.kids-avatar {
  position: relative;
  z-index: 1;
}

/* Frame Styles */
.kids-avatar.frame-frame_stars {
  border: 4px solid #ffeb3b !important;
  box-shadow: 0 0 15px #ffeb3b, inset 0 0 10px #ffeb3b !important;
}
.kids-avatar.frame-frame_stars::after {
  content: "?";
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 24px;
}

.kids-avatar.frame-frame_clouds {
  border: 4px solid #81d4fa !important;
  box-shadow: 0 0 15px #81d4fa !important;
}
.kids-avatar.frame-frame_clouds::after {
  content: "??";
  position: absolute;
  bottom: -5px;
  left: -5px;
  font-size: 24px;
}

.kids-avatar.frame-frame_gold {
  border: 5px solid #ffd700 !important;
  box-shadow: 0 0 20px #ffd700, inset 0 0 15px #ffd700 !important;
}

.kids-avatar.frame-frame_diamond {
  border: 5px solid #00e5ff !important;
  box-shadow: 0 0 25px #00e5ff, inset 0 0 20px #00e5ff !important;
}
.kids-avatar.frame-frame_diamond::before {
  content: "??";
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
}

/* Fixes for gender buttons and item titles */
.gender-btn {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #1f2937 !important;
  backdrop-filter: blur(5px);
}
.kids-boy-theme .gender-btn, .kids-girl-theme .gender-btn {
  color: #fff !important;
}

.item-title {
  color: #1f2937 !important;
}
.kids-boy-theme .item-title, .kids-girl-theme .item-title {
  color: #1f2937 !important;
}
.shop-item-card {
  background: rgba(255, 255, 255, 0.85) !important;
}

/* Layout Adjustments after removing Daily Challenges */
.kids-hero {
  min-height: 400px !important;
  margin-top: 30px !important;
}
.kids-char-img {
  width: 220px !important;
}
.kids-quran-center-item {
  width: 130px !important;
  padding: 16px 10px !important;
}
.kids-quran-center-item .kids-side-icon {
  font-size: 46px !important;
}
.kids-quran-center-item .kids-side-name {
  font-size: 13px !important;
}
.kids-side-col {
  width: 115px !important;
  gap: 15px !important;
}
.kids-side-item {
  padding: 15px 10px !important;
}
.kids-side-icon {
  font-size: 38px !important;
  margin-bottom: 8px !important;
}
.kids-side-name {
  font-size: 14px !important;
}

/* Make quiz options more transparent and text readable */
.quiz-option {
  background: rgba(255, 255, 255, 0.4) !important;
  color: #1e3a8a !important;
}
.kids-girl-theme .quiz-option {
  color: #831843 !important;
}

/* Responsive adjustments for kids-hero layout on mobile/tablet screens */
@media (max-width: 520px) {
  .kids-boy-theme, .kids-girl-theme {
    padding: 8px !important;
  }
  .kids-hero {
    min-height: 300px !important;
    margin-top: 20px !important;
  }
  .kids-char-img {
    width: 130px !important;
  }
  .kids-quran-center-item {
    width: 95px !important;
  }
  .kids-quran-center-item .kids-side-icon {
    font-size: 32px !important;
  }
  .kids-quran-center-item .kids-side-name {
    font-size: 10px !important;
  }
  .kids-side-col {
    width: 95px !important;
    gap: 10px !important;
  }
  .kids-side-item {
    padding: 10px 6px !important;
  }
  .kids-side-icon {
    font-size: 26px !important;
    margin-bottom: 6px !important;
  }
  .kids-side-name {
    font-size: 11px !important;
  }
}

@media (max-width: 400px) {
  .kids-hero {
    min-height: 250px !important;
    margin-top: 15px !important;
  }
  .kids-char-img {
    width: 100px !important;
  }
  .kids-quran-center-item {
    width: 82px !important;
  }
  .kids-quran-center-item .kids-side-icon {
    font-size: 26px !important;
  }
  .kids-quran-center-item .kids-side-name {
    font-size: 9px !important;
  }
  .kids-side-col {
    width: 82px !important;
    gap: 8px !important;
  }
  .kids-side-item {
    padding: 6px 3px !important;
  }
  .kids-side-icon {
    font-size: 20px !important;
    margin-bottom: 4px !important;
  }
  .kids-side-name {
    font-size: 9.5px !important;
  }
}

/* Animation and classes for quiz option click states (highlights and flashes) */
@keyframes correct-blink {
  0%, 100% {
    background: #4caf50 !important;
    color: #fff !important;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.7);
  }
  50% {
    background: rgba(255, 255, 255, 0.4) !important;
    color: #1e3a8a !important;
    transform: scale(1);
    box-shadow: none;
  }
}

.quiz-option.correct-choice {
  background: #4caf50 !important;
  color: #fff !important;
  animation: correct-blink 0.6s ease-in-out infinite;
  border-color: #2e7d32 !important;
}

.quiz-option.wrong-choice {
  background: #f44336 !important;
  color: #fff !important;
  border-color: #c62828 !important;
}

/* ─── NEW FEATURES (SETTINGS, PRO LEVELS, COMPETITIONS) ───────────── */

/* Settings Page */
.kids-settings-page {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  padding: 10px 15px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}

.settings-header .back-btn {
  margin-bottom: 0;
}

.close-icon {
  color: #e53935;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
}

.settings-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 15px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.05);
}

.settings-section h3 {
  font-size: 15px;
  margin-bottom: 15px;
  color: var(--on-surface);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Character Selection */
.char-options {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.char-option {
  flex: 1;
  background: rgba(0,0,0,0.02);
  border: 2px dashed rgba(0,0,0,0.1);
  border-radius: var(--radius-md);
  padding: 15px 10px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.char-option img {
  margin-bottom: 10px;
}

.char-option.active {
  border: 2px solid #ff9800;
  background: rgba(255, 152, 0, 0.05);
}

.char-option .check-mark {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #4caf50;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Continue Reading */
.continue-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border: 1px solid #81c784;
  cursor: pointer;
}

.continue-left h3 {
  margin-bottom: 5px;
  color: #2e7d32;
}

.continue-surah {
  font-weight: bold;
  color: #1b5e20;
  margin-bottom: 5px;
  font-size: 14px;
}

.continue-hint {
  font-size: 11px;
  color: #4caf50;
}

.play-icon-btn {
  background: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  color: #2e7d32;
}

/* Storage */
.storage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.storage-header h3 {
  margin-bottom: 0;
}

.lock-icon {
  font-size: 24px;
  cursor: pointer;
}

.storage-hint {
  font-size: 12px;
  color: var(--on-surface-variant);
  margin-top: 10px;
}

/* Awards */
.awards-stats {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-weight: bold;
  color: #ff9800;
}

.awards-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cert-btn {
  padding: 12px;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: bold;
  font-size: 13px;
  border: 2px dashed rgba(0,0,0,0.1);
}

.cert-btn.info {
  background: rgba(255, 152, 0, 0.1);
  border-color: #ffb74d;
  color: #e65100;
  border-style: solid;
}

.cert-btn.locked {
  background: #f5f5f5;
  color: #9e9e9e;
}

.cert-btn.unlocked {
  background: #e0e0e0;
  color: #424242;
  border-style: solid;
  border-color: #bdbdbd;
}

.cert-btn.unlocked.gold {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  color: white;
  border-color: #2e7d32;
}

/* Pro Levels */
.kids-pro-page, .kids-comp-page {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.pro-hint, .comp-hint {
  text-align: center;
  color: #ff9800;
  font-weight: bold;
  font-size: 14px;
  background: rgba(255, 152, 0, 0.1);
  padding: 8px;
  border-radius: var(--radius-md);
}

.pro-levels-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pro-level-card {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--surface);
  padding: 15px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 2px dashed rgba(0,0,0,0.1);
  position: relative;
}

.pro-level-card.unlocked {
  border: 2px solid #ce93d8;
  background: linear-gradient(135deg, #f3e5f5 0%, #fce4ec 100%);
  cursor: pointer;
}

.pro-level-card.unlocked:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.play-arrow {
  color: #ab47bc;
  font-size: 20px;
}

.level-info {
  flex: 1;
}

.level-info h4 {
  color: #6a1b9a;
  margin-bottom: 5px;
  font-size: 15px;
}

.level-info p {
  font-size: 12px;
  color: #8e24aa;
}

.level-badge {
  font-size: 30px;
}

/* Footer Banner */
.kids-footer-banner {
  display: flex;
  align-items: center;
  gap: 15px;
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  padding: 15px;
  border-radius: var(--radius-md);
  border: 1px solid #ffcc80;
  margin-top: 10px;
}

.kids-footer-banner img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  padding: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.kids-footer-banner h4 {
  color: #ef6c00;
  margin-bottom: 5px;
  font-size: 14px;
}

.kids-footer-banner p {
  font-size: 12px;
  color: #e65100;
}

/* Competitions */
.comp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.comp-card {
  padding: 15px 10px;
  border-radius: var(--radius-md);
  text-align: center;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.comp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.comp-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.comp-card h4 {
  font-size: 14px;
  margin-bottom: 5px;
}

.comp-card p {
  font-size: 11px;
  opacity: 0.9;
  margin-bottom: 10px;
}

.comp-best {
  background: rgba(0,0,0,0.2);
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: bold;
}

.comp-green { background: linear-gradient(135deg, #81c784 0%, #4caf50 100%); }
.comp-cyan { background: linear-gradient(135deg, #4dd0e1 0%, #00acc1 100%); }
.comp-purple { background: linear-gradient(135deg, #ba68c8 0%, #8e24aa 100%); }
.comp-orange { background: linear-gradient(135deg, #ffb74d 0%, #f57c00 100%); }

@media (max-width: 480px) {
  .comp-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Kids Quran Memorization Section Styles ─── */
.kids-quran-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.4s ease-out;
}

.kids-quran-theme {
  --kids-primary: #2e7d32;
  --kids-secondary: #0288d1;
  --kids-accent: #f57f17;
  --kids-bg-light: #e8f5e9;
  --kids-bg-blue: #e1f5fe;
  --kids-bg-gold: #fffde7;
  --kids-text: #1b5e20;
  --kids-text-dark: #0f172a;
}

/* Header and Cards */
.kids-quran-banner {
  background: linear-gradient(135deg, #2e7d32 0%, #1565c0 50%, #f57f17 100%);
  padding: 24px 16px;
  text-align: center;
  border-radius: var(--radius-xl);
  color: white;
  box-shadow: 0 10px 25px rgba(46, 125, 50, 0.15);
  margin-bottom: 8px;
}

.kids-quran-banner h2 {
  font-family: 'Tajawal', sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.kids-quran-banner p {
  font-size: 13px;
  opacity: 0.95;
  margin: 0;
  line-height: 1.5;
}

.kids-quran-card {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(46, 125, 50, 0.15);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.kids-quran-card h3 {
  color: var(--kids-primary);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Stats Dashboard */
.kids-quran-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.kids-quran-stat-box {
  padding: 12px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.kids-quran-stat-box:active {
  transform: scale(0.96);
}

.kids-quran-stat-box.green-box {
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  color: #2e7d32;
}

.kids-quran-stat-box.blue-box {
  background: #e1f5fe;
  border: 1px solid #b3e5fc;
  color: #0288d1;
}

.kids-quran-stat-box.gold-box {
  background: #fffde7;
  border: 1px solid #fff9c4;
  color: #f57f17;
}

.kids-quran-stat-box.purple-box {
  background: #f3e5f5;
  border: 1px solid #e1bee7;
  color: #7b1fa2;
}

.kids-quran-stat-val {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.kids-quran-stat-lbl {
  font-size: 10px;
  opacity: 0.9;
  margin-top: 3px;
  font-weight: 600;
}

/* Action Grids */
.kids-quran-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.kids-quran-action-card {
  background: white;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(0,0,0,0.04);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.kids-quran-action-card:hover, .kids-quran-action-card:active {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.kids-quran-action-card.listen-card { border-color: #b3e5fc; background: #fafeff; }
.kids-quran-action-card.listen-card:hover { border-color: #0288d1; }
.kids-quran-action-card.recite-card { border-color: #c8e6c9; background: #fafdfa; }
.kids-quran-action-card.recite-card:hover { border-color: #2e7d32; }
.kids-quran-action-card.test-card { border-color: #ffe0b2; background: #fffffa; }
.kids-quran-action-card.test-card:hover { border-color: #f57c00; }
.kids-quran-action-card.parent-card { border-color: #e1bee7; background: #fffafb; }
.kids-quran-action-card.parent-card:hover { border-color: #7b1fa2; }

.kids-quran-action-icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}

.kids-quran-action-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--kids-text-dark);
}

.kids-quran-action-desc {
  font-size: 10px;
  color: #64748b;
  margin-top: 3px;
}

/* Surah List Styles */
.kids-quran-plan-selector {
  display: flex;
  background: rgba(0,0,0,0.05);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 4px;
}

.kids-quran-plan-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  color: #64748b;
  transition: all 0.2s;
}

.kids-quran-plan-btn.active {
  background: var(--kids-primary);
  color: white;
  box-shadow: 0 4px 10px rgba(46, 125, 50, 0.2);
}

.kids-quran-surah-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 2px;
}

.kids-quran-surah-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.kids-quran-surah-card.not-started {
  border-left: 6px solid #94a3b8;
}

.kids-quran-surah-card.memorizing {
  border-left: 6px solid #f57f17;
  background: #fffdfa;
}

.kids-quran-surah-card.memorized {
  border-left: 6px solid #2e7d32;
  background: #fafdfa;
}

.kids-quran-surah-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kids-quran-surah-name-ar {
  font-family: 'Amiri', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--kids-text-dark);
}

.kids-quran-surah-meta {
  font-size: 11px;
  color: #64748b;
}

.kids-quran-surah-status-badge {
  font-size: 10px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: var(--radius-full);
}

.kids-quran-surah-status-badge.not-started {
  background: #f1f5f9;
  color: #64748b;
}

.kids-quran-surah-status-badge.memorizing {
  background: #fff3e0;
  color: #e65100;
}

.kids-quran-surah-status-badge.memorized {
  background: #e8f5e9;
  color: #1b5e20;
}

.kids-quran-surah-actions {
  display: flex;
  gap: 8px;
}

.kids-quran-surah-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
}

.kids-quran-surah-btn:hover {
  background: var(--kids-bg-blue);
  color: var(--kids-secondary);
  border-color: #0288d1;
}

.kids-quran-surah-btn.memorized-btn:hover {
  background: var(--kids-bg-light);
  color: var(--kids-primary);
  border-color: #2e7d32;
}

/* Audio Player */
.kids-quran-player-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px;
}

.kids-quran-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kids-quran-player-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.kids-quran-player-selects select, .kids-quran-player-selects input {
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  background: white;
}

.kids-quran-play-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.kids-quran-play-btn {
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  transition: all 0.2s;
}

.kids-quran-play-btn.primary {
  background: var(--kids-primary);
  color: white;
  box-shadow: 0 4px 10px rgba(46, 125, 50, 0.25);
}

.kids-quran-play-btn.secondary {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
}

.kids-quran-play-btn:active {
  transform: scale(0.96);
}

/* Verses Display Box */
.kids-quran-verse-display-box {
  background: #fcfdf9;
  border: 2px dashed #a5d6a7;
  border-radius: var(--radius-md);
  padding: 20px;
  min-height: 120px;
  max-height: 320px;
  overflow-y: auto;
  text-align: center;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.02);
}

.kids-quran-uthmani-text {
  font-family: 'Amiri', serif;
  font-size: 22px;
  line-height: 2.2;
  direction: rtl;
}

.kids-quran-ayah-span {
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}

.kids-quran-ayah-span.active {
  background: #c8e6c9;
  color: #1b5e20;
  border: 1px solid #81c784;
  transform: scale(1.05);
}

.kids-quran-ayah-num {
  font-size: 13px;
  color: var(--kids-accent);
  font-weight: bold;
  border: 1px solid #ffe0b2;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  margin-left: 4px;
  background: #fff8e1;
}

/* Smart Reciter Microphone button */
.kids-quran-mic-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
}

.kids-quran-mic-btn {
  background: linear-gradient(135deg, #ef5350 0%, #d32f2f 100%);
  color: white;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border: 6px solid #ffcdd2;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(211, 47, 47, 0.3);
  position: relative;
  transition: all 0.2s;
}

.kids-quran-mic-btn.recording {
  animation: micPulse 1.5s infinite;
  background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
  border-color: #ff8a80;
}

@keyframes micPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.6);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(211, 47, 47, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(211, 47, 47, 0);
  }
}

.kids-quran-mic-lbl {
  font-weight: 700;
  font-size: 13px;
  color: #ef5350;
}

.kids-quran-mic-lbl.recording {
  color: #d32f2f;
  animation: bounce 1.2s infinite;
}

.kids-quran-match-results {
  background: #fafafa;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  width: 100%;
}

.kids-quran-word-green {
  color: #2e7d32;
  font-weight: bold;
  margin: 0 2px;
  display: inline-block;
}

.kids-quran-word-red {
  color: #c62828;
  text-decoration: line-through;
  font-weight: normal;
  margin: 0 2px;
  display: inline-block;
  opacity: 0.8;
}

.kids-quran-word-missed {
  color: #f57f17;
  border-bottom: 2px dashed #f57f17;
  margin: 0 2px;
  display: inline-block;
}

.kids-quran-accuracy-badge {
  background: #fff;
  border: 3px solid #cbd5e1;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  margin: 10px auto;
}

.kids-quran-accuracy-badge.success {
  border-color: #2e7d32;
  color: #2e7d32;
}

.kids-quran-accuracy-badge.fail {
  border-color: #f57f17;
  color: #f57f17;
}

.kids-quran-accuracy-badge .val {
  font-size: 20px;
  font-weight: 800;
}

.kids-quran-accuracy-badge .lbl {
  font-size: 9px;
  opacity: 0.8;
}

/* Test layout styling */
.kids-quran-test-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.kids-quran-test-opt-btn {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: right;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.kids-quran-test-opt-btn:hover {
  background: var(--kids-bg-blue);
  border-color: var(--kids-secondary);
}

.kids-quran-test-opt-btn.correct {
  background: #e8f5e9;
  border-color: #2e7d32;
  color: #1b5e20;
  font-weight: bold;
}

.kids-quran-test-opt-btn.wrong {
  background: #ffe8e8;
  border-color: #ef5350;
  color: #c62828;
}

.kids-quran-test-order-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.kids-quran-test-order-item {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  text-align: right;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}

.kids-quran-test-order-item.selected {
  background: #e0f2f1;
  border-color: #009688;
  color: #00796b;
  font-weight: bold;
}

/* Parent Dashboard styles */
.parent-dashboard-tabs {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 16px;
}

.parent-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  color: #64748b;
  border-bottom: 3px solid transparent;
}

.parent-tab-btn.active {
  color: var(--kids-primary);
  border-bottom-color: var(--kids-primary);
}

.parent-stats-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.parent-week-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 150px;
  background: #f8fafc;
  border-radius: 8px;
  padding: 24px 12px 10px 12px;
  border: 1px solid #cbd5e1;
  margin-top: 25px;
}

.parent-chart-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.parent-chart-bar-fill {
  background: linear-gradient(180deg, #66bb6a 0%, #2e7d32 100%);
  width: 14px;
  border-radius: var(--radius-full) var(--radius-full) 0 0;
  transition: height 0.4s ease;
}

.parent-chart-day-lbl {
  font-size: 8.5px;
  font-weight: bold;
  color: #64748b;
  text-align: center;
  line-height: 1.25;
  margin-top: 4px;
}

.parent-input-pin-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
}

.parent-input-pin-box input {
  padding: 10px 16px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  font-size: 18px;
  width: 120px;
  text-align: center;
  letter-spacing: 4px;
  outline: none;
}

.parent-input-pin-box input:focus {
  border-color: var(--kids-primary);
}

/* Character Speech Bubble Styling */
.kids-quran-char-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--kids-bg-gold);
  border: 2px solid #ffe082;
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 8px;
}

.kids-quran-char-banner img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.kids-quran-bubble {
  background: white;
  border: 1px solid #ffe082;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 11px;
  line-height: 1.5;
  color: #5d4037;
  position: relative;
  flex: 1;
}

.kids-quran-bubble::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  margin-top: -6px;
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent #ffe082;
}

.kids-quran-bubble::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -5px;
  margin-top: -5px;
  border-width: 5px 0 5px 5px;
  border-style: solid;
  border-color: transparent transparent transparent white;
}


