/* ==========================================================================
   Ather Quran Reader - Modern, Clean & Authentic Reader Stylesheet
   Powered by UmmahAPI & Django
   Unified with Ather Radio & Live TV Theme Harmony
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cairo:wght@500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  /* LIGHT MODE (Clean White + Deep Slate/Navy + Restrained Emerald Accents) */
  --qr-bg-page: #f8fafc;
  --qr-bg-card: #ffffff;
  --qr-bg-subtle: #f1f5f9;
  --qr-bg-glass: rgba(255, 255, 255, 0.94);
  --qr-bg-hover: #e2e8f0;

  --qr-border-subtle: #e2e8f0;
  --qr-border-strong: #cbd5e1;
  --qr-border-accent: #059669;

  /* Typography Colors */
  --qr-text-primary: #0f172a;       /* Deep Slate */
  --qr-text-secondary: #334155;     /* Slate */
  --qr-text-muted: #64748b;         /* Cool Muted Slate */
  --qr-text-inverse: #ffffff;

  /* Primary Quranic Accents (Emerald Green) */
  --qr-accent-primary: #059669;
  --qr-accent-blue: #059669;
  --qr-accent-blue-hover: #047857;
  --qr-accent-blue-subtle: rgba(5, 150, 105, 0.08);
  --qr-accent-blue-border: rgba(5, 150, 105, 0.25);

  --qr-accent-gold: #d97706;        /* Warm Gold for bookmarks & highlights */
  --qr-accent-gold-subtle: rgba(217, 119, 6, 0.08);

  /* Shadows */
  --qr-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --qr-shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --qr-shadow-lg: 0 10px 28px rgba(15, 23, 42, 0.12);

  /* Fonts */
  --qr-font-sans: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --qr-font-arabic: 'Amiri', 'Cairo', serif;

  --qr-radius-sm: 6px;
  --qr-radius-md: 10px;
  --qr-radius-lg: 16px;
  --qr-radius-full: 9999px;

  --qr-header-height: 60px;
}

/* DARK THEME (Matching Ather Radio & Live TV Dark Obsidian & Emerald Glass) */
[data-theme="dark"] {
  --qr-bg-page: #070d18;
  --qr-bg-card: #0e1726;
  --qr-bg-subtle: #142034;
  --qr-bg-glass: rgba(14, 23, 38, 0.94);
  --qr-bg-hover: #192742;

  --qr-border-subtle: rgba(255, 255, 255, 0.08);
  --qr-border-strong: rgba(255, 255, 255, 0.16);
  --qr-border-accent: #10b981;

  --qr-text-primary: #f8fafc;
  --qr-text-secondary: #cbd5e1;
  --qr-text-muted: #94a3b8;
  --qr-text-inverse: #070d18;

  --qr-accent-primary: #10b981;
  --qr-accent-blue: #10b981;
  --qr-accent-blue-hover: #059669;
  --qr-accent-blue-subtle: rgba(16, 185, 129, 0.14);
  --qr-accent-blue-border: rgba(16, 185, 129, 0.35);

  --qr-accent-gold: #f59e0b;
  --qr-accent-gold-subtle: rgba(245, 158, 11, 0.15);

  --qr-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --qr-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --qr-shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.6);
}

/* Base Body Resets */
body.quran-reader-body {
  font-family: var(--qr-font-sans);
  background-color: var(--qr-bg-page);
  color: var(--qr-text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.qr-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Button Utilities */
.qr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--qr-radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  background: transparent;
  color: var(--qr-text-secondary);
  text-decoration: none;
}

.qr-btn:hover {
  background: var(--qr-bg-subtle);
  color: var(--qr-text-primary);
}

.qr-btn-primary {
  background: var(--qr-accent-primary);
  color: #fff !important;
}

.qr-btn-primary:hover {
  background: var(--qr-accent-blue-hover);
}

.qr-btn-outline {
  border-color: var(--qr-border-subtle);
  background: var(--qr-bg-card);
  color: var(--qr-text-primary);
}

.qr-btn-outline:hover {
  border-color: var(--qr-border-strong);
  background: var(--qr-bg-subtle);
}

.qr-icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--qr-radius-md);
  border: 1px solid var(--qr-border-subtle);
  background: var(--qr-bg-card);
  color: var(--qr-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.qr-icon-btn:hover {
  background: var(--qr-bg-subtle);
  color: var(--qr-text-primary);
  border-color: var(--qr-border-strong);
}

.qr-icon-btn.active {
  background: var(--qr-accent-blue-subtle);
  color: var(--qr-accent-primary);
  border-color: var(--qr-accent-blue-border);
}

/* ==========================================================================
   Hero Section & Home Catalog
   ========================================================================== */
.qr-hero {
  background: var(--qr-bg-card);
  border: 1px solid var(--qr-border-subtle);
  border-radius: var(--qr-radius-lg);
  padding: 40px 32px;
  margin: 20px 0 24px;
  text-align: center;
  box-shadow: var(--qr-shadow-sm);
  position: relative;
  overflow: hidden;
}

.qr-hero-arabic {
  font-family: var(--qr-font-arabic);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--qr-accent-primary);
  direction: rtl;
  margin-bottom: 6px;
}

