/* ════════════════════════════════════════════════════════════
   FIRDAUS — GLOW ENHANCEMENTS 🌟💫✨⭐
   "Jannah — the ultimate paradise, where light itself glows"
   ════════════════════════════════════════════════════════════
   Adds divine luminosity, golden auras, emerald radiance,
   floating nur particles, animated light rays, and premium
   hover glows to every element.
   ════════════════════════════════════════════════════════════ */

/* ── Boosted glow variables ── */
:root {
  --glow-gold-soft: 0 0 20px rgba(212, 168, 67, 0.15);
  --glow-gold-medium: 0 0 40px rgba(212, 168, 67, 0.25);
  --glow-gold-strong: 0 0 60px rgba(212, 168, 67, 0.35);
  --glow-gold-intense: 0 0 80px rgba(212, 168, 67, 0.45);
  
  --glow-emerald-soft: 0 0 20px rgba(26, 138, 110, 0.15);
  --glow-emerald-medium: 0 0 40px rgba(26, 138, 110, 0.25);
  
  --glow-white-soft: 0 0 15px rgba(255, 255, 255, 0.08);
  --glow-white-medium: 0 0 30px rgba(255, 255, 255, 0.12);
  
  --glow-card: 0 4px 24px rgba(0,0,0,0.4), 0 0 15px rgba(212, 168, 67, 0.06);
  --glow-card-hover: 0 8px 40px rgba(0,0,0,0.5), 0 0 30px rgba(212, 168, 67, 0.15);
  
  --text-glow-gold: 0 0 10px rgba(212, 168, 67, 0.3), 0 0 20px rgba(212, 168, 67, 0.1);
  --text-glow-white: 0 0 8px rgba(255, 255, 255, 0.15);
  --text-glow-emerald: 0 0 10px rgba(26, 138, 110, 0.3);
}

/* ════════════════════════════════════════════════════════════
   ISLAMIC GEOMETRIC PATTERNS — Khatam Stars & Arabesque Vines
   ════════════════════════════════════════════════════════════ */

/* ── Subtle khatam (8-pointed star) pattern overlay ── */
.bg-ornaments::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23D4A843' stroke-width='1'%3E%3Cpolygon points='100,5 123,40 160,40 135,75 145,115 100,100 55,115 65,75 40,40 77,40' /%3E%3Cpolygon points='100,195 77,160 40,160 65,125 55,85 100,100 145,85 135,125 160,160 123,160' /%3E%3C/g%3E%3C/svg%3E");
  background-size: 200px 200px;
  background-repeat: repeat;
}

/* ── Arabesque-inspired vine pattern at bottom ── */
.bg-ornaments::after {
  content: '';
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 300px 80px at 15% 100%, rgba(27, 107, 58, 0.06) 0%, transparent 100%),
    radial-gradient(ellipse 400px 100px at 50% 100%, rgba(212, 168, 67, 0.04) 0%, transparent 100%),
    radial-gradient(ellipse 300px 80px at 85% 100%, rgba(27, 107, 58, 0.06) 0%, transparent 100%);
}

/* ── Boosted ornament glow ── */

/* ── Animated golden light rays from above (Fajr in Jannah) ── */
.light-rays {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.light-ray {
  position: absolute;
  top: -20%;
  width: 2px;
  height: 120%;
  opacity: 0;
  transform-origin: top center;
  animation: raySweep 8s ease-in-out infinite;
}

.light-ray::before {
  content: '';
  position: absolute;
  top: 0;
  left: -20px;
  right: -20px;
  height: 100%;
  background: linear-gradient(180deg,
    rgba(212, 175, 55, 0.08) 0%,
    rgba(212, 175, 55, 0.03) 30%,
    rgba(212, 175, 55, 0.01) 60%,
    transparent 100%
  );
  filter: blur(20px);
}

.light-ray:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 8s; }
.light-ray:nth-child(2) { left: 25%; animation-delay: 1.2s; animation-duration: 9s; }
.light-ray:nth-child(3) { left: 40%; animation-delay: 2.5s; animation-duration: 7.5s; }
.light-ray:nth-child(4) { left: 55%; animation-delay: 0.8s; animation-duration: 8.5s; }
.light-ray:nth-child(5) { left: 70%; animation-delay: 3s; animation-duration: 9.5s; }
.light-ray:nth-child(6) { left: 85%; animation-delay: 1.8s; animation-duration: 7s; }
.light-ray:nth-child(7) { left: 50%; animation-delay: 4s; animation-duration: 10s; }

