/* ==========================================================================
   AL-FATTAH / LITTLE UMMAH EXPLORERS V2 — 5-IN-1 QURAN SIMULATORS HUB
   Interactive Makharij, Word Builder, Surah Karaoke, Tajweed Detective, Duas
   ========================================================================== */

.simulators-hub-section {
  position: relative;
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: radial-gradient(circle at 50% 10%, rgba(16, 185, 129, 0.08) 0%, rgba(3, 15, 10, 0.98) 70%);
  z-index: 2;
  overflow: hidden;
}

.sim-hub-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

/* 3D Tab Navigation Selector */
.sim-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 5;
}

.sim-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 9999px;
  background: rgba(10, 38, 28, 0.75);
  border: 1px solid rgba(229, 184, 66, 0.25);
  color: var(--text-muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 220ms var(--ease-spring-3d);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform-style: preserve-3d;
}

.sim-tab-btn:hover {
  border-color: var(--gold-main);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.sim-tab-btn.active {
  background: linear-gradient(135deg, rgba(229, 184, 66, 0.25) 0%, rgba(16, 185, 129, 0.2) 100%);
  border-color: var(--gold-main);
  color: #FFF4C8;
  box-shadow: 0 8px 24px rgba(229, 184, 66, 0.3);
  transform: translateY(-3px) scale(1.03);
}

.sim-tab-btn .tab-icon {
  font-size: 1.1rem;
  color: var(--gold-main);
}

/* Simulator Content Panels */
.sim-viewport {
  position: relative;
  min-height: 520px;
}

.sim-panel {
  display: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 300ms ease, transform 300ms var(--ease-spring-3d);
}

.sim-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   SIMULATOR 1: 3D MAKHARIJ ANATOMICAL EXPLORER
   ========================================================================== */
.makharij-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 960px) {
  .makharij-layout {
    grid-template-columns: 1fr;
  }
}

/* Zone Filter Pills */
.zone-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.2rem;
}

.zone-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(6, 26, 18, 0.8);
  border: 1px solid rgba(229, 184, 66, 0.2);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 160ms ease;
}

.zone-pill:hover, .zone-pill.active {
  background: var(--gold-main);
  color: #030F0A;
  border-color: var(--gold-light);
}