.qr-hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--qr-text-primary);
  margin-bottom: 8px;
}

.qr-hero-desc {
  font-size: 0.95rem;
  color: var(--qr-text-muted);
  max-width: 640px;
  margin: 0 auto 24px;
}

.qr-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.qr-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--qr-bg-subtle);
  border: 1px solid var(--qr-border-subtle);
  padding: 5px 12px;
  border-radius: var(--qr-radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--qr-text-secondary);
}

/* Continue Bookmark Banner */
.qr-bookmark-banner {
  background: var(--qr-accent-gold-subtle);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--qr-radius-md);
  padding: 14px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.qr-bookmark-banner-text {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--qr-accent-gold);
  font-size: 0.92rem;
  font-weight: 600;
}

/* Filter Controls Bar */
.qr-filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.qr-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.qr-pill {
  padding: 6px 14px;
  border-radius: var(--qr-radius-full);
  border: 1px solid var(--qr-border-subtle);
  background: var(--qr-bg-card);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--qr-text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.qr-pill:hover,
.qr-pill.active {
  background: var(--qr-accent-primary);
  color: #fff;
  border-color: var(--qr-accent-primary);
}

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

/* ==========================================================================
   Surah Grid (114 Cards)
   ========================================================================== */
.qr-surah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.qr-surah-card {
  background: var(--qr-bg-card);
  border: 1px solid var(--qr-border-subtle);
  border-radius: var(--qr-radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--qr-shadow-sm);
  cursor: pointer;
  text-decoration: none;
}

.qr-surah-card:hover {
  transform: translateY(-2px);
  border-color: var(--qr-accent-primary);
  box-shadow: var(--qr-shadow-md);
}

.qr-surah-number-badge {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: var(--qr-bg-subtle);
  border: 1px solid var(--qr-border-subtle);
  border-radius: var(--qr-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--qr-accent-primary);
  transition: all 0.15s ease;
}

.qr-surah-card:hover .qr-surah-number-badge {
  background: var(--qr-accent-primary);
  color: #fff;
}

.qr-surah-info {
  flex-grow: 1;
  min-width: 0;
}

.qr-surah-name-en {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--qr-text-primary);
  margin-bottom: 2px;
}

.qr-surah-subtext {
  font-size: 0.78rem;
  color: var(--qr-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qr-surah-meta-right {
  text-align: right;
  flex-shrink: 0;
}

.qr-surah-name-ar {
  font-family: var(--qr-font-arabic);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--qr-text-primary);
  direction: rtl;
  line-height: 1.2;
}

.qr-surah-verses-tag {
  font-size: 0.72rem;
  color: var(--qr-text-muted);
  font-weight: 600;
}

/* ==========================================================================
   Surah Reader Interface
   ========================================================================== */
/* ==========================================================================
   Professional Surah Reader Toolbar & Preferences System
   ========================================================================== */
.qr-reader-header-bar {
  position: static;
  z-index: 10;
  background: var(--qr-bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--qr-border-strong);
  border-radius: var(--qr-radius-lg);
  padding: 12px 18px;
  margin: 12px 0 24px;
  box-shadow: var(--qr-shadow-sm);
}

.qr-toolbar-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qr-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qr-toolbar-top-row {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--qr-border-subtle);
}

.qr-nav-combo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.qr-surah-picker {
  display: inline-flex;
  align-items: center;
  background: var(--qr-bg-card);
  border: 1px solid var(--qr-border-strong);
  border-radius: var(--qr-radius-md);
  overflow: hidden;
  box-shadow: var(--qr-shadow-sm);
}