@keyframes raySweep {
  0% { opacity: 0; transform: translateX(-30px) scaleX(0.3); }
  10% { opacity: 1; }
  50% { opacity: 0.8; transform: translateX(0) scaleX(1); }
  90% { opacity: 0.2; }
  100% { opacity: 0; transform: translateX(30px) scaleX(0.3); }
}

/* ── Enhanced ornament glow ── */
.ornament {
  filter: blur(80px) brightness(1.3) !important;
  opacity: 0.35 !important;
}

.ornament-1 {
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, transparent 70%) !important;
}

.ornament-2 {
  background: radial-gradient(circle, rgba(42, 170, 136, 0.20) 0%, transparent 70%) !important;
}

.ornament-3 {
  background: radial-gradient(circle, rgba(212, 175, 55, 0.18) 0%, transparent 70%) !important;
}

.ornament-4 {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%) !important;
}

.ornament-5 {
  background: radial-gradient(circle, rgba(232, 198, 90, 0.15) 0%, transparent 70%) !important;
}

/* ════════════════════════════════════════════════════════════
   FLOATING NUR (LIGHT) PARTICLES
   Divine luminous orbs that drift upward like light in Jannah
   ════════════════════════════════════════════════════════════ */

.nur-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.nur-particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: nurRise linear infinite;
}

