/* Miftah App - Luxury Islamic Theme & Reader Styles */

.card-optimized,
div[id^="verse-card-"],
.reader-line,
.folder-item-card,
.dua-list-item,
.ziyarat-list-item,
.hadith-card {
  contain: layout style;
  content-visibility: auto;
  contain-intrinsic-size: 0 90px;
}

:root {
  --bg-primary: #071712;
  --bg-secondary: #0f2b21;
  --bg-card: #14382c;
  --bg-card-border: #235241;
  --gold-primary: #d4af37;
  --gold-light: #f5e29b;
  --gold-glow: rgba(212, 175, 55, 0.4);
  --text-primary: #ffffff;
  --text-secondary: #a3c4b8;
  --font-scale: 1.0;
}

/* Base setup & High-Performance Mobile Acceleration */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  text-rendering: optimizeSpeed;
}

/* Smooth GPU rendering without breaking position:fixed */
.tab-content {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Dock audio players cleanly above bottom navigation without overlap */
#quran-audio-player-dock,
#dua-audio-player-dock {
  position: fixed !important;
  bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 45 !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#bottom-nav {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 99999 !important;
  width: 100% !important;
  max-width: 520px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  background-color: #071712 !important;
  border-top: 1px solid #235241 !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.7) !important;
  transform: none !important;
  -webkit-transform: none !important;
  padding-top: 6px !important;
  padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
}

/* Eliminate GPU freeze: Replace expensive blur filters with solid lightweight dark tones on mobile */
@media (max-width: 768px) {
  .backdrop-blur-sm,
  .backdrop-blur-md,
  .backdrop-blur-lg,
  .backdrop-blur-xl {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-color: rgba(7, 23, 18, 0.98) !important;
  }
}

#splash-screen, #onboarding-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 1rem;
  overflow-y: auto;
}

#onboarding-screen > div, #splash-screen > div {
  margin: auto !important;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
}

/* ============================================================== */
/* ============================================================== */
/* 1. ARABIC QURANIC SYSTEM (خطِ عربی قرآنی و دعائیہ مع مکمل اعراب) */
/* Strictly uses Amiri / Scheherazade New / Arabic Naskh           */
/* ============================================================== */
.font-arabic,
.font-amiri,
.reading-arabic,
.arabic-text,
.surah-arabic,
.bismillah-arabic,
.bismillah-arabic-title,
.quran-ayah,
.dua-arabic,
.ziyarat-arabic,
.namaz-arabic,
.aamal-arabic,
.hadith-arabic,
.ayah-arabic,
.font-muhammad-quranic,
body.lang-ar,
html[lang="ar"],
[lang="ar"],
:lang(ar) {
  font-family: 'Amiri', 'Muhammad Quranic', 'Scheherazade New', 'Noto Naskh Arabic', 'Traditional Arabic', serif !important;
  direction: rtl;
}

/* Scalable Arabic reading text for Quran, Duas, Ziyarat */
.reading-arabic {
  font-size: calc(26px * var(--font-scale));
  line-height: 2.2 !important;
  color: var(--gold-light);
  direction: rtl;
  text-align: right;
  transition: font-size 0.05s ease-out;
  font-family: 'Amiri', 'Muhammad Quranic', 'Scheherazade New', 'Noto Naskh Arabic', serif !important;
}

/* Guarantee Arabic verses in reader NEVER turn into Nastaliq */
#verses-scroll-area .reading-arabic,
#verses-scroll-area.font-muhammad-quranic .reading-arabic,
#verses-scroll-area.font-amiri .reading-arabic,
#verses-scroll-area.font-scheherazade .reading-arabic,
#verses-scroll-area.font-naskh .reading-arabic,
#verses-scroll-area.font-indopak .reading-arabic,
#verses-scroll-area.font-nastaliq .reading-arabic,
#verses-scroll-area.font-noor-nastaleeq .reading-arabic,
#verses-scroll-area.font-alvi-nastaleeq .reading-arabic,
#verses-scroll-area.font-gulzar .reading-arabic {
  font-family: 'Amiri', 'Muhammad Quranic', 'Scheherazade New', 'Noto Naskh Arabic', serif !important;
  line-height: 2.2 !important;
  direction: rtl;
}

/* Optional Arabic font variants when selected in Reader Settings */
#verses-scroll-area.font-scheherazade .reading-arabic,
.font-scheherazade { font-family: 'Scheherazade New', 'Amiri', serif !important; }

#verses-scroll-area.font-naskh .reading-arabic,
.font-naskh { font-family: 'Noto Naskh Arabic', 'Amiri', serif !important; }

#verses-scroll-area.font-indopak .reading-arabic,
.font-indopak { font-family: 'Scheherazade New', 'Amiri', serif !important; letter-spacing: 0.5px; }

#verses-scroll-area.font-lateef .reading-arabic,
.font-lateef { font-family: 'Lateef', 'Amiri', cursive !important; }

#verses-scroll-area.font-cairo .reading-arabic,
.font-cairo { font-family: 'Cairo', 'Amiri', sans-serif !important; }

#verses-scroll-area.font-ruqaa .reading-arabic,
.font-ruqaa { font-family: 'Aref Ruqaa', 'Amiri', serif !important; }

#verses-scroll-area.font-kufi .reading-arabic,
.font-kufi { font-family: 'Reem Kufi', 'Amiri', sans-serif !important; }

/* ============================================================== */
/* 2. BASIC NASTALIQ URDU SYSTEM (بیسک نستعلیق اردو رسم الخط)      */
/* Strictly uses Noto Nastaliq Urdu with generous line-height     */
/* ============================================================== */
.font-urdu,
.font-nastaliq,
.reading-urdu,
.reading-tafseer,
.urdu-text,
.urdu-desc,
.urdu-title,
.urdu-translation,
.urdu-tafsir,
.font-alvi-nastaleeq,
.font-noor-nastaleeq,
body.lang-ur,
html[lang="ur"],
[lang="ur"],
:lang(ur) {
  font-family: 'Noto Nastaliq Urdu', 'Urdu Nastaliq', 'Jameel Noori Nastaleeq', 'Alvi Nastaleeq', 'Noor E Nastaleeq', serif !important;
  direction: rtl;
}

/* Reader: Urdu translations & Tafseer ALWAYS stay Basic Nastaliq Urdu */
#verses-scroll-area .reading-urdu,
#verses-scroll-area .reading-tafseer,
.reading-urdu,
.reading-tafseer {
  font-size: calc(17px * var(--font-scale));
  line-height: 2.3 !important;
  color: var(--text-primary);
  font-family: 'Noto Nastaliq Urdu', 'Urdu Nastaliq', 'Jameel Noori Nastaleeq', serif !important;
  direction: rtl;
  text-align: right;
}