.qr-picker-arrow {
  width: 34px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--qr-text-muted);
  text-decoration: none;
  background: var(--qr-bg-subtle);
  transition: all 0.15s ease;
}

.qr-picker-arrow:hover {
  color: var(--qr-text-primary);
  background: var(--qr-bg-hover);
}

.qr-select-styled {
  background: transparent;
  border: none;
  color: var(--qr-text-primary);
  padding: 0 12px;
  height: 36px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  max-width: 260px;
}

.qr-toolbar-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  height: 36px;
  border-radius: var(--qr-radius-md);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--qr-border-subtle);
  background: var(--qr-bg-subtle);
  color: var(--qr-text-primary);
  transition: all 0.18s ease;
  white-space: nowrap;
}

.qr-toolbar-btn:hover {
  background: var(--qr-bg-hover);
  border-color: var(--qr-border-strong);
  transform: translateY(-1px);
}

.qr-btn-play {
  background: var(--qr-accent-primary);
  color: #fff;
  border-color: var(--qr-accent-primary);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.qr-btn-play:hover {
  background: var(--qr-accent-blue-hover);
  border-color: var(--qr-accent-blue-hover);
  color: #fff;
}

.qr-btn-challenge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(217, 119, 6, 0.22) 100%);
  border-color: rgba(245, 158, 11, 0.5);
  color: var(--qr-accent-gold);
}

.qr-btn-challenge:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(217, 119, 6, 0.35) 100%);
  color: #fff;
}

.qr-pref-group-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.qr-pref-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qr-pref-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--qr-text-muted);
}

.qr-select-compact {
  background: var(--qr-bg-card);
  border: 1px solid var(--qr-border-strong);
  border-radius: var(--qr-radius-md);
  color: var(--qr-text-primary);
  padding: 4px 10px;
  height: 32px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.qr-pref-group-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qr-font-scaler {
  display: inline-flex;
  align-items: center;
  background: var(--qr-bg-card);
  border: 1px solid var(--qr-border-strong);
  border-radius: var(--qr-radius-md);
  overflow: hidden;
  height: 32px;
}

.qr-font-btn {
  width: 32px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--qr-bg-subtle);
  border: none;
  color: var(--qr-text-primary);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.qr-font-btn:hover {
  background: var(--qr-bg-hover);
}

.qr-font-val {
  padding: 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--qr-text-muted);
  min-width: 42px;
  text-align: center;
}

/* Home Settings Card under The Noble Quran */
.qr-home-settings-card {
  background: var(--qr-bg-card);
  border: 1px solid var(--qr-border-strong);
  border-radius: var(--qr-radius-lg);
  padding: 16px 22px;
  margin: 16px auto 24px;
  max-width: 100%;
  box-shadow: var(--qr-shadow-sm);
}

.qr-home-settings-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--qr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.qr-home-settings-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.qr-pref-item-surah {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 260px;
}

.qr-surah-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.qr-surah-launch-btn {
  height: 36px;
  padding: 0 16px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.qr-home-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 18px 12px 42px;
  border-radius: var(--qr-radius-full);
  border: 1px solid var(--qr-border-strong);
  background: var(--qr-bg-card);
  color: var(--qr-text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  box-shadow: var(--qr-shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.qr-challenge-featured-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(245, 158, 11, 0.16) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--qr-radius-lg);
  padding: 20px 24px;
  margin: 20px auto 26px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--qr-shadow-md);
  box-sizing: border-box;
}

.qr-challenge-info-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.qr-challenge-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #10b981 0%, #f59e0b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  flex-shrink: 0;
}

.qr-challenge-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.qr-challenge-cta-btn {
  padding: 10px 20px;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: var(--qr-radius-full);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.qr-challenge-board-btn {
  padding: 9px 18px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: var(--qr-radius-full);
}

.qr-surah-card-challenge-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--qr-radius-full);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--qr-accent-gold);
  text-decoration: none;
  margin-left: 8px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}


/* Surah Info Hero Banner in Reader */
.qr-surah-banner {
  background: var(--qr-bg-card);
  border: 1px solid var(--qr-border-subtle);
  border-radius: var(--qr-radius-lg);
  padding: 30px 24px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: var(--qr-shadow-sm);
}

.qr-surah-banner-arabic {
  font-family: var(--qr-font-arabic);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--qr-text-primary);
  direction: rtl;
  margin-bottom: 4px;
}