/* Golden particles */
.nur-particle:nth-child(1) { width: 3px; height: 3px; left: 15%; bottom: -5%; background: #e8c65a; box-shadow: 0 0 8px rgba(212,175,55,0.8); animation-duration: 14s; animation-delay: 0s; }
.nur-particle:nth-child(2) { width: 2px; height: 2px; left: 35%; bottom: -5%; background: #f0d88a; box-shadow: 0 0 6px rgba(212,175,55,0.6); animation-duration: 18s; animation-delay: 2s; }
.nur-particle:nth-child(3) { width: 4px; height: 4px; left: 55%; bottom: -5%; background: #d4a843; box-shadow: 0 0 12px rgba(212,175,55,0.9); animation-duration: 12s; animation-delay: 4s; }
.nur-particle:nth-child(4) { width: 2.5px; height: 2.5px; left: 75%; bottom: -5%; background: #fff8e0; box-shadow: 0 0 8px rgba(255,248,224,0.7); animation-duration: 16s; animation-delay: 1s; }
.nur-particle:nth-child(5) { width: 3.5px; height: 3.5px; left: 90%; bottom: -5%; background: #e8c65a; box-shadow: 0 0 10px rgba(212,175,55,0.8); animation-duration: 20s; animation-delay: 3s; }
.nur-particle:nth-child(6) { width: 2px; height: 2px; left: 5%; bottom: -5%; background: #ffffff; box-shadow: 0 0 6px rgba(255,255,255,0.6); animation-duration: 15s; animation-delay: 5s; }
.nur-particle:nth-child(7) { width: 3px; height: 3px; left: 22%; bottom: -5%; background: #d4a843; box-shadow: 0 0 8px rgba(212,168,67,0.8); animation-duration: 13s; animation-delay: 1.5s; }
.nur-particle:nth-child(8) { width: 2.5px; height: 2.5px; left: 45%; bottom: -5%; background: #2aaa88; box-shadow: 0 0 10px rgba(42,170,136,0.7); animation-duration: 17s; animation-delay: 6s; }
.nur-particle:nth-child(9) { width: 3px; height: 3px; left: 65%; bottom: -5%; background: #e8c65a; box-shadow: 0 0 8px rgba(232,198,90,0.8); animation-duration: 19s; animation-delay: 2.5s; }
.nur-particle:nth-child(10) { width: 2px; height: 2px; left: 80%; bottom: -5%; background: #b89840; box-shadow: 0 0 6px rgba(184,152,64,0.6); animation-duration: 14s; animation-delay: 7s; }
.nur-particle:nth-child(11) { width: 3.5px; height: 3.5px; left: 8%; bottom: -5%; background: #ffffff; box-shadow: 0 0 12px rgba(255,255,255,0.5); animation-duration: 22s; animation-delay: 0.5s; }
.nur-particle:nth-child(12) { width: 2px; height: 2px; left: 50%; bottom: -5%; background: #e8c65a; box-shadow: 0 0 6px rgba(212,175,55,0.7); animation-duration: 11s; animation-delay: 8s; }
.nur-particle:nth-child(13) { width: 3px; height: 3px; left: 30%; bottom: -5%; background: #2aaa88; box-shadow: 0 0 8px rgba(42,170,136,0.8); animation-duration: 16s; animation-delay: 3.5s; }
.nur-particle:nth-child(14) { width: 2.5px; height: 2.5px; left: 95%; bottom: -5%; background: #d4a843; box-shadow: 0 0 10px rgba(212,168,67,0.7); animation-duration: 20s; animation-delay: 9s; }
.nur-particle:nth-child(15) { width: 3px; height: 3px; left: 42%; bottom: -5%; background: #fff8e0; box-shadow: 0 0 8px rgba(255,248,224,0.6); animation-duration: 15s; animation-delay: 4.5s; }

@keyframes nurRise {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  10% { opacity: 0.8; transform: translateY(-30px) scale(1); }
  30% { opacity: 0.6; transform: translateY(-120px) scale(0.9); }
  50% { opacity: 0.4; transform: translateY(-250px) scale(0.7); }
  70% { opacity: 0.2; transform: translateY(-400px) scale(0.5); }
  100% { opacity: 0; transform: translateY(-600px) scale(0.2); }
}

/* ════════════════════════════════════════════════════════════
   STARFIELD ENHANCEMENT — Brighter, more luminous stars
   ════════════════════════════════════════════════════════════ */

.star-gold {
  box-shadow: 0 0 6px var(--color-gold-glow), 0 0 12px rgba(212, 168, 67, 0.1) !important;
}

.star-bright {
  box-shadow: 0 0 10px var(--color-gold-glow), 0 0 20px rgba(212, 168, 67, 0.15) !important;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0; transform: scale(0.3); }
  30% { opacity: 0.7; transform: scale(1.2); }
  50% { opacity: 0.9; transform: scale(1.4); }
  60% { opacity: 0.3; transform: scale(0.8); }
}

/* ════════════════════════════════════════════════════════════
   SIDEBAR GLOW — Divine golden edge
   ════════════════════════════════════════════════════════════ */

.sidebar::after {
  width: 2px !important;
  opacity: 0.5 !important;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(212, 175, 55, 0.5) 10%,
    rgba(212, 175, 55, 0.8) 30%,
    var(--color-gold-light) 50%,
    rgba(212, 175, 55, 0.8) 70%,
    rgba(212, 175, 55, 0.5) 90%,
    transparent 100%
  ) !important;
  box-shadow: 2px 0 20px rgba(212, 175, 55, 0.15);
}

.sidebar {
  background: linear-gradient(180deg, #0A1410 0%, #0F1A12 50%, #122418 100%) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

.sidebar-header {
  border-bottom: 1px solid rgba(212, 175, 55, 0.12) !important;
}

.logo-title {
  filter: drop-shadow(0 0 20px rgba(212, 168, 67, 0.3)) !important;
}

@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(212, 168, 67, 0.4)); }
  50% { filter: drop-shadow(0 0 30px rgba(212, 168, 67, 0.7)); }
}

/* ════════════════════════════════════════════════════════════
   NAV ITEMS — Glow on hover
   ════════════════════════════════════════════════════════════ */

.nav-item {
  transition: all 0.3s ease !important;
}

.nav-item:hover {
  background: rgba(212, 175, 55, 0.12) !important;
  box-shadow: inset 4px 0 0 var(--color-gold-light), 0 0 15px rgba(212, 175, 55, 0.1);
}

.nav-item.active {
  background: rgba(212, 175, 55, 0.1) !important;
  box-shadow: inset 4px 0 0 var(--color-gold-light), 0 0 20px rgba(212, 175, 55, 0.15);
}

/* ════════════════════════════════════════════════════════════
   CARD GLOW — Paradise cards with divine radiance
   ════════════════════════════════════════════════════════════ */

.stat-card,
.module-card,
.pillar-card,
.ayah-card {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

/* Subtle shine overlay on cards */
.stat-card::before,
.module-card::before,
.pillar-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(212, 175, 55, 0.03),
    transparent 30%,
    transparent 60%,
    rgba(212, 175, 55, 0.03),
    transparent
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.stat-card:hover::before,
.module-card:hover::before,
.pillar-card:hover::before {
  opacity: 1;
  animation: shineRotate 3s linear infinite;
}

@keyframes shineRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Card hover glow */
.stat-card:hover,
.module-card:hover,
.pillar-card:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(212, 175, 55, 0.25) !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 30px rgba(212, 175, 55, 0.12) !important;
}

/* Default card glow (no hover) */
.stat-card,
.module-card {
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 10px rgba(212, 168, 67, 0.04) !important;
}

/* ── Stats grid numbers ── */
.stat-value {
  text-shadow: var(--text-glow-gold) !important;
}

/* ── Gold stat accents ── */
.stat-card .stat-icon {
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.3));
}

/* ════════════════════════════════════════════════════════════
   AYAH CARDS — Quran reader divine glow
   ════════════════════════════════════════════════════════════ */

.ayah-card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.3), 0 0 8px rgba(212, 168, 67, 0.03) !important;
}

.ayah-card:hover {
  border-color: rgba(212, 175, 55, 0.2) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 24px rgba(212, 175, 55, 0.08) !important;
}

/* Playing ayah — intense gold glow */
.ayah-card.ayah-playing {
  border-color: var(--color-gold-light) !important;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.2), 0 0 60px rgba(212, 175, 55, 0.1), inset 0 0 30px rgba(212, 175, 55, 0.05) !important;
  animation: ayahPulse 2s ease-in-out infinite !important;
}

@keyframes ayahPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(212, 175, 55, 0.2), 0 0 60px rgba(212, 175, 55, 0.1); }
  50% { box-shadow: 0 0 40px rgba(212, 175, 55, 0.3), 0 0 80px rgba(212, 175, 55, 0.15); }
}

/* Arabic text glow in ayah cards */
.ayah-card [style*="font-family:var(--font-arabic)"] {
  text-shadow: 0 0 12px rgba(212, 168, 67, 0.06), 0 0 24px rgba(212, 168, 67, 0.03);
}

/* Ayah number badge glow */
.ayah-number-badge {
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.3));
}

/* Word-by-word glow */
.quran-word:hover {
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

/* ════════════════════════════════════════════════════════════
   BUTTON GLOW — Luminous CTA
   ════════════════════════════════════════════════════════════ */

.back-btn {
  transition: all 0.3s ease !important;
}

.back-btn:hover {
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.15);
}

/* Primary action buttons */
button[style*="linear-gradient(135deg,var(--color-gold-primary)"] {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease !important;
}

button[style*="linear-gradient(135deg,var(--color-gold-primary)"]:hover {
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.3), 0 0 60px rgba(212, 175, 55, 0.15);
  transform: translateY(-1px);
}

button[style*="linear-gradient(135deg,var(--color-gold-primary)"]:active {
  transform: translateY(0);
}

/* ════════════════════════════════════════════════════════════
   HEADER / TITLE GLOW
   ════════════════════════════════════════════════════════════ */

.page-title {
  text-shadow: var(--text-glow-gold) !important;
}

.page-subtitle {
  text-shadow: var(--text-glow-white) !important;
}

/* ── Section header in sidebar ── */
.nav-section-title {
  text-shadow: 0 0 8px rgba(212, 168, 67, 0.15);
  letter-spacing: 2px;
}

/* ════════════════════════════════════════════════════════════
   LOADING SCREEN — Divine shimmer
   ════════════════════════════════════════════════════════════ */

.loading-spinner {
  filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
}

.loading-ornament {
  filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.3));
  animation: ornamentPulse 2s ease-in-out infinite;
}