/* Urdu Titles, Headings & Screen Names */
body.lang-ur h1,
body.lang-ur h2,
body.lang-ur h3,
body.lang-ur h4,
body.lang-ur h5,
body.lang-ur h6,
body.lang-ur .urdu-title,
body.lang-ur .card-title,
body.lang-ur .section-title,
body.lang-ur .category-title,
body.lang-ur .page-title,
body.lang-ur .screen-title,
body.lang-ur .modal-title,
body.lang-ur .dialog-title,
body.lang-ur .dua-title,
body.lang-ur .ziyarat-title,
body.lang-ur .aamal-title,
body.lang-ur .namaz-title,
body.lang-ur .surah-title,
body.lang-ur #next-prayer-name,
body.lang-ur #sub-page-nav-title {
  font-family: 'Noto Nastaliq Urdu', 'Urdu Nastaliq', serif !important;
  line-height: 2.1 !important;
}

/* Urdu Paragraphs, Spans, Buttons & Inputs when Urdu is selected */
body.lang-ur p:not(.reading-arabic):not(.arabic-text):not(.quran-ayah):not(.hadith-arabic):not([lang="ar"]),
body.lang-ur span:not(.reading-arabic):not(.arabic-text):not(.quran-ayah):not(.hadith-arabic):not([lang="ar"]):not(.font-mono),
body.lang-ur button:not(.reading-arabic):not([lang="ar"]),
body.lang-ur a,
body.lang-ur label,
body.lang-ur input,
body.lang-ur textarea,
body.lang-ur li {
  font-family: 'Noto Nastaliq Urdu', 'Urdu Nastaliq', serif !important;
  line-height: 2.2;
}

/* ============================================================== */
/* 3. PERSIAN / FARSI FONT SYSTEM - FARSI UNICODE (DEFAULT)       */
/* ============================================================== */
html[lang="fa"],
body.lang-fa,
[lang="fa"],
:lang(fa),
.persian-text,
.font-farsi-unicode,
.farsi-unicode {
  font-family: 'Farsi Unicode', 'FarsiUnicode', 'Amiri', 'Scheherazade New', sans-serif !important;
  direction: rtl;
}

body.lang-fa h1,
body.lang-fa h2,
body.lang-fa h3,
body.lang-fa h4,
body.lang-fa h5,
body.lang-fa h6,
body.lang-fa p:not(.reading-arabic):not(.arabic-text):not([lang="ar"]),
body.lang-fa span:not(.reading-arabic):not(.arabic-text):not([lang="ar"]):not(.font-mono),
body.lang-fa a,
body.lang-fa button:not(.reading-arabic),
body.lang-fa input,
body.lang-fa textarea,
body.lang-fa select,
body.lang-fa label,
body.lang-fa li {
  font-family: 'Farsi Unicode', 'FarsiUnicode', 'Amiri', 'Scheherazade New', sans-serif !important;
  line-height: 1.85;
}

/* ============================================================== */
/* 4. ENGLISH & HINDI SYSTEM (PRESERVE LATIN & DEVANAGARI)        */
/* ============================================================== */
html[lang="en"],
body.lang-en {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
  direction: ltr;
}
body.lang-en h1, body.lang-en h2, body.lang-en h3, body.lang-en h4, body.lang-en h5, body.lang-en h6,
body.lang-en p, body.lang-en span, body.lang-en a, body.lang-en button, body.lang-en input, body.lang-en label,
body.lang-en #next-prayer-name {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

html[lang="hi"],
body.lang-hi {
  font-family: 'Tiro Devanagari Hindi', system-ui, -apple-system, sans-serif !important;
  direction: ltr;
}

/* Barzakh screen: Urdu uses Alvi/Noor, Arabic Hadith & Dua strictly uses Muhammad Quranic */
#barzakh-screen,
#barzakh-content,
.barzakh-stage-card {
  font-family: 'Alvi Nastaleeq', 'AlviNastaleeq', 'Noto Nastaliq Urdu', serif;
}

#barzakh-screen .font-amiri,
#barzakh-content .font-amiri,
.barzakh-stage-card .font-amiri,
#barzakh-dua-text {
  font-family: 'Muhammad Quranic', 'MuhammadQuranic', 'Amiri', serif !important;
}