.qr-surah-banner-en {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--qr-text-primary);
  margin-bottom: 2px;
}

.qr-surah-banner-translation {
  font-size: 0.92rem;
  color: var(--qr-text-muted);
  margin-bottom: 14px;
}

.qr-surah-meta-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.qr-meta-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--qr-radius-full);
  background: var(--qr-bg-subtle);
  color: var(--qr-text-secondary);
  border: 1px solid var(--qr-border-subtle);
}

.qr-bismillah-box {
  padding: 14px 20px;
  margin-top: 10px;
  border-top: 1px dashed var(--qr-border-subtle);
}

.qr-bismillah-arabic {
  font-family: var(--qr-font-arabic);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--qr-accent-primary);
  direction: rtl;
}

/* ==========================================================================
   Ayah Cards & Typography
   ========================================================================== */
.qr-verses-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 50px;
}

.qr-ayah-card {
  background: var(--qr-bg-card);
  border: 1px solid var(--qr-border-subtle);
  border-radius: var(--qr-radius-lg);
  padding: 24px 28px;
  box-shadow: var(--qr-shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
  position: relative;
}

.qr-ayah-card:hover {
  border-color: var(--qr-border-strong);
}

.qr-ayah-card.active-playing {
  border-color: var(--qr-accent-primary);
  background-color: var(--qr-accent-blue-subtle);
  box-shadow: 0 0 0 2px var(--qr-accent-blue-border);
}

.qr-ayah-card.bookmarked {
  border-left: 4px solid var(--qr-accent-gold);
}

/* Ayah Card Top Bar */
.qr-ayah-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--qr-border-subtle);
}

.qr-ayah-ref {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--qr-text-muted);
}

.qr-ayah-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qr-action-btn {
  background: var(--qr-bg-subtle);
  border: 1px solid var(--qr-border-subtle);
  color: var(--qr-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--qr-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.qr-action-btn:hover {
  color: var(--qr-text-primary);
  background: var(--qr-bg-hover);
  border-color: var(--qr-border-strong);
}

.qr-action-btn.active {
  background: var(--qr-accent-gold-subtle);
  color: var(--qr-accent-gold);
  border-color: rgba(245, 158, 11, 0.4);
}

/* Arabic Ayah Area */
.qr-arabic-row {
  direction: rtl;
  text-align: right;
  line-height: 2.2;
  margin-bottom: 16px;
}

.qr-arabic-text {
  font-family: var(--qr-font-arabic);
  font-size: 28px;
  font-weight: 700;
  color: var(--qr-text-primary);
  word-spacing: 2px;
}

.qr-verse-end-symbol {
  font-family: var(--qr-font-arabic);
  color: var(--qr-accent-primary);
  margin: 0 4px;
  font-weight: 800;
}

/* Transliteration */
.qr-transliteration {
  font-size: 0.85rem;
  color: var(--qr-text-muted);
  font-style: italic;
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--qr-border-subtle);
}

/* Translation Area */
.qr-translation-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--qr-border-subtle);
}

.qr-translation-tag {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--qr-accent-blue-subtle);
  color: var(--qr-accent-primary);
  padding: 1px 6px;
  border-radius: var(--qr-radius-sm);
  display: inline-block;
  margin-bottom: 6px;
}

.qr-translation-text {
  font-size: 1.02rem;
  color: var(--qr-text-secondary);
  line-height: 1.7;
}

/* Surah Bottom Pagination */
.qr-surah-nav-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 40px 0;
}

.qr-nav-card {
  flex: 1;
  background: var(--qr-bg-card);
  border: 1px solid var(--qr-border-subtle);
  border-radius: var(--qr-radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s;
  text-decoration: none;
}

.qr-nav-card:hover {
  border-color: var(--qr-accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--qr-shadow-md);
}

.qr-nav-card.prev {
  text-align: left;
}

.qr-nav-card.next {
  text-align: right;
  flex-direction: row-reverse;
}

/* ==========================================================================
   Sticky Bottom Audio Player
   ========================================================================== */
.qr-audio-player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
  padding: 0;
  display: none;
  flex-direction: column;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

[data-theme="light"] .qr-audio-player-bar {
  background: rgba(255, 255, 255, 0.97);
  border-top-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
}

.qr-audio-player-bar.active {
  display: flex;
}

/* Seekable Progress Rail across top edge */
.qr-audio-progress-rail {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: height 0.15s ease;
  user-select: none;
}

[data-theme="light"] .qr-audio-progress-rail {
  background: rgba(0, 0, 0, 0.1);
}

.qr-audio-progress-rail:hover {
  height: 7px;
}

.qr-audio-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  position: relative;
  pointer-events: none;
  transition: width 0.08s linear;
}