@keyframes ornamentPulse {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.3)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 40px rgba(212, 175, 55, 0.6)); transform: scale(1.05); }
}

/* ════════════════════════════════════════════════════════════
   ATHAN POPUP GLOW — Heavenly notification
   ════════════════════════════════════════════════════════════ */

#athanPopup [style*="background:radial-gradient"] {
  animation: athanGlow 2s ease-in-out infinite;
}

@keyframes athanGlow {
  0%, 100% { box-shadow: 0 0 40px rgba(212, 175, 55, 0.2); }
  50% { box-shadow: 0 0 80px rgba(212, 175, 55, 0.4), 0 0 120px rgba(212, 175, 55, 0.15); }
}

/* ════════════════════════════════════════════════════════════
   QIBLA COMPASS GLOW
   ════════════════════════════════════════════════════════════ */

#qiblaCompass {
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.1), 0 0 80px rgba(212, 175, 55, 0.05), inset 0 0 60px rgba(0,0,0,0.4) !important;
  animation: compassGlow 3s ease-in-out infinite;
}

@keyframes compassGlow {
  0%, 100% { box-shadow: 0 0 40px rgba(212, 175, 55, 0.1), 0 0 80px rgba(212, 175, 55, 0.05); }
  50% { box-shadow: 0 0 60px rgba(212, 175, 55, 0.18), 0 0 120px rgba(212, 175, 55, 0.08); }
}