/* Alphabet Grid (All 28 letters) */
.alphabet-grid-28 {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .alphabet-grid-28 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.letter-tile-3d {
  aspect-ratio: 1;
  border-radius: 14px;
  background: rgba(10, 38, 28, 0.85);
  border: 1px solid rgba(229, 184, 66, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: all 180ms var(--ease-spring-3d);
}

.letter-tile-3d:hover {
  transform: translateY(-4px) translateZ(10px);
  border-color: var(--gold-main);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(229, 184, 66, 0.3);
}

.letter-tile-3d.selected {
  background: linear-gradient(135deg, rgba(229, 184, 66, 0.3) 0%, rgba(16, 185, 129, 0.35) 100%);
  border-color: var(--gold-main);
  box-shadow: 0 0 25px rgba(229, 184, 66, 0.4);
  transform: translateY(-3px) scale(1.05);
}

.letter-tile-3d .arabic-char {
  font-family: 'Amiri', serif;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--gold-light);
}

.letter-tile-3d .latin-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* 3D Anatomical Vocal Tract Visualizer Card */
.anatomical-card-3d {
  background: linear-gradient(160deg, rgba(14, 52, 38, 0.85) 0%, rgba(6, 26, 18, 0.95) 100%);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 1.8rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.anatomy-svg-wrapper {
  width: 100%;
  height: 230px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.anatomy-svg {
  width: 100%;
  height: 100%;
  max-width: 320px;
}

.vocal-zone-hotspot {
  transition: all 300ms ease;
  cursor: pointer;
}

.vocal-zone-hotspot.active {
  filter: drop-shadow(0 0 12px #E5B842);
  fill: #E5B842 !important;
  stroke: #FFF4C8 !important;
  stroke-width: 3px !important;
}

/* Harakat Pronunciation Selector */
.harakat-selector-bar {
  display: flex;
  gap: 8px;
  margin-top: 1rem;
}

.harakat-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(3, 15, 10, 0.7);
  border: 1px solid rgba(229, 184, 66, 0.25);
  color: var(--text-light);
  font-family: 'Amiri', serif;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 160ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.harakat-btn span.label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.harakat-btn:hover, .harakat-btn.active {
  border-color: var(--gold-main);
  background: rgba(229, 184, 66, 0.2);
  color: var(--gold-light);
}

/* ==========================================================================
   SIMULATOR 2: 3D NOORANI HARAKAT & WORD BUILDER (TARKIB SANDBOX)
   ========================================================================== */
.word-builder-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .word-builder-layout {
    grid-template-columns: 1fr;
  }
}

.workbench-card {
  background: rgba(10, 38, 28, 0.85);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.assembled-word-display {
  background: rgba(3, 15, 10, 0.85);
  border: 2px dashed rgba(229, 184, 66, 0.4);
  border-radius: 18px;
  padding: 1.8rem;
  text-align: center;
  margin-bottom: 1.5rem;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 250ms ease;
}

.assembled-word-display.glow {
  border-color: var(--gold-main);
  box-shadow: 0 0 30px rgba(229, 184, 66, 0.3);
}

.assembled-word-arabic {
  font-family: 'Amiri', serif;
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  color: var(--gold-light);
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-shadow: 0 0 20px rgba(229, 184, 66, 0.4);
}

.assembled-word-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Preset Quranic Words Rack */
.preset-words-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1rem;
}

.preset-word-chip {
  padding: 8px 16px;
  border-radius: 12px;
  background: rgba(6, 26, 18, 0.9);
  border: 1px solid rgba(229, 184, 66, 0.25);
  color: var(--text-light);
  font-family: 'Amiri', serif;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 180ms var(--ease-spring-3d);
}

.preset-word-chip:hover {
  border-color: var(--gold-main);
  background: rgba(229, 184, 66, 0.2);
  transform: translateY(-2px);
}

/* ==========================================================================
   SIMULATOR 3: WORD-BY-WORD SURAH AL-FATIAHA KARAOKE RECITER
   ========================================================================== */
.fatiha-player-card {
  background: linear-gradient(160deg, rgba(14, 52, 38, 0.9) 0%, rgba(6, 26, 18, 0.95) 100%);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

.fatiha-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(229, 184, 66, 0.2);
  margin-bottom: 1.8rem;
}

.fatiha-ayah-container {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.ayah-row {
  background: rgba(3, 15, 10, 0.6);
  border: 1px solid rgba(229, 184, 66, 0.15);
  border-radius: 16px;
  padding: 1.2rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  direction: rtl;
  transition: all 250ms ease;
}

.ayah-row.active-ayah {
  border-color: var(--gold-main);
  background: rgba(229, 184, 66, 0.08);
  box-shadow: 0 4px 20px rgba(229, 184, 66, 0.15);
}

.ayah-number-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gold-main);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Amiri', serif;
  font-size: 1.1rem;
  direction: ltr;
  background: rgba(10, 38, 28, 0.8);
}

.ayah-words-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.quran-word-token {
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(10, 38, 28, 0.6);
  border: 1px solid transparent;
  color: #F8FCFA;
  font-family: 'Amiri', serif;
  font-size: 1.85rem;
  cursor: pointer;
  transition: all 200ms var(--ease-spring-3d);
  position: relative;
}

.quran-word-token:hover {
  background: rgba(229, 184, 66, 0.18);
  border-color: var(--gold-main);
  transform: translateY(-2px);
}

.quran-word-token.active-karaoke {
  background: var(--gold-main);
  color: #030F0A !important;
  box-shadow: 0 0 20px rgba(229, 184, 66, 0.8);
  transform: scale(1.08);
  font-weight: 700;
}

.word-tooltip-card {
  direction: ltr;
  background: rgba(3, 15, 10, 0.95);
  border: 1px solid var(--gold-main);
  border-radius: 14px;
  padding: 1rem 1.4rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   SIMULATOR 4: TAJWEED COLOR-CODING DETECTIVE
   ========================================================================== */
.detective-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .detective-grid {
    grid-template-columns: 1fr;
  }
}

.tajweed-rules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tajweed-rule-pill {
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(10, 38, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 200ms ease;
}

.tajweed-rule-pill.qalqalah { border-left: 5px solid #3B82F6; }
.tajweed-rule-pill.ghunnah  { border-left: 5px solid #10B981; }
.tajweed-rule-pill.madd     { border-left: 5px solid #F59E0B; }
.tajweed-rule-pill.ikhfaa   { border-left: 5px solid #8B5CF6; }

.tajweed-rule-pill:hover, .tajweed-rule-pill.active {
  background: rgba(14, 52, 38, 0.95);
  transform: translateX(4px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.ayah-investigation-chamber {
  background: rgba(3, 15, 10, 0.85);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
}

.tajweed-highlight-text {
  font-family: 'Amiri', serif;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.8;
  direction: rtl;
  margin: 1.5rem 0;
}

.tajweed-span {
  padding: 2px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 200ms ease;
}

.tajweed-span.qalqalah { background: rgba(59, 130, 246, 0.25); color: #93C5FD; border-bottom: 2px solid #3B82F6; }
.tajweed-span.ghunnah  { background: rgba(16, 185, 129, 0.25); color: #6EE7B7; border-bottom: 2px solid #10B981; }
.tajweed-span.madd     { background: rgba(245, 158, 11, 0.25); color: #FDE68A; border-bottom: 2px solid #F59E0B; }
.tajweed-span.ikhfaa   { background: rgba(139, 92, 246, 0.25); color: #C4B5FD; border-bottom: 2px solid #8B5CF6; }

/* ==========================================================================
   SIMULATOR 5: DAILY SUNNAH DUAS & MANNERS EXPLORER
   ========================================================================== */
.duas-routine-carousel {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 2rem;
}

@media (max-width: 800px) {
  .duas-routine-carousel {
    grid-template-columns: repeat(2, 1fr);
  }
}

.routine-tab-card {
  background: rgba(10, 38, 28, 0.7);
  border: 1px solid rgba(229, 184, 66, 0.2);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 200ms var(--ease-spring-3d);
}

.routine-tab-card:hover, .routine-tab-card.active {
  border-color: var(--gold-main);
  background: linear-gradient(135deg, rgba(229, 184, 66, 0.25) 0%, rgba(16, 185, 129, 0.2) 100%);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.dua-display-card {
  background: linear-gradient(160deg, rgba(14, 52, 38, 0.9) 0%, rgba(6, 26, 18, 0.95) 100%);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: clamp(1.8rem, 3.5vw, 2.8rem);
  text-align: center;
}

.dua-arabic-text {
  font-family: 'Amiri', serif;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  color: var(--gold-light);
  line-height: 1.8;
  direction: rtl;
  margin-bottom: 1.2rem;
  text-shadow: 0 0 25px rgba(229, 184, 66, 0.35);
}

.dua-repetition-tracker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(3, 15, 10, 0.7);
  padding: 8px 18px;
  border-radius: 9999px;
  border: 1px solid var(--card-border);
  margin-top: 1.5rem;
}

.counter-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(229, 184, 66, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 200ms var(--ease-spring-3d);
}

.counter-circle.filled {
  background: var(--gold-main);
  border-color: var(--gold-light);
  color: #030F0A;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(229, 184, 66, 0.7);
}