.qr-audio-progress-handle {
  display: none;
  position: absolute;
  top: 50%;
  right: -5px;
  transform: translateY(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

.qr-audio-progress-rail:hover .qr-audio-progress-handle {
  display: block;
}

/* Inner Layout */
.qr-audio-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* 1. Meta (Left) */
.qr-audio-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
  flex: 1 1 260px;
}

.qr-audio-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.1) 100%);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.qr-audio-player-bar.is-playing .qr-audio-avatar {
  animation: qrPulse 2s infinite;
  color: #34d399;
  border-color: #10b981;
}

@keyframes qrPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45);
  }
  70% {
    transform: scale(1.04);
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.qr-audio-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.qr-audio-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.qr-audio-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.qr-audio-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--qr-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qr-audio-sub-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qr-audio-subtitle {
  font-size: 0.77rem;
  color: var(--qr-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2. Transport & Time (Center) */
.qr-audio-transport {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
}

.qr-audio-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qr-audio-btn-nav {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--qr-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

[data-theme="light"] .qr-audio-btn-nav {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}

.qr-audio-btn-nav:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.35);
  transform: scale(1.06);
}

.qr-audio-btn-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.qr-audio-btn-play {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.qr-audio-btn-play:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.55);
}

.qr-audio-btn-play:active {
  transform: scale(0.96);
}

.qr-audio-time {
  font-size: 0.74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--qr-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.qr-audio-time-sep {
  opacity: 0.5;
}

/* 3. Actions & Modes (Right) */
.qr-audio-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  flex: 1 1 260px;
}

/* Mode toggle buttons (Continuous & Repeat All) */
.qr-audio-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  font-size: 0.77rem;
  font-weight: 700;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--qr-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

[data-theme="light"] .qr-audio-mode-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.09);
}

.qr-audio-mode-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--qr-text-primary);
}

[data-theme="light"] .qr-audio-mode-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.qr-audio-mode-btn.active {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  color: #10b981;
}

.qr-audio-mode-btn#qr-audio-repeat.active {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
  color: #f59e0b;
}

.qr-mode-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

.qr-audio-mode-btn.active .qr-mode-dot {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.qr-audio-mode-btn#qr-audio-repeat.active .qr-mode-dot {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

/* Reciter dropdown */
.qr-audio-reciter-wrap {
  position: relative;
}

.qr-audio-reciter-dropdown {
  background: var(--qr-bg-card);
  border: 1px solid var(--qr-border-strong);
  color: var(--qr-text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  max-width: 170px;
  transition: border-color 0.15s ease;
}

.qr-audio-reciter-dropdown:focus {
  border-color: #10b981;
}

.qr-audio-btn-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--qr-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.qr-audio-btn-close:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* Continuous Recitation Strip on Home Settings Card */
.qr-continuous-hero-strip {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 12px 18px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

[data-theme="light"] .qr-continuous-hero-strip {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.03) 100%);
  border-color: rgba(16, 185, 129, 0.25);
}

.qr-strip-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qr-strip-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #10b981;
}

.qr-strip-text {
  font-size: 0.88rem;
  color: var(--qr-text-primary);
}

.qr-strip-desc-text {
  color: var(--qr-text-secondary);
}

.qr-btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 9px 18px;
  border-radius: 9px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.qr-btn-emerald:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

/* Home Surah Selector button group */
.qr-surah-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qr-surah-play-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.qr-surah-play-action-btn:hover {
  background: #10b981;
  color: #ffffff;
}

/* Surah Card Quick Play Button */
.qr-surah-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  margin-left: 6px;
}

.qr-surah-card-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  font-size: 0.73rem;
  font-weight: 700;
  border-radius: 7px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  cursor: pointer;
  transition: all 0.18s ease;
}

.qr-surah-card-play-btn:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  transform: translateY(-1px);
}

/* Reader Toolbar Repeat Button */
.qr-btn-repeat {
  border-color: rgba(255, 255, 255, 0.15);
}

.qr-btn-repeat.qr-repeat-active {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  color: #f59e0b !important;
}