/* ════════════════════════════════════════════════════════════
   DHIKR COUNTER GLOW
   ════════════════════════════════════════════════════════════ */

.dhikr-counter-value {
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.3), 0 0 40px rgba(212, 175, 55, 0.15);
}

/* ════════════════════════════════════════════════════════════
   REPLAY / PLAY BUTTON GLOW
   ════════════════════════════════════════════════════════════ */

.qr-play-ayah {
  transition: all 0.3s ease !important;
}

.qr-play-ayah:hover {
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25) !important;
}

/* ════════════════════════════════════════════════════════════
   SCROLLBAR — More luminous
   ════════════════════════════════════════════════════════════ */

::-webkit-scrollbar-thumb {
  box-shadow: 0 0 8px rgba(212, 168, 67, 0.2);
}

/* ════════════════════════════════════════════════════════════
   DIVINE SEPARATOR
   ════════════════════════════════════════════════════════════ */

.divine-divider {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(212, 175, 55, 0.1) 20%,
    rgba(212, 175, 55, 0.3) 50%,
    rgba(212, 175, 55, 0.1) 80%,
    transparent 100%
  );
  margin: 24px 0;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.05);
}

/* ════════════════════════════════════════════════════════════
   NOW PLAYING BAR
   ════════════════════════════════════════════════════════════ */

#qrStatusBar {
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.08);
  animation: statusBarGlow 2s ease-in-out infinite;
}

@keyframes statusBarGlow {
  0%, 100% { border-color: rgba(212, 175, 55, 0.15); }
  50% { border-color: rgba(212, 175, 55, 0.3); }
}

/* ════════════════════════════════════════════════════════════
   GOLDEN TEXT ACCENT
   ════════════════════════════════════════════════════════════ */

.gold-glow-text {
  color: var(--color-gold-light);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3), 0 0 20px rgba(212, 175, 55, 0.1);
}

.emerald-glow-text {
  color: var(--color-emerald-light);
  text-shadow: 0 0 10px rgba(42, 170, 136, 0.3);
}

/* ════════════════════════════════════════════════════════════
   SELECT DROP-DOWN GLOW
   ════════════════════════════════════════════════════════════ */

select:focus {
  border-color: var(--color-gold-light) !important;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
  outline: none;
}

/* ════════════════════════════════════════════════════════════
   TAFSIR PANEL — Soft glow
   ════════════════════════════════════════════════════════════ */

.tafsir-panel {
  border-color: rgba(212, 175, 55, 0.12) !important;
  box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.03);
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — Reduce animations on mobile for performance
   ════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .light-ray,
  .nur-particle,
  .stat-card::before,
  .module-card::before,
  .pillar-card::before {
    animation: none !important;
    opacity: 0 !important;
    display: none !important;
  }
  
  .ayah-card.ayah-playing {
    animation: none !important;
  }
}

@media (max-width: 768px) {
  .light-ray { display: none; }
  .nur-particle { opacity: 0.3 !important; }
}