/* Digits and Monospace preserve clean reading */
.font-mono,
#live-clock-time,
.badge-count {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

/* Dynamic scalable text for reading */
.reading-arabic {
  font-size: calc(26px * var(--font-scale));
  line-height: 2.2 !important;
  color: var(--gold-light);
  direction: rtl;
  text-align: right;
  transition: font-size 0.05s ease-out;
  font-family: 'Amiri', 'Muhammad Quranic', 'Scheherazade New', 'Noto Naskh Arabic', serif !important;
}

.reading-hindi {
  font-size: calc(16px * var(--font-scale));
  line-height: 1.6;
  color: var(--text-primary);
  font-family: 'Tiro Devanagari Hindi', serif;
}

.reading-urdu {
  font-size: calc(18px * var(--font-scale));
  line-height: 2.3 !important;
  color: var(--text-primary);
  font-family: 'Noto Nastaliq Urdu', 'Urdu Nastaliq', 'Jameel Noori Nastaleeq', serif !important;
  direction: rtl;
  text-align: right;
}

.reading-english {
  font-size: calc(14px * var(--font-scale));
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Glowing animations */
@keyframes goldPulse {
  0% { box-shadow: 0 0 10px var(--gold-glow); }
  50% { box-shadow: 0 0 25px var(--gold-primary), 0 0 40px var(--gold-glow); }
  100% { box-shadow: 0 0 10px var(--gold-glow); }
}

.gold-glow {
  animation: goldPulse 3s infinite ease-in-out;
}

/* ============================================================= */
/* SILKY SMOOTH 60/120 FPS LOGO EXPAND & GLOW (PURE GPU ACCELERATED) */
/* ============================================================= */

@keyframes smoothLogoScaleUp {
  0% {
    opacity: 0;
    transform: scale(0.88);
  }
  100% {
    opacity: 1;
    transform: scale(1.0);
  }
}

@keyframes smoothGlowPulse {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }
  60% {
    opacity: 0.7;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.45;
    transform: scale(1.0);
  }
}

.smooth-logo-entrance {
  will-change: transform, opacity;
  animation: smoothLogoScaleUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.smooth-glow-aura {
  will-change: transform, opacity;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, rgba(16, 185, 129, 0.15) 45%, transparent 70%);
  animation: smoothGlowPulse 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Nishani Highlight Marker */
.nishani-active-card {
  border: 2px solid var(--gold-primary) !important;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(20, 56, 44, 0.6)) !important;
  box-shadow: 0 0 20px var(--gold-glow) !important;
  position: relative;
}

.nishani-ribbon {
  position: absolute;
  top: -6px;
  left: 16px;
  background: linear-gradient(180deg, #ffd700, #b8860b);
  color: #000;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: bold;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-card-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* ============================================================== */
/* 6 DISTINCT THEMES (SHAPES, ICONS, ELEVATIONS & PALETTES)       */
/* 2 Themes from Screenshots (White & Gold + Monochrome B&W)     */
/* + 2 Pro Themes + 2 Ultra Premium Themes                        */
/* ============================================================== */

/* -----------------------------------------------------------------
   THEME 1: ROYAL WHITE & 3D GOLD (اسکرین شاٹ 1 - ڈیفالٹ پرتعیش تھیم)
   Design Language: Pure soft white canvas, metallic 3D gold embossed borders,
   luxurious gold typography, soft neumorphic gold glow, gold-accented widgets.
----------------------------------------------------------------- */
[data-theme="theme-1"] {
  --bg-primary: #ffffff;
  --bg-secondary: #fbf9f4;
  --bg-card: #ffffff;
  --bg-card-border: #d4af37;
  --gold-primary: #b88728;
  --gold-light: #f5e29b;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --text-primary: #1a160d;
  --text-secondary: #8c6d23;
}

[data-theme="theme-1"] body,
[data-theme="theme-1"] #main-app,
[data-theme="theme-1"] header.sticky,
[data-theme="theme-1"] nav.fixed,
[data-theme="theme-1"] #sub-page-nav-bar,
[data-theme="theme-1"] #tab-reader .sticky,
[data-theme="theme-1"] #tab-sublist .sticky,
[data-theme="theme-1"] main {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-color: #d4af37 !important;
  color: #1a160d !important;
}

/* Outer Cards in Theme 1: Sculpted White with 2px Metallic Gold Border */
[data-theme="theme-1"] .card-optimized,
[data-theme="theme-1"] .folder-card,
[data-theme="theme-1"] .prayer-banner-widget,
[data-theme="theme-1"] .resume-reading-widget,
[data-theme="theme-1"] .barzakh-stage-card,
[data-theme="theme-1"] .modal-backdrop > div,
[data-theme="theme-1"] [class*="bg-[#0f2b21]"],
[data-theme="theme-1"] [class*="bg-[#14382c]"],
[data-theme="theme-1"] [class*="bg-[#194435]"],
[data-theme="theme-1"] [class*="bg-[#1f2942]"],
[data-theme="theme-1"] [class*="bg-[#0c241c]"],
[data-theme="theme-1"] [class*="bg-[#113328]"],
[data-theme="theme-1"] [class*="bg-gradient-"] {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border: 1.8px solid #c59b27 !important;
  border-color: #c59b27 !important;
  box-shadow: 0 4px 18px rgba(197, 155, 39, 0.12), 0 2px 5px rgba(0, 0, 0, 0.03) !important;
  border-radius: 24px !important;
}

/* Inner Nested Boxes in Theme 1 (Prayer Cards, Inputs) */
[data-theme="theme-1"] .prayer-next-box,
[data-theme="theme-1"] .prayer-remaining-box,
[data-theme="theme-1"] [class*="bg-[#071712]"],
[data-theme="theme-1"] [class*="bg-[#102e24]"],
[data-theme="theme-1"] [class*="bg-[#141c2e]"],
[data-theme="theme-1"] [class*="bg-[#0d261e]"],
[data-theme="theme-1"] [class*="bg-[#0a2119]"],
[data-theme="theme-1"] [class*="bg-[#0a2018]"],
[data-theme="theme-1"] [class*="bg-[#0c261e]"],
[data-theme="theme-1"] [class*="bg-[#0b1f18]"],
[data-theme="theme-1"] input,
[data-theme="theme-1"] textarea,
[data-theme="theme-1"] select {
  background: #faf8f2 !important;
  background-color: #faf8f2 !important;
  background-image: none !important;
  border: 1.5px solid #d4af37 !important;
  border-color: #d4af37 !important;
  color: #1a160d !important;
}

/* Borders in Theme 1 */
[data-theme="theme-1"] [class*="border-[#235241]"],
[data-theme="theme-1"] [class*="border-[#d4af37]"],
[data-theme="theme-1"] [class*="border-indigo-"],
[data-theme="theme-1"] [class*="border-purple-"],
[data-theme="theme-1"] [class*="border-amber-"] {
  border-color: #d4af37 !important;
}

/* Text in Theme 1: Metallic Gold Titles and Readable Obsidian Charcoal Text */
[data-theme="theme-1"] .prayer-clock-big,
[data-theme="theme-1"] .prayer-countdown-digits,
[data-theme="theme-1"] [class*="text-[#d4af37]"],
[data-theme="theme-1"] [class*="text-[#ffd700]"],
[data-theme="theme-1"] [class*="text-[#f5e29b]"] {
  color: #b88728 !important;
  font-weight: 800 !important;
}

[data-theme="theme-1"] .folder-card h4,
[data-theme="theme-1"] .text-white,
[data-theme="theme-1"] [class*="text-white"] {
  color: #b88728 !important;
  font-weight: 800 !important;
}

[data-theme="theme-1"] .reading-arabic,
[data-theme="theme-1"] .font-amiri {
  color: #2b1f09 !important;
}

[data-theme="theme-1"] [class*="text-[#a3c4b8]"],
[data-theme="theme-1"] .text-gray-200,
[data-theme="theme-1"] .text-gray-300,
[data-theme="theme-1"] .text-gray-400,
[data-theme="theme-1"] .text-emerald-400 {
  color: #8c6d23 !important;
}

/* Action Buttons in Theme 1 */
[data-theme="theme-1"] button[class*="d4af37"],
[data-theme="theme-1"] .bg-[#d4af37],
[data-theme="theme-1"] [class*="from-[#d4af37]"] {
  background: linear-gradient(135deg, #ffd700 0%, #d4af37 100%) !important;
  color: #071712 !important;
  font-weight: 800 !important;
  border: 1.5px solid #d4af37 !important;
}
[data-theme="theme-1"] button[class*="14382c"],
[data-theme="theme-1"] button[class*="0f2b21"],
[data-theme="theme-1"] .bg-[#14382c],
[data-theme="theme-1"] .bg-[#0f2b21] {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #b88728 !important;
  border: 1.5px solid #d4af37 !important;
}
[data-theme="theme-1"] .folder-icon-box {
  background: #fffdf8 !important;
  border: 1.5px solid #d4af37 !important;
  box-shadow: 0 3px 10px rgba(197, 155, 39, 0.2) !important;
  filter: drop-shadow(0 2px 4px rgba(184, 135, 40, 0.35)) !important;
}
[data-theme="theme-1"] .folder-card:hover {
  border-color: #ffd700 !important;
  box-shadow: 0 6px 22px rgba(197, 155, 39, 0.22) !important;
}
[data-theme="theme-1"] .nav-btn.text-[#d4af37] {
  color: #b88728 !important;
  font-weight: 800 !important;
}


/* -----------------------------------------------------------------
   THEME 2: MINIMALIST BLACK & WHITE (اسکرین شاٹ 2 - مکمل مونوکروم انک)
   User: "ek jo black and white h waise hi rahe andar ka bahar ka quran namaz sab"
   Design Language: Pure white paper, 2.5px solid black borders, bold jet black
   typography, crisp black silhouette icons, applied 100% everywhere.
----------------------------------------------------------------- */
[data-theme="theme-2"] {
  --bg-primary: #ffffff;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-border: #000000;
  --gold-primary: #000000;
  --gold-light: #000000;
  --gold-glow: rgba(0, 0, 0, 0.05);
  --text-primary: #000000;
  --text-secondary: #000000;
}

[data-theme="theme-2"] body,
[data-theme="theme-2"] #main-app,
[data-theme="theme-2"] header.sticky,
[data-theme="theme-2"] nav.fixed,
[data-theme="theme-2"] #sub-page-nav-bar,
[data-theme="theme-2"] #tab-reader .sticky,
[data-theme="theme-2"] #tab-sublist .sticky,
[data-theme="theme-2"] main,
[data-theme="theme-2"] #reader-view,
[data-theme="theme-2"] #verses-scroll-area {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-color: #000000 !important;
  color: #000000 !important;
}

/* ALL Outer Cards in Theme 2: Pure White with 2.5px Crisp Solid Black Border */
[data-theme="theme-2"] .card-optimized,
[data-theme="theme-2"] .folder-card,
[data-theme="theme-2"] .prayer-banner-widget,
[data-theme="theme-2"] .resume-reading-widget,
[data-theme="theme-2"] .barzakh-stage-card,
[data-theme="theme-2"] .modal-backdrop > div,
[data-theme="theme-2"] div[id^="verse-card-"],
[data-theme="theme-2"] [class*="bg-[#0f2b21]"],
[data-theme="theme-2"] [class*="bg-[#14382c]"],
[data-theme="theme-2"] [class*="bg-[#194435]"],
[data-theme="theme-2"] [class*="bg-[#1f2942]"],
[data-theme="theme-2"] [class*="bg-[#0c241c]"],
[data-theme="theme-2"] [class*="bg-[#113328]"],
[data-theme="theme-2"] [class*="bg-gradient-"] {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border: 2.5px solid #000000 !important;
  border-color: #000000 !important;
  box-shadow: none !important;
  border-radius: 24px !important;
}

/* Inner Nested Boxes in Theme 2 */
[data-theme="theme-2"] .prayer-next-box,
[data-theme="theme-2"] .prayer-remaining-box,
[data-theme="theme-2"] [class*="bg-[#071712]"],
[data-theme="theme-2"] [class*="bg-[#102e24]"],
[data-theme="theme-2"] [class*="bg-[#141c2e]"],
[data-theme="theme-2"] [class*="bg-[#0d261e]"],
[data-theme="theme-2"] [class*="bg-[#0a2119]"],
[data-theme="theme-2"] [class*="bg-[#0a2018]"],
[data-theme="theme-2"] [class*="bg-[#0c261e]"],
[data-theme="theme-2"] [class*="bg-[#0b1f18]"],
[data-theme="theme-2"] input,
[data-theme="theme-2"] textarea,
[data-theme="theme-2"] select {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border: 2px solid #000000 !important;
  border-color: #000000 !important;
  color: #000000 !important;
}

/* ALL Borders in Theme 2: Solid Black */
[data-theme="theme-2"] [class*="border-[#235241]"],
[data-theme="theme-2"] [class*="border-[#d4af37]"],
[data-theme="theme-2"] [class*="border-indigo-"],
[data-theme="theme-2"] [class*="border-purple-"],
[data-theme="theme-2"] [class*="border-amber-"],
[data-theme="theme-2"] .border-t,
[data-theme="theme-2"] .border-b {
  border-color: #000000 !important;
}

/* ALL TEXT in Theme 2: Solid Jet Black Everywhere Inside & Out */
[data-theme="theme-2"] * {
  --tw-text-opacity: 1 !important;
}

[data-theme="theme-2"] .prayer-clock-big,
[data-theme="theme-2"] .prayer-countdown-digits,
[data-theme="theme-2"] .folder-card h4,
[data-theme="theme-2"] .folder-card p,
[data-theme="theme-2"] .text-white,
[data-theme="theme-2"] [class*="text-white"],
[data-theme="theme-2"] [class*="text-[#d4af37]"],
[data-theme="theme-2"] [class*="text-[#ffd700]"],
[data-theme="theme-2"] [class*="text-[#f5e29b]"],
[data-theme="theme-2"] [class*="text-[#a3c4b8]"],
[data-theme="theme-2"] .text-gray-100,
[data-theme="theme-2"] .text-gray-200,
[data-theme="theme-2"] .text-gray-300,
[data-theme="theme-2"] .text-gray-400,
[data-theme="theme-2"] .text-emerald-400,
[data-theme="theme-2"] .reading-arabic,
[data-theme="theme-2"] .reading-urdu,
[data-theme="theme-2"] .reading-hindi,
[data-theme="theme-2"] .reading-english,
[data-theme="theme-2"] .font-amiri,
[data-theme="theme-2"] .font-nastaliq {
  color: #000000 !important;
}

/* Icons in Theme 2: Sharp Monochrome Icons with White & Black Contrast (Matches Screenshot 2) */
[data-theme="theme-2"] .folder-icon-box {
  background: #ffffff !important;
  border: 1.5px solid #000000 !important;
  border-radius: 14px !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #000000 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
  filter: grayscale(100%) contrast(120%) brightness(105%) !important;
}

[data-theme="theme-2"] .prayer-clock-circle {
  background: #ffffff !important;
  border: 2px solid #000000 !important;
  color: #000000 !important;
  filter: grayscale(100%) contrast(120%) brightness(105%) !important;
}

[data-theme="theme-2"] .prayer-alarm-btn {
  background: #ffffff !important;
  border: 1.5px solid #000000 !important;
  color: #000000 !important;
  filter: grayscale(100%) contrast(120%) !important;
}

/* Header & Badges in Theme 2: Pure Monochrome White & Black */
[data-theme="theme-2"] header img {
  filter: grayscale(100%) contrast(120%) !important;
}
[data-theme="theme-2"] span[class*="rounded-full"],
[data-theme="theme-2"] span[class*="bg-emerald-"],
[data-theme="theme-2"] span[class*="bg-green-"],
[data-theme="theme-2"] span[class*="bg-amber-"],
[data-theme="theme-2"] span[class*="bg-yellow-"] {
  background: #ffffff !important;
  border: 1px solid #000000 !important;
  color: #000000 !important;
  filter: grayscale(100%) !important;
}

/* Action Buttons in Theme 2 */
[data-theme="theme-2"] button[class*="d4af37"],
[data-theme="theme-2"] .bg-[#d4af37],
[data-theme="theme-2"] [class*="from-[#d4af37]"] {
  background: #000000 !important;
  background-color: #000000 !important;
  background-image: none !important;
  color: #ffffff !important;
  border: 2px solid #000000 !important;
  font-weight: 800 !important;
}
[data-theme="theme-2"] button[class*="d4af37"] *,
[data-theme="theme-2"] .bg-[#d4af37] * {
  color: #ffffff !important;
}
[data-theme="theme-2"] button[class*="14382c"],
[data-theme="theme-2"] button[class*="0f2b21"],
[data-theme="theme-2"] .bg-[#14382c],
[data-theme="theme-2"] .bg-[#0f2b21] {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  font-weight: 800 !important;
}

/* Quran Reader in Theme 2: 100% Black & White */
[data-theme="theme-2"] div[id^="verse-card-"] {
  background-color: #ffffff !important;
  border: 2px solid #000000 !important;
  box-shadow: none !important;
}
[data-theme="theme-2"] .quran-ayah-emblem .ayah-symbol {
  color: #000000 !important;
}
[data-theme="theme-2"] .quran-ayah-emblem .ayah-num {
  color: #000000 !important;
  font-weight: 900 !important;
}
[data-theme="theme-2"] .waqf-pill-badge {
  background: #ffffff !important;
  border: 1.5px solid #000000 !important;
  color: #000000 !important;
}
[data-theme="theme-2"] .waqf-pill-badge.active-waqf {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1.5px solid #000000 !important;
}
[data-theme="theme-2"] .nav-btn.text-[#d4af37] {
  color: #000000 !important;
  font-weight: 900 !important;
}


/* -----------------------------------------------------------------
   THEME 3: CLASSIC IMPERIAL EMERALD HARAM (پرو تھیم 1 - زمردی حرم و سنہرا)
   Design Language: Deep holy emerald, gilded gold double borders,
   traditional sacred Shia shrine atmosphere.
----------------------------------------------------------------- */
[data-theme="theme-3"] {
  --bg-primary: #071712;
  --bg-secondary: #0f2b21;
  --bg-card: #14382c;
  --bg-card-border: #235241;
  --gold-primary: #d4af37;
  --gold-light: #f5e29b;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --text-primary: #ffffff;
  --text-secondary: #a3c4b8;
}

[data-theme="theme-3"] body,
[data-theme="theme-3"] #main-app,
[data-theme="theme-3"] header.sticky,
[data-theme="theme-3"] nav.fixed,
[data-theme="theme-3"] #sub-page-nav-bar,
[data-theme="theme-3"] #tab-reader .sticky,
[data-theme="theme-3"] #tab-sublist .sticky,
[data-theme="theme-3"] main {
  background: #071712 !important;
  background-color: #071712 !important;
  border-color: #235241 !important;
  color: #ffffff !important;
}

[data-theme="theme-3"] .folder-card {
  border-radius: 22px !important;
  border: 1.5px solid #235241 !important;
  background: linear-gradient(145deg, #14382c 0%, #0d261e 100%) !important;
  box-shadow: 0 4px 14px rgba(4, 18, 13, 0.4) !important;
}
[data-theme="theme-3"] .folder-card:hover {
  border-color: #d4af37 !important;
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.25) !important;
}


/* -----------------------------------------------------------------
   THEME 4: MIDNIGHT OBSIDIAN OLED & 24K CYBER GOLD (پرو تھیم 2 - ایمولیڈ بلیک)
   Design Language: Pure pitch black OLED, razor-sharp 24k electro gold,
   battery-saving dark mode.
----------------------------------------------------------------- */
[data-theme="theme-4"] {
  --bg-primary: #000000;
  --bg-secondary: #080808;
  --bg-card: #121212;
  --bg-card-border: #ffd700;
  --gold-primary: #ffd700;
  --gold-light: #fff3a8;
  --gold-glow: rgba(255, 215, 0, 0.4);
  --text-primary: #ffffff;
  --text-secondary: #d4af37;
}

[data-theme="theme-4"] body,
[data-theme="theme-4"] #main-app,
[data-theme="theme-4"] header.sticky,
[data-theme="theme-4"] nav.fixed,
[data-theme="theme-4"] #sub-page-nav-bar,
[data-theme="theme-4"] #tab-reader .sticky,
[data-theme="theme-4"] #tab-sublist .sticky,
[data-theme="theme-4"] main {
  background: #000000 !important;
  background-color: #000000 !important;
  border-color: #333333 !important;
  color: #ffffff !important;
}

[data-theme="theme-4"] .card-optimized,
[data-theme="theme-4"] .folder-card,
[data-theme="theme-4"] .prayer-banner-widget,
[data-theme="theme-4"] .modal-backdrop > div,
[data-theme="theme-4"] [class*="bg-[#0f2b21]"],
[data-theme="theme-4"] [class*="bg-[#14382c]"] {
  background: #0a0a0a !important;
  background-color: #0a0a0a !important;
  border: 1.5px solid #ffd700 !important;
  border-color: #ffd700 !important;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.12) !important;
}

[data-theme="theme-4"] [class*="bg-[#071712]"] {
  background: #141414 !important;
  border-color: #333333 !important;
}


/* -----------------------------------------------------------------
   THEME 5: ROYAL NAJAF SAPPHIRE & CELESTIAL PLATINUM (الٹرا پریمیم 1)
   Design Language: Deep midnight sapphire navy, celestial silver/platinum,
   glowing crystal cyan touches.
----------------------------------------------------------------- */
[data-theme="theme-5"] {
  --bg-primary: #060e1d;
  --bg-secondary: #0b1730;
  --bg-card: #102142;
  --bg-card-border: #1d3b75;
  --gold-primary: #00e5ff;
  --gold-light: #c2f9ff;
  --gold-glow: rgba(0, 229, 255, 0.45);
  --text-primary: #ffffff;
  --text-secondary: #80deea;
}

[data-theme="theme-5"] body,
[data-theme="theme-5"] #main-app,
[data-theme="theme-5"] header.sticky,
[data-theme="theme-5"] nav.fixed,
[data-theme="theme-5"] #sub-page-nav-bar,
[data-theme="theme-5"] #tab-reader .sticky,
[data-theme="theme-5"] #tab-sublist .sticky,
[data-theme="theme-5"] main {
  background: #060e1d !important;
  background-color: #060e1d !important;
  border-color: #1d3b75 !important;
  color: #ffffff !important;
}

[data-theme="theme-5"] .card-optimized,
[data-theme="theme-5"] .folder-card,
[data-theme="theme-5"] .prayer-banner-widget,
[data-theme="theme-5"] .modal-backdrop > div,
[data-theme="theme-5"] [class*="bg-[#0f2b21]"],
[data-theme="theme-5"] [class*="bg-[#14382c]"] {
  background: linear-gradient(150deg, #0f2142 0%, #081329 100%) !important;
  border: 1.5px solid #00e5ff !important;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.15) !important;
}

[data-theme="theme-5"] [class*="text-[#d4af37]"],
[data-theme="theme-5"] [class*="text-[#ffd700]"] {
  color: #00e5ff !important;
}


/* -----------------------------------------------------------------
   THEME 6: KARBALA VELVET CRIMSON & CHAMPAGNE GOLD (الٹرا پریمیم 2)
   Design Language: Deep spiritual velvet maroon, radiant champagne rose gold,
   warm Karbala aesthetic.
----------------------------------------------------------------- */
[data-theme="theme-6"] {
  --bg-primary: #1a0409;
  --bg-secondary: #2b0811;
  --bg-card: #3b0e18;
  --bg-card-border: #591625;
  --gold-primary: #f59e0b;
  --gold-light: #fed7aa;
  --gold-glow: rgba(245, 158, 11, 0.4);
  --text-primary: #ffffff;
  --text-secondary: #fca5a5;
}

[data-theme="theme-6"] body,
[data-theme="theme-6"] #main-app,
[data-theme="theme-6"] header.sticky,
[data-theme="theme-6"] nav.fixed,
[data-theme="theme-6"] #sub-page-nav-bar,
[data-theme="theme-6"] #tab-reader .sticky,
[data-theme="theme-6"] #tab-sublist .sticky,
[data-theme="theme-6"] main {
  background: #1a0409 !important;
  background-color: #1a0409 !important;
  border-color: #591625 !important;
  color: #ffffff !important;
}

[data-theme="theme-6"] .card-optimized,
[data-theme="theme-6"] .folder-card,
[data-theme="theme-6"] .prayer-banner-widget,
[data-theme="theme-6"] .modal-backdrop > div,
[data-theme="theme-6"] [class*="bg-[#0f2b21]"],
[data-theme="theme-6"] [class*="bg-[#14382c]"] {
  background: linear-gradient(150deg, #330b15 0%, #1c050b 100%) !important;
  border: 1.5px solid #f59e0b !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.15) !important;
}

[data-theme="theme-6"] [class*="text-[#d4af37]"],
[data-theme="theme-6"] [class*="text-[#ffd700]"] {
  color: #f59e0b !important;
}

/* ============================================================== */
/* AUTHENTIC QURAN BOOK SILK RIBBON & STOP (وقف) MARKERS          */
/* ============================================================== */
.quran-silk-ribbon {
  position: absolute;
  top: 0;
  right: 18px;
  width: 28px;
  height: 52px;
  background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 75%, #ef4444 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  z-index: 25;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.quran-silk-ribbon:hover {
  transform: translateY(4px);
}
.quran-silk-ribbon.active-gold {
  background: linear-gradient(180deg, #d4af37 0%, #996515 75%, #ffd700 100%);
}

.waqf-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(20, 56, 44, 0.6);
  border: 1px solid var(--bg-card-border);
  color: var(--gold-light);
  cursor: pointer;
  transition: all 0.2s ease;
}
.waqf-pill-badge:hover {
  border-color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.2);
}
.waqf-pill-badge.active-waqf {
  background: linear-gradient(135deg, #d4af37, #996515);
  color: #071712;
  border-color: #ffd700;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* ============================================================== */
/* QURAN AYAH EMBLEM & STOP MARKER (SINGLE CLEAN COMPACT BADGE)  */
/* ============================================================== */
.quran-ayah-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 32px;
  height: 32px;
  user-select: none;
}
.quran-ayah-emblem .ayah-symbol {
  font-family: 'Amiri', serif;
  font-size: 26px;
  line-height: 1;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.quran-ayah-emblem .ayah-num {
  position: absolute;
  font-family: monospace, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}

/* ============================================================== */
/* BISMILLAH HEADER BANNER - THEME ADAPTIVE STYLES               */
/* ============================================================== */
.bismillah-header-card {
  border-radius: 24px;
  border: 2px solid var(--gold-primary);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  color: var(--text-primary);
  transition: all 0.3s ease;
}
.bismillah-header-card .bismillah-top-pill {
  color: var(--gold-primary);
}
.bismillah-header-card .bismillah-arabic-title {
  color: var(--gold-light);
}
.bismillah-header-card .bismillah-translation-text {
  color: var(--text-secondary);
}

/* Theme 1: Royal White & 3D Gold (Image 1) */
[data-theme="theme-1"] .bismillah-header-card {
  border-radius: 24px !important;
  border: 2px solid #d4af37 !important;
  background: #ffffff !important;
  box-shadow: 0 4px 18px rgba(184, 135, 40, 0.12) !important;
}
[data-theme="theme-1"] .bismillah-arabic-title {
  color: #b88728 !important;
}
[data-theme="theme-1"] .bismillah-top-pill {
  color: #8c6d23 !important;
}
[data-theme="theme-1"] .bismillah-translation-text {
  color: #2b1f09 !important;
}
[data-theme="theme-1"] .quran-ayah-emblem .ayah-symbol {
  color: #b88728 !important;
}
[data-theme="theme-1"] .quran-ayah-emblem .ayah-num {
  color: #8c6d23 !important;
}
[data-theme="theme-1"] div[id^="verse-card-"] {
  background-color: #ffffff !important;
  border: 1.5px solid #d4af37 !important;
  box-shadow: 0 3px 12px rgba(197, 155, 39, 0.1) !important;
}
[data-theme="theme-1"] div[id^="verse-card-"] .reading-arabic {
  color: #2b1f09 !important;
}
[data-theme="theme-1"] div[id^="verse-card-"] .reading-urdu,
[data-theme="theme-1"] div[id^="verse-card-"] .reading-hindi,
[data-theme="theme-1"] div[id^="verse-card-"] .reading-english {
  color: #1a160d !important;
}
[data-theme="theme-1"] div[id^="verse-card-"] .border-t {
  border-color: #d4af37 !important;
}

/* Theme 2: Minimalist Black & White (Image 2 - Pure Monochrome Inside & Out) */
[data-theme="theme-2"] .bismillah-header-card {
  border-radius: 20px !important;
  border: 2.5px solid #000000 !important;
  background: #ffffff !important;
  box-shadow: none !important;
}
[data-theme="theme-2"] .bismillah-arabic-title,
[data-theme="theme-2"] .bismillah-top-pill,
[data-theme="theme-2"] .bismillah-translation-text {
  color: #000000 !important;
}
[data-theme="theme-2"] .quran-ayah-emblem .ayah-symbol,
[data-theme="theme-2"] .quran-ayah-emblem .ayah-num {
  color: #000000 !important;
}
[data-theme="theme-2"] div[id^="verse-card-"] {
  background-color: #ffffff !important;
  border: 2px solid #000000 !important;
  box-shadow: none !important;
}
[data-theme="theme-2"] div[id^="verse-card-"] .reading-arabic,
[data-theme="theme-2"] div[id^="verse-card-"] .reading-urdu,
[data-theme="theme-2"] div[id^="verse-card-"] .reading-hindi,
[data-theme="theme-2"] div[id^="verse-card-"] .reading-english {
  color: #000000 !important;
}
[data-theme="theme-2"] div[id^="verse-card-"] .border-t {
  border-color: #000000 !important;
}

/* Theme 3: Classic Emerald Gold */
[data-theme="theme-3"] .bismillah-header-card {
  border-radius: 24px !important;
  border: 2px solid rgba(212, 175, 55, 0.8) !important;
  background: linear-gradient(135deg, #14382c 0%, #0d261e 100%) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="theme-3"] .bismillah-arabic-title { color: #ffd700 !important; }
[data-theme="theme-3"] .bismillah-top-pill { color: #d4af37 !important; }
[data-theme="theme-3"] .bismillah-translation-text { color: #f5e29b !important; }

/* Theme 4: Midnight AMOLED Gold */
[data-theme="theme-4"] .bismillah-header-card {
  border-radius: 20px !important;
  border: 2px solid #ffd700 !important;
  background: #0d0d0d !important;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.25) !important;
}
[data-theme="theme-4"] .bismillah-arabic-title { color: #ffd700 !important; }
[data-theme="theme-4"] .bismillah-top-pill { color: #ffd700 !important; }
[data-theme="theme-4"] .bismillah-translation-text { color: #ffffff !important; }

/* Theme 5: Najaf Sapphire Platinum */
[data-theme="theme-5"] .bismillah-header-card {
  border-radius: 20px !important;
  border: 2px solid #00e5ff !important;
  background: linear-gradient(135deg, #0f2142 0%, #060e1d 100%) !important;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.3) !important;
}
[data-theme="theme-5"] .bismillah-arabic-title { color: #00e5ff !important; }
[data-theme="theme-5"] .bismillah-top-pill { color: #c2f9ff !important; }
[data-theme="theme-5"] .bismillah-translation-text { color: #80deea !important; }

/* Theme 6: Karbala Velvet Gold */
[data-theme="theme-6"] .bismillah-header-card {
  border-radius: 20px !important;
  border: 2px solid #f59e0b !important;
  background: linear-gradient(135deg, #330b15 0%, #1a0409 100%) !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.25) !important;
}
[data-theme="theme-6"] .bismillah-arabic-title { color: #fed7aa !important; }
[data-theme="theme-6"] .bismillah-top-pill { color: #f59e0b !important; }
[data-theme="theme-6"] .bismillah-translation-text { color: #fca5a5 !important; }

/* ============================================================== */
/* APP ENLARGEMENT & READABILITY OPTIMIZATIONS (Item 2)           */
/* "bahut chota chota hai mobile pe... bada hona chahiye"        */
/* ============================================================== */
#main-app {
  max-width: 520px !important; /* Enlarged comfortable mobile width from 448px */
  font-size: 15px;
}
header.sticky, nav.fixed {
  max-width: 520px !important;
}
.modal-backdrop > div {
  max-width: 520px !important;
}

/* Home Section Folders Enhanced Touch Size */
.folder-card {
  min-height: 82px !important;
  padding: 12px 10px !important;
}
.folder-card h4 {
  font-size: 14px !important;
}
.folder-card p {
  font-size: 11px !important;
}
.folder-icon-box {
  width: 44px !important;
  height: 44px !important;
  font-size: 22px !important;
}

/* Top 6 Folders Visual Distinction on Home */
#home-folders-grid > div:nth-child(-n+6) {
  position: relative;
}

/* Pinch to Zoom Live Floating Feedback Badge */
#pinch-zoom-hud {
  position: fixed;
  bottom: 85px;
  right: 18px;
  z-index: 45;
  background: rgba(15, 43, 33, 0.92);
  border: 1.5px solid var(--gold-primary);
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 9999px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.5);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(8px);
}
#pinch-zoom-hud.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Favorite Star Pill & Item Buttons */
.fav-star-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(20, 56, 44, 0.6);
  border: 1px solid var(--bg-card-border);
  color: #94a3b8;
  transition: all 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}
.fav-star-btn:hover {
  border-color: #ffd700;
  transform: scale(1.08);
}
.fav-star-btn.is-favorite {
  color: #ffd700;
  border-color: #ffd700;
  background: rgba(212, 175, 55, 0.2);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}
[data-theme="theme-6"] .fav-star-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}
[data-theme="theme-6"] .fav-star-btn.is-favorite {
  background: #fef08a;
  border-color: #ca8a04;
  color: #a16207;
}

/* -----------------------------------------------------------------
   QURAN AUDIO SYNCHRONIZED AYAH HIGHLIGHT & ANIMATION
----------------------------------------------------------------- */
.active-reciting-ayah {
  border-color: #ffd700 !important;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(20, 56, 44, 0.95)) !important;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.45) !important;
  transform: scale(1.015);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 10;
}
.active-reciting-ayah::before {
  content: '▶';
  position: absolute;
  left: 12px;
  top: 14px;
  font-size: 11px;
  color: #ffd700;
  animation: pulseAyahPlay 1.5s infinite;
}
@keyframes pulseAyahPlay {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.25); }
}
[data-theme="theme-6"] .active-reciting-ayah {
  background: #fef9c3 !important;
  border-color: #ca8a04 !important;
  box-shadow: 0 0 20px rgba(202, 138, 4, 0.35) !important;
}
/* =================================================================
   ROBUST STANDALONE LAYOUT & COMPONENT FALLBACKS (ZERO-DEPENDENCY)
   Guarantees 100% perfect visual appearance even if external CDN is slow
   ================================================================= */
#main-app {
  max-width: 28rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  min-height: 100vh !important;
  position: relative !important;
  padding-bottom: 6rem !important;
}

/* Splash Screen Overlay */
#splash-screen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  background-color: #05110d !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
  overflow: hidden !important;
}
#splash-screen:not(.hidden):not([style*="display: none"]) {
  display: flex !important;
}
#splash-screen.hidden,
#splash-screen[style*="display: none"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}
#splash-screen .smooth-logo-entrance,
#splash-screen .w-44,
#splash-screen img {
  width: 11rem !important;
  height: 11rem !important;
  border-radius: 9999px !important;
  object-fit: cover !important;
  display: block !important;
}

/* Feedback Notice Modal */
#feedback-notice-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  background-color: rgba(5, 17, 13, 0.94) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
  overflow-y: auto !important;
}
#feedback-notice-modal:not(.hidden):not([style*="display: none"]) {
  display: flex !important;
}
#feedback-notice-modal.hidden,
#feedback-notice-modal[style*="display: none"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}
#feedback-notice-modal > div {
  max-width: 28rem !important;
  width: 100% !important;
  margin: auto !important;
  background: linear-gradient(to bottom, #133a2d, #0d281f, #061611) !important;
  border: 2px solid rgba(212, 175, 55, 0.85) !important;
  border-radius: 1.5rem !important;
  padding: 1.5rem !important;
  box-shadow: 0 25px 70px rgba(0,0,0,0.9), 0 0 35px rgba(212,175,55,0.3) !important;
  color: #ffffff !important;
  text-align: center !important;
}
#feedback-notice-modal button[onclick*="openContactFromFeedback"] {
  width: 100% !important;
  padding: 0.75rem 1rem !important;
  background: linear-gradient(to right, #d4af37, #ffd700, #aa820a) !important;
  color: #071712 !important;
  font-weight: 900 !important;
  font-size: 0.875rem !important;
  border-radius: 0.75rem !important;
  border: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3) !important;
}
#feedback-notice-modal .flex.items-center.justify-between button {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #d1d5db !important;
  padding: 0.4rem 0.75rem !important;
  border-radius: 0.5rem !important;
  cursor: pointer !important;
  font-size: 0.75rem !important;
}

/* Home Screen & Prayer Widgets */
.prayer-banner-widget {
  background: linear-gradient(to bottom, #14382c, #0f2b21, #071712) !important;
  border: 2px solid rgba(212, 175, 55, 0.8) !important;
  border-radius: 1.5rem !important;
  padding: 1rem !important;
  margin-bottom: 0.75rem !important;
  color: #ffffff !important;
}
.prayer-next-box {
  background-color: rgba(7, 23, 18, 0.9) !important;
  border: 1px solid #235241 !important;
  border-radius: 1rem !important;
  padding: 0.75rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-top: 0.5rem !important;
}

/* 2-Column Grid for Folder Cards */
#home-folders-grid,
#more-sections-divider,
.grid.grid-cols-2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.75rem !important;
}

.folder-card {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding: 0.85rem !important;
  border-radius: 1.25rem !important;
  min-height: 85px !important;
  background: linear-gradient(to bottom right, #14382c, #0d261e) !important;
  border: 1px solid #235241 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}
.folder-card:hover {
  border-color: #d4af37 !important;
}

/* More Islamic Sections Pill Button */
.more-sections-pill {
  padding: 0.5rem 1.5rem !important;
  border-radius: 9999px !important;
  border: 1px solid #d4af37 !important;
  background-color: #0f2b21 !important;
  color: #ffd700 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  margin: 0.75rem auto !important;
}

/* Header Bar & 3 Columns */
#app-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 30 !important;
  background-color: rgba(7, 23, 18, 0.98) !important;
  border-bottom: 1px solid #235241 !important;
  padding: 0.5rem 0.875rem !important;
}
#app-header .grid-cols-3 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.5rem !important;
}
#app-header button {
  padding: 0.4rem 0.5rem !important;
  border-radius: 0.75rem !important;
  background-color: #0f2b21 !important;
  border: 1px solid #235241 !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.25rem !important;
}

/* Universal Home Search Bar */
#home-universal-search-input {
  width: 100% !important;
  background-color: #0f2b21 !important;
  border: 2px solid #235241 !important;
  color: #ffffff !important;
  border-radius: 1rem !important;
  padding: 0.65rem 2.5rem 0.65rem 2.5rem !important;
  font-size: 0.875rem !important;
  outline: none !important;
}
#home-voice-search-btn {
  width: 2rem !important;
  height: 2rem !important;
  border-radius: 0.75rem !important;
  background: linear-gradient(to right, #d4af37, #aa820a) !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

/* Bottom Navigation Bar */
#bottom-nav {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  max-width: 28rem !important;
  margin: 0 auto !important;
  background-color: rgba(7, 23, 18, 0.98) !important;
  border-top: 1px solid #235241 !important;
  display: flex !important;
  justify-content: space-around !important;
  padding: 0.35rem 0 !important;
  z-index: 40 !important;
}

/* Fallback multi-line clamp utility */
.line-clamp-2 {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* ==========================================================================
   AUTHENTIC WHATSAPP CHAT THEME & BUBBLES (PREMIUM WHATSAPP 1:1 DESIGN)
   ========================================================================== */
.whatsapp-chat-container {
  background-color: #0b141a !important;
  background-image: 
    radial-gradient(ellipse at 50% 20%, rgba(18, 43, 37, 0.45) 0%, rgba(11, 20, 26, 0.98) 85%),
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2300a884' fill-opacity='0.035' fill-rule='evenodd'%3E%3Cpath d='M14 16c-3.3 0-6 2.7-6 6 0 1.9.9 3.6 2.3 4.7L9 31l4.8-1.6c.7.4 1.4.6 2.2.6 3.3 0 6-2.7 6-6s-2.7-6-6-6zm46 36c-3.3 0-6 2.7-6 6 0 1.9.9 3.6 2.3 4.7L55 67l4.8-1.6c.7.4 1.4.6 2.2.6 3.3 0 6-2.7 6-6s-2.7-6-6-6zM58 18l1.5 3 3.3.5-2.4 2.3.6 3.2-3-1.6-3 1.6.6-3.2-2.4-2.3 3.3-.5L58 18zM18 58l1.5 3 3.3.5-2.4 2.3.6 3.2-3-1.6-3 1.6.6-3.2-2.4-2.3 3.3-.5L18 58z'/%3E%3C/g%3E%3C/svg%3E") !important;
  background-repeat: repeat !important;
  background-size: 80px 80px !important;
  min-height: 100vh !important;
}

.whatsapp-chat-header {
  background-color: rgba(31, 44, 52, 0.98) !important;
  backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(42, 57, 66, 0.8) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
}

/* Authentic WhatsApp Channel Card (Top Pinned Info Box) */
.wa-channel-card {
  background: linear-gradient(180deg, rgba(31, 44, 52, 0.95) 0%, rgba(20, 31, 37, 0.95) 100%) !important;
  border: 1px solid rgba(42, 57, 66, 0.85) !important;
  border-radius: 18px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(8px) !important;
}

/* Authentic WhatsApp Incoming Message Bubble with Notch */
.wa-bubble-incoming {
  background-color: #1f2c34 !important;
  border-radius: 14px 14px 14px 4px !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(42, 57, 66, 0.55) !important;
  position: relative !important;
}
.wa-bubble-incoming::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: -7px !important;
  width: 0 !important;
  height: 0 !important;
  border-top: 0 solid transparent !important;
  border-right: 8px solid #1f2c34 !important;
  border-bottom: 9px solid transparent !important;
}

/* Authentic WhatsApp Outgoing Message Bubble with Notch */
.wa-bubble-outgoing {
  background-color: #005c4b !important;
  border-radius: 14px 14px 4px 14px !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(0, 168, 132, 0.3) !important;
  position: relative !important;
}
.wa-bubble-outgoing::after {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  right: -7px !important;
  width: 0 !important;
  height: 0 !important;
  border-top: 0 solid transparent !important;
  border-left: 8px solid #005c4b !important;
  border-bottom: 9px solid transparent !important;
}

/* WhatsApp Date Pill */
.wa-date-pill {
  background-color: rgba(24, 34, 41, 0.95) !important;
  color: #8696a0 !important;
  border: 1px solid rgba(42, 57, 66, 0.75) !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  font-size: 11px !important;
  letter-spacing: 0.5px !important;
  padding: 4px 14px !important;
  font-weight: 600 !important;
}

/* WhatsApp Floating Composer */
#wa-chat-composer {
  background-color: rgba(11, 20, 26, 0.97) !important;
  backdrop-filter: blur(12px) !important;
  border-top: 1px solid rgba(42, 57, 66, 0.6) !important;
}