.qr-repeat-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  transition: background 0.2s;
}

.qr-btn-repeat.qr-repeat-active .qr-repeat-dot {
  background: #f59e0b !important;
}

/* Celebration Completion Modal */
.qr-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: qrFadeIn 0.25s ease;
}

@keyframes qrFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.qr-completion-card {
  background: var(--qr-bg-card);
  border: 1px solid var(--qr-border-strong);
  border-radius: 20px;
  max-width: 460px;
  width: 100%;
  padding: 32px 26px;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  animation: qrScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes qrScaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.qr-completion-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.qr-completion-title {
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--qr-text-primary);
  margin: 0 0 10px;
}

.qr-completion-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--qr-text-secondary);
  margin: 0 0 22px;
}

.qr-completion-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Mobile Responsiveness for Bottom Audio Player Bar */
@media (max-width: 900px) {
  .qr-audio-bar-inner {
    flex-wrap: wrap;
    padding: 8px 14px;
    gap: 10px;
  }
  .qr-audio-meta {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
  }
  .qr-audio-actions .qr-audio-btn-close {
    order: 2;
  }
  .qr-audio-transport {
    order: 3;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
  [data-theme="light"] .qr-audio-transport {
    border-top-color: rgba(0, 0, 0, 0.05);
  }
  .qr-audio-actions {
    order: 4;
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }
  .qr-audio-reciter-dropdown {
    max-width: 120px;
    font-size: 0.72rem;
  }
  .qr-audio-mode-btn {
    padding: 5px 8px;
    font-size: 0.72rem;
  }
  .qr-mode-text {
    display: none;
  }
}

@media (max-width: 480px) {
  .qr-audio-title {
    font-size: 0.84rem;
  }
  .qr-audio-subtitle {
    font-size: 0.72rem;
  }
  .qr-continuous-hero-strip {
    flex-direction: column;
    align-items: stretch;
  }
  .qr-btn-emerald {
    justify-content: center;
    width: 100%;
  }
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.qr-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  background: var(--qr-text-primary);
  color: var(--qr-text-inverse);
  padding: 10px 18px;
  border-radius: var(--qr-radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--qr-shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.25s ease;
}

.qr-toast.visible {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 768px) {
  .qr-surah-grid {
    grid-template-columns: 1fr;
    margin-bottom: 16px;
  }
  .qr-hero-arabic {
    font-size: 2.2rem;
  }
  .qr-surah-banner-arabic {
    font-size: 2.2rem;
  }
  .qr-arabic-text {
    font-size: 24px !important;
  }
  .qr-ayah-card {
    padding: 16px 14px;
  }
  .qr-reader-header-bar {
    padding: 10px 12px;
    margin: 8px 0 16px;
    border-radius: var(--qr-radius-md);
  }
  .qr-toolbar-inner {
    gap: 10px;
  }
  .qr-toolbar-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .qr-toolbar-top-row {
    padding-bottom: 8px;
  }
  .qr-nav-combo {
    width: 100%;
  }
  .qr-surah-picker {
    flex: 1;
    min-width: 0;
  }
  .qr-select-styled {
    flex: 1;
    max-width: none;
    min-width: 0;
    font-size: 0.84rem;
  }
  .qr-toolbar-actions-right {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .qr-toolbar-actions-right .qr-toolbar-btn {
    width: 100%;
    justify-content: center;
  }
  .qr-toolbar-bottom-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .qr-pref-group-left {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .qr-pref-group-left .qr-pref-item {
    flex: 1;
    min-width: 0;
  }
  .qr-pref-group-left .qr-select-compact {
    width: 100%;
    min-width: 0;
    font-size: 0.8rem;
  }
  .qr-pref-group-right {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .qr-home-settings-card {
    padding: 14px 12px;
    margin: 14px 0 20px;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
  }
  .qr-home-settings-title {
    font-size: 0.8rem;
    margin-bottom: 14px;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
  }
  .qr-home-settings-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    height: auto;
    min-height: 0;
  }
  .qr-home-settings-grid .qr-pref-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-sizing: border-box;
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    margin: 0;
  }
  .qr-home-settings-grid .qr-pref-label {
    min-width: 82px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--qr-text-muted);
    flex-shrink: 0;
    margin: 0;
    line-height: 1;
  }
  .qr-home-settings-grid .qr-select-compact {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 38px;
    font-size: 0.84rem;
    box-sizing: border-box;
    margin: 0;
  }
  .qr-home-settings-grid .qr-pref-item-surah {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
  }
  .qr-home-settings-grid .qr-surah-select-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    flex: 0 0 auto;
    height: auto;
  }
  .qr-home-settings-grid .qr-surah-select-wrap .qr-pref-label {
    min-width: 82px;
    flex-shrink: 0;
    margin: 0;
  }
  .qr-home-settings-grid .qr-surah-select-wrap .qr-select-compact {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 38px;
    margin: 0;
  }
  .qr-home-settings-grid .qr-surah-launch-btn {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    box-sizing: border-box;
    cursor: pointer;
    margin: 0;
    flex: 0 0 auto;
  }
  .qr-home-settings-grid .qr-font-scaler {
    flex-shrink: 0;
    height: 38px;
  }
  .qr-home-settings-grid .qr-font-scaler .qr-font-btn {
    width: 32px;
    height: 36px;
  }
  .qr-home-settings-grid .qr-font-scaler .qr-font-val {
    min-width: 44px;
    font-size: 0.82rem;
  }
}

/* Mobile Ayah Action Icon Buttons & Save / Bookmark overflow fix */
@media (max-width: 640px) {
  .qr-container {
    padding: 0 12px;
  }
  .qr-hero {
    padding: 22px 8px 16px;
  }
  .qr-hero-arabic {
    font-size: 1.85rem;
    margin-bottom: 4px;
  }
  .qr-hero-title {
    font-size: 1.35rem;
    line-height: 1.3;
    margin-bottom: 8px;
  }
  .qr-hero-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0 auto 16px;
  }

  .qr-ayah-card {
    padding: 14px 12px;
  }
  .qr-ayah-topbar {
    margin-bottom: 12px;
    padding-bottom: 8px;
  }
  .qr-ayah-actions {
    gap: 5px;
  }
  .qr-action-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    border-radius: var(--qr-radius-md);
    flex-shrink: 0;
  }
  .qr-action-btn span {
    display: none !important;
  }
  .qr-action-btn svg {
    width: 15px;
    height: 15px;
  }
  .qr-stat-badge {
    font-size: 0.74rem;
    padding: 4px 8px;
  }

  /* Challenge Banner Mobile */
  .qr-challenge-featured-banner {
    padding: 16px 14px;
    margin: 16px auto 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .qr-challenge-info-left {
    gap: 12px;
  }
  .qr-challenge-icon-box {
    width: 46px;
    height: 46px;
    font-size: 1.45rem;
  }
  .qr-challenge-featured-banner .qr-challenge-btns {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .qr-challenge-featured-banner .qr-challenge-btns .qr-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 10px 8px;
    font-size: 0.84rem;
    box-sizing: border-box;
  }

  /* Filters & Surah Cards Mobile */
  .qr-filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 16px;
  }
  .qr-filter-pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    scrollbar-width: none;
  }
  .qr-filter-pills::-webkit-scrollbar {
    display: none;
  }
  .qr-pill {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 0.78rem;
  }
  .qr-counter {
    text-align: right;
    font-size: 0.78rem;
  }
  .qr-surah-card {
    padding: 12px 12px;
    gap: 8px;
  }
  .qr-surah-number-badge {
    width: 36px;
    height: 36px;
    font-size: 0.82rem;
    border-radius: 8px;
  }
  .qr-surah-name-en {
    font-size: 0.92rem;
  }
  .qr-surah-subtext {
    font-size: 0.74rem;
  }
  .qr-surah-name-ar {
    font-size: 1.15rem;
  }
  .qr-surah-verses-tag {
    font-size: 0.68rem;
  }
  .qr-surah-card-challenge-btn {
    padding: 5px 8px;
    font-size: 0.7rem;
    margin-left: 4px;
  }
}

/* Desktop Locked Left Sidebar Navigation (Menu stays fixed while Surah list scrolls) */
@media (min-width: 993px) {
  .qr-dashboard {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    width: 100%;
    position: relative;
  }
  .qr-sidebar-left {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 95 !important;
    box-sizing: border-box !important;
    background: #0c141d !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding-bottom: 90px !important;
  }
  [data-theme="light"] .qr-sidebar-left {
    background: #ffffff !important;
    border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
  }
  .qr-main-stage {
    margin-left: 270px !important;
    width: calc(100% - 270px) !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
  }
}

